Random Python Program Generator

This page is powered by pyfuzz, a program generator I have written to test the JIT compiler of Unladen Swallow.

Reload to generate another program!

def func7(arg52, arg53):
    var57 = func8(arg52, arg53)
    if var57 < var57:
        var62 = class9()
    else:
        var62 = class11()
    for var63 in range(2):
        var64 = var62.func10
        var64(arg53, arg53)
    var94 = func13(arg52, var57)
    var95 = arg52 - -1188584451
    var96 = var94 - (var57 ^ -405 + -1190668830)
    var97 = 66491524 - var95
    var98 = arg53 + var97 - var95
    var99 = var97 ^ var97 ^ var98 | var94
    var100 = var99 | ((arg53 | var94) & arg53)
    var101 = var94 - 1944879877
    var102 = var96 ^ arg53 - var98 ^ arg53
    var103 = var102 + 1313987999
    var104 = (var98 | (var102 - arg52)) + var99
    var105 = ((var94 & var100) - var94) & var94
    var106 = var104 - var100
    var107 = ((var99 | var102) + var100) - var94
    var108 = (var105 + (var100 - var107)) - arg53
    var109 = (-500332765 + var100) | (var95 + var94)
    var110 = ((arg53 ^ var95) | var57) - var107
    if arg53 < var106:
        var111 = (var97 - var97 ^ -394) & var98
    else:
        var111 = (var102 | (var97 | var105)) & var105
    var112 = (var57 - var99) - var98 & var57
    if var97 < var105:
        var113 = (var99 ^ var96) ^ arg53
    else:
        var113 = (451 + (var104 & var98)) & var103
    var114 = var110 + var108 ^ var112 ^ var57
    var115 = (arg53 | arg52) | var109 ^ var101
    result = var107 ^ ((var100 | arg53) ^ ((var106 & ((var101 - (var100 | var96 - var114 | var107) - var105) | var98)) - 1414964915))
    return result
def func15(arg67, arg68):
    var69 = (181 | -398) + arg68
    var70 = -568 ^ -1146463541
    var71 = arg68 | (var69 & arg67) & 1418063744
    var72 = 72274162 & arg68
    if var70 < var70:
        var73 = arg68 & var71 | arg68 | -36789350
    else:
        var73 = (arg68 - (var69 & 906575462)) - arg67
    var74 = (var70 - var70) & var72 + var69
    var75 = (var72 ^ -639) ^ var72
    var76 = (var74 + (1005291335 | var75)) & var70
    var77 = (var76 - var76 - var69) & var76
    var78 = -1698165524 & var69
    var79 = var75 | (954 & -1520007315 + arg68)
    var80 = ((var70 & var77) & var70) & var77
    var81 = var80 + var77
    var82 = (var74 & (209 | var78)) - var71
    if var81 < var78:
        var83 = var75 ^ var81 | arg68 | var75
    else:
        var83 = var77 | var80 ^ var79
    var84 = var75 ^ arg67 | arg67 | var80
    var85 = 637 | var82 & var78 | -672
    var86 = var82 - var76 - var85 | arg68
    var87 = arg67 ^ var77
    var88 = (arg68 + var70 ^ var75) | var72
    var89 = (var79 | var87 & var74) ^ -19
    var90 = var72 | (var84 & (var78 - arg67))
    var91 = (var80 ^ var72 & var70) - var87
    var92 = (var76 ^ -752) + (arg68 ^ var89)
    result = (var86 & var89 - var71 | (var80 ^ var85) + (var78 + var92 - 544) | var88 - var84 + var90) | var72
    return result
class class11(object):
    def func10(self, arg60, arg61):
        result = -1522373926 - (arg60 + arg61) ^ arg61 - 1432041822 + arg60 | -1
        return result
class class9(object):
    def func10(self, arg58, arg59):
        result = 928761017 - arg58 - (arg58 | (arg59 & 0))
        return result
def func8(arg54, arg55):
    var56 = (((-1226852841 | -1056640119) - -21 ^ 419128388 + arg55 ^ arg54) ^ arg54 & arg54) | (arg55 + arg54 | arg54)
    result = arg55 & -876
    return result
def func4(arg28, arg29):
    var33 = func5(arg29, arg28)
    var34 = (var33 + var33 ^ var33) + var33
    var35 = 1764444072 ^ arg29 + 894 | -926
    var36 = arg28 + arg29
    var37 = var35 + (var34 ^ 900231927) | arg29
    var38 = ((arg29 + var36) & var35) ^ var36
    var39 = arg29 ^ var34 & var36
    var40 = -745688704 | -1275735485 + var38 + -364
    var41 = var36 + -1819026275 - var38 & var36
    var42 = var41 ^ ((var40 - var38) - arg29)
    var43 = var37 - var41
    var44 = ((168859637 - var42) | var39) | var34
    var45 = (var40 & arg28) | (589 - var40)
    var46 = var33 | var35 | var45
    var47 = var45 & var46 & var33
    var48 = var45 ^ var47 + var40 ^ arg28
    var49 = var35 + var44
    var50 = var45 ^ (var43 - var35) ^ var44
    var51 = var46 - var42 ^ var48 ^ var40
    result = var42 + ((var33 & (var37 - (var49 + var33 + var42 & var39) & (var45 ^ var51))) | (var44 | -823475206) - var49)
    return result
def func3(arg21, arg22):
    var23 = -262673536 ^ 897
    var24 = (-203 - (arg22 - 867 & arg21) | -71 | var23 ^ (var23 - 218898631)) | (var23 | var23)
    var25 = arg22 | arg22
    var26 = var23 ^ 1847652568
    var27 = (arg22 | var26) ^ ((-1058809269 + var24 | (-1051439715 & var26 & (var24 + var26)) + var24 + arg22) - arg22 + var23)
    result = arg21 ^ var24 + var23
    return result
def func1(arg1, arg2):
    def func2(arg3, arg4):
        var5 = arg3 | (arg2 - 270)
        var6 = arg3 - -222
        var7 = arg2 | ((arg1 & arg3) + var5)
        if var7 < var6:
            var8 = (arg1 | arg1 | arg2) - var6
        else:
            var8 = arg1 - arg4
        var9 = var7 ^ arg1
        var10 = var6 - (arg1 & arg4) + arg3
        var11 = (arg4 ^ arg3 + arg1) ^ arg1
        var12 = (var5 - arg3) & var6 & var9
        var13 = -668114373 - -473
        var14 = (var6 + var9) | var13
        var15 = var13 & (var11 | (arg1 | var6))
        var16 = var12 - (-460874727 | var15 & var6)
        var17 = var12 & var6
        if var15 < var9:
            var18 = (var13 + var15) + arg4 ^ var12
        else:
            var18 = var14 - var9
        if var17 < var5:
            var19 = var6 - var11 | arg2
        else:
            var19 = var5 - var16
        result = (var17 + var5 ^ ((var17 + var11) + -778820218) | (var6 + (var6 ^ (var9 + var9 - 638) | arg3))) - arg4
        return result
    var20 = func2(arg2, arg1)
    result = arg1 - arg1
    return result
def func5(arg30, arg31):
    closure = [0]
    def func6(acc, rest):
        var32 = -1 | rest
        closure[0] += var32
        if acc == 0:
            return var32
        else:
            result = func6(acc - 1, var32)
            return result
    result = func6(10, 0)
    return result
def func13(arg65, arg66):
    def func14(acc, rest):
        var93 = func15(-5, acc)
        if acc == 0:
            return var93
        else:
            result = func14(acc - 1, var93)
            return result
    result = func14(10, 0)
    return result
if __name__ == "__main__":
    print 'prog_size: 1'
    print 'func_number: 3'
    print 'arg_number: 21'
    for i in xrange(25000):
        x = 5
        x = func1(x, i)
        print x,
    print 'prog_size: 1'
    print 'func_number: 4'
    print 'arg_number: 28'
    for i in xrange(25000):
        x = 5
        x = func3(x, i)
        print x,
    print 'prog_size: 2'
    print 'func_number: 7'
    print 'arg_number: 52'
    for i in xrange(25000):
        x = 5
        x = func4(x, i)
        print x,
    print 'prog_size: 5'
    print 'func_number: 16'
    print 'arg_number: 116'
    for i in xrange(25000):
        x = 5
        x = func7(x, i)
        print x,