// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/tests/kvlds/main.c
// Function: main
int
main(int argc, char * argv[])
{
	struct wire_requestqueue * Q;
	struct kivaloo_cookie * K;
	size_t num_pairs = 40000;

	WARNP_INIT;

	/* Check number of arguments. */
	if ((argc != 2) && (argc != 3)) {
		fprintf(stderr, "usage: test_kvlds %s %s\n", "<socketname>",
		    "[num_pairs]");
		exit(1);
	}

	/* Override the default number of pairs to test. */
	if (argc == 3) {
		if (PARSENUM(&num_pairs, argv[2])) {
			warnp("parsnum");
			exit(1);
		}
	}

	/* Open a connection to KVLDS. */
	if ((K = kivaloo_open(argv[1], &Q)) == NULL) {
		warnp("Could not connect to KVLDS daemon.");
		goto err0;
	}

	/* Get maximum key/value lengths. */
	if (doparams(Q))
		goto err1;

	/* Test B+Tree mutation code paths. */
	if (mutate(Q))
		goto err1;

	/* Test creating key-value pairs and reading them back. */
	if (createmany(Q, num_pairs))
		goto err1;

	/* Free the request queue and network connection. */
	kivaloo_close(K);

	/* Success! */
	exit(0);

err1:
	kivaloo_close(K);
err0:
	/* Failure! */
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movl %edi, %r15d
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x2570
callq 0x4c4c
leal -0x4(%r15), %eax
cmpl $-0x3, %eax
ja 0x25a4
movq 0xea78(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x8af6(%rip), %rsi      # 0xb080
leaq 0x8b08(%rip), %rdx      # 0xb099
leaq 0x8b0e(%rip), %rcx      # 0xb0a6
xorl %eax, %eax
callq 0x21b0
jmp 0x2c38
movl $0x9c40, %r14d          # imm = 0x9C40
cmpl $0x3, %r15d
jne 0x261a
callq 0x2090
movl $0x0, (%rax)
movq 0x10(%rbx), %r12
testq %r12, %r12
jne 0x25e3
leaq 0x8b12(%rip), %rdi      # 0xb0dd
leaq 0x8b15(%rip), %rsi      # 0xb0e7
leaq 0x8b30(%rip), %rcx      # 0xb109
movl $0xbb, %edx
callq 0x2140
movq %rax, %r15
leaq 0x20(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2270
movq %rax, %r14
movq (%r13), %rax
cmpq %r12, %rax
je 0x2609
cmpb $0x0, (%rax)
je 0x2610
movl $0x16, (%r15)
cmpl $0x0, (%r15)
jne 0x26d6
movq 0x8(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0x6e6c
testq %rax, %rax
jne 0x264a
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2699
leaq 0x8a7c(%rip), %rdi      # 0xb0ba
xorl %eax, %eax
callq 0x4deb
jmp 0x2c38
movq %rax, %rbx
movq 0x18(%rsp), %rdi
movl $0x0, 0xefbc(%rip)      # 0x11618
leaq 0x8ce(%rip), %rsi       # 0x2f31
xorl %edx, %edx
callq 0x504c
testl %eax, %eax
jne 0x26b5
leaq 0xefa3(%rip), %rdi      # 0x11618
callq 0x3865
orl 0xef9c(%rip), %eax      # 0x1161c
je 0x26f0
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2c18
leaq 0x8ae4(%rip), %rdi      # 0xb17b
jmp 0x26ca
movq %rax, %rbx
leaq 0x8a17(%rip), %rdi      # 0xb0ba
xorl %eax, %eax
callq 0x4ccc
movl $0x0, (%rbx)
jmp 0x2c38
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2bf2
leaq 0x8a94(%rip), %rdi      # 0xb15e
xorl %eax, %eax
callq 0x4deb
jmp 0x2c30
leaq 0x89d5(%rip), %rdi      # 0xb0b2
xorl %eax, %eax
callq 0x4ccc
movl $0x0, (%r15)
jmp 0x2c38
movq 0x18(%rsp), %r13
leaq 0x955c(%rip), %rdi      # 0xbc58
movl $0x3, %esi
callq 0x4f10
movq %rax, %r15
leaq 0x9569(%rip), %rdi      # 0xbc79
movl $0x5, %esi
callq 0x4f10
movq %rax, %r12
movdqa 0x88eb(%rip), %xmm0     # 0xb010
movdqa 0x88f3(%rip), %xmm1     # 0xb020
movdqa 0x88fb(%rip), %xmm2     # 0xb030
movdqa 0x8903(%rip), %xmm3     # 0xb040
xorl %eax, %eax
movdqa 0x8909(%rip), %xmm6     # 0xb050
pshufd $0xa0, %xmm6, %xmm4     # xmm4 = xmm6[0,0,2,2]
movdqa 0x890c(%rip), %xmm5     # 0xb060
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
movdqa 0x890f(%rip), %xmm7     # 0xb070
movdqa %xmm3, %xmm8
pxor %xmm5, %xmm8
pshufd $0xa0, %xmm8, %xmm9     # xmm9 = xmm8[0,0,2,2]
movdqa %xmm4, %xmm10
pcmpgtd %xmm9, %xmm10
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
pcmpeqd %xmm6, %xmm8
pand %xmm10, %xmm8
pshuflw $0xe8, %xmm8, %xmm9     # xmm9 = xmm8[0,2,2,3,4,5,6,7]
packssdw %xmm9, %xmm9
movd %xmm9, %ecx
testb $0x1, %cl
je 0x27a4
movb %al, 0x20(%rsp,%rax)
packssdw %xmm8, %xmm8
packssdw %xmm8, %xmm8
movd %xmm8, %ecx
shrl $0x10, %ecx
testb $0x1, %cl
je 0x27c2
leal 0x1(%rax), %ecx
movb %cl, 0x21(%rsp,%rax)
movdqa %xmm2, %xmm8
pxor %xmm5, %xmm8
pshufd $0xa0, %xmm8, %xmm9     # xmm9 = xmm8[0,0,2,2]
movdqa %xmm4, %xmm10
pcmpgtd %xmm9, %xmm10
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
pcmpeqd %xmm6, %xmm8
pand %xmm10, %xmm8
packssdw %xmm8, %xmm9
packssdw %xmm9, %xmm9
pextrw $0x2, %xmm9, %ecx
testb $0x1, %cl
je 0x2808
leal 0x2(%rax), %ecx
movb %cl, 0x22(%rsp,%rax)
pshufhw $0x84, %xmm8, %xmm8     # xmm8 = xmm8[0,1,2,3,4,5,4,6]
packssdw %xmm8, %xmm8
pextrw $0x3, %xmm8, %ecx
testb $0x1, %cl
je 0x2825
leal 0x3(%rax), %ecx
movb %cl, 0x23(%rsp,%rax)
movdqa %xmm1, %xmm8
pxor %xmm5, %xmm8
pshufd $0xa0, %xmm8, %xmm9     # xmm9 = xmm8[0,0,2,2]
movdqa %xmm4, %xmm10
pcmpgtd %xmm9, %xmm10
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
pcmpeqd %xmm6, %xmm8
pand %xmm10, %xmm8
pshuflw $0xe8, %xmm8, %xmm9     # xmm9 = xmm8[0,2,2,3,4,5,6,7]
packssdw %xmm9, %xmm9
pextrw $0x4, %xmm9, %ecx
testb $0x1, %cl
je 0x286c
leal 0x4(%rax), %ecx
movb %cl, 0x24(%rsp,%rax)
packssdw %xmm8, %xmm8
packssdw %xmm8, %xmm8
pextrw $0x5, %xmm8, %ecx
testb $0x1, %cl
je 0x2888
leal 0x5(%rax), %ecx
movb %cl, 0x25(%rsp,%rax)
movdqa %xmm0, %xmm8
pxor %xmm5, %xmm8
pshufd $0xa0, %xmm8, %xmm9     # xmm9 = xmm8[0,0,2,2]
movdqa %xmm4, %xmm10
pcmpgtd %xmm9, %xmm10
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
pcmpeqd %xmm6, %xmm8
pand %xmm10, %xmm8
packssdw %xmm8, %xmm9
packssdw %xmm9, %xmm9
pextrw $0x6, %xmm9, %ecx
testb $0x1, %cl
je 0x28ce
leal 0x6(%rax), %ecx
movb %cl, 0x26(%rsp,%rax)
pshufhw $0x84, %xmm8, %xmm8     # xmm8 = xmm8[0,1,2,3,4,5,4,6]
packssdw %xmm8, %xmm8
pextrw $0x7, %xmm8, %ecx
testb $0x1, %cl
je 0x28eb
leal 0x7(%rax), %ecx
movb %cl, 0x27(%rsp,%rax)
addq $0x8, %rax
paddq %xmm7, %xmm3
paddq %xmm7, %xmm2
paddq %xmm7, %xmm1
paddq %xmm7, %xmm0
cmpq $0x68, %rax
jne 0x2761
leaq 0x20(%rsp), %rdi
movl $0x64, %esi
callq 0x4f10
movq %rax, %rbp
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2f4c
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x2f4c
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x309e
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
callq 0x3175
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
callq 0x3175
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x320c
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x309e
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x320c
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x32e3
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x32e3
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x33bb
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x33bb
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x32e3
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x33bb
testl %eax, %eax
jne 0x2bfe
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2fe4
testl %eax, %eax
jne 0x2bfe
movq %rbp, %rdi
callq 0x2040
movq %r12, %rdi
callq 0x2040
movq %r15, %rdi
callq 0x2040
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq (,%r14,8), %rdi
callq 0x21e0
movq %rax, %r15
testq %r14, %r14
jne 0x2c42
movl $0x0, 0xea36(%rip)      # 0x11618
movq $0x0, 0xea33(%rip) # 0x11620
jmp 0x2ce7
movq %rax, %r14
leaq 0x8562(%rip), %rdi      # 0xb15e
jmp 0x2c22
movq %rbp, %rdi
callq 0x2040
movq %r12, %rdi
callq 0x2040
movq %r15, %rdi
callq 0x2040
jmp 0x2c30
movq %rax, %r14
leaq 0x8559(%rip), %rdi      # 0xb17b
xorl %eax, %eax
callq 0x4ccc
movl $0x0, (%r14)
movq %rbx, %rdi
callq 0x6fb5
movl $0x1, %edi
callq 0x22b0
leaq 0x8792(%rip), %r13      # 0xb3db
leaq 0x20(%rsp), %rbp
xorl %r12d, %r12d
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x22a0
movq %rbp, %rdi
callq 0x20f0
movq %rbp, %rdi
movq %rax, %rsi
callq 0x4f10
movq %rax, (%r15,%r12,8)
incq %r12
cmpq %r12, %r14
jne 0x2c51
movl $0x0, 0xe98e(%rip)      # 0x11618
movq %r14, 0xe98f(%rip)      # 0x11620
xorl %r13d, %r13d
leaq 0x7f7(%rip), %rbp       # 0x3492
movq %r13, %rax
bswapq %rax
movq %rax, 0x8(%rsp)
movl $0x8, %esi
leaq 0x8(%rsp), %rdi
callq 0x4f10
movq %rax, %r12
movq (%r15,%r13,8), %rdx
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x513d
testl %eax, %eax
jne 0x2ef1
movq %r12, %rdi
callq 0x2040
incq %r13
cmpq %r13, %r14
jne 0x2c9b
leaq 0xe92a(%rip), %rdi      # 0x11618
callq 0x3865
orl 0xe923(%rip), %eax      # 0x1161c
je 0x2d15
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2da5
leaq 0x849b(%rip), %rdi      # 0xb1ab
jmp 0x2df0
xorl %eax, %eax
movl %eax, 0xe8fb(%rip)      # 0x11618
movl %eax, 0xe8f9(%rip)      # 0x1161c
movq %r14, 0xe8f6(%rip)      # 0x11620
testq %r14, %r14
je 0x2d7e
xorl %r13d, %r13d
leaq 0x784(%rip), %rbp       # 0x34bd
movq %r13, %rax
bswapq %rax
movq %rax, 0x8(%rsp)
movl $0x8, %esi
leaq 0x8(%rsp), %rdi
callq 0x4f10
movq %rax, %r12
movq (%r15,%r13,8), %rcx
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0x5a62
testl %eax, %eax
jne 0x2ddb
movq %r12, %rdi
callq 0x2040
incq %r13
cmpq %r13, %r14
jne 0x2d39
leaq 0xe893(%rip), %rdi      # 0x11618
callq 0x3865
orl 0xe88c(%rip), %eax      # 0x1161c
je 0x2db4
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2dfc
leaq 0x8435(%rip), %rdi      # 0xb1d8
jmp 0x2df0
movq %rax, %r12
leaq 0x83fc(%rip), %rdi      # 0xb1ab
jmp 0x2ee2
cmpb $0x0, 0xe86d(%rip)      # 0x11628
je 0x2e0b
leaq 0x8427(%rip), %rdi      # 0xb1eb
xorl %eax, %eax
callq 0x4deb
callq 0x2090
movl $0x0, (%rax)
jmp 0x2ef1
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2ed8
leaq 0x83ce(%rip), %rdi      # 0xb1be
xorl %eax, %eax
callq 0x4deb
jmp 0x2ef1
movq %rax, %r12
leaq 0x83d2(%rip), %rdi      # 0xb1d8
jmp 0x2ee2
testq %r14, %r14
je 0x2e24
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdi
callq 0x2040
incq %r12
cmpq %r12, %r14
jne 0x2e13
movq %r15, %rdi
callq 0x2040
leaq 0x8(%rsp), %r12
movq $0x0, (%r12)
movl $0x8, %esi
movq %r12, %rdi
callq 0x4f10
movq %rax, %r15
bswapq %r14
movq %r14, (%r12)
movl $0x8, %esi
movq %r12, %rdi
callq 0x4f10
movq %rax, %r14
movl $0x0, 0xe7ae(%rip)      # 0x11618
movq $0x1, 0xe7ab(%rip) # 0x11620
leaq 0x6e0(%rip), %rcx       # 0x355c
leaq 0x60f(%rip), %r8        # 0x3492
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %rdi, %r9
callq 0x611a
testl %eax, %eax
jne 0x2c30
movq %r14, %rdi
callq 0x2040
movq %r15, %rdi
callq 0x2040
leaq 0xe763(%rip), %rdi      # 0x11618
callq 0x3865
orl 0xe75c(%rip), %eax      # 0x1161c
je 0x2f13
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2f22
leaq 0x850c(%rip), %rdi      # 0xb3df
jmp 0x26ca
movq %rax, %r12
leaq 0x82dc(%rip), %rdi      # 0xb1be
xorl %eax, %eax
callq 0x4ccc
movl $0x0, (%r12)
testq %r14, %r14
je 0x2c0e
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdi
callq 0x2040
incq %r12
cmpq %r12, %r14
jne 0x2efd
jmp 0x2c0e
movq %rbx, %rdi
callq 0x6fb5
xorl %edi, %edi
callq 0x22b0
movq %rax, %r14
leaq 0x84b3(%rip), %rdi      # 0xb3df
jmp 0x2c22