// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/btree.c
// Function: btree_init
struct btree *
btree_init(struct wire_requestqueue * Q_lbs, uint64_t npages,
    uint64_t npagebytes, uint64_t * keylen, uint64_t * vallen, double Scost)
{
	struct btree * T;
	struct node * C;
	struct params_cookie PC;
	struct getroot_cookie GC;
	struct sync_cookie SC;
	uint64_t rootblk;
	size_t i;

	/* Sanity check: at least one of {npages, npagebytes} must be unset. */
	assert((npages == (uint64_t)(-1)) || (npagebytes == (uint64_t)(-1)));

#if SIZE_MAX < UINT64_MAX
	/* Sanity check: must be able to fit npagebytes in memory. */
	assert((npagebytes == (uint64_t)(-1)) || (npagebytes <= SIZE_MAX));

	/* Sanity check: must be able to fit npages in memory. */
	assert((npages == (uint64_t)(-1)) || (npages <= SIZE_MAX));
#endif

	/* Allocate space for the B+Tree. */
	if ((T = malloc(sizeof(struct btree))) == NULL)
		goto err0;

	/* Attach LBS request queue to the tree. */
	T->LBS = Q_lbs;

	/* Issue a PARAMS2 request. */
	PC.T = T;
	PC.failed = PC.done = 0;
	if (proto_lbs_request_params2(T->LBS, callback_params, &PC)) {
		warnp("Failed to send PARAMS2 request");
		goto err1;
	}
	if (events_spin(&PC.done) || PC.failed) {
		warnp("LBS PARAMS2 request failed");
		goto err1;
	}

	/* If we have neither npages nor npagebytes, set a default. */
	if ((npages == (uint64_t)(-1)) && (npagebytes == (uint64_t)(-1))) {
#if 128 * 1024 * 1024 < SIZE_MAX
		/* Normal default is 128 MB. */
		npagebytes = 128 * 1024 * 1024;
#else
		/* Set a smaller default size for systems with a tiny size_t. */
		npagebytes = SIZE_MAX;
#endif
	}

	/* Figure out how many pages to use and sanity-check. */
	if (npagebytes != (uint64_t)(-1)) {
		npages = npagebytes / T->pagelen;
		if ((npages < 1024) || (npages > 1024 * 1024 * 1024)) {
			warn0("Cache size in pages must be in [2^10, 2^30]");
			goto err1;
		}
	}
	T->poolsz = (size_t)npages;

	/* Set default key/value lengths if necessary. */
	if (*keylen == (uint64_t)(-1)) {
		if (T->pagelen < 1024)
			*keylen = 64;
		else if (T->pagelen < 2048)
			*keylen = 128;
		else
			*keylen = 255;
	}
	if (*vallen == (uint64_t)(-1)) {
		if (T->pagelen < 1024)
			*vallen = 96;
		else if (T->pagelen < 2048)
			*vallen = 192;
		else
			*vallen = 255;
	}

	/* Sanity-check key and value lengths. */
	if (*keylen + *vallen + 2 > T->pagelen / 3) {
		warn0("Key or value lengths too large for page size");
		goto err1;
	}
	if (*keylen * 3 + 3 + SERIALIZE_PERCHILD * 4 + SERIALIZE_OVERHEAD >
	    T->pagelen * 2 / 3) {
		warn0("Key length too large for page size");
		goto err1;
	}

	/* Create a page pool. */
	if ((T->P = pool_init(T->poolsz,
	    offsetof(struct node, pool_cookie))) == NULL)
		goto err1;

	/* No root nodes yet. */
	T->root_shadow = T->root_dirty = NULL;

	/*
	 * Try to find a root node by scanning backwards from the last block
	 * the block store reports having present.
	 */
	for (rootblk = PC.lastblk; rootblk < T->nextblk; rootblk--) {
		/*
		 * Create a node.  If we keep this node, we will fill in the
		 * oldestleaf and pagesize values later.
		 */
		if ((T->root_dirty = node_alloc(rootblk, (uint64_t)(-1),
		    (uint32_t)(-1))) == NULL) {
			warnp("Failed to allocate node");
			goto err2;
		}
		T->root_shadow = T->root_dirty;

		/* Page in the node data. */
		GC.done = 0;
		if (btree_node_fetch_try(T, T->root_dirty,
		    callback_getroot, &GC)) {
			warnp("Failed to GET root page");
			goto err3;
		}

		/* Wait until we've finished fetching. */
		if (events_spin(&GC.done)) {
			warnp("Error reading root page");

			/*
			 * If events_spin failed, we don't know what state
			 * the root node is in, so we can't safely free it.
			 */
			goto err1;
		}

		/* Is this a root node? */
		if (node_present(T->root_dirty) && T->root_dirty->root)
			break;

		/* Not a root node; free this and try the next one. */
		btree_node_destroy(T, T->root_dirty);
		T->root_dirty = NULL;
	}

	/* If we have found a root node, finish up initialization. */
	if (T->root_dirty != NULL) {
		/* Record the size of the serialized node. */
		T->root_dirty->pagesize =
		    (uint32_t)serialize_size(T->root_dirty);

		/* Figure out the oldestleaf. */
		if (T->root_dirty->type == NODE_TYPE_PARENT) {
			for (i = 0; i <= T->root_dirty->nkeys; i++) {
				C = T->root_dirty->v.children[i];
				if (C->oldestleaf <
				    T->root_dirty->oldestleaf)
					T->root_dirty->oldestleaf =
					    C->oldestleaf;
			}
		} else {
			T->root_dirty->oldestleaf = T->root_dirty->pagenum;
		}

		/* The oldest not-being-cleaned leaf is the oldest leaf. */
		T->root_dirty->oldestncleaf = T->root_dirty->oldestleaf;

		/* Figure out how many pages we're using. */
		T->npages = T->nextblk - T->root_dirty->oldestleaf;

		/* This is also our shadow root. */
		T->root_shadow = T->root_dirty;
		btree_node_lock(T, T->root_shadow);

		/* We have a root! */
		goto gotroot;
	}

	/* If we had any pages, one of them should have been a root. */
	if (T->nextblk > 0) {
		warn0("Could not find root B+Tree node");
		goto err2;
	}

	/* Create a dirty leaf node. */
	if ((T->root_dirty = btree_node_mkleaf(T, 0, NULL)) == NULL)
		goto err2;

	/* Mark the node as a root. */
	T->root_dirty->root = 1;
	btree_node_lock(T, T->root_dirty);

	/* This tree contains 1 node. */
	T->nnodes = 1;

	/* Sync the (trivial) dirty tree out. */
	SC.done = 0;
	if (btree_sync(T, callback_sync, &SC)) {
		warnp("Failed to APPEND root page");
		goto err4;
	}

	/* Wait until we've finished writing. */
	if (events_spin(&SC.done)) {
		warnp("Error writing root page");

		/*
		 * If events_spin failed, we don't know what state
		 * the root nodes are in, so we can't free them.
		 */
		goto err1;
	}

	/*
	 * If the next writable block is not block #1, we're using a sparse
	 * block space and need to disable cleaning (see comment above).
	 */
	if (T->nextblk != 1)
		Scost = 0.0;

gotroot:
	/* Schedule a callback to invoke FREE. */
	if ((T->gc_timer =
	    events_timer_register(callback_gc, T, &free_time)) == NULL) {
		btree_free(T);
		goto err0;
	}

	/* Start background cleaning. */
	if ((T->cstate = btree_cleaning_start(T, Scost)) == NULL) {
		warnp("Cannot start background cleaning");
		exit(1);
	}

	/* Success! */
	return (T);

	/* Root-creation path. */
err4:
	btree_node_unlock(T, T->root_dirty);
	btree_node_destroy(T, T->root_dirty);
	goto err2;

	/* Root-fetching path. */
err3:
	node_free(T->root_dirty);

	/* Merged exit path. */
err2:
	pool_free(T->P);
err1:
	free(T);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movsd %xmm0, -0x38(%rbp)
cmpq $-0x1, -0x18(%rbp)
je 0x7102
cmpq $-0x1, -0x20(%rbp)
jne 0x7104
jmp 0x7123
leaq 0x17ad2(%rip), %rdi     # 0x1ebdd
leaq 0x17b08(%rip), %rsi     # 0x1ec1a
movl $0xa3, %edx
leaq 0x17b04(%rip), %rcx     # 0x1ec22
callq 0x21d0
movl $0x58, %edi
callq 0x22a0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x713c
jmp 0x78df
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x793(%rip), %rsi       # 0x7900
leaq -0x60(%rbp), %rdx
callq 0x1a1e0
cmpl $0x0, %eax
je 0x71b7
jmp 0x717d
callq 0x20a0
cmpl $0x0, (%rax)
je 0x71a2
leaq 0x17afd(%rip), %rdi     # 0x1ec8b
movb $0x0, %al
callq 0x180a0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x71b0
leaq 0x17ae2(%rip), %rdi     # 0x1ec8b
movb $0x0, %al
callq 0x182f0
jmp 0x71b2
jmp 0x78d6
leaq -0x60(%rbp), %rdi
addq $0x14, %rdi
callq 0x10e50
cmpl $0x0, %eax
jne 0x71cf
cmpl $0x0, -0x50(%rbp)
je 0x720b
jmp 0x71d1
callq 0x20a0
cmpl $0x0, (%rax)
je 0x71f6
leaq 0x17ac8(%rip), %rdi     # 0x1ecaa
movb $0x0, %al
callq 0x180a0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x7204
leaq 0x17aad(%rip), %rdi     # 0x1ecaa
movb $0x0, %al
callq 0x182f0
jmp 0x7206
jmp 0x78d6
cmpq $-0x1, -0x18(%rbp)
jne 0x7221
cmpq $-0x1, -0x20(%rbp)
jne 0x7221
movq $0x8000000, -0x20(%rbp) # imm = 0x8000000
cmpq $-0x1, -0x20(%rbp)
je 0x726f
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movq %rax, -0x18(%rbp)
cmpq $0x400, -0x18(%rbp)     # imm = 0x400
jb 0x724d
cmpq $0x40000000, -0x18(%rbp) # imm = 0x40000000
jbe 0x726d
jmp 0x724f
leaq 0x16ff1(%rip), %rdi     # 0x1e247
movb $0x0, %al
callq 0x182f0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x78d6
jmp 0x726f
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
cmpq $-0x1, (%rax)
jne 0x72c8
movq -0x40(%rbp), %rax
cmpq $0x400, (%rax)          # imm = 0x400
jae 0x729f
movq -0x28(%rbp), %rax
movq $0x40, (%rax)
jmp 0x72c6
movq -0x40(%rbp), %rax
cmpq $0x800, (%rax)          # imm = 0x800
jae 0x72b9
movq -0x28(%rbp), %rax
movq $0x80, (%rax)
jmp 0x72c4
movq -0x28(%rbp), %rax
movq $0xff, (%rax)
jmp 0x72c6
jmp 0x72c8
movq -0x30(%rbp), %rax
cmpq $-0x1, (%rax)
jne 0x7315
movq -0x40(%rbp), %rax
cmpq $0x400, (%rax)          # imm = 0x400
jae 0x72ec
movq -0x30(%rbp), %rax
movq $0x60, (%rax)
jmp 0x7313
movq -0x40(%rbp), %rax
cmpq $0x800, (%rax)          # imm = 0x800
jae 0x7306
movq -0x30(%rbp), %rax
movq $0xc0, (%rax)
jmp 0x7311
movq -0x30(%rbp), %rax
movq $0xff, (%rax)
jmp 0x7313
jmp 0x7315
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
addq (%rcx), %rax
addq $0x2, %rax
movq %rax, -0x80(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x80(%rbp), %rax
cmpq %rcx, %rax
jbe 0x7368
jmp 0x734a
leaq 0x17974(%rip), %rdi     # 0x1ecc5
movb $0x0, %al
callq 0x182f0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x78d6
movq -0x28(%rbp), %rax
imulq $0x3, (%rax), %rax
addq $0x3, %rax
addq $0x50, %rax
addq $0xa, %rax
movq %rax, -0x88(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
shlq %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
jbe 0x73c6
jmp 0x73a8
leaq 0x17943(%rip), %rdi     # 0x1ecf2
movb $0x0, %al
callq 0x182f0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x78d6
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x30, %esi
callq 0x18e30
movq -0x40(%rbp), %rcx
movq %rax, 0x30(%rcx)
cmpq $0x0, %rax
jne 0x73eb
jmp 0x78d6
movq -0x40(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x40(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x58(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq -0x40(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x7594
movq -0x70(%rbp), %rdi
movq $-0x1, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xfa70
movq -0x40(%rbp), %rcx
movq %rax, 0x28(%rcx)
cmpq $0x0, %rax
jne 0x747c
jmp 0x7442
callq 0x20a0
cmpl $0x0, (%rax)
je 0x7467
leaq 0x178c2(%rip), %rdi     # 0x1ed15
movb $0x0, %al
callq 0x180a0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x7475
leaq 0x178a7(%rip), %rdi     # 0x1ed15
movb $0x0, %al
callq 0x182f0
jmp 0x7477
jmp 0x78c9
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, -0x64(%rbp)
movq -0x40(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rsi
leaq 0x4ca(%rip), %rdx       # 0x7970
leaq -0x64(%rbp), %rcx
callq 0xc2a0
cmpl $0x0, %eax
je 0x74f0
jmp 0x74b6
callq 0x20a0
cmpl $0x0, (%rax)
je 0x74db
leaq 0x17866(%rip), %rdi     # 0x1ed2d
movb $0x0, %al
callq 0x180a0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x74e9
leaq 0x1784b(%rip), %rdi     # 0x1ed2d
movb $0x0, %al
callq 0x182f0
jmp 0x74eb
jmp 0x78bc
leaq -0x64(%rbp), %rdi
callq 0x10e50
cmpl $0x0, %eax
je 0x753a
jmp 0x7500
callq 0x20a0
cmpl $0x0, (%rax)
je 0x7525
leaq 0x17834(%rip), %rdi     # 0x1ed45
movb $0x0, %al
callq 0x180a0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x7533
leaq 0x17819(%rip), %rdi     # 0x1ed45
movb $0x0, %al
callq 0x182f0
jmp 0x7535
jmp 0x78d6
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x7990
cmpl $0x0, %eax
je 0x7566
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movb 0x1c(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x7566
jmp 0x7594
movq -0x40(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0xc2e0
movq -0x40(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x70(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x740b
movq -0x40(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x76b1
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0xecb0
movl %eax, %ecx
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movl %ecx, 0x18(%rax)
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movb 0x1c(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x7640
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x28(%rcx), %rcx
cmpq 0x38(%rcx), %rax
ja 0x763e
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x48(%rax), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x40(%rbp), %rcx
movq 0x28(%rcx), %rcx
cmpq 0x8(%rcx), %rax
jae 0x762e
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x7630
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x75da
jmp 0x7657
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rcx
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
subq 0x8(%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x40(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x79d0
jmp 0x77fe
movq -0x40(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jbe 0x76dc
jmp 0x76be
leaq 0x17698(%rip), %rdi     # 0x1ed5d
movb $0x0, %al
callq 0x182f0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x78c9
movq -0x40(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rcx
movq %r9, %r8
movq $0x0, (%rsp)
callq 0xbe40
movq -0x40(%rbp), %rcx
movq %rax, 0x28(%rcx)
cmpq $0x0, %rax
jne 0x7712
jmp 0x78c9
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movb 0x1c(%rax), %cl
andb $-0x11, %cl
orb $0x10, %cl
movb %cl, 0x1c(%rax)
movq -0x40(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x79d0
movq -0x40(%rbp), %rax
movq $0x1, 0x48(%rax)
movl $0x0, -0x68(%rbp)
movq -0x40(%rbp), %rdi
leaq 0x2ab(%rip), %rsi       # 0x7a00
leaq -0x68(%rbp), %rdx
callq 0xa230
cmpl $0x0, %eax
je 0x779f
jmp 0x7765
callq 0x20a0
cmpl $0x0, (%rax)
je 0x778a
leaq 0x17607(%rip), %rdi     # 0x1ed7d
movb $0x0, %al
callq 0x180a0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x7798
leaq 0x175ec(%rip), %rdi     # 0x1ed7d
movb $0x0, %al
callq 0x182f0
jmp 0x779a
jmp 0x7898
leaq -0x68(%rbp), %rdi
callq 0x10e50
cmpl $0x0, %eax
je 0x77e9
jmp 0x77af
callq 0x20a0
cmpl $0x0, (%rax)
je 0x77d4
leaq 0x175d8(%rip), %rdi     # 0x1ed98
movb $0x0, %al
callq 0x180a0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x77e2
leaq 0x175bd(%rip), %rdi     # 0x1ed98
movb $0x0, %al
callq 0x182f0
jmp 0x77e4
jmp 0x78d6
movq -0x40(%rbp), %rax
cmpq $0x1, 0x10(%rax)
je 0x77fc
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
jmp 0x77fe
movq -0x40(%rbp), %rsi
leaq 0x217(%rip), %rdi       # 0x7a20
leaq 0x17620(%rip), %rdx     # 0x1ee30
callq 0x12560
movq -0x40(%rbp), %rcx
movq %rax, 0x38(%rcx)
cmpq $0x0, %rax
jne 0x7831
movq -0x40(%rbp), %rdi
callq 0x7ab0
jmp 0x78df
movq -0x40(%rbp), %rdi
movsd -0x38(%rbp), %xmm0
callq 0x9180
movq -0x40(%rbp), %rcx
movq %rax, 0x40(%rcx)
cmpq $0x0, %rax
jne 0x788e
jmp 0x784f
callq 0x20a0
cmpl $0x0, (%rax)
je 0x7874
leaq 0x17550(%rip), %rdi     # 0x1edb0
movb $0x0, %al
callq 0x180a0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x7882
leaq 0x17535(%rip), %rdi     # 0x1edb0
movb $0x0, %al
callq 0x182f0
jmp 0x7884
movl $0x1, %edi
callq 0x2380
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x78e7
movq -0x40(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x7b70
movq -0x40(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0xc2e0
jmp 0x78c9
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0xfb50
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x19170
movq -0x40(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)