// File: /workspace/github_cpp_makefile_star2_O1/quiath[P]fast-atoi/main.cpp
// Function: main
int main(int argc, char* argv[])
{
    unsigned MAX_WORD_LEN = 8;
    unsigned long N = 10000000UL;
    unsigned WORD_COUNT = 10000;
    bool digits_only = false;
    bool use_atol = false;
    std::string out_filename = "";

    std::vector<std::string> args(argv, argv + argc);
    int i = 1;
    while (i < args.size())
    {
        if (args[i] == "-t" || args[i] == "--unittest")
        {
            unit_test();
            return 0;
        }
        if (args[i] == "-d" || args[i] == "--digitsonly")
        {
            digits_only = true;
        }
        if (args[i] == "-a" || args[i] == "--atol")
        {
            use_atol = true;
        }

        if ((args[i] == "-l" || args[i] == "--length") && 
            i < args.size()) 
        {
            if ((MAX_WORD_LEN = atoi(args[i + 1].c_str())) > 20 || MAX_WORD_LEN == 0) 
            {
                std::cerr << "Invalid length" << std::endl;
                return 1;
            }
            i++;
        }       
        if ((args[i] == "-w" || args[i] == "--words") && 
            i < args.size())
        {
            if ((WORD_COUNT = atol(args[i + 1].c_str())) > 1000000 || WORD_COUNT == 0) 
            {
                std::cerr << "Invalid word count" << std::endl;
                return 1;
            }
            i++;
        }
        if ((args[i] == "-n" || args[i] == "--numloops") && 
            i < args.size())
        {
            if ((N = atol(args[i + 1].c_str())) > 1000000000000UL || N == 0) 
            {
                std::cerr << "Invalid number of loops" << std::endl;
                return 1;
            }
            i++;
        }
        if ((args[i] == "-o" || args[i] == "--output") && 
            i < args.size())
        {
            out_filename = args[i + 1];
            i++;
        }

        i++;
    }

    for (size_t L = 1; L <= MAX_WORD_LEN; ++L)
    {

        Name2Time best;
        std::vector<std::string> v;
        generate_add(v, WORD_COUNT, L, digits_only);


        std::cout << "Digits per number: " << L << " The string contains"
                  << (digits_only ? " digits only" : " whitespace and sign" ) << std::endl; 
        std::cout << "Int size in bytes:" << sizeof(myint) << std::endl;
        std::cout << "Loops:" << N << std::endl;
        std::cout << "Words:" << WORD_COUNT << std::endl;
        std::cout << "Ramp up:" << std::endl;
        test(N, atoi, v, best, "");

        for (int i = 0; i < 3; ++i) 
        {
            test(N, zero, v, best,            "zero..........");
            if (use_atol)
            {
                test(N, atol, v, best,            "atol..........");
            }
            else
            {
                test(N, atoi, v, best,            "atoi..........");
            }
            test(N, atoisimple, v, best,      "atoisimple....");
            test(N, fastatoi, v, best,        "fastatoi......");
            test(N, fastatoiadd, v, best,     "fastatoiadd...");
            test(N, fastatoiaddunr, v, best,  "fastatoiaddunr");
        }

        for (auto& kv : best)
        {
            std::cout << "Best: " << kv.first << " : " << std::setw(11) << kv.second << std::endl;
        }

        if (out_filename.length() > 0) 
        {
            std::ofstream f(out_filename.c_str(), std::ios::app | std::ios::out);
            if (!f.fail())
            {
                if (L == 1)
                {
                    // header
                    f << "\"Length\",\"Digits only\"" ;
                    for (auto& kv : best)
                    {
                         f << ",\"" << kv.first << "\""; 
                    }
                    f << std::endl;
                }
                f << L << "," << (digits_only ? 1 : 0);

                for (auto& kv : best)
                {
                    f << "," << kv.second;
                }
                f << std::endl;
            }
        }
        else
        {
          std::cout << "No output file param" << std::endl;
        }
    
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rsi, %r14
movl %edi, %ebx
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20f6(%rip), %rdx      # 0x5046
leaq 0x70(%rsp), %rdi
movq %rdx, %rsi
callq 0x44da
movslq %ebx, %rax
leaq (%r14,%rax,8), %rdx
leaq 0x8(%rsp), %rdi
leaq 0xd8(%rsp), %rbx
movq %r14, %rsi
movq %rbx, %rcx
callq 0x3d8c
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
subq %rdi, %rax
xorl %ebp, %ebp
cmpq $0x21, %rax
jb 0x324a
movl $0x1, %r13d
movl $0x2710, %eax           # imm = 0x2710
movq %rax, 0x30(%rsp)
movl $0x989680, %r14d        # imm = 0x989680
movl $0x8, %r15d
movl $0x1, %ebp
movl $0x0, 0x20(%rsp)
movl $0x0, 0x2c(%rsp)
movq %rbp, %r12
shlq $0x5, %r12
addq %r12, %rdi
leaq 0x210f(%rip), %rsi      # 0x50e6
callq 0x2090
testl %eax, %eax
je 0x3a46
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x20f6(%rip), %rsi      # 0x50e9
callq 0x2090
testl %eax, %eax
je 0x3a46
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x20e5(%rip), %rsi      # 0x50f4
callq 0x2090
testl %eax, %eax
je 0x3030
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x20d0(%rip), %rsi      # 0x50f7
callq 0x2090
testl %eax, %eax
jne 0x3036
movb $0x1, %al
movl %eax, 0x20(%rsp)
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x20bf(%rip), %rsi      # 0x5104
callq 0x2090
testl %eax, %eax
je 0x3066
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x20aa(%rip), %rsi      # 0x5107
callq 0x2090
testl %eax, %eax
jne 0x306c
movb $0x1, %al
movl %eax, 0x2c(%rsp)
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x2093(%rip), %rsi      # 0x510e
callq 0x2090
testl %eax, %eax
je 0x309c
addq 0x8(%rsp), %r12
movq %r12, %rdi
leaq 0x207e(%rip), %rsi      # 0x5111
callq 0x2090
testl %eax, %eax
jne 0x30d6
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rbp, %rcx
jbe 0x30d6
movslq %r13d, %rcx
shlq $0x5, %rcx
movq 0x20(%rcx,%rax), %rdi
callq 0x2320
movl %eax, %r15d
leal -0x15(%r15), %eax
cmpl $-0x14, %eax
jb 0x3a82
incl %r13d
movslq %r13d, %rbp
movq %rbp, %r12
shlq $0x5, %r12
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x203a(%rip), %rsi      # 0x5129
callq 0x2090
testl %eax, %eax
je 0x3110
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x2025(%rip), %rsi      # 0x512c
callq 0x2090
testl %eax, %eax
jne 0x3147
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rbp, %rcx
jbe 0x3147
movq 0x20(%r12,%rax), %rdi
callq 0x2318
movq %rax, 0x30(%rsp)
movl $0xfff0bdbf, %ecx       # imm = 0xFFF0BDBF
addl %ecx, %eax
cmpl %ecx, %eax
jbe 0x3a90
incl %r13d
movslq %r13d, %rbp
movq %rbp, %r12
shlq $0x5, %r12
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x1fe7(%rip), %rsi      # 0x5147
callq 0x2090
testl %eax, %eax
je 0x3181
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x1fd2(%rip), %rsi      # 0x514a
callq 0x2090
testl %eax, %eax
jne 0x31c0
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rbp, %rcx
jbe 0x31c0
movq 0x20(%r12,%rax), %rdi
callq 0x2318
movq %rax, %r14
movabsq $-0xe8d4a51001, %rcx    # imm = 0xFFFFFF172B5AEFFF
addq %rcx, %rax
incq %rcx
cmpq %rcx, %rax
jb 0x3a9e
incl %r13d
movslq %r13d, %rbp
movq %rbp, %r12
shlq $0x5, %r12
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x1f94(%rip), %rsi      # 0x516d
callq 0x2090
testl %eax, %eax
je 0x31fa
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x1f7f(%rip), %rsi      # 0x5170
callq 0x2090
testl %eax, %eax
jne 0x3222
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rbp, %rcx
jbe 0x3222
leaq 0x20(%r12,%rax), %rsi
leaq 0x70(%rsp), %rdi
callq 0x2120
incl %r13d
incl %r13d
movslq %r13d, %rbp
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %rbp, %rax
ja 0x2fc6
xorl %ebp, %ebp
movl 0x20(%rsp), %esi
jmp 0x326a
movl $0x8, %r15d
movl $0x989680, %r14d        # imm = 0x989680
movl $0x2710, %eax           # imm = 0x2710
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
xorl %esi, %esi
testl %r15d, %r15d
je 0x3a4d
movl %r15d, %eax
movq %rax, 0xa0(%rsp)
leaq 0x1f1d(%rip), %rax      # 0x51a2
leaq 0x1f23(%rip), %rdx      # 0x51af
movl %esi, %ecx
andb $0x1, %cl
cmovneq %rax, %rdx
movq %rdx, 0xb8(%rsp)
movl %esi, %eax
notb %al
movzbl %al, %eax
andl $0x1, %eax
leaq 0xc(,%rax,8), %rax
movq %rax, 0xb0(%rsp)
movl 0x30(%rsp), %eax
movq %rax, 0xa8(%rsp)
leaq 0xe8(%rsp), %r15
movzbl %cl, %eax
movl %eax, 0x68(%rsp)
movq 0x4cdf(%rip), %rax      # 0x7fb8
movq (%rax), %rcx
movq %rcx, 0x98(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x90(%rsp)
movl $0x1, %edx
movzbl %sil, %eax
andl $0x1, %eax
movl %eax, 0x6c(%rsp)
leaq 0xc0(%rsp), %rdi
movl $0x0, 0x40(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x48(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movq %rcx, 0x60(%rsp)
movq %rcx, 0xd0(%rsp)
vxorps %xmm0, %xmm0, %xmm0
vmovaps %xmm0, 0xc0(%rsp)
movq %rdi, %r13
movq 0x30(%rsp), %rsi
movq %rdx, 0x20(%rsp)
movl 0x6c(%rsp), %ecx
callq 0x2be8
movl $0x13, %edx
movq 0x4c66(%rip), %rdi      # 0x7fc8
leaq 0x1e10(%rip), %rsi      # 0x5179
callq 0x2250
movq 0x4c53(%rip), %rdi      # 0x7fc8
movq 0x20(%rsp), %rsi
callq 0x2160
movq %rax, %rbp
movl $0x14, %edx
movq %rax, %rdi
leaq 0x1dfc(%rip), %rsi      # 0x518d
callq 0x2250
movq %rbp, %rdi
movq 0xb8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
callq 0x2250
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movl $0x12, %edx
movq 0x4be6(%rip), %rdi      # 0x7fc8
leaq 0x1ddb(%rip), %rsi      # 0x51c4
callq 0x2250
movl $0x8, %esi
movq 0x4bce(%rip), %rdi      # 0x7fc8
callq 0x2160
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movl $0x6, %edx
movq 0x4b93(%rip), %rdi      # 0x7fc8
leaq 0x1d9b(%rip), %rsi      # 0x51d7
callq 0x2250
movq 0x4b80(%rip), %rdi      # 0x7fc8
movq %r14, %rsi
callq 0x2160
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movl $0x6, %edx
movq 0x4b42(%rip), %rdi      # 0x7fc8
leaq 0x1d51(%rip), %rsi      # 0x51de
callq 0x2250
movq 0x4b2f(%rip), %rdi      # 0x7fc8
movq 0xa8(%rsp), %rsi
callq 0x2160
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movl $0x8, %edx
movq 0x4aec(%rip), %rdi      # 0x7fc8
leaq 0x1d02(%rip), %rsi      # 0x51e5
callq 0x2250
movq 0x4ad9(%rip), %rcx      # 0x7fc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq 0x4abb(%rip), %rdi      # 0x7fc8
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq %r15, 0xd8(%rsp)
movq %rbx, %rdi
leaq 0x1b1a(%rip), %rdx      # 0x5046
movq %rdx, %rsi
callq 0x44da
movq %r14, %rdi
movq 0x4a92(%rip), %rsi      # 0x7fd0
movq %r13, %rdx
leaq 0x38(%rsp), %rcx
movq %rbx, %r8
callq 0x3dc8
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3560
callq 0x21f0
movl $0x3, %ebp
movq %r15, 0xd8(%rsp)
movq %rbx, %rdi
leaq 0x1c77(%rip), %rsi      # 0x51ee
leaq 0x1c7e(%rip), %rdx      # 0x51fc
callq 0x44da
movq %r14, %rdi
leaq -0xf29(%rip), %rsi      # 0x2664
movq %r13, %rdx
leaq 0x38(%rsp), %rcx
movq %rbx, %r8
callq 0x4076
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x35af
callq 0x21f0
testb $0x1, 0x2c(%rsp)
je 0x35f0
movq %r15, 0xd8(%rsp)
movq %rbx, %rdi
leaq 0x1c35(%rip), %rsi      # 0x51fd
leaq 0x1c3c(%rip), %rdx      # 0x520b
callq 0x44da
movq %r14, %rdi
movq 0x49e2(%rip), %rsi      # 0x7fc0
movq %r13, %rdx
leaq 0x38(%rsp), %rcx
movq %rbx, %r8
callq 0x4076
jmp 0x3628
movq %r15, 0xd8(%rsp)
movq %rbx, %rdi
leaq 0x1c0a(%rip), %rsi      # 0x520c
leaq 0x1c11(%rip), %rdx      # 0x521a
callq 0x44da
movq %r14, %rdi
movq 0x49b8(%rip), %rsi      # 0x7fd0
movq %r13, %rdx
leaq 0x38(%rsp), %rcx
movq %rbx, %r8
callq 0x3dc8
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x363a
callq 0x21f0
movq %r15, 0xd8(%rsp)
movq %rbx, %rdi
leaq 0x1bcf(%rip), %rsi      # 0x521b
leaq 0x1bd6(%rip), %rdx      # 0x5229
callq 0x44da
movq %r14, %rdi
leaq -0x11f6(%rip), %rsi     # 0x246c
movq %r13, %rdx
leaq 0x38(%rsp), %rcx
movq %rbx, %r8
callq 0x4076
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3684
callq 0x21f0
movq %r15, 0xd8(%rsp)
movq %rbx, %rdi
leaq 0x1b94(%rip), %rsi      # 0x522a
leaq 0x1b9b(%rip), %rdx      # 0x5238
callq 0x44da
movq %r14, %rdi
leaq -0x11dc(%rip), %rsi     # 0x24d0
movq %r13, %rdx
leaq 0x38(%rsp), %rcx
movq %rbx, %r8
callq 0x4076
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x36ce
callq 0x21f0
movq %r15, 0xd8(%rsp)
movq %rbx, %rdi
leaq 0x1b59(%rip), %rsi      # 0x5239
leaq 0x1b60(%rip), %rdx      # 0x5247
callq 0x44da
movq %r14, %rdi
leaq -0x11aa(%rip), %rsi     # 0x254c
movq %r13, %rdx
leaq 0x38(%rsp), %rcx
movq %rbx, %r8
callq 0x4076
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3718
callq 0x21f0
movq %r15, 0xd8(%rsp)
movq %rbx, %rdi
leaq 0x1b1e(%rip), %rsi      # 0x5248
leaq 0x1b25(%rip), %rdx      # 0x5256
callq 0x44da
movq %r14, %rdi
leaq -0x1175(%rip), %rsi     # 0x25cb
movq %r13, %rdx
leaq 0x38(%rsp), %rcx
movq %rbx, %r8
callq 0x4076
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3762
callq 0x21f0
decl %ebp
jne 0x3565
movq 0x50(%rsp), %rbp
leaq 0x40(%rsp), %rax
cmpq %rax, %rbp
je 0x3817
movl $0x6, %edx
movq 0x483f(%rip), %rdi      # 0x7fc8
leaq 0x1ac7(%rip), %rsi      # 0x5257
callq 0x2250
movq 0x20(%rbp), %rsi
movq 0x28(%rbp), %rdx
movq 0x4824(%rip), %rdi      # 0x7fc8
callq 0x2250
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0x1aa3(%rip), %rsi      # 0x525e
callq 0x2250
movq (%r12), %rax
movq -0x18(%rax), %rax
movq $0xb, 0x10(%r12,%rax)
movq 0x40(%rbp), %rsi
movq %r12, %rdi
callq 0x2150
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq %rbp, %rdi
callq 0x2180
movq %rax, %rbp
jmp 0x376f
cmpq $0x0, 0x78(%rsp)
je 0x38c7
movq 0x70(%rsp), %rsi
movq %rbx, %rdi
movl $0x11, %edx
callq 0x2240
movq 0xd8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xf8(%rsp,%rax)
jne 0x39da
cmpq $0x1, 0x20(%rsp)
jne 0x3942
movl $0x16, %edx
movq %rbx, %rdi
leaq 0x19f8(%rip), %rsi      # 0x5262
callq 0x2250
movq 0x50(%rsp), %rbp
leaq 0x40(%rsp), %rax
cmpq %rax, %rbp
je 0x3916
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x19e8(%rip), %rsi      # 0x5279
callq 0x2250
movq 0x20(%rbp), %rsi
movq 0x28(%rbp), %rdx
movq %rbx, %rdi
callq 0x2250
movl $0x1, %edx
movq %rax, %rdi
leaq 0x19c5(%rip), %rsi      # 0x527a
callq 0x2250
movq %rbp, %rdi
callq 0x2180
movq %rax, %rbp
jmp 0x3874
movl $0x14, %edx
movq 0x46f5(%rip), %rdi      # 0x7fc8
leaq 0x19a4(%rip), %rsi      # 0x527e
callq 0x2250
movq 0x46e2(%rip), %rcx      # 0x7fc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq 0x46c4(%rip), %rdi      # 0x7fc8
callq 0x2030
movq %rax, %rdi
callq 0x2170
jmp 0x3a18
movq 0xd8(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
callq 0x2160
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x191b(%rip), %rsi      # 0x527c
callq 0x2250
movq %r12, %rdi
movl 0x68(%rsp), %esi
callq 0x22c0
movq 0x50(%rsp), %rbp
leaq 0x40(%rsp), %rax
cmpq %rax, %rbp
je 0x39ae
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x18ec(%rip), %rsi      # 0x527c
callq 0x2250
movq 0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2150
movq %rbp, %rdi
callq 0x2180
movq %rax, %rbp
jmp 0x3977
movq 0xd8(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq 0x98(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq -0x18(%rax), %rax
movq 0x90(%rsp), %rcx
movq %rcx, 0xd8(%rsp,%rax)
leaq 0xe0(%rsp), %rdi
callq 0x21c0
leaq 0x1d0(%rsp), %rdi
callq 0x20b0
movq %r13, %rdi
callq 0x3c10
leaq 0x38(%rsp), %rdi
callq 0x432e
movq %r13, %rdi
movq 0x20(%rsp), %rcx
leaq 0x1(%rcx), %rdx
cmpq 0xa0(%rsp), %rcx
jne 0x3308
jmp 0x3a4b
callq 0x2677
xorl %ebp, %ebp
leaq 0x8(%rsp), %rdi
callq 0x3c10
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x3a6e
callq 0x21f0
movl %ebp, %eax
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xe, %edx
leaq 0x168c(%rip), %rsi      # 0x511a
jmp 0x3aaa
movl $0x12, %edx
leaq 0x1698(%rip), %rsi      # 0x5134
jmp 0x3aaa
movl $0x17, %edx
leaq 0x16ab(%rip), %rsi      # 0x5155
movq 0x453f(%rip), %rbx      # 0x7ff0
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq 0x4519(%rip), %rdi      # 0x7ff0
callq 0x2030
movl $0x1, %ebp
movq %rax, %rdi
callq 0x2170
jmp 0x3a4d
jmp 0x3af5
movq %rax, %rbx
jmp 0x3b6d
movq %rax, %rbx
jmp 0x3b63
jmp 0x3b49
jmp 0x3b49
jmp 0x3b30
jmp 0x3b04
jmp 0x3b04
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x2270
jmp 0x3b4c
jmp 0x3b49
jmp 0x3b49
jmp 0x3b30
jmp 0x3b30
jmp 0x3b49
jmp 0x3b49
jmp 0x3b49
jmp 0x3b30
jmp 0x3b49
jmp 0x3b30
jmp 0x3b49
jmp 0x3b30
jmp 0x3b30
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3b4c
callq 0x21f0
jmp 0x3b4c
jmp 0x3b49
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x3c10
leaq 0x38(%rsp), %rdi
callq 0x432e
leaq 0x8(%rsp), %rdi
callq 0x3c10
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x3b84
callq 0x21f0
movq %rbx, %rdi
callq 0x22d0