// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/tests/s3/main.c
// Function: main
int
main(int argc, char * argv[])
{
	struct wire_requestqueue * Q;
	struct kivaloo_cookie * K;

	WARNP_INIT;

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

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

	/* Do read tests; these should all fail. */
	readtests(Q, argv[2]);

	/* PUT the file. */
	putfile(Q, argv[2]);

	/* Do read tests; they should succeed this time. */
	readtests(Q, argv[2]);

	/* DELETE the file. */
	deletefile(Q, argv[2]);

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

	/* Close all streams, in order to free malloced internal buffers. */
	if (fclose(stdin))
		warnp("fclose");
	if (fclose(stdout))
		warnp("fclose");
	if (fclose(stderr))
		warnp("fclose");

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

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x2565
callq 0x4094
cmpl $0x3, %ebx
jne 0x259e
movq 0x8(%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5858
testq %rax, %rax
jne 0x25c9
callq 0x2090
cmpl $0x0, (%rax)
jne 0x26cf
leaq 0x7a9e(%rip), %rdi      # 0xa030
xorl %eax, %eax
callq 0x4233
jmp 0x26e6
movq 0xca53(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x7a55(%rip), %rsi      # 0xa004
leaq 0x7a64(%rip), %rdx      # 0xa01a
leaq 0x7a6a(%rip), %rcx      # 0xa027
xorl %eax, %eax
callq 0x21d0
jmp 0x26e6
movq %rax, %rbx
movq 0x10(%rsp), %rdi
movq 0x10(%r14), %rsi
callq 0x279f
movq 0x10(%rsp), %rdi
movq 0x10(%r14), %rsi
movl $0x0, 0xcf67(%rip)      # 0xf554
movq $0x0, (%rsp)
leaq 0x7a5b(%rip), %rdx      # 0xa057
leaq 0x7afb(%rip), %r8       # 0xa0fe
leaq 0x3e1(%rip), %r9        # 0x29eb
movl $0xb, %ecx
callq 0x4358
testl %eax, %eax
jne 0x26b4
leaq 0xcf31(%rip), %rdi      # 0xf554
callq 0x2ce9
testl %eax, %eax
jne 0x26b4
movq 0x10(%rsp), %rdi
movq 0x10(%r14), %rsi
callq 0x279f
movq 0x10(%rsp), %rdi
movq 0x10(%r14), %rsi
movl $0x0, 0xcf03(%rip)      # 0xf554
leaq 0x79ff(%rip), %rdx      # 0xa057
leaq 0x3a9(%rip), %rcx       # 0x2a08
xorl %r8d, %r8d
callq 0x4d24
testl %eax, %eax
jne 0x26f0
leaq 0xcede(%rip), %rdi      # 0xf554
callq 0x2ce9
testl %eax, %eax
jne 0x26f0
movq %rbx, %rdi
callq 0x59a1
movq 0xc94a(%rip), %rax      # 0xefd8
movq (%rax), %rdi
callq 0x2100
testl %eax, %eax
je 0x2710
callq 0x2090
cmpl $0x0, (%rax)
jne 0x26f9
leaq 0x79a5(%rip), %rdi      # 0xa050
xorl %eax, %eax
callq 0x4233
jmp 0x2710
leaq 0x7a4f(%rip), %rdi      # 0xa10a
xorl %eax, %eax
callq 0x4233
callq 0x2090
movl $0x0, (%rax)
jmp 0x26e6
movq %rax, %rbx
leaq 0x7957(%rip), %rdi      # 0xa030
xorl %eax, %eax
callq 0x4114
movl $0x0, (%rbx)
movl $0x1, %edi
callq 0x22b0
leaq 0x7a2f(%rip), %rdi      # 0xa126
jmp 0x26bb
movq %rax, %rbx
leaq 0x794d(%rip), %rdi      # 0xa050
xorl %eax, %eax
callq 0x4114
movl $0x0, (%rbx)
movq 0xc8b9(%rip), %rax      # 0xefd0
movq (%rax), %rdi
callq 0x2100
testl %eax, %eax
je 0x2754
callq 0x2090
cmpl $0x0, (%rax)
jne 0x273d
leaq 0x791c(%rip), %rdi      # 0xa050
xorl %eax, %eax
callq 0x4233
jmp 0x2754
movq %rax, %rbx
leaq 0x7909(%rip), %rdi      # 0xa050
xorl %eax, %eax
callq 0x4114
movl $0x0, (%rbx)
movq 0xc89d(%rip), %rax      # 0xeff8
movq (%rax), %rdi
callq 0x2100
testl %eax, %eax
je 0x2798
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2781
leaq 0x78d8(%rip), %rdi      # 0xa050
xorl %eax, %eax
callq 0x4233
jmp 0x2798
movq %rax, %rbx
leaq 0x78c5(%rip), %rdi      # 0xa050
xorl %eax, %eax
callq 0x4114
movl $0x0, (%rbx)
xorl %edi, %edi
callq 0x22b0