// File: /workspace/github_c_makefile_star2_O2/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 0x2445
callq 0x3c3c
cmpl $0x3, %ebx
jne 0x247e
movq 0x8(%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0x52f8
testq %rax, %rax
jne 0x24a9
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2599
leaq 0x6bbe(%rip), %rdi      # 0x9030
xorl %eax, %eax
callq 0x3e48
jmp 0x25ad
movq 0xbb73(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x6b75(%rip), %rsi      # 0x9004
leaq 0x6b84(%rip), %rdx      # 0x901a
leaq 0x6b8a(%rip), %rcx      # 0x9027
xorl %eax, %eax
callq 0x21d0
jmp 0x25ad
movq %rax, %rbx
movq 0x10(%rsp), %rdi
movq 0x10(%r14), %rsi
callq 0x265b
movq 0x10(%rsp), %rdi
movq 0x10(%r14), %rsi
andl $0x0, 0xc08a(%rip)      # 0xe554
andq $0x0, (%rsp)
leaq 0x6b81(%rip), %rdx      # 0x9057
leaq 0x6c21(%rip), %r8       # 0x90fe
leaq 0x39f(%rip), %r9        # 0x2883
pushq $0xb
popq %rcx
callq 0x3fcc
testl %eax, %eax
jne 0x2581
leaq 0xc059(%rip), %rdi      # 0xe554
callq 0x2b63
testl %eax, %eax
jne 0x2581
movq 0x10(%rsp), %rdi
movq 0x10(%r14), %rsi
callq 0x265b
movq 0x10(%rsp), %rdi
movq 0x10(%r14), %rsi
andl $0x0, 0xc032(%rip)      # 0xe554
leaq 0x6b2e(%rip), %rdx      # 0x9057
leaq 0x370(%rip), %rcx       # 0x28a0
xorl %r8d, %r8d
callq 0x49b4
testl %eax, %eax
jne 0x25b5
leaq 0xc011(%rip), %rdi      # 0xe554
callq 0x2b63
testl %eax, %eax
jne 0x25b5
movq %rbx, %rdi
callq 0x5433
movq 0xba7d(%rip), %rax      # 0xdfd8
movq (%rax), %rdi
callq 0x2100
testl %eax, %eax
je 0x25d2
callq 0x2090
cmpl $0x0, (%rax)
jne 0x25be
leaq 0x6ad8(%rip), %rdi      # 0x9050
xorl %eax, %eax
callq 0x3e48
jmp 0x25d2
leaq 0x6b82(%rip), %rdi      # 0x910a
xorl %eax, %eax
callq 0x3e48
callq 0x2090
andl $0x0, (%rax)
jmp 0x25ad
movq %rax, %rbx
leaq 0x6a8d(%rip), %rdi      # 0x9030
xorl %eax, %eax
callq 0x3cb9
andl $0x0, (%rbx)
pushq $0x1
popq %rdi
callq 0x22b0
leaq 0x6b6a(%rip), %rdi      # 0x9126
jmp 0x2588
movq %rax, %rbx
leaq 0x6a88(%rip), %rdi      # 0x9050
xorl %eax, %eax
callq 0x3cb9
andl $0x0, (%rbx)
movq 0xb9f7(%rip), %rax      # 0xdfd0
movq (%rax), %rdi
callq 0x2100
testl %eax, %eax
je 0x2613
callq 0x2090
cmpl $0x0, (%rax)
jne 0x25ff
leaq 0x6a5a(%rip), %rdi      # 0x9050
xorl %eax, %eax
callq 0x3e48
jmp 0x2613
movq %rax, %rbx
leaq 0x6a47(%rip), %rdi      # 0x9050
xorl %eax, %eax
callq 0x3cb9
andl $0x0, (%rbx)
movq 0xb9de(%rip), %rax      # 0xdff8
movq (%rax), %rdi
callq 0x2100
testl %eax, %eax
je 0x2654
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2640
leaq 0x6a19(%rip), %rdi      # 0x9050
xorl %eax, %eax
callq 0x3e48
jmp 0x2654
movq %rax, %rbx
leaq 0x6a06(%rip), %rdi      # 0x9050
xorl %eax, %eax
callq 0x3cb9
andl $0x0, (%rbx)
xorl %edi, %edi
callq 0x22b0