// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/spiped/dispatch.c
// Function: dispatch_accept
void *
dispatch_accept(int s, const char * tgt, double rtime, struct sock_addr ** sas,
    const struct sock_addr * sa_b, int decr, int nopfs, int requirepfs,
    int nokeepalive, const struct proto_secret * K, size_t nconn_max,
    double timeo, int * conndone)
{
	struct accept_state * A;

	/* Bake a cookie. */
	if ((A = malloc(sizeof(struct accept_state))) == NULL)
		goto err0;
	A->s = s;
	A->tgt = tgt;
	A->sas = sas;
	A->sa_b = sa_b;
	A->rtime = rtime;
	A->decr = decr;
	A->nopfs = nopfs;
	A->requirepfs = requirepfs;
	A->nokeepalive = nokeepalive;
	A->conndone = conndone;
	A->shutdown_requested = 0;
	A->K = K;
	A->nconn = 0;
	A->nconn_max = nconn_max;
	A->timeo = timeo;
	A->T = NULL;
	A->accept_cookie = NULL;
	A->dnstimer_cookie = NULL;
	LIST_INIT(&A->conn_cookies);

	/* If address re-resolution is enabled... */
	if (rtime > 0.0) {
		/* Launch an address resolution thread. */
		if ((A->T = dnsthread_spawn()) == NULL)
			goto err1;

		/* Re-resolve the target address after a while. */
		if ((A->dnstimer_cookie = events_timer_register_double(
		    callback_resolveagain, A, A->rtime)) == NULL)
			goto err2;
	}

	/* Accept a connection. */
	if (doaccept(A))
		goto err3;

	/* Success! */
	return (A);

err3:
	if (A->dnstimer_cookie != NULL)
		events_timer_cancel(A->dnstimer_cookie);
err2:
	if (A->T != NULL)
		dnsthread_kill(A->T);
err1:
	free(A);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
movl %r9d, -0x38(%rbp)
movsd %xmm1, -0x40(%rbp)
movl $0x88, %edi
callq 0x31b0
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
jne 0x5364
jmp 0x54f1
movl -0xc(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x18(%rax)
movsd -0x20(%rbp), %xmm0
movq -0x48(%rbp), %rax
movsd %xmm0, 0x20(%rax)
movl -0x34(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0x38(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x2c(%rax)
movl 0x10(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x30(%rax)
movl 0x18(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x34(%rax)
movq 0x30(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x48(%rbp), %rax
movl $0x0, 0x40(%rax)
movq 0x20(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x48(%rbp), %rax
movq $0x0, 0x50(%rax)
movq 0x28(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x58(%rax)
movsd -0x40(%rbp), %xmm0
movq -0x48(%rbp), %rax
movsd %xmm0, 0x60(%rax)
movq -0x48(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x48(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x48(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x48(%rbp), %rax
movq $0x0, 0x78(%rax)
movsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x5494
callq 0xbf90
movq -0x48(%rbp), %rcx
movq %rax, 0x80(%rcx)
cmpq $0x0, %rax
jne 0x5469
jmp 0x54e8
movq -0x48(%rbp), %rsi
movq -0x48(%rbp), %rax
movsd 0x20(%rax), %xmm0
leaq 0x93(%rip), %rdi        # 0x5510
callq 0x76d0
movq -0x48(%rbp), %rcx
movq %rax, 0x70(%rcx)
cmpq $0x0, %rax
jne 0x5492
jmp 0x54c8
jmp 0x5494
movq -0x48(%rbp), %rdi
callq 0x5560
cmpl $0x0, %eax
je 0x54a4
jmp 0x54ae
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x54f9
movq -0x48(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x54c6
movq -0x48(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x7730
jmp 0x54c8
movq -0x48(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x54e6
movq -0x48(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0xc910
jmp 0x54e8
movq -0x48(%rbp), %rdi
callq 0x32b0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)