// File: /workspace/github_cpp_makefile_star2_O2/f18m[P]boost-intrusive-pool/tests/performance_tests.cpp
// Function: do_benchmark(json_ctx*)
static void do_benchmark(json_ctx_t* json_ctx)
{
    typedef struct {
        unsigned int initial_size;
        unsigned int enlarge_step;
        unsigned int num_items;
    } config_t;

    typedef struct {
        BenchPattern_t pattern;
        size_t num_configs;
        config_t config[10]; // max num configs
    } pattern_test_t;

    pattern_test_t testPatterns[] = {
        {
            BENCH_PATTERN_CONTINUOUS_ALLOCATION, // force newline
            4, // force newline

            {
                // run #1 dummy test: a lot of objects and memory pool continuously resizing itself: no gain obtained:
                { 1, 1, (int)1e5 },

                // run #2 slightly better situation: the memory pool has to do 64x less resizings:
                { 128, 64, (int)1e5 }, // force newline

                // run #3 much better real-life example: the memory pool starts small but does only a few resizings
                //        because every time it increases by 1024 items:
                { 1024, 1024, (int)1e5 }, // force newline

                // run #4 optimal example: the memory pool starts bigger and does just 7 resizing steps
                { 16384, 16384, (int)1e5 }, // force newline
            } // force newline
        },

        // another more realistic (???) malloc pattern

        {
            BENCH_PATTERN_MIXED_ALLOC_FREE, // force newline
            3, // force newline

            {
                // run #5 in this test the memory pool begins small and does several resizings
                { 1024, 64, (int)1e5 }, // force newline

                // run #6 in this test the memory pool begins small but does less resizings
                { 1024, 128, (int)1e5 }, // force newline

                // run #7 in this test the memory pool begins with already a lot of items, so it does close-to-zero
                //        resizings:
                { 512 * 1024, 1024, (int)1e6 }, // force newline
            } // force newline
        }
    };

    for (int j = 0; j < sizeof(testPatterns) / sizeof(testPatterns[0]); j++) {
        if (json_ctx) {
            json_attr_object_begin(json_ctx, (std::string("pattern_") + std::to_string(j + 1)).c_str());
            json_attr_string(json_ctx, "desc", BenchPattern2String(testPatterns[j].pattern).c_str());
        }

        for (int i = 0; i < testPatterns[j].num_configs; i++) {
            const config_t& runConfig = testPatterns[j].config[i];

            size_t num_freed[2], max_active[2], ctor_count[2], dtor_count[2], num_resizings;
            struct rusage usage[2];
            timing_t avg_time[2];

            // run the benchmark with boost_intrusive_pool
            {
                LargeObject::reset_counts();

                boost_intrusive_pool<LargeObject> real_pool(
                    runConfig.initial_size /* initial size */, runConfig.enlarge_step /* enlarge step */);

                timing_t start, stop, elapsed, accumulated = 0;
                for (int k = 0; k < NUM_AVERAGING_RUNS; k++) {
                    TIMING_NOW(start);
                    main_benchmark_loop(
                        real_pool, testPatterns[j].pattern, runConfig.num_items, num_freed[0], max_active[0]);
                    TIMING_NOW(stop);
                    TIMING_DIFF(elapsed, start, stop);
                    TIMING_ACCUM(accumulated, elapsed);
                }

                avg_time[0] = accumulated / NUM_AVERAGING_RUNS;
                ctor_count[0] = LargeObject::m_ctor_count;
                dtor_count[0] = LargeObject::m_dtor_count;
                num_resizings = real_pool.enlarge_steps_done();

                getrusage(RUSAGE_SELF, &usage[0]);
            }

            // run the benchmark with NoPool
            {
                LargeObject::reset_counts();

                NoPool comparison_pool;

                timing_t start, stop, elapsed, accumulated = 0;
                for (int k = 0; k < NUM_AVERAGING_RUNS; k++) {
                    TIMING_NOW(start);
                    main_benchmark_loop(
                        comparison_pool, testPatterns[j].pattern, runConfig.num_items, num_freed[1], max_active[1]);
                    TIMING_NOW(stop);
                    TIMING_DIFF(elapsed, start, stop);
                    TIMING_ACCUM(accumulated, elapsed);
                }

                avg_time[1] = accumulated / NUM_AVERAGING_RUNS;
                ctor_count[1] = LargeObject::m_ctor_count;
                dtor_count[1] = LargeObject::m_dtor_count;

                getrusage(RUSAGE_SELF, &usage[1]);
            }

            // output results as JSON:
            if (json_ctx) {
                json_attr_object_begin(json_ctx, ("run_" + std::to_string(i + 1)).c_str());

                // test setup
                json_attr_double(json_ctx, "initial_size", runConfig.initial_size);
                json_attr_double(json_ctx, "enlarge_step", runConfig.enlarge_step);
                json_attr_double(json_ctx, "num_items", runConfig.num_items);

                // test results
                json_attr_object_begin(json_ctx, "boost_intrusive_pool");
                json_attr_double(json_ctx, "duration_nsec", avg_time[0]);
                json_attr_double(json_ctx, "duration_nsec_per_item", (double)avg_time[0] / (double)runConfig.num_items);
                json_attr_double(json_ctx, "num_items_freed", num_freed[0]);
                json_attr_double(json_ctx, "max_active_items", max_active[0]);
                json_attr_double(json_ctx, "max_rss", usage[0].ru_maxrss);
                json_attr_double(json_ctx, "ctor_count", ctor_count[0]);
                json_attr_double(json_ctx, "dtor_count", dtor_count[0]);
                json_attr_double(json_ctx, "num_resizings", num_resizings);
                json_attr_object_end(json_ctx); // boost_intrusive_pool_item

                // test results
                json_attr_object_begin(json_ctx, "plain_malloc");
                json_attr_double(json_ctx, "duration_nsec", avg_time[1]);
                json_attr_double(json_ctx, "duration_nsec_per_item", (double)avg_time[1] / (double)runConfig.num_items);
                json_attr_double(json_ctx, "num_items_freed", num_freed[1]);
                json_attr_double(json_ctx, "max_active_items", max_active[1]);
                json_attr_double(json_ctx, "max_rss", usage[1].ru_maxrss);
                json_attr_double(json_ctx, "ctor_count", ctor_count[1]);
                json_attr_double(json_ctx, "dtor_count", dtor_count[1]);
                json_attr_object_end(json_ctx); // plain_malloc
                json_attr_object_end(json_ctx); // run
            }
        }

        if (json_ctx)
            json_attr_object_end(json_ctx); // run
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdi, %rbx
xorl %eax, %eax
leaq 0xd0(%rsp), %r13
leaq 0x150(%rsp), %r14
leaq 0x8(%rsp), %rbp
movq %rdi, 0x18(%rsp)
movq %rax, 0x90(%rsp)
cmpq $0x2, %rax
je 0x3177
testq %rbx, %rbx
je 0x24fc
leaq 0x20(%rsp), %rdi
leaq 0x2c43(%rip), %rsi      # 0x50ad
movq %rbp, %rdx
callq 0x2090
movq 0x90(%rsp), %rax
leal 0x1(%rax), %esi
movq %r13, %rdi
callq 0x337f
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
movq %r13, %rdx
callq 0x3318
movq 0x150(%rsp), %rsi
movq %rbx, %rdi
callq 0x4c60
movq %r14, %rdi
callq 0x20b0
movq %r13, %rdi
callq 0x20b0
leaq 0x20(%rsp), %rdi
callq 0x20b0
imulq $0x88, 0x90(%rsp), %rax
leaq 0x355e(%rip), %rcx      # 0x5a30
movl (%rax,%rcx), %esi
movq %r14, %rdi
callq 0x234c
movq 0x150(%rsp), %rdx
movq %rbx, %rdi
leaq 0x2bc7(%rip), %rsi      # 0x50b6
callq 0x4ce2
movq %r14, %rdi
callq 0x20b0
imulq $0x88, 0x90(%rsp), %rax
leaq 0x3521(%rip), %rcx      # 0x5a30
leaq (%rcx,%rax), %rdx
movq %rdx, 0xf0(%rsp)
leaq (%rax,%rcx), %r8
addq $0x10, %r8
movq -0x8(%r8), %rax
movq %rax, 0xf8(%rsp)
xorl %esi, %esi
movq %r8, 0xa8(%rsp)
cmpq 0xf8(%rsp), %rsi
leaq 0x6c00(%rip), %rax      # 0x9148
leaq 0x6c01(%rip), %rcx      # 0x9150
je 0x315a
andq $0x0, (%rax)
movq %rsi, 0x98(%rsp)
imulq $0xc, %rsi, %r12
andq $0x0, (%rcx)
movl (%r8,%r12), %esi
movl 0x4(%r8,%r12), %edx
xorpd %xmm0, %xmm0
movapd %xmm0, 0x130(%rsp)
movapd %xmm0, 0x140(%rsp)
movq %r13, %rdi
movq %rsi, 0x120(%rsp)
movq %rdx, 0x128(%rsp)
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq 0x130(%rsp), %r14
movq %r14, %r9
callq 0x33d8
movq 0x70(%rsp), %r15
addq 0xa8(%rsp), %r12
movq %r12, 0xc8(%rsp)
movq %r14, %rdi
callq 0x3462
xorl %r14d, %r14d
xorl %eax, %eax
cmpl $0xa, %r14d
je 0x295c
movq %rax, 0xc0(%rsp)
pushq $0x2
popq %rdi
leaq 0x20(%rsp), %rsi
callq 0x2120
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xf0(%rsp), %rax
movl (%rax), %eax
movq 0xc8(%rsp), %rcx
movl 0x8(%rcx), %r12d
cmpl $0x1, %eax
movq %r14, 0x58(%rsp)
movq %r15, 0xb8(%rsp)
je 0x26e2
testl %eax, %eax
jne 0x28c0
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x3f24
xorl %r15d, %r15d
subl $0x1, %r12d
jb 0x28d6
movq %rbp, %rdi
movq %r13, %rsi
callq 0x3fac
cmpq $0x0, 0x8(%rsp)
je 0x3189
movq %rbp, %rdi
callq 0x4000
movq %rax, %rbx
movq %rbp, %rdi
callq 0x4000
movb 0x2a(%rax), %al
addb $0x2, %al
movb %al, 0x2a(%rbx)
movq %rbp, %rdi
callq 0x4000
movq %rax, %rbx
movq %rbp, %rdi
callq 0x4000
movb 0x34(%rax), %al
addb $0x2, %al
movb %al, 0x34(%rbx)
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x402a
movq 0x28(%rsp), %rax
subq 0x20(%rsp), %rax
sarq $0x3, %rax
cmpq %rax, %r15
cmovbeq %rax, %r15
movq %rbp, %rdi
callq 0x4054
movq 0x18(%rsp), %rbx
jmp 0x2657
leaq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movq $0x1, 0x28(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, -0x20(%rax)
movl $0x3f800000, 0x40(%rsp) # imm = 0x3F800000
movupd %xmm0, -0x8(%rax)
movl %r12d, %eax
xorl %edx, %edx
pushq $0xa
popq %rcx
divl %ecx
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x44da
movq $0x0, 0xa0(%rsp)
movq $0x0, 0x70(%rsp)
xorl %r14d, %r14d
movq %r12, 0x60(%rsp)
movl %r14d, %eax
xorl %edx, %edx
pushq $0x35
popq %rcx
divl %ecx
movl %eax, %ebp
movl %r14d, %eax
xorl %edx, %edx
pushq $0x28
popq %rcx
divl %ecx
movl %eax, 0x78(%rsp)
movl %r14d, %eax
xorl %edx, %edx
pushq $0x1f
popq %rcx
divl %ecx
movl %eax, 0x68(%rsp)
movl %r14d, %eax
xorl %edx, %edx
pushq $0x7
popq %rcx
divl %ecx
movl %eax, %r15d
movl %r14d, %eax
xorl %edx, %edx
pushq $0x21
popq %rcx
divl %ecx
cmpl %r14d, %r12d
je 0x28f9
movl %eax, %r13d
leaq 0x8(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x3fac
cmpq $0x0, 0x8(%rsp)
je 0x31a0
imull $0x21, %r13d, %ebx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x4000
movq %rax, %r13
movq %r12, %rdi
callq 0x4000
movb 0x2a(%rax), %al
addb $0x2, %al
movb %al, 0x2a(%r13)
movq %r12, %rdi
callq 0x4000
movq %rax, %r13
movq %r12, %rdi
callq 0x4000
movb 0x34(%rax), %al
addb $0x2, %al
movb %al, 0x34(%r13)
cmpl %r14d, %ebx
jne 0x2802
movq 0x18(%rsp), %rbx
leaq 0x8(%rsp), %r15
movq 0x60(%rsp), %r12
jmp 0x28b0
movl %r14d, 0x14(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x472c
movq 0x60(%rsp), %r12
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x4096
imull $0x35, %ebp, %eax
cmpl %r14d, %eax
je 0x2859
imull $0x28, 0x78(%rsp), %eax
cmpl %r14d, %eax
je 0x2859
imull $0x7, %r15d, %eax
cmpl %r14d, %eax
je 0x2859
imull $0x1f, 0x68(%rsp), %eax
cmpl %r14d, %eax
je 0x2859
movq 0x18(%rsp), %rbx
leaq 0x8(%rsp), %r15
jmp 0x289a
leal -0x1(%r14), %ebx
movl %ebx, 0x14(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x4984
testq %rax, %rax
leaq 0x8(%rsp), %r15
je 0x2895
movl %ebx, 0x14(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x49a2
incq 0xa0(%rsp)
movq 0x18(%rsp), %rbx
movq 0x38(%rsp), %rax
movq 0x70(%rsp), %rcx
cmpq %rax, %rcx
cmovbeq %rax, %rcx
movq %rcx, 0x70(%rsp)
movq %r15, %rdi
callq 0x4054
incl %r14d
jmp 0x273f
movq $0x0, 0xa0(%rsp)
xorl %r15d, %r15d
leaq 0x20(%rsp), %r14
jmp 0x2918
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x406c
movq %r14, %rdi
callq 0x4074
movq $0x0, 0xa0(%rsp)
jmp 0x2918
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x4aa4
leaq 0xd0(%rsp), %r13
leaq 0x8(%rsp), %rbp
movq 0x70(%rsp), %r15
pushq $0x2
popq %rdi
movq %r14, %rsi
callq 0x2120
movq 0x20(%rsp), %rcx
movq 0xc0(%rsp), %rax
subq 0xb0(%rsp), %rax
addq 0x28(%rsp), %rax
subq 0xb8(%rsp), %rcx
imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00
addq %rcx, %rax
movq 0x58(%rsp), %r14
incl %r14d
jmp 0x25d2
movq %r15, 0x70(%rsp)
xorl %edx, %edx
pushq $0xa
popq %rcx
divq %rcx
movq %rax, 0x108(%rsp)
leaq 0x67d0(%rip), %r14      # 0x9148
movq (%r14), %rax
movq %rax, 0x110(%rsp)
leaq 0x67c6(%rip), %r15      # 0x9150
movq (%r15), %rax
movq %rax, 0x118(%rsp)
movq %r13, %rdi
callq 0x347e
movq %rax, 0x100(%rsp)
movq $0x0, 0x58(%rsp)
xorl %edi, %edi
leaq 0x150(%rsp), %rsi
callq 0x20e0
movq %r13, %rdi
callq 0x349c
andq $0x0, (%r14)
andq $0x0, (%r15)
xorl %r14d, %r14d
movq %r15, %rcx
movq 0x80(%rsp), %r15
cmpl $0xa, %r14d
je 0x2d7b
pushq $0x2
popq %rdi
leaq 0x20(%rsp), %rsi
callq 0x2120
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xf0(%rsp), %rax
movl (%rax), %eax
movq 0xc8(%rsp), %rcx
movl 0x8(%rcx), %r12d
cmpl $0x1, %eax
movl %r14d, 0xc0(%rsp)
movq %r15, 0xb8(%rsp)
je 0x2aeb
testl %eax, %eax
jne 0x2cd1
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x3f24
xorl %r14d, %r14d
subl $0x1, %r12d
jb 0x2ce7
movq %r13, %rdi
leaq 0x14(%rsp), %rsi
callq 0x4b8a
cmpq $0x0, 0xd0(%rsp)
je 0x31b7
movq %r13, %rdi
callq 0x4000
movq %rax, %rbx
movq %r13, %rdi
callq 0x4000
movb 0x2a(%rax), %al
addb $0x2, %al
movb %al, 0x2a(%rbx)
movq %r13, %rdi
callq 0x4000
movq %rax, %rbx
movq %r13, %rdi
callq 0x4000
movb 0x34(%rax), %al
addb $0x2, %al
movb %al, 0x34(%rbx)
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x402a
movq 0x28(%rsp), %rax
subq 0x20(%rsp), %rax
sarq $0x3, %rax
cmpq %rax, %r14
cmovbeq %rax, %r14
movq %r13, %rdi
callq 0x4054
movq 0x18(%rsp), %rbx
jmp 0x2a5b
leaq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movq $0x1, 0x28(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, -0x20(%rax)
movl $0x3f800000, 0x40(%rsp) # imm = 0x3F800000
movupd %xmm0, -0x8(%rax)
movl %r12d, %eax
xorl %edx, %edx
pushq $0xa
popq %rcx
divl %ecx
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x44da
movq $0x0, 0x80(%rsp)
movq $0x0, 0x88(%rsp)
xorl %r14d, %r14d
movq %r12, 0x60(%rsp)
movl %r14d, %eax
xorl %edx, %edx
pushq $0x35
popq %rcx
divl %ecx
movl %eax, %ebp
movl %r14d, %eax
xorl %edx, %edx
pushq $0x28
popq %rcx
divl %ecx
movl %eax, 0x78(%rsp)
movl %r14d, %eax
xorl %edx, %edx
pushq $0x1f
popq %rcx
divl %ecx
movl %eax, 0x68(%rsp)
movl %r14d, %eax
xorl %edx, %edx
pushq $0x7
popq %rcx
divl %ecx
movl %eax, %r15d
movl %r14d, %eax
xorl %edx, %edx
pushq $0x21
popq %rcx
divl %ecx
cmpl %r14d, %r12d
je 0x2d09
movl %eax, %r13d
leaq 0xd0(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x4b8a
cmpq $0x0, 0xd0(%rsp)
je 0x31d4
imull $0x21, %r13d, %ebx
leaq 0xd0(%rsp), %r12
movq %r12, %rdi
callq 0x4000
movq %rax, %r13
movq %r12, %rdi
callq 0x4000
movb 0x2a(%rax), %al
addb $0x2, %al
movb %al, 0x2a(%r13)
movq %r12, %rdi
callq 0x4000
movq %rax, %r13
movq %r12, %rdi
callq 0x4000
movb 0x34(%rax), %al
addb $0x2, %al
movb %al, 0x34(%r13)
cmpl %r14d, %ebx
jne 0x2c17
movq 0x18(%rsp), %rbx
leaq 0xd0(%rsp), %r13
movq 0x60(%rsp), %r12
jmp 0x2cc1
movl %r14d, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x472c
leaq 0xd0(%rsp), %r13
movq 0x60(%rsp), %r12
movq %rax, %rdi
movq %r13, %rsi
callq 0x4096
imull $0x35, %ebp, %eax
cmpl %r14d, %eax
je 0x2c68
imull $0x28, 0x78(%rsp), %eax
cmpl %r14d, %eax
je 0x2c68
imull $0x7, %r15d, %eax
cmpl %r14d, %eax
je 0x2c68
imull $0x1f, 0x68(%rsp), %eax
cmpl %r14d, %eax
jne 0x2ca0
leal -0x1(%r14), %ebx
movl %ebx, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x4984
testq %rax, %rax
je 0x2ca0
movl %ebx, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x49a2
incq 0x80(%rsp)
movq 0x38(%rsp), %rax
movq 0x88(%rsp), %rcx
cmpq %rax, %rcx
cmovbeq %rax, %rcx
movq %rcx, 0x88(%rsp)
movq 0x18(%rsp), %rbx
movq %r13, %rdi
callq 0x4054
incl %r14d
jmp 0x2b4b
xorl %r15d, %r15d
movq $0x0, 0x88(%rsp)
leaq 0x20(%rsp), %r14
jmp 0x2d2b
movq %r14, 0x88(%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x406c
movq %r14, %rdi
callq 0x4074
xorl %r15d, %r15d
jmp 0x2d2b
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x4aa4
leaq 0xd0(%rsp), %r13
leaq 0x8(%rsp), %rbp
movq 0x80(%rsp), %r15
pushq $0x2
popq %rdi
movq %r14, %rsi
callq 0x2120
movq 0x20(%rsp), %rax
movq 0x58(%rsp), %rcx
subq 0xb0(%rsp), %rcx
addq 0x28(%rsp), %rcx
subq 0xb8(%rsp), %rax
imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00
addq %rax, %rcx
movq %rcx, 0x58(%rsp)
movl 0xc0(%rsp), %r14d
incl %r14d
leaq 0x63da(%rip), %rcx      # 0x9150
jmp 0x29db
movq 0x58(%rsp), %rax
xorl %edx, %edx
pushq $0xa
popq %rsi
divq %rsi
movq %rbx, %r12
movq %rax, 0x68(%rsp)
leaq 0x63b1(%rip), %rax      # 0x9148
movq (%rax), %r14
movq (%rcx), %rbx
xorl %edi, %edi
leaq 0x1e0(%rsp), %rsi
callq 0x20e0
testq %r12, %r12
movq %r15, 0x80(%rsp)
je 0x3135
movq 0x98(%rsp), %rsi
incq %rsi
movq %r13, %rdi
movq %rsi, 0x98(%rsp)
callq 0x337f
leaq 0x20(%rsp), %rdi
leaq 0x22d7(%rip), %rsi      # 0x50bb
movq %r13, %rdx
callq 0x34d7
movq %r14, 0x60(%rsp)
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x4c60
leaq 0x20(%rsp), %rdi
callq 0x20b0
movq %r13, %rdi
callq 0x20b0
movl 0x120(%rsp), %eax
cvtsi2sd %rax, %xmm0
movq %r12, %rdi
leaq 0x2295(%rip), %rsi      # 0x50c0
callq 0x4dde
movl 0x128(%rsp), %eax
cvtsi2sd %rax, %xmm0
movq %r12, %rdi
leaq 0x2287(%rip), %rsi      # 0x50cd
callq 0x4dde
movq 0xc8(%rsp), %rax
movl 0x8(%rax), %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x78(%rsp)
movq %r12, %rdi
leaq 0x226f(%rip), %rsi      # 0x50da
callq 0x4dde
movq %r12, %rdi
leaq 0x226a(%rip), %rsi      # 0x50e4
callq 0x4c60
cvtsi2sdq 0x108(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movq %r12, %rdi
leaq 0x2260(%rip), %rbp      # 0x50f9
movq %rbp, %rsi
callq 0x4dde
movsd 0x58(%rsp), %xmm0
divsd 0x78(%rsp), %xmm0
movq %r12, %rdi
leaq 0x2250(%rip), %r14      # 0x5107
movq %r14, %rsi
callq 0x4dde
movsd 0xa0(%rsp), %xmm1
movsd 0x2140(%rip), %xmm0     # 0x5010
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x2145(%rip), %xmm0     # 0x5020
subpd %xmm0, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r12, %rdi
leaq 0x2229(%rip), %r15      # 0x511e
movq %r15, %rsi
callq 0x4dde
movsd 0x70(%rsp), %xmm1
unpcklps 0x2106(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x210e(%rip), %xmm1     # 0x5020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r12, %rdi
leaq 0x2206(%rip), %rsi      # 0x512e
callq 0x4dde
cvtsi2sdq 0x170(%rsp), %xmm0
movq %r12, %rdi
leaq 0x21fe(%rip), %rsi      # 0x513f
callq 0x4dde
movsd 0x110(%rsp), %xmm1
unpcklps 0x20ba(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x20c2(%rip), %xmm1     # 0x5020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r12, %rdi
leaq 0x21d3(%rip), %rsi      # 0x5147
callq 0x4dde
movsd 0x118(%rsp), %xmm1
unpcklps 0x2087(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x208f(%rip), %xmm1     # 0x5020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r12, %rdi
leaq 0x21ab(%rip), %rsi      # 0x5152
callq 0x4dde
movsd 0x100(%rsp), %xmm1
unpcklps 0x2054(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x205c(%rip), %xmm1     # 0x5020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r12, %rdi
leaq 0x2183(%rip), %rsi      # 0x515d
callq 0x4dde
movq %r12, %rdi
callq 0x4cb0
movq %r12, %rdi
leaq 0x217a(%rip), %rsi      # 0x516b
callq 0x4c60
cvtsi2sdq 0x68(%rsp), %xmm0
movsd %xmm0, 0x68(%rsp)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4dde
movsd 0x68(%rsp), %xmm0
divsd 0x78(%rsp), %xmm0
movq %r12, %rdi
movq %r14, %rsi
callq 0x4dde
movsd 0x80(%rsp), %xmm1
unpcklps 0x1fdb(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1fe3(%rip), %xmm1     # 0x5020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r12, %rdi
movq %r15, %rsi
callq 0x4dde
movsd 0x88(%rsp), %xmm1
unpcklps 0x1fac(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1fb4(%rip), %xmm1     # 0x5020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r12, %rdi
leaq 0x20ac(%rip), %rsi      # 0x512e
callq 0x4dde
cvtsi2sdq 0x200(%rsp), %xmm0
movq %r12, %rdi
leaq 0x20a4(%rip), %rsi      # 0x513f
callq 0x4dde
movsd 0x60(%rsp), %xmm1
unpcklps 0x1f63(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1f6b(%rip), %xmm1     # 0x5020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r12, %rdi
leaq 0x207c(%rip), %rsi      # 0x5147
callq 0x4dde
movq %rbx, %xmm1
punpckldq 0x1f33(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1f3b(%rip), %xmm1     # 0x5020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r12, %rdi
leaq 0x2057(%rip), %rsi      # 0x5152
callq 0x4dde
movq %r12, %rdi
callq 0x4cb0
movq %r12, %rdi
callq 0x4cb0
movq %r12, %rbx
leaq 0x150(%rsp), %r14
leaq 0x8(%rsp), %rbp
movq 0xa8(%rsp), %r8
movq 0x98(%rsp), %rsi
jmp 0x2539
movq 0x98(%rsp), %rsi
incq %rsi
movq 0x18(%rsp), %rbx
leaq 0x150(%rsp), %r14
movq 0xa8(%rsp), %r8
jmp 0x2539
testq %rbx, %rbx
je 0x3167
movq %rbx, %rdi
callq 0x4cb0
movq 0x90(%rsp), %rax
incq %rax
jmp 0x2443
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24e3(%rip), %rdi      # 0x5673
leaq 0x24ea(%rip), %rsi      # 0x5681
leaq 0x24ff(%rip), %rcx      # 0x569d
jmp 0x31cc
leaq 0x24cc(%rip), %rdi      # 0x5673
leaq 0x24d3(%rip), %rsi      # 0x5681
leaq 0x24e8(%rip), %rcx      # 0x569d
jmp 0x31e9
leaq 0x24b5(%rip), %rdi      # 0x5673
leaq 0x24bc(%rip), %rsi      # 0x5681
leaq 0x27ee(%rip), %rcx      # 0x59ba
pushq $0x72
popq %rdx
callq 0x20f0
leaq 0x2498(%rip), %rdi      # 0x5673
leaq 0x249f(%rip), %rsi      # 0x5681
leaq 0x27d1(%rip), %rcx      # 0x59ba
movl $0x85, %edx
callq 0x20f0
movq %rax, %rbx
leaq 0x150(%rsp), %rdi
jmp 0x3250
movq %rax, %rbx
leaq 0x150(%rsp), %rdi
callq 0x20b0
jmp 0x3215
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x20b0
jmp 0x3227
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
jmp 0x3250
movq %rax, %rbx
jmp 0x3310
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20b0
jmp 0x3248
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x20b0
jmp 0x3310
movq %rax, %rbx
jmp 0x3303
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0x3462
jmp 0x3310
jmp 0x3299
jmp 0x329e
jmp 0x32d8
jmp 0x32dd
jmp 0x3287
jmp 0x32c9
jmp 0x3287
jmp 0x32c9
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x4054
jmp 0x32a1
movq %rax, %rbx
jmp 0x32bd
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4aa4
jmp 0x3310
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x4054
leaq 0x20(%rsp), %rdi
callq 0x4074
jmp 0x3310
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4054
jmp 0x32e0
movq %rax, %rbx
jmp 0x32f9
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4aa4
jmp 0x3303
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4054
leaq 0x20(%rsp), %rdi
callq 0x4074
leaq 0xd0(%rsp), %rdi
callq 0x349c
movq %rbx, %rdi
callq 0x2220