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 func1(arg1, arg2):
    var5 = class2()
    for var6 in xrange(19):
        var5.func3(arg2, var6)
    var11 = func4(arg2, arg1)
    var20 = var14(arg2, var11)
    var38 = func8(var20, arg2)
    var46 = func9(arg1, var20)
    var47 = -2035038155 + (((var46 - -891) - (((arg1 + arg2) & var20 ^ arg1) - (var20 ^ 550788214 | (616 - 1750801228 ^ arg1) + var46 & (arg2 | var46 | (var20 + var11) & var46 & var46))) ^ var46 ^ var46) + var38)
    result = var47 ^ (var46 ^ var11 ^ -106 | var47) - var11
    return result
def func11(arg41, arg42):
    var43 = 654198249 | 300
    var44 = ((arg42 | (-468 - var43)) + arg42) - arg41 & (((arg42 - var43 & (1712815248 - arg42)) - 55) | var43 ^ var43) & arg41
    result = ((arg42 & ((486 + arg42 ^ -2006385797 - var44) | (var44 & arg42 - -1985751690 - var43 & arg42))) | arg42) + arg41
    return result
def func8(arg21, arg22):
    var23 = (-191 - 997795869) | -93
    if var23 < arg21:
        var24 = var23 - var23
    else:
        var24 = arg22 + var23
    var25 = var23 + (arg22 + -992 ^ 887)
    var26 = arg22 & 1048499976 & var25 - arg21
    var27 = (148 | (217361675 & arg22)) | var26
    var28 = 318 | var25 | arg21 - var25
    var29 = arg21 - (-856 ^ var27) - var25
    var30 = (514 ^ 832) & 901 + var25
    var31 = -179 ^ arg22
    var32 = ((var29 | var25) + var29) - var30
    var33 = arg22 ^ var32 & var25 + 1313225865
    var34 = arg21 ^ (arg22 ^ var30 ^ var23)
    var35 = var27 | -959
    var36 = var34 | -614
    var37 = var26 + (arg21 ^ var32 & var28)
    result = var23 + var31 + var34
    return result
def func7(arg15, arg16):
    var17 = -698262727 ^ (arg16 ^ ((-93303941 & 1892080327) + arg15 - 674 | (((428525846 - (arg16 - arg16)) & (arg15 + arg16)) | (arg16 ^ (761 | arg16))) & -746892911))
    var18 = -85 - 567425935
    var19 = arg15 | -57
    result = arg15 ^ 986537297 - (arg16 ^ 607835783)
    return result
def func6():
    closure = [9]
    def func5(arg12, arg13):
        closure[0] += func7(arg12, arg13)
        return closure[0]
    func = func5
    return func
var14 = func6()
def func4(arg7, arg8):
    var9 = 0
    for var10 in xrange(21):
        var9 += var10 | var10
    return var9
class class2(object):
    def func3(self, arg3, arg4):
        return 0
def func9(arg39, arg40):
    def func10(acc, rest):
        var45 = func11(5, acc)
        if acc == 0:
            return var45
        else:
            result = func10(acc - 1, var45)
            return result
    result = func10(10, 0)
    return result
if __name__ == "__main__":
    print 'prog_size: 5'
    print 'func_number: 12'
    print 'arg_number: 48'
    for i in xrange(25000):
        x = 5
        x = func1(x, i)
        print x,