LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/robertdavidgraham[P]wc2/wc2.c
// Function: get_column_width
static unsigned
get_column_width(int argc, char *argv[], int is_stdin)
{
    int i;
    off_t maxsize = 1;
    unsigned width = 0;

    for (i=1; i<argc; i++) {
        const char *filename = argv[i];
        struct stat st;

        if (filename[0] == '-')
            continue;

        if (stat(filename, &st) == 0) {
            if (S_ISREG(st.st_mode)) {
                if (maxsize <= st.st_size)
                    maxsize = st.st_size;
            } else if (maxsize <= 1000000)
                maxsize = 1000000;
        }
    }

    if (is_stdin) {
        if (maxsize <= 1000000)
            maxsize = 1000000;
    }

    while (maxsize) {
        width++;
        maxsize /= 10;
    }

    return width;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq $0x1, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x2a9c
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x2a35
jmp 0x2a8e
movq -0x30(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x1090
cmpl $0x0, %eax
jne 0x2a8c
movl -0xa8(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x2a76
movq -0x20(%rbp), %rax
cmpq -0x90(%rbp), %rax
jg 0x2a74
movq -0x90(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x2a8a
cmpq $0xf4240, -0x20(%rbp)   # imm = 0xF4240
jg 0x2a88
movq $0xf4240, -0x20(%rbp)   # imm = 0xF4240
jmp 0x2a8a
jmp 0x2a8c
jmp 0x2a8e
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2a0b
cmpl $0x0, -0x14(%rbp)
je 0x2ab6
cmpq $0xf4240, -0x20(%rbp)   # imm = 0xF4240
jg 0x2ab4
movq $0xf4240, -0x20(%rbp)   # imm = 0xF4240
jmp 0x2ab6
jmp 0x2ab8
cmpq $0x0, -0x20(%rbp)
je 0x2adc
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
movq %rax, -0x20(%rbp)
jmp 0x2ab8
movl -0x24(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/robertdavidgraham[P]wc2/wc2.c
// Function: parse_chunk_pp
static struct results
parse_chunk_pp(const unsigned char *buf, size_t length, unsigned *inout_state)
{
    void **state = (void**)((char*)table_p + *inout_state);
    const unsigned char *end = buf + length;
    unsigned long counts[STATE_MAX];


    state = (void**)((char*)table_p + (*inout_state) * 256 * sizeof(void*));

    /* We only care about the first four states, so these will be initialized to zero.
     * Since we don't use the other ~100 counts for the other states, we won't initialize them */
    counts[NEWLINE] = 0;
    counts[NEWWORD] = 0;
    counts[WASSPACE] = 0;
    counts[WASWORD] = 0;

    /* This is the inner-loop where 99.9% of the execution time of this program will
     * be spent. */
    while (buf < end) {
        unsigned char c = *buf++;
        state = state[c];
        counts[PSTATE(state)]++;
    }

    /* Save the ending state for the next chunk */
    *inout_state = PSTATE(state);

    /* Return the results */
    {
        struct results results;
        results.line_count = counts[NEWLINE];
        results.word_count = counts[NEWWORD];
        results.char_count = counts[NEWLINE] + counts[WASSPACE] + counts[WASWORD] + counts[NEWWORD];
        results.byte_count = length;

        return results;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x258(%rbp)
movq %rdi, -0x250(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
leaq 0x125cc(%rip), %rax     # 0x150f0
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
shll $0x8, %eax
movl %eax, %eax
movl %eax, %ecx
shlq $0x3, %rcx
leaq 0x125a1(%rip), %rax     # 0x150f0
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x238(%rbp)
movq $0x0, -0x230(%rbp)
movq $0x0, -0x240(%rbp)
movq $0x0, -0x228(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x2bde
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %al
movb %al, -0x241(%rbp)
movq -0x20(%rbp), %rax
movzbl -0x241(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
leaq 0x1252f(%rip), %rcx     # 0x150f0
subq %rcx, %rax
shrq $0xb, %rax
movq -0x240(%rbp,%rax,8), %rcx
addq $0x1, %rcx
movq %rcx, -0x240(%rbp,%rax,8)
jmp 0x2b82
movq -0x250(%rbp), %rax
movq -0x258(%rbp), %rcx
movq -0x20(%rbp), %rdx
leaq 0x124f9(%rip), %rsi     # 0x150f0
subq %rsi, %rdx
shrq $0xb, %rdx
movl %edx, %esi
movq -0x18(%rbp), %rdx
movl %esi, (%rdx)
movq -0x238(%rbp), %rdx
movq %rdx, (%rcx)
movq -0x230(%rbp), %rdx
movq %rdx, 0x8(%rcx)
movq -0x238(%rbp), %rdx
addq -0x240(%rbp), %rdx
addq -0x228(%rbp), %rdx
addq -0x230(%rbp), %rdx
movq %rdx, 0x10(%rcx)
movq -0x10(%rbp), %rdx
movq %rdx, 0x18(%rcx)
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/robertdavidgraham[P]wc2/wc2.c
// Function: parse_chunk_p
static struct results
parse_chunk_p(const unsigned char *buf, size_t length, unsigned *inout_state)
{
    size_t state = *inout_state;
    const unsigned char *end;
    unsigned counts[STATE_MAX];
    unsigned char c;

    /* We only care about the first four states, so these will be initialized to zero.
     * Since we don't use the other ~100 counts for the other states, we won't initialize them */
    counts[NEWLINE] = 0;
    counts[NEWWORD] = 0;
    counts[WASSPACE] = 0;
    counts[WASWORD] = 0;

    /* This is the inner-loop where 99.9% of the execution time of this program will
     * be spent. */
    end = buf + length;
    while (buf < end) {
        c = *buf++;
        state = table[state][c];
        counts[state]++;
    }

    /* Save the ending state for the next chunk */
    *inout_state = state;

    /* Return the results */
    {
        struct results results;
        results.line_count = counts[NEWLINE];
        results.word_count = counts[NEWWORD];
        results.char_count = counts[NEWLINE] + counts[WASSPACE] + counts[WASWORD] + counts[NEWWORD];
        results.byte_count = length;

        return results;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x148(%rbp)
movq %rdi, -0x140(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x20(%rbp)
movl $0x0, -0x12c(%rbp)
movl $0x0, -0x128(%rbp)
movl $0x0, -0x130(%rbp)
movl $0x0, -0x124(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x2d0c
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %al
movb %al, -0x131(%rbp)
movq -0x20(%rbp), %rcx
leaq 0x2411(%rip), %rax      # 0x50f0
shlq $0x8, %rcx
addq %rcx, %rax
movzbl -0x131(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl -0x130(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x130(%rbp,%rax,4)
jmp 0x2cb3
movq -0x140(%rbp), %rax
movq -0x148(%rbp), %rcx
movq -0x20(%rbp), %rdx
movl %edx, %esi
movq -0x18(%rbp), %rdx
movl %esi, (%rdx)
movl -0x12c(%rbp), %edx
movq %rdx, (%rcx)
movl -0x128(%rbp), %edx
movq %rdx, 0x8(%rcx)
movl -0x12c(%rbp), %edx
addl -0x130(%rbp), %edx
addl -0x124(%rbp), %edx
addl -0x128(%rbp), %edx
movl %edx, %edx
movq %rdx, 0x10(%rcx)
movq -0x10(%rbp), %rdx
movq %rdx, 0x18(%rcx)
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/robertdavidgraham[P]wc2/wc2.c
// Function: parse_chunk
static struct results
parse_chunk(const unsigned char *buf, size_t length, unsigned *inout_state)
{
    size_t state = *inout_state;
    size_t i;
    unsigned counts[STATE_MAX];
    unsigned char c;

    /* We only care about the first four states, so these will be initialized to zero.
     * Since we don't use the other ~100 counts for the other states, we won't initialize them */
    counts[NEWLINE] = 0;
    counts[NEWWORD] = 0;
    counts[WASSPACE] = 0;
    counts[WASWORD] = 0;

    /* This is the inner-loop where 99.9% of the execution time of this program will
     * be spent. */
    for (i=0; i<length; i++) {
        c = buf[i];
        state = table[state][c];
        counts[state]++;
    }

    /* Save the ending state for the next chunk */
    *inout_state = state;

    /* Return the results */
    {
        struct results results;
        results.line_count = counts[NEWLINE];
        results.word_count = counts[NEWWORD];
        results.char_count = counts[NEWLINE] + counts[WASSPACE] + counts[WASWORD] + counts[NEWWORD];
        results.byte_count = length;

        return results;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x148(%rbp)
movq %rdi, -0x140(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x20(%rbp)
movl $0x0, -0x12c(%rbp)
movl $0x0, -0x128(%rbp)
movl $0x0, -0x130(%rbp)
movl $0x0, -0x124(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x2e2e
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x131(%rbp)
movq -0x20(%rbp), %rcx
leaq 0x22fb(%rip), %rax      # 0x50f0
shlq $0x8, %rcx
addq %rcx, %rax
movzbl -0x131(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl -0x130(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x130(%rbp,%rax,4)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2dcf
movq -0x140(%rbp), %rax
movq -0x148(%rbp), %rcx
movq -0x20(%rbp), %rdx
movl %edx, %esi
movq -0x18(%rbp), %rdx
movl %esi, (%rdx)
movl -0x12c(%rbp), %edx
movq %rdx, (%rcx)
movl -0x128(%rbp), %edx
movq %rdx, 0x8(%rcx)
movl -0x12c(%rbp), %edx
addl -0x130(%rbp), %edx
addl -0x124(%rbp), %edx
addl -0x128(%rbp), %edx
movl %edx, %edx
movq %rdx, 0x10(%rcx)
movq -0x10(%rbp), %rdx
movq %rdx, 0x18(%rcx)
addq $0xd0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/spiped/dispatch.c
// Function: doaccept
static int
doaccept(struct accept_state * A)
{
	int rc = 0;

	/* Warn about reaching nconn_max. */
	if (A->nconn >= A->nconn_max) {
		warn0("Maximum number of connections (%zu) reached",
		    A->nconn_max);
	}

	/* If we can, accept a new connection. */
	if ((A->nconn < A->nconn_max) && (A->accept_cookie == NULL) &&
	    !A->shutdown_requested) {
		if ((A->accept_cookie =
		    network_accept(A->s, callback_gotconn, A)) == NULL)
			rc = -1;
	}

	/* Return success/fail status. */
	return (rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jb 0x55aa
jmp 0x5587
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rsi
leaq 0x1a182(%rip), %rdi     # 0x1f718
movb $0x0, %al
callq 0xbd50
callq 0x3470
movl $0x0, (%rax)
jmp 0x55aa
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jae 0x55fe
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x55fe
movq -0x8(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jne 0x55fe
movq -0x8(%rbp), %rax
movl (%rax), %edi
movq -0x8(%rbp), %rdx
leaq 0x23e(%rip), %rsi       # 0x5820
callq 0x79c0
movq -0x8(%rbp), %rcx
movq %rax, 0x68(%rcx)
cmpq $0x0, %rax
jne 0x55fc
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
jmp 0x55fe
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/spiped/dispatch.c
// Function: dispatch_shutdown
void
dispatch_shutdown(void * dispatch_cookie)
{
	struct accept_state * A = dispatch_cookie;
	struct conn_list_node * C;

	/*
	 * Shutdown any open connections.  proto_conn_drop() will call
	 * callback_conndied(), which removes the relevant conn_list_node from
	 * the list of conn_cookies.
	 */
	while ((C = LIST_FIRST(&A->conn_cookies)) != NULL) {
		proto_conn_drop(C->conn_cookie, PROTO_CONN_CANCELLED);

		/*
		 * Convince static analyzers that C->conn_cookie is no longer
		 * in the list.
		 */
		assert(C != LIST_FIRST(&A->conn_cookies));
	}

	if (A->accept_cookie != NULL)
		network_accept_cancel(A->accept_cookie);
	if (A->dnstimer_cookie != NULL)
		events_timer_cancel(A->dnstimer_cookie);
	if (A->T != NULL)
		dnsthread_kill(A->T);
	sock_addr_freelist(A->sas);
	if (close(A->s))
		warnp("close");
	free(A);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x5678
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0xcb80
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
je 0x5657
jmp 0x5676
leaq 0x1a06e(%rip), %rdi     # 0x1f6cc
leaq 0x1a089(%rip), %rsi     # 0x1f6ee
movl $0x132, %edx            # imm = 0x132
leaq 0x1a088(%rip), %rcx     # 0x1f6f9
callq 0x3160
jmp 0x5624
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x5690
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x7af0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x56a8
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x7730
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x56c6
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0xc910
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xaad0
movq -0x10(%rbp), %rax
movl (%rax), %edi
callq 0x30d0
cmpl $0x0, %eax
je 0x571c
jmp 0x56e5
callq 0x3470
cmpl $0x0, (%rax)
je 0x570a
leaq 0x1a327(%rip), %rdi     # 0x1fa1d
movb $0x0, %al
callq 0xbb00
callq 0x3470
movl $0x0, (%rax)
jmp 0x5718
leaq 0x1a30c(%rip), %rdi     # 0x1fa1d
movb $0x0, %al
callq 0xbd50
jmp 0x571a
jmp 0x571c
movq -0x10(%rbp), %rdi
callq 0x32b0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/spiped/dispatch.c
// Function: dispatch_request_shutdown
void
dispatch_request_shutdown(void * dispatch_cookie)
{
	struct accept_state * A = dispatch_cookie;

	A->shutdown_requested = 1;

	/* Cancel any further accepts. */
	if (A->accept_cookie != NULL) {
		network_accept_cancel(A->accept_cookie);
		A->accept_cookie = NULL;
	}

	/* If no connections are open... */
	if (A->nconn == 0) {
		/* Indicate that all connections are closed. */
		*A->conndone = 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x40(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x5773
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x7af0
movq -0x10(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x578c
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x1, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/spiped/dispatch.c
// Function: callback_resolve
static int
callback_resolve(void * cookie, struct sock_addr ** sas)
{
	struct accept_state * A = cookie;

	/* If the address resolution succeeded... */
	if (sas != NULL) {
		/* Free the old addresses. */
		sock_addr_freelist(A->sas);

		/* Use the new addresses. */
		A->sas = sas;
	}

	/* Wait a while before resolving again. */
	if ((A->dnstimer_cookie = events_timer_register_double(
	    callback_resolveagain, A, A->rtime)) == NULL)
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x57d8
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xaad0
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rax
movsd 0x20(%rax), %xmm0
leaq -0x2dc(%rip), %rdi      # 0x5510
callq 0x76d0
movq -0x20(%rbp), %rcx
movq %rax, 0x70(%rcx)
cmpq $0x0, %rax
jne 0x5801
jmp 0x580a
movl $0x0, -0x4(%rbp)
jmp 0x5811
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/spiped/dispatch.c
// Function: callback_conndied
static int
callback_conndied(void * cookie, int reason)
{
	struct conn_list_node * node_ptr = cookie;
	struct accept_state * A = node_ptr->A;

	(void)reason; /* UNUSED */

	/* We should always have a non-empty list of conn_cookies. */
	assert(!LIST_EMPTY(&A->conn_cookies));

	/* We've lost a connection. */
	A->nconn -= 1;

	/* Remove the closed connection from the list of conn_cookies. */
	LIST_REMOVE(node_ptr, entries);

	/* Clean up the now-unused node. */
	free(node_ptr);

	/* If requested to do so, indicate that all connections are closed. */
	if (A->shutdown_requested && (A->nconn == 0))
		*A->conndone = 1;

	/* Maybe accept more connections. */
	return (doaccept(A));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x5a90
jmp 0x5aaf
leaq 0x19ce5(%rip), %rdi     # 0x1f77c
leaq 0x19c50(%rip), %rsi     # 0x1f6ee
movl $0x7c, %edx
leaq 0x19cf0(%rip), %rcx     # 0x1f79a
callq 0x3160
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rcx
subq $0x1, %rcx
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5ade
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
callq 0x32b0
movq -0x20(%rbp), %rax
cmpl $0x0, 0x40(%rax)
je 0x5b1d
movq -0x20(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x5b1d
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x1, (%rax)
movq -0x20(%rbp), %rdi
callq 0x5560
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_conn.c
// Function: callback_connect_done
static int
callback_connect_done(void * cookie, int t)
{
	struct conn_state * C = cookie;

	/* This connection attempt is no longer pending. */
	C->connect_cookie = NULL;

	/* Don't need the target address any more. */
	sock_addr_freelist(C->sas);
	C->sas = NULL;

	/* We beat the clock. */
	events_timer_cancel(C->connect_timeout_cookie);
	C->connect_timeout_cookie = NULL;

	/* Did we manage to connect? */
	if ((C->t = t) == -1)
		return (proto_conn_drop(C, PROTO_CONN_CONNECT_FAILED));

	/* If we're encrypting, start the handshake. */
	if (!C->decr) {
		if (starthandshake(C, C->t, C->decr))
			goto err1;
	}

	/* If the handshake already finished, start shuttling data. */
	if ((C->t != -1) && (C->k_f != NULL) && (C->k_r != NULL)) {
		if (launchpipes(C))
			goto err1;
	}

	/* Success! */
	return (0);

err1:
	proto_conn_drop(C, PROTO_CONN_ERROR);

	/* Failure! */
	return (-1);
}

// 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, 0x40(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xaad0
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x7730
movq -0x20(%rbp), %rax
movq $0x0, 0x48(%rax)
movl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
movl %eax, 0x3c(%rcx)
cmpl $-0x1, %eax
jne 0xcfd7
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0xcb80
movl %eax, -0x4(%rbp)
jmp 0xd051
movq -0x20(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0xd001
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x3c(%rax), %esi
movq -0x20(%rbp), %rax
movl 0x18(%rax), %edx
callq 0xd060
cmpl $0x0, %eax
je 0xcfff
jmp 0xd03c
jmp 0xd001
movq -0x20(%rbp), %rax
cmpl $-0x1, 0x3c(%rax)
je 0xd033
movq -0x20(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xd033
movq -0x20(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xd033
movq -0x20(%rbp), %rdi
callq 0xd280
cmpl $0x0, %eax
je 0xd031
jmp 0xd03c
jmp 0xd033
movl $0x0, -0x4(%rbp)
jmp 0xd051
movq -0x20(%rbp), %rdi
movl $0x4, %esi
callq 0xcb80
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_conn.c
// Function: starthandshake
static int
starthandshake(struct conn_state * C, int s, int decr)
{

	/* Start the handshake timer. */
	if ((C->handshake_timeout_cookie = events_timer_register_double(
	    callback_handshake_timeout, C, C->timeo)) == NULL)
		goto err0;

	/* Start the handshake. */
	if ((C->handshake_cookie = proto_handshake(s, decr, C->nopfs,
	    C->requirepfs, C->K, callback_handshake_done, C)) == NULL)
		goto err1;

	/* Success! */
	return (0);

err1:
	events_timer_cancel(C->handshake_timeout_cookie);
	C->handshake_timeout_cookie = NULL;
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movsd 0x30(%rax), %xmm0
leaq 0x8a(%rip), %rdi        # 0xd110
callq 0x76d0
movq -0x10(%rbp), %rcx
movq %rax, 0x58(%rcx)
cmpq $0x0, %rax
jne 0xd09b
jmp 0xd0fd
movl -0x14(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x28(%rax), %r8
movq -0x10(%rbp), %rax
leaq 0x8e(%rip), %r9         # 0xd150
movq %rax, (%rsp)
callq 0xe190
movq -0x10(%rbp), %rcx
movq %rax, 0x50(%rcx)
cmpq $0x0, %rax
jne 0xd0db
jmp 0xd0e4
movl $0x0, -0x4(%rbp)
jmp 0xd104
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x7730
movq -0x10(%rbp), %rax
movq $0x0, 0x58(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_conn.c
// Function: callback_handshake_done
static int
callback_handshake_done(void * cookie, struct proto_keys * f,
    struct proto_keys * r)
{
	struct conn_state * C = cookie;

	/* The handshake is no longer in progress. */
	C->handshake_cookie = NULL;

	/* We beat the clock. */
	events_timer_cancel(C->handshake_timeout_cookie);
	C->handshake_timeout_cookie = NULL;

	/* If the protocol handshake failed, drop the connection. */
	if ((f == NULL) && (r == NULL))
		return (proto_conn_drop(C, PROTO_CONN_HANDSHAKE_FAILED));

	/* We should have two keys. */
	assert(f != NULL);
	assert(r != NULL);

	/* Record the keys so we can free them later. */
	C->k_f = f;
	C->k_r = r;

	/* If we already connected to the target, start shuttling data. */
	if ((C->t != -1) && (C->k_f != NULL) && (C->k_r != NULL)) {
		if (launchpipes(C))
			goto err1;
	}

	/* Success! */
	return (0);

err1:
	proto_conn_drop(C, PROTO_CONN_ERROR);

	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x7730
movq -0x28(%rbp), %rax
movq $0x0, 0x58(%rax)
cmpq $0x0, -0x18(%rbp)
jne 0xd1b5
cmpq $0x0, -0x20(%rbp)
jne 0xd1b5
movq -0x28(%rbp), %rdi
movl $0x3, %esi
callq 0xcb80
movl %eax, -0x4(%rbp)
jmp 0xd26d
cmpq $0x0, -0x18(%rbp)
je 0xd1be
jmp 0xd1dd
leaq 0x13299(%rip), %rdi     # 0x2045e
leaq 0x1329c(%rip), %rsi     # 0x20468
movl $0x163, %edx            # imm = 0x163
leaq 0x132aa(%rip), %rcx     # 0x20482
callq 0x3160
cmpq $0x0, -0x20(%rbp)
je 0xd1e6
jmp 0xd205
leaq 0x13064(%rip), %rdi     # 0x20251
leaq 0x13274(%rip), %rsi     # 0x20468
movl $0x164, %edx            # imm = 0x164
leaq 0x13282(%rip), %rcx     # 0x20482
callq 0x3160
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x28(%rbp), %rax
cmpl $-0x1, 0x3c(%rax)
je 0xd24f
movq -0x28(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xd24f
movq -0x28(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xd24f
movq -0x28(%rbp), %rdi
callq 0xd280
cmpl $0x0, %eax
je 0xd24d
jmp 0xd258
jmp 0xd24f
movl $0x0, -0x4(%rbp)
jmp 0xd26d
movq -0x28(%rbp), %rdi
movl $0x4, %esi
callq 0xcb80
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_conn.c
// Function: callback_pipestatus
static int
callback_pipestatus(void * cookie)
{
	struct conn_state * C = cookie;

	/* If we have an error in either direction, kill the connection. */
	if ((C->stat_f == -1) || (C->stat_r == -1))
		return (proto_conn_drop(C, PROTO_CONN_ERROR));

	/* If both directions have been shut down, kill the connection. */
	if ((C->stat_f == 0) && (C->stat_r == 0))
		return (proto_conn_drop(C, PROTO_CONN_CLOSED));

	/* Nothing to do. */
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $-0x1, 0x80(%rax)
je 0xd41e
movq -0x18(%rbp), %rax
cmpl $-0x1, 0x84(%rax)
jne 0xd431
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0xcb80
movl %eax, -0x4(%rbp)
jmp 0xd462
movq -0x18(%rbp), %rax
cmpl $0x0, 0x80(%rax)
jne 0xd45b
movq -0x18(%rbp), %rax
cmpl $0x0, 0x84(%rax)
jne 0xd45b
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xcb80
movl %eax, -0x4(%rbp)
jmp 0xd462
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_handshake.c
// Function: proto_handshake
void *
proto_handshake(int s, int decr, int nopfs, int requirepfs,
    const struct proto_secret * K,
    int (* callback)(void *, struct proto_keys *, struct proto_keys *),
    void * cookie)
{
	struct handshake_cookie * H;

	/* Bake a cookie. */
	if ((H = malloc(sizeof(struct handshake_cookie))) == NULL)
		goto err0;
	H->callback = callback;
	H->cookie = cookie;
	H->s = s;
	H->decr = decr;
	H->nopfs = nopfs;
	H->requirepfs = requirepfs;
	H->K = K;

	/* Generate a 32-byte connection nonce. */
	if (crypto_entropy_read(H->nonce_local, 32))
		goto err1;

	/* Send our nonce. */
	if ((H->write_cookie = network_write(s, H->nonce_local, 32, 32,
	    callback_nonce_write, H)) == NULL)
		goto err1;

	/* Read the other party's nonce. */
	if ((H->read_cookie = network_read(s, H->nonce_remote, 32, 32,
	    callback_nonce_read, H)) == NULL)
		goto err2;

	/* Success! */
	return (H);

err2:
	network_write_cancel(H->write_cookie);
err1:
	free(H);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x10(%rbp), %rax
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movl $0x318, %edi            # imm = 0x318
callq 0x31b0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0xe1c9
jmp 0xe2bf
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0xc(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x10(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rdi
addq $0x28, %rdi
movl $0x20, %esi
callq 0x1a680
cmpl $0x0, %eax
je 0xe230
jmp 0xe2b6
movl -0xc(%rbp), %edi
movq -0x30(%rbp), %rsi
addq $0x28, %rsi
movq -0x30(%rbp), %r9
movl $0x20, %ecx
leaq 0x95(%rip), %r8         # 0xe2e0
movq %rcx, %rdx
callq 0x1cab0
movq -0x30(%rbp), %rcx
movq %rax, 0x310(%rcx)
cmpq $0x0, %rax
jne 0xe266
jmp 0xe2b6
movl -0xc(%rbp), %edi
movq -0x30(%rbp), %rsi
addq $0x48, %rsi
movq -0x30(%rbp), %r9
movl $0x20, %ecx
leaq 0xcf(%rip), %r8         # 0xe350
movq %rcx, %rdx
callq 0x1c4d0
movq -0x30(%rbp), %rcx
movq %rax, 0x308(%rcx)
cmpq $0x0, %rax
jne 0xe29c
jmp 0xe2a6
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe2c7
movq -0x30(%rbp), %rax
movq 0x310(%rax), %rdi
callq 0x1cd90
movq -0x30(%rbp), %rdi
callq 0x32b0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_handshake.c
// Function: callback_nonce_write
static int
callback_nonce_write(void * cookie, ssize_t len)
{
	struct handshake_cookie * H = cookie;

	/* This write is no longer pending. */
	H->write_cookie = NULL;

	/* Did we successfully write? */
	if (len < 32)
		return (handshakefail(H));

	/* If the nonce read is also done, move on to the next step. */
	if (H->read_cookie == NULL)
		return (gotnonces(H));

	/* Nothing to do. */
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x310(%rax)
cmpq $0x20, -0x18(%rbp)
jge 0xe31c
movq -0x20(%rbp), %rdi
callq 0xe420
movl %eax, -0x4(%rbp)
jmp 0xe33f
movq -0x20(%rbp), %rax
cmpq $0x0, 0x308(%rax)
jne 0xe338
movq -0x20(%rbp), %rdi
callq 0xe4a0
movl %eax, -0x4(%rbp)
jmp 0xe33f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_handshake.c
// Function: callback_nonce_read
static int
callback_nonce_read(void * cookie, ssize_t len)
{
	struct handshake_cookie * H = cookie;

	/* This read is no longer pending. */
	H->read_cookie = NULL;

	/* Did we successfully read? */
	if (len < 32)
		return (handshakefail(H));

	/* If the nonce write is also done, move on to the next step. */
	if (H->write_cookie == NULL)
		return (gotnonces(H));

	/* Nothing to do. */
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x308(%rax)
cmpq $0x20, -0x18(%rbp)
jge 0xe38c
movq -0x20(%rbp), %rdi
callq 0xe420
movl %eax, -0x4(%rbp)
jmp 0xe3af
movq -0x20(%rbp), %rax
cmpq $0x0, 0x310(%rax)
jne 0xe3a8
movq -0x20(%rbp), %rdi
callq 0xe4a0
movl %eax, -0x4(%rbp)
jmp 0xe3af
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_handshake.c
// Function: proto_handshake_cancel
void
proto_handshake_cancel(void * cookie)
{
	struct handshake_cookie * H = cookie;

	/* Cancel any in-progress network operations. */
	if (H->read_cookie != NULL)
		network_read_cancel(H->read_cookie);
	if (H->write_cookie != NULL)
		network_write_cancel(H->write_cookie);

	/* Free the cookie. */
	free(H);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x308(%rax)
je 0xe3f2
movq -0x10(%rbp), %rax
movq 0x308(%rax), %rdi
callq 0x1c7a0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x310(%rax)
je 0xe410
movq -0x10(%rbp), %rax
movq 0x310(%rax), %rdi
callq 0x1cd90
movq -0x10(%rbp), %rdi
callq 0x32b0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_handshake.c
// Function: handshakefail
static int
handshakefail(struct handshake_cookie * H)
{
	int rc;

	/* Cancel any pending network read or write. */
	if (H->read_cookie != NULL)
		network_read_cancel(H->read_cookie);
	if (H->write_cookie != NULL)
		network_write_cancel(H->write_cookie);

	/* Perform the callback. */
	rc = (H->callback)(H->cookie, NULL, NULL);

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x308(%rax)
je 0xe44a
movq -0x8(%rbp), %rax
movq 0x308(%rax), %rdi
callq 0x1c7a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x310(%rax)
je 0xe468
movq -0x8(%rbp), %rax
movq 0x310(%rax), %rdi
callq 0x1cd90
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
xorl %ecx, %ecx
movl %ecx, %edx
movq %rdx, %rsi
callq *%rax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x32b0
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_handshake.c
// Function: gotnonces
static int
gotnonces(struct handshake_cookie * H)
{

	/* Compute the diffie-hellman parameter MAC keys. */
	proto_crypt_dhmac(H->K, H->nonce_local, H->nonce_remote,
	    H->dhmac_local, H->dhmac_remote, H->decr);

	/*
	 * If we're the server, we need to read the client's diffie-hellman
	 * parameter.  If we're the client, we need to generate and send our
	 * diffie-hellman parameter.
	 */
	if (H->decr)
		return (dhread(H));
	else
		return (dhwrite(H));

	/* NOTREACHED */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
movq -0x10(%rbp), %rdx
addq $0x48, %rdx
movq -0x10(%rbp), %rcx
addq $0x68, %rcx
movq -0x10(%rbp), %r8
addq $0x88, %r8
movq -0x10(%rbp), %rax
movl 0x14(%rax), %r9d
callq 0xd750
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0xe4fc
movq -0x10(%rbp), %rdi
callq 0xe520
movl %eax, -0x4(%rbp)
jmp 0xe508
movq -0x10(%rbp), %rdi
callq 0xe590
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_handshake.c
// Function: dhread
static int
dhread(struct handshake_cookie * H)
{

	/* Read the remote signed diffie-hellman parameter. */
	if ((H->read_cookie = network_read(H->s, H->yh_remote, PCRYPT_YH_LEN,
	    PCRYPT_YH_LEN, callback_dh_read, H)) == NULL)
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edi
movq -0x10(%rbp), %rsi
addq $0x1e8, %rsi            # imm = 0x1E8
movq -0x10(%rbp), %r9
movl $0x120, %ecx            # imm = 0x120
leaq 0xe2(%rip), %r8         # 0xe630
movq %rcx, %rdx
callq 0x1c4d0
movq -0x10(%rbp), %rcx
movq %rax, 0x308(%rcx)
cmpq $0x0, %rax
jne 0xe569
jmp 0xe572
movl $0x0, -0x4(%rbp)
jmp 0xe579
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_handshake.c
// Function: dhwrite
static int
dhwrite(struct handshake_cookie * H)
{

	/* Generate a signed diffie-hellman parameter. */
	if (proto_crypt_dh_generate(H->yh_local, H->x, H->dhmac_local,
	    H->nopfs))
		goto err0;

	/* Write our signed diffie-hellman parameter. */
	if ((H->write_cookie = network_write(H->s, H->yh_local, PCRYPT_YH_LEN,
	    PCRYPT_YH_LEN, callback_dh_write, H)) == NULL)
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc8, %rdi
movq -0x10(%rbp), %rsi
addq $0xa8, %rsi
movq -0x10(%rbp), %rdx
addq $0x68, %rdx
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
callq 0xda20
cmpl $0x0, %eax
je 0xe5cd
jmp 0xe613
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edi
movq -0x10(%rbp), %rsi
addq $0xc8, %rsi
movq -0x10(%rbp), %r9
movl $0x120, %ecx            # imm = 0x120
leaq 0x201(%rip), %r8        # 0xe7f0
movq %rcx, %rdx
callq 0x1cab0
movq -0x10(%rbp), %rcx
movq %rax, 0x310(%rcx)
cmpq $0x0, %rax
jne 0xe60a
jmp 0xe613
movl $0x0, -0x4(%rbp)
jmp 0xe61a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_handshake.c
// Function: callback_dh_read
static int
callback_dh_read(void * cookie, ssize_t len)
{
	struct handshake_cookie * H = cookie;

	/* This read is no longer pending. */
	H->read_cookie = NULL;

	/* Did we successfully read? */
	if (len < PCRYPT_YH_LEN)
		return (handshakefail(H));

	/* Is the value we read valid? */
	if (proto_crypt_dh_validate(H->yh_remote, H->dhmac_remote,
	    H->requirepfs))
		return (handshakefail(H));

	/*
	 * If we're the server, we need to send our diffie-hellman parameter
	 * next.  If we're the client, move on to the final computation.
	 */
	if (H->decr)
		return (dhwrite(H));
	else
		return (handshakedone(H));

	/* NOTREACHED */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x308(%rax)
cmpq $0x120, -0x18(%rbp)     # imm = 0x120
jge 0xe66f
movq -0x20(%rbp), %rdi
callq 0xe420
movl %eax, -0x4(%rbp)
jmp 0xe6c8
movq -0x20(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movq -0x20(%rbp), %rsi
addq $0x88, %rsi
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %edx
callq 0xd910
cmpl $0x0, %eax
je 0xe6a4
movq -0x20(%rbp), %rdi
callq 0xe420
movl %eax, -0x4(%rbp)
jmp 0xe6c8
movq -0x20(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0xe6bc
movq -0x20(%rbp), %rdi
callq 0xe590
movl %eax, -0x4(%rbp)
jmp 0xe6c8
movq -0x20(%rbp), %rdi
callq 0xe6e0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_handshake.c
// Function: handshakedone
static int
handshakedone(struct handshake_cookie * H)
{
	struct proto_keys * c;
	struct proto_keys * s;
	int rc;

	/* Sanity-check: There should be no callbacks in progress. */
	assert(H->read_cookie == NULL);
	assert(H->write_cookie == NULL);

	/* Perform the final computation. */
	if (proto_crypt_mkkeys(H->K, H->nonce_local, H->nonce_remote,
	    H->yh_remote, H->x, H->nopfs, H->decr, &c, &s))
		goto err0;

	/* Perform the callback. */
	rc = (H->callback)(H->cookie, c, s);

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x308(%rax)
jne 0xe6fc
jmp 0xe71b
leaq 0x11e8c(%rip), %rdi     # 0x2058f
leaq 0x11e9c(%rip), %rsi     # 0x205a6
movl $0x122, %edx            # imm = 0x122
leaq 0x11eaf(%rip), %rcx     # 0x205c5
callq 0x3160
movq -0x10(%rbp), %rax
cmpq $0x0, 0x310(%rax)
jne 0xe72b
jmp 0xe74a
leaq 0x11ec0(%rip), %rdi     # 0x205f2
leaq 0x11e6d(%rip), %rsi     # 0x205a6
movl $0x123, %edx            # imm = 0x123
leaq 0x11e80(%rip), %rcx     # 0x205c5
callq 0x3160
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
movq -0x10(%rbp), %rdx
addq $0x48, %rdx
movq -0x10(%rbp), %rcx
addq $0x1e8, %rcx            # imm = 0x1E8
movq -0x10(%rbp), %r8
addq $0xa8, %r8
movq -0x10(%rbp), %rax
movl 0x18(%rax), %r9d
movq -0x10(%rbp), %rax
movl 0x14(%rax), %r11d
leaq -0x18(%rbp), %r10
leaq -0x20(%rbp), %rax
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0xdab0
cmpl $0x0, %eax
je 0xe7aa
jmp 0xe7d7
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32b0
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xe7de
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/proto/proto_handshake.c
// Function: callback_dh_write
static int
callback_dh_write(void * cookie, ssize_t len)
{
	struct handshake_cookie * H = cookie;

	/* This write is no longer pending. */
	H->write_cookie = NULL;

	/* Did we successfully write? */
	if (len < PCRYPT_YH_LEN)
		return (handshakefail(H));

	/*
	 * If we're the server, move on to the final computation.  If we're
	 * the client, we need to read the server's parameter next.
	 */
	if (H->decr)
		return (handshakedone(H));
	else
		return (dhread(H));

	/* NOTREACHED */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x310(%rax)
cmpq $0x120, -0x18(%rbp)     # imm = 0x120
jge 0xe82f
movq -0x20(%rbp), %rdi
callq 0xe420
movl %eax, -0x4(%rbp)
jmp 0xe853
movq -0x20(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0xe847
movq -0x20(%rbp), %rdi
callq 0xe6e0
movl %eax, -0x4(%rbp)
jmp 0xe853
movq -0x20(%rbp), %rdi
callq 0xe520
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/util/graceful_shutdown.c
// Function: graceful_shutdown_initialize
int
graceful_shutdown_initialize(int (* begin_shutdown_parent)(void *),
    void * caller_cookie_parent)
{

	/* Record callback data. */
	begin_shutdown = begin_shutdown_parent;
	caller_cookie = caller_cookie_parent;

	/* Start signal handler and save the original one. */
	if ((sighandler_sigterm_orig = signal(SIGTERM,
	    graceful_shutdown_handler)) == SIG_ERR) {
		warnp("signal");
		goto err0;
	}

	/* Clean up the timer cookie at exit. */
	if (atexit(graceful_shutdown_atexit))
		goto err0;

	/* Periodically check whether a signal was received. */
	if ((timer_cookie = events_timer_register_double(
	    graceful_shutdown, NULL, 1.0)) == NULL) {
		warnp("Failed to register the graceful shutdown timer");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x28a95(%rip)     # 0x37830
movq -0x18(%rbp), %rax
movq %rax, 0x28a92(%rip)     # 0x37838
movl $0xf, %edi
leaq 0xde(%rip), %rsi        # 0xee90
callq 0x3050
movq %rax, 0x28a82(%rip)     # 0x37840
movq $-0x1, %rcx
cmpq %rcx, %rax
jne 0xee03
jmp 0xedcc
callq 0x3470
cmpl $0x0, (%rax)
je 0xedf1
leaq 0x1182d(%rip), %rdi     # 0x2060a
movb $0x0, %al
callq 0xbb00
callq 0x3470
movl $0x0, (%rax)
jmp 0xedff
leaq 0x11812(%rip), %rdi     # 0x2060a
movb $0x0, %al
callq 0xbd50
jmp 0xee01
jmp 0xee7d
leaq 0xa6(%rip), %rdi        # 0xeeb0
callq 0x1e1f0
cmpl $0x0, %eax
je 0xee16
jmp 0xee7d
leaq 0xc3(%rip), %rdi        # 0xeee0
xorl %eax, %eax
movl %eax, %esi
movsd 0x101f7(%rip), %xmm0    # 0x1f020
callq 0x76d0
movq %rax, 0x28a13(%rip)     # 0x37848
cmpq $0x0, %rax
jne 0xee74
jmp 0xee3d
callq 0x3470
cmpl $0x0, (%rax)
je 0xee62
leaq 0x117c3(%rip), %rdi     # 0x20611
movb $0x0, %al
callq 0xbb00
callq 0x3470
movl $0x0, (%rax)
jmp 0xee70
leaq 0x117a8(%rip), %rdi     # 0x20611
movb $0x0, %al
callq 0xbd50
jmp 0xee72
jmp 0xee7d
movl $0x0, -0x4(%rbp)
jmp 0xee84
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/util/graceful_shutdown.c
// Function: graceful_shutdown
static int
graceful_shutdown(void * cookie)
{

	(void)cookie; /* UNUSED */

	/* This timer has expired. */
	timer_cookie = NULL;

	/* Use the callback function, or schedule another check in 1 second. */
	if (should_shutdown) {
		if (begin_shutdown(caller_cookie) != 0) {
			warn0("Failed to begin shutdown");
			goto err0;
		}

		/* Restore original SIGTERM handler. */
		if (signal(SIGTERM, sighandler_sigterm_orig) == SIG_ERR)
			warnp("Failed to restore original SIGTERM handler");
	} else {
		if ((timer_cookie = events_timer_register_double(
		    graceful_shutdown, NULL, 1.0)) == NULL) {
			warnp("Failed to register the graceful shutdown timer");
			goto err0;
		}
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, 0x28951(%rip) # 0x37848
movl 0x28953(%rip), %eax     # 0x37850
cmpl $0x0, %eax
je 0xef93
movq 0x28923(%rip), %rax     # 0x37830
movq 0x28924(%rip), %rdi     # 0x37838
callq *%rax
cmpl $0x0, %eax
je 0xef3b
jmp 0xef1d
leaq 0x1178d(%rip), %rdi     # 0x206b1
movb $0x0, %al
callq 0xbd50
callq 0x3470
movl $0x0, (%rax)
jmp 0xeffc
movq 0x288fe(%rip), %rsi     # 0x37840
movl $0xf, %edi
callq 0x3050
movq $-0x1, %rcx
cmpq %rcx, %rax
jne 0xef91
jmp 0xef5a
callq 0x3470
cmpl $0x0, (%rax)
je 0xef7f
leaq 0x1175f(%rip), %rdi     # 0x206ca
movb $0x0, %al
callq 0xbb00
callq 0x3470
movl $0x0, (%rax)
jmp 0xef8d
leaq 0x11744(%rip), %rdi     # 0x206ca
movb $0x0, %al
callq 0xbd50
jmp 0xef8f
jmp 0xef91
jmp 0xeff3
leaq -0xba(%rip), %rdi       # 0xeee0
xorl %eax, %eax
movl %eax, %esi
movsd 0x1007a(%rip), %xmm0    # 0x1f020
callq 0x76d0
movq %rax, 0x28896(%rip)     # 0x37848
cmpq $0x0, %rax
jne 0xeff1
jmp 0xefba
callq 0x3470
cmpl $0x0, (%rax)
je 0xefdf
leaq 0x11646(%rip), %rdi     # 0x20611
movb $0x0, %al
callq 0xbb00
callq 0x3470
movl $0x0, (%rax)
jmp 0xefed
leaq 0x1162b(%rip), %rdi     # 0x20611
movb $0x0, %al
callq 0xbd50
jmp 0xefef
jmp 0xeffc
jmp 0xeff3
movl $0x0, -0x4(%rbp)
jmp 0xf003
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../lib/util/graceful_shutdown.c
// Function: graceful_shutdown_manual
void
graceful_shutdown_manual(void)
{

	/* Sanity check: we must be initialized. */
	assert(begin_shutdown != NULL);
	assert(caller_cookie != NULL);

	/* Stop the timer. */
	if (timer_cookie != NULL) {
		events_timer_cancel(timer_cookie);
		timer_cookie = NULL;
	}

	/* Shut down. */
	should_shutdown = 1;
	graceful_shutdown(NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0x28814(%rip)     # 0x37830
je 0xf020
jmp 0xf03f
leaq 0x11619(%rip), %rdi     # 0x20640
leaq 0x11629(%rip), %rsi     # 0x20657
movl $0x7d, %edx
leaq 0x1163d(%rip), %rcx     # 0x20677
callq 0x3160
cmpq $0x0, 0x287f1(%rip)     # 0x37838
je 0xf04b
jmp 0xf06a
leaq 0x11649(%rip), %rdi     # 0x2069b
leaq 0x115fe(%rip), %rsi     # 0x20657
movl $0x7e, %edx
leaq 0x11612(%rip), %rcx     # 0x20677
callq 0x3160
cmpq $0x0, 0x287d6(%rip)     # 0x37848
je 0xf08b
movq 0x287cd(%rip), %rdi     # 0x37848
callq 0x7730
movq $0x0, 0x287bd(%rip) # 0x37848
movl $0x1, 0x287bb(%rip)     # 0x37850
xorl %eax, %eax
movl %eax, %edi
callq 0xeee0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/bloomsource[P]dns_update/md5.c
// Function: md5_starts
void md5_starts( md5_context *ctx )
{
    ctx->total[0] = 0;
    ctx->total[1] = 0;

    ctx->state[0] = 0x67452301;
    ctx->state[1] = 0xEFCDAB89;
    ctx->state[2] = 0x98BADCFE;
    ctx->state[3] = 0x10325476;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x67452301, 0x10(%rax) # imm = 0x67452301
movq -0x8(%rbp), %rax
movl $0xefcdab89, %ecx       # imm = 0xEFCDAB89
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x98badcfe, %ecx       # imm = 0x98BADCFE
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq $0x10325476, 0x28(%rax) # imm = 0x10325476
popq %rbp
retq
nopw %cs:(%rax,%rax)