// File: chahk0129[P]hash_bench/./index/cuckoo_hash.h
// Function: CuckooHash<char [32]>::Insert(char (&) [32], long)
void CuckooHash<Key_t>::Insert(Key_t& key, Value_t value) {
  size_t f_hash, s_hash;
  if constexpr(sizeof(Key_t) > 8){
      f_hash = hash_funcs[0](key, sizeof(Key_t), _seed);
      s_hash = hash_funcs[1](key, sizeof(Key_t), _seed);
  }
  else{
      f_hash = hash_funcs[0](&key, sizeof(Key_t), _seed);
      s_hash = hash_funcs[1](&key, sizeof(Key_t), _seed);
  }


RETRY:
  while (resizing_lock == 1) {
    asm("nop");
  }
  auto f_idx = f_hash % capacity;
  auto s_idx = s_hash % capacity;


  {
    unique_lock<shared_mutex> f_lock(mutex[f_idx/locksize]);
    if constexpr(sizeof(Key_t) > 8){
	if(memcmp(table[f_idx].key, INVALID<Key_t>, sizeof(Key_t)) == 0){
	    memcpy(table[f_idx].key, key, sizeof(Key_t));
	    memcpy(&table[f_idx].value, &value, sizeof(Value_t));
	    return;
	}
    }
    else{
	if(memcmp(&table[f_idx].key, &INVALID<Key_t>, sizeof(Key_t)) == 0){
	    memcpy(&table[f_idx].key, &key, sizeof(Key_t));
	    memcpy(&table[f_idx].value, &value, sizeof(Value_t));
	    return;
	}
    }
  }
  {
    unique_lock<shared_mutex> s_lock(mutex[s_idx/locksize]);
    if constexpr(sizeof(Key_t) > 8){
	if(memcmp(table[s_idx].key, INVALID<Key_t>, sizeof(Key_t)) == 0){
	    memcpy(table[s_idx].key, key, sizeof(Key_t));
	    memcpy(&table[s_idx].value, &value, sizeof(Value_t));
	    return;
	}
    }
    else{
	if(memcmp(&table[s_idx].key, &INVALID<Key_t>, sizeof(Key_t)) == 0){
	    memcpy(&table[s_idx].key, &key, sizeof(Key_t));
	    memcpy(&table[s_idx].value, &value, sizeof(Value_t));
	    return;
	}
    }

  }

  { // Failed to insert... Doing Cuckooing...
    int unlocked = 0;
    if (CAS(&resizing_lock, &unlocked, 1)) {
#ifdef BREAKDOWN
	clock_gettime(CLOCK_MONOTONIC, &t_start);
#endif
PATH_RETRY:
	    if constexpr(sizeof(Key_t) > 8){
		    auto path1 = find_path(f_idx, true);
		    auto path2 = find_path(s_idx, true);
		    if (path1.size() != 0 || path2.size() != 0) {
			    auto path = &path1;
			    if(path1.size() == 0
					    || (path2.size() != 0 && path2.size() < path1.size())
					    || (path2.size() != 0 && (memcmp(path1[0].second.c_str(), INVALID<Key_t>, sizeof(Key_t)) == 0))){
				    path = &path2;
			    }

			    auto id = 0;
			    vector<size_t> lock_loc;
			    for (auto p: *path) {
				    lock_loc.push_back(p.first/locksize);
			    }
			    sort(begin(lock_loc), end(lock_loc));
			    lock_loc.erase( unique( lock_loc.begin(), lock_loc.end() ), lock_loc.end() );
			    unique_lock<shared_mutex> *lock[kCuckooThreshold];
			    for (auto i :lock_loc) {
				    lock[id++] = new unique_lock<shared_mutex>(mutex[i]);
			    }
			    for (auto p : *path) {
				    if(strcmp(table[p.first].key, p.second.c_str()) != 0){
					    for(int i=0; i<id; i++)
						    delete lock[i];
					    goto PATH_RETRY;
				    }

			    }
			    resizing_lock = 0;
			    execute_path(*path, key, value, true);
			    for (int i = 0; i < id; ++i) {
				    delete lock[i];
			    }
#ifdef BREAKDOWN
			    clock_gettime(CLOCK_MONOTONIC, &t_end);
			    cuckoo_time += t_end.tv_nsec - t_start.tv_nsec + (t_end.tv_sec - t_start.tv_sec) * 1000000000;
#endif
			    return;
		    } else {
			    resize();
			    resizing_lock = 0;
#ifdef BREAKDOWN
			    clock_gettime(CLOCK_MONOTONIC, &t_end);
			    split_time += t_end.tv_nsec - t_start.tv_nsec + (t_end.tv_sec - t_start.tv_sec) * 1000000000;
#endif
		    }
	    }
	    else{

		    auto path1 = find_path(f_idx);
		    auto path2 = find_path(s_idx);
		    if (path1.size() != 0 || path2.size() != 0) {
			    auto path = &path1;
			    if(path1.size() == 0
					    || (path2.size() != 0 && path2.size() < path1.size())
					    || (path2.size() != 0 && memcmp(&path1[0].second, &INVALID<Key_t>, sizeof(Key_t)) == 0)){
				    path = &path2;
			    }

			    auto id = 0;
			    vector<size_t> lock_loc;
			    for (auto p: *path) {
				    lock_loc.push_back(p.first/locksize);
			    }
			    sort(begin(lock_loc), end(lock_loc));
			    lock_loc.erase( unique( lock_loc.begin(), lock_loc.end() ), lock_loc.end() );
			    unique_lock<shared_mutex> *lock[kCuckooThreshold];
			    for (auto i :lock_loc) {
				    lock[id++] = new unique_lock<shared_mutex>(mutex[i]);
			    }
			    for (auto p : *path) {
				    if constexpr(sizeof(Key_t) > 8){
					    if(memcmp(table[p.first].key, p.second, sizeof(Key_t)) != 0){
						    for(int i=0; i<id; i++)
							    delete lock[i];
						    goto PATH_RETRY;
					    }
				    }
				    else{
					    if(memcmp(&table[p.first].key, &p.second, sizeof(Key_t)) != 0){
						    for(int i=0; i<id; i++)
							    delete lock[i];
						    goto PATH_RETRY;
					    }
				    }

			    }
			    resizing_lock = 0;
			    execute_path(*path, key, value);
			    for (int i = 0; i < id; ++i) {
				    delete lock[i];
			    }
#ifdef BREAKDOWN
			    clock_gettime(CLOCK_MONOTONIC, &t_end);
			    cuckoo_time += t_end.tv_nsec - t_start.tv_nsec + (t_end.tv_sec - t_start.tv_sec) * 1000000000;
#endif

			    return;
		    } else {
			    resize();
			    resizing_lock = 0;
#ifdef BREAKDOWN
			    clock_gettime(CLOCK_MONOTONIC, &t_end);
			    split_time += t_end.tv_nsec - t_start.tv_nsec + (t_end.tv_sec - t_start.tv_sec) * 1000000000;
#endif
		    }
	    }
    }
  }
  goto RETRY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x1e8(%rbp)
movq 0x3bf97(%rip), %rax     # 0x5a480
movq -0x10(%rbp), %rdi
movq 0x8(%rcx), %rdx
movl $0x20, %esi
callq *%rax
movq -0x1e8(%rbp), %rcx
movq %rax, -0x20(%rbp)
movq 0x3bf7e(%rip), %rax     # 0x5a488
movq -0x10(%rbp), %rdi
movq 0x8(%rcx), %rdx
movl $0x20, %esi
callq *%rax
movq %rax, -0x28(%rbp)
jmp 0x1e51f
movq -0x1e8(%rbp), %rax
cmpl $0x1, 0xc8(%rax)
jne 0x1e532
nop
jmp 0x1e51f
movq -0x1e8(%rbp), %rcx
movq -0x20(%rbp), %rax
xorl %edx, %edx
divq 0x30(%rcx)
movq %rdx, -0x30(%rbp)
movq -0x28(%rbp), %rax
xorl %edx, %edx
divq 0x30(%rcx)
movq %rdx, -0x38(%rbp)
movq 0xd0(%rcx), %rsi
movq -0x30(%rbp), %rax
movslq 0xdc(%rcx), %rcx
xorl %edx, %edx
divq %rcx
imulq $0x38, %rax, %rax
addq %rax, %rsi
leaq -0x48(%rbp), %rdi
callq 0x1dd90
movq -0x1e8(%rbp), %rax
movq 0x38(%rax), %rdi
imulq $0x28, -0x30(%rbp), %rax
addq %rax, %rdi
leaq 0x3c70a(%rip), %rsi     # 0x5aca0
movl $0x20, %edx
callq 0x6190
cmpl $0x0, %eax
jne 0x1e5f7
movq -0x1e8(%rbp), %rax
movq 0x38(%rax), %rcx
imulq $0x28, -0x30(%rbp), %rdx
addq %rdx, %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rsi
movq %rsi, (%rcx)
movq 0x8(%rdx), %rsi
movq %rsi, 0x8(%rcx)
movq 0x10(%rdx), %rsi
movq %rsi, 0x10(%rcx)
movq 0x18(%rdx), %rdx
movq %rdx, 0x18(%rcx)
movq 0x38(%rax), %rax
imulq $0x28, -0x30(%rbp), %rcx
addq %rcx, %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x20(%rax)
movl $0x1, -0x4c(%rbp)
jmp 0x1e5fe
movl $0x0, -0x4c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x1ddd0
movl -0x4c(%rbp), %eax
testl %eax, %eax
je 0x1e615
jmp 0x1e610
jmp 0x1ef23
movq -0x1e8(%rbp), %rcx
movq 0xd0(%rcx), %rsi
movq -0x38(%rbp), %rax
movslq 0xdc(%rcx), %rcx
xorl %edx, %edx
divq %rcx
imulq $0x38, %rax, %rax
addq %rax, %rsi
leaq -0x60(%rbp), %rdi
callq 0x1dd90
movq -0x1e8(%rbp), %rax
movq 0x38(%rax), %rdi
imulq $0x28, -0x38(%rbp), %rax
addq %rax, %rdi
leaq 0x3c643(%rip), %rsi     # 0x5aca0
movl $0x20, %edx
callq 0x6190
cmpl $0x0, %eax
jne 0x1e6be
movq -0x1e8(%rbp), %rax
movq 0x38(%rax), %rcx
imulq $0x28, -0x38(%rbp), %rdx
addq %rdx, %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rsi
movq %rsi, (%rcx)
movq 0x8(%rdx), %rsi
movq %rsi, 0x8(%rcx)
movq 0x10(%rdx), %rsi
movq %rsi, 0x10(%rcx)
movq 0x18(%rdx), %rdx
movq %rdx, 0x18(%rcx)
movq 0x38(%rax), %rax
imulq $0x28, -0x38(%rbp), %rcx
addq %rcx, %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x20(%rax)
movl $0x1, -0x4c(%rbp)
jmp 0x1e6c5
movl $0x0, -0x4c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x1ddd0
movl -0x4c(%rbp), %eax
testl %eax, %eax
je 0x1e6dc
jmp 0x1e6d7
jmp 0x1ef23
movq -0x1e8(%rbp), %rcx
movl $0x0, -0x64(%rbp)
movl $0x1, -0x68(%rbp)
movl -0x64(%rbp), %eax
movl -0x68(%rbp), %edx
lock
cmpxchgl %edx, 0xc8(%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x1ed(%rbp)
movl %ecx, -0x1ec(%rbp)
testb $0x1, %al
jne 0x1e71d
movl -0x1ec(%rbp), %eax
movl %eax, -0x64(%rbp)
movb -0x1ed(%rbp), %al
andb $0x1, %al
movb %al, -0x69(%rbp)
testb $0x1, -0x69(%rbp)
je 0x1ef1e
movl $0x1, %edi
leaq 0x3c532(%rip), %rsi     # 0x5ac70
callq 0x63d0
movq -0x1e8(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0x88(%rbp), %rdi
movl $0x1, %ecx
movl %ecx, -0x1f4(%rbp)
callq 0x1f600
movq -0x1e8(%rbp), %rsi
movl -0x1f4(%rbp), %ecx
movq -0x38(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
callq 0x1f600
jmp 0x1e784
leaq -0x88(%rbp), %rdi
callq 0x1fb60
cmpq $0x0, %rax
jne 0x1e7ac
leaq -0xa0(%rbp), %rdi
callq 0x1fb60
cmpq $0x0, %rax
je 0x1ee48
leaq -0x88(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x1fb60
cmpq $0x0, %rax
je 0x1e857
leaq -0xa0(%rbp), %rdi
callq 0x1fb60
cmpq $0x0, %rax
je 0x1e810
leaq -0xa0(%rbp), %rdi
callq 0x1fb60
movq %rax, -0x200(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x1fb60
movq %rax, %rcx
movq -0x200(%rbp), %rax
cmpq %rcx, %rax
jb 0x1e857
leaq -0xa0(%rbp), %rdi
callq 0x1fb60
cmpq $0x0, %rax
je 0x1e87e
leaq -0x88(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1fb90
movq %rax, %rdi
addq $0x8, %rdi
callq 0x6160
movq %rax, %rdi
leaq 0x3c458(%rip), %rsi     # 0x5aca0
movl $0x20, %edx
callq 0x6190
cmpl $0x0, %eax
jne 0x1e87e
leaq -0xa0(%rbp), %rax
movq %rax, -0xb8(%rbp)
jmp 0x1e87e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x1ef10
movl $0x0, -0xbc(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x1fbb0
movq -0xb8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x1fbd0
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x1fc00
movq %rax, -0xf0(%rbp)
leaq -0xe8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x1fc30
testb $0x1, %al
jne 0x1e8e4
jmp 0x1e98e
leaq -0xe8(%rbp), %rdi
callq 0x1fc70
movq %rax, %rsi
leaq -0x118(%rbp), %rdi
callq 0x1fc90
jmp 0x1e901
movq -0x1e8(%rbp), %rcx
movq -0x118(%rbp), %rax
movslq 0xdc(%rcx), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, -0x120(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x1fcd0
jmp 0x1e937
leaq -0x118(%rbp), %rdi
callq 0x1fd00
leaq -0xe8(%rbp), %rdi
callq 0x1fd20
jmp 0x1e8c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x1ee37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x1fd00
jmp 0x1ee37
leaq -0xd8(%rbp), %rdi
callq 0x1fd80
movq %rax, -0x208(%rbp)
jmp 0x1e9a3
movq -0x208(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x1fdb0
movq %rax, -0x210(%rbp)
jmp 0x1e9c6
movq -0x210(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rdi
movq -0x130(%rbp), %rsi
callq 0x1fd40
jmp 0x1e9e9
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0x1feb0
movq -0x220(%rbp), %rdi
movq %rax, -0x148(%rbp)
callq 0x1fee0
movq %rax, -0x150(%rbp)
movq -0x148(%rbp), %rdi
movq -0x150(%rbp), %rsi
callq 0x1fe70
movq %rax, -0x218(%rbp)
jmp 0x1ea32
movq -0x218(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x138(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x1ff10
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0x1fee0
movq %rax, -0x160(%rbp)
leaq -0x158(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x1ff10
movq -0x230(%rbp), %rdi
movq -0x138(%rbp), %rsi
movq -0x158(%rbp), %rdx
callq 0x1fde0
movq %rax, -0x228(%rbp)
jmp 0x1eaa3
movq -0x1e8(%rbp), %rax
movq -0x228(%rbp), %rcx
movq %rcx, -0x168(%rbp)
movq 0x10(%rax), %rax
movq %rsp, %rcx
movq %rcx, -0x170(%rbp)
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x238(%rbp)
movq %rcx, %rsp
movq %rax, -0x178(%rbp)
leaq -0xd8(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rdi
callq 0x1feb0
movq %rax, -0x188(%rbp)
movq -0x180(%rbp), %rdi
callq 0x1fee0
movq %rax, -0x190(%rbp)
leaq -0x188(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x1ff50
testb $0x1, %al
jne 0x1eb39
jmp 0x1ebeb
leaq -0x188(%rbp), %rdi
callq 0x1ff90
movq (%rax), %rax
movq %rax, -0x198(%rbp)
movl $0x10, %edi
callq 0x6420
movq %rax, -0x240(%rbp)
jmp 0x1eb62
movq -0x240(%rbp), %rdi
movq -0x1e8(%rbp), %rax
movq 0xd0(%rax), %rsi
movq -0x198(%rbp), %rax
imulq $0x38, %rax, %rax
addq %rax, %rsi
callq 0x1dd90
jmp 0x1eb8c
movq -0x238(%rbp), %rax
movq -0x240(%rbp), %rdx
movl -0xbc(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0xbc(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
leaq -0x188(%rbp), %rdi
callq 0x1ffb0
jmp 0x1eb1d
movq -0x240(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
movl $0x10, %esi
callq 0x6430
jmp 0x1ee37
movq -0xb8(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rdi
callq 0x1fbd0
movq %rax, -0x1a8(%rbp)
movq -0x1a0(%rbp), %rdi
callq 0x1fc00
movq %rax, -0x1b0(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x1fc30
testb $0x1, %al
jne 0x1ec3b
jmp 0x1ed3c
leaq -0x1a8(%rbp), %rdi
callq 0x1fc70
movq %rax, %rsi
leaq -0x1d8(%rbp), %rdi
callq 0x1fc90
jmp 0x1ec58
movq -0x1e8(%rbp), %rax
movq 0x38(%rax), %rax
imulq $0x28, -0x1d8(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x248(%rbp)
leaq -0x1d8(%rbp), %rdi
addq $0x8, %rdi
callq 0x6160
movq -0x248(%rbp), %rdi
movq %rax, %rsi
callq 0x6590
cmpl $0x0, %eax
je 0x1ed09
movl $0x0, -0x1dc(%rbp)
movl -0x1dc(%rbp), %eax
cmpl -0xbc(%rbp), %eax
jge 0x1ed00
movq -0x238(%rbp), %rax
movslq -0x1dc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x250(%rbp)
cmpq $0x0, %rax
je 0x1eced
movq -0x250(%rbp), %rdi
callq 0x1ddd0
movq -0x250(%rbp), %rdi
movl $0x10, %esi
callq 0x6430
jmp 0x1ecef
movl -0x1dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1dc(%rbp)
jmp 0x1eca3
movl $0x5, -0x4c(%rbp)
jmp 0x1ed10
movl $0x0, -0x4c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x1fd00
movl -0x4c(%rbp), %eax
testl %eax, %eax
jne 0x1ee1c
jmp 0x1ed29
jmp 0x1ed2b
leaq -0x1a8(%rbp), %rdi
callq 0x1fd20
jmp 0x1ec1f
movq -0x1e8(%rbp), %rdi
movl $0x0, 0xc8(%rdi)
movq -0xb8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %r8d
callq 0x1ffd0
jmp 0x1ed69
movl $0x0, -0x1e0(%rbp)
movl -0x1e0(%rbp), %eax
cmpl -0xbc(%rbp), %eax
jge 0x1edd0
movq -0x238(%rbp), %rax
movslq -0x1e0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x258(%rbp)
cmpq $0x0, %rax
je 0x1edbd
movq -0x258(%rbp), %rdi
callq 0x1ddd0
movq -0x258(%rbp), %rdi
movl $0x10, %esi
callq 0x6430
jmp 0x1edbf
movl -0x1e0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e0(%rbp)
jmp 0x1ed73
movl $0x1, %edi
leaq 0x3bea4(%rip), %rsi     # 0x5ac80
callq 0x63d0
movq 0x3bea0(%rip), %rax     # 0x5ac88
subq 0x3be89(%rip), %rax     # 0x5ac78
movq 0x3be8a(%rip), %rcx     # 0x5ac80
subq 0x3be73(%rip), %rcx     # 0x5ac70
imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00
addq %rcx, %rax
addq 0x3be5a(%rip), %rax     # 0x5ac68
movq %rax, 0x3be53(%rip)     # 0x5ac68
movl $0x1, -0x4c(%rbp)
movq -0x170(%rbp), %rax
movq %rax, %rsp
leaq -0xd8(%rbp), %rdi
callq 0x20180
jmp 0x1eec9
leaq -0xd8(%rbp), %rdi
callq 0x20180
jmp 0x1ef04
movq -0x1e8(%rbp), %rdi
callq 0x201e0
jmp 0x1ee56
movq -0x1e8(%rbp), %rax
movl $0x0, 0xc8(%rax)
movl $0x1, %edi
leaq 0x3be0d(%rip), %rsi     # 0x5ac80
callq 0x63d0
movq 0x3be09(%rip), %rax     # 0x5ac88
subq 0x3bdf2(%rip), %rax     # 0x5ac78
movq 0x3bdf3(%rip), %rcx     # 0x5ac80
subq 0x3bddc(%rip), %rcx     # 0x5ac70
imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00
addq %rcx, %rax
addq 0x3bdbb(%rip), %rax     # 0x5ac60
movq %rax, 0x3bdb4(%rip)     # 0x5ac60
jmp 0x1eec2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x1ef04
movl $0x0, -0x4c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x206d0
leaq -0x88(%rbp), %rdi
callq 0x206d0
movl -0x4c(%rbp), %eax
movl %eax, -0x25c(%rbp)
testl %eax, %eax
je 0x1ef02
jmp 0x1eef0
movl -0x25c(%rbp), %eax
subl $0x1, %eax
je 0x1ef23
jmp 0x1eefd
jmp 0x1e743
jmp 0x1ef1e
leaq -0xa0(%rbp), %rdi
callq 0x206d0
leaq -0x88(%rbp), %rdi
callq 0x206d0
jmp 0x1ef28
jmp 0x1e51d
movq %rbp, %rsp
popq %rbp
retq
movq -0xa8(%rbp), %rdi
callq 0x6780
nopw %cs:(%rax,%rax)
nop