// File: /workspace/github_c_makefile_star2_O3/sharpyfox[P]citrusleaf-client/tests/key_c/src/key.c
// Function: do_key_test
int 
do_key_test ( uint n_keys, uint n_reads, uint n_writes, uint n_deletes, uint n_threads, uint key_len, uint value_len, uint n_ops, uint writeratio, bool parallel)
{

	if((int)n_threads < 1)
        {
                fprintf(stderr, "Error: Not enough threads\n");
                exit(1);
     	 }

	pthread_t	*thr_array = malloc(sizeof(pthread_t) * n_threads);
	g_p_read_histogram = histogram_create();
	g_p_write_histogram = histogram_create();
	g_p_delete_histogram = histogram_create();
    g_p_read_timeout_histogram = histogram_create();
    g_p_write_timeout_histogram = histogram_create();
    g_p_delete_timeout_histogram = histogram_create();
    if (g_p_read_histogram == NULL || g_p_write_histogram == NULL || g_p_delete_histogram == NULL ||
    	g_p_read_timeout_histogram == NULL || g_p_write_timeout_histogram == NULL ||  g_p_delete_timeout_histogram == NULL) {
        fprintf(stderr," cannot create histograms \n");
        return -1;
    }
	// Create a cluster object that all requests will happen on
	cl_cluster *asc = citrusleaf_cluster_create();
	if (g_config.host_direct == true)
		citrusleaf_cluster_follow(asc, false);
	citrusleaf_cluster_add_host(asc, g_config.host, g_config.port, 0);
	fprintf(stderr," client settled, starting test\n");
	
	if (g_config.verbose) fprintf(stderr, "enter do key test: threads: %d value len: %d\n",n_threads,value_len);

	//read and write operation in some x:y ratio..
	if(n_ops == 0) {
		if (n_writes) {

			if (g_config.verbose) fprintf(stderr,"starting write loop: writing %d elements with %d threads\n",n_writes, n_threads);
			write_work  *write_array = malloc(sizeof(write_work)*n_threads);
			uint writes_per_thread = n_writes / n_threads;
			uint total_writes = 0;
			atomic_int *completed = atomic_int_create(0);
			atomic_int *gen_errs = atomic_int_create(0);

			void *c_th = start_counter_thread( "writes: ",completed,gen_errs);		

			for (uint i=0;i<n_threads;i++) {			
				write_work *work = &write_array[i];

				work->completed = completed;
				work->gen_errs = gen_errs;
				work->key_len = key_len;
				work->value_len = value_len;			
				
				work->value_len = value_len;
				work->asc = asc;
				work->id = i;

				// set all keys in parallel on all threads
				if (parallel) {
					work->start_key = g_config.zero;
					work->n_writes = writes_per_thread;
				}
				else {
					work->start_key = total_writes + g_config.zero;
					if (i == n_threads-1) {// last time! use all remaining writes
						work->n_writes = n_writes - total_writes;
					}
					else {                // regular loop	
						work->n_writes = writes_per_thread;
					}
					total_writes += work->n_writes;
				}

				pthread_create(&thr_array[i], 0, write_fn, work); 
			}

			// wait for threads to complete
			for (uint i=0;i<n_threads;i++) {
				void *value_ptr;
				pthread_join(thr_array[i], &value_ptr);
			}
			stop_counter_thread(c_th);
			free(write_array);
			atomic_int_destroy(completed);
		}

                if (n_reads) {
                        if (g_config.verbose) fprintf(stderr,"starting read loop: reading %d elements with %d threads\n",n_reads,n_threads);
                        read_work  *read_array = malloc(sizeof(read_work)*n_threads);
                        uint reads_per_thread = n_reads / n_threads;
                        uint total_reads = 0;
                        atomic_int *completed = atomic_int_create(0);

                        void *c_th = start_counter_thread( "reads: ", completed, 0);
                        for (uint i=0;i<n_threads;i++) {
                                read_work *work = &read_array[i];
                                work->completed = completed;
                                work->start_key = g_config.zero;
                                work->n_keys = n_keys;
                                work->key_len = key_len;
                                work->value_len = value_len;
                                work->asc = asc;
                                work->id = i;

                                if (i == n_threads-1) // last time! use all remaining writes
                                        work->n_reads = n_reads - total_reads;
                                else                 // regular loop    
                                        work->n_reads = reads_per_thread;
                                total_reads += work->n_reads;
                                pthread_create(&thr_array[i], 0, g_config.n_batch == 0 ? read_fn : read_batch_fn , work);
                        }
                        // wait for threads to complete
                        for (uint i=0;i<n_threads;i++) {
                                void *value_ptr;
                                pthread_join(thr_array[i], &value_ptr);
                        }
                        stop_counter_thread(c_th);
                        free(read_array);
                        atomic_int_destroy(completed);
                }

		if (n_deletes) {

			if (g_config.verbose) fprintf(stderr,"starting write loop: writing %d elements with %d threads\n",n_deletes, n_threads);
			delete_work  *delete_array = malloc(sizeof(delete_work)*n_threads);
			uint deletes_per_thread = n_deletes / n_threads;
			uint total_deletes = 0;
			atomic_int *completed = atomic_int_create(0);
			atomic_int *gen_errs = atomic_int_create(0);

			void *c_th = start_counter_thread( "deletes: ",completed,gen_errs);

			for (uint i=0;i<n_threads;i++) {
				delete_work *work = &delete_array[i];

				work->completed = completed;
				work->gen_errs = gen_errs;
				work->key_len = key_len;
				work->value_len = value_len;

				work->value_len = value_len;
				work->asc = asc;
				work->id = i;
				// set all keys in parallel on all threads
				if (parallel) {
					work->start_key = g_config.zero;
					work->n_deletes = deletes_per_thread;
				}
				else {
					work->start_key = total_deletes + g_config.zero;
					if (i == n_threads-1) {// last time! use all remaining writes
						work->n_deletes = n_deletes - total_deletes;
					}
					else {                // regular loop   
						work->n_deletes = deletes_per_thread;
					}
					total_deletes += work->n_deletes;
				}

				pthread_create(&thr_array[i], 0, delete_fn, work);
			}

			// wait for threads to complete
			for (uint i=0;i<n_threads;i++) {
				void *value_ptr;
				pthread_join(thr_array[i], &value_ptr);
			}
			stop_counter_thread(c_th);
			free(delete_array);
			atomic_int_destroy(completed);
		}
	}
	else {
		if((int)n_ops < 1) {
			fprintf(stderr, "Error: Invalid number of operation.\n");
			exit(1);
		}
		if (g_config.verbose) fprintf(stderr,"starting writing and reading in ratio %d : %d\n",writeratio, 100-writeratio);
			
		op_work  *op_array = malloc(sizeof(op_work)*n_threads);
		uint ops_per_thread = n_ops / n_threads;
		uint total_ops = 0;
		atomic_int *rcompleted = atomic_int_create(0);
		atomic_int *wcompleted = atomic_int_create(0);
		atomic_int *gen_errs = atomic_int_create(0);

		void *c_rth = start_counter_thread( "reads: ",rcompleted,gen_errs);		
		void *c_wth = start_counter_thread( "writes: ",wcompleted,gen_errs);		

		writeratio = my_min(100, writeratio);
		writeratio = my_max(0, (int)writeratio);
		for (uint i=0;i<n_threads;i++) {			
			op_work *work = &op_array[i];
			work->rcompleted = rcompleted;
			work->wcompleted = wcompleted;
			work->gen_errs = gen_errs;
			work->key_len = key_len;
			work->value_len = value_len;			
			work->start_key = g_config.zero;
			work->value_len = value_len;
			work->asc = asc;
			work->id = i;
			work->writeratio = writeratio;
			work->n_keys = n_keys;

			if (i == n_threads-1) {// last time! use all remaining writes
				work->n_ops = n_ops - total_ops;
			}
			else {                // regular loop	
				work->n_ops = ops_per_thread;
			}

			total_ops += work->n_ops;

			pthread_create(&thr_array[i], 0, ops_fn, work); 
		}
		
		// wait for threads to complete
		for (uint i=0;i<n_threads;i++) {
			void *value_ptr;
			pthread_join(thr_array[i], &value_ptr);
		}
		stop_counter_thread(c_rth);
		stop_counter_thread(c_wth);
		free(op_array);
		atomic_int_destroy(wcompleted);
		atomic_int_destroy(rcompleted);
	}
	
    histogram_dump(g_p_write_histogram,  "writes");
    histogram_dump(g_p_write_timeout_histogram,  "write timeouts");
    histogram_dump(g_p_read_histogram,  "reads");
    histogram_dump(g_p_read_timeout_histogram,  "read timeouts");
    histogram_dump(g_p_delete_histogram,  "deletes");
    histogram_dump(g_p_delete_timeout_histogram,  "delete timeouts");

	free(thr_array);
	citrusleaf_cluster_destroy(asc);

	return(-1);	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
testl %r8d, %r8d
movl %ecx, 0x40(%rsp)
movl %edx, 0x8(%rsp)
jle 0x5b52
movl %r8d, %r15d
movl %edi, %ebp
movl %r9d, %ebx
movl %r8d, %r12d
movl %esi, %r14d
leaq (,%r15,8), %rdi
movq %rdi, 0x38(%rsp)
callq 0x22f0
movq %rax, %r13
xorl %eax, %eax
callq 0x5b5c
movq %rax, 0x17071(%rip)     # 0x1c398
xorl %eax, %eax
callq 0x5b5c
movq %rax, 0x17073(%rip)     # 0x1c3a8
xorl %eax, %eax
callq 0x5b5c
movq %rax, 0x17075(%rip)     # 0x1c3b8
xorl %eax, %eax
callq 0x5b5c
movq %rax, 0x1703f(%rip)     # 0x1c390
xorl %eax, %eax
callq 0x5b5c
movq %rax, 0x17041(%rip)     # 0x1c3a0
xorl %eax, %eax
callq 0x5b5c
movq 0x1703a(%rip), %xmm0    # 0x1c3a8
movq 0x17022(%rip), %xmm1    # 0x1c398
movq 0x1703a(%rip), %xmm2    # 0x1c3b8
cmpq $0x0, 0x1701a(%rip)     # 0x1c3a0
movq %rax, 0x17023(%rip)     # 0x1c3b0
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq 0x16ff7(%rip), %xmm0    # 0x1c390
sete %cl
testq %rax, %rax
sete %al
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm1
pcmpeqd %xmm0, %xmm2
movdqa %xmm1, %xmm0
shufps $0x88, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[0,2]
shufps $0xdd, %xmm2, %xmm0     # xmm0 = xmm0[1,3],xmm2[1,3]
andps %xmm0, %xmm1
movmskps %xmm1, %edx
testl %edx, %edx
setne %dl
orb %cl, %al
orb %dl, %al
cmpb $0x1, %al
jne 0x53db
callq 0x2e0c
jmp 0x5aba
movq %r13, 0x28(%rsp)
movl %r14d, 0x20(%rsp)
movl %ebp, 0x5c(%rsp)
movl %ebx, 0x1c(%rsp)
callq 0x8252
leaq 0x16f37(%rip), %r14     # 0x1c330
movq %rax, %rbx
cmpb $0x1, 0x2a(%r14)
jne 0x540d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x91f2
movq (%r14), %rsi
movswl 0x8(%r14), %edx
movl 0xb8(%rsp), %r13d
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x8510
movq 0x14bb2(%rip), %rbp     # 0x19fe0
leaq 0xd94c(%rip), %rdi      # 0x12d81
movl $0x1f, %esi
movl $0x1, %edx
movq (%rbp), %rcx
callq 0x2550
cmpb $0x1, 0x28(%r14)
je 0x5ace
testl %r13d, %r13d
movq %rbx, 0x30(%rsp)
je 0x561c
jle 0x5b57
movl 0xc0(%rsp), %edi
cmpb $0x1, 0x28(%r14)
je 0x5aef
movq %r15, %rdi
shlq $0x6, %rdi
callq 0x22f0
movq %rax, 0x38(%rsp)
movl %r13d, %eax
xorl %edx, %edx
xorl %edi, %edi
xorl %r14d, %r14d
divl %r12d
movl %eax, 0x8(%rsp)
callq 0x300c
xorl %edi, %edi
movq %rax, %rbx
callq 0x300c
xorl %edi, %edi
movq %rax, %rbp
callq 0x300c
leaq 0xd990(%rip), %rdi      # 0x12e4b
movq %rbx, %rsi
movq %rax, %rdx
movq %rax, %r13
movq %rbx, 0x20(%rsp)
callq 0x315f
leaq 0xd934(%rip), %rdi      # 0x12e09
movq %rbp, %rsi
movq %r13, %rdx
movq %rax, 0x60(%rsp)
movq %rbp, (%rsp)
movq %r13, 0x40(%rsp)
callq 0x315f
movl 0xc0(%rsp), %ecx
movq %rax, 0x68(%rsp)
movl $0x64, %eax
movq %r15, 0x10(%rsp)
movq 0x28(%rsp), %rbp
movq 0x38(%rsp), %r13
movl 0x1c(%rsp), %r15d
movl 0x5c(%rsp), %ebx
cmpl $0x64, %ecx
cmovll %ecx, %eax
testl %eax, %eax
cmovlel %r14d, %eax
decl %r12d
movq %r12, 0x48(%rsp)
xorl %r12d, %r12d
movl %eax, 0x50(%rsp)
movq 0x20(%rsp), %rax
movq %rbp, %rdi
leaq -0x466(%rip), %rdx      # 0x50db
movq %r13, %rcx
movq %rax, 0x18(%r13)
movq (%rsp), %rax
movq %rax, 0x20(%r13)
movq 0x40(%rsp), %rax
movq %rax, 0x30(%r13)
leaq 0x16dd0(%rip), %rax     # 0x1c330
movl %r15d, 0xc(%r13)
movl 0x40(%rax), %eax
movl %eax, (%r13)
movl 0xb0(%rsp), %eax
movl %eax, 0x10(%r13)
movq 0x30(%rsp), %rax
movq %rax, 0x38(%r13)
movl 0x50(%rsp), %eax
movl %r14d, 0x14(%r13)
movl %eax, 0x28(%r13)
movl 0xb8(%rsp), %eax
movl %ebx, 0x8(%r13)
subl %r12d, %eax
cmpq %r14, 0x48(%rsp)
cmovnel 0x8(%rsp), %eax
xorl %esi, %esi
movl %eax, 0x4(%r13)
addl %eax, %r12d
callq 0x24f0
incq %r14
addq $0x40, %r13
addq $0x8, %rbp
cmpq %r14, 0x10(%rsp)
jne 0x5532
movq 0x28(%rsp), %r13
movq (%rsp), %r12
movq 0x10(%rsp), %r15
leaq 0x70(%rsp), %rbx
movq %r13, %r14
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x21f0
addq $0x8, %r14
decq %r15
jne 0x55dd
movq 0x60(%rsp), %rdi
callq 0x31bf
movq 0x68(%rsp), %rdi
callq 0x31bf
movq 0x38(%rsp), %rdi
callq 0x22a0
movq %r12, %rdi
callq 0x3037
jmp 0x5a29
cmpl $0x0, 0x8(%rsp)
movq 0x28(%rsp), %r13
movq %r12, 0x48(%rsp)
je 0x578c
cmpb $0x1, 0x28(%r14)
je 0x5af9
movq %r15, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
callq 0x22f0
movq %rax, 0x60(%rsp)
movl 0x8(%rsp), %eax
movq %r12, %rbx
xorl %edx, %edx
xorl %edi, %edi
xorl %r12d, %r12d
divl %ebx
movl %eax, 0x10(%rsp)
callq 0x300c
xorl %edi, %edi
movq %rax, %r14
callq 0x300c
leaq 0xd78e(%rip), %rdi      # 0x12e09
movq %r14, %rsi
movq %rax, %rdx
movq %rax, %rbp
movq %r14, (%rsp)
callq 0x315f
movq %r13, %r14
movq 0x60(%rsp), %r13
movq %rax, 0x68(%rsp)
leal -0x1(%rbx), %eax
xorl %ebx, %ebx
movq %rax, 0x50(%rsp)
movq (%rsp), %rax
movl 0x1c(%rsp), %ecx
movl 0xb0(%rsp), %edx
cmpb $0x0, 0xc8(%rsp)
movq %rax, 0x18(%r13)
leaq 0x16c6a(%rip), %rax     # 0x1c330
movq %rbp, 0x20(%r13)
movl %ecx, 0x8(%r13)
movq 0x30(%rsp), %rcx
movl %edx, 0xc(%r13)
movl 0x40(%rax), %eax
movq %rcx, 0x28(%r13)
movl %r12d, 0x10(%r13)
je 0x56ee
movl 0x10(%rsp), %ecx
movl %eax, (%r13)
jmp 0x5706
movl 0x8(%rsp), %ecx
addl %ebx, %eax
movl %eax, (%r13)
subl %ebx, %ecx
cmpq %r12, 0x50(%rsp)
cmovnel 0x10(%rsp), %ecx
addl %ecx, %ebx
movl %ecx, 0x4(%r13)
movq %r14, %rdi
xorl %esi, %esi
leaq -0xe41(%rip), %rdx      # 0x48d5
movq %r13, %rcx
callq 0x24f0
incq %r12
addq $0x30, %r13
addq $0x8, %r14
cmpq %r12, %r15
jne 0x56a4
movq 0x28(%rsp), %r13
leaq 0x70(%rsp), %rbx
movq %r15, %r14
movq %r13, %r12
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x21f0
addq $0x8, %r12
decq %r14
jne 0x5742
movq 0x68(%rsp), %rdi
callq 0x31bf
movq 0x60(%rsp), %rdi
callq 0x22a0
movq (%rsp), %rdi
callq 0x3037
movq 0x30(%rsp), %rbx
movq 0x48(%rsp), %r12
leaq 0x16bab(%rip), %r14     # 0x1c330
movq 0x14854(%rip), %rbp     # 0x19fe0
cmpl $0x0, 0x20(%rsp)
je 0x58ea
cmpb $0x1, 0x28(%r14)
movl 0x20(%rsp), %r14d
je 0x5b17
movq 0x38(%rsp), %rax
leaq (%rax,%rax,4), %rdi
callq 0x22f0
movq %rax, %rbx
movl %r14d, %eax
xorl %edx, %edx
xorl %edi, %edi
xorl %ebp, %ebp
divl %r12d
movl %eax, 0x10(%rsp)
callq 0x300c
leaq 0xd677(%rip), %rdi      # 0x12e4b
movq %rax, %rsi
xorl %edx, %edx
movq %rax, (%rsp)
callq 0x315f
movq %r13, %r14
movq %rbx, 0x50(%rsp)
movq %rbx, %r13
movl 0x5c(%rsp), %ebx
movq %rax, 0x38(%rsp)
leal -0x1(%r12), %eax
xorl %r12d, %r12d
movq %rax, 0x8(%rsp)
leaq 0x16b26(%rip), %rcx     # 0x1c330
movq (%rsp), %rax
movl 0x1c(%rsp), %edx
movl 0xb0(%rsp), %r8d
movl 0x40(%rcx), %edi
movq %rax, 0x18(%r13)
leaq -0x1eb8(%rip), %rax     # 0x3970
movl %edi, 0x4(%r13)
movl %ebx, 0x8(%r13)
movl %edx, 0xc(%r13)
movl 0x20(%rsp), %edx
movq 0x30(%rsp), %rdi
movl %r8d, 0x10(%r13)
subl %r12d, %edx
cmpq %rbp, 0x8(%rsp)
movq %rdi, 0x20(%r13)
movl %ebp, 0x14(%r13)
movq %r14, %rdi
cmovnel 0x10(%rsp), %edx
addl %edx, %r12d
cmpl $0x0, 0x30(%rcx)
movl %edx, (%r13)
leaq -0x13bb(%rip), %rdx     # 0x44b0
movq %r13, %rcx
cmoveq %rax, %rdx
xorl %esi, %esi
callq 0x24f0
incq %rbp
addq $0x28, %r13
addq $0x8, %r14
cmpq %rbp, %r15
jne 0x5803
movq 0x28(%rsp), %r13
movq (%rsp), %rbp
leaq 0x70(%rsp), %r14
movq %r15, %rbx
movq %r13, %r12
movq (%r12), %rdi
movq %r14, %rsi
callq 0x21f0
addq $0x8, %r12
decq %rbx
jne 0x58a1
movq 0x38(%rsp), %rdi
callq 0x31bf
movq 0x50(%rsp), %rdi
callq 0x22a0
movq %rbp, %rdi
callq 0x3037
movq 0x30(%rsp), %rbx
movq 0x48(%rsp), %r12
leaq 0x16a4d(%rip), %r14     # 0x1c330
movq 0x146f6(%rip), %rbp     # 0x19fe0
cmpl $0x0, 0x40(%rsp)
je 0x5a38
cmpb $0x1, 0x28(%r14)
je 0x5b34
movq %r15, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
callq 0x22f0
movq %rax, %r14
movl 0x40(%rsp), %eax
xorl %edx, %edx
xorl %edi, %edi
xorl %ebp, %ebp
divl %r12d
movl %eax, (%rsp)
callq 0x300c
xorl %edi, %edi
movq %rax, %rbx
callq 0x300c
leaq 0xd51a(%rip), %rdi      # 0x12e53
movq %rbx, %rsi
movq %rax, %rdx
movq %rax, %r13
movq %rbx, 0x20(%rsp)
callq 0x315f
movq 0x28(%rsp), %rbx
decl %r12d
movq %rax, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %r12, 0x48(%rsp)
xorl %r12d, %r12d
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
movl 0xb0(%rsp), %edx
cmpb $0x0, 0xc8(%rsp)
movq %rax, 0x18(%r14)
leaq 0x169a7(%rip), %rax     # 0x1c330
movq %r13, 0x20(%r14)
movl %ecx, 0x8(%r14)
movq 0x30(%rsp), %rcx
movl %edx, 0xc(%r14)
movl 0x40(%rax), %eax
movq %rcx, 0x28(%r14)
movl %ebp, 0x10(%r14)
je 0x59af
movl (%rsp), %ecx
movl %eax, (%r14)
jmp 0x59c8
movl 0x40(%rsp), %ecx
addl %r12d, %eax
movl %eax, (%r14)
subl %r12d, %ecx
cmpq %rbp, 0x48(%rsp)
cmovnel (%rsp), %ecx
addl %ecx, %r12d
movl %ecx, 0x4(%r14)
movq %rbx, %rdi
xorl %esi, %esi
leaq -0xc2a(%rip), %rdx      # 0x4dae
movq %r14, %rcx
callq 0x24f0
incq %rbp
addq $0x30, %r14
addq $0x8, %rbx
cmpq %rbp, %r15
jne 0x5966
movq 0x28(%rsp), %r13
leaq 0x70(%rsp), %rbx
movq %r13, %r14
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x21f0
addq $0x8, %r14
decq %r15
jne 0x5a01
movq 0x8(%rsp), %rdi
callq 0x31bf
movq 0x10(%rsp), %rdi
callq 0x22a0
movq 0x20(%rsp), %rdi
callq 0x3037
movq 0x30(%rsp), %rbx
movq 0x16969(%rip), %rdi     # 0x1c3a8
leaq 0xd46b(%rip), %rsi      # 0x12eb1
callq 0x5b8e
movq 0x1694e(%rip), %rdi     # 0x1c3a0
leaq 0xd45f(%rip), %rsi      # 0x12eb8
callq 0x5b8e
movq 0x16933(%rip), %rdi     # 0x1c398
leaq 0xd45b(%rip), %rsi      # 0x12ec7
callq 0x5b8e
movq 0x16918(%rip), %rdi     # 0x1c390
leaq 0xd44e(%rip), %rsi      # 0x12ecd
callq 0x5b8e
movq 0x1692d(%rip), %rdi     # 0x1c3b8
leaq 0xd449(%rip), %rsi      # 0x12edb
callq 0x5b8e
movq 0x16912(%rip), %rdi     # 0x1c3b0
leaq 0xd43e(%rip), %rsi      # 0x12ee3
callq 0x5b8e
movq %r13, %rdi
callq 0x22a0
movq %rbx, %rdi
callq 0x87cd
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbp), %rdi
movl 0xb0(%rsp), %ecx
leaq 0xd2c1(%rip), %rsi      # 0x12da1
movl %r12d, %edx
xorl %eax, %eax
callq 0x2390
jmp 0x5453
callq 0x2dc8
jmp 0x5479
movq (%rbp), %rdi
movl 0x8(%rsp), %edx
leaq 0xd2c7(%rip), %rsi      # 0x12dcf
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2390
jmp 0x563c
movq (%rbp), %rdi
leaq 0xd2f0(%rip), %rsi      # 0x12e12
movl %r14d, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2390
jmp 0x57a7
movq (%rbp), %rdi
movl 0x40(%rsp), %edx
leaq 0xd28c(%rip), %rsi      # 0x12dcf
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2390
jmp 0x5900
callq 0x2e28
callq 0x2de7