// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/proto_s3/proto_s3_client.c
// Function: callback_get
static int
callback_get(void * cookie, uint8_t * buf, size_t buflen)
{
	struct get_cookie * C = cookie;
	int failed = 1;
	uint32_t status;
	uint32_t len;
	size_t lens = (size_t)(-1);
	uint8_t * dbuf = NULL;
	int rc;

	/* If we have a packet, parse it. */
	if (buf != NULL) {
		/* Do we have the right packet length? */
		if (buflen < 8)
			BAD("GET", "bogus length");

		/* Parse the packet. */
		status = be32dec(&buf[0]);
		len = be32dec(&buf[4]);

		/* Check status. */
		if ((status != 0) && ((status < 100) || (status > 599)))
			BAD("GET", "Invalid HTTP status");

		/* Do we have the right packet length? */
		if (len != (uint32_t)(-1)) {
			if (buflen != 8 + len)
				BAD("GET", "bogus length");
		} else {
			if (buflen != 8)
				BAD("GET", "bogus length");
		}

		/* Did the operation succeed? */
		if (status == 200)
			failed = 0;

		/* Do we have data? */
		if ((failed == 0) && (len != (uint32_t)(-1))) {
			lens = len;
			dbuf = &buf[8];
		}
	}

failed:
	/* Invoke the upstream callback. */
	rc = (C->callback)(C->cookie, failed, lens, dbuf);

	/* Free the cookie. */
	free(C);

	/* Return status from callback. */
	return (rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movq $-0x1, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x73a3
cmpq $0x8, -0x18(%rbp)
jae 0x7295
jmp 0x7267
jmp 0x7269
leaq 0x7671(%rip), %rdi      # 0xe8e1
leaq 0x76ac(%rip), %rsi      # 0xe923
leaq 0x7684(%rip), %rdx      # 0xe902
movb $0x0, %al
callq 0x6a00
callq 0x20a0
movl $0x0, (%rax)
jmp 0x73a5
movq -0x10(%rbp), %rdi
callq 0x7dd0
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
addq $0x4, %rdi
callq 0x7dd0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x72f6
cmpl $0x64, -0x28(%rbp)
jb 0x72c6
cmpl $0x257, -0x28(%rbp)     # imm = 0x257
jbe 0x72f6
jmp 0x72c8
jmp 0x72ca
leaq 0x7610(%rip), %rdi      # 0xe8e1
leaq 0x764b(%rip), %rsi      # 0xe923
leaq 0x7630(%rip), %rdx      # 0xe90f
movb $0x0, %al
callq 0x6a00
callq 0x20a0
movl $0x0, (%rax)
jmp 0x73a5
cmpl $-0x1, -0x2c(%rbp)
je 0x733c
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x8, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
je 0x733a
jmp 0x730f
jmp 0x7311
leaq 0x75c9(%rip), %rdi      # 0xe8e1
leaq 0x7604(%rip), %rsi      # 0xe923
leaq 0x75dc(%rip), %rdx      # 0xe902
movb $0x0, %al
callq 0x6a00
callq 0x20a0
movl $0x0, (%rax)
jmp 0x73a5
jmp 0x7372
cmpq $0x8, -0x18(%rbp)
je 0x7370
jmp 0x7345
jmp 0x7347
leaq 0x7593(%rip), %rdi      # 0xe8e1
leaq 0x75ce(%rip), %rsi      # 0xe923
leaq 0x75a6(%rip), %rdx      # 0xe902
movb $0x0, %al
callq 0x6a00
callq 0x20a0
movl $0x0, (%rax)
jmp 0x73a5
jmp 0x7372
cmpl $0xc8, -0x28(%rbp)
jne 0x7382
movl $0x0, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x73a1
cmpl $-0x1, -0x2c(%rbp)
je 0x73a1
movl -0x2c(%rbp), %eax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
jmp 0x73a3
jmp 0x73a5
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rdi
movl -0x24(%rbp), %esi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
callq *%rax
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2040
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)