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 func8(arg39, arg40):
    var45 = func9(arg40, arg39)
    var49 = func10(var45, arg40)
    var50 = (862468161 - -392) & arg39 & var49
    if arg39 < var49:
        var51 = var45 | var50 ^ arg39 - var45
    else:
        var51 = (362 + var49 - var50) | 1563211673
    var52 = (var50 + 448444029 ^ arg39) | arg39
    var53 = var50 - (var49 ^ 644)
    var54 = (var53 ^ var53) & var52 & arg40
    if var49 < arg40:
        var55 = arg40 & -730
    else:
        var55 = var45 + -585 | (var49 ^ var50)
    if var45 < arg39:
        var56 = var45 + var49
    else:
        var56 = var54 - var49
    var57 = var50 + var54
    var58 = var54 + var50 | var49
    if var53 < var45:
        var59 = (var57 ^ var49 ^ var45) & var53
    else:
        var59 = (-384 | var50 + var57) + var53
    var60 = var53 ^ var52
    result = 8 | -93
    return result
def func9(arg41, arg42):
    var43 = 0
    for var44 in xrange(14):
        var43 += var43 ^ (arg42 ^ var44)
    return var43
def func2(arg6, arg7):
    var35 = func3(arg6, arg7)
    var36 = arg6 & var35 & var35
    var37 = 706 & ((((var35 + -1479522112) - (746083942 | arg7 ^ (arg7 ^ var35 | 306 & arg7)) & (arg7 | (1524852728 - arg6 + var36 & arg6 ^ arg7))) + var36 | arg7 & 2054276150 + 101) + 271490552) & var35 & 1970652107
    var38 = var37 - -716512553 & ((var37 & var37 ^ var37) & (var35 - var35))
    result = var38 + -94
    return result
def func3(arg8, arg9):
    var10 = 0
    for var34 in func4(arg8, var10):
        var10 += arg8 | (var10 & var34)
    return var10
def func5(arg13, arg14):
    var18 = func6(arg13, arg14)
    var19 = ((arg14 | (var18 + ((-916 | (var18 + arg14 - var18 ^ arg14) - -1177974663) - var18 & 473) - -433628368) - arg13 ^ (arg14 & (arg14 & 377330090))) - 1160332906) | var18
    var20 = (325 | (-1525249033 ^ arg14)) | ((var18 & -398614616) ^ var19)
    if arg13 < var20:
        var21 = -588 ^ 464 ^ (var19 & (var18 + (((var18 | ((var20 & var19) - arg13) & -269260038 | ((-799 + var19) - arg13 & arg13 | (var19 ^ var19) - var18 & 543)) | (arg13 | var20)) ^ arg13)) | -35 | var18)
    else:
        var21 = arg13 | var20 & var19 ^ 1506664899 & (((var20 + ((arg13 ^ arg14 ^ -3740905 ^ arg13 | ((var18 + (var20 + -446 - -560991997 ^ var20) & var18) ^ -1085888490 ^ arg14)) - -945524184 | var20) ^ arg14) + -1004378239) & -747)
    var22 = var19 + var19 - (arg13 & arg13) & 81 & var19
    result = var22 + -919 | ((arg13 ^ var19 | -630 + (arg14 + arg13 - arg13)) + var18)
    return result
def func4(arg11, arg12):
    var23 = func5(1860602471, 383)
    yield var23
    var24 = (1469848201 | -172 + arg12) - -2008001519
    yield var24
    var25 = arg11 - 1141689328 & arg12 + arg12
    yield var25
    var26 = arg12 - var24 & -255 ^ arg12
    yield var26
    var27 = var24 ^ -1263947249 | var26
    yield var27
    var28 = (var26 ^ 202) ^ (arg11 | var25)
    yield var28
    var29 = var25 ^ var28 ^ var24 | var27
    yield var29
    var30 = (arg12 ^ arg12 & arg11) | var25
    yield var30
    var31 = var30 - arg12 & var29
    yield var31
    var32 = (var24 + (var31 | var31)) & var26
    yield var32
    var33 = var29 ^ var25
    yield var33
def func1(arg1, arg2):
    if arg1 < arg2:
        var3 = arg2 - arg2
    else:
        var3 = arg2 + (arg2 - 1754886327)
    if arg2 < arg1:
        var4 = -2129092368 - arg1
    else:
        var4 = (-1078045949 | -276) & ((-737599512 + 462) + arg2) | arg1 | -204 ^ arg2
    var5 = arg2 + arg1
    result = var5 | arg1 - ((620 - arg1) | arg2) - var5 & 959
    return result
def func6(arg15, arg16):
    def func7(acc, rest):
        var17 = 0 ^ 0 ^ 0
        if acc == 0:
            return var17
        else:
            result = func7(acc - 1, var17)
            return result
    result = func7(10, 0)
    return result
def func10(arg46, arg47):
    def func11(acc, rest):
        var48 = 0 & rest | -4
        if acc == 0:
            return var48
        else:
            result = func11(acc - 1, var48)
            return result
    result = func11(10, 0)
    return result
if __name__ == "__main__":
    print 'prog_size: 0'
    print 'func_number: 2'
    print 'arg_number: 6'
    for i in xrange(25000):
        x = 5
        x = func1(x, i)
        print x,
    print 'prog_size: 3'
    print 'func_number: 8'
    print 'arg_number: 39'
    for i in xrange(25000):
        x = 5
        x = func2(x, i)
        print x,
    print 'prog_size: 5'
    print 'func_number: 12'
    print 'arg_number: 61'
    for i in xrange(25000):
        x = 5
        x = func8(x, i)
        print x,