// File: /workspace/github_c_makefile_star2_O1/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 %rbx
subq $0x70, %rsp
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x2587
callq 0x4fac
cmpl $0x2, %ebx
jne 0x25b8
movq 0x8(%r14), %rdi
callq 0x3f84
testq %rax, %rax
jne 0x25d9
callq 0x2090
cmpl $0x0, (%rax)
movq 0x8(%r14), %rsi
jne 0x2601
leaq 0x8a79(%rip), %rdi      # 0xb028
xorl %eax, %eax
callq 0x514b
jmp 0x2627
movq 0xea39(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x8a3b(%rip), %rsi      # 0xb004
leaq 0x8a4b(%rip), %rdx      # 0xb01b
xorl %eax, %eax
callq 0x21f0
jmp 0x2627
movq %rax, %rbx
cmpq $0x0, (%rax)
jne 0x261a
movq 0x8(%r14), %rsi
leaq 0x8a5e(%rip), %rdi      # 0xb04b
xorl %eax, %eax
callq 0x514b
callq 0x2090
movl $0x0, (%rax)
jmp 0x2627
movq %rax, %rbx
leaq 0x8a1d(%rip), %rdi      # 0xb028
xorl %eax, %eax
callq 0x502c
movl $0x0, (%rbx)
jmp 0x2627
movq %rbx, %rdi
callq 0x48a1
cmpl $-0x1, %eax
jne 0x2631
movl $0x1, %edi
callq 0x22d0
movl %eax, %edi
callq 0x6bdc
testq %rax, %rax
jne 0x265b
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2701
leaq 0x8a13(%rip), %rdi      # 0xb065
xorl %eax, %eax
callq 0x514b
jmp 0x2627
movq %rax, %r14
movq 0xe973(%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 0x55d0
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x2627
leaq 0x40(%rsp), %rdi
movl $0x28, %esi
callq 0x55d0
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x27d7
movl $0x32, %edi
movl $0xa, %esi
callq 0x5270
movq %rax, 0x38(%rsp)
testq %rax, %rax
jne 0x2717
leaq 0x899c(%rip), %rdi      # 0xb086
xorl %eax, %eax
callq 0x514b
callq 0x2090
movl $0x0, (%rax)
jmp 0x27cd
movq %rax, %rbx
leaq 0x895a(%rip), %rdi      # 0xb065
xorl %eax, %eax
callq 0x502c
jmp 0x2612
movq %rsp, %rdi
callq 0x27e6
testl %eax, %eax
jne 0x27c3
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x2bd9
orl -0x4(%r15), %eax
je 0x2754
callq 0x2090
cmpl $0x0, (%rax)
jne 0x27ac
leaq 0x8946(%rip), %rdi      # 0xb091
xorl %eax, %eax
callq 0x514b
jmp 0x27c3
movq 0x38(%rsp), %rdi
callq 0x553d
leaq 0x893f(%rip), %rdi      # 0xb0a4
movq %rax, %rsi
xorl %eax, %eax
callq 0x2140
movq 0x38(%rsp), %rdi
callq 0x55a8
movq 0x30(%rsp), %rdi
callq 0x2040
movq 0x28(%rsp), %rdi
callq 0x2040
movq %r14, %rdi
callq 0x72a1
movq %r14, %rdi
callq 0x72b5
movq %rbx, %rdi
callq 0x469b
xorl %edi, %edi
callq 0x22d0
movq %rax, %rbx
leaq 0x88db(%rip), %rdi      # 0xb091
xorl %eax, %eax
callq 0x502c
movl $0x0, (%rbx)
movq 0x38(%rsp), %rdi
callq 0x55a8
movq 0x30(%rsp), %rdi
callq 0x2040
movq 0x28(%rsp), %rdi
callq 0x2040
jmp 0x2627