// File: /workspace/github_c_makefile_star2_O2/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 %r9d, 0x34(%rsp)
movl %ecx, 0xc(%rsp)
movl %edx, 0x38(%rsp)
movl %esi, 0x28(%rsp)
movl %edi, 0x24(%rsp)
movq %r8, 0x10(%rsp)
jle 0x53d6
movl 0x10(%rsp), %r12d
leaq (,%r12,8), %rdi
callq 0x22f0
movq %rax, %r13
xorl %eax, %eax
callq 0x543c
movq %rax, 0x157f3(%rip)     # 0x1a398
xorl %eax, %eax
callq 0x543c
movq %rax, 0x157f5(%rip)     # 0x1a3a8
xorl %eax, %eax
callq 0x543c
movq %rax, 0x157f7(%rip)     # 0x1a3b8
xorl %eax, %eax
callq 0x543c
movq %rax, 0x157c1(%rip)     # 0x1a390
xorl %eax, %eax
callq 0x543c
movq %rax, 0x157c3(%rip)     # 0x1a3a0
xorl %eax, %eax
callq 0x543c
movq 0x157bc(%rip), %xmm0    # 0x1a3a8
movq 0x157a4(%rip), %xmm1    # 0x1a398
movq 0x157bc(%rip), %xmm2    # 0x1a3b8
cmpq $0x0, 0x1579c(%rip)     # 0x1a3a0
movq %rax, 0x157a5(%rip)     # 0x1a3b0
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq 0x15779(%rip), %xmm0    # 0x1a390
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 0x4c70
movq 0x1338a(%rip), %rax     # 0x17fe0
leaq 0xc108(%rip), %rdi      # 0x10d65
movq (%rax), %rcx
pushq $0x1b
popq %rsi
pushq $0x1
popq %rdx
callq 0x2550
jmp 0x5324
callq 0x7a79
leaq 0x156b4(%rip), %rcx     # 0x1a330
movq %rax, %rbx
cmpb $0x1, 0x2a(%rcx)
jne 0x4c8f
movq %rbx, %rdi
xorl %esi, %esi
callq 0x881e
leaq 0x1569a(%rip), %r14     # 0x1a330
movl 0xb8(%rsp), %ebp
movq %rbx, %rdi
xorl %ecx, %ecx
movq (%r14), %rsi
movswl 0x8(%r14), %edx
callq 0x7d03
movq 0x1332a(%rip), %r15     # 0x17fe0
leaq 0xc0c4(%rip), %rdi      # 0x10d81
movq (%r15), %rcx
pushq $0x1f
popq %rsi
pushq $0x1
popq %rdx
callq 0x2550
cmpb $0x1, 0x28(%r14)
je 0x5336
testl %ebp, %ebp
movq %r13, 0x50(%rsp)
movq %rbx, 0x48(%rsp)
je 0x4e9d
jle 0x53fa
leaq 0x1563b(%rip), %rax     # 0x1a330
cmpb $0x1, 0x28(%rax)
pushq $0x64
popq %rbx
je 0x5358
movq %r12, %rdi
shlq $0x6, %rdi
callq 0x22f0
movq 0x10(%rsp), %r13
movq %rax, 0x58(%rsp)
movl %ebp, %eax
xorl %edx, %edx
xorl %edi, %edi
xorl %r15d, %r15d
divl %r13d
movl %eax, 0xc(%rsp)
callq 0x266c
xorl %edi, %edi
movl %ebx, %r14d
movq %rax, %rbx
callq 0x266c
xorl %edi, %edi
movq %rax, 0x18(%rsp)
callq 0x266c
leaq 0xc0fe(%rip), %rdi      # 0x10e4b
movq %rbx, %rsi
movq %rax, %rdx
movq %rax, %rbp
movq %rbx, 0x28(%rsp)
callq 0x27ba
movq 0x18(%rsp), %rsi
leaq 0xc09d(%rip), %rdi      # 0x10e09
movq %rbp, %rdx
movq %rax, 0x60(%rsp)
movq %rbp, 0x38(%rsp)
callq 0x27ba
movl 0xc0(%rsp), %ecx
movq 0x50(%rsp), %rbp
movq %rax, 0x68(%rsp)
cmpl $0x64, %ecx
cmovll %ecx, %r14d
testl %r14d, %r14d
cmovlel %r15d, %r14d
decl %r13d
xorl %ebx, %ebx
movl %r14d, 0x40(%rsp)
movq %r13, %r14
movq 0x58(%rsp), %r13
cmpq %r15, %r12
je 0x4e4c
movq 0x28(%rsp), %rax
movq %rbp, %rdi
leaq -0x447(%rip), %rdx      # 0x4980
movq %r13, %rcx
movq %rax, 0x18(%r13)
movq 0x18(%rsp), %rax
movq %rax, 0x20(%r13)
movq 0x38(%rsp), %rax
movq %rax, 0x30(%r13)
movl 0x34(%rsp), %eax
movl %eax, 0xc(%r13)
leaq 0x15541(%rip), %rax     # 0x1a330
movl 0x40(%rax), %eax
movl %eax, (%r13)
movl 0xb0(%rsp), %eax
movl %eax, 0x10(%r13)
movq 0x48(%rsp), %rax
movq %rax, 0x38(%r13)
movl 0x40(%rsp), %eax
movl %r15d, 0x14(%r13)
movl %eax, 0x28(%r13)
movl 0x24(%rsp), %eax
movl %eax, 0x8(%r13)
movl 0xb8(%rsp), %eax
subl %ebx, %eax
cmpq %r15, %r14
cmovnel 0xc(%rsp), %eax
xorl %esi, %esi
movl %eax, 0x4(%r13)
addl %eax, %ebx
callq 0x24f0
incq %r15
addq $0x40, %r13
addq $0x8, %rbp
jmp 0x4daf
movq 0x50(%rsp), %r13
leaq 0x70(%rsp), %rbx
movq %r13, %r14
subq $0x1, %r12
jb 0x4e70
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x21f0
addq $0x8, %r14
jmp 0x4e59
movq 0x60(%rsp), %rdi
callq 0x2815
movq 0x68(%rsp), %rdi
callq 0x2815
movq 0x58(%rsp), %rdi
callq 0x22a0
movq 0x18(%rsp), %rdi
callq 0x2695
jmp 0x5293
cmpl $0x0, 0x38(%rsp)
je 0x4ffc
leaq 0x15481(%rip), %rax     # 0x1a330
cmpb $0x1, 0x28(%rax)
je 0x5379
imulq $0x30, %r12, %rdi
callq 0x22f0
movq %rax, 0x60(%rsp)
movq 0x10(%rsp), %rbx
movl 0x38(%rsp), %eax
xorl %edx, %edx
xorl %edi, %edi
xorl %ebp, %ebp
divl %ebx
movl %eax, 0x40(%rsp)
callq 0x266c
xorl %edi, %edi
movq %rax, %r15
callq 0x266c
leaq 0xbf17(%rip), %rdi      # 0x10e09
movq %r15, %rsi
movq %rax, %rdx
movq %rax, %r14
movq %r15, 0x18(%rsp)
callq 0x27ba
movq 0x60(%rsp), %r15
movq %rax, 0x68(%rsp)
leal -0x1(%rbx), %eax
xorl %ebx, %ebx
movq %rax, 0x58(%rsp)
cmpq %rbp, %r12
je 0x4fab
movq 0x18(%rsp), %rax
movl 0x34(%rsp), %ecx
movl 0xb0(%rsp), %edx
cmpb $0x0, 0xc8(%rsp)
movq %rax, 0x18(%r15)
leaq 0x153eb(%rip), %rax     # 0x1a330
movq %r14, 0x20(%r15)
movl %ecx, 0x8(%r15)
movq 0x48(%rsp), %rcx
movl %edx, 0xc(%r15)
movl 0x40(%rax), %eax
movq %rcx, 0x28(%r15)
movl %ebp, 0x10(%r15)
je 0x4f6c
movl 0x40(%rsp), %ecx
movl %eax, (%r15)
jmp 0x4f83
movl 0x38(%rsp), %ecx
addl %ebx, %eax
movl %eax, (%r15)
subl %ebx, %ecx
cmpq %rbp, 0x58(%rsp)
cmovnel 0x40(%rsp), %ecx
addl %ecx, %ebx
movl %ecx, 0x4(%r15)
movq %r13, %rdi
xorl %esi, %esi
leaq -0xcbc(%rip), %rdx      # 0x42d7
movq %r15, %rcx
callq 0x24f0
incq %rbp
addq $0x30, %r15
addq $0x8, %r13
jmp 0x4f19
movq 0x50(%rsp), %r13
leaq 0x70(%rsp), %rbx
movq %r12, %r15
movq %r13, %r14
subq $0x1, %r15
jb 0x4fd2
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x21f0
addq $0x8, %r14
jmp 0x4fbb
movq 0x68(%rsp), %rdi
callq 0x2815
movq 0x60(%rsp), %rdi
callq 0x22a0
movq 0x18(%rsp), %rdi
callq 0x2695
movq 0x48(%rsp), %rbx
movq 0x12fe4(%rip), %r15     # 0x17fe0
cmpl $0x0, 0x28(%rsp)
je 0x514a
leaq 0x15322(%rip), %rax     # 0x1a330
cmpb $0x1, 0x28(%rax)
je 0x5398
imulq $0x28, %r12, %rdi
callq 0x22f0
movq %rax, %rbx
movl 0x28(%rsp), %eax
movq 0x10(%rsp), %rbp
xorl %edx, %edx
xorl %edi, %edi
xorl %r15d, %r15d
divl %ebp
movl %eax, 0x40(%rsp)
callq 0x266c
leaq 0xbe05(%rip), %rdi      # 0x10e4b
movq %rax, %rsi
xorl %edx, %edx
movq %rax, 0x18(%rsp)
callq 0x27ba
movq %r13, %r14
decl %ebp
movq %rbx, 0x38(%rsp)
movq %rbx, %r13
xorl %ebx, %ebx
movq %rax, 0x58(%rsp)
cmpq %r15, %r12
je 0x50f9
leaq 0x152b7(%rip), %rcx     # 0x1a330
movq 0x18(%rsp), %rax
movl 0x24(%rsp), %edi
movl 0xb0(%rsp), %r8d
movl 0x40(%rcx), %edx
movq %rax, 0x18(%r13)
leaq -0x1dac(%rip), %rax     # 0x32ec
movl %edx, 0x4(%r13)
movl 0x34(%rsp), %edx
movl %edi, 0x8(%r13)
movq 0x48(%rsp), %rdi
movl %edx, 0xc(%r13)
movl 0x28(%rsp), %edx
movl %r8d, 0x10(%r13)
movq %rdi, 0x20(%r13)
movl %r15d, 0x14(%r13)
movq %r14, %rdi
subl %ebx, %edx
cmpq %r15, %rbp
cmovnel 0x40(%rsp), %edx
addl %edx, %ebx
cmpl $0x0, 0x30(%rcx)
movl %edx, (%r13)
leaq -0x11ac(%rip), %rdx     # 0x3f2f
movq %r13, %rcx
cmoveq %rax, %rdx
xorl %esi, %esi
callq 0x24f0
incq %r15
addq $0x28, %r13
addq $0x8, %r14
jmp 0x5069
movq 0x50(%rsp), %r13
leaq 0x70(%rsp), %rbx
movq %r12, %r15
movq %r13, %r14
subq $0x1, %r15
jb 0x5120
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x21f0
addq $0x8, %r14
jmp 0x5109
movq 0x58(%rsp), %rdi
callq 0x2815
movq 0x38(%rsp), %rdi
callq 0x22a0
movq 0x18(%rsp), %rdi
callq 0x2695
movq 0x48(%rsp), %rbx
movq 0x12e96(%rip), %r15     # 0x17fe0
cmpl $0x0, 0xc(%rsp)
je 0x52a2
leaq 0x151d4(%rip), %rax     # 0x1a330
cmpb $0x1, 0x28(%rax)
je 0x53b7
imulq $0x30, %r12, %rdi
callq 0x22f0
movq %rax, %r14
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rbp
xorl %edx, %edx
xorl %edi, %edi
xorl %r13d, %r13d
divl %ebp
movl %eax, 0x24(%rsp)
callq 0x266c
xorl %edi, %edi
movq %rax, %rbx
callq 0x266c
leaq 0xbcb5(%rip), %rdi      # 0x10e53
movq %rbx, %rsi
movq %rax, %rdx
movq %rax, %r15
movq %rbx, 0x28(%rsp)
callq 0x27ba
movq 0x50(%rsp), %rbx
decl %ebp
movq %rax, 0x40(%rsp)
movq %r14, 0x18(%rsp)
movq %rbp, 0x10(%rsp)
xorl %ebp, %ebp
cmpq %r13, %r12
je 0x525b
movq 0x28(%rsp), %rax
movl 0x34(%rsp), %ecx
movl 0xb0(%rsp), %edx
cmpb $0x0, 0xc8(%rsp)
movq %rax, 0x18(%r14)
leaq 0x1513b(%rip), %rax     # 0x1a330
movq %r15, 0x20(%r14)
movl %ecx, 0x8(%r14)
movq 0x48(%rsp), %rcx
movl %edx, 0xc(%r14)
movl 0x40(%rax), %eax
movq %rcx, 0x28(%r14)
movl %r13d, 0x10(%r14)
je 0x521c
movl 0x24(%rsp), %ecx
movl %eax, (%r14)
jmp 0x5233
movl 0xc(%rsp), %ecx
addl %ebp, %eax
movl %eax, (%r14)
subl %ebp, %ecx
cmpq %r13, 0x10(%rsp)
cmovnel 0x24(%rsp), %ecx
addl %ecx, %ebp
movl %ecx, 0x4(%r14)
movq %rbx, %rdi
xorl %esi, %esi
leaq -0xb4f(%rip), %rdx      # 0x46f4
movq %r14, %rcx
callq 0x24f0
incq %r13
addq $0x30, %r14
addq $0x8, %rbx
jmp 0x51c9
movq 0x50(%rsp), %r13
leaq 0x70(%rsp), %rbx
movq %r13, %r14
subq $0x1, %r12
jb 0x527f
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x21f0
addq $0x8, %r14
jmp 0x5268
movq 0x40(%rsp), %rdi
callq 0x2815
movq 0x18(%rsp), %rdi
callq 0x22a0
movq 0x28(%rsp), %rdi
callq 0x2695
movq 0x48(%rsp), %rbx
movq 0x150ff(%rip), %rdi     # 0x1a3a8
leaq 0xbc01(%rip), %rsi      # 0x10eb1
callq 0x546e
movq 0x150e4(%rip), %rdi     # 0x1a3a0
leaq 0xbbf5(%rip), %rsi      # 0x10eb8
callq 0x546e
movq 0x150c9(%rip), %rdi     # 0x1a398
leaq 0xbbf1(%rip), %rsi      # 0x10ec7
callq 0x546e
movq 0x150ae(%rip), %rdi     # 0x1a390
leaq 0xbbe4(%rip), %rsi      # 0x10ecd
callq 0x546e
movq 0x150c3(%rip), %rdi     # 0x1a3b8
leaq 0xbbdf(%rip), %rsi      # 0x10edb
callq 0x546e
movq 0x150a8(%rip), %rdi     # 0x1a3b0
leaq 0xbbd4(%rip), %rsi      # 0x10ee3
callq 0x546e
movq %r13, %rdi
callq 0x22a0
movq %rbx, %rdi
callq 0x7f37
pushq $-0x1
popq %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rdi
movl 0xb0(%rsp), %ecx
leaq 0xba5a(%rip), %rsi      # 0x10da1
xorl %eax, %eax
movq 0x10(%rsp), %rdx
callq 0x2390
jmp 0x4cd6
movl 0xc0(%rsp), %edx
movq (%r15), %rdi
movl %ebx, %ecx
leaq 0xbb17(%rip), %rsi      # 0x10e82
xorl %eax, %eax
subl %edx, %ecx
callq 0x2390
jmp 0x4d02
movq (%r15), %rdi
movl 0x38(%rsp), %edx
leaq 0xba48(%rip), %rsi      # 0x10dcf
xorl %eax, %eax
movq 0x10(%rsp), %rcx
callq 0x2390
jmp 0x4eb9
movq (%r15), %rdi
movl 0x28(%rsp), %edx
leaq 0xba6c(%rip), %rsi      # 0x10e12
xorl %eax, %eax
movq 0x10(%rsp), %rcx
callq 0x2390
jmp 0x5018
movq (%r15), %rdi
movl 0xc(%rsp), %edx
leaq 0xba0a(%rip), %rsi      # 0x10dcf
xorl %eax, %eax
movq 0x10(%rsp), %rcx
callq 0x2390
jmp 0x5166
movq 0x12c03(%rip), %rax     # 0x17fe0
leaq 0xb966(%rip), %rdi      # 0x10d4a
movq (%rax), %rcx
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x2550
pushq $0x1
popq %rdi
callq 0x22c0
movq (%r15), %rcx
leaq 0xba59(%rip), %rdi      # 0x10e5d
pushq $0x24
jmp 0x53e9