LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/liball/../lib/proto/proto_conn.c
// Function: proto_conn_create
void *
proto_conn_create(int s, struct sock_addr ** sas,
    const struct sock_addr * sa_b, int decr, int nopfs,
    int requirepfs, int nokeepalive, const struct proto_secret * K,
    double timeo, int (* callback_dead)(void *, int), void * cookie)
{
	struct conn_state * C;

	/* Bake a cookie for this connection. */
	if ((C = malloc(sizeof(struct conn_state))) == NULL)
		goto err0;
	C->callback_dead = callback_dead;
	C->cookie = cookie;
	C->sas = sas;
	C->decr = decr;
	C->nopfs = nopfs;
	C->requirepfs = requirepfs;
	C->nokeepalive = nokeepalive;
	C->K = K;
	C->timeo = timeo;
	C->s = s;
	C->t = -1;
	C->connect_cookie = NULL;
	C->connect_timeout_cookie = NULL;
	C->handshake_cookie = NULL;
	C->handshake_timeout_cookie = NULL;
	C->k_f = C->k_r = NULL;
	C->pipe_f = C->pipe_r = NULL;
	C->stat_f = C->stat_r = 1;

	/* Start the connect timer. */
	if ((C->connect_timeout_cookie = events_timer_register_double(
	    callback_connect_timeout, C, C->timeo)) == NULL)
		goto err1;

	/* Connect to target. */
	if ((C->connect_cookie =
	    network_connect_bind(C->sas, sa_b, callback_connect_done, C))
	    == NULL)
		goto err2;

	/* If we're decrypting, start the handshake. */
	if (C->decr) {
		if (starthandshake(C, C->s, C->decr))
			goto err3;
	}

	/* Success! */
	return (C);

err3:
	network_connect_cancel(C->connect_cookie);
err2:
	events_timer_cancel(C->connect_timeout_cookie);
err1:
	free(C);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, 0x10(%rsp)
movl %r9d, %ebp
movl %r8d, %r12d
movl %ecx, %r13d
movq %rdx, 0x8(%rsp)
movq %rsi, %r14
movl %edi, %r15d
movl $0x88, %edi
callq 0x31a0
testq %rax, %rax
je 0x9a2d
movq %rax, %rbx
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %rdx
movl 0x50(%rsp), %esi
movq %rcx, (%rbx)
movq %rax, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movl %r13d, 0x18(%rbx)
movl %r12d, 0x1c(%rbx)
movl %ebp, 0x20(%rbx)
movl %esi, 0x24(%rbx)
movq %rdx, 0x28(%rbx)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x30(%rbx)
movl %r15d, 0x38(%rbx)
movl $0xffffffff, 0x3c(%rbx) # imm = 0xFFFFFFFF
xorps %xmm1, %xmm1
movups %xmm1, 0x40(%rbx)
movups %xmm1, 0x50(%rbx)
movups %xmm1, 0x60(%rbx)
movups %xmm1, 0x70(%rbx)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x80(%rbx)
leaq 0x7c(%rip), %rdi        # 0x9a41
movq %rbx, %rsi
callq 0x665d
movq %rax, 0x48(%rbx)
testq %rax, %rax
je 0x9a25
movq 0x10(%rbx), %rdi
leaq 0x72(%rip), %rdx        # 0x9a53
movq 0x8(%rsp), %rsi
movq %rbx, %rcx
callq 0xf739
movq %rax, 0x40(%rbx)
testq %rax, %rax
je 0x9a1c
movl 0x18(%rbx), %edx
testl %edx, %edx
je 0x9a2f
movl 0x38(%rbx), %esi
movq %rbx, %rdi
callq 0x9b00
testl %eax, %eax
je 0x9a2f
movq %rbx, %rax
addq $0x40, %rax
movq (%rax), %rdi
callq 0xf756
movq 0x48(%rbx), %rdi
callq 0x6692
movq %rbx, %rdi
callq 0x32b0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
xorl %r15d, %r15d
movq %r15, 0x40(%rdi)
movq 0x10(%rdi), %rdi
callq 0x841a
movq %r15, 0x10(%rbx)
movq 0x48(%rbx), %rdi
callq 0x6692
movq %r15, 0x48(%rbx)
movl %r14d, 0x3c(%rbx)
cmpl $-0x1, %r14d
je 0x9aaf
cmpl $0x0, 0x18(%rbx)
je 0x9ac6
xorl %ebp, %ebp
cmpq $0x0, 0x60(%rbx)
je 0x9aeb
cmpq $0x0, 0x68(%rbx)
je 0x9aeb
movq %rbx, %rdi
callq 0x9c56
testl %eax, %eax
jne 0x9ad9
jmp 0x9aeb
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9804
xorl %ebp, %ebp
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x9b00
testl %eax, %eax
je 0x9af8
movq %rbx, %rdi
movl $0x4, %esi
callq 0x9804
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $-0x1, 0x3c(%rbx)
jne 0x9a91
jmp 0x9aeb
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movsd 0x30(%rdi), %xmm0
leaq 0x65(%rip), %rdi        # 0x9b81
movq %rbx, %rsi
callq 0x665d
movq %rax, %rcx
movq %rax, 0x58(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
je 0x9b78
movl 0x1c(%rbx), %edx
movl 0x20(%rbx), %ecx
movq 0x28(%rbx), %r8
movq %rbx, (%rsp)
leaq 0x49(%rip), %r9         # 0x9b93
movl %r14d, %edi
movl %ebp, %esi
callq 0xa504
movq %rax, %rcx
movq %rax, 0x50(%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x9b78
movq 0x58(%rbx), %rdi
callq 0x6692
movq $0x0, 0x58(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorl %r12d, %r12d
movq %r12, 0x50(%rdi)
movq 0x58(%rdi), %rdi
callq 0x6692
movq %r12, 0x58(%rbx)
movq %r15, %rax
orq %r14, %rax
jne 0x9bd5
movq %rbx, %rdi
movl $0x3, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9804
testq %r15, %r15
je 0x9c18
testq %r14, %r14
je 0x9c37
movq %r15, 0x60(%rbx)
movq %r14, 0x68(%rbx)
xorl %ebp, %ebp
cmpl $-0x1, 0x3c(%rbx)
je 0x9c0d
movq %rbx, %rdi
callq 0x9c56
testl %eax, %eax
je 0x9c0d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x9804
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x84d5(%rip), %rdi      # 0x120f4
leaq 0x84d8(%rip), %rsi      # 0x120fe
leaq 0x84eb(%rip), %rcx      # 0x12118
movl $0x163, %edx            # imm = 0x163
callq 0x3150
leaq 0x82a9(%rip), %rdi      # 0x11ee7
leaq 0x84b9(%rip), %rsi      # 0x120fe
leaq 0x84cc(%rip), %rcx      # 0x12118
movl $0x164, %edx            # imm = 0x164
callq 0x3150
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, (%rsp)
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %ebp
movl %edi, %r13d
movl $0x318, %edi            # imm = 0x318
callq 0x31a0
testq %rax, %rax
je 0xa573
movq %rax, %rbx
movq 0x40(%rsp), %rax
movq %r14, (%rbx)
movq %rax, 0x8(%rbx)
movl %r13d, 0x10(%rbx)
movl %ebp, 0x14(%rbx)
movl %r12d, 0x18(%rbx)
movl %r15d, 0x1c(%rbx)
movq (%rsp), %rax
movq %rax, 0x20(%rbx)
leaq 0x28(%rbx), %r14
movl $0x20, %esi
movq %r14, %rdi
callq 0xe9b8
testl %eax, %eax
je 0xa587
movq %rbx, %rdi
callq 0x32b0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x64(%rip), %r8         # 0xa5f2
movl $0x20, %edx
movl $0x20, %ecx
movl %r13d, %edi
movq %r14, %rsi
movq %rbx, %r9
callq 0xffd4
movq %rax, 0x310(%rbx)
testq %rax, %rax
je 0xa56b
movq %rbx, %rsi
addq $0x48, %rsi
leaq 0x54(%rip), %r8         # 0xa614
movl $0x20, %edx
movl $0x20, %ecx
movl %r13d, %edi
movq %rbx, %r9
callq 0xfaa8
movq %rax, 0x308(%rbx)
testq %rax, %rax
jne 0xa575
movq 0x310(%rbx), %rdi
callq 0x102af
jmp 0xa56b
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rdi, %rbx
movq 0x308(%rdi), %rdi
testq %rdi, %rdi
je 0xa647
callq 0xfd60
movq 0x310(%rbx), %rdi
testq %rdi, %rdi
je 0xa658
callq 0x102af
movq %rbx, %rdi
popq %rbx
jmp 0x32b0
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x308(%rdi), %rdi
testq %rdi, %rdi
je 0xa678
callq 0xfd60
movq 0x310(%rbx), %rdi
testq %rdi, %rdi
je 0xa689
callq 0x102af
movq 0x8(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq *(%rbx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x32b0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
leaq 0x28(%rbx), %rsi
leaq 0x48(%rbx), %rdx
leaq 0x68(%rbx), %rcx
leaq 0x88(%rbx), %r8
movl 0x14(%rbx), %r9d
callq 0x9fef
cmpl $0x0, 0x14(%rbx)
je 0xa706
movl 0x10(%rbx), %edi
leaq 0x1e8(%rbx), %rsi
leaq 0x92(%rip), %r8         # 0xa773
movl $0x120, %edx            # imm = 0x120
movl $0x120, %ecx            # imm = 0x120
movq %rbx, %r9
callq 0xfaa8
movq %rax, 0x308(%rbx)
xorl %ecx, %ecx
cmpq $0x1, %rax
sbbl %ecx, %ecx
movl %ecx, %eax
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0xa70c
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xc8(%rdi), %r14
leaq 0xa8(%rdi), %rsi
leaq 0x68(%rdi), %rdx
movl 0x18(%rdi), %ecx
movq %r14, %rdi
callq 0xa11c
testl %eax, %eax
je 0xa73b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xa76b
movl 0x10(%rbx), %edi
leaq 0x146(%rip), %r8        # 0xa88b
movl $0x120, %edx            # imm = 0x120
movl $0x120, %ecx            # imm = 0x120
movq %r14, %rsi
movq %rbx, %r9
callq 0xffd4
movq %rax, %rcx
movq %rax, 0x310(%rbx)
xorl %eax, %eax
testq %rcx, %rcx
je 0xa734
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rbx
subq $0x18, %rsp
cmpq $0x0, 0x308(%rdi)
jne 0xa84d
movq %rdi, %rbx
cmpq $0x0, 0x310(%rdi)
jne 0xa86c
movq 0x20(%rbx), %rdi
leaq 0x28(%rbx), %rsi
leaq 0x48(%rbx), %rdx
leaq 0x1e8(%rbx), %rcx
leaq 0xa8(%rbx), %r8
movl 0x14(%rbx), %eax
movl 0x18(%rbx), %r9d
subq $0x8, %rsp
leaq 0x10(%rsp), %r10
leaq 0x18(%rsp), %r11
pushq %r10
pushq %r11
pushq %rax
callq 0xa17c
addq $0x20, %rsp
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0xa844
movq 0x8(%rbx), %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq *(%rbx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x32b0
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
leaq 0x79cf(%rip), %rdi      # 0x12223
leaq 0x79df(%rip), %rsi      # 0x1223a
leaq 0x79f7(%rip), %rcx      # 0x12259
movl $0x122, %edx            # imm = 0x122
callq 0x3150
leaq 0x7a13(%rip), %rdi      # 0x12286
leaq 0x79c0(%rip), %rsi      # 0x1223a
leaq 0x79d8(%rip), %rcx      # 0x12259
movl $0x123, %edx            # imm = 0x123
callq 0x3150
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rdi, %rbx
movq $0x0, 0x310(%rdi)
cmpq $0x11f, %rsi            # imm = 0x11F
jg 0xa8ac
movq %rbx, %rdi
popq %rbx
jmp 0xa661
cmpl $0x0, 0x14(%rbx)
je 0xa8bb
movq %rbx, %rdi
popq %rbx
jmp 0xa7c3
movl 0x10(%rbx), %edi
leaq 0x1e8(%rbx), %rsi
leaq -0x159(%rip), %r8       # 0xa773
movl $0x120, %edx            # imm = 0x120
movl $0x120, %ecx            # imm = 0x120
movq %rbx, %r9
callq 0xfaa8
movq %rax, 0x308(%rbx)
xorl %ecx, %ecx
cmpq $0x1, %rax
sbbl %ecx, %ecx
movl %ecx, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rdi, 0x1dc18(%rip)     # 0x28840
movq %rsi, 0x1dc19(%rip)     # 0x28848
leaq 0xa9(%rip), %rsi        # 0xacdf
movl $0xf, %edi
callq 0x3050
movq %rax, 0x1dc09(%rip)     # 0x28850
cmpq $-0x1, %rax
je 0xac9c
leaq 0x96(%rip), %rdi        # 0xacea
callq 0x10e10
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0xacd2
leaq 0xa3(%rip), %rdi        # 0xad0c
xorl %ebx, %ebx
movsd 0x6a1d(%rip), %xmm0     # 0x11690
xorl %esi, %esi
callq 0x665d
movq %rax, 0x1dbd7(%rip)     # 0x28858
testq %rax, %rax
jne 0xacd2
callq 0x3480
cmpl $0x0, (%rax)
je 0xacd6
movq %rax, %rbx
leaq 0x760b(%rip), %rdi      # 0x122a5
jmp 0xacb0
callq 0x3480
cmpl $0x0, (%rax)
je 0xacbf
movq %rax, %rbx
leaq 0x75ee(%rip), %rdi      # 0x1229e
xorl %eax, %eax
callq 0x8d8c
movl $0x0, (%rbx)
jmp 0xaccd
leaq 0x75d8(%rip), %rdi      # 0x1229e
xorl %eax, %eax
callq 0x8eab
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
retq
leaq 0x75c8(%rip), %rdi      # 0x122a5
jmp 0xacc6
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq $0x0, 0x1db3d(%rip) # 0x28858
cmpl $0x0, 0x1db3e(%rip)     # 0x28860
je 0xad58
movq 0x1db1d(%rip), %rdi     # 0x28848
callq *0x1db0f(%rip)          # 0x28840
testl %eax, %eax
je 0xada3
leaq 0x7609(%rip), %rdi      # 0x12345
xorl %eax, %eax
callq 0x8eab
callq 0x3480
movl $0x0, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0xae05
leaq -0x53(%rip), %rdi       # 0xad0c
xorl %ebx, %ebx
movsd 0x6927(%rip), %xmm0     # 0x11690
xorl %esi, %esi
callq 0x665d
movq %rax, 0x1dae1(%rip)     # 0x28858
testq %rax, %rax
jne 0xae05
callq 0x3480
cmpl $0x0, (%rax)
je 0xade2
movq %rax, %rbx
leaq 0x7511(%rip), %rdi      # 0x122a5
xorl %eax, %eax
callq 0x8d8c
movl $0x0, (%rbx)
jmp 0xad4e
movq 0x1daa6(%rip), %rsi     # 0x28850
movl $0xf, %edi
callq 0x3050
xorl %ebx, %ebx
cmpq $-0x1, %rax
jne 0xae05
callq 0x3480
cmpl $0x0, (%rax)
je 0xadf5
movq %rax, %r14
leaq 0x758e(%rip), %rdi      # 0x1235e
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x8d8c
movl $0x0, (%r14)
jmp 0xae05
leaq 0x74bc(%rip), %rdi      # 0x122a5
xorl %eax, %eax
callq 0x8eab
jmp 0xad4e
leaq 0x7562(%rip), %rdi      # 0x1235e
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x8eab
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rax
cmpq $0x0, 0x1da28(%rip)     # 0x28840
je 0xae50
cmpq $0x0, 0x1da26(%rip)     # 0x28848
je 0xae6f
movq 0x1da2d(%rip), %rdi     # 0x28858
testq %rdi, %rdi
je 0xae40
callq 0x6692
movq $0x0, 0x1da18(%rip) # 0x28858
movl $0x1, 0x1da16(%rip)     # 0x28860
popq %rax
jmp 0xad0c
leaq 0x747d(%rip), %rdi      # 0x122d4
leaq 0x748d(%rip), %rsi      # 0x122eb
leaq 0x74a6(%rip), %rcx      # 0x1230b
movl $0x7d, %edx
callq 0x3150
leaq 0x74b9(%rip), %rdi      # 0x1232f
leaq 0x746e(%rip), %rsi      # 0x122eb
leaq 0x7487(%rip), %rcx      # 0x1230b
movl $0x7e, %edx
callq 0x3150
nop
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/md5.c
// Function: md5_update
void md5_update( md5_context *ctx, const unsigned char *input, int ilen )
{
    int fill;
    unsigned long left;

    if( ilen <= 0 )
        return;

    left = ctx->total[0] & 0x3F;
    fill = 64 - left;

    ctx->total[0] += ilen;
    ctx->total[0] &= 0xFFFFFFFF;

    if( ctx->total[0] < (unsigned long) ilen )
        ctx->total[1]++;

    if( left && ilen >= fill )
    {
        memcpy( (void *) (ctx->buffer + left),
                (void *) input, fill );
        md5_process( ctx, ctx->buffer );
        input += fill;
        ilen  -= fill;
        left = 0;
    }

    while( ilen >= 64 )
    {
        md5_process( ctx, input );
        input += 64;
        ilen  -= 64;
    }

    if( ilen > 0 )
    {
        memcpy( (void *) (ctx->buffer + left),
                (void *) input, ilen );
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testl %edx, %edx
jle 0x286f
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rcx
movl %ecx, %eax
andl $0x3f, %eax
movl %edx, %esi
addl %edx, %ecx
movq %rcx, (%rdi)
cmpq %rsi, %rcx
jae 0x27e6
incq 0x8(%r14)
testq %rax, %rax
je 0x2824
movl $0x40, %ecx
subl %eax, %ecx
movl %edx, %r13d
subl %ecx, %r13d
jb 0x2854
leaq 0x30(%r14), %r15
leaq (%r14,%rax), %rdi
addq $0x30, %rdi
movl %ecx, %r12d
movq %rbx, %rsi
movq %r12, %rdx
callq 0x21b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2879
addq %r12, %rbx
jmp 0x2827
movl %edx, %r13d
cmpl $0x40, %r13d
jl 0x284b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2879
addq $0x40, %rbx
leal -0x40(%r13), %edx
cmpl $0x7f, %r13d
movl %edx, %r13d
ja 0x282d
jmp 0x284e
movl %r13d, %edx
testl %edx, %edx
jle 0x286f
xorl %eax, %eax
leaq (%r14,%rax), %rdi
addq $0x30, %rdi
movl %edx, %edx
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x21b0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/md5.c
// Function: md5_finish
void md5_finish( md5_context *ctx, unsigned char output[16] )
{
    unsigned long last, padn;
    unsigned long high, low;
    unsigned char msglen[8];

    high = ( ctx->total[0] >> 29 )
         | ( ctx->total[1] <<  3 );
    low  = ( ctx->total[0] <<  3 );

    PUT_ULONG_LE( low,  msglen, 0 );
    PUT_ULONG_LE( high, msglen, 4 );

    last = ctx->total[0] & 0x3F;
    padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );

    md5_update( ctx, (unsigned char *) md5_padding, padn );
    md5_update( ctx, msglen, 8 );

    PUT_ULONG_LE( ctx->state[0], output,  0 );
    PUT_ULONG_LE( ctx->state[1], output,  4 );
    PUT_ULONG_LE( ctx->state[2], output,  8 );
    PUT_ULONG_LE( ctx->state[3], output, 12 );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rax, %rdx
shrq $0x1d, %rdx
shlq $0x3, %rcx
orq %rdx, %rcx
leal (,%rax,8), %edx
leaq 0x8(%rsp), %r15
movb %dl, (%r15)
movl %eax, %edx
shrl $0x5, %edx
movb %dl, 0x1(%r15)
movl %eax, %edx
shrl $0xd, %edx
movb %dl, 0x2(%r15)
movl %eax, %edx
shrl $0x15, %edx
movb %dl, 0x3(%r15)
movb %cl, 0x4(%r15)
movb %ch, 0xd(%rsp)
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, 0x6(%r15)
shrl $0x18, %ecx
movb %cl, 0x7(%r15)
andl $0x3f, %eax
xorl %edx, %edx
cmpq $0x38, %rax
setae %dl
shll $0x6, %edx
orl $0x38, %edx
subl %eax, %edx
leaq 0x4df9(%rip), %rsi      # 0x8300
callq 0x27b7
movq %r14, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x27b7
movb 0x10(%r14), %al
movb %al, (%rbx)
movb 0x11(%r14), %al
movb %al, 0x1(%rbx)
movb 0x12(%r14), %al
movb %al, 0x2(%rbx)
movb 0x13(%r14), %al
movb %al, 0x3(%rbx)
movb 0x18(%r14), %al
movb %al, 0x4(%rbx)
movb 0x19(%r14), %al
movb %al, 0x5(%rbx)
movb 0x1a(%r14), %al
movb %al, 0x6(%rbx)
movb 0x1b(%r14), %al
movb %al, 0x7(%rbx)
movb 0x20(%r14), %al
movb %al, 0x8(%rbx)
movb 0x21(%r14), %al
movb %al, 0x9(%rbx)
movb 0x22(%r14), %al
movb %al, 0xa(%rbx)
movb 0x23(%r14), %al
movb %al, 0xb(%rbx)
movb 0x28(%r14), %al
movb %al, 0xc(%rbx)
movb 0x29(%r14), %al
movb %al, 0xd(%rbx)
movb 0x2a(%r14), %al
movb %al, 0xe(%rbx)
movb 0x2b(%r14), %al
movb %al, 0xf(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/md5.c
// Function: md5
void md5( const unsigned char *input, int ilen, unsigned char output[16] )
{
    md5_context ctx;

    md5_starts( &ctx );
    md5_update( &ctx, input, ilen );
    md5_finish( &ctx, output );

    memset( &ctx, 0, sizeof( md5_context ) );
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xf8, %rsp
movq %rdx, %rbx
movl %esi, %edx
movq %rdi, %rsi
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq $0x67452301, 0x10(%r14) # imm = 0x67452301
movl $0x98badcfe, %eax       # imm = 0x98BADCFE
leaq 0x5712ce8b(%rax), %rcx
movq %rcx, 0x18(%r14)
movq %rax, 0x20(%r14)
movq $0x10325476, 0x28(%r14) # imm = 0x10325476
movq %r14, %rdi
callq 0x27b7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3486
addq $0xf8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/md5.c
// Function: md5_file
int md5_file( const char *path, unsigned char output[16] )
{
    FILE *f;
    size_t n;
    md5_context ctx;
    unsigned char buf[1024];

    if( ( f = fopen( path, "rb" ) ) == NULL )
        return( 1 );

    md5_starts( &ctx );

    while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 )
        md5_update( &ctx, buf, (int) n );

    md5_finish( &ctx, output );

    memset( &ctx, 0, sizeof( md5_context ) );

    if( ferror( f ) != 0 )
    {
        fclose( f );
        return( 2 );
    }

    fclose( f );
    return( 0 );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x4f0, %rsp            # imm = 0x4F0
movq %rsi, %r14
leaq 0x4ce4(%rip), %rsi      # 0x82f0
callq 0x2230
testq %rax, %rax
je 0x36c4
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x67452301, 0x10(%rsp) # imm = 0x67452301
movl $0x98badcfe, %eax       # imm = 0x98BADCFE
leaq 0x5712ce8b(%rax), %rcx
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movq $0x10325476, 0x28(%rsp) # imm = 0x10325476
leaq 0xf0(%rsp), %rdi
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rcx
callq 0x2090
testq %rax, %rax
je 0x369d
movq %rsp, %r15
leaq 0xf0(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x27b7
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
movq %r12, %rdi
movq %rbx, %rcx
callq 0x2090
testq %rax, %rax
jne 0x3676
movq %rsp, %rdi
movq %r14, %rsi
callq 0x3486
movq %rbx, %rdi
callq 0x2080
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
callq 0x20e0
addl %ebp, %ebp
jmp 0x36c9
movl $0x1, %ebp
movl %ebp, %eax
addq $0x4f0, %rsp            # imm = 0x4F0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/md5.c
// Function: md5_hmac_starts
void md5_hmac_starts( md5_context *ctx, const unsigned char *key, int keylen )
{
    int i;
    unsigned char sum[16];

    if( keylen > 64 )
    {
        md5( key, keylen, sum );
        keylen = 16;
        key = sum;
    }

    memset( ctx->ipad, 0x36, 64 );
    memset( ctx->opad, 0x5C, 64 );

    for( i = 0; i < keylen; i++ )
    {
        ctx->ipad[i] = (unsigned char)( ctx->ipad[i] ^ key[i] );
        ctx->opad[i] = (unsigned char)( ctx->opad[i] ^ key[i] );
    }

    md5_starts( ctx );
    md5_update( ctx, ctx->ipad, 64 );

    memset( sum, 0, sizeof( sum ) );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rdi, %rbx
movl $0x98badcfe, %r12d      # imm = 0x98BADCFE
cmpl $0x41, %edx
jl 0x3791
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq $0x67452301, 0x10(%r15) # imm = 0x67452301
leaq 0x5712ce8b(%r12), %rax
movq %rax, 0x18(%r15)
movq %r12, 0x20(%r15)
movq $0x10325476, 0x28(%r15) # imm = 0x10325476
movq %r15, %rdi
movq %r14, %rsi
callq 0x27b7
movq %rsp, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x3486
leaq 0x70(%rbx), %rsi
movaps 0x4b82(%rip), %xmm0     # 0x82d0
movups %xmm0, 0xa0(%rbx)
movups %xmm0, 0x90(%rbx)
movups %xmm0, 0x80(%rbx)
movups %xmm0, 0x70(%rbx)
movaps 0x4b72(%rip), %xmm0     # 0x82e0
movups %xmm0, 0xb0(%rbx)
movups %xmm0, 0xc0(%rbx)
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0xe0(%rbx)
movl $0x10, %edx
jmp 0x37dc
leaq 0x70(%rbx), %rsi
movaps 0x4b34(%rip), %xmm0     # 0x82d0
movups %xmm0, 0xa0(%rbx)
movups %xmm0, 0x90(%rbx)
movups %xmm0, 0x80(%rbx)
movups %xmm0, 0x70(%rbx)
movaps 0x4b24(%rip), %xmm0     # 0x82e0
movups %xmm0, 0xb0(%rbx)
movups %xmm0, 0xc0(%rbx)
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0xe0(%rbx)
testl %edx, %edx
jle 0x37fb
movl %edx, %eax
xorl %ecx, %ecx
movb (%r14,%rcx), %dl
xorb %dl, 0x70(%rbx,%rcx)
movb (%r14,%rcx), %dl
xorb %dl, 0xb0(%rbx,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x37e0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x67452301, 0x10(%rbx) # imm = 0x67452301
leaq 0x5712ce8b(%r12), %rax
movq %rax, 0x18(%rbx)
movq %r12, 0x20(%rbx)
movq $0x10325476, 0x28(%rbx) # imm = 0x10325476
movq %rbx, %rdi
movl $0x40, %edx
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x27b7
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/md5.c
// Function: md5_hmac_finish
void md5_hmac_finish( md5_context *ctx, unsigned char output[16] )
{
    unsigned char tmpbuf[16];

    md5_finish( ctx, tmpbuf );
    md5_starts( ctx );
    md5_update( ctx, ctx->opad, 64 );
    md5_update( ctx, tmpbuf, 16 );
    md5_finish( ctx, output );

    memset( tmpbuf, 0, sizeof( tmpbuf ) );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rsi
callq 0x3486
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x67452301, 0x10(%r14) # imm = 0x67452301
movl $0x98badcfe, %eax       # imm = 0x98BADCFE
leaq 0x5712ce8b(%rax), %rcx
movq %rcx, 0x18(%r14)
movq %rax, 0x20(%r14)
movq $0x10325476, 0x28(%r14) # imm = 0x10325476
leaq 0xb0(%r14), %rsi
movq %r14, %rdi
movl $0x40, %edx
callq 0x27b7
movq %r14, %rdi
movq %r15, %rsi
movl $0x10, %edx
callq 0x27b7
movq %r14, %rdi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x3486
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_PrintPreallocated
cJSON_bool cJSON_PrintPreallocated(cJSON *item, char *buf, const int len, const cJSON_bool fmt)
{
    printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } };

    if (len < 0)
    {
        return false;
    }

    p.buffer = (unsigned char*)buf;
    p.length = (size_t)len;
    p.offset = 0;
    p.noalloc = true;
    p.format = fmt;
    p.hooks = global_hooks;

    return print_value(item, &p);
}

// Assembly:
subq $0x48, %rsp
movq $0x0, 0x20(%rsp)
testl %edx, %edx
js 0x46c4
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movl %edx, %edx
movq %rdx, 0x8(%rax)
movq $0x0, 0x10(%rax)
movl $0x1, 0x20(%rax)
movl %ecx, 0x24(%rax)
movups 0xbacd(%rip), %xmm0     # 0x10178
movups %xmm0, 0x28(%rax)
movq 0xbad2(%rip), %rcx      # 0x10188
movq %rcx, 0x38(%rax)
movq %rax, %rsi
callq 0x4146
jmp 0x46c6
xorl %eax, %eax
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_AddItemToObject
void cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item)
{
    /* call cJSON_AddItemToObjectCS for code reuse */
    cJSON_AddItemToObjectCS(object, (char*)cJSON_strdup((const unsigned char*)string, &global_hooks), item);
    /* remove cJSON_StringIsConst flag */
    item->type &= ~cJSON_StringIsConst;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x4862
movq %rsi, %r12
movq %rsi, %rdi
callq 0x20f0
movq %rax, %r13
incq %r13
movq %r13, %rdi
callq *0xb92e(%rip)           # 0x10178
testq %rax, %rax
je 0x4862
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x21b0
jmp 0x4865
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x4881
andb $-0x3, 0x19(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_AddItemToObjectCS
void cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item)
{
    if (!item)
    {
        return;
    }
    if (!(item->type & cJSON_StringIsConst) && item->string)
    {
        global_hooks.deallocate(item->string);
    }
    item->string = (char*)string;
    item->type |= cJSON_StringIsConst;
    cJSON_AddItemToArray(object, item);
}

// Assembly:
testq %rdx, %rdx
je 0x48e6
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0x18(%rdx), %eax
btl $0x9, %eax
jb 0x48af
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x48af
callq *0xb8d4(%rip)           # 0x10180
movl 0x18(%rbx), %eax
movq %r15, 0x38(%rbx)
orl $0x200, %eax            # imm = 0x200
movl %eax, 0x18(%rbx)
testq %r14, %r14
je 0x48e1
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x48dd
movq %rax, %rcx
movq (%rax), %rax
testq %rax, %rax
jne 0x48c9
movq %rbx, (%rcx)
movq %rcx, 0x8(%rbx)
jmp 0x48e1
movq %rbx, 0x10(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_InsertItemInArray
void cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem)
{
    cJSON *after_inserted = NULL;

    if (which < 0)
    {
        return;
    }

    after_inserted = get_array_item(array, (size_t)which);
    if (after_inserted == NULL)
    {
        cJSON_AddItemToArray(array, newitem);
        return;
    }

    newitem->next = after_inserted;
    newitem->prev = after_inserted->prev;
    after_inserted->prev = newitem;
    if (after_inserted == array->child)
    {
        array->child = newitem;
    }
    else
    {
        newitem->prev->next = newitem;
    }
}

// Assembly:
testl %esi, %esi
sets %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x4b7c
movl %esi, %ecx
addq $0x10, %rdi
movq %rdi, %rax
movq (%rax), %rax
addq $-0x1, %rcx
setb %sil
testq %rax, %rax
je 0x4b5c
testb %sil, %sil
jne 0x4b47
testq %rax, %rax
je 0x4b7d
movq %rax, (%rdx)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq %rdx, 0x8(%rax)
cmpq (%rdi), %rax
je 0x4b9d
movq 0x8(%rdx), %rax
movq %rdx, (%rax)
retq
testq %rdx, %rdx
je 0x4b7c
movq (%rdi), %rax
testq %rax, %rax
je 0x4b9d
movq %rax, %rcx
movq (%rax), %rax
testq %rax, %rax
jne 0x4b8a
movq %rdx, (%rcx)
movq %rcx, 0x8(%rdx)
retq
movq %rdx, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_CreateNull
cJSON* cJSON_CreateNull(void)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type = cJSON_NULL;
    }

    return item;
}

// Assembly:
pushq %rax
movl $0x40, %edi
callq *0xb4ed(%rip)           # 0x10178
testq %rax, %rax
je 0x4ca9
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movl $0x4, 0x18(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_CreateTrue
cJSON* cJSON_CreateTrue(void)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type = cJSON_True;
    }

    return item;
}

// Assembly:
pushq %rax
movl $0x40, %edi
callq *0xb4c1(%rip)           # 0x10178
testq %rax, %rax
je 0x4cd5
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movl $0x2, 0x18(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_CreateFalse
cJSON* cJSON_CreateFalse(void)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type = cJSON_False;
    }

    return item;
}

// Assembly:
pushq %rax
movl $0x40, %edi
callq *0xb495(%rip)           # 0x10178
testq %rax, %rax
je 0x4d01
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movl $0x1, 0x18(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_CreateNumber
cJSON* cJSON_CreateNumber(double num)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type = cJSON_Number;
        item->valuedouble = num;

        item->valueint = (int64_t)num;
    }

    return item;
}

// Assembly:
pushq %rax
movsd %xmm0, (%rsp)
movl $0x40, %edi
callq *0xb42f(%rip)           # 0x10178
testq %rax, %rax
je 0x4d7f
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, (%rax)
movl $0x8, 0x18(%rax)
movsd (%rsp), %xmm0
movsd %xmm0, 0x30(%rax)
cvttsd2si %xmm0, %rcx
movq %rcx, 0x28(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_CreateRaw
cJSON* cJSON_CreateRaw(const char *raw)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type = cJSON_Raw;
        item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks);
        if(!item->valuestring)
        {
            cJSON_Delete(item);
            return NULL;
        }
    }

    return item;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x40, %edi
callq *0xb351(%rip)           # 0x10178
testq %rax, %rax
je 0x4e90
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movl $0x80, 0x18(%rax)
testq %r14, %r14
je 0x4e80
movq %r14, %rdi
callq 0x20f0
movq %rax, %r15
incq %r15
movq %r15, %rdi
callq *0xb314(%rip)           # 0x10178
testq %rax, %rax
je 0x4e80
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21b0
movq %r12, 0x20(%rbx)
jmp 0x4e92
movq $0x0, 0x20(%rbx)
movq %rbx, %rdi
callq 0x39f7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_CreateArray
cJSON* cJSON_CreateArray(void)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type=cJSON_Array;
    }

    return item;
}

// Assembly:
pushq %rax
movl $0x40, %edi
callq *0xb2cb(%rip)           # 0x10178
testq %rax, %rax
je 0x4ecb
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movl $0x20, 0x18(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_CreateObject
cJSON* cJSON_CreateObject(void)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if (item)
    {
        item->type = cJSON_Object;
    }

    return item;
}

// Assembly:
pushq %rax
movl $0x40, %edi
callq *0xb29f(%rip)           # 0x10178
testq %rax, %rax
je 0x4ef7
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movl $0x40, 0x18(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_CreateIntArray
cJSON* cJSON_CreateIntArray(const int *numbers, int count)
{
    size_t i = 0;
    cJSON *n = NULL;
    cJSON *p = NULL;
    cJSON *a = NULL;

    if (count < 0)
    {
        return NULL;
    }

    a = cJSON_CreateArray();
    for(i = 0; a && (i < (size_t)count); i++)
    {
        n = cJSON_CreateNumber(numbers[i]);
        if (!n)
        {
            cJSON_Delete(a);
            return NULL;
        }
        if(!i)
        {
            a->child = n;
        }
        else
        {
            suffix_object(p, n);
        }
        p = n;
    }

    return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
js 0x4fb8
movl %esi, %ebp
movq %rdi, %r14
movl $0x40, %edi
callq *0xb25c(%rip)           # 0x10178
testq %rax, %rax
je 0x4fb8
movq %rax, %rbx
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, (%rax)
movl $0x20, 0x18(%rax)
testl %ebp, %ebp
je 0x4fba
movl %ebp, %r15d
xorl %r13d, %r13d
xorl %r12d, %r12d
movslq (%r14,%r12,4), %rbp
movl $0x40, %edi
callq *0xb216(%rip)           # 0x10178
testq %rax, %rax
je 0x4fb0
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
xorps %xmm1, %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm1, 0x30(%rax)
movups %xmm1, 0x20(%rax)
movups %xmm1, (%rax)
movl $0x8, 0x18(%rax)
movsd %xmm0, 0x30(%rax)
movq %rbp, 0x28(%rax)
testq %r12, %r12
je 0x4f9f
movq %rax, (%r13)
movq %r13, 0x8(%rax)
jmp 0x4fa3
movq %rax, 0x10(%rbx)
incq %r12
movq %rax, %r13
cmpq %r15, %r12
jb 0x4f53
jmp 0x4fba
movq %rbx, %rdi
callq 0x39f7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_CreateFloatArray
cJSON* cJSON_CreateFloatArray(const float *numbers, int count)
{
    size_t i = 0;
    cJSON *n = NULL;
    cJSON *p = NULL;
    cJSON *a = NULL;

    if (count < 0)
    {
        return NULL;
    }

    a = cJSON_CreateArray();

    for(i = 0; a && (i < (size_t)count); i++)
    {
        n = cJSON_CreateNumber((double)numbers[i]);
        if(!n)
        {
            cJSON_Delete(a);
            return NULL;
        }
        if(!i)
        {
            a->child = n;
        }
        else
        {
            suffix_object(p, n);
        }
        p = n;
    }

    return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
js 0x509d
movl %esi, %ebp
movq %rdi, %r14
movl $0x40, %edi
callq *0xb189(%rip)           # 0x10178
testq %rax, %rax
je 0x509d
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movl $0x20, 0x18(%rax)
testl %ebp, %ebp
je 0x509f
movl %ebp, %r15d
xorl %r13d, %r13d
xorl %r12d, %r12d
movss (%r14,%r12,4), %xmm0
movss %xmm0, 0x4(%rsp)
movl $0x40, %edi
callq *0xb13c(%rip)           # 0x10178
testq %rax, %rax
je 0x5095
movss 0x4(%rsp), %xmm2
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
xorps %xmm1, %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm1, 0x30(%rax)
movups %xmm1, 0x20(%rax)
movups %xmm1, (%rax)
movl $0x8, 0x18(%rax)
movsd %xmm0, 0x30(%rax)
cvttss2si %xmm2, %rcx
movq %rcx, 0x28(%rax)
testq %r12, %r12
je 0x5084
movq %rax, (%r13)
movq %r13, 0x8(%rax)
jmp 0x5088
movq %rax, 0x10(%rbx)
incq %r12
movq %rax, %r13
cmpq %r15, %r12
jb 0x5025
jmp 0x509f
movq %rbx, %rdi
callq 0x39f7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_CreateDoubleArray
cJSON* cJSON_CreateDoubleArray(const double *numbers, int count)
{
    size_t i = 0;
    cJSON *n = NULL;
    cJSON *p = NULL;
    cJSON *a = NULL;

    if (count < 0)
    {
        return NULL;
    }

    a = cJSON_CreateArray();

    for(i = 0;a && (i < (size_t)count); i++)
    {
        n = cJSON_CreateNumber(numbers[i]);
        if(!n)
        {
            cJSON_Delete(a);
            return NULL;
        }
        if(!i)
        {
            a->child = n;
        }
        else
        {
            suffix_object(p, n);
        }
        p = n;
    }

    return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
js 0x517a
movl %esi, %ebp
movq %rdi, %r14
movl $0x40, %edi
callq *0xb0a4(%rip)           # 0x10178
testq %rax, %rax
je 0x517a
movq %rax, %rbx
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, (%rax)
movl $0x20, 0x18(%rax)
testl %ebp, %ebp
je 0x517c
movl %ebp, %r15d
xorl %r13d, %r13d
xorl %r12d, %r12d
movsd (%r14,%r12,8), %xmm0
movsd %xmm0, (%rsp)
movl $0x40, %edi
callq *0xb057(%rip)           # 0x10178
testq %rax, %rax
je 0x5172
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movl $0x8, 0x18(%rax)
movsd (%rsp), %xmm0
movsd %xmm0, 0x30(%rax)
cvttsd2si %xmm0, %rcx
movq %rcx, 0x28(%rax)
testq %r12, %r12
je 0x5161
movq %rax, (%r13)
movq %r13, 0x8(%rax)
jmp 0x5165
movq %rax, 0x10(%rbx)
incq %r12
movq %rax, %r13
cmpq %r15, %r12
jb 0x510b
jmp 0x517c
movq %rbx, %rdi
callq 0x39f7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/bloomsource[P]dns_update/cjson.c
// Function: cJSON_CreateStringArray
cJSON* cJSON_CreateStringArray(const char **strings, int count)
{
    size_t i = 0;
    cJSON *n = NULL;
    cJSON *p = NULL;
    cJSON *a = NULL;

    if (count < 0)
    {
        return NULL;
    }

    a = cJSON_CreateArray();

    for (i = 0; a && (i < (size_t)count); i++)
    {
        n = cJSON_CreateString(strings[i]);
        if(!n)
        {
            cJSON_Delete(a);
            return NULL;
        }
        if(!i)
        {
            a->child = n;
        }
        else
        {
            suffix_object(p,n);
        }
        p = n;
    }

    return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
js 0x5211
movl %esi, %ebp
movq %rdi, %r14
movl $0x40, %edi
callq *0xafcb(%rip)           # 0x10178
testq %rax, %rax
je 0x5211
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movl $0x20, 0x18(%rax)
testl %ebp, %ebp
je 0x5213
movl %ebp, %r15d
xorl %r13d, %r13d
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
callq 0x4d81
testq %rax, %rax
je 0x5209
testq %r12, %r12
je 0x51f8
movq %rax, (%r13)
movq %r13, 0x8(%rax)
jmp 0x51fc
movq %rax, 0x10(%rbx)
incq %r12
movq %rax, %r13
cmpq %r15, %r12
jb 0x51db
jmp 0x5213
movq %rbx, %rdi
callq 0x39f7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq