// File: /workspace/github_cpp_makefile_star2_O1/chahk0129[P]hash_bench/./bench/benchmark.hpp
// Function: benchmark_t<unsigned long>::ycsb_exec(int, int, Pair<unsigned long>*, int, Pair<unsigned long>*, int, int, int*, bool)
inline void benchmark_t<Key_t>::ycsb_exec(int workload_type, int index_type, Pair<Key_t>* init_kv, int init_num, Pair<Key_t>* run_kv, int run_num, int num_threads, int* ops, bool pcm_enabled){
    /*
    if(memory_bandwidth){
	if(geteuid() != 0){
	    fprintf(stderr, "Must be root user to measure memory bandwidth\n");
	    exit(0);
	}
	PCM_memory::InitMemoryMonitor();
    }

    if(numa){
	if(geteuid() != 0){
	    fprintf(stderr, "Must be root user to measure NUMA operations\n");
	    exit(0);
	}
	PCM_NUMA::InitNumaMonitor();
    }*/

    Hash<Key_t>* hashtable = getInstance<Key_t>(index_type);
    //init_num = 100;
    //run_num = 100;

    auto load_func = [&hashtable, &init_kv, init_num, num_threads](uint64_t thread_id, bool){
	size_t total_num = init_num;
	size_t chunk_size = total_num / num_threads;
	size_t from = chunk_size * thread_id;
	size_t to = chunk_size * (thread_id+1);

	for(size_t i=from; i<to; i++){
	    hashtable->Insert(init_kv[i].key, init_kv[i].value);
	}
	return;
    };

    /*
    if(memory_bandwidth)
	PCM_memory::StartMemoryMonitor();

    if(numa)
	PCM_NUMA::StartNUMAMonitor();
	*/
    std::unique_ptr<SystemCounterState> before;
    if(pcm_enabled){
	before = std::make_unique<SystemCounterState>();
	*before = getSystemCounterState();
    }
    clear_cache();
    double start_time = get_now();
    start_threads(hashtable, num_threads, load_func, false);
    double end_time = get_now();

    std::unique_ptr<SystemCounterState> after;
    if(pcm_enabled){
	after = std::make_unique<SystemCounterState>();
	*after = getSystemCounterState();
    }
    /*
    if(memory_bandwidth)
	PCM_memory::EndMemoryMonitor();

    if(numa)
	PCM_NUMA::EndNUMAMonitor();
	*/
    double throughput = init_num / (end_time - start_time) / 1000000; // MOps/sec
    std::cout << "\033[1;32m";
    std::cout << "Insert " << throughput << "\033[0m" << std::endl;

    if(pcm_enabled){
	std::cout << "PCM Metrics:\n"
	    	  << "\tL3 misses: " << getL3CacheMisses(*before, *after) << "\n"
		  << "\tReads(bytes): " << getBytesReadFromMC(*before, *after) << "\n"
		  << "\tWrites(byes): " << getBytesWrittenToMC(*before, *after) << std::endl;
    }

    auto exec_func = [&hashtable, &run_kv, run_num, &ops, num_threads](uint64_t thread_id, bool){
	size_t total_num = run_num;
	size_t chunk_size = total_num / num_threads;
	size_t from = chunk_size * thread_id;
	size_t to = chunk_size * (thread_id+1);

	for(size_t i=from; i<to; i++){
	    if(ops[i] == OP_INSERT){
		hashtable->Insert(run_kv[i].key, run_kv[i].value);
	    }
	    else if(ops[i] == OP_READ){
		auto ret = hashtable->Get(run_kv[i].key);
		if((uint64_t)ret == 0)
		    std::cout << "not found" << std::endl;
	    }
	    else if(ops[i] == OP_UPDATE){
		auto ret = hashtable->Update(run_kv[i].key, run_kv[i].value);
	    }
	}
	return;
    };

    /*
    if(memory_bandwidth)
	PCM_memory::StartMemoryMonitor();

    if(numa)
	PCM_NUMA::StartNUMAMonitor();
    */
    if(pcm_enabled){
	*before = getSystemCounterState();
    }

    clear_cache();
    start_time = get_now();
    start_threads(hashtable, num_threads, exec_func, false);
    end_time = get_now();

    if(pcm_enabled){
	*after = getSystemCounterState();
    }

    /*
    if(memory_bandwidth)
	PCM_memory::EndMemoryMonitor();

    if(numa)
	PCM_NUMA::EndNUMAMonitor();
    */
    throughput = run_num / (end_time - start_time) / 1000000; // MOps/sec
    std::cout << "\033[1;31m";
    if(workload_type == WORKLOAD_A)
	std::cout << "Read/Update " << throughput << "\033[0m" << std::endl;
    else if(workload_type == WORKLOAD_B)
	std::cout << "Read/Update " << throughput << "\033[0m" << std::endl;
    else if(workload_type == WORKLOAD_C)
	std::cout << "Read " << throughput << "\033[0m" << std::endl;
    else if(workload_type == WORKLOAD_D)
	std::cout << "Read/Update " << throughput << "\033[0m" << std::endl;

    if(pcm_enabled){
	std::cout << "PCM Metrics:\n"
	    	  << "\tL3 misses: " << getL3CacheMisses(*before, *after) << "\n"
		  << "\tReads(bytes): " << getBytesReadFromMC(*before, *after) << "\n"
		  << "\tWrites(byes): " << getBytesWrittenToMC(*before, *after) << std::endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movl %r8d, %r14d
movl %edx, %edi
movl %esi, %r12d
movb 0x2b8(%rsp), %bpl
movl 0x2a8(%rsp), %r13d
leaq 0xb0(%rsp), %rbx
movq %rcx, (%rbx)
movq %r9, 0x68(%rsp)
callq 0xc54f
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movq %rcx, 0x98(%rsp)
movq %rbx, 0xa0(%rsp)
movl %r14d, 0xa8(%rsp)
movl %r13d, 0xac(%rsp)
testb %bpl, %bpl
movl %r12d, 0x10(%rsp)
movl %r14d, 0x38(%rsp)
je 0xb448
movl $0x1b0, %edi            # imm = 0x1B0
callq 0x5400
movq %rax, %rbx
movq %rax, %rdi
callq 0xfe40
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
callq 0x22750
leaq 0x8(%rbx), %rdi
leaq 0xc0(%rsp), %rsi
movl $0xc0, %edx
callq 0x5330
movl $0xd0, %eax
movq %rbx, %rdi
addq %rax, %rdi
addq %rax, %r15
movl $0x90, %edx
movq %r15, %rsi
callq 0x5330
leaq 0x218(%rsp), %r15
xorl %r12d, %r12d
leaq 0x40(%rsp), %rbp
movq %r12, 0x10(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbp)
movq 0x160(%rbx), %rax
movups 0x168(%rbx), %xmm0
movq (%r15), %rcx
movq %rcx, 0x160(%rbx)
movq 0x8(%r15), %rcx
movq %rcx, 0x168(%rbx)
movq 0x10(%r15), %rcx
movq %rcx, 0x170(%rbx)
movq (%rbp), %rcx
movq 0x8(%rbp), %rdx
movq 0x10(%rbp), %rsi
movq %rax, (%rbp)
movups %xmm0, 0x8(%rbp)
movq %rcx, (%r15)
movq %rdx, 0x8(%r15)
movq %rsi, 0x10(%r15)
movq %rbp, %rdi
callq 0x101bc
leaq 0x230(%rsp), %r13
movq %r12, 0x10(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbp)
movq 0x178(%rbx), %rax
movups 0x180(%rbx), %xmm0
movq (%r13), %rcx
movq %rcx, 0x178(%rbx)
movq 0x8(%r13), %rcx
movq %rcx, 0x180(%rbx)
movq 0x10(%r13), %rcx
movq %rcx, 0x188(%rbx)
movq (%rbp), %rcx
movq 0x8(%rbp), %rdx
movq 0x10(%rbp), %rsi
movq %rax, (%rbp)
movups %xmm0, 0x8(%rbp)
movq %rcx, (%r13)
movq %rdx, 0x8(%r13)
movq %rsi, 0x10(%r13)
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x101bc
leaq 0x248(%rsp), %rbp
movq %r12, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq 0x190(%rbx), %rax
movups 0x198(%rbx), %xmm0
movq (%rbp), %rcx
movq %rcx, 0x190(%rbx)
movq 0x8(%rbp), %rcx
movq %rcx, 0x198(%rbx)
movq 0x10(%rbp), %rcx
movq %rcx, 0x1a0(%rbx)
movq (%r14), %rcx
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rsi
movq %rax, (%r14)
movups %xmm0, 0x8(%r14)
movq %rcx, (%rbp)
movq %rdx, 0x8(%rbp)
movq %rsi, 0x10(%rbp)
leaq 0x40(%rsp), %rdi
callq 0x101bc
movq 0x18(%rbp), %rax
movq %rax, 0x1a8(%rbx)
leaq 0x2f5e1(%rip), %rax     # 0x3a9e0
leaq 0xc0(%rsp), %rcx
movq %rax, -0x8(%rcx)
leaq 0x2f5ee(%rip), %rax     # 0x3aa00
movq %rax, -0xc8(%rbp)
movq %rbp, %rdi
callq 0x101bc
movq %r13, %rdi
callq 0x101bc
movq %r15, %rdi
callq 0x101bc
movb 0x2b8(%rsp), %bpl
movl 0x10(%rsp), %r12d
movl 0x2a8(%rsp), %r13d
jmp 0xb44a
xorl %ebx, %ebx
leaq 0xb8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5690
xorps %xmm0, %xmm0
cvtsi2sdq (%r14), %xmm0
movsd %xmm0, 0x28(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%r14), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x18(%rsp), %rdi
movslq %r13d, %rsi
movb $0x0, (%r14)
leaq 0x98(%rsp), %rdx
leaq 0xb8(%rsp), %rcx
movq %rsi, 0x88(%rsp)
movq %rbx, 0x8(%rsp)
callq 0xc64c
xorl %r14d, %r14d
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x5690
xorps %xmm0, %xmm0
cvtsi2sdq (%r15), %xmm0
movsd %xmm0, 0x90(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%r15), %xmm0
movsd %xmm0, 0x20(%rsp)
testb %bpl, %bpl
je 0xb6f4
movl $0x1b0, %edi            # imm = 0x1B0
callq 0x5400
movq %rax, %r14
movq %rax, %rdi
callq 0xfe40
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
callq 0x22750
leaq 0x8(%r14), %rdi
leaq 0xc0(%rsp), %rsi
movl $0xc0, %edx
callq 0x5330
movl $0xd0, %eax
movq %r14, %rdi
addq %rax, %rdi
addq %rax, %r15
movl $0x90, %edx
movq %r15, %rsi
callq 0x5330
leaq 0x218(%rsp), %rbp
xorl %ebx, %ebx
leaq 0x40(%rsp), %r13
movq %rbx, 0x10(%r13)
xorpd %xmm0, %xmm0
movapd %xmm0, (%r13)
movq 0x160(%r14), %rax
movups 0x168(%r14), %xmm0
movq (%rbp), %rcx
movq %rcx, 0x160(%r14)
movq 0x8(%rbp), %rcx
movq %rcx, 0x168(%r14)
movq 0x10(%rbp), %rcx
movq %rcx, 0x170(%r14)
movq (%r13), %rcx
movq 0x8(%r13), %rdx
movq 0x10(%r13), %rsi
movq %rax, (%r13)
movups %xmm0, 0x8(%r13)
movq %rcx, (%rbp)
movq %rdx, 0x8(%rbp)
movq %rsi, 0x10(%rbp)
movq %r13, %rdi
callq 0x101bc
leaq 0x230(%rsp), %r15
movq %rbx, 0x10(%r13)
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
movq 0x178(%r14), %rax
movups 0x180(%r14), %xmm0
movq (%r15), %rcx
movq %rcx, 0x178(%r14)
movq 0x8(%r15), %rcx
movq %rcx, 0x180(%r14)
movq 0x10(%r15), %rcx
movq %rcx, 0x188(%r14)
movq (%r13), %rcx
movq 0x8(%r13), %rdx
movq 0x10(%r13), %rsi
movq %rax, (%r13)
movups %xmm0, 0x8(%r13)
movq %rcx, (%r15)
movq %rdx, 0x8(%r15)
movq %rsi, 0x10(%r15)
leaq 0x40(%rsp), %r12
movq %r12, %rdi
callq 0x101bc
leaq 0x248(%rsp), %r13
movq %rbx, 0x10(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq 0x190(%r14), %rax
movupd 0x198(%r14), %xmm0
movq (%r13), %rcx
movq %rcx, 0x190(%r14)
movq 0x8(%r13), %rcx
movq %rcx, 0x198(%r14)
movq 0x10(%r13), %rcx
movq %rcx, 0x1a0(%r14)
movq (%r12), %rcx
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rsi
movq %rax, (%r12)
movupd %xmm0, 0x8(%r12)
movq %rcx, (%r13)
movq %rdx, 0x8(%r13)
movq %rsi, 0x10(%r13)
leaq 0x40(%rsp), %rdi
callq 0x101bc
movq 0x18(%r13), %rax
movq %rax, 0x1a8(%r14)
leaq 0x2f338(%rip), %rax     # 0x3a9e0
leaq 0xc0(%rsp), %rcx
movq %rax, -0x8(%rcx)
leaq 0x2f345(%rip), %rax     # 0x3aa00
movq %rax, -0xc8(%r13)
movq %r13, %rdi
callq 0x101bc
movq %r15, %rdi
callq 0x101bc
movq %rbp, %rdi
callq 0x101bc
movq 0x8(%rsp), %rbx
movb 0x2b8(%rsp), %bpl
movl 0x10(%rsp), %r12d
movl 0x2a8(%rsp), %r13d
movq 0x2f8bd(%rip), %rdi     # 0x3afb8
leaq 0x20e92(%rip), %rsi     # 0x2c594
movl $0x7, %edx
callq 0x5470
movq 0x2f8a5(%rip), %rdi     # 0x3afb8
leaq 0x20e82(%rip), %rsi     # 0x2c59c
movl $0x7, %edx
callq 0x5470
movsd 0x30(%rsp), %xmm1
divsd 0x208e6(%rip), %xmm1    # 0x2c018
movsd 0x20(%rsp), %xmm2
divsd 0x208d8(%rip), %xmm2    # 0x2c018
addsd 0x28(%rsp), %xmm1
addsd 0x90(%rsp), %xmm2
xorps %xmm0, %xmm0
cvtsi2sdl 0x38(%rsp), %xmm0
subsd %xmm1, %xmm2
divsd %xmm2, %xmm0
divsd 0x208b0(%rip), %xmm0    # 0x2c018
movq 0x2f849(%rip), %rdi     # 0x3afb8
callq 0x5680
movq %rax, %r15
leaq 0x20e26(%rip), %rsi     # 0x2c5a4
movl $0x4, %edx
movq %rax, %rdi
callq 0x5470
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52b0
movl 0x2a0(%rsp), %ecx
testb %bpl, %bpl
je 0xbb35
movq 0x2f7ef(%rip), %rdi     # 0x3afb8
leaq 0x20dd9(%rip), %rsi     # 0x2c5a9
movl $0xd, %edx
callq 0x5470
movq 0x2f7d7(%rip), %rdi     # 0x3afb8
leaq 0x20dcf(%rip), %rsi     # 0x2c5b7
movl $0xc, %edx
callq 0x5470
callq 0x1aab0
movl 0x4(%rax), %eax
xorl %esi, %esi
cmpl $0x1c, %eax
je 0xb80e
cmpl $0x57, %eax
je 0xb80e
movq 0x20(%r14), %rsi
subq 0x20(%rbx), %rsi
movq 0x2f7a3(%rip), %rdi     # 0x3afb8
callq 0x5290
movq %rax, %r15
leaq 0x20d91(%rip), %rsi     # 0x2c5b5
movl $0x1, %edx
movq %rax, %rdi
callq 0x5470
leaq 0x20d8c(%rip), %rsi     # 0x2c5c4
movl $0xf, %edx
movq %r15, %rdi
callq 0x5470
movq 0xd8(%r14), %rsi
subq 0xd8(%rbx), %rsi
shlq $0x6, %rsi
movq %r15, %rdi
callq 0x5290
movq %rax, %r15
leaq 0x20d4c(%rip), %rsi     # 0x2c5b5
movl $0x1, %edx
movq %rax, %rdi
callq 0x5470
leaq 0x20d57(%rip), %rsi     # 0x2c5d4
movl $0xf, %edx
movq %r15, %rdi
callq 0x5470
movq 0xd0(%r14), %rsi
subq 0xd0(%rbx), %rsi
shlq $0x6, %rsi
movq %r15, %rdi
callq 0x5290
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52b0
leaq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x68(%rsp), %rax
movq %rax, 0x48(%rsp)
movl 0x2a0(%rsp), %eax
movl %eax, 0x50(%rsp)
leaq 0x2b0(%rsp), %rax
movq %rax, 0x58(%rsp)
movl %r13d, 0x60(%rsp)
testb %bpl, %bpl
je 0xbb5f
leaq 0xb8(%rsp), %rdi
callq 0x22750
leaq 0xd0(%rbx), %r15
leaq 0x8(%rbx), %rdi
leaq 0xc0(%rsp), %rsi
movl $0xc0, %edx
callq 0x5330
leaq 0x188(%rsp), %rsi
movl $0x90, %edx
movq %r15, %rdi
callq 0x5330
leaq 0x218(%rsp), %r13
xorl %ebx, %ebx
leaq 0x70(%rsp), %r12
movq %rbx, 0x10(%r12)
xorpd %xmm0, %xmm0
movapd %xmm0, (%r12)
movq 0x8(%rsp), %rax
movq 0x160(%rax), %rax
movq 0x8(%rsp), %rcx
movups 0x168(%rcx), %xmm0
movq (%r13), %rcx
movq 0x8(%rsp), %rdx
movq %rcx, 0x160(%rdx)
movq 0x8(%r13), %rcx
movq 0x8(%rsp), %rdx
movq %rcx, 0x168(%rdx)
movq 0x10(%r13), %rcx
movq 0x8(%rsp), %rdx
movq %rcx, 0x170(%rdx)
movq (%r12), %rcx
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rsi
movq %rax, (%r12)
movups %xmm0, 0x8(%r12)
movq %rcx, (%r13)
movq %rdx, 0x8(%r13)
movq %rsi, 0x10(%r13)
movq %r12, %rdi
callq 0x101bc
leaq 0x230(%rsp), %r15
movq %rbx, 0x10(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq 0x8(%rsp), %rax
movq 0x178(%rax), %rax
movq 0x8(%rsp), %rcx
movups 0x180(%rcx), %xmm0
movq (%r15), %rcx
movq 0x8(%rsp), %rdx
movq %rcx, 0x178(%rdx)
movq 0x8(%r15), %rcx
movq 0x8(%rsp), %rdx
movq %rcx, 0x180(%rdx)
movq 0x10(%r15), %rcx
movq 0x8(%rsp), %rdx
movq %rcx, 0x188(%rdx)
movq (%r12), %rcx
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rsi
movq %rax, (%r12)
movups %xmm0, 0x8(%r12)
movq %rcx, (%r15)
movq %rdx, 0x8(%r15)
movq %rsi, 0x10(%r15)
leaq 0x70(%rsp), %rbp
movq %rbp, %rdi
callq 0x101bc
leaq 0x248(%rsp), %r12
movq %rbx, 0x10(%rbp)
movq 0x8(%rsp), %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rbp)
movq 0x190(%rbx), %rax
movupd 0x198(%rbx), %xmm0
movq (%r12), %rcx
movq %rcx, 0x190(%rbx)
movq 0x8(%r12), %rcx
movq %rcx, 0x198(%rbx)
movq 0x10(%r12), %rcx
movq %rcx, 0x1a0(%rbx)
movq (%rbp), %rcx
movq 0x8(%rbp), %rdx
movq 0x10(%rbp), %rsi
movq %rax, (%rbp)
movupd %xmm0, 0x8(%rbp)
movq %rcx, (%r12)
movq %rdx, 0x8(%r12)
movq %rsi, 0x10(%r12)
leaq 0x70(%rsp), %rdi
callq 0x101bc
movq 0x18(%r12), %rax
movq %rax, 0x1a8(%rbx)
leaq 0x2eef1(%rip), %rax     # 0x3a9e0
leaq 0xc0(%rsp), %rcx
movq %rax, -0x8(%rcx)
leaq 0x2eefe(%rip), %rax     # 0x3aa00
leaq 0x188(%rsp), %rcx
movq %rax, -0x8(%rcx)
movq %r12, %rdi
callq 0x101bc
movq %r15, %rdi
callq 0x101bc
movq %r13, %rdi
callq 0x101bc
movb 0x2b8(%rsp), %bpl
movl 0x10(%rsp), %r12d
jmp 0xbb5f
leaq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x68(%rsp), %rax
movq %rax, 0x48(%rsp)
movl %ecx, 0x50(%rsp)
leaq 0x2b0(%rsp), %rax
movq %rax, 0x58(%rsp)
movl %r13d, 0x60(%rsp)
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x5690
xorps %xmm0, %xmm0
cvtsi2sdq (%r15), %xmm0
movsd %xmm0, 0x30(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%r15), %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x18(%rsp), %rdi
movb $0x0, (%r15)
leaq 0x40(%rsp), %rdx
leaq 0xb8(%rsp), %rcx
movq 0x88(%rsp), %rsi
callq 0xc72a
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x5690
xorps %xmm0, %xmm0
cvtsi2sdq (%r15), %xmm0
movsd %xmm0, 0x20(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%r15), %xmm0
movsd %xmm0, 0x28(%rsp)
testb %bpl, %bpl
movl 0x2a0(%rsp), %r15d
je 0xbde4
leaq 0xb8(%rsp), %r12
movq %r12, %rdi
callq 0x22750
leaq 0x8(%r14), %rdi
leaq 0xc0(%rsp), %rsi
movl $0xc0, %edx
callq 0x5330
movl $0xd0, %eax
leaq (%r14,%rax), %rdi
addq %rax, %r12
movl $0x90, %edx
movq %r12, %rsi
callq 0x5330
leaq 0x218(%rsp), %r12
xorl %ebx, %ebx
leaq 0x70(%rsp), %rbp
movq %rbx, 0x10(%rbp)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rbp)
movq 0x160(%r14), %rax
movups 0x168(%r14), %xmm0
movq (%r12), %rcx
movq %rcx, 0x160(%r14)
movq 0x8(%r12), %rcx
movq %rcx, 0x168(%r14)
movq 0x10(%r12), %rcx
movq %rcx, 0x170(%r14)
movq (%rbp), %rcx
movq 0x8(%rbp), %rdx
movq 0x10(%rbp), %rsi
movq %rax, (%rbp)
movups %xmm0, 0x8(%rbp)
movq %rcx, (%r12)
movq %rdx, 0x8(%r12)
movq %rsi, 0x10(%r12)
movq %rbp, %rdi
callq 0x101bc
leaq 0x230(%rsp), %r13
movq %rbx, 0x10(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbp)
movq 0x178(%r14), %rax
movups 0x180(%r14), %xmm0
movq (%r13), %rcx
movq %rcx, 0x178(%r14)
movq 0x8(%r13), %rcx
movq %rcx, 0x180(%r14)
movq 0x10(%r13), %rcx
movq %rcx, 0x188(%r14)
movq (%rbp), %rcx
movq 0x8(%rbp), %rdx
movq 0x10(%rbp), %rsi
movq %rax, (%rbp)
movups %xmm0, 0x8(%rbp)
movq %rcx, (%r13)
movq %rdx, 0x8(%r13)
movq %rsi, 0x10(%r13)
leaq 0x70(%rsp), %r15
movq %r15, %rdi
callq 0x101bc
leaq 0x248(%rsp), %rbp
movq %rbx, 0x10(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq 0x190(%r14), %rax
movupd 0x198(%r14), %xmm0
movq (%rbp), %rcx
movq %rcx, 0x190(%r14)
movq 0x8(%rbp), %rcx
movq %rcx, 0x198(%r14)
movq 0x10(%rbp), %rcx
movq %rcx, 0x1a0(%r14)
movq (%r15), %rcx
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rsi
movq %rax, (%r15)
movupd %xmm0, 0x8(%r15)
movq %rcx, (%rbp)
movq %rdx, 0x8(%rbp)
movq %rsi, 0x10(%rbp)
leaq 0x70(%rsp), %rdi
callq 0x101bc
movq 0x18(%rbp), %rax
movq %rax, 0x1a8(%r14)
leaq 0x2ec48(%rip), %rax     # 0x3a9e0
leaq 0xc0(%rsp), %rcx
movq %rax, -0x8(%rcx)
leaq 0x2ec55(%rip), %rax     # 0x3aa00
movq %rax, -0xc8(%rbp)
movq %rbp, %rdi
callq 0x101bc
movq %r13, %rdi
callq 0x101bc
movq %r12, %rdi
callq 0x101bc
movq 0x8(%rsp), %rbx
movb 0x2b8(%rsp), %bpl
movl 0x10(%rsp), %r12d
movl 0x2a0(%rsp), %r15d
movq 0x2f1cd(%rip), %rdi     # 0x3afb8
leaq 0x207f2(%rip), %rsi     # 0x2c5e4
movl $0x7, %edx
callq 0x5470
cmpl $0x3, %r12d
ja 0xbfcf
movsd 0x38(%rsp), %xmm0
divsd 0x20204(%rip), %xmm0    # 0x2c018
movsd 0x28(%rsp), %xmm1
divsd 0x201f6(%rip), %xmm1    # 0x2c018
addsd 0x30(%rsp), %xmm0
addsd 0x20(%rsp), %xmm1
cvtsi2sd %r15d, %xmm2
subsd %xmm0, %xmm1
divsd %xmm1, %xmm2
divsd 0x201d5(%rip), %xmm2    # 0x2c018
movsd %xmm2, 0x10(%rsp)
movl %r12d, %eax
leaq 0x2021d(%rip), %rcx     # 0x2c070
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x2f155(%rip), %rdi     # 0x3afb8
leaq 0x20782(%rip), %rsi     # 0x2c5ec
movl $0xc, %edx
callq 0x5470
movq 0x2f13d(%rip), %rdi     # 0x3afb8
movsd 0x10(%rsp), %xmm0
callq 0x5680
movq %rax, %r15
leaq 0x20714(%rip), %rsi     # 0x2c5a4
movl $0x4, %edx
movq %rax, %rdi
callq 0x5470
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53d0
jmp 0xbfbc
movq 0x2f0fb(%rip), %rdi     # 0x3afb8
leaq 0x20735(%rip), %rsi     # 0x2c5f9
movl $0x5, %edx
callq 0x5470
movq 0x2f0e3(%rip), %rdi     # 0x3afb8
movsd 0x10(%rsp), %xmm0
callq 0x5680
movq %rax, %r15
leaq 0x206ba(%rip), %rsi     # 0x2c5a4
movl $0x4, %edx
movq %rax, %rdi
callq 0x5470
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53d0
jmp 0xbfbc
movq 0x2f0a1(%rip), %rdi     # 0x3afb8
leaq 0x206ce(%rip), %rsi     # 0x2c5ec
movl $0xc, %edx
callq 0x5470
movq 0x2f089(%rip), %rdi     # 0x3afb8
movsd 0x10(%rsp), %xmm0
callq 0x5680
movq %rax, %r15
leaq 0x20660(%rip), %rsi     # 0x2c5a4
movl $0x4, %edx
movq %rax, %rdi
callq 0x5470
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53d0
jmp 0xbfbc
movq 0x2f04a(%rip), %rdi     # 0x3afb8
leaq 0x20677(%rip), %rsi     # 0x2c5ec
movl $0xc, %edx
callq 0x5470
movq 0x2f032(%rip), %rdi     # 0x3afb8
movsd 0x10(%rsp), %xmm0
callq 0x5680
movq %rax, %r15
leaq 0x20609(%rip), %rsi     # 0x2c5a4
movl $0x4, %edx
movq %rax, %rdi
callq 0x5470
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52b0
testb %bpl, %bpl
je 0xc0e4
movq 0x2efd9(%rip), %rdi     # 0x3afb8
leaq 0x205c3(%rip), %rsi     # 0x2c5a9
movl $0xd, %edx
callq 0x5470
movq 0x2efc1(%rip), %rdi     # 0x3afb8
leaq 0x205b9(%rip), %rsi     # 0x2c5b7
movl $0xc, %edx
callq 0x5470
callq 0x1aab0
movl 0x4(%rax), %eax
xorl %esi, %esi
cmpl $0x1c, %eax
je 0xc024
cmpl $0x57, %eax
je 0xc024
movq 0x20(%r14), %rsi
subq 0x20(%rbx), %rsi
movq 0x2ef8d(%rip), %rdi     # 0x3afb8
callq 0x5290
movq %rax, %r15
leaq 0x2057b(%rip), %rsi     # 0x2c5b5
movl $0x1, %edx
movq %rax, %rdi
callq 0x5470
leaq 0x20576(%rip), %rsi     # 0x2c5c4
movl $0xf, %edx
movq %r15, %rdi
callq 0x5470
movq 0xd8(%r14), %rsi
subq 0xd8(%rbx), %rsi
shlq $0x6, %rsi
movq %r15, %rdi
callq 0x5290
movq %rax, %r15
leaq 0x20536(%rip), %rsi     # 0x2c5b5
movl $0x1, %edx
movq %rax, %rdi
callq 0x5470
leaq 0x20541(%rip), %rsi     # 0x2c5d4
movl $0xf, %edx
movq %r15, %rdi
callq 0x5470
movq 0xd0(%r14), %rsi
subq 0xd0(%rbx), %rsi
shlq $0x6, %rsi
movq %r15, %rdi
callq 0x5290
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52b0
testq %r14, %r14
je 0xc0f2
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
testq %rbx, %rbx
je 0xc100
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc162
jmp 0xc162
jmp 0xc162
movq %rax, %r15
movl $0x1b0, %esi            # imm = 0x1B0
movq %r14, %rdi
callq 0x5410
jmp 0xc12d
movq %rax, %r15
xorl %r14d, %r14d
jmp 0xc165
movq %rbx, 0x8(%rsp)
jmp 0xc15b
movq %rax, %r15
movl $0x1b0, %esi            # imm = 0x1B0
movq %rbx, %rdi
callq 0x5410
jmp 0xc14e
movq %rax, %r15
movq $0x0, 0x8(%rsp)
jmp 0xc173
jmp 0xc162
movq %rax, %r15
jmp 0xc173
jmp 0xc162
movq %rax, %r15
testq %r14, %r14
je 0xc173
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
cmpq $0x0, 0x8(%rsp)
je 0xc186
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq %r15, %rdi
callq 0x5740