// File: conp-solutions[P]cnfmiter/AtLeastTwoSolutions.cc
// Function: main
int main(int argc, char **argv)
{
    int opt;
    int tseitin = 0;
    int maxsat = 0;
    std::cerr << "c AtLeastTwoSolutions generates a CNF formula " << std::endl
              << "c which is satisfiable if the given input formula has at least 2 models" << std::endl
              << "c" << std::endl
              << "c OPTIONS" << std::endl
              << "c -t x ... only force differences among the variables 1 to x" << std::endl
              << "c -W   ... encode a MaxSat formula that tries to get two solutions with largest hamming distance" << std::endl
              << "c -w   ... same as -w, but use the pre 2020 MaxSat format" << std::endl
              << std::endl;

    // Retrieve the options:
    while ((opt = getopt(argc, argv, "t:wW")) != -1) { // for each option...
        switch (opt) {
        case 't':
            tseitin = atoi(optarg);
            std::cerr << "c set tseitin variable to " << tseitin << std::endl;
            break;
        case 'w':
            maxsat = 1;
            std::cerr << "c enable maxsat pre-2021 mode" << std::endl;
            break;
        case 'W':
            maxsat = 2;
            std::cerr << "c enable maxsat post-2020 mode" << std::endl;
            break;
        case '?': // unknown option...
            std::cerr << "c unknown option: '" << char(optopt) << "'!" << std::endl;
            exit(1);
            break;
        }
    }

    if (optind + 1 != argc) {
        std::cerr << "not enough parameters, abort!" << std::endl;
        return 1;
    }

    std::string fn1 = (argv[optind + 0]);
    gzFile in1 = gzopen(fn1.c_str(), "rb");

    if (!in1) {
        std::cerr << "failed to open first file, abort!" << std::endl;
        return 1;
    }
    if (tseitin < 0) {
        std::cerr << "tseitin variable negative, abort" << std::endl;
        return 1;
    }

    Formula f1;

    parse_DIMACS(in1, f1);
    gzclose(in1);

    std::cerr << "c Parsed formula with " << f1.nVars() << " vars and " << f1.clauses.size() << std::endl;

    Formula result;
    int input_vars = f1.nVars();
    int var_offset = input_vars;
    int output_vars = 2 * input_vars;
    while (output_vars > result.nVars()) result.newVar();
    std::vector<Lit> rewritten_clause;

    /* add formula 2 times, once with a full variable offset */
    /* duplicate this, to check whether a formuala has more models */
    for (const auto &clause : f1.clauses) {
        result.addClause_(clause);
        rewritten_clause.clear();
        for (int i = 0; i < clause.size(); ++i) {
            Lit l = clause[i];
            Var v = var(l);
            rewritten_clause.push_back(mkLit(v + var_offset, sign(l)));
        }
        result.addClause_(rewritten_clause);
    }

    /* encode variable differences for given number of variables */
    /* this grows quadratic in the number of models that should be checked for */
    Var max_v = tseitin == 0 ? input_vars : tseitin;
    int next_var = output_vars;
    std::vector<Lit> one_unequal_clause;
    std::cerr << "c encode variable equivalences for first " << max_v << " variables" << std::endl;
    for (Var v = 0; v < max_v; ++v) {
        Lit a = mkLit(v);
        Lit A = mkLit(v + var_offset);
        Lit next_lit = mkLit(next_var++);
        while (var(next_lit) >= result.nVars()) result.newVar();
        /* a <-> (a+offset) <-> next_lit */
        generate_equivalence(result, a, A, next_lit);
        one_unequal_clause.push_back(~next_lit);
    }

    /* enforce that at least one assignment has to be different */
    result.addClause_(one_unequal_clause);

    std::stringstream s;
    if (maxsat == 0) {
        s << "encode formula to check whether there are more than 1 solution for " << fn1;
        if (tseitin != 0) s << " with tseitin base variable " << tseitin;
        /* one of the common literal pair should have unequal truth values has to be */
        print_formula(result, s.str());
    } else {
        s << "encode formula to find two solutions with the highest hamming distance for a given formula, at least 1, for " << fn1;
        if (tseitin != 0) s << " with tseitin base variable " << tseitin;
        /* there is a cost setting variables to equal truth values, hence, pay cost for each unit */
        print_maxsat_formula(result, one_unequal_clause, s.str(), maxsat == 1);
    }


    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x410, %rsp            # imm = 0x410
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq 0x8052(%rip), %rdi      # 0xaff0
leaq 0x40c7(%rip), %rsi      # 0x706c
callq 0x2150
movq %rax, %rdi
movq 0x7fe4(%rip), %rsi      # 0xaf98
callq 0x2170
movq %rax, %rdi
leaq 0x40d8(%rip), %rsi      # 0x709b
callq 0x2150
movq %rax, %rdi
movq 0x7fc6(%rip), %rsi      # 0xaf98
callq 0x2170
movq %rax, %rdi
leaq 0x4102(%rip), %rsi      # 0x70e3
callq 0x2150
movq %rax, %rdi
movq 0x7fa8(%rip), %rsi      # 0xaf98
callq 0x2170
movq %rax, %rdi
leaq 0x40e6(%rip), %rsi      # 0x70e5
callq 0x2150
movq %rax, %rdi
movq 0x7f8a(%rip), %rsi      # 0xaf98
callq 0x2170
movq %rax, %rdi
leaq 0x40d2(%rip), %rsi      # 0x70ef
callq 0x2150
movq %rax, %rdi
movq 0x7f6c(%rip), %rsi      # 0xaf98
callq 0x2170
movq %rax, %rdi
leaq 0x40f1(%rip), %rsi      # 0x712c
callq 0x2150
movq %rax, %rdi
movq 0x7f4e(%rip), %rsi      # 0xaf98
callq 0x2170
movq %rax, %rdi
leaq 0x4134(%rip), %rsi      # 0x718d
callq 0x2150
movq %rax, %rdi
movq 0x7f30(%rip), %rsi      # 0xaf98
callq 0x2170
movq %rax, %rdi
movq 0x7f21(%rip), %rsi      # 0xaf98
callq 0x2170
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x413d(%rip), %rdx      # 0x71c7
callq 0x2040
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
je 0x31cb
movl -0x14(%rbp), %eax
movl %eax, -0x334(%rbp)
subl $0x3f, %eax
je 0x3177
jmp 0x30af
movl -0x334(%rbp), %eax
subl $0x57, %eax
je 0x314c
jmp 0x30c0
movl -0x334(%rbp), %eax
subl $0x74, %eax
je 0x30dd
jmp 0x30cd
movl -0x334(%rbp), %eax
subl $0x77, %eax
je 0x3121
jmp 0x31c6
movq 0x7ebc(%rip), %rax      # 0xafa0
movq (%rax), %rdi
callq 0x2200
movl %eax, -0x18(%rbp)
movq 0x7efa(%rip), %rdi      # 0xaff0
leaq 0x40cf(%rip), %rsi      # 0x71cc
callq 0x2150
movq %rax, %rdi
movl -0x18(%rbp), %esi
callq 0x2250
movq %rax, %rdi
movq 0x7e81(%rip), %rsi      # 0xaf98
callq 0x2170
jmp 0x31c6
movl $0x1, -0x1c(%rbp)
movq 0x7ec1(%rip), %rdi      # 0xaff0
leaq 0x40b1(%rip), %rsi      # 0x71e7
callq 0x2150
movq %rax, %rdi
movq 0x7e53(%rip), %rsi      # 0xaf98
callq 0x2170
jmp 0x31c6
movl $0x2, -0x1c(%rbp)
movq 0x7e96(%rip), %rdi      # 0xaff0
leaq 0x40a4(%rip), %rsi      # 0x7205
callq 0x2150
movq %rax, %rdi
movq 0x7e28(%rip), %rsi      # 0xaf98
callq 0x2170
jmp 0x31c6
movq 0x7e72(%rip), %rdi      # 0xaff0
leaq 0x409f(%rip), %rsi      # 0x7224
callq 0x2150
movq %rax, %rdi
movq 0x7e1c(%rip), %rax      # 0xafb0
movl (%rax), %eax
movsbl %al, %esi
callq 0x2190
movq %rax, %rdi
leaq 0x4090(%rip), %rsi      # 0x7238
callq 0x2150
movq %rax, %rdi
movq 0x7de1(%rip), %rsi      # 0xaf98
callq 0x2170
movl $0x1, %edi
callq 0x21a0
jmp 0x307c
movq 0x7dfe(%rip), %rax      # 0xafd0
movl (%rax), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
je 0x320a
movq 0x7e0d(%rip), %rdi      # 0xaff0
leaq 0x4051(%rip), %rsi      # 0x723b
callq 0x2150
movq %rax, %rdi
movq 0x7d9f(%rip), %rsi      # 0xaf98
callq 0x2170
movl $0x1, -0x4(%rbp)
jmp 0x3b5d
movq -0x10(%rbp), %rax
movq 0x7dbb(%rip), %rcx      # 0xafd0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x348(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x340(%rbp)
callq 0x2270
movq -0x348(%rbp), %rsi
movq -0x340(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x21b0
jmp 0x324c
leaq -0x41(%rbp), %rdi
callq 0x2180
leaq -0x40(%rbp), %rdi
callq 0x2090
movq %rax, %rdi
leaq 0x3ff1(%rip), %rsi      # 0x7259
callq 0x21e0
movq %rax, -0x350(%rbp)
jmp 0x3276
movq -0x350(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0x32f7
movq 0x7d61(%rip), %rdi      # 0xaff0
leaq 0x3fc6(%rip), %rsi      # 0x725c
callq 0x2150
movq %rax, -0x358(%rbp)
jmp 0x32a4
movq -0x358(%rbp), %rdi
movq 0x7ce6(%rip), %rsi      # 0xaf98
callq 0x2170
jmp 0x32b9
movl $0x1, -0x4(%rbp)
movl $0x1, -0x64(%rbp)
jmp 0x3b47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x41(%rbp), %rdi
callq 0x2180
jmp 0x3b69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3b52
cmpl $0x0, -0x18(%rbp)
jge 0x3341
movq 0x7cec(%rip), %rdi      # 0xaff0
leaq 0x3f73(%rip), %rsi      # 0x727e
callq 0x2150
movq %rax, -0x360(%rbp)
jmp 0x3319
movq -0x360(%rbp), %rdi
movq 0x7c71(%rip), %rsi      # 0xaf98
callq 0x2170
jmp 0x332e
movl $0x1, -0x4(%rbp)
movl $0x1, -0x64(%rbp)
jmp 0x3b47
leaq -0x88(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0x4580
movq -0x368(%rbp), %rsi
movq -0x60(%rbp), %rdi
callq 0x3b80
jmp 0x3366
movq -0x60(%rbp), %rdi
callq 0x2240
jmp 0x3371
movq 0x7c78(%rip), %rdi      # 0xaff0
leaq 0x3f20(%rip), %rsi      # 0x729f
callq 0x2150
movq %rax, -0x370(%rbp)
jmp 0x338d
leaq -0x88(%rbp), %rdi
callq 0x4250
movl %eax, -0x374(%rbp)
jmp 0x33a1
movl -0x374(%rbp), %esi
movq -0x370(%rbp), %rdi
callq 0x2250
movq %rax, -0x380(%rbp)
jmp 0x33bc
movq -0x380(%rbp), %rdi
leaq 0x3eec(%rip), %rsi      # 0x72b6
callq 0x2150
movq %rax, -0x388(%rbp)
jmp 0x33d8
leaq -0x80(%rbp), %rdi
callq 0x4260
movq -0x388(%rbp), %rdi
movq %rax, %rsi
callq 0x2050
movq %rax, -0x390(%rbp)
jmp 0x33f9
movq -0x390(%rbp), %rdi
movq 0x7b91(%rip), %rsi      # 0xaf98
callq 0x2170
jmp 0x340e
leaq -0xa8(%rbp), %rdi
callq 0x4580
leaq -0x88(%rbp), %rdi
callq 0x4250
movl %eax, -0x394(%rbp)
jmp 0x342e
movl -0x394(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
movl %eax, -0xb0(%rbp)
movl -0xac(%rbp), %eax
shll %eax
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
movl %eax, -0x39c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x4250
movl %eax, -0x398(%rbp)
jmp 0x3474
movl -0x39c(%rbp), %eax
movl -0x398(%rbp), %ecx
cmpl %ecx, %eax
jle 0x34b6
leaq -0xa8(%rbp), %rdi
callq 0x45b0
jmp 0x3492
jmp 0x3454
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3b39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3b2d
leaq -0xd0(%rbp), %rdi
callq 0x45f0
leaq -0x88(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x4290
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x42c0
movq %rax, -0xe8(%rbp)
leaq -0xe0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x42f0
testb $0x1, %al
jne 0x3516
jmp 0x3689
leaq -0xe0(%rbp), %rdi
callq 0x4330
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x4200
jmp 0x353e
leaq -0xd0(%rbp), %rdi
callq 0x4610
movl $0x0, -0xf4(%rbp)
movslq -0xf4(%rbp), %rax
movq %rax, -0x3a8(%rbp)
movq -0xf0(%rbp), %rdi
callq 0x43f0
movq %rax, %rcx
movq -0x3a8(%rbp), %rax
cmpq %rcx, %rax
jae 0x3661
movq -0xf0(%rbp), %rdi
movslq -0xf4(%rbp), %rsi
callq 0x4630
movl (%rax), %eax
movl %eax, -0xf8(%rbp)
movl -0xf8(%rbp), %eax
movl %eax, -0x100(%rbp)
movl -0x100(%rbp), %edi
callq 0x4650
movl %eax, -0x3ac(%rbp)
jmp 0x35bb
movl -0x3ac(%rbp), %eax
movl %eax, -0xfc(%rbp)
movl -0xfc(%rbp), %eax
movl -0xb0(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x3b4(%rbp)
movl -0xf8(%rbp), %eax
movl %eax, -0x108(%rbp)
movl -0x108(%rbp), %edi
callq 0x46c0
movb %al, -0x3ad(%rbp)
jmp 0x35fa
movl -0x3b4(%rbp), %edi
movb -0x3ad(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
callq 0x4690
movl %eax, -0x3b8(%rbp)
jmp 0x3619
movl -0x3b8(%rbp), %eax
movl %eax, -0x104(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0x104(%rbp), %rsi
callq 0x4660
jmp 0x363a
jmp 0x363c
movl -0xf4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf4(%rbp)
jmp 0x3554
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3b21
leaq -0xa8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x4200
jmp 0x3676
jmp 0x3678
leaq -0xe0(%rbp), %rdi
callq 0x43d0
jmp 0x34fa
cmpl $0x0, -0x18(%rbp)
jne 0x369d
movl -0xac(%rbp), %eax
movl %eax, -0x3bc(%rbp)
jmp 0x36a6
movl -0x18(%rbp), %eax
movl %eax, -0x3bc(%rbp)
movl -0x3bc(%rbp), %eax
movl %eax, -0x10c(%rbp)
movl -0xb4(%rbp), %eax
movl %eax, -0x110(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x45f0
movq 0x791f(%rip), %rdi      # 0xaff0
leaq 0x3be9(%rip), %rsi      # 0x72c1
callq 0x2150
movq %rax, -0x3c8(%rbp)
jmp 0x36e6
movq -0x3c8(%rbp), %rdi
movl -0x10c(%rbp), %esi
callq 0x2250
movq %rax, -0x3d0(%rbp)
jmp 0x3701
movq -0x3d0(%rbp), %rdi
leaq 0x3bdc(%rip), %rsi      # 0x72eb
callq 0x2150
movq %rax, -0x3d8(%rbp)
jmp 0x371d
movq -0x3d8(%rbp), %rdi
movq 0x786d(%rip), %rsi      # 0xaf98
callq 0x2170
jmp 0x3732
movl $0x0, -0x12c(%rbp)
movl -0x12c(%rbp), %eax
cmpl -0x10c(%rbp), %eax
jge 0x38c1
movl -0x12c(%rbp), %edi
xorl %esi, %esi
callq 0x4690
movl %eax, -0x3dc(%rbp)
jmp 0x3763
movl -0x3dc(%rbp), %eax
movl %eax, -0x130(%rbp)
movl -0x12c(%rbp), %edi
movl -0xb0(%rbp), %eax
addl %eax, %edi
xorl %esi, %esi
callq 0x4690
movl %eax, -0x3e0(%rbp)
jmp 0x378c
movl -0x3e0(%rbp), %eax
movl %eax, -0x134(%rbp)
movl -0x110(%rbp), %edi
movl %edi, %eax
incl %eax
movl %eax, -0x110(%rbp)
xorl %esi, %esi
callq 0x4690
movl %eax, -0x3e4(%rbp)
jmp 0x37b7
movl -0x3e4(%rbp), %eax
movl %eax, -0x138(%rbp)
movl -0x138(%rbp), %eax
movl %eax, -0x13c(%rbp)
movl -0x13c(%rbp), %edi
callq 0x4650
movl %eax, -0x3e8(%rbp)
jmp 0x37e2
leaq -0xa8(%rbp), %rdi
callq 0x4250
movl %eax, -0x3ec(%rbp)
jmp 0x37f6
movl -0x3e8(%rbp), %eax
movl -0x3ec(%rbp), %ecx
cmpl %ecx, %eax
jl 0x3827
leaq -0xa8(%rbp), %rdi
callq 0x45b0
jmp 0x3814
jmp 0x37c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3b15
movl -0x130(%rbp), %eax
movl %eax, -0x140(%rbp)
movl -0x134(%rbp), %eax
movl %eax, -0x144(%rbp)
movl -0x138(%rbp), %eax
movl %eax, -0x148(%rbp)
movl -0x140(%rbp), %esi
movl -0x144(%rbp), %edx
movl -0x148(%rbp), %ecx
leaq -0xa8(%rbp), %rdi
callq 0x23f0
jmp 0x386b
movl -0x138(%rbp), %eax
movl %eax, -0x150(%rbp)
movl -0x150(%rbp), %edi
callq 0x4230
movl %eax, -0x3f0(%rbp)
jmp 0x388a
movl -0x3f0(%rbp), %eax
movl %eax, -0x14c(%rbp)
leaq -0x128(%rbp), %rdi
leaq -0x14c(%rbp), %rsi
callq 0x4660
jmp 0x38ab
jmp 0x38ad
movl -0x12c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x12c(%rbp)
jmp 0x373c
leaq -0xa8(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x4200
jmp 0x38d6
leaq -0x2d8(%rbp), %rdi
callq 0x20e0
jmp 0x38e4
cmpl $0x0, -0x1c(%rbp)
jne 0x39ba
leaq -0x2c8(%rbp), %rdi
leaq 0x39fa(%rip), %rsi      # 0x72f6
callq 0x2150
movq %rax, -0x3f8(%rbp)
jmp 0x390a
movq -0x3f8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2120
jmp 0x391c
cmpl $0x0, -0x18(%rbp)
je 0x3962
leaq -0x2c8(%rbp), %rdi
leaq 0x3a0a(%rip), %rsi      # 0x733a
callq 0x2150
movq %rax, -0x400(%rbp)
jmp 0x393e
movq -0x400(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x2250
jmp 0x394f
jmp 0x3962
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3b09
leaq -0x2f8(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x2140
jmp 0x3977
leaq -0xa8(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0x2650
jmp 0x398c
leaq -0x2f8(%rbp), %rdi
callq 0x20b0
jmp 0x3abd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x20b0
jmp 0x3b09
leaq -0x2c8(%rbp), %rdi
leaq 0x398f(%rip), %rsi      # 0x7357
callq 0x2150
movq %rax, -0x408(%rbp)
jmp 0x39d6
movq -0x408(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2120
jmp 0x39e8
cmpl $0x0, -0x18(%rbp)
je 0x3a1d
leaq -0x2c8(%rbp), %rdi
leaq 0x393e(%rip), %rsi      # 0x733a
callq 0x2150
movq %rax, -0x410(%rbp)
jmp 0x3a0a
movq -0x410(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x2250
jmp 0x3a1b
jmp 0x3a1d
leaq -0x310(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x46e0
jmp 0x3a32
leaq -0x330(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x2140
jmp 0x3a47
movl -0x1c(%rbp), %eax
subl $0x1, %eax
sete %al
movzbl %al, %ecx
leaq -0xa8(%rbp), %rdi
leaq -0x310(%rbp), %rsi
leaq -0x330(%rbp), %rdx
callq 0x2880
jmp 0x3a6f
leaq -0x330(%rbp), %rdi
callq 0x20b0
leaq -0x310(%rbp), %rdi
callq 0x4180
jmp 0x3abd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3aaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x330(%rbp), %rdi
callq 0x20b0
leaq -0x310(%rbp), %rdi
callq 0x4180
jmp 0x3b09
movl $0x0, -0x4(%rbp)
movl $0x1, -0x64(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x20f0
leaq -0x128(%rbp), %rdi
callq 0x4180
leaq -0xd0(%rbp), %rdi
callq 0x4180
leaq -0xa8(%rbp), %rdi
callq 0x47d0
leaq -0x88(%rbp), %rdi
callq 0x47d0
jmp 0x3b47
leaq -0x2d8(%rbp), %rdi
callq 0x20f0
leaq -0x128(%rbp), %rdi
callq 0x4180
leaq -0xd0(%rbp), %rdi
callq 0x4180
leaq -0xa8(%rbp), %rdi
callq 0x47d0
leaq -0x88(%rbp), %rdi
callq 0x47d0
jmp 0x3b52
leaq -0x40(%rbp), %rdi
callq 0x20b0
jmp 0x3b5d
leaq -0x40(%rbp), %rdi
callq 0x20b0
jmp 0x3b69
movl -0x4(%rbp), %eax
addq $0x410, %rsp            # imm = 0x410
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x2260
nopw %cs:(%rax,%rax)