// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/http/http.c
// Function: callback_connected
static int
callback_connected(void * cookie, int s)
{
	struct http_cookie * H = cookie;

	/* We're not connecting any more. */
	H->connect_cookie = NULL;

	/* Did we fail? */
	if (s == -1)
		return (fail(H));

	/* We have a connected socket. */
	H->s = s;

	/* Create a reader and a writer. */
	if (H->sslhost != NULL) {
		if ((H->ssl =
		    (network_ssl_open_func)(H->s, H->sslhost)) == NULL)
			return (die(H));
		if ((H->R =
		    (netbuf_ssl_read_init_func)(H->ssl)) == NULL)
			return (die(H));
		if ((H->W =
		    (netbuf_ssl_write_init_func)(H->ssl, fail, H)) == NULL)
			return (die(H));
	} else {
		if ((H->R = netbuf_read_init(H->s)) == NULL)
			return (die(H));
		if ((H->W = netbuf_write_init(H->s, fail, H)) == NULL)
			return (die(H));
	}

	/* Send the request. */
	if (netbuf_write_write(H->W, H->req_head, H->req_headlen))
		return (die(H));
	if ((H->req_bodylen > 0) &&
	    netbuf_write_write(H->W, H->req_body, H->req_bodylen))
		return (die(H));

	/* Enter response-reading loop. */
	return (callback_read_header(H, 0));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x18(%rax)
cmpl $-0x1, -0x14(%rbp)
jne 0xc87a
movq -0x20(%rbp), %rdi
callq 0xcc10
movl %eax, -0x4(%rbp)
jmp 0xca10
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xc937
movq 0x29efe(%rip), %rax     # 0x36798
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %edi
movq -0x20(%rbp), %rcx
movq 0x58(%rcx), %rsi
callq *%rax
movq -0x20(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0xc8ca
movq -0x20(%rbp), %rdi
callq 0xcc50
movl %eax, -0x4(%rbp)
jmp 0xca10
movq 0x29ed7(%rip), %rax     # 0x367a8
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rdi
callq *%rax
movq -0x20(%rbp), %rcx
movq %rax, 0x28(%rcx)
cmpq $0x0, %rax
jne 0xc8fa
movq -0x20(%rbp), %rdi
callq 0xcc50
movl %eax, -0x4(%rbp)
jmp 0xca10
movq 0x29eaf(%rip), %rax     # 0x367b0
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rdi
movq -0x20(%rbp), %rdx
leaq 0x2fc(%rip), %rsi       # 0xcc10
callq *%rax
movq -0x20(%rbp), %rcx
movq %rax, 0x20(%rcx)
cmpq $0x0, %rax
jne 0xc935
movq -0x20(%rbp), %rdi
callq 0xcc50
movl %eax, -0x4(%rbp)
jmp 0xca10
jmp 0xc997
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edi
callq 0xe010
movq -0x20(%rbp), %rcx
movq %rax, 0x28(%rcx)
cmpq $0x0, %rax
jne 0xc962
movq -0x20(%rbp), %rdi
callq 0xcc50
movl %eax, -0x4(%rbp)
jmp 0xca10
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x20(%rbp), %rdx
leaq 0x29c(%rip), %rsi       # 0xcc10
callq 0xe6f0
movq -0x20(%rbp), %rcx
movq %rax, 0x20(%rcx)
cmpq $0x0, %rax
jne 0xc995
movq -0x20(%rbp), %rdi
callq 0xcc50
movl %eax, -0x4(%rbp)
jmp 0xca10
jmp 0xc997
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rdx
callq 0xecb0
cmpl $0x0, %eax
je 0xc9c7
movq -0x20(%rbp), %rdi
callq 0xcc50
movl %eax, -0x4(%rbp)
jmp 0xca10
movq -0x20(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jbe 0xca02
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rdx
callq 0xecb0
cmpl $0x0, %eax
je 0xca02
movq -0x20(%rbp), %rdi
callq 0xcc50
movl %eax, -0x4(%rbp)
jmp 0xca10
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xcc70
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)