LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: tb_set_cell_ex
int tb_set_cell_ex(int x, int y, uint32_t *ch, size_t nch, uintattr_t fg,
    uintattr_t bg) {
    if_not_init_return();
    int rv;
    struct tb_cell *cell;
    if_err_return(rv, cellbuf_get(&global.back, x, y, &cell));
    if_err_return(rv, cell_set(cell, ch, nch, fg, bg));
    return TB_OK;
}

// Assembly:
cmpl $0x0, 0x1dde9(%rip)     # 0x25c8c
je 0x7eef
movl $0xfffffff7, %eax       # imm = 0xFFFFFFF7
testl %edi, %edi
js 0x7ef4
testl %esi, %esi
js 0x7ef4
movl 0x1dd70(%rip), %ecx     # 0x25c28
cmpl %edi, %ecx
jle 0x7ef4
cmpl %esi, 0x1dd6a(%rip)     # 0x25c2c
jle 0x7ef4
movq 0x1dd65(%rip), %r10     # 0x25c30
imull %esi, %ecx
addl %edi, %ecx
xorl %eax, %eax
movl $0x0, %esi
testq %rdx, %rdx
je 0x7ede
movl (%rdx), %esi
movl %esi, (%r10,%rcx,8)
movw %r8w, 0x4(%r10,%rcx,8)
movw %r9w, 0x6(%r10,%rcx,8)
retq
movl $0xfffffff8, %eax       # imm = 0xFFFFFFF8
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: tb_set_input_mode
int tb_set_input_mode(int mode) {
    if_not_init_return();
    if (mode == TB_INPUT_CURRENT) {
        return global.input_mode;
    }

    if ((mode & (TB_INPUT_ESC | TB_INPUT_ALT)) == 0) {
        mode |= TB_INPUT_ESC;
    }

    if ((mode & (TB_INPUT_ESC | TB_INPUT_ALT)) == (TB_INPUT_ESC | TB_INPUT_ALT))
    {
        mode &= ~TB_INPUT_ALT;
    }

    if (mode & TB_INPUT_MOUSE) {
        bytebuf_puts(&global.out, TB_HARDCAP_ENTER_MOUSE);
        bytebuf_flush(&global.out, global.wfd);
    } else {
        bytebuf_puts(&global.out, TB_HARDCAP_EXIT_MOUSE);
        bytebuf_flush(&global.out, global.wfd);
    }

    global.input_mode = mode;
    return TB_OK;
}

// Assembly:
cmpl $0x0, 0x1dd82(%rip)     # 0x25c8c
je 0x7f66
testl %edi, %edi
je 0x7f6c
pushq %rbx
xorl %eax, %eax
testb $0x3, %dil
sete %al
orl %edi, %eax
movl %eax, %ecx
notl %ecx
movl %eax, %ebx
andl $-0x3, %ebx
testb $0x3, %cl
cmovnel %eax, %ebx
testb $0x4, %bl
leaq 0x14949(%rip), %rax     # 0x1c87e
leaq 0x14921(%rip), %rsi     # 0x1c85d
cmoveq %rax, %rsi
leaq 0x1dcc9(%rip), %rdi     # 0x25c10
movl $0x20, %edx
callq 0x8535
movl 0x1db19(%rip), %edi     # 0x25a70
callq 0x7cb7
movl %ebx, 0x1db3e(%rip)     # 0x25aa0
xorl %eax, %eax
popq %rbx
retq
movl $0xfffffff8, %eax       # imm = 0xFFFFFFF8
retq
movl 0x1db2e(%rip), %eax     # 0x25aa0
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: tb_set_output_mode
int tb_set_output_mode(int mode) {
    if_not_init_return();
    switch (mode) {
        case TB_OUTPUT_CURRENT:
            return global.output_mode;
        case TB_OUTPUT_NORMAL:
        case TB_OUTPUT_256:
        case TB_OUTPUT_216:
        case TB_OUTPUT_GRAYSCALE:
#ifdef TB_OPT_TRUECOLOR
        case TB_OUTPUT_TRUECOLOR:
#endif
            global.last_fg = ~global.fg;
            global.last_bg = ~global.bg;
            global.output_mode = mode;
            return TB_OK;
    }
    return TB_ERR;
}

// Assembly:
cmpl $0x0, 0x1dd12(%rip)     # 0x25c8c
je 0x7f9b
leal -0x1(%rdi), %eax
cmpl $0x4, %eax
jae 0x7fa1
movl 0x1db0e(%rip), %eax     # 0x25a98
notl %eax
movl %eax, 0x1db0a(%rip)     # 0x25a9c
movl %edi, 0x1db0c(%rip)     # 0x25aa4
xorl %eax, %eax
retq
movl $0xfffffff8, %eax       # imm = 0xFFFFFFF8
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %edi, %edi
jne 0x7f9a
movl 0x1daf4(%rip), %eax     # 0x25aa4
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: tb_print_ex
int tb_print_ex(int x, int y, uintattr_t fg, uintattr_t bg, size_t *out_w,
    const char *str) {
    int rv;
    uint32_t uni;
    int w, ix = x;
    if (out_w) {
        *out_w = 0;
    }
    while (*str) {
        str += tb_utf8_char_to_unicode(&uni, str);
        w = wcwidth((wchar_t)uni);
        if (w < 0) {
            w = 1;
        }
        if (w == 0 && x > ix) {
            if_err_return(rv, tb_extend_cell(x - 1, y, uni));
        } else {
            if_err_return(rv, tb_set_cell(x, y, uni, fg, bg));
        }
        x += w;
        if (out_w) {
            *out_w += w;
        }
    }
    return TB_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, %r14
movl %ecx, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl %esi, %r12d
movl %edi, 0x8(%rsp)
testq %r8, %r8
je 0x8274
movq $0x0, (%r14)
cmpb $0x0, (%rbx)
je 0x832d
movl 0x8(%rsp), %r13d
leaq 0x14(%rsp), %rdi
movq %rbx, %rsi
callq 0x8352
movl %eax, %ebp
movl 0x14(%rsp), %r15d
movl %r15d, %edi
callq 0x63c0
testl %eax, %eax
movl $0x1, %ecx
cmovsl %ecx, %eax
testl %eax, %eax
sete %cl
cmpl 0x8(%rsp), %r13d
setg %sil
andb %cl, %sil
movl 0x1d9cd(%rip), %edx     # 0x25c8c
cmpb $0x1, %sil
je 0x8331
testl %edx, %edx
je 0x833c
movl $0xfffffff7, %ecx       # imm = 0xFFFFFFF7
testl %r13d, %r13d
js 0x8341
testl %r12d, %r12d
js 0x8341
movl 0x1d94a(%rip), %edx     # 0x25c28
cmpl %r13d, %edx
jle 0x8341
cmpl %r12d, 0x1d942(%rip)    # 0x25c2c
jle 0x8341
imull %r12d, %edx
addl %r13d, %edx
movq 0x1d936(%rip), %rcx     # 0x25c30
movl %r15d, (%rcx,%rdx,8)
movl 0xc(%rsp), %esi
movw %si, 0x4(%rcx,%rdx,8)
movl 0x10(%rsp), %esi
movw %si, 0x6(%rcx,%rdx,8)
testq %r14, %r14
je 0x831b
movslq %eax, %rcx
addq %rcx, (%r14)
movslq %ebp, %rcx
addq %rcx, %rbx
addl %eax, %r13d
cmpb $0x0, (%rbx)
jne 0x8282
xorl %ecx, %ecx
jmp 0x8341
xorl %ecx, %ecx
negl %edx
sbbl %ecx, %ecx
orl $-0x8, %ecx
jmp 0x8341
movl $0xfffffff8, %ecx       # imm = 0xFFFFFFF8
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: tb_printf
int tb_printf(int x, int y, uintattr_t fg, uintattr_t bg, const char *fmt,
    ...) {
    int rv;
    va_list vl;
    va_start(vl, fmt);
    rv = tb_printf_inner(x, y, fg, bg, NULL, fmt, vl);
    va_end(vl);
    return rv;
}

// Assembly:
subq $0xe8, %rsp
movq %r8, %r10
leaq 0x30(%rsp), %r8
movq %r9, 0x28(%r8)
testb %al, %al
je 0x8404
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
leaq 0x10(%rsp), %rax
movq %r8, 0x10(%rax)
leaq 0xf0(%rsp), %r8
movq %r8, 0x8(%rax)
movabsq $0x3000000028, %r8      # imm = 0x3000000028
movq %r8, (%rax)
movq %rax, (%rsp)
xorl %r8d, %r8d
movq %r10, %r9
callq 0x843d
addq $0xe8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: tb_printf_inner
int tb_printf_inner(int x, int y, uintattr_t fg, uintattr_t bg, size_t *out_w,
    const char *fmt, va_list vl) {
    int rv;
    char buf[TB_OPT_PRINTF_BUF];
    rv = vsnprintf(buf, sizeof(buf), fmt, vl);
    if (rv < 0 || rv >= (int)sizeof(buf)) {
        return TB_ERR;
    }
    return tb_print_ex(x, y, fg, bg, out_w, buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %r8, %rbx
movl %ecx, %r14d
movl %edx, %r12d
movl %esi, %ebp
movl %edi, %r15d
movq 0x1030(%rsp), %rcx
movq %rsp, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r9, %rdx
callq 0x60f0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0xfff, %ecx            # imm = 0xFFF
ja 0x8499
movzwl %r12w, %edx
movzwl %r14w, %ecx
movq %rsp, %r9
movl %r15d, %edi
movl %ebp, %esi
movq %rbx, %r8
callq 0x8245
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: tb_printf_ex
int tb_printf_ex(int x, int y, uintattr_t fg, uintattr_t bg, size_t *out_w,
    const char *fmt, ...) {
    int rv;
    va_list vl;
    va_start(vl, fmt);
    rv = tb_printf_inner(x, y, fg, bg, out_w, fmt, vl);
    va_end(vl);
    return rv;
}

// Assembly:
subq $0xe8, %rsp
testb %al, %al
je 0x84ee
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
leaq 0x30(%rsp), %rax
leaq 0x10(%rsp), %r10
movq %rax, 0x10(%r10)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r10)
movabsq $0x3000000030, %rax     # imm = 0x3000000030
movq %rax, (%r10)
movq %r10, (%rsp)
callq 0x843d
addq $0xe8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: bytebuf_nputs
static int bytebuf_nputs(struct bytebuf_t *b, const char *str, size_t nstr) {
    int rv;
    if_err_return(rv, bytebuf_reserve(b, b->len + nstr + 1));
    memcpy(b->buf + b->len, str, nstr);
    b->len += nstr;
    b->buf[b->len] = '\0';
    return TB_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movq 0x10(%r14), %rcx
leaq (%rdx,%rdi), %rax
incq %rax
cmpq %rax, %rcx
jae 0x857f
cmpq $0x1, %rcx
adcq $0x0, %rcx
movq %rcx, %r12
addq %rcx, %rcx
cmpq %rax, %r12
jb 0x8562
movq (%r14), %rdi
testq %rdi, %rdi
je 0x8584
movq %r12, %rsi
callq 0x6430
jmp 0x858c
movq (%r14), %rax
jmp 0x859c
movq %r12, %rdi
callq 0x63e0
testq %rax, %rax
je 0x85c7
movq %rax, (%r14)
movq %r12, 0x10(%r14)
movq 0x8(%r14), %rdi
addq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x6360
addq 0x8(%r14), %rbx
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movb $0x0, (%rax,%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
jmp 0x85bb
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: tb_sendf
int tb_sendf(const char *fmt, ...) {
    int rv;
    char buf[TB_OPT_PRINTF_BUF];
    va_list vl;
    va_start(vl, fmt);
    rv = vsnprintf(buf, sizeof(buf), fmt, vl);
    va_end(vl);
    if (rv < 0 || rv >= (int)sizeof(buf)) {
        return TB_ERR;
    }
    return tb_send(buf, (size_t)rv);
}

// Assembly:
subq $0x10d8, %rsp           # imm = 0x10D8
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x862c
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rdi, 0x10(%rcx)
leaq 0x10e0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0xd0(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r10, %rdx
callq 0x60f0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0xfff, %ecx            # imm = 0xFFF
ja 0x8686
movl %ecx, %edx
leaq 0x1d597(%rip), %rdi     # 0x25c10
leaq 0xd0(%rsp), %rsi
callq 0x8535
addq $0x10d8, %rsp           # imm = 0x10D8
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/phpspy.c
// Function: log_error
void log_error(const char *fmt, ...) {
    va_list args;
    if (log_error_enabled) {
        va_start(args, fmt);
        vfprintf(stderr, fmt, args);
    }
}

// Assembly:
subq $0xd8, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xabf4
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl $0x0, 0x1a785(%rip)     # 0x25380
jne 0xac05
addq $0xd8, %rsp
retq
movq %rdi, %r10
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x1a3bc(%rip), %rax     # 0x24ff0
movq (%rax), %rdi
movq %r10, %rsi
callq 0x6550
jmp 0xabfd
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/phpspy.c
// Function: clock_get
static void clock_get(struct timespec *ts) {
    if (clock_gettime(CLOCK_MONOTONIC_RAW, ts) == -1) {
        perror("clock_gettime");
        ts->tv_sec = 0;
        ts->tv_nsec = 0;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x4, %edi
movq %rbx, %rsi
callq 0x6110
cmpl $-0x1, %eax
je 0x130b1
popq %rbx
retq
leaq 0xba9b(%rip), %rdi      # 0x1eb53
callq 0x6530
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x130af
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/phpspy.c
// Function: phpspy_zend_inline_hash_func
uint64_t phpspy_zend_inline_hash_func(const char *str, size_t len) {
    /* Adapted from zend_string.h */
    uint64_t hash;
    hash = 5381UL;

    for (; len >= 8; len -= 8) {
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
        hash = ((hash << 5) + hash) + *str++;
    }
    switch (len) {
        case 7: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */
        case 6: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */
        case 5: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */
        case 4: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */
        case 3: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */
        case 2: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */
        case 1: hash = ((hash << 5) + hash) + *str++; break;
        case 0: break;
    }

    return hash | 0x8000000000000000UL;
}

// Assembly:
movl $0x1505, %eax           # imm = 0x1505
cmpq $0x8, %rsi
jb 0x13160
movq %rax, %rcx
shlq $0x5, %rcx
addq %rax, %rcx
movsbq (%rdi), %rax
addq %rcx, %rax
movsbq 0x1(%rdi), %rcx
addq %rax, %rcx
shlq $0x5, %rax
addq %rax, %rcx
movsbq 0x2(%rdi), %rax
addq %rcx, %rax
shlq $0x5, %rcx
addq %rcx, %rax
movsbq 0x3(%rdi), %rcx
addq %rax, %rcx
shlq $0x5, %rax
addq %rax, %rcx
movsbq 0x4(%rdi), %rax
addq %rcx, %rax
shlq $0x5, %rcx
addq %rcx, %rax
movsbq 0x5(%rdi), %rcx
addq %rax, %rcx
shlq $0x5, %rax
addq %rax, %rcx
movsbq 0x6(%rdi), %rdx
addq %rcx, %rdx
shlq $0x5, %rcx
addq %rcx, %rdx
movsbq 0x7(%rdi), %rax
addq %rdx, %rax
shlq $0x5, %rdx
addq $0x8, %rdi
addq %rdx, %rax
addq $-0x8, %rsi
cmpq $0x7, %rsi
ja 0x130d4
leaq 0x944d(%rip), %rcx      # 0x1c5b4
movslq (%rcx,%rsi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movq %rax, %rcx
shlq $0x5, %rcx
addq %rax, %rcx
movsbq (%rdi), %rax
incq %rdi
addq %rcx, %rax
movq %rax, %rcx
shlq $0x5, %rcx
addq %rax, %rcx
movsbq (%rdi), %rax
incq %rdi
addq %rcx, %rax
movq %rax, %rcx
shlq $0x5, %rcx
addq %rax, %rcx
movsbq (%rdi), %rax
incq %rdi
addq %rcx, %rax
movq %rax, %rcx
shlq $0x5, %rcx
addq %rax, %rcx
movsbq (%rdi), %rax
incq %rdi
addq %rcx, %rax
movq %rax, %rcx
shlq $0x5, %rcx
addq %rax, %rcx
movsbq (%rdi), %rax
incq %rdi
addq %rcx, %rax
movq %rax, %rcx
shlq $0x5, %rcx
addq %rax, %rcx
movsbq (%rdi), %rax
incq %rdi
addq %rcx, %rax
movq %rax, %rcx
shlq $0x5, %rcx
addq %rax, %rcx
movsbq (%rdi), %rax
addq %rcx, %rax
btsq $0x3f, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: load_terminfo_from_path
static int load_terminfo_from_path(const char *path, const char *term) {
    int rv;
    char tmp[PATH_MAX];

    // Look for term at this terminfo location, e.g., <terminfo>/x/xterm
    snprintf_or_return(rv, tmp, sizeof(tmp), "%s/%c/%s", path, term[0], term);
    if_ok_return(rv, read_terminfo_path(tmp));

#ifdef __APPLE__
    // Try the Darwin equivalent path, e.g., <terminfo>/78/xterm
    snprintf_or_return(rv, tmp, sizeof(tmp), "%s/%x/%s", path, term[0], term);
    return read_terminfo_path(tmp);
#endif

    return TB_ERR;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1098, %rsp           # imm = 0x1098
movq %rsi, %r9
movq %rdi, %rcx
movsbl (%rsi), %r8d
leaq 0xacfa(%rip), %rdx      # 0x1df18
leaq 0x90(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
xorl %eax, %eax
callq 0x61d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0xfff, %eax            # imm = 0xFFF
ja 0x13278
leaq 0xacdc(%rip), %rsi      # 0x1df21
leaq 0x90(%rsp), %rdi
callq 0x6520
testq %rax, %rax
je 0x13278
movq %rax, %r14
movq %rax, %rdi
callq 0x6380
movq %rsp, %rsi
movl %eax, %edi
callq 0x65f0
testl %eax, %eax
je 0x13289
movq %r14, %rdi
callq 0x6140
movl %ebx, %eax
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x63e0
testq %rax, %rax
je 0x13270
movq %rax, %r15
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x60e0
cmpq %r12, %rax
jne 0x132d0
movq %r15, 0x127eb(%rip)     # 0x25aa8
movq %r12, 0x127ec(%rip)     # 0x25ab0
movq %r14, %rdi
callq 0x6140
xorl %ebx, %ebx
jmp 0x13278
movq %r14, %rdi
callq 0x6140
movq %r15, %rdi
callq 0x6050
jmp 0x13278
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: cap_trie_add
static int cap_trie_add(const char *cap, uint16_t key, uint8_t mod) {
    struct cap_trie_t *next, *node = &global.cap_trie;
    size_t i, j;
    for (i = 0; cap[i] != '\0'; i++) {
        char c = cap[i];
        next = NULL;

        // Check if c is already a child of node
        for (j = 0; j < node->nchildren; j++) {
            if (node->children[j].c == c) {
                next = &node->children[j];
                break;
            }
        }
        if (!next) {
            // We need to add a new child to node
            node->nchildren += 1;
            node->children =
                tb_realloc(node->children, sizeof(*node) * node->nchildren);
            if (!node->children) {
                return TB_ERR_MEM;
            }
            next = &node->children[node->nchildren - 1];
            memset(next, 0, sizeof(*next));
            next->c = c;
        }

        // Continue
        node = next;
    }

    if (node->is_leaf) {
        // Already a leaf here
        return TB_ERR_CAP_COLLISION;
    }

    node->is_leaf = 1;
    node->key = key;
    node->mod = mod;
    return TB_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movb (%rdi), %r12b
testb %r12b, %r12b
je 0x13374
movq %rdi, %r14
leaq 0x128d5(%rip), %r13     # 0x25bd8
xorl %r15d, %r15d
movq 0x8(%r13), %rdi
movq 0x10(%r13), %rsi
movq %rdi, %rcx
movq %rsi, %rax
testq %rsi, %rsi
je 0x13327
cmpb %r12b, (%rcx)
je 0x13362
addq $0x20, %rcx
decq %rax
jne 0x13319
incq %rsi
movq %rsi, 0x10(%r13)
shlq $0x5, %rsi
callq 0x6430
movq %rax, 0x8(%r13)
testq %rax, %rax
je 0x13398
movq 0x10(%r13), %rdx
shlq $0x5, %rdx
leaq (%rax,%rdx), %rcx
addq $-0x20, %rcx
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax,%rdx)
movups %xmm0, -0x10(%rax,%rdx)
movb %r12b, -0x20(%rax,%rdx)
movb 0x1(%r14,%r15), %r12b
incq %r15
movq %rcx, %r13
testb %r12b, %r12b
jne 0x13306
jmp 0x1337b
leaq 0x1285d(%rip), %rcx     # 0x25bd8
movl $0xffffffea, %eax       # imm = 0xFFFFFFEA
cmpl $0x0, 0x18(%rcx)
jne 0x1339d
movl $0x1, 0x18(%rcx)
movw %bp, 0x1c(%rcx)
movb %bl, 0x1e(%rcx)
xorl %eax, %eax
jmp 0x1339d
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: cellbuf_free
static int cellbuf_free(struct cellbuf_t *c) {
    if (c->cells) {
        int i;
        for (i = 0; i < c->width * c->height; i++) {
            cell_free(&c->cells[i]);
        }
        tb_free(c->cells);
    }
    memset(c, 0, sizeof(*c));
    return TB_OK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x13425
movl 0x4(%rbx), %eax
imull (%rbx), %eax
testl %eax, %eax
jle 0x13420
xorl %eax, %eax
movq 0x8(%rbx), %rcx
movq $0x0, (%rcx,%rax,8)
incq %rax
movslq (%rbx), %rcx
movslq 0x4(%rbx), %rdx
imulq %rcx, %rdx
cmpq %rdx, %rax
jl 0x133fd
movq 0x8(%rbx), %rdi
callq 0x6050
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: cap_trie_deinit
static int cap_trie_deinit(struct cap_trie_t *node) {
    size_t j;
    for (j = 0; j < node->nchildren; j++) {
        cap_trie_deinit(&node->children[j]);
    }
    if (node->children) {
        tb_free(node->children);
    }
    memset(node, 0, sizeof(*node));
    return TB_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x1345b
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
addq %r14, %rdi
callq 0x1342d
incq %r15
addq $0x20, %r14
cmpq 0x10(%rbx), %r15
jb 0x13442
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x13469
callq 0x6050
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: extract_esc_user
static int extract_esc_user(struct tb_event *event, int is_post) {
    int rv;
    size_t consumed = 0;
    struct bytebuf_t *in = &global.in;
    int (*fn)(struct tb_event *, size_t *);

    fn = is_post ? global.fn_extract_esc_post : global.fn_extract_esc_pre;

    if (!fn) {
        return TB_ERR;
    }

    rv = fn(event, &consumed);
    if (rv == TB_OK) {
        bytebuf_shift(in, consumed);
    }

    if_ok_or_need_more_return(rv, rv);
    return TB_ERR;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq $0x0, 0x8(%rsp)
xorl %eax, %eax
testl %esi, %esi
setne %al
leaq 0x1207f(%rip), %rcx     # 0x25a68
movq 0x228(%rcx,%rax,8), %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x13a3e
leaq 0x8(%rsp), %rsi
callq *%rax
cmpl $-0x2, %eax
je 0x13a3c
testl %eax, %eax
jne 0x13a3e
movq 0x8(%rsp), %rbx
movq 0x121e9(%rip), %rdx     # 0x25c00
cmpq %rbx, %rdx
cmovbq %rdx, %rbx
subq %rbx, %rdx
movq 0x121d0(%rip), %rdi     # 0x25bf8
leaq (%rdi,%rbx), %rsi
callq 0x6490
subq %rbx, 0x121c8(%rip)     # 0x25c00
xorl %ebx, %ebx
jmp 0x13a3e
movl %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/vendor/termbox2/termbox2.h
// Function: cellbuf_resize
static int cellbuf_resize(struct cellbuf_t *c, int w, int h) {
    int rv;

    int ow = c->width;
    int oh = c->height;

    if (ow == w && oh == h) {
        return TB_OK;
    }

    w = w < 1 ? 1 : w;
    h = h < 1 ? 1 : h;

    int minw = (w < ow) ? w : ow;
    int minh = (h < oh) ? h : oh;

    struct tb_cell *prev = c->cells;

    if_err_return(rv, cellbuf_init(c, w, h));
    if_err_return(rv, cellbuf_clear(c));

    int x, y;
    for (x = 0; x < minw; x++) {
        for (y = 0; y < minh; y++) {
            struct tb_cell *src, *dst;
            src = &prev[(y * ow) + x];
            if_err_return(rv, cellbuf_get(c, x, y, &dst));
            if_err_return(rv, cell_copy(dst, src));
        }
    }

    tb_free(prev);

    return TB_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movl (%rdi), %r12d
movl 0x4(%rdi), %ebp
movl %r12d, %ecx
xorl %esi, %ecx
movl %ebp, %esi
xorl %edx, %esi
xorl %eax, %eax
orl %ecx, %esi
je 0x13b5f
movq %rdi, %r15
cmpl $0x2, %r14d
movl $0x1, %r13d
cmovll %r13d, %r14d
cmpl $0x2, %edx
cmovgel %edx, %r13d
cmpl %r12d, %r14d
movl %r12d, %eax
cmovll %r14d, %eax
movl %eax, 0xc(%rsp)
cmpl %ebp, %r13d
movl %ebp, %ebx
cmovll %r13d, %ebx
movq 0x8(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %r13, %rsi
imulq %r14, %rsi
shlq $0x3, %rsi
movl $0x1, %edi
callq 0x62f0
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x13b5a
movl %r14d, (%r15)
movl %r13d, 0x4(%r15)
imull %r14d, %r13d
movsd 0x11fbb(%rip), %xmm0    # 0x25a98
xorl %ecx, %ecx
movl $0x20, (%rax,%rcx,8)
movss %xmm0, 0x4(%rax,%rcx,8)
incq %rcx
cmpq %rcx, %r13
jne 0x13adf
testl %r12d, %r12d
movq 0x10(%rsp), %rdi
jle 0x13b51
movl 0xc(%rsp), %ecx
movl %ebx, %edx
leaq 0x4(%rdi), %rsi
shlq $0x3, %r12
addq $0x4, %rax
leaq (,%r14,8), %r14
xorl %r8d, %r8d
testl %ebp, %ebp
jle 0x13b41
movq %rdx, %r9
movq %rax, %r10
movq %rsi, %r11
movl -0x4(%r11), %ebx
movl %ebx, -0x4(%r10)
movl (%r11), %ebx
movl %ebx, (%r10)
addq %r12, %r11
addq %r14, %r10
decq %r9
jne 0x13b28
incq %r8
addq $0x8, %rsi
addq $0x8, %rax
cmpq %rcx, %r8
jne 0x13b1b
callq 0x6050
xorl %eax, %eax
jmp 0x13b5f
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/phpspy.c
// Function: atoi_with_min_or_exit
static int atoi_with_min_or_exit(const char *name, const char *str, int min) {
    long result = strtol_with_min_or_exit(name, str, min);
    #if LONG_MAX > INT_MAX
    if (result > INT_MAX) {
        log_error("Expected value that could fit in a C int for %s, got '%s'\n", name, str);
        usage(stderr, 1);
    }
    #endif
    return (int)result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x13c17
movl $0x80000000, %ecx       # imm = 0x80000000
cmpq %rcx, %rax
jge 0x13bef
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xad83(%rip), %rdi      # 0x1e979
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xab99
movq 0x113e6(%rip), %rax     # 0x24ff0
movq (%rax), %rdi
movl $0x1, %esi
callq 0xac41
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/phpspy.c
// Function: strtol_with_min_or_exit
static long strtol_with_min_or_exit(const char *name, const char *str, int min) {
    long result;
    char *end;
    errno = 0;
    result = strtol(str, &end, 10);
    if (end <= str || *end != '\0') {
        /* e.g. reject -H '', -H invalid, -H 5000suffix */
        log_error("Expected integer for %s, got '%s'\n", name, str);
        usage(stderr, 1);
    }
    if (result < min) {
        /* e.g. reject -H 0 */
        log_error("Expected integer >= %d for %s, got '%s'\n", min, name, str);
        usage(stderr, 1);
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x6060
movl $0x0, (%rax)
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x6340
movq (%r15), %rcx
cmpq %rbx, %rcx
jbe 0x13c64
cmpb $0x0, (%rcx)
jne 0x13c64
movslq %ebp, %rcx
cmpq %rcx, %rax
jl 0x13c7a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xad49(%rip), %rdi      # 0x1e9b4
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xab99
jmp 0x13c90
leaq 0xad56(%rip), %rdi      # 0x1e9d7
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0xab99
movq 0x11359(%rip), %rax     # 0x24ff0
movq (%rax), %rdi
movl $0x1, %esi
callq 0xac41
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/phpspy.c
// Function: redirect_child_stdio
static void redirect_child_stdio(int proc_fd, char *opt_path) {
    char *redir_path;
    FILE *redir_file;
    if (strcmp(opt_path, "-") == 0) {
        return;
    } else if (strstr(opt_path, "%d") != NULL) {
        if (asprintf(&redir_path, opt_path, getpid()) < 0) {
            errno = ENOMEM;
            perror("asprintf");
            exit(1);
        }
    } else {
        if ((redir_path = strdup(opt_path)) == NULL) {
            perror("strdup");
            exit(1);
        }
    }
    if ((redir_file = fopen(redir_path, "w")) == NULL) {
        perror("fopen");
        free(redir_path);
        exit(1);
    }
    dup2(fileno(redir_file), proc_fd);
    fclose(redir_file);
    free(redir_path);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
cmpb $0x2d, (%rsi)
jne 0x13cb9
cmpb $0x0, 0x1(%r14)
je 0x13d35
leaq 0xb727(%rip), %rsi      # 0x1f3e7
movq %r14, %rdi
callq 0x6610
testq %rax, %rax
je 0x13ceb
callq 0x6130
movq %rsp, %rdi
movq %r14, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x6460
testl %eax, %eax
js 0x13d45
movq (%rsp), %rdi
jmp 0x13cff
movq %r14, %rdi
callq 0x65c0
movq %rax, %rdi
movq %rax, (%rsp)
testq %rax, %rax
je 0x13d4a
leaq 0xadf3(%rip), %rsi      # 0x1eaf9
callq 0x6520
testq %rax, %rax
je 0x13d3d
movq %rax, %r14
movq %rax, %rdi
callq 0x6380
movl %eax, %edi
movl %ebx, %esi
callq 0x6180
movq %r14, %rdi
callq 0x6140
movq (%rsp), %rdi
callq 0x6050
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rsp, %rdi
callq 0x66d4
callq 0x66b4
callq 0x66f4
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/phpspy.c
// Function: copy_proc_mem
static int copy_proc_mem(pid_t pid, const char *what, void *raddr, void *laddr, size_t size) {
    struct iovec local[1];
    struct iovec remote[1];

    if (raddr == NULL) {
        log_error("copy_proc_mem: Not copying %s; raddr is NULL\n", what);
        return PHPSPY_ERR;
    }

    local[0].iov_base = laddr;
    local[0].iov_len = size;
    remote[0].iov_base = raddr;
    remote[0].iov_len = size;

    if (process_vm_readv(pid, local, 1, remote, 1, 0) == -1) {
        if (errno == ESRCH) { /* No such process */
            perror("process_vm_readv");
            return PHPSPY_ERR | PHPSPY_ERR_PID_DEAD;
        }
        log_error("copy_proc_mem: Failed to copy %s; err=%s raddr=%p size=%lu\n", what, strerror(errno), raddr, size);
        return PHPSPY_ERR;
    }

    return PHPSPY_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
testq %rdx, %rdx
je 0x141a5
movq %r8, %r14
movq %rdx, %r15
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %r8, 0x8(%rsi)
movq %rsp, %rcx
movq %rdx, (%rcx)
movq %r8, 0x8(%rcx)
xorl %r12d, %r12d
movl $0x1, %edx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x6300
cmpq $-0x1, %rax
jne 0x141bc
callq 0x6060
movl (%rax), %edi
cmpl $0x3, %edi
je 0x141cb
callq 0x65d0
leaq 0xac5b(%rip), %rdi      # 0x1edeb
movq %rbx, %rsi
movq %rax, %rdx
movq %r15, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0xab99
jmp 0x141b6
leaq 0xac00(%rip), %rdi      # 0x1edac
movq %rbx, %rsi
xorl %eax, %eax
callq 0xab99
movl $0x1, %r12d
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xac08(%rip), %rdi      # 0x1edda
callq 0x6530
movl $0x3, %r12d
jmp 0x141bc
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/./phpspy_trace.c
// Function: trace_memory_info_70
static int trace_memory_info(trace_context_t *context) {
    #ifdef USE_ZEND
    (void)context;
    return PHPSPY_ERR; /* zend_alloc_globals is not public */
    #else
    int rv;
    zend_mm_heap mm_heap;
    zend_alloc_globals alloc_globals;
    trace_target_t *target;

    memset(&mm_heap, 0, sizeof(mm_heap));
    alloc_globals.mm_heap = NULL;
    target = &context->target;

    try_copy_proc_mem("alloc_globals", (void*)target->alloc_globals_addr, &alloc_globals, sizeof(alloc_globals));
    try_copy_proc_mem("mm_heap", alloc_globals.mm_heap, &mm_heap, sizeof(mm_heap));
    context->event.mem.size = mm_heap.size;
    context->event.mem.peak = mm_heap.peak;

    try(rv, context->event_handler(context, PHPSPY_TRACE_EVENT_MEM));

    return PHPSPY_OK;

    #endif
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x8(%rsp), %rcx
movq $0x0, (%rcx)
movl (%rdi), %edi
movq 0x18(%rbx), %rdx
leaq 0xa921(%rip), %rsi      # 0x1eb2e
movl $0x8, %r8d
callq 0x1412d
testl %eax, %eax
jne 0x14258
movl (%rbx), %edi
movq 0x8(%rsp), %rdx
leaq 0xaca9(%rip), %rsi      # 0x1eed3
leaq 0x10(%rsp), %rcx
movl $0x20, %r8d
callq 0x1412d
testl %eax, %eax
jne 0x14258
movaps 0x20(%rsp), %xmm0
movups %xmm0, 0x758(%rbx)
movq %rbx, %rdi
movl $0x6, %esi
callq *0x798(%rbx)
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/./phpspy_trace.c
// Function: trace_globals_70
static int trace_globals(trace_context_t *context) {
    int rv;
    glopeek_entry_t *gentry, *gentry_tmp;
    zend_array *garray;
    zend_array *symtable;
    Bucket lbucket;

    /* Find the remote address of executor_globals.symbol_table */
    symtable = (zend_array *)(context->target.executor_globals_addr + offsetof(zend_executor_globals, symbol_table));

    HASH_ITER(hh, glopeek_map, gentry, gentry_tmp) {

        /* Point garray at the zend_array where this global variable resides */
        if (gentry->gloname[0]) {
            try(rv, copy_zarray_bucket(context, symtable, gentry->gloname, &lbucket));
            garray = lbucket.val.value.arr;
        } else {
            garray = symtable;
        }

        /* Print the element within the array */

        rv = sprint_zarray_val(context, garray, gentry->varname, context->buf, sizeof(context->buf), &context->buf_len);

        if (rv == PHPSPY_OK) {
            context->event.glopeek.gentry = gentry;
            context->event.glopeek.zval_str = context->buf;
            try(rv, context->event_handler(context, PHPSPY_TRACE_EVENT_GLOPEEK));
        }
    }

    return PHPSPY_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x11eb5(%rip), %r13     # 0x26128
xorl %eax, %eax
testq %r13, %r13
je 0x14337
movq %rdi, %r14
movl $0x130, %r15d           # imm = 0x130
addq 0x8(%rdi), %r15
leaq 0x7a8(%rdi), %r12
leaq 0x8a8(%rdi), %rax
movq %rax, (%rsp)
leaq 0x28(%rsp), %rbp
movq %r13, %rbx
movq 0x310(%r13), %r13
cmpb $0x0, 0x100(%rbx)
je 0x142d7
leaq 0x100(%rbx), %rdx
movq %r14, %rdi
movq %r15, %rsi
leaq 0x8(%rsp), %rcx
callq 0x145d4
testl %eax, %eax
jne 0x14337
movq 0x8(%rsp), %rsi
jmp 0x142da
movq %r15, %rsi
leaq 0x200(%rbx), %rdx
movq %r14, %rdi
movq %rbp, %rcx
callq 0x145d4
testl %eax, %eax
jne 0x1432c
movl $0x100, %ecx            # imm = 0x100
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq (%rsp), %r8
callq 0x143d2
testl %eax, %eax
jne 0x1432c
movq %rbx, 0x780(%r14)
movq %r12, 0x788(%r14)
movq %r14, %rdi
movl $0x4, %esi
callq *0x798(%r14)
testl %eax, %eax
jne 0x14337
testq %r13, %r13
jne 0x142a2
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/./phpspy_trace.c
// Function: sprint_zstring_70
static int sprint_zstring(trace_context_t *context, const char *what, zend_string *rzstring, char *buf, size_t buf_size, size_t *buf_len) {
    int rv;
    zend_string lzstring;

    *buf = '\0';
    *buf_len = 0;
    try_copy_proc_mem(what, rzstring, &lzstring, sizeof(lzstring));
    *buf_len = PHPSPY_MIN(lzstring.len, PHPSPY_MAX(1, buf_size)-1);
    try_copy_proc_mem(what, ((char*)rzstring) + offsetof(zend_string, val), buf, *buf_len);
    *(buf + (int)*buf_len) = '\0';

    return PHPSPY_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movb $0x0, (%rcx)
movq $0x0, (%r9)
movl (%rdi), %edi
leaq 0xf(%rsp), %rcx
movl $0x19, %r8d
callq 0x1412d
testl %eax, %eax
jne 0x143c3
cmpq $0x1, %r15
adcq $-0x1, %r15
movq 0x1f(%rsp), %rax
cmpq %r15, %rax
cmovbq %rax, %r15
movq %r15, (%rbx)
movl (%rbp), %edi
addq $0x18, %r12
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %r15, %r8
callq 0x1412d
testl %eax, %eax
jne 0x143c3
movslq (%rbx), %rax
movb $0x0, (%r14,%rax)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/./phpspy_trace.c
// Function: copy_zarray_bucket_70
static int copy_zarray_bucket(trace_context_t *context, zend_array *rzarray, const char *key, Bucket *lbucket) {
    int rv;
    zend_array lzarray;
    uint32_t hash_table_size;
    uint64_t hash_val;
    uint32_t hash_index;
    uint32_t hash_table_val;
    uint32_t *hash_bucket;
    char tmp_key[PHPSPY_STR_SIZE];
    size_t tmp_len;

    try_copy_proc_mem("array", rzarray, &lzarray, sizeof(lzarray));

    hash_val = phpspy_zend_inline_hash_func(key, strlen(key));
    hash_table_size = (uint32_t)(-1 * (int32_t)lzarray.nTableMask);
    hash_index = hash_val % hash_table_size;

    try_copy_proc_mem("hash_table_val", ((uint32_t*)lzarray.arData) - hash_table_size + hash_index, &hash_table_val, sizeof(uint32_t));

    hash_bucket = &hash_table_val;

    do {
        if (*hash_bucket == (uint32_t)-1) return PHPSPY_ERR;

        /* Copy the next bucket from array data */
        try_copy_proc_mem("bucket", lzarray.arData + *hash_bucket, lbucket, sizeof(Bucket));

        if (lbucket->key == NULL) {
            break;
        }

        /* On hash collision, advance to the next bucket */
        try(rv, sprint_zstring(context, "array_key", lbucket->key, tmp_key, sizeof(tmp_key), &tmp_len));

        if (strcmp(key, tmp_key) == 0) {
            hash_bucket = NULL;
        } else {
            hash_bucket = &lbucket->val.u2.next;
        }
    } while (hash_bucket);

    return PHPSPY_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %rdx
movq %rdi, %r15
movl (%rdi), %edi
leaq 0xa888(%rip), %rsi      # 0x1ee82
leaq 0x1c(%rsp), %rcx
movl $0x24, %r8d
callq 0x1412d
testl %eax, %eax
jne 0x1465d
movq %r14, %rdi
callq 0x6160
movq %r14, %rdi
movq %rax, %rsi
callq 0x130c5
xorl %ecx, %ecx
subl 0x28(%rsp), %ecx
xorl %edx, %edx
divq %rcx
movl (%r15), %edi
movq 0x2c(%rsp), %rax
shlq $0x2, %rcx
subq %rcx, %rax
leaq (%rax,%rdx,4), %rdx
leaq 0xa895(%rip), %rsi      # 0x1eedb
leaq 0xc(%rsp), %r12
movl $0x4, %r8d
movq %r12, %rcx
callq 0x1412d
testl %eax, %eax
je 0x14675
movl %eax, %r13d
movl %r13d, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc(%rbx), %rbp
movl (%r12), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rdx
je 0x146f9
movl (%r15), %edi
shlq $0x5, %rdx
addq 0x2c(%rsp), %rdx
movl $0x20, %r8d
leaq 0xa84a(%rip), %rsi      # 0x1eeea
movq %rbx, %rcx
callq 0x1412d
testl %eax, %eax
jne 0x1465d
movq 0x18(%rbx), %rdx
xorl %r13d, %r13d
testq %rdx, %rdx
je 0x14660
movl $0x100, %r8d            # imm = 0x100
movq %r15, %rdi
leaq 0xa7c8(%rip), %rsi      # 0x1ee90
leaq 0x40(%rsp), %r12
movq %r12, %rcx
leaq 0x10(%rsp), %r9
callq 0x14346
testl %eax, %eax
jne 0x1465d
movq %r14, %rdi
movq %r12, %rsi
callq 0x6310
movq %rbp, %r12
testl %eax, %eax
jne 0x14679
jmp 0x14660
movl $0x1, %r13d
jmp 0x14660
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/pgrep.c
// Function: run_signal_thread
static void *run_signal_thread(void *arg) {
    int rv, ignore;
    fd_set rfds;
    struct timeval tv;
    struct sigaction sa;

    (void)arg;

    /* Create done_pipe */
    rv = pipe(done_pipe);
    rv = fcntl(done_pipe[1], F_SETFL, O_NONBLOCK);

    /* Install signal handler */
    memset(&sa, 0, sizeof(struct sigaction));
    sa.sa_handler = handle_signal;
    sigaction(SIGINT, &sa, NULL);
    sigaction(SIGTERM, &sa, NULL);
    sigaction(SIGHUP, &sa, NULL);
    sigaction(SIGALRM, &sa, NULL);
    sa.sa_handler = SIG_IGN;
    sigaction(SIGPIPE, &sa, NULL);

    /* Wait for write on done_pipe from write_done_pipe */
    do {
        FD_ZERO(&rfds);
        FD_SET(done_pipe[0], &rfds);
        tv.tv_sec = 1;
        tv.tv_usec = 0;
        rv = select(done_pipe[0]+1, &rfds, NULL, NULL, &tv);
    } while (rv < 1);

    /* Read pipe for fun */
    rv = read(done_pipe[0], &ignore, sizeof(int));

    /* Set done flag; wake up all threads */
    done = 1;
    pthread_mutex_lock(&mutex);
    pthread_cond_broadcast(&can_consume);
    pthread_cond_broadcast(&can_produce);
    pthread_mutex_unlock(&mutex);

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x140, %rsp            # imm = 0x140
leaq 0xe121(%rip), %rdi      # 0x25a50
callq 0x6270
movl 0xe11a(%rip), %edi      # 0x25a54
movl $0x4, %esi
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x6100
leaq 0xb0(%rsp), %rbx
movl $0x90, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6230
leaq 0x2c0(%rip), %rax       # 0x17c29
movq %rax, -0x8(%rbx)
leaq 0xa8(%rsp), %rbx
movl $0x2, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x60d0
movl $0xf, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x60d0
movl $0x1, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x60d0
movl $0xe, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x60d0
movq $0x1, (%rbx)
movl $0xd, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x60d0
movl $0x1, %r15d
leaq 0x20(%rsp), %rbx
leaq 0x10(%rsp), %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movl 0xe042(%rip), %edi      # 0x25a50
leal 0x3f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %edi, %ecx
subl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
sarl $0x6, %eax
cltq
orq %rdx, 0x20(%rsp,%rax,8)
movq %r15, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
incl %edi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x6390
testl %eax, %eax
jle 0x179d7
movl 0xdff6(%rip), %edi      # 0x25a50
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
callq 0x62b0
leaq 0xe6a4(%rip), %rax      # 0x26114
movl $0x1, (%rax)
leaq 0xe783(%rip), %rbx      # 0x26200
movq %rbx, %rdi
callq 0x6620
leaq 0xe714(%rip), %rdi      # 0x261a0
callq 0x60a0
leaq 0xe738(%rip), %rdi      # 0x261d0
callq 0x60a0
movq %rbx, %rdi
callq 0x63d0
xorl %eax, %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/pgrep.c
// Function: run_work_thread
static void *run_work_thread(void *arg) {
    int worker_num;
    worker_num = (long)arg;
    while (!done) {
        if (wait_for_turn('c')) break;
        attached_pids[worker_num] = avail_pids[--avail_pids_count];
        pthread_cond_signal(&can_produce);
        pthread_mutex_unlock(&mutex);
        main_pid(attached_pids[worker_num]);
        attached_pids[worker_num] = 0;
    }
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0xe651(%rip), %r15      # 0x26114
cmpl $0x0, (%r15)
jne 0x17b44
movslq %edi, %r12
leaq 0xe6fd(%rip), %rbx      # 0x261d0
leaq 0xe726(%rip), %r14      # 0x26200
movl $0x63, %edi
callq 0x17b77
testl %eax, %eax
jne 0x17b44
movq 0xe6a9(%rip), %rax      # 0x26198
movslq 0xe69a(%rip), %rcx      # 0x26190
leaq -0x1(%rcx), %rdx
movl %edx, 0xe690(%rip)      # 0x26190
movl -0x4(%rax,%rcx,4), %eax
movq 0xe71d(%rip), %rcx      # 0x26228
movl %eax, (%rcx,%r12,4)
movq %rbx, %rdi
callq 0x62d0
movq %r14, %rdi
callq 0x63d0
movq 0xe702(%rip), %rax      # 0x26228
movl (%rax,%r12,4), %edi
callq 0xa264
movq 0xe6f2(%rip), %rax      # 0x26228
movl $0x0, (%rax,%r12,4)
cmpl $0x0, (%r15)
je 0x17ada
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/pgrep.c
// Function: wait_for_turn
static int wait_for_turn(char producer_or_consumer) {
    struct timespec timeout;
    pthread_mutex_lock(&mutex);
    while (!done) {
        if (producer_or_consumer == 'p' && avail_pids_count < opt_num_workers) {
            break;
        } else if (avail_pids_count > 0) {
            break;
        }
        clock_gettime(CLOCK_REALTIME, &timeout);
        timeout.tv_sec += 2;
        pthread_cond_timedwait(
            producer_or_consumer == 'p' ? &can_produce : &can_consume,
            &mutex,
            &timeout
        );
    }
    if (done) {
        pthread_mutex_unlock(&mutex);
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
leaq 0xe672(%rip), %rdi      # 0x26200
callq 0x6620
leaq 0xe57a(%rip), %r13      # 0x26114
cmpl $0x0, (%r13)
jne 0x17c05
leaq 0x8(%rsp), %r14
leaq 0xe653(%rip), %r15      # 0x26200
leaq 0xe5ec(%rip), %rbp      # 0x261a0
movl 0xe5d6(%rip), %ecx      # 0x26190
cmpb $0x70, %bl
jne 0x17bd9
xorl %eax, %eax
testl %ecx, %ecx
jg 0x17c16
leaq 0xe604(%rip), %r12      # 0x261d0
leaq 0xd761(%rip), %rdx      # 0x25334
cmpl (%rdx), %ecx
jge 0x17be0
jmp 0x17c16
movq %rbp, %r12
testl %ecx, %ecx
jg 0x17c25
xorl %edi, %edi
movq %r14, %rsi
callq 0x6110
addq $0x2, 0x8(%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x64a0
cmpl $0x0, (%r13)
je 0x17bb4
leaq 0xe5f4(%rip), %rdi      # 0x26200
callq 0x63d0
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x17c16
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/top.c
// Function: func_list_compare
static int func_list_compare(const void *a, const void *b) {
    func_entry_t *fa, *fb;
    fa = *((func_entry_t**)a);
    fb = *((func_entry_t**)b);
    if (fb->count_excl == fa->count_excl) {
        if (fb->count_incl == fa->count_incl) {
            if (fb->total_count_excl == fa->total_count_excl) {
                if (fb->total_count_incl == fa->total_count_incl) {
                    return 0;
                }
                return fb->total_count_incl > fa->total_count_incl ? 1 : -1;
            }
            return fb->total_count_excl > fa->total_count_excl ? 1 : -1;
        }
        return fb->count_incl > fa->count_incl ? 1 : -1;
    }
    return fb->count_excl > fa->count_excl ? 1 : -1;
}

// Assembly:
movq (%rdi), %rax
movq (%rsi), %rcx
movq 0x100(%rcx), %rdx
movq 0x100(%rax), %rsi
cmpq %rsi, %rdx
jne 0x18e25
movq 0x108(%rcx), %rdx
movq 0x108(%rax), %rsi
cmpq %rsi, %rdx
jne 0x18e25
movq 0x110(%rcx), %rdx
movq 0x110(%rax), %rsi
cmpq %rsi, %rdx
jne 0x18e25
movq 0x118(%rcx), %rcx
movq 0x118(%rax), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x18e30
xorl %eax, %eax
cmpq %rcx, %rdx
jmp 0x18e2a
xorl %eax, %eax
cmpq %rdx, %rsi
adcl $-0x1, %eax
orl $0x1, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/adsr[P]phpspy/addr_objdump.c
// Function: shell_escape
int shell_escape(const char *arg, char *buf, size_t buf_size, const char *what) {
    int rv = 0;
    char *const buf_end = buf + buf_size;
    assert(buf_size >= 1);
    *buf++ = '\'';

    while (*arg) {
        /* logic based on https://stackoverflow.com/a/3669819 */
        if (*arg == '\'') {
            if (buf_end - buf < 4) {
                rv = 1;
                goto shell_escape_end;
            }

            *buf++ = '\''; /* close quoting */
            *buf++ = '\\'; /* escape ... */
            *buf++ = '\''; /* ... a single quote */
            *buf++ = '\''; /* reopen quoting */
            arg++;
        } else {
            if (buf_end - buf < 1) {
                rv = 1;
                goto shell_escape_end;
            }

            *buf++ = *arg++;
        }
    }

    if (buf_end - buf < 2) {
        rv = 1;
        goto shell_escape_end;
    }

    *buf++ = '\'';
    *buf = '\0';

shell_escape_end:
    if (rv != 0) {
        log_error("shell_escape: Buffer too small to escape %s: %s\n", what, arg);
    }

    return rv;
}

// Assembly:
pushq %rax
testq %rdx, %rdx
je 0x18ea4
movq %rdi, %rax
addq %rsi, %rdx
movb $0x27, (%rsi)
incq %rsi
movzbl (%rax), %edi
movq %rdx, %r8
subq %rsi, %r8
cmpl $0x27, %edi
je 0x18e65
testl %edi, %edi
je 0x18e7a
testq %r8, %r8
jle 0x18e80
movb %dil, (%rsi)
incq %rsi
jmp 0x18e75
cmpq $0x4, %r8
jl 0x18e80
movl $0x27275c27, (%rsi)     # imm = 0x27275C27
addq $0x4, %rsi
incq %rax
jmp 0x18e46
cmpq $0x2, %r8
jge 0x18e9b
leaq 0x623e(%rip), %rdi      # 0x1f0c5
movq %rcx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xab99
movl $0x1, %eax
popq %rcx
retq
movw $0x27, (%rsi)
xorl %eax, %eax
jmp 0x18e99
leaq 0x61c0(%rip), %rdi      # 0x1f06b
leaq 0x61c7(%rip), %rsi      # 0x1f079
leaq 0x61cf(%rip), %rcx      # 0x1f088
movl $0xc, %edx
callq 0x6220