LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/jnum.c
// Function: fill_1_8_hexs
static inline int fill_1_8_hexs(char *buffer, uint32_t num)
{
    char *s = buffer;
    uint32_t q = num >> 16;
    uint32_t r = num & 0xffff;

    if (!q) {
        return fill_1_4_hexs(s, num);
    } else {
        s += fill_1_4_hexs(s, q);
        s += fill_t_4_hexs(s, r);
    }
    return (int)(s - buffer);
}

// Assembly:
cmpl $0xffff, %esi           # imm = 0xFFFF
ja 0x855a
cmpl $0xff, %esi
ja 0x85a5
movq %rdi, %rax
cmpl $0x10, %esi
jb 0x8544
movl %esi, %eax
shrl $0x4, %eax
leaq 0x2575(%rip), %rcx      # 0xaab0
movb (%rax,%rcx), %cl
leaq 0x1(%rdi), %rax
movb %cl, (%rdi)
andl $0xf, %esi
leaq 0x2562(%rip), %rcx      # 0xaab0
movb (%rsi,%rcx), %cl
movb %cl, (%rax)
subq %rdi, %rax
incq %rax
retq
movl %esi, %eax
shrl $0x10, %eax
cmpl $0xffffff, %esi         # imm = 0xFFFFFF
ja 0x85fd
movq %rdi, %rcx
cmpl $0x100000, %esi         # imm = 0x100000
jb 0x858b
movl %esi, %ecx
shrl $0x14, %ecx
leaq 0x252e(%rip), %rdx      # 0xaab0
movb (%rcx,%rdx), %dl
leaq 0x1(%rdi), %rcx
movb %dl, (%rdi)
andl $0xf, %eax
leaq 0x251b(%rip), %rdx      # 0xaab0
movb (%rax,%rdx), %al
movb %al, (%rcx)
subq %rdi, %rcx
incq %rcx
jmp 0x8659
movl %esi, %eax
shrl $0x8, %eax
movq %rdi, %rcx
cmpl $0x1000, %esi           # imm = 0x1000
jb 0x85ca
movl %esi, %ecx
shrl $0xc, %ecx
leaq 0x24ef(%rip), %rdx      # 0xaab0
movb (%rcx,%rdx), %dl
leaq 0x1(%rdi), %rcx
movb %dl, (%rdi)
andl $0xf, %eax
leaq 0x24dc(%rip), %rdx      # 0xaab0
movb (%rax,%rdx), %al
movb %al, (%rcx)
subl %edi, %ecx
incl %ecx
movslq %ecx, %rax
movl %esi, %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
movb (%rcx,%rdx), %cl
movb %cl, (%rdi,%rax)
andl $0xf, %esi
movb (%rsi,%rdx), %cl
movb %cl, 0x1(%rdi,%rax)
addq $0x2, %rax
retq
movl %esi, %ecx
shrl $0x18, %ecx
movq %rdi, %rdx
cmpl $0x10000000, %esi       # imm = 0x10000000
jb 0x8624
movl %esi, %edx
shrl $0x1c, %edx
leaq 0x2497(%rip), %r8       # 0xaab0
movb (%rdx,%r8), %r8b
leaq 0x1(%rdi), %rdx
movb %r8b, (%rdi)
andl $0xf, %ecx
leaq 0x2482(%rip), %r8       # 0xaab0
movb (%rcx,%r8), %cl
movb %cl, (%rdx)
subl %edi, %edx
incl %edx
movslq %edx, %rcx
movl %esi, %edx
shrl $0x14, %edx
andl $0xf, %edx
movb (%rdx,%r8), %dl
movb %dl, (%rdi,%rcx)
andl $0xf, %eax
movb (%rax,%r8), %al
movb %al, 0x1(%rdi,%rcx)
addq $0x2, %rcx
movslq %ecx, %rax
movl %esi, %ecx
shrl $0x8, %ecx
movl %esi, %edx
shrl $0xc, %edx
andl $0xf, %edx
leaq 0x2440(%rip), %r8       # 0xaab0
movb (%rdx,%r8), %dl
movb %dl, (%rdi,%rax)
andl $0xf, %ecx
movb (%rcx,%r8), %cl
movb %cl, 0x1(%rdi,%rax)
movl %esi, %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
movb (%rcx,%r8), %cl
movb %cl, 0x2(%rdi,%rax)
andl $0xf, %esi
movb (%rsi,%r8), %cl
movb %cl, 0x3(%rdi,%rax)
addq $0x4, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/jnum.c
// Function: jnum_lhtoa
int jnum_lhtoa(uint64_t num, char *buffer)
{
    char *s = buffer;
    uint32_t q = (uint32_t)(num >> 32);
    uint32_t r = (uint32_t)(num & 0xffffffff);

    *s++ = '0';
    *s++ = 'x';
    if (!q) {
        s += fill_1_8_hexs(s, r);
    } else {
        s += fill_1_8_hexs(s, q);
        s += fill_t_8_hexs(s, r);
    }

    *s = '\0';
    return (int)(s - buffer);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movw $0x7830, (%rsi)         # imm = 0x7830
leaq 0x2(%rsi), %r15
movq %rdi, %rsi
movq %r15, %rdi
shrq $0x20, %rsi
jne 0x86d4
movl %r14d, %esi
callq 0x8517
cltq
addq %r15, %rax
jmp 0x8762
callq 0x8517
cltq
movl %r14d, %edx
shrl $0x10, %edx
movl %r14d, %esi
shrl $0x18, %esi
movl %r14d, %edi
shrl $0x1c, %edi
leaq 0x23bc(%rip), %rcx      # 0xaab0
movb (%rdi,%rcx), %dil
addq %r15, %rax
addq $0x8, %rax
movb %dil, -0x8(%rax)
andl $0xf, %esi
movb (%rsi,%rcx), %sil
movb %sil, -0x7(%rax)
movl %r14d, %esi
shrl $0x14, %esi
andl $0xf, %esi
movb (%rsi,%rcx), %sil
movb %sil, -0x6(%rax)
andl $0xf, %edx
movb (%rdx,%rcx), %dl
movb %dl, -0x5(%rax)
movl %r14d, %edx
shrl $0x8, %edx
movl %r14d, %esi
shrl $0xc, %esi
andl $0xf, %esi
movb (%rsi,%rcx), %sil
movb %sil, -0x4(%rax)
andl $0xf, %edx
movb (%rdx,%rcx), %dl
movb %dl, -0x3(%rax)
movl %r14d, %edx
shrl $0x4, %edx
andl $0xf, %edx
movb (%rdx,%rcx), %dl
movb %dl, -0x2(%rax)
andl $0xf, %r14d
movb (%r14,%rcx), %cl
movb %cl, -0x1(%rax)
movb $0x0, (%rax)
subl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lengjingzju[P]json/jnum.c
// Function: fill_1_16_digits
static inline int32_t fill_1_16_digits(char *buffer, uint64_t digits, int32_t *ptz)
{
    char *s = buffer;

    if (digits < 100000000llu) {
        return fill_1_8_digits(s, (uint32_t)digits, ptz);
    } else {
        uint32_t q = (uint32_t)(digits / 100000000);
        uint32_t r = (uint32_t)(digits - (uint64_t)q * 100000000);

        s += fill_1_8_digits(s, q, ptz);
        if (!r) {
            *ptz += 8;
            memset(s, '0', 8);
            s += 8;
        } else {
            s += fill_t_8_digits(s, r, ptz);
        }
    }

    return (int32_t)(s - buffer);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
cmpq $0x5f5e0ff, %rsi        # imm = 0x5F5E0FF
ja 0x8e6e
movq %rbx, %rdi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x7d79
movabsq $-0x543388ee7b9e3103, %rcx # imm = 0xABCC77118461CEFD
movq %rsi, %rax
mulq %rcx
shrq $0x1a, %rdx
movl $0xfa0a1f00, %r15d      # imm = 0xFA0A1F00
imulq %rdx, %r15
addq %rsi, %r15
movq %rbx, %rdi
movl %edx, %esi
movq %r14, %rdx
callq 0x7d79
cltq
addq %rbx, %rax
testl %r15d, %r15d
je 0x8eea
cmpl $0x270f, %r15d          # imm = 0x270F
ja 0x8f00
movl $0x30303030, (%rax)     # imm = 0x30303030
imull $0x147b, %r15d, %ecx    # imm = 0x147B
shrl $0x13, %ecx
imull $-0x64, %ecx, %edx
addl %r15d, %edx
leaq 0x1c04(%rip), %rsi      # 0xaad0
movzwl (%rsi,%rcx,2), %edi
movw %di, 0x4(%rax)
leal (%rdx,%rdx), %edi
movzwl (%rdi,%rsi), %esi
movw %si, 0x6(%rax)
testl %edx, %edx
je 0x8f56
movl %edx, %ecx
jmp 0x8f9f
addl $0x8, (%r14)
movabsq $0x3030303030303030, %rcx # imm = 0x3030303030303030
movq %rcx, (%rax)
jmp 0x8fca
movl %r15d, %ecx
imulq $0x68db8bb, %rcx, %rdx  # imm = 0x68DB8BB
shrq $0x28, %rdx
imull $0xffffd8f0, %edx, %ecx # imm = 0xFFFFD8F0
addl %r15d, %ecx
imull $0x147b, %edx, %esi     # imm = 0x147B
shrl $0x13, %esi
imull $-0x64, %esi, %edi
addl %edx, %edi
leaq 0x1ba4(%rip), %rdx      # 0xaad0
movzwl (%rdx,%rsi,2), %r8d
movw %r8w, (%rax)
leal (%rdi,%rdi), %r8d
movzwl (%r8,%rdx), %r8d
movw %r8w, 0x2(%rax)
testl %edi, %edi
je 0x8f63
movl %edi, %esi
leaq 0x1c50(%rip), %rdi      # 0xaba0
movzbl (%rsi,%rdi), %esi
jmp 0x8f71
leaq 0x1c43(%rip), %rdx      # 0xaba0
movzbl (%rcx,%rdx), %ecx
jmp 0x8fc4
leaq 0x1c36(%rip), %rdi      # 0xaba0
movzbl (%rsi,%rdi), %esi
addl $0x2, %esi
movl %esi, (%r14)
testl %ecx, %ecx
je 0x8fac
imull $0x147b, %ecx, %esi     # imm = 0x147B
shrl $0x13, %esi
imull $-0x64, %esi, %edi
addl %ecx, %edi
movzwl (%rdx,%rsi,2), %ecx
movw %cx, 0x4(%rax)
leal (%rdi,%rdi), %ecx
movzwl (%rcx,%rdx), %ecx
movw %cx, 0x6(%rax)
testl %edi, %edi
je 0x8fb9
movl %edi, %ecx
leaq 0x1bfa(%rip), %rdx      # 0xaba0
movzbl (%rcx,%rdx), %ecx
jmp 0x8fc7
movl $0x30303030, 0x4(%rax)  # imm = 0x30303030
addl $0x4, (%r14)
jmp 0x8fca
leaq 0x1be0(%rip), %rcx      # 0xaba0
movzbl (%rsi,%rcx), %ecx
addl $0x2, %ecx
movl %ecx, (%r14)
subl %ebx, %eax
addl $0x8, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/tests/kvlds/main.c
// Function: set
static int
set(struct wire_requestqueue * Q,
    const struct kvldskey * key, const struct kvldskey * value)
{

	/* Send the request. */
	op_done = 0;
	op_count = 1;
	if (proto_kvlds_request_set(Q, key, value, callback_done, NULL)) {
		warnp("Error sending SET request");
		goto err0;
	}

	/* Wait for it to finish. */
	if (events_spin(&op_done) || op_failed) {
		warnp("SET request failed");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
movl $0x0, 0xe8a2(%rip)      # 0x11618
movq $0x1, 0xe89f(%rip) # 0x11620
leaq 0x529(%rip), %rcx       # 0x32b1
xorl %ebx, %ebx
xorl %r8d, %r8d
callq 0x4f35
testl %eax, %eax
je 0x2dac
callq 0x2090
cmpl $0x0, (%rax)
je 0x2de3
movq %rax, %rbx
leaq 0x836b(%rip), %rdi      # 0xb115
jmp 0x2dd4
leaq 0xe865(%rip), %rdi      # 0x11618
callq 0x3695
orl 0xe85e(%rip), %eax      # 0x1161c
je 0x2dff
callq 0x2090
cmpl $0x0, (%rax)
je 0x2dec
movq %rax, %rbx
leaq 0x835b(%rip), %rdi      # 0xb12f
xorl %eax, %eax
callq 0x4ac0
movl $0x0, (%rbx)
jmp 0x2dfa
leaq 0x832b(%rip), %rdi      # 0xb115
jmp 0x2df3
leaq 0x833c(%rip), %rdi      # 0xb12f
xorl %eax, %eax
callq 0x4bdf
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/tests/kvlds/main.c
// Function: verify
static int
verify(struct wire_requestqueue * Q,
    const struct kvldskey * key, const struct kvldskey * value)
{

	/* Perform a get. */
	op_done = 0;
	op_count = 1;
	if (proto_kvlds_request_get(Q, key, callback_get,
	    (void *)(uintptr_t)value)) {
		warnp("Error sending GET request");
		goto err0;
	}
	if (events_spin(&op_done) || op_failed) {
		warnp("GET request failed");
		goto err0;
	}
	if (op_badval) {
		warn0("Bad value returned by GET!");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
movq %rdx, %rcx
movl $0x0, 0xe807(%rip)      # 0x11618
movq $0x1, 0xe804(%rip) # 0x11620
leaq 0x4b9(%rip), %rdx       # 0x32dc
callq 0x585a
testl %eax, %eax
je 0x2e42
callq 0x2090
cmpl $0x0, (%rax)
je 0x2e79
movq %rax, %rbx
leaq 0x8302(%rip), %rdi      # 0xb142
jmp 0x2e6a
leaq 0xe7cf(%rip), %rdi      # 0x11618
callq 0x3695
orl 0xe7c8(%rip), %eax      # 0x1161c
je 0x2e82
callq 0x2090
cmpl $0x0, (%rax)
je 0x2ea8
movq %rax, %rbx
leaq 0x82f2(%rip), %rdi      # 0xb15c
xorl %eax, %eax
callq 0x4ac0
movl $0x0, (%rbx)
jmp 0x2eb6
leaq 0x82c2(%rip), %rdi      # 0xb142
jmp 0x2eaf
xorl %eax, %eax
cmpb $0x1, 0xe79d(%rip)      # 0x11628
jne 0x2ebb
leaq 0x82db(%rip), %rdi      # 0xb16f
xorl %eax, %eax
callq 0x4bdf
callq 0x2090
movl $0x0, (%rax)
jmp 0x2eb6
leaq 0x82ad(%rip), %rdi      # 0xb15c
xorl %eax, %eax
callq 0x4bdf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/tests/kvlds/main.c
// Function: add
static int
add(struct wire_requestqueue * Q,
    const struct kvldskey * key, const struct kvldskey * value, int noop)
{

	/* Send the request. */
	op_done = 0;
	op_count = 1;
	if (proto_kvlds_request_add(Q, key, value, callback_donep, NULL)) {
		warnp("Error sending ADD request");
		goto err0;
	}

	/* Wait for it to finish. */
	if (events_spin(&op_done) || op_failed) {
		warnp("ADD request failed");
		goto err0;
	}

	/* Check for no-op. */
	if (noop && op_p) {
		warn0("ADD should have been a no-op");
		goto err0;
	}
	if (!noop && !op_p) {
		warn0("ADD should not have been a no-op");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
movl %ecx, %ebx
movl $0x0, 0xe74e(%rip)      # 0x11618
movq $0x1, 0xe74b(%rip) # 0x11620
leaq 0x47f(%rip), %rcx       # 0x335b
xorl %r8d, %r8d
callq 0x5328
testl %eax, %eax
je 0x2efe
callq 0x2090
cmpl $0x0, (%rax)
je 0x2f35
movq %rax, %rbx
leaq 0x828e(%rip), %rdi      # 0xb18a
jmp 0x2f26
leaq 0xe713(%rip), %rdi      # 0x11618
callq 0x3695
orl 0xe70c(%rip), %eax      # 0x1161c
je 0x2f3e
callq 0x2090
cmpl $0x0, (%rax)
je 0x2f7f
movq %rax, %rbx
leaq 0x827e(%rip), %rdi      # 0xb1a4
xorl %eax, %eax
callq 0x4ac0
movl $0x0, (%rbx)
jmp 0x2f8d
leaq 0x824e(%rip), %rdi      # 0xb18a
jmp 0x2f86
testl %ebx, %ebx
setne %al
movl 0xe6e3(%rip), %ecx      # 0x1162c
testl %ecx, %ecx
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x2f5e
leaq 0x825b(%rip), %rdi      # 0xb1b7
jmp 0x2f6b
xorl %eax, %eax
orl %ecx, %ebx
jne 0x2f92
leaq 0x8269(%rip), %rdi      # 0xb1d4
xorl %eax, %eax
callq 0x4bdf
callq 0x2090
movl $0x0, (%rax)
jmp 0x2f8d
leaq 0x821e(%rip), %rdi      # 0xb1a4
xorl %eax, %eax
callq 0x4bdf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/tests/kvlds/main.c
// Function: delete
static int
delete(struct wire_requestqueue * Q, const struct kvldskey * key)
{

	/* Send the request. */
	op_done = 0;
	op_count = 1;
	if (proto_kvlds_request_delete(Q, key, callback_done, NULL)) {
		warnp("Error sending DELETE request");
		goto err0;
	}

	/* Wait for it to finish. */
	if (events_spin(&op_done) || op_failed) {
		warnp("DELETE request failed");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
movl $0x0, 0xe679(%rip)      # 0x11618
movq $0x1, 0xe676(%rip) # 0x11620
leaq 0x300(%rip), %rdx       # 0x32b1
xorl %ebx, %ebx
xorl %ecx, %ecx
callq 0x55ee
testl %eax, %eax
je 0x2fd4
callq 0x2090
cmpl $0x0, (%rax)
je 0x300b
movq %rax, %rbx
leaq 0x8223(%rip), %rdi      # 0xb1f5
jmp 0x2ffc
leaq 0xe63d(%rip), %rdi      # 0x11618
callq 0x3695
orl 0xe636(%rip), %eax      # 0x1161c
je 0x3027
callq 0x2090
cmpl $0x0, (%rax)
je 0x3014
movq %rax, %rbx
leaq 0x8370(%rip), %rdi      # 0xb36c
xorl %eax, %eax
callq 0x4ac0
movl $0x0, (%rbx)
jmp 0x3022
leaq 0x81e3(%rip), %rdi      # 0xb1f5
jmp 0x301b
leaq 0x8351(%rip), %rdi      # 0xb36c
xorl %eax, %eax
callq 0x4bdf
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/tests/kvlds/main.c
// Function: modify
static int
modify(struct wire_requestqueue * Q,
    const struct kvldskey * key, const struct kvldskey * value, int noop)
{

	/* Send the request. */
	op_done = 0;
	op_count = 1;
	if (proto_kvlds_request_modify(Q, key, value, callback_donep, NULL)) {
		warnp("Error sending MODIFY request");
		goto err0;
	}

	/* Wait for it to finish. */
	if (events_spin(&op_done) || op_failed) {
		warnp("MODIFY request failed");
		goto err0;
	}

	/* Check for no-op. */
	if (noop && op_p) {
		warn0("MODIFY should have been a no-op");
		goto err0;
	}
	if (!noop && !op_p) {
		warn0("MODIFY should not have been a no-op");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
movl %ecx, %ebx
movl $0x0, 0xe5e0(%rip)      # 0x11618
movq $0x1, 0xe5dd(%rip) # 0x11620
leaq 0x311(%rip), %rcx       # 0x335b
xorl %r8d, %r8d
callq 0x548b
testl %eax, %eax
je 0x306c
callq 0x2090
cmpl $0x0, (%rax)
je 0x30a3
movq %rax, %rbx
leaq 0x81a8(%rip), %rdi      # 0xb212
jmp 0x3094
leaq 0xe5a5(%rip), %rdi      # 0x11618
callq 0x3695
orl 0xe59e(%rip), %eax      # 0x1161c
je 0x30ac
callq 0x2090
cmpl $0x0, (%rax)
je 0x30ed
movq %rax, %rbx
leaq 0x819b(%rip), %rdi      # 0xb22f
xorl %eax, %eax
callq 0x4ac0
movl $0x0, (%rbx)
jmp 0x30fb
leaq 0x8168(%rip), %rdi      # 0xb212
jmp 0x30f4
testl %ebx, %ebx
setne %al
movl 0xe575(%rip), %ecx      # 0x1162c
testl %ecx, %ecx
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x30cc
leaq 0x817b(%rip), %rdi      # 0xb245
jmp 0x30d9
xorl %eax, %eax
orl %ecx, %ebx
jne 0x3100
leaq 0x818c(%rip), %rdi      # 0xb265
xorl %eax, %eax
callq 0x4bdf
callq 0x2090
movl $0x0, (%rax)
jmp 0x30fb
leaq 0x813b(%rip), %rdi      # 0xb22f
xorl %eax, %eax
callq 0x4bdf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/tests/kvlds/main.c
// Function: cas
static int
cas(struct wire_requestqueue * Q,
    const struct kvldskey * key, const struct kvldskey * oval,
    const struct kvldskey * value, int noop)
{

	/* Send the request. */
	op_done = 0;
	op_count = 1;
	if (proto_kvlds_request_cas(Q, key, oval, value, callback_donep, NULL)) {
		warnp("Error sending CAS request");
		goto err0;
	}

	/* Wait for it to finish. */
	if (events_spin(&op_done) || op_failed) {
		warnp("CAS request failed");
		goto err0;
	}

	/* Check for no-op. */
	if (noop && op_p) {
		warn0("CAS should have been a no-op");
		goto err0;
	}
	if (!noop && !op_p) {
		warn0("CAS should not have been a no-op");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
movl %r8d, %ebx
movl $0x0, 0xe508(%rip)      # 0x11618
movq $0x1, 0xe505(%rip) # 0x11620
leaq 0x239(%rip), %r8        # 0x335b
xorl %r9d, %r9d
callq 0x5109
testl %eax, %eax
je 0x3144
callq 0x2090
cmpl $0x0, (%rax)
je 0x317b
movq %rax, %rbx
leaq 0x8147(%rip), %rdi      # 0xb289
jmp 0x316c
leaq 0xe4cd(%rip), %rdi      # 0x11618
callq 0x3695
orl 0xe4c6(%rip), %eax      # 0x1161c
je 0x3184
callq 0x2090
cmpl $0x0, (%rax)
je 0x31c5
movq %rax, %rbx
leaq 0x8137(%rip), %rdi      # 0xb2a3
xorl %eax, %eax
callq 0x4ac0
movl $0x0, (%rbx)
jmp 0x31d3
leaq 0x8107(%rip), %rdi      # 0xb289
jmp 0x31cc
testl %ebx, %ebx
setne %al
movl 0xe49d(%rip), %ecx      # 0x1162c
testl %ecx, %ecx
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x31a4
leaq 0x8114(%rip), %rdi      # 0xb2b6
jmp 0x31b1
xorl %eax, %eax
orl %ecx, %ebx
jne 0x31d8
leaq 0x8122(%rip), %rdi      # 0xb2d3
xorl %eax, %eax
callq 0x4bdf
callq 0x2090
movl $0x0, (%rax)
jmp 0x31d3
leaq 0x80d7(%rip), %rdi      # 0xb2a3
xorl %eax, %eax
callq 0x4bdf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/tests/kvlds/main.c
// Function: cad
static int
cad(struct wire_requestqueue * Q,
    const struct kvldskey * key, const struct kvldskey * oval, int noop)
{

	/* Send the request. */
	op_done = 0;
	op_count = 1;
	if (proto_kvlds_request_cad(Q, key, oval, callback_donep, NULL)) {
		warnp("Error sending CAD request");
		goto err0;
	}

	/* Wait for it to finish. */
	if (events_spin(&op_done) || op_failed) {
		warnp("CAD request failed");
		goto err0;
	}

	/* Check for no-op. */
	if (noop && op_p) {
		warn0("CAD should have been a no-op");
		goto err0;
	}
	if (!noop && !op_p) {
		warn0("CAD should not have been a no-op");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
movl %ecx, %ebx
movl $0x0, 0xe431(%rip)      # 0x11618
movq $0x1, 0xe42e(%rip) # 0x11620
leaq 0x162(%rip), %rcx       # 0x335b
xorl %r8d, %r8d
callq 0x56f7
testl %eax, %eax
je 0x321b
callq 0x2090
cmpl $0x0, (%rax)
je 0x3252
movq %rax, %rbx
leaq 0x80db(%rip), %rdi      # 0xb2f4
jmp 0x3243
leaq 0xe3f6(%rip), %rdi      # 0x11618
callq 0x3695
orl 0xe3ef(%rip), %eax      # 0x1161c
je 0x325b
callq 0x2090
cmpl $0x0, (%rax)
je 0x329c
movq %rax, %rbx
leaq 0x80cb(%rip), %rdi      # 0xb30e
xorl %eax, %eax
callq 0x4ac0
movl $0x0, (%rbx)
jmp 0x32aa
leaq 0x809b(%rip), %rdi      # 0xb2f4
jmp 0x32a3
testl %ebx, %ebx
setne %al
movl 0xe3c6(%rip), %ecx      # 0x1162c
testl %ecx, %ecx
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x327b
leaq 0x80a8(%rip), %rdi      # 0xb321
jmp 0x3288
xorl %eax, %eax
orl %ecx, %ebx
jne 0x32af
leaq 0x80b6(%rip), %rdi      # 0xb33e
xorl %eax, %eax
callq 0x4bdf
callq 0x2090
movl $0x0, (%rax)
jmp 0x32aa
leaq 0x806b(%rip), %rdi      # 0xb30e
xorl %eax, %eax
callq 0x4bdf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jwang11[P]intel_avx_perf/matrix_int.c
// Function: init
void init(void) {
  srand(time(0));
  for (int i = 0; i < row; i++) {
    for (int j = 0; j < col; j++) {
      mat[i][j] = (int)(rand() % (1024*32));
    }   
  }
  for (int j = 0; j < col; j++) {
    mutiplier[j] = (int)(rand() % (1024*32));
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x1070
movl %eax, %edi
callq 0x1060
leaq 0x2ec8(%rip), %r14      # 0x4070
xorl %r15d, %r15d
callq 0x1080
leal 0x7fff(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $0xffff8000, %ecx       # imm = 0xFFFF8000
subl %ecx, %eax
movl %eax, (%r14,%r15,4)
incq %r15
cmpq $0x800, %r15            # imm = 0x800
jne 0x11ab
incq %rbx
addq $0x2000, %r14           # imm = 0x2000
cmpq $0x40, %rbx
jne 0x11a8
xorl %ebx, %ebx
leaq 0x82e84(%rip), %r14     # 0x84070
callq 0x1080
leal 0x7fff(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $0xffff8000, %ecx       # imm = 0xFFFF8000
subl %ecx, %eax
movl %eax, (%rbx,%r14)
addq $0x4, %rbx
cmpq $0x2000, %rbx           # imm = 0x2000
jne 0x11ec
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jwang11[P]intel_avx_perf/matrix_int.c
// Function: calc_non
void calc_non(void) {
  for(int j = 0; j < row; j++) {
    int sum = 0;
    int *vec = mat[j];

    for(int i = 0; i < col; i++)
      sum += vec[i] * mutiplier[i];

    result[j] = sum;
  }
}

// Assembly:
leaq 0x2e4e(%rip), %rax      # 0x4070
xorl %ecx, %ecx
leaq 0x82e45(%rip), %rdx     # 0x84070
leaq 0x84e3e(%rip), %rsi     # 0x86070
vpxor %xmm0, %xmm0, %xmm0
xorl %edi, %edi
vmovdqu64 (%rdi,%rdx), %zmm1
vpmulld (%rax,%rdi), %zmm1, %zmm1
vpaddd %zmm0, %zmm1, %zmm0
addq $0x40, %rdi
cmpq $0x2000, %rdi           # imm = 0x2000
jne 0x1238
vextracti64x4 $0x1, %zmm0, %ymm1
vpaddd %zmm1, %zmm0, %zmm0
vextracti128 $0x1, %ymm0, %xmm1
vpaddd %xmm1, %xmm0, %xmm0
vpshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
vpaddd %xmm1, %xmm0, %xmm0
vpshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
vpaddd %xmm1, %xmm0, %xmm0
vmovd %xmm0, (%rsi,%rcx,4)
incq %rcx
addq $0x2000, %rax           # imm = 0x2000
cmpq $0x40, %rcx
jne 0x1232
vzeroupper
retq
// File: /workspace/github_c_makefile_star2_O1/jwang11[P]intel_avx_perf/matrix_int.c
// Function: calc_avx2
void calc_avx2(void) {
  #define VLEN (256/8/sizeof(int))
  const int col_aligned = col - col % VLEN;
  int *dst_arr;

  __m256i op0, op1, tmp_vec;
  volatile __m256i  tgt;

  for (int i = 0; i < row; i++) {
    int sum = 0;
    tgt = _mm256_setzero_si256();
    for (int j = 0; j < col_aligned; j += VLEN) {
      op0 = _mm256_load_si256((__m256i *)&mutiplier[j]);
      op1 = _mm256_load_si256((__m256i *)&mat[i][j]);
      tmp_vec = _mm256_mullo_epi32(op0, op1);
      tgt = _mm256_add_epi32(tmp_vec, tgt);
    }

    dst_arr = (int *)&tgt;
    for (int k = 0; k < VLEN; k++)
      sum += dst_arr[k];

    for (int l = col_aligned; l < col; l++)
      sum += mat[i][l] * mutiplier[l];

    result[i] = sum;
  }
  #undef VLEN
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $-0x20, %rsp
subq $0x40, %rsp
leaq 0x2dc3(%rip), %rax      # 0x4070
xorl %ecx, %ecx
vxorps %xmm0, %xmm0, %xmm0
leaq 0x82db6(%rip), %rdx     # 0x84070
leaq 0x84daf(%rip), %rsi     # 0x86070
vmovaps %ymm0, (%rsp)
movq $-0x8, %rdi
movq %rdx, %r8
vmovdqa 0x20(%rax,%rdi,4), %ymm1
vpmulld (%r8), %ymm1, %ymm1
vpaddd (%rsp), %ymm1, %ymm1
vmovdqa %ymm1, (%rsp)
addq $0x8, %rdi
addq $0x20, %r8
cmpq $0x7f8, %rdi            # imm = 0x7F8
jb 0x12d0
vmovdqa 0x10(%rsp), %xmm1
vphaddd (%rsp), %xmm1, %xmm1
vphaddd %xmm1, %xmm1, %xmm1
vphaddd %xmm1, %xmm1, %xmm1
vmovd %xmm1, (%rsi,%rcx,4)
incq %rcx
addq $0x2000, %rax           # imm = 0x2000
cmpq $0x40, %rcx
jne 0x12c1
movq %rbp, %rsp
popq %rbp
vzeroupper
retq
// File: /workspace/github_c_makefile_star2_O1/jwang11[P]intel_avx_perf/matrix_int.c
// Function: calc_avx512
void calc_avx512(void) {
  #define VLEN (512/8/sizeof(int))
  const int col_aligned = col - col % VLEN;
  int *dst_arr;

  __m512i op0, op1, tmp_vec;
  volatile __m512i  tgt;

  for (int i = 0; i < row; i++) {
    int sum = 0;

    tgt = _mm512_setzero_si512();
    for (int j = 0; j < col_aligned; j += VLEN) {
      op0 = _mm512_load_si512(&mutiplier[j]);
      op1 = _mm512_load_si512(&mat[i][j]);
      tmp_vec = _mm512_mullo_epi32(op0, op1);
      tgt = _mm512_add_epi32(tmp_vec, tgt);
    }

    dst_arr = (int *)&tgt;
    for (int k = 0; k < VLEN; k++)
      sum += dst_arr[k];

    for (int l = col_aligned; l < col; l++)
      sum += mat[i][l] * mutiplier[l];

    result[i] = sum;
  }
  #undef VLEN
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $-0x40, %rsp
subq $0x80, %rsp
leaq 0x2d32(%rip), %rax      # 0x4070
xorl %ecx, %ecx
vxorps %xmm0, %xmm0, %xmm0
leaq 0x82d25(%rip), %rdx     # 0x84070
leaq 0x84d1e(%rip), %rsi     # 0x86070
vmovaps %zmm0, (%rsp)
movq $-0x10, %rdi
movq %rdx, %r8
vmovdqa64 0x40(%rax,%rdi,4), %zmm1
vpmulld (%r8), %zmm1, %zmm1
vpaddd (%rsp), %zmm1, %zmm1
vmovdqa64 %zmm1, (%rsp)
addq $0x10, %rdi
addq $0x40, %r8
cmpq $0x7f0, %rdi            # imm = 0x7F0
jb 0x1363
vmovdqa 0x20(%rsp), %ymm1
vpaddd (%rsp), %zmm1, %zmm1
vextracti128 $0x1, %ymm1, %xmm2
vpaddd %xmm2, %xmm1, %xmm1
vpshufd $0xee, %xmm1, %xmm2     # xmm2 = xmm1[2,3,2,3]
vpaddd %xmm2, %xmm1, %xmm1
vpshufd $0x55, %xmm1, %xmm2     # xmm2 = xmm1[1,1,1,1]
vpaddd %xmm2, %xmm1, %xmm1
vmovd %xmm1, (%rsi,%rcx,4)
incq %rcx
addq $0x2000, %rax           # imm = 0x2000
cmpq $0x40, %rcx
jne 0x1352
movq %rbp, %rsp
popq %rbp
vzeroupper
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aezv4/aesni/encrypt.c
// Function: aez_encrypt
void aez_encrypt(aez_ctx_t *ctx, char *n, unsigned nbytes,
                 char *ad, unsigned adbytes, unsigned abytes,
                 char *src, unsigned bytes, char *dst) {
    
    block t = aez_hash(ctx, n, nbytes, ad, adbytes, abytes);
    if (bytes==0) {
        unsigned i;
        t = aes((block*)ctx, t, vxor(ctx->J[0], ctx->J[1]));
        for (i=0; i<abytes; i++) dst[i] = ((char*)&t)[i];
    } else if (bytes+abytes < 32)
        cipher_aez_tiny(ctx, t, 0, src, bytes, abytes, dst);
    else
        cipher_aez_core(ctx, t, 0, src, bytes, abytes, dst);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r9d, %r14d
movq %rdi, %r12
movq 0x50(%rsp), %rbx
movl 0x48(%rsp), %r15d
movq 0x40(%rsp), %r13
callq 0x1070
vmovdqa %xmm0, (%rsp)
testl %r15d, %r15d
je 0x2e7c
leal (%r15,%r14), %eax
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movl %r15d, %ecx
movl %r14d, %r8d
movq %rbx, %r9
addq $0x10, %rsp
cmpl $0x1f, %eax
ja 0x2ef6
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1030
vmovdqa (%r12), %xmm1
vmovdqa 0x30(%r12), %xmm2
vmovdqa 0x60(%r12), %xmm3
vmovdqa 0x40(%r12), %xmm4
vpternlogq $0x96, %xmm2, %xmm0, %xmm4
vaesenc %xmm1, %xmm4, %xmm0
vaesenc %xmm2, %xmm0, %xmm0
vaesenc %xmm3, %xmm0, %xmm0
vaesenc %xmm1, %xmm0, %xmm0
vaesenc %xmm2, %xmm0, %xmm0
vaesenc %xmm3, %xmm0, %xmm0
vaesenc %xmm1, %xmm0, %xmm0
vaesenc %xmm2, %xmm0, %xmm0
vaesenc %xmm3, %xmm0, %xmm0
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
testl %r14d, %r14d
je 0x2ee8
movl %r14d, %edx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x10b0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aezv4/aesni/encrypt.c
// Function: aez_decrypt
int aez_decrypt(aez_ctx_t *ctx, char *n, unsigned nbytes,
                char *ad, unsigned adbytes, unsigned abytes,
                char *src, unsigned bytes, char *dst) {
    
    block t;
    if (bytes < abytes) return -1;
    t = aez_hash(ctx, n, nbytes, ad, adbytes, abytes);
    if (bytes==abytes) {
        block claimed = zero_pad(load_partial(src,abytes), 16-abytes);
        t = zero_pad(aes((block*)ctx, t, vxor(ctx->J[0], ctx->J[1])), 16-abytes);
        return is_zero(vandnot(t, claimed)) - 1;  /* is_zero return 0 or 1 */
    } else if (bytes < 32) {
        return cipher_aez_tiny(ctx, t, 1, src, bytes, abytes, dst);
    } else {
        return cipher_aez_core(ctx, t, 1, src, bytes, abytes, dst);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x38(%rsp), %r15d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r9d, %r15d
jb 0x2fa5
movl %r9d, %ebp
movq %rdi, %r14
movq 0x40(%rsp), %r12
movq 0x30(%rsp), %rbx
callq 0x1070
cmpl %ebp, %r15d
jne 0x2fae
movl $0x10, %eax
subl %ebp, %eax
leaq 0x1179(%rip), %rcx      # 0x40c0
vmovdqu (%rax,%rcx), %xmm1
vmovdqa (%r14), %xmm2
vmovdqa 0x30(%r14), %xmm3
vmovdqa 0x60(%r14), %xmm4
vpternlogq $0x96, 0x40(%r14), %xmm3, %xmm0
vaesenc %xmm2, %xmm0, %xmm0
vaesenc %xmm3, %xmm0, %xmm0
vaesenc %xmm4, %xmm0, %xmm0
vaesenc %xmm2, %xmm0, %xmm0
vaesenc %xmm3, %xmm0, %xmm0
vaesenc %xmm4, %xmm0, %xmm0
vaesenc %xmm2, %xmm0, %xmm0
vaesenc %xmm3, %xmm0, %xmm0
vaesenc %xmm4, %xmm0, %xmm0
vaesenc %xmm2, %xmm0, %xmm0
vpand (%rbx), %xmm1, %xmm1
xorl %eax, %eax
vptest %xmm1, %xmm0
adcl $-0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl $0x1, %esi
movq %rbx, %rdx
movl %r15d, %ecx
movl %ebp, %r8d
movq %r12, %r9
cmpl $0x1f, %r15d
ja 0x2fd5
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1030
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aezv4/aesni/encrypt.c
// Function: crypto_aead_encrypt
int crypto_aead_encrypt(
    unsigned char *c,unsigned long long *clen,
    const unsigned char *m,unsigned long long mlen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *nsec,
    const unsigned char *npub,
    const unsigned char *k
)
{
    aez_ctx_t ctx;
    (void)nsec;
    if (clen) *clen = mlen+16;
    aez_setup((unsigned char *)k, 48, &ctx);
    aez_encrypt(&ctx, (char *)npub, 12,
                 (char *)ad, (unsigned)adlen, 16,
                 (char *)m, (unsigned)mlen, (char *)c);
    return 0;
}

// Assembly:
subq $0x88, %rsp
movq %rcx, %r10
movq %rdx, %rax
movq %rsi, %rcx
movq %rdi, %r11
movq 0xa0(%rsp), %rdx
movq 0x98(%rsp), %rsi
testq %rcx, %rcx
je 0x3011
leaq 0x10(%r10), %rdi
movq %rdi, (%rcx)
vmovups (%rdx), %xmm0
movq %rsp, %rdi
vmovaps %xmm0, (%rdi)
vmovups 0x10(%rdx), %xmm0
vmovaps %xmm0, 0x30(%rdi)
vmovups 0x20(%rdx), %xmm0
vmovaps %xmm0, 0x60(%rdi)
vmovdqa (%rdi), %xmm0
vmovdqa 0xff4(%rip), %xmm1      # 0x4030
vpshufb %xmm1, %xmm0, %xmm0
vpshufd $0x93, %xmm0, %xmm2     # xmm2 = xmm0[3,0,1,2]
vpsrad $0x1f, %xmm2, %xmm2
vpshufd $0x93, 0xfec(%rip), %xmm3 # xmm3 = mem[3,0,1,2]
vpaddd %xmm0, %xmm0, %xmm0
vpternlogd $0x6c, %xmm3, %xmm0, %xmm2
vpshufb %xmm1, %xmm2, %xmm4
vmovdqa %xmm4, 0x10(%rdi)
vpshufd $0x93, %xmm0, %xmm0     # xmm0 = xmm0[3,0,1,2]
vpsrad $0x1f, %xmm0, %xmm0
vpaddd %xmm2, %xmm2, %xmm2
vpternlogd $0x78, %xmm3, %xmm0, %xmm2
vpshufb %xmm1, %xmm2, %xmm0
vmovdqa %xmm0, 0x20(%rdi)
vmovdqa 0x30(%rdi), %xmm0
vpshufb %xmm1, %xmm0, %xmm0
vpshufd $0x93, %xmm0, %xmm2     # xmm2 = xmm0[3,0,1,2]
vpsrad $0x1f, %xmm2, %xmm2
vpaddd %xmm0, %xmm0, %xmm0
vpternlogd $0x6c, %xmm3, %xmm0, %xmm2
vpshufb %xmm1, %xmm2, %xmm4
vmovdqa %xmm4, 0x40(%rdi)
vpshufd $0x93, %xmm0, %xmm0     # xmm0 = xmm0[3,0,1,2]
vpsrad $0x1f, %xmm0, %xmm0
vpaddd %xmm2, %xmm2, %xmm2
vpternlogd $0x78, %xmm3, %xmm0, %xmm2
vpshufb %xmm1, %xmm2, %xmm0
vmovdqa %xmm0, 0x50(%rdi)
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, 0x70(%rdi)
subq $0x8, %rsp
movl $0xc, %edx
movq %r8, %rcx
movl %r9d, %r8d
movl $0x10, %r9d
pushq %r11
pushq %r10
pushq %rax
callq 0x10d0
addq $0x20, %rsp
xorl %eax, %eax
addq $0x88, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aezv4/aesni/encrypt.c
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(
    unsigned char *m,unsigned long long *mlen,
    unsigned char *nsec,
    const unsigned char *c,unsigned long long clen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *npub,
    const unsigned char *k
)
{
    aez_ctx_t ctx;
    (void)nsec;
    if (mlen) *mlen = clen-16;
    aez_setup((unsigned char *)k, 48, &ctx);
    return aez_decrypt(&ctx, (char *)npub, 12,
                 (char *)ad, (unsigned)adlen, 16,
                 (char *)c, (unsigned)clen, (char *)m);
}

// Assembly:
subq $0x88, %rsp
movq %r8, %r10
movq %rcx, %rax
movq %rsi, %rcx
movq %rdi, %r11
movq 0xa0(%rsp), %rdx
movq 0x98(%rsp), %rsi
movq 0x90(%rsp), %r8
testq %rcx, %rcx
je 0x313d
leaq -0x10(%r10), %rdi
movq %rdi, (%rcx)
vmovups (%rdx), %xmm0
movq %rsp, %rdi
vmovaps %xmm0, (%rdi)
vmovups 0x10(%rdx), %xmm0
vmovaps %xmm0, 0x30(%rdi)
vmovups 0x20(%rdx), %xmm0
vmovaps %xmm0, 0x60(%rdi)
vmovdqa (%rdi), %xmm0
vmovdqa 0xec8(%rip), %xmm1      # 0x4030
vpshufb %xmm1, %xmm0, %xmm0
vpshufd $0x93, %xmm0, %xmm2     # xmm2 = xmm0[3,0,1,2]
vpsrad $0x1f, %xmm2, %xmm2
vpshufd $0x93, 0xec0(%rip), %xmm3 # xmm3 = mem[3,0,1,2]
vpaddd %xmm0, %xmm0, %xmm0
vpternlogd $0x6c, %xmm3, %xmm0, %xmm2
vpshufb %xmm1, %xmm2, %xmm4
vmovdqa %xmm4, 0x10(%rdi)
vpshufd $0x93, %xmm0, %xmm0     # xmm0 = xmm0[3,0,1,2]
vpsrad $0x1f, %xmm0, %xmm0
vpaddd %xmm2, %xmm2, %xmm2
vpternlogd $0x78, %xmm3, %xmm0, %xmm2
vpshufb %xmm1, %xmm2, %xmm0
vmovdqa %xmm0, 0x20(%rdi)
vmovdqa 0x30(%rdi), %xmm0
vpshufb %xmm1, %xmm0, %xmm0
vpshufd $0x93, %xmm0, %xmm2     # xmm2 = xmm0[3,0,1,2]
vpsrad $0x1f, %xmm2, %xmm2
vpaddd %xmm0, %xmm0, %xmm0
vpternlogd $0x6c, %xmm3, %xmm0, %xmm2
vpshufb %xmm1, %xmm2, %xmm4
vmovdqa %xmm4, 0x40(%rdi)
vpshufd $0x93, %xmm0, %xmm0     # xmm0 = xmm0[3,0,1,2]
vpsrad $0x1f, %xmm0, %xmm0
vpaddd %xmm2, %xmm2, %xmm2
vpternlogd $0x78, %xmm3, %xmm0, %xmm2
vpshufb %xmm1, %xmm2, %xmm0
vmovdqa %xmm0, 0x50(%rdi)
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, 0x70(%rdi)
subq $0x8, %rsp
movl $0xc, %edx
movq %r9, %rcx
movl $0x10, %r9d
pushq %r11
pushq %r10
pushq %rax
callq 0x10a0
addq $0xa8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/log.c
// Function: log_vprintf_writefile
void log_vprintf_writefile(int mask,
		const char *file, const char *func, int line,
		const char* fmt, va_list args)
{
	char *text = log_text(mask, 1, file, func, line, fmt, args);
	size_t len;
	if (text && (len = strlen(text)) > 0) {
		FILE* pf;
		pf = fopen(s_current_log_file, "a+");
		if (pf) {
			fwrite(text, 1, len, pf);
			fclose(pf);
		}
		else {
			printf("cannot open %s\n", s_current_log_file);
		}
	}
	free(text);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rdx
movl $0x1, %esi
callq 0x2fb1
movq %rax, %rbx
testq %rax, %rax
je 0x2fa4
movq %rbx, %rdi
callq 0x20e0
testq %rax, %rax
je 0x2fa4
movq %rax, %r14
movq 0x92ca(%rip), %rdi      # 0xc228
leaq 0x409f(%rip), %rsi      # 0x7004
callq 0x2280
testq %rax, %rax
je 0x2f8f
movq %rax, %r15
movl $0x1, %esi
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
callq 0x23a0
movq %r15, %rdi
callq 0x2210
jmp 0x2fa4
movq 0x9292(%rip), %rsi      # 0xc228
leaq 0x406a(%rip), %rdi      # 0x7007
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2290
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/log.c
// Function: log_text
static char *log_text(int mask, int timestamp,
		const char *file, const char *func, int line,
		const char *fmt, va_list args)
{
	int level = log_level_comp(mask);
	char date[32] = {0};
	const char *extra_msg;
	const char *fname;
	char *text, *retval;
	time_t now;

	if (timestamp) {
		int x;
		now = time(NULL);
		strftime(date, sizeof(date), LOG_TIMEFORMAT, localtime(&now));
		x = strlen(date);
		date[x++] = ' ';
		date[x++] = '\0';
	}
	extra_msg = log_priorityname(level);
	fname = get_filename(file);
	text = log_vmprintf(fmt, args);

	retval = log_mprintf("%s[%s] %s:%d %s", date, extra_msg, fname, line, text);

	free(text);
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %r8, %r15
movl %ecx, %ebx
movq %rdx, %r12
movl %edi, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
testl %esi, %esi
je 0x3020
xorl %edi, %edi
callq 0x21e0
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
callq 0x2160
leaq 0x4082(%rip), %rdx      # 0x7079
movq %rsp, %r13
movl $0x20, %esi
movq %r13, %rdi
movq %rax, %rcx
callq 0x2190
movq %r13, %rdi
callq 0x20e0
cltq
movb $0x20, (%rsp,%rax)
incl %eax
cltq
movb $0x0, (%rsp,%rax)
movzbl %bpl, %eax
cmpl $0x8, %eax
ja 0x3038
movl %eax, %eax
leaq 0x8cee(%rip), %rcx      # 0xbd20
movq (%rcx,%rax,8), %r13
jmp 0x303b
xorl %r13d, %r13d
testq %r12, %r12
je 0x307a
movq %r12, %rdi
callq 0x20e0
leaq (%r12,%rax), %rbp
testq %rax, %rax
jle 0x3067
movzbl (%rbp), %eax
cmpl $0x2f, %eax
je 0x3067
cmpl $0x5c, %eax
je 0x3067
decq %rbp
cmpq %r12, %rbp
ja 0x3051
movzbl (%rbp), %eax
cmpl $0x5c, %eax
je 0x3075
cmpl $0x2f, %eax
jne 0x307c
incq %rbp
jmp 0x307c
xorl %ebp, %ebp
movq %r15, %rdi
movq %r14, %rsi
callq 0x31d2
movq %rax, %r14
movq %rsp, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movl %ebx, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x326f
movq %rax, %rbx
movq %r14, %rdi
callq 0x2290
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/log.c
// Function: log_vprintf_syslog
void log_vprintf_syslog(int mask,
		const char *file, const char *func, int line,
		const char* fmt, va_list args)
{
#ifdef WINDOWS
	logw("log_vprintf_syslog(): not implemented in Windows port");
#else
	char *text = log_text(mask, 0, file, func, line, fmt, args);
	int priority = log_level_comp(mask);
	syslog(priority, "%s", text);
	free(text);
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rdx
movl %edi, %ebx
xorl %esi, %esi
callq 0x2fb1
movq %rax, %r14
movzbl %bl, %edi
leaq 0x3fbe(%rip), %rsi      # 0x7098
movq %rax, %rdx
xorl %eax, %eax
callq 0x2060
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2290
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/log.c
// Function: open_logfile
void open_logfile(const char* log_file)
{
	if (log_file && strlen(log_file)) {
		s_current_log_file = log_file;
		log_vprintf = log_vprintf_writefile;
		log_vprintf_with_timestamp = log_vprintf_writefile;
		s_is_use_logfile = 1;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x3120
cmpb $0x0, (%rdi)
je 0x3120
movq %rdi, 0x9124(%rip)      # 0xc228
leaq -0x1de(%rip), %rax      # 0x2f2d
movq %rax, 0x90de(%rip)      # 0xc1f0
movq %rax, 0x90df(%rip)      # 0xc1f8
movb $0x1, 0x9110(%rip)      # 0xc230
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/log.c
// Function: close_logfile
void close_logfile()
{
	if (s_is_use_logfile) {
		log_vprintf = log_vprintf_default;
		log_vprintf_with_timestamp = log_vprintf_with_timestamp_default;
		s_is_use_logfile = 0;
	}
}

// Assembly:
cmpb $0x1, 0x9108(%rip)      # 0xc230
jne 0x314d
leaq -0x3c5(%rip), %rax      # 0x2d6c
movq %rax, 0x90b8(%rip)      # 0xc1f0
leaq -0x362(%rip), %rax      # 0x2ddd
movq %rax, 0x90b2(%rip)      # 0xc1f8
movb $0x0, 0x90e3(%rip)      # 0xc230
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/log.c
// Function: open_syslog
void open_syslog(const char *ident)
{
#ifdef WINDOWS
	logw("use_syslog(): not implemented in Windows port");
#else
	if (!s_is_use_syslog) {
		openlog(ident, LOG_CONS | LOG_PID, LOG_DAEMON);
		s_is_use_syslog = 1;
		log_vprintf = log_vprintf_syslog;
		log_vprintf_with_timestamp = log_vprintf_syslog;
	}
#endif
}

// Assembly:
cmpb $0x0, 0x90df(%rip)      # 0xc234
jne 0x3187
pushq %rax
movl $0x3, %esi
movl $0x18, %edx
callq 0x21c0
movb $0x1, 0x90c6(%rip)      # 0xc234
leaq -0xb8(%rip), %rax       # 0x30bd
movq %rax, 0x9074(%rip)      # 0xc1f0
movq %rax, 0x9075(%rip)      # 0xc1f8
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/log.c
// Function: log_vmprintf
static char *log_vmprintf(const char *fmt, va_list args)
{
	int cnt, sz;
	char *buf;
	va_list ap_try;

	sz = 1024;
	buf = (char*)malloc(sz);
	if (!buf)
		return NULL;
try_print:
	va_copy(ap_try, args);
	cnt = vsnprintf(buf, sz, fmt, ap_try);
	va_end(ap_try);
	if (cnt >= sz) {
		char *newbuf;
		sz *= 2;
		newbuf = (char*)realloc(buf, sz);
		if (!newbuf) {
			free(buf);
			return NULL;
		}
		buf = newbuf;
		goto try_print;
	}
	if (cnt < 0) {
		free(buf);
		return NULL;
	}
	return buf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
movl $0x400, %edi            # imm = 0x400
callq 0x22e0
testq %rax, %rax
je 0x325b
movq %rax, %rbx
movl $0x400, %ebp            # imm = 0x400
movq %rsp, %r12
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movups (%r14), %xmm0
movaps %xmm0, (%rsp)
movl %ebp, %esi
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
callq 0x2130
cmpl %ebp, %eax
jl 0x324f
addl %ebp, %ebp
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x2350
movq %rax, %r13
testq %rax, %rax
jne 0x3245
movq %rbx, %rdi
callq 0x2290
movq %rbx, %rax
movq %rax, %rbx
testq %r13, %r13
jne 0x3200
jmp 0x325b
testl %eax, %eax
jns 0x325d
movq %rbx, %rdi
callq 0x2290
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_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: try_parse_as_ip4
int try_parse_as_ip4(sockaddr_t* addr, const char* host, const char* port)
{
	struct sockaddr_in* in = (struct sockaddr_in*)(&addr->addr);

	if (inet_pton(AF_INET, host, &in->sin_addr) == 1) {
		in->sin_family = AF_INET;
		in->sin_port = htons(atoi(port));
		addr->addrlen = sizeof(struct sockaddr_in);
		return TRUE;
	}

	return FALSE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x4(%rdi), %rdx
movl $0x2, %edi
callq 0x2390
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
jne 0x3345
movw $0x2, (%rbx)
movq %r14, %rdi
callq 0x2320
rolw $0x8, %ax
movw %ax, 0x2(%rbx)
movl $0x10, 0x80(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: try_parse_as_ip6
int try_parse_as_ip6(sockaddr_t* addr, const char* host, const char* port)
{
	struct sockaddr_in6* in = (struct sockaddr_in6*)(&addr->addr);

	if (inet_pton(AF_INET6, host, &in->sin6_addr) == 1) {
		in->sin6_family = AF_INET6;
		in->sin6_port = htons(atoi(port));
		addr->addrlen = sizeof(struct sockaddr_in);
		return TRUE;
	}

	return FALSE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %rdx
movl $0xa, %edi
callq 0x2390
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
jne 0x3392
movw $0xa, (%rbx)
movq %r14, %rdi
callq 0x2320
rolw $0x8, %ax
movw %ax, 0x2(%rbx)
movl $0x10, 0x80(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: setnonblock
int setnonblock(sock_t sock)
{
#ifdef WINDOWS
	int iResult;
	/* If iMode!=0, non-blocking mode is enabled.*/
	u_long iMode = 1;
	iResult = ioctlsocket(sock, FIONBIO, &iMode);
	if (iResult != NO_ERROR) {
		loge("ioctlsocket() error: result=%ld, errno=%d, %s\n",
			iResult, errno, strerror(errno));
		return -1;
	}
#else
	int flags;
	flags = fcntl(sock, F_GETFL, 0);
	if (flags == -1) {
		loge("fcntl() error: errno=%d, %s\n", errno, strerror(errno));
		return -1;
	}
	if (fcntl(sock, F_SETFL, flags | O_NONBLOCK) == -1) {
		loge("fcntl() error: errno=%d, %s\n", errno, strerror(errno));
		return -1;
	}
#endif

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
xorl %ebx, %ebx
movl $0x3, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2120
cmpl $-0x1, %eax
je 0x341b
orl $0x800, %eax            # imm = 0x800
movl %ebp, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2120
cmpl $-0x1, %eax
jne 0x346e
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0x40, %ebp
cmpl $0x3, (%rax)
jge 0x3431
jmp 0x346e
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0x3c, %ebp
cmpl $0x2, (%rax)
jle 0x346e
callq 0x2030
movl (%rax), %ebx
movl %ebx, %edi
callq 0x20c0
movq %rax, (%rsp)
leaq 0x3cde(%rip), %rsi      # 0x7128
leaq 0x3ce6(%rip), %rdx      # 0x7137
leaq 0x3ceb(%rip), %r8       # 0x7143
movl $0x3, %edi
movl %ebp, %ecx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x2e92
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: setreuseaddr
int setreuseaddr(sock_t sock)
{
	int opt = 1;

	if (setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (const char*)&opt, sizeof(opt)) != 0) {
		loge("setsockopt() error: errno=%d, %s\n", errno, strerror(errno));
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
leaq 0x14(%rsp), %rcx
movl $0x1, (%rcx)
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x2360
testl %eax, %eax
je 0x34ef
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x34f1
callq 0x2030
movl (%rax), %ebp
movl %ebp, %edi
callq 0x20c0
movq %rax, (%rsp)
leaq 0x3c5d(%rip), %rsi      # 0x7128
leaq 0x3c8e(%rip), %rdx      # 0x7160
leaq 0x3c94(%rip), %r8       # 0x716d
movl $0x3, %edi
movl $0x4d, %ecx
movl %ebp, %r9d
xorl %eax, %eax
callq 0x2e92
jmp 0x34f1
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: setnodelay
int setnodelay(sock_t sock)
{
	int opt = 1;

	if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (const char*)&opt, sizeof(opt)) != 0) {
		loge("setsockopt() error: errno=%d, %s\n", errno, strerror(errno));
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
leaq 0x14(%rsp), %rcx
movl $0x1, (%rcx)
movl $0x6, %esi
movl $0x1, %edx
movl $0x4, %r8d
callq 0x2360
testl %eax, %eax
je 0x3572
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x3574
callq 0x2030
movl (%rax), %ebp
movl %ebp, %edi
callq 0x20c0
movq %rax, (%rsp)
leaq 0x3bda(%rip), %rsi      # 0x7128
leaq 0x3c3a(%rip), %rdx      # 0x718f
leaq 0x3c11(%rip), %r8       # 0x716d
movl $0x3, %edi
movl $0x59, %ecx
movl %ebp, %r9d
xorl %eax, %eax
callq 0x2e92
jmp 0x3574
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: getsockerr
int getsockerr(sock_t sock)
{
	int err = 0;
	int len = sizeof(int);
	if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (char*)& err, &len) < 0)
		return errno;
	return err;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r8
movl $0x4, (%r8)
movl $0x1, %esi
movl $0x4, %edx
movq %rbx, %rcx
callq 0x2170
testl %eax, %eax
jns 0x35b7
callq 0x2030
movq %rax, %rbx
movl (%rbx), %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: get_addrname
char* get_addrname(const struct sockaddr* addr)
{
	static char addrname[INET6_ADDRSTRLEN + 16];
	char sip[INET6_ADDRSTRLEN];
	if (addr->sa_family == AF_INET) {
		const struct sockaddr_in* addr_in = (const struct sockaddr_in*)addr;
		inet_ntop(AF_INET, &addr_in->sin_addr, sip, sizeof(sip));
		snprintf(addrname, sizeof(addrname), "%s:%d", sip,
			(int)(htons(addr_in->sin_port) & 0xFFFF));
	}
	else if (addr->sa_family == AF_INET6) {
		const struct sockaddr_in6* addr_in6 = (const struct sockaddr_in6*)addr;
		inet_ntop(AF_INET6, &addr_in6->sin6_addr, sip, sizeof(sip));
		snprintf(addrname, sizeof(addrname), "[%s]:%d", sip,
			(int)(htons(addr_in6->sin6_port) & 0xFFFF));
	}
	else {
		addrname[0] = '\0';
	}
	return addrname;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movzwl (%rdi), %eax
cmpl $0xa, %eax
je 0x3625
cmpl $0x2, %eax
jne 0x3669
leaq 0x4(%rbx), %rsi
movq %rsp, %r14
movl $0x2, %edi
movq %r14, %rdx
movl $0x2e, %ecx
callq 0x2220
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %r8d
leaq 0x8c54(%rip), %rdi      # 0xc270
leaq 0x3b77(%rip), %rdx      # 0x719a
jmp 0x3658
leaq 0x8(%rbx), %rsi
movq %rsp, %r14
movl $0xa, %edi
movq %r14, %rdx
movl $0x2e, %ecx
callq 0x2220
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %r8d
leaq 0x8c1f(%rip), %rdi      # 0xc270
leaq 0x3b48(%rip), %rdx      # 0x71a0
movl $0x3e, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2330
jmp 0x3670
movb $0x0, 0x8c00(%rip)      # 0xc270
leaq 0x8bf9(%rip), %rax      # 0xc270
addq $0x38, %rsp
popq %rbx
popq %r14
retq