// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/dynamodb/dynamodb_request_queue.c
// Function: logreq
static int
logreq(struct logging_file * F, struct request * R,
    struct http_response * res, double capacity,
    struct timeval t_end, char * ddberr)
{
	long t_micros;
	char * addr;
	int status;
	size_t bodylen;

	/* Compute how long the request took. */
	t_micros = (long)(t_end.tv_sec - R->t_start.tv_sec) * 1000000 +
	    t_end.tv_usec - R->t_start.tv_usec;

	/* Prettyprint the address we selected. */
	if ((addr = sock_addr_prettyprint(R->addrs[0])) == NULL)
		goto err0;

	/* Extract parameters from HTTP response. */
	if (res != NULL) {
		status = res->status;
		bodylen = res->bodylen;
	} else {
		status = 0;
		bodylen = 0;
	}

	/* Write to the log file. */
	if (logging_printf(F, "|%s|%s|%d|%s|%ld|%zu|%f|%s",
	    R->op, R->logstr ? R->logstr : "",
	    status, addr, t_micros, bodylen, capacity,
	    ddberr ? ddberr : ""))
		goto err1;

	/* Free string allocated by sock_addr_prettyprint. */
	free(addr);

	/* Success! */
	return (0);

err1:
	free(addr);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rcx, -0x18(%rbp)
movq %r8, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movsd %xmm0, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
subq 0x68(%rcx), %rax
imulq $0xf4240, %rax, %rax    # imm = 0xF4240
addq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
subq 0x70(%rcx), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x12610
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
jne 0x9377
jmp 0x94b7
cmpq $0x0, -0x30(%rbp)
je 0x9395
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x93a4
movl $0x0, -0x54(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x93d1
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x93de
leaq 0x15d6e(%rip), %rax     # 0x1f146
movq %rax, -0x78(%rbp)
jmp 0x93de
movq -0x78(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x9c(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x88(%rbp)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x9431
movq -0x40(%rbp), %rax
movq %rax, -0xb0(%rbp)
jmp 0x9441
leaq 0x15d0e(%rip), %rax     # 0x1f146
movq %rax, -0xb0(%rbp)
jmp 0x9441
movsd -0x80(%rbp), %xmm0
movq -0x88(%rbp), %r10
movq -0x90(%rbp), %r11
movq -0x98(%rbp), %r9
movl -0x9c(%rbp), %r8d
movq -0xa8(%rbp), %rcx
movq -0x68(%rbp), %rdx
movq -0x70(%rbp), %rdi
movq -0xb0(%rbp), %rax
leaq 0x154bf(%rip), %rsi     # 0x1e93e
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x1, %al
callq 0x9fa0
cmpq $0x0, %rax
je 0x949c
jmp 0x94ae
movq -0x50(%rbp), %rdi
callq 0x3460
movl $0x0, -0x4(%rbp)
jmp 0x94be
movq -0x50(%rbp), %rdi
callq 0x3460
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)