// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/bench/bulk_update/main.c
// Function: main
int
main(int argc, char * argv[])
{
	struct sock_addr ** sas;
	int s;
	struct wire_requestqueue * Q;

	WARNP_INIT;

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

	/* Resolve the socket address and connect. */
	if ((sas = sock_resolve(argv[1])) == NULL) {
		warnp("Error resolving socket address: %s", argv[1]);
		exit(1);
	}
	if (sas[0] == NULL) {
		warn0("No addresses found for %s", argv[1]);
		exit(1);
	}
	if ((s = sock_connect(sas)) == -1)
		exit(1);

	/* Create a request queue. */
	if ((Q = wire_requestqueue_init(s)) == NULL) {
		warnp("Cannot create packet write queue");
		exit(1);
	}

	/* Start bulk updating. */
	if (bulkupdate(Q, stdin))
		exit(1);

	/* Free the request queue. */
	wire_requestqueue_destroy(Q);
	wire_requestqueue_free(Q);

	/* Free socket addresses. */
	sock_addr_freelist(sas);

	/* Success! */
	exit(0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x2589
callq 0x4fd0
cmpl $0x2, %ebx
jne 0x25ba
movq 0x8(%r14), %rdi
callq 0x3fcc
testq %rax, %rax
jne 0x25db
callq 0x2090
cmpl $0x0, (%rax)
movq 0x8(%r14), %rsi
jne 0x2603
leaq 0x8a77(%rip), %rdi      # 0xb028
xorl %eax, %eax
callq 0x516f
jmp 0x2629
movq 0xea37(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x8a39(%rip), %rsi      # 0xb004
leaq 0x8a49(%rip), %rdx      # 0xb01b
xorl %eax, %eax
callq 0x21f0
jmp 0x2629
movq %rax, %rbx
cmpq $0x0, (%rax)
jne 0x261c
movq 0x8(%r14), %rsi
leaq 0x8a5c(%rip), %rdi      # 0xb04b
xorl %eax, %eax
callq 0x516f
callq 0x2090
movl $0x0, (%rax)
jmp 0x2629
movq %rax, %rbx
leaq 0x8a1b(%rip), %rdi      # 0xb028
xorl %eax, %eax
callq 0x5050
movl $0x0, (%rbx)
jmp 0x2629
movq %rbx, %rdi
callq 0x48e4
cmpl $-0x1, %eax
jne 0x2633
movl $0x1, %edi
callq 0x22d0
movl %eax, %edi
callq 0x6be8
testq %rax, %rax
jne 0x265d
callq 0x2090
cmpl $0x0, (%rax)
jne 0x26d3
leaq 0x8a11(%rip), %rdi      # 0xb065
xorl %eax, %eax
callq 0x516f
jmp 0x2629
movq %rax, %r14
movq 0xe971(%rip), %rax      # 0x10fd8
movq (%rax), %rax
movq %r14, (%rsp)
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movl $0x0, 0x20(%rsp)
leaq 0x40(%rsp), %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
movq $0x0, 0x20(%rdi)
movl $0x28, %esi
callq 0x55ec
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x2629
movq %rax, %r12
leaq 0x40(%rsp), %rdi
movl $0x28, %esi
callq 0x55ec
movq %rax, 0x30(%rsp)
testq %rax, %rax
jne 0x26e9
movq %r12, %rdi
jmp 0x27eb
movq %rax, %rbx
leaq 0x8988(%rip), %rdi      # 0xb065
xorl %eax, %eax
callq 0x5050
jmp 0x2614
movq %rax, %r15
movl $0x32, %edi
movl $0xa, %esi
callq 0x5294
movq %rax, 0x38(%rsp)
testq %rax, %rax
jne 0x2723
leaq 0x897a(%rip), %rdi      # 0xb086
xorl %eax, %eax
callq 0x516f
callq 0x2090
movl $0x0, (%rax)
jmp 0x27de
movq %rsp, %rdi
callq 0x27f5
testl %eax, %eax
jne 0x27cf
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x2be5
orl -0x4(%r15), %eax
je 0x2760
callq 0x2090
cmpl $0x0, (%rax)
jne 0x27b8
leaq 0x893a(%rip), %rdi      # 0xb091
xorl %eax, %eax
callq 0x516f
jmp 0x27cf
movq 0x38(%rsp), %rdi
callq 0x5559
leaq 0x8933(%rip), %rdi      # 0xb0a4
movq %rax, %rsi
xorl %eax, %eax
callq 0x2140
movq 0x38(%rsp), %rdi
callq 0x55c4
movq 0x30(%rsp), %rdi
callq 0x2040
movq 0x28(%rsp), %rdi
callq 0x2040
movq %r14, %rdi
callq 0x72d9
movq %r14, %rdi
callq 0x72ed
movq %rbx, %rdi
callq 0x46de
xorl %edi, %edi
callq 0x22d0
movq %rax, %rbx
leaq 0x88cf(%rip), %rdi      # 0xb091
xorl %eax, %eax
callq 0x5050
movl $0x0, (%rbx)
movq 0x38(%rsp), %rdi
callq 0x55c4
movq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x2040
movq 0x28(%rsp), %rdi
callq 0x2040
jmp 0x2629