LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/termbox[P]termbox/termbox.c
// Function: read_up_to
static int read_up_to(int n) {
    assert(n > 0);
    const int prevlen = input_buffer.len;
    bytebuffer_resize(&input_buffer, prevlen + n);

    int read_n = 0;
    while (read_n <= n) {
        ssize_t r = 0;
        if (read_n < n) {
            r = read(inout, input_buffer.buf + prevlen + read_n, n - read_n);
        }
#ifdef __CYGWIN__
        // While linux man for tty says when VMIN == 0 && VTIME == 0, read
        // should return 0 when there is nothing to read, cygwin's read returns
        // -1. Not sure why and if it's correct to ignore it, but let's pretend
        // it's zero.
        if (r < 0)
            r = 0;
#endif
        if (r < 0) {
            // EAGAIN / EWOULDBLOCK shouldn't occur here
            assert(errno != EAGAIN && errno != EWOULDBLOCK);
            return -1;
        } else if (r > 0) {
            read_n += r;
        } else {
            bytebuffer_resize(&input_buffer, prevlen + read_n);
            return read_n;
        }
    }
    assert(!"unreachable");
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq 0x44dc(%rip), %r14      # 0x98e0
leal 0x40(%r14), %edi
callq 0x54b8
xorl %r15d, %r15d
cmpl $0x40, %r15d
jg 0x547a
jne 0x541c
xorl %eax, %eax
jmp 0x543f
movl 0x446e(%rip), %edi      # 0x9890
movq 0x44af(%rip), %rax      # 0x98d8
addq %r14, %rax
movslq %r15d, %rsi
addq %rax, %rsi
movl $0x40, %edx
subl %r15d, %edx
callq 0x3140
testq %rax, %rax
js 0x544d
je 0x5460
addl %eax, %r15d
movb $0x1, %al
jmp 0x546e
callq 0x3060
cmpl $0xb, (%rax)
je 0x5499
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %eax, %eax
jmp 0x546e
leal (%r15,%r14), %edi
callq 0x54b8
xorl %eax, %eax
movl %r15d, %ebx
testb %al, %al
jne 0x5410
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0xfd4(%rip), %rdi       # 0x6455
leaq 0xeee(%rip), %rsi       # 0x6376
leaq 0xf8a(%rip), %rcx       # 0x6419
movl $0x4c2, %edx            # imm = 0x4C2
callq 0x30e0
leaq 0xf8d(%rip), %rdi       # 0x642d
leaq 0xecf(%rip), %rsi       # 0x6376
leaq 0xf6b(%rip), %rcx       # 0x6419
movl $0x4b9, %edx            # imm = 0x4B9
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O1/termbox[P]termbox/utf8.c
// Function: tb_utf8_char_to_unicode
int tb_utf8_char_to_unicode(uint32_t *out, const char *c) {
    if (*c == 0)
        return TB_EOF;

    int i;
    unsigned char len = tb_utf8_char_length(*c);
    unsigned char mask = utf8_mask[len - 1];
    uint32_t result = c[0] & mask;
    for (i = 1; i < len; ++i) {
        result <<= 6;
        result |= c[i] & 0x3f;
    }

    *out = result;
    return (int)len;
}

// Assembly:
movzbl (%rsi), %edx
testq %rdx, %rdx
je 0x556b
leaq 0xf51(%rip), %rax       # 0x6470
movzbl (%rdx,%rax), %eax
leaq 0x1046(%rip), %rcx      # 0x6570
movb -0x1(%rax,%rcx), %cl
andb %dl, %cl
movzbl %cl, %ecx
addq $-0xc0, %rdx
cmpq $0x3d, %rdx
ja 0x5568
cmpl $0x3, %eax
movl $0x2, %edx
cmovael %eax, %edx
movl $0x1, %r8d
shll $0x6, %ecx
movzbl (%rsi,%r8), %r9d
andl $0x3f, %r9d
orl %r9d, %ecx
incq %r8
cmpq %r8, %rdx
jne 0x5551
movl %ecx, (%rdi)
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/termbox[P]termbox/utf8.c
// Function: tb_utf8_unicode_to_char
int tb_utf8_unicode_to_char(char *out, uint32_t c) {
    int len = 0;
    int first;
    int i;

    if (c < 0x80) {
        first = 0;
        len = 1;
    } else if (c < 0x800) {
        first = 0xc0;
        len = 2;
    } else if (c < 0x10000) {
        first = 0xe0;
        len = 3;
    } else if (c < 0x200000) {
        first = 0xf0;
        len = 4;
    } else if (c < 0x4000000) {
        first = 0xf8;
        len = 5;
    } else {
        first = 0xfc;
        len = 6;
    }

    for (i = len - 1; i > 0; --i) {
        out[i] = (c & 0x3f) | 0x80;
        c >>= 6;
    }
    out[0] = c | first;

    return len;
}

// Assembly:
cmpl $0x80, %esi
jae 0x5582
xorl %ecx, %ecx
movl $0x1, %eax
jmp 0x55d8
cmpl $0x800, %esi            # imm = 0x800
jae 0x5596
movl $0xc0, %ecx
movl $0x2, %eax
jmp 0x55d8
cmpl $0x10000, %esi          # imm = 0x10000
jae 0x55aa
movl $0xe0, %ecx
movl $0x3, %eax
jmp 0x55d8
cmpl $0x200000, %esi         # imm = 0x200000
jae 0x55be
movl $0xf0, %ecx
movl $0x4, %eax
jmp 0x55d8
xorl %ecx, %ecx
cmpl $0x4000000, %esi        # imm = 0x4000000
setae %cl
movl $0x6, %eax
sbbl $0x0, %eax
leal 0xf8(,%rcx,4), %ecx
cmpl $0x2, %eax
jb 0x55fe
movl %eax, %edx
incq %rdx
movl %esi, %r8d
andb $0x3f, %r8b
orb $-0x80, %r8b
movb %r8b, -0x2(%rdi,%rdx)
shrl $0x6, %esi
decq %rdx
cmpq $0x2, %rdx
jg 0x55e2
orl %ecx, %esi
movb %sil, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/unix1.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	int fd[2];
	char c;
	int ret;

	socketpair(AF_UNIX, SOCK_STREAM, 0, fd);

	while (1) {
		do {
			ret = write(fd[WRITE], &c, 1);
		} while (ret != 1 && errno == EINTR);

		do {
			ret = read(fd[READ], &c, 1);
		} while (ret != 1 && errno == EINTR);

		(*iterations)++;
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rcx
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2170
leaq 0xf(%rsp), %r14
movl 0x14(%rsp), %edi
movl $0x1, %edx
movq %r14, %rsi
callq 0x20d0
cmpl $0x1, %eax
je 0x2c21
callq 0x2070
cmpl $0x4, (%rax)
je 0x2c01
movl 0x10(%rsp), %edi
movl $0x1, %edx
movq %r14, %rsi
callq 0x2140
cmpl $0x1, %eax
je 0x2c41
callq 0x2070
cmpl $0x4, (%rax)
je 0x2c21
incq (%rbx)
jmp 0x2c01
// File: /workspace/github_c_makefile_star2_O1/wtakuo[P]SVM/fun.c
// Function: new_function
Function new_function (size_t nargs, size_t nlv, Bcode code[], size_t codelen) {
    Function f = malloc(sizeof(struct _Function));
    if (f == NULL) {
        perror("new_function");
        exit(EXIT_FAILURE);
    }
    f->nargs = nargs;
    f->nlv = nlv;
    f->code = code;
    f->codelen = codelen;

    return f;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x20, %edi
callq 0x1060
testq %rax, %rax
je 0x15ba
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x10cf
// File: /workspace/github_c_makefile_star2_O1/wtakuo[P]SVM/vmbench.c
// Function: vmtest
void vmtest (int x, int y, int z, vm_mode_t mode) {
    int codelen = sizeof(code)/sizeof(Bcode);
    Function f = new_function(3, 0, code + 16, codelen - 16);
    gv[0] = (Value)f;
    gv[1] = (Value)x;
    gv[2] = (Value)y;
    gv[3] = (Value)z;

    vm(code, codelen, vs_base, VS_SIZE, gv, GV_SIZE, mode);

    delete_function(f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
leaq 0x2a8f(%rip), %rdx      # 0x4070
movl $0x3, %edi
movl $0x3b, %ecx
xorl %esi, %esi
callq 0x157c
movq %rax, %r12
leaq 0x2a64(%rip), %rdi      # 0x4060
movq %rax, 0x2abd(%rip)      # 0x40c0
leaq 0x2ab6(%rip), %r8       # 0x40c0
movslq %r15d, %rax
movq %rax, 0x2ab4(%rip)      # 0x40c8
movslq %r14d, %rax
movq %rax, 0x2ab2(%rip)      # 0x40d0
movslq %ebp, %rax
movq %rax, 0x2ab0(%rip)      # 0x40d8
movl %ebx, (%rsp)
leaq 0x4ace(%rip), %rdx      # 0x6100
movl $0x4b, %esi
movl $0x400, %ecx            # imm = 0x400
movl $0x8, %r9d
callq 0x120c
movq %r12, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x15bf
// File: /workspace/github_c_makefile_star2_O1/wtakuo[P]SVM/vmbench.c
// Function: main
int main (int argc, char *argv[]) {
    vm_mode_t mode = vm_normal_mode;
    int x, y, z;
    int i = 1;

    while (i < argc && argv[i][0] == '-') {
        char *arg = argv[i];
        int j = 1;
        while (arg[j] != '\0') {
            switch (arg[j]) {
            case 't':
                mode = vm_trace_mode;
                break;
            case 's':
                mode = vm_step_mode;
                break;
            default:
                fprintf(stderr, "usage: %s [-t][-s] x y z\n", argv[0]);
                return EXIT_FAILURE;
            }
            j++;
        }
        i++;
    }
    if (argc < i + 3) {
        fprintf(stderr, "usage: %s [-t][-s] x y z\n", argv[0]);
        return EXIT_FAILURE;
    }
    x = atoi(argv[i]);
    y = atoi(argv[i+1]);
    z = atoi(argv[i+2]);

    vmtest(x, y, z, mode);

    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %r14d
movl $0x1, %r15d
xorl %ebp, %ebp
xorl %eax, %eax
movslq %r15d, %r12
cmpl %r14d, %r15d
jge 0x16d9
movq (%rbx,%r12,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x16d9
movb 0x1(%rcx), %dl
testb %dl, %dl
sete %r12b
je 0x16bb
addq $0x2, %rcx
movl $0x1, %esi
cmpb $0x74, %dl
je 0x16aa
movzbl %dl, %edx
cmpl $0x73, %edx
jne 0x16ca
movl $0x2, %esi
movb (%rcx), %dl
incq %rcx
movl %esi, %ebp
testb %dl, %dl
sete %r12b
jne 0x1693
jmp 0x16bd
movl %ebp, %esi
incl %r15d
movl %esi, %ebp
testb $0x1, %r12b
jne 0x1673
jmp 0x1716
movq %rbx, %rdi
callq 0x1102
movl $0x1, %eax
jmp 0x16c2
addl $0x3, %r15d
cmpl %r14d, %r15d
jg 0x171f
movq (%rbx,%r12,8), %rdi
callq 0x1080
movl %eax, %r14d
movq 0x8(%rbx,%r12,8), %rdi
callq 0x1080
movl %eax, %r15d
movq 0x10(%rbx,%r12,8), %rdi
callq 0x1080
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
movl %ebp, %ecx
callq 0x15c4
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x10e4
movl $0x1, %eax
jmp 0x1716
// File: /workspace/github_c_makefile_star2_O1/sasairc[P]yasuna/src/libbenly/src/env.c
// Function: split_env
int split_env(char* env, env_t **dest)
{
    if (env == NULL)
        return -1;

    int     x       = 0,
            y       = 0;

    size_t  i       = 0,
            head    = 0,
            tail    = 0;

    env_t*  buf     = NULL;

    if ((buf = (env_t*)
                malloc(sizeof(env_t))) == NULL)
        return -1;

    i = 0;
    buf->envc = 1;
    while (i < strlen(env)) {
        if (*(env + i) == ':')
            buf->envc++;
        i++;
    }
    if ((buf->envs = (char**)
                malloc(sizeof(char*) * buf->envc)) == NULL)
        goto ERR;

    i = x = y = head = tail = 0;
    do {
        if (*(env + tail) == ':' || *(env + tail) == '\0') {
            if ((*(buf->envs + y) = (char*)
                        malloc(sizeof(char) * (tail - head + 1))) == NULL)
                goto ERR;

            while (head < tail) {
                *(*(buf->envs + y) + x) = *(env + head);
                head++;
                x++;
            }
            *(*(buf->envs + y) + x) = '\0';
            x = 0;
            head++;
            y++;
        }
        tail++;
    } while (y < buf->envc);

    *dest = buf;

    return 0;

ERR:
    release_env_t(buf);

    return -2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x1244
movq %rsi, %rbx
movq %rdi, %r14
movl $0x10, %edi
callq 0x1050
testq %rax, %rax
je 0x1244
movq %rax, %r15
movl $0x1, (%rax)
movq %r14, %rdi
callq 0x1040
testq %rax, %rax
je 0x1198
xorl %ecx, %ecx
cmpb $0x3a, (%r14,%rcx)
jne 0x1190
incl (%r15)
incq %rcx
cmpq %rcx, %rax
jne 0x1186
movslq (%r15), %rdi
shlq $0x3, %rdi
callq 0x1050
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x1237
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ebp, %ebp
movzbl (%r14,%rbp), %eax
cmpl $0x3a, %eax
je 0x11c7
testl %eax, %eax
jne 0x1228
movq %rbp, %rdi
subq %r13, %rdi
incq %rdi
callq 0x1050
movq 0x8(%r15), %rcx
movslq %r12d, %r12
movq %rax, (%rcx,%r12,8)
testq %rax, %rax
je 0x1237
cmpq %r13, %rbp
jbe 0x1214
leaq (%r14,%r13), %rcx
xorl %eax, %eax
movb (%rcx,%rax), %dl
movq 0x8(%r15), %rsi
movq (%rsi,%r12,8), %rsi
movb %dl, (%rsi,%rax)
leaq (%rax,%r13), %rdx
incq %rdx
incq %rax
cmpq %rbp, %rdx
jb 0x11f0
movl %eax, %ecx
addq %rax, %r13
jmp 0x1216
xorl %ecx, %ecx
movq 0x8(%r15), %rax
movq (%rax,%r12,8), %rax
movb $0x0, (%rax,%rcx)
incq %r13
incl %r12d
incq %rbp
cmpl (%r15), %r12d
jl 0x11b9
movq %r15, (%rbx)
xorl %ebp, %ebp
jmp 0x1244
movq %r15, %rdi
callq 0x1060
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sasairc[P]yasuna/src/libbenly/src/env.c
// Function: release_env_t
void release_env_t(env_t* env)
{
    if (env == NULL)
        return;

    int i   = 0,
        j   = 0;

    j = env->envc - 1;
    while (i <= j) {
        if (*(env->envs + i) != NULL) {
            free(*(env->envs + i));
            *(env->envs + i) = NULL;
        }
        if (*(env->envs + j) != NULL) {
            free(*(env->envs + j));
            *(env->envs + j) = NULL;
        }
        i++;
        j--;
    }
    if (env->envs != NULL) {
        free(env->envs);
        env->envs = NULL;
    }
    if (env != NULL) {
        free(env);
        env = NULL;
    }

    return;
}

// Assembly:
testq %rdi, %rdi
je 0x12e2
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq (%rdi), %r14
testq %r14, %r14
jle 0x12bf
decq %r14
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x1292
callq 0x1030
movq 0x8(%rbx), %rax
movq $0x0, (%rax,%r15,8)
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x12b0
callq 0x1030
movq 0x8(%rbx), %rax
movq $0x0, (%rax,%r14,8)
incq %r15
leaq -0x1(%r14), %rax
cmpq %r14, %r15
movq %rax, %r14
jl 0x1274
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x12d5
callq 0x1030
movq $0x0, 0x8(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/./../dynasm/dasm_x86.h
// Function: dasm_init
void dasm_init(Dst_DECL, int maxsection)
{
  dasm_State *D;
  size_t psz = 0;
  int i;
  Dst_REF = NULL;
  DASM_M_GROW(Dst, struct dasm_State, Dst_REF, psz, DASM_PSZ(maxsection));
  D = Dst_REF;
  D->psize = psz;
  D->lglabels = NULL;
  D->lgsize = 0;
  D->pclabels = NULL;
  D->pcsize = 0;
  D->globals = NULL;
  D->maxsection = maxsection;
  for (i = 0; i < maxsection; i++) {
    D->sections[i].buf = NULL;  /* Need this for pass3. */
    D->sections[i].rbuf = D->sections[i].buf - DASM_SEC2POS(i);
    D->sections[i].bsize = 0;
    D->sections[i].epos = 0;  /* Wrong, but is recalculated after resize. */
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq $0x0, (%rdi)
leal -0x1(%rbx), %eax
cltq
leaq (%rax,%rax,4), %rax
shlq $0x3, %rax
addq $0x78, %rax
je 0x57ea
movl $0x10, %ecx
movq %rcx, %r15
addq %rcx, %rcx
cmpq %rax, %r15
jb 0x57c5
movq %r15, %rdi
callq 0x5140
movq %rax, (%r14)
testq %rax, %rax
jne 0x57ed
movl $0x1, %edi
callq 0x51a0
xorl %r15d, %r15d
movq (%r14), %rax
movq %r15, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq $0x0, 0x30(%rax)
movl %ebx, 0x48(%rax)
testl %ebx, %ebx
jle 0x5841
addq $0x50, %rax
movl %ebx, %ecx
shlq $0x18, %rcx
xorl %edx, %edx
movups %xmm0, 0x8(%rax)
movslq %edx, %rsi
negq %rsi
shlq $0x2, %rsi
movq %rsi, (%rax)
movl $0x0, 0x1c(%rax)
addq $0x1000000, %rdx        # imm = 0x1000000
addq $0x28, %rax
cmpq %rdx, %rcx
jne 0x5819
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/./../dynasm/dasm_x86.h
// Function: dasm_free
void dasm_free(Dst_DECL)
{
  dasm_State *D = Dst_REF;
  int i;
  for (i = 0; i < D->maxsection; i++)
    if (D->sections[i].buf)
      DASM_M_FREE(Dst, D->sections[i].buf, D->sections[i].bsize);
  if (D->pclabels) DASM_M_FREE(Dst, D->pclabels, D->pcsize);
  if (D->lglabels) DASM_M_FREE(Dst, D->lglabels, D->lgsize);
  DASM_M_FREE(Dst, D, D->psize);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rbx
cmpl $0x0, 0x48(%rbx)
jle 0x5879
leaq 0x58(%rbx), %r14
xorl %r15d, %r15d
movq (%r14), %rdi
testq %rdi, %rdi
je 0x5869
callq 0x5030
incq %r15
movslq 0x48(%rbx), %rax
addq $0x28, %r14
cmpq %rax, %r15
jl 0x585c
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x5887
callq 0x5030
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x5895
callq 0x5030
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x5030
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/./../dynasm/dasm_x86.h
// Function: dasm_growpc
void dasm_growpc(Dst_DECL, unsigned int maxpc)
{
  dasm_State *D = Dst_REF;
  size_t osz = D->pcsize;
  DASM_M_GROW(Dst, int, D->pclabels, D->pcsize, maxpc*sizeof(int));
  memset((void *)(((unsigned char *)D->pclabels)+osz), 0, D->pcsize-osz);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %r15
movq 0x28(%r15), %r14
movl %esi, %eax
shlq $0x2, %rax
cmpq %rax, %r14
jae 0x594c
cmpq $0x11, %r14
movl $0x10, %ecx
cmovaeq %r14, %rcx
movq %rcx, %rbx
addq %rcx, %rcx
cmpq %rax, %rbx
jb 0x5928
movq 0x20(%r15), %rdi
movq %rbx, %rsi
callq 0x5160
movq %rax, 0x20(%r15)
testq %rax, %rax
je 0x5966
movq %rbx, 0x28(%r15)
movq 0x20(%r15), %rdi
addq %r14, %rdi
movq 0x28(%r15), %rdx
subq %r14, %rdx
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x50c0
movl $0x1, %edi
callq 0x51a0
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/./../dynasm/dasm_x86.h
// Function: dasm_setup
void dasm_setup(Dst_DECL, const void *actionlist)
{
  dasm_State *D = Dst_REF;
  int i;
  D->actionlist = (dasm_ActList)actionlist;
  D->status = DASM_S_OK;
  D->section = &D->sections[0];
  memset((void *)D->lglabels, 0, D->lgsize);
  if (D->pclabels) memset((void *)D->pclabels, 0, D->pcsize);
  for (i = 0; i < D->maxsection; i++) {
    D->sections[i].pos = DASM_SEC2POS(i);
    D->sections[i].ofs = 0;
  }
}

// Assembly:
pushq %rbx
movq (%rdi), %rbx
movq %rsi, 0x8(%rbx)
movl $0x0, 0x4c(%rbx)
leaq 0x50(%rbx), %rax
movq %rax, 0x38(%rbx)
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rdx
xorl %esi, %esi
callq 0x50c0
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x59aa
movq 0x28(%rbx), %rdx
xorl %esi, %esi
callq 0x50c0
movslq 0x48(%rbx), %rax
testq %rax, %rax
jle 0x59d6
addq $0x70, %rbx
shlq $0x18, %rax
xorl %ecx, %ecx
movl %ecx, -0x8(%rbx)
movl $0x0, (%rbx)
addq $0x1000000, %rcx        # imm = 0x1000000
addq $0x28, %rbx
cmpq %rcx, %rax
jne 0x59bd
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/./../dynasm/dasm_x86.h
// Function: dasm_getpclabel
int dasm_getpclabel(Dst_DECL, unsigned int pc)
{
  dasm_State *D = Dst_REF;
  if (pc*sizeof(int) < D->pcsize) {
    int pos = D->pclabels[pc];
    if (pos < 0) return *DASM_POS2PTR(D, -pos);
    if (pos > 0) return -1;  /* Undefined. */
  }
  return -2;  /* Unused or out of range. */
}

// Assembly:
movq (%rdi), %rax
movl %esi, %ecx
leaq (,%rcx,4), %rdx
cmpq 0x28(%rax), %rdx
jae 0x66cf
movq 0x20(%rax), %rdx
movl (%rdx,%rcx,4), %ecx
testl %ecx, %ecx
js 0x66b6
sete %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x66cb
negl %ecx
movl %ecx, %edx
shrl $0x18, %edx
leaq (%rdx,%rdx,4), %rdx
movq 0x50(%rax,%rdx,8), %rax
movl (%rax,%rcx,4), %eax
xorl %ecx, %ecx
testb %cl, %cl
je 0x66d4
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/./../dynasm/dasm_x86.h
// Function: dasm_checkstep
int dasm_checkstep(Dst_DECL, int secmatch)
{
  dasm_State *D = Dst_REF;
  if (D->status == DASM_S_OK) {
    int i;
    for (i = 1; i <= 9; i++) {
      if (D->lglabels[i] > 0) { D->status = DASM_S_UNDEF_L|i; break; }
      D->lglabels[i] = 0;
    }
  }
  if (D->status == DASM_S_OK && secmatch >= 0 &&
      D->section != &D->sections[secmatch])
    D->status = DASM_S_MATCH_SEC|(int)(D->section-D->sections);
  return D->status;
}

// Assembly:
movq (%rdi), %rax
cmpl $0x0, 0x4c(%rax)
jne 0x6708
movq 0x10(%rax), %rdx
movl $0x1, %ecx
cmpl $0x0, (%rdx,%rcx,4)
jg 0x66ff
movl $0x0, (%rdx,%rcx,4)
incq %rcx
cmpq $0xa, %rcx
jne 0x66e7
jmp 0x6708
addl $0x21000000, %ecx       # imm = 0x21000000
movl %ecx, 0x4c(%rax)
testl %esi, %esi
js 0x6743
cmpl $0x0, 0x4c(%rax)
jne 0x6743
movq 0x38(%rax), %rcx
movl %esi, %edx
leaq (%rdx,%rdx,4), %rdx
leaq (%rax,%rdx,8), %rdx
addq $0x50, %rdx
cmpq %rdx, %rcx
je 0x6743
leaq 0x50(%rax), %rdx
subq %rdx, %rcx
shrq $0x3, %rcx
imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD
orl $0x3000000, %ecx        # imm = 0x3000000
movl %ecx, 0x4c(%rax)
movl 0x4c(%rax), %eax
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm.c
// Function: sym_decorate
static const char *sym_decorate(BuildCtx *ctx,
				const char *prefix, const char *suffix)
{
  char name[256];
  char *p;
#if LJ_64
  const char *symprefix = ctx->mode == BUILD_machasm ? "_" : "";
#elif LJ_TARGET_XBOX360
  const char *symprefix = "";
#else
  const char *symprefix = ctx->mode != BUILD_elfasm ? "_" : "";
#endif
  sprintf(name, "%s%s%s", symprefix, prefix, suffix);
  p = strchr(name, '@');
  if (p) {
#if LJ_TARGET_X86ORX64
    if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj))
      name[0] = '@';
    else
      *p = '\0';
#elif (LJ_TARGET_PPC  || LJ_TARGET_PPCSPE) && !LJ_TARGET_CONSOLE
    /* Keep @plt. */
#else
    *p = '\0';
#endif
  }
  p = (char *)malloc(strlen(name)+1);  /* MSVC doesn't like strdup. */
  strcpy(p, name);
  return p;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %r8
movq %rsi, %rcx
cmpl $0x2, 0x8(%rdi)
leaq 0xaf01(%rip), %rax      # 0x1216f
leaq 0xa7d9(%rip), %rdx      # 0x11a4e
cmoveq %rax, %rdx
leaq 0x90b0(%rip), %rsi      # 0x10330
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5190
movq %rbx, %rdi
movl $0x40, %esi
callq 0x50b0
testq %rax, %rax
je 0x72a2
movb $0x0, (%rax)
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x50a0
leaq 0x1(%rax), %rdi
callq 0x5140
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5060
movq %r14, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm.c
// Function: usage
static void usage(void)
{
  int i;
  fprintf(stderr, LUAJIT_VERSION " VM builder.\n");
  fprintf(stderr, LUAJIT_COPYRIGHT ", " LUAJIT_URL "\n");
  fprintf(stderr, "Target architecture: " LJ_ARCH_NAME "\n\n");
  fprintf(stderr, "Usage: buildvm -m mode [-o outfile] [infiles...]\n\n");
  fprintf(stderr, "Available modes:\n");
  for (i = 0; i < BUILD__MAX; i++)
    fprintf(stderr, "  %s\n", modenames[i]);
  exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0xfd17(%rip), %r14      # 0x16ff8
movq (%r14), %rcx
leaq 0x92ad(%rip), %rdi      # 0x10598
movl $0x19, %esi
movl $0x1, %edx
callq 0x51b0
movq (%r14), %rcx
leaq 0x92ae(%rip), %rdi      # 0x105b2
movl $0x36, %esi
movl $0x1, %edx
callq 0x51b0
movq (%r14), %rcx
leaq 0x92cc(%rip), %rdi      # 0x105e9
movl $0x1a, %esi
movl $0x1, %edx
callq 0x51b0
movq (%r14), %rcx
leaq 0x92ce(%rip), %rdi      # 0x10604
movl $0x32, %esi
movl $0x1, %edx
callq 0x51b0
movq (%r14), %rcx
leaq 0x92e8(%rip), %rdi      # 0x10637
movl $0x11, %esi
movl $0x1, %edx
callq 0x51b0
leaq 0xf29b(%rip), %r15      # 0x16600
leaq 0x92dd(%rip), %rbx      # 0x10649
xorl %r12d, %r12d
movq (%r14), %rdi
movq (%r12,%r15), %rdx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5120
addq $0x8, %r12
cmpq $0x58, %r12
jne 0x736f
movl $0x1, %edi
callq 0x51a0
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm.c
// Function: sym_insert
static void sym_insert(BuildCtx *ctx, int32_t ofs,
		       const char *prefix, const char *suffix)
{
  ptrdiff_t i = ctx->nsym++;
  while (i > 0) {
    if (ctx->sym[i-1].ofs <= ofs)
      break;
    ctx->sym[i] = ctx->sym[i-1];
    i--;
  }
  ctx->sym[i].ofs = ofs;
  ctx->sym[i].name = sym_decorate(ctx, prefix, suffix);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x40(%rdi), %r14
leal 0x1(%r14), %eax
movl %eax, 0x40(%rdi)
testq %r14, %r14
jle 0x96a0
movq %r14, %rax
shlq $0x4, %rax
movq 0x58(%rbx), %rdi
cmpl %esi, -0x8(%rdi,%rax)
jle 0x96a0
movups -0x10(%rdi,%rax), %xmm0
addq %rax, %rdi
movups %xmm0, (%rdi)
leaq -0x1(%r14), %rdi
addq $-0x10, %rax
cmpq $0x1, %r14
movq %rdi, %r14
jg 0x9677
xorl %r14d, %r14d
movq 0x58(%rbx), %rax
shlq $0x4, %r14
movl %esi, 0x8(%rax,%r14)
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x7253
movq 0x58(%rbx), %rcx
movq %rax, (%rcx,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm_asm.c
// Function: emit_asm_label
static void emit_asm_label(BuildCtx *ctx, const char *name, int size, int isfunc)
{
  switch (ctx->mode) {
  case BUILD_elfasm:
#if LJ_TARGET_PS3
    if (!strncmp(name, "lj_vm_", 6) &&
	strcmp(name, ctx->beginsym) &&
	!strstr(name, "hook")) {
      fprintf(ctx->fp,
	"\n\t.globl %s\n"
	"\t.section \".opd\",\"aw\"\n"
	"%s:\n"
	"\t.long .%s,.TOC.@tocbase32\n"
	"\t.size %s,8\n"
	"\t.previous\n"
	"\t.globl .%s\n"
	"\t.hidden .%s\n"
	"\t.type .%s, " ELFASM_PX "function\n"
	"\t.size .%s, %d\n"
	".%s:\n",
	name, name, name, name, name, name, name, name, size, name);
      break;
    }
#endif
    fprintf(ctx->fp,
      "\n\t.globl %s\n"
      "\t.hidden %s\n"
      "\t.type %s, " ELFASM_PX "%s\n"
      "\t.size %s, %d\n"
      "%s:\n",
      name, name, name, isfunc ? "function" : "object", name, size, name);
    break;
  case BUILD_coffasm:
    fprintf(ctx->fp, "\n\t.globl %s\n", name);
    if (isfunc)
      fprintf(ctx->fp, "\t.def %s; .scl 3; .type 32; .endef\n", name);
    fprintf(ctx->fp, "%s:\n", name);
    break;
  case BUILD_machasm:
    fprintf(ctx->fp,
      "\n\t.private_extern %s\n"
      "%s:\n", name, name);
    break;
  default:
    break;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rdi), %eax
cmpl $0x2, %eax
je 0x9a7f
movl %ecx, %ebp
cmpl $0x1, %eax
je 0x9a38
testl %eax, %eax
jne 0x9a33
movl %edx, %r10d
movq 0x10(%r14), %rdi
testl %ebp, %ebp
leaq 0x8537(%rip), %rax      # 0x11f3c
leaq 0x81be(%rip), %r9       # 0x11bca
cmoveq %rax, %r9
subq $0x8, %rsp
leaq 0x84e7(%rip), %rsi      # 0x11f02
movq %rbx, %rdx
movq %rbx, %rcx
movq %rbx, %r8
xorl %eax, %eax
pushq %rbx
pushq %r10
pushq %rbx
callq 0x5120
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x10(%r14), %rdi
leaq 0x8500(%rip), %rsi      # 0x11f43
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5120
testl %ebp, %ebp
je 0x9a66
movq 0x10(%r14), %rdi
leaq 0x84f4(%rip), %rsi      # 0x11f50
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5120
movq 0x10(%r14), %rdi
leaq 0x84c6(%rip), %rsi      # 0x11f37
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x5120
movq 0x10(%r14), %rdi
leaq 0x84ea(%rip), %rsi      # 0x11f74
movq %rbx, %rdx
movq %rbx, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x5120
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm_asm.c
// Function: emit_asm_bytes
static void emit_asm_bytes(BuildCtx *ctx, uint8_t *p, int n)
{
  int i;
  for (i = 0; i < n; i++) {
    if ((i & 15) == 0)
      fprintf(ctx->fp, "\t.byte %d", p[i]);
    else
      fprintf(ctx->fp, ",%d", p[i]);
    if ((i & 15) == 15) putc('\n', ctx->fp);
  }
  if ((n & 15) != 0) putc('\n', ctx->fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %edx, 0x4(%rsp)
testl %edx, %edx
jle 0x9b03
movq %rsi, %r14
movl 0x4(%rsp), %r15d
leaq 0x8552(%rip), %r13      # 0x12012
xorl %ebp, %ebp
movl %ebp, %r12d
andl $0xf, %r12d
movzbl (%r14,%rbp), %edx
movq %r13, %rsi
leaq 0x8530(%rip), %rax      # 0x12008
cmoveq %rax, %rsi
movq 0x10(%rbx), %rdi
xorl %eax, %eax
callq 0x5120
cmpl $0xf, %r12d
jne 0x9afb
movq 0x10(%rbx), %rsi
movl $0xa, %edi
callq 0x5110
incq %rbp
cmpq %rbp, %r15
jne 0x9ac2
testb $0xf, 0x4(%rsp)
je 0x9b26
movq 0x10(%rbx), %rsi
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5110
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm_peobj.c
// Function: emit_peobj_sym
static void emit_peobj_sym(BuildCtx *ctx, const char *name, uint32_t value,
			   int sect, int type, int scl)
{
  PEsym sym;
  size_t len = strlen(name);
  if (!strtab) {  /* Pass 1: only calculate string table length. */
    if (len > 8) strtabofs += len+1;
    return;
  }
  if (len <= 8) {
    memcpy(sym.n.name, name, len);
    memset(sym.n.name+len, 0, 8-len);
  } else {
    sym.n.nameref[0] = 0;
    sym.n.nameref[1] = (uint32_t)strtabofs;
    memcpy(strtab + strtabofs, name, len);
    strtab[strtabofs+len] = 0;
    strtabofs += len+1;
  }
  sym.value = value;
  sym.sect = (int16_t)(sect+1);  /* 1-based section number. */
  sym.type = (uint16_t)type;
  sym.scl = (uint8_t)scl;
  sym.naux = 0;
  owrite(ctx, &sym, PEOBJ_SYM_SIZE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0x4(%rsp)
movl %r8d, (%rsp)
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x50a0
movq %rax, %r13
movq 0xd13f(%rip), %rbp      # 0x171a8
testq %rbp, %rbp
je 0xa09d
cmpq $0x8, %r13
ja 0xa0bd
leaq 0x14(%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x5130
leaq (%rsp,%r13), %rdi
addq $0x14, %rdi
movl $0x8, %edx
subq %r13, %rdx
xorl %esi, %esi
callq 0x50c0
jmp 0xa100
cmpq $0x9, %r13
jb 0xa130
movq 0xd102(%rip), %rax      # 0x171b0
addq %r13, %rax
incq %rax
movq %rax, 0xd0f5(%rip)      # 0x171b0
jmp 0xa130
movl $0x0, 0x14(%rsp)
movq %r14, 0x8(%rsp)
movq 0xd0df(%rip), %r14      # 0x171b0
movl %r14d, 0x18(%rsp)
addq %r14, %rbp
movq %rbp, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x5130
movb $0x0, (%r13,%rbp)
leaq (%r14,%r13), %rax
incq %rax
movq 0x8(%rsp), %r14
movq %rax, 0xd0b0(%rip)      # 0x171b0
leaq 0x14(%rsp), %rsi
movl %r12d, 0x8(%rsi)
incl %r15d
movw %r15w, 0xc(%rsi)
movl (%rsp), %eax
movw %ax, 0xe(%rsi)
movl 0x4(%rsp), %eax
movb %al, 0x10(%rsi)
movb $0x0, 0x11(%rsi)
movl $0x12, %edx
movq %r14, %rdi
callq 0x6747
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm_peobj.c
// Function: emit_peobj_sym_sect
static void emit_peobj_sym_sect(BuildCtx *ctx, PEsection *pesect, int sect)
{
  PEsym sym;
  PEsymaux aux;
  if (!strtab) return;  /* Pass 1: no output. */
  memcpy(sym.n.name, pesect[sect].name, 8);
  sym.value = 0;
  sym.sect = (int16_t)(sect+1);  /* 1-based section number. */
  sym.type = PEOBJ_TYPE_NULL;
  sym.scl = PEOBJ_SCL_STATIC;
  sym.naux = 1;
  owrite(ctx, &sym, PEOBJ_SYM_SIZE);
  memset(&aux, 0, sizeof(PEsymaux));
  aux.size = pesect[sect].size;
  aux.nreloc = pesect[sect].nreloc;
  owrite(ctx, &aux, PEOBJ_SYM_SIZE);
}

// Assembly:
cmpq $0x0, 0xd061(%rip)      # 0x171a8
je 0xa1bb
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %eax
leaq (%rax,%rax,4), %r15
movq (%rsi,%r15,8), %rax
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
xorl %ebp, %ebp
movl %ebp, 0x8(%rsi)
incl %edx
movw %dx, 0xc(%rsi)
movl $0x1030000, 0xe(%rsi)   # imm = 0x1030000
movl $0x12, %edx
callq 0x6747
movq %rsp, %rsi
movl %ebp, 0x10(%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movl 0x10(%r14,%r15,8), %eax
movl %eax, (%rsi)
movzwl 0x20(%r14,%r15,8), %eax
movw %ax, 0x4(%rsi)
movl $0x12, %edx
movq %rbx, %rdi
callq 0x6747
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm_lib.c
// Function: libdef_endmodule
static void libdef_endmodule(BuildCtx *ctx)
{
  if (modstate != 0) {
    char line[80];
    const uint8_t *p;
    int n;
    if (modstate == 1)
      fprintf(ctx->fp, "  (lua_CFunction)0");
    fprintf(ctx->fp, "\n};\n");
    fprintf(ctx->fp, "static const uint8_t %s%s[] = {\n",
	    LABEL_PREFIX_LIBINIT, modname);
    line[0] = '\0';
    for (n = 0, p = obuf; p < optr; p++) {
      n += sprintf(line+n, "%d,", *p);
      if (n >= 75) {
	fprintf(ctx->fp, "%s\n", line);
	n = 0;
	line[0] = '\0';
      }
    }
    fprintf(ctx->fp, "%s%d\n};\n#endif\n\n", line, LIBINIT_END);
  }
}

// Assembly:
movl 0xcb8e(%rip), %eax      # 0x171cc
testl %eax, %eax
je 0xa73f
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
cmpl $0x1, %eax
jne 0xa676
movq 0x10(%rbx), %rcx
leaq 0x7e01(%rip), %rdi      # 0x12468
movl $0x12, %esi
movl $0x1, %edx
callq 0x51b0
movq 0x10(%rbx), %rcx
leaq 0x7dfa(%rip), %rdi      # 0x1247b
movl $0x4, %esi
movl $0x1, %edx
callq 0x51b0
movq 0x10(%rbx), %rdi
leaq 0x7de5(%rip), %rsi      # 0x12480
leaq 0x7dff(%rip), %rdx      # 0x124a1
leaq 0xeb47(%rip), %rcx      # 0x191f0
xorl %eax, %eax
callq 0x5120
movb $0x0, (%rsp)
leaq 0xcb25(%rip), %r13      # 0x171e0
cmpq %r13, 0xeb1e(%rip)      # 0x191e0
jbe 0xa717
leaq 0x7de3(%rip), %r14      # 0x124ae
leaq 0x5f79(%rip), %r15      # 0x1064b
movq %rsp, %r12
xorl %ebp, %ebp
movslq %ebp, %rbp
leaq (%rsp,%rbp), %rdi
movzbl (%r13), %edx
movq %r14, %rsi
xorl %eax, %eax
callq 0x5190
addl %eax, %ebp
cmpl $0x4b, %ebp
jl 0xa70b
movq 0x10(%rbx), %rdi
xorl %ebp, %ebp
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x5120
movb $0x0, (%rsp)
incq %r13
cmpq 0xeacb(%rip), %r13      # 0x191e0
jb 0xa6d7
movq 0x10(%rbx), %rdi
leaq 0x7d90(%rip), %rsi      # 0x124b2
movq %rsp, %rdx
movl $0xff, %ecx
xorl %eax, %eax
callq 0x5120
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm_lib.c
// Function: libdef_module
static void libdef_module(BuildCtx *ctx, char *p, int arg)
{
  UNUSED(arg);
  if (ctx->mode == BUILD_libdef) {
    libdef_endmodule(ctx);
    optr = obuf;
    *optr++ = (uint8_t)ffid;
    *optr++ = (uint8_t)ffasmfunc;
    *optr++ = 0;  /* Hash table size. */
    modstate = 1;
    fprintf(ctx->fp, "#ifdef %sMODULE_%s\n", LIBDEF_PREFIX, p);
    fprintf(ctx->fp, "#undef %sMODULE_%s\n", LIBDEF_PREFIX, p);
    fprintf(ctx->fp, "static const lua_CFunction %s%s[] = {\n",
	    LABEL_PREFIX_LIBCF, p);
  }
  modnamelen = strlen(p);
  if (modnamelen > sizeof(modname)-1) {
    fprintf(stderr, "Error: module name too long: '%s'\n", p);
    exit(1);
  }
  strcpy(modname, p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpl $0x7, 0x8(%rdi)
jne 0xa7f2
movq %rdi, %r14
callq 0xa638
leaq 0xca7f(%rip), %rax      # 0x171e0
movq %rax, 0xea78(%rip)      # 0x191e0
movb 0xca52(%rip), %al       # 0x171c0
movb %al, 0xca6c(%rip)       # 0x171e0
movb 0xca4e(%rip), %al       # 0x171c8
movb %al, 0xca61(%rip)       # 0x171e1
leaq 0xca5c(%rip), %rax      # 0x171e3
movq %rax, 0xea52(%rip)      # 0x191e0
movb $0x0, 0xca4d(%rip)      # 0x171e2
movl $0x1, 0xca2d(%rip)      # 0x171cc
movq 0x10(%r14), %rdi
leaq 0x7b14(%rip), %rsi      # 0x122be
leaq 0x79b9(%rip), %r15      # 0x1216a
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x5120
movq 0x10(%r14), %rdi
leaq 0x7b09(%rip), %rsi      # 0x122d2
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x5120
movq 0x10(%r14), %rdi
leaq 0x7b05(%rip), %rsi      # 0x122e6
leaq 0x7b25(%rip), %rdx      # 0x1230d
movq %rbx, %rcx
xorl %eax, %eax
callq 0x5120
movq %rbx, %rdi
callq 0x50a0
movq %rax, 0xe9e7(%rip)      # 0x191e8
cmpq $0x50, %rax
jae 0xa81b
leaq 0xe9e2(%rip), %rdi      # 0x191f0
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x5060
movq %rbx, %rdi
callq 0x53ab
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm_lib.c
// Function: libdef_rec
static void libdef_rec(BuildCtx *ctx, char *p, int arg)
{
  UNUSED(arg);
  if (ctx->mode == BUILD_recdef) {
    char *q;
    uint32_t n;
    for (; recffid+1 < ffid; recffid++)
      fprintf(ctx->fp, ",\n0");
    recffid = ffid;
    if (*p == '.') p = funcname;
    q = strchr(p, ' ');
    if (q) *q++ = '\0';
    n = find_rec(p);
    if (q)
      fprintf(ctx->fp, ",\n0x%02x00+(%s)", n, q);
    else
      fprintf(ctx->fp, ",\n0x%02x00", n);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x8, 0x8(%rdi)
jne 0xaaf6
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc745(%rip), %ecx      # 0x171c4
incl %ecx
movl 0xc739(%rip), %eax      # 0x171c0
cmpl %eax, %ecx
jge 0xaac4
leaq 0x798a(%rip), %r15      # 0x1241c
movq 0x10(%rbx), %rcx
movl $0x3, %esi
movl $0x1, %edx
movq %r15, %rdi
callq 0x51b0
movl 0xc716(%rip), %ecx      # 0x171c4
leal 0x1(%rcx), %eax
movl %eax, 0xc70d(%rip)      # 0x171c4
addl $0x2, %ecx
movl 0xc700(%rip), %eax      # 0x171c0
cmpl %eax, %ecx
jl 0xaa92
movl %eax, 0xc6fa(%rip)      # 0x171c4
cmpb $0x2e, (%r14)
leaq 0xe76b(%rip), %r15      # 0x19240
cmovneq %r14, %r15
movq %r15, %rdi
movl $0x20, %esi
callq 0x50b0
testq %rax, %rax
je 0xab05
movq %rax, %rcx
incq %rcx
movb $0x0, (%rax)
jmp 0xab07
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ecx, %ecx
cmpb $0x0, 0xc6d2(%rip)      # 0x171e0
movq %rcx, (%rsp)
je 0xab52
movl $0x2, %ebp
leaq 0xc6c0(%rip), %r14      # 0x171e0
xorl %r13d, %r13d
movq %r14, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5100
testl %eax, %eax
je 0xab7f
movq %r12, %rdi
callq 0x50a0
addq %rax, %r13
incq %r13
incl %ebp
leaq (%r14,%r13), %r12
cmpb $0x0, (%r14,%r13)
jne 0xab26
jmp 0xab61
leaq 0xc687(%rip), %r12      # 0x171e0
movl $0x2, %ebp
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x50a0
addq %r13, %rax
cmpq $0x1fff, %rax           # imm = 0x1FFF
jge 0xabc8
movq %r12, %rdi
movq %r15, %rsi
callq 0x5060
movq 0x10(%rbx), %rdi
movq (%rsp), %rcx
testq %rcx, %rcx
je 0xabaa
leaq 0x788d(%rip), %rsi      # 0x12420
movl %ebp, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5120
leaq 0x787f(%rip), %rsi      # 0x12430
movl %ebp, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5120
callq 0x5467
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm_lib.c
// Function: libdef_push
static void libdef_push(BuildCtx *ctx, char *p, int arg)
{
  UNUSED(arg);
  if (ctx->mode == BUILD_libdef) {
    int len = (int)strlen(p);
    if (*p == '"') {
      if (len > 1 && p[len-1] == '"') {
	p[len-1] = '\0';
	libdef_name(p+1, LIBINIT_STRING);
	return;
      }
    } else if (*p >= '0' && *p <= '9') {
      char *ep;
      double d = strtod(p, &ep);
      if (*ep == '\0') {
	if (optr+1+sizeof(double) > obuf+sizeof(obuf)) {
	  fprintf(stderr, "Error: output buffer overflow\n");
	  exit(1);
	}
	*optr++ = LIBINIT_NUMBER;
	memcpy_endian(optr, &d, sizeof(double));
	optr += sizeof(double);
	return;
      }
    } else if (!strcmp(p, "lastcl")) {
      if (optr+1 > obuf+sizeof(obuf)) {
	fprintf(stderr, "Error: output buffer overflow\n");
	exit(1);
      }
      *optr++ = LIBINIT_LASTCL;
      return;
    } else if (len > 4 && !strncmp(p, "top-", 4)) {
      if (optr+2 > obuf+sizeof(obuf)) {
	fprintf(stderr, "Error: output buffer overflow\n");
	exit(1);
      }
      *optr++ = LIBINIT_COPY;
      *optr++ = (uint8_t)atoi(p+4);
      return;
    }
    fprintf(stderr, "Error: bad value for %sPUSH(%s)\n", LIBDEF_PREFIX, p);
    exit(1);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpl $0x7, 0x8(%rdi)
jne 0xad1b
movq %rsi, %rbx
movq %rsi, %rdi
callq 0x50a0
movq %rax, %r14
movb (%rbx), %al
cmpb $0x22, %al
jne 0xac2a
cmpl $0x2, %r14d
jl 0xad25
decl %r14d
cmpb $0x22, (%rbx,%r14)
jne 0xad25
movb $0x0, (%rbx,%r14)
incq %rbx
movq %rbx, %rdi
movl $0xc0, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xad85
addb $-0x30, %al
cmpb $0x9, %al
ja 0xac86
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5080
movq (%r14), %rax
cmpb $0x0, (%rax)
jne 0xad25
movq 0xe58d(%rip), %rax      # 0x191e0
leaq 0x9(%rax), %rcx
leaq 0xe582(%rip), %rdx      # 0x191e0
cmpq %rdx, %rcx
ja 0xad2d
leaq 0x1(%rax), %rdx
movq %rdx, 0xe56e(%rip)      # 0x191e0
movb $-0x5, (%rax)
movsd %xmm0, 0x1(%rax)
movq %rcx, 0xe55f(%rip)      # 0x191e0
jmp 0xad1b
leaq 0x77ae(%rip), %rsi      # 0x1243b
movq %rbx, %rdi
callq 0x5100
testl %eax, %eax
je 0xacfa
cmpl $0x5, %r14d
jl 0xad25
leaq 0x7798(%rip), %rsi      # 0x12442
movl $0x4, %edx
movq %rbx, %rdi
callq 0x5050
testl %eax, %eax
jne 0xad25
movq 0xe51e(%rip), %r14      # 0x191e0
leaq 0x2(%r14), %r15
leaq 0xe513(%rip), %rax      # 0x191e0
cmpq %rax, %r15
ja 0xad32
leaq 0x1(%r14), %rax
movq %rax, 0xe503(%rip)      # 0x191e0
movb $-0x4, (%r14)
addq $0x4, %rbx
movq %rbx, %rdi
callq 0x5180
movq %r15, 0xe4ec(%rip)      # 0x191e0
movb %al, 0x1(%r14)
jmp 0xad1b
movq 0xe4df(%rip), %rax      # 0x191e0
leaq 0x1(%rax), %rcx
leaq 0xe4d4(%rip), %rdx      # 0x191e0
cmpq %rdx, %rcx
ja 0xad37
movq %rcx, 0xe4c8(%rip)      # 0x191e0
movb $-0x3, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x54fb
callq 0x54d6
callq 0x548c
callq 0x54b1
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm_lib.c
// Function: libdef_set
static void libdef_set(BuildCtx *ctx, char *p, int arg)
{
  UNUSED(arg);
  if (ctx->mode == BUILD_libdef) {
    if (p[0] == '!' && p[1] == '\0') p[0] = '\0';  /* Set env. */
    libdef_name(p, LIBINIT_STRING);
    *optr++ = LIBINIT_SET;
    obuf[2]++;  /* Bump hash table size. */
  }
}

// Assembly:
cmpl $0x7, 0x8(%rdi)
jne 0xad7d
cmpb $0x21, (%rsi)
jne 0xad50
cmpb $0x0, 0x1(%rsi)
jne 0xad50
movb $0x0, (%rsi)
pushq %rax
movq %rsi, %rdi
movl $0xc0, %esi
callq 0xad85
movq 0xe47b(%rip), %rax      # 0x191e0
leaq 0x1(%rax), %rcx
movq %rcx, 0xe470(%rip)      # 0x191e0
movb $-0x6, (%rax)
incb 0xc469(%rip)            # 0x171e2
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm_lib.c
// Function: libdef_name
static void libdef_name(const char *p, int kind)
{
  size_t n = strlen(p);
  if (kind != LIBINIT_STRING) {
    if (n > modnamelen && p[modnamelen] == '_' &&
	!strncmp(p, modname, modnamelen)) {
      p += modnamelen+1;
      n -= modnamelen+1;
    }
  }
  if (n > LIBINIT_MAXSTR) {
    fprintf(stderr, "Error: string too long: '%s'\n",  p);
    exit(1);
  }
  if (optr+1+n+2 > obuf+sizeof(obuf)) {  /* +2 for caller. */
    fprintf(stderr, "Error: output buffer overflow\n");
    exit(1);
  }
  *optr++ = (uint8_t)(n | kind);
  memcpy(optr, p, n);
  optr += n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x50a0
movq %rax, %r14
cmpl $0xc0, %ebp
je 0xadd6
movq 0xe440(%rip), %r15      # 0x191e8
cmpq %r15, %r14
jbe 0xadd6
cmpb $0x5f, (%rbx,%r15)
jne 0xadd6
leaq 0xe435(%rip), %rsi      # 0x191f0
movq %rbx, %rdi
movq %r15, %rdx
callq 0x5050
testl %eax, %eax
jne 0xadd6
addq %r15, %rbx
incq %rbx
incq %r15
subq %r15, %r14
cmpq $0x3a, %r14
jae 0xae2c
movq 0xe3fd(%rip), %rax      # 0x191e0
leaq (%rax,%r14), %rcx
addq $0x3, %rcx
leaq 0xe3ee(%rip), %rdx      # 0x191e0
cmpq %rdx, %rcx
ja 0xae34
leaq 0x1(%rax), %rdi
leaq (%rax,%r14), %r15
incq %r15
orl %r14d, %ebp
movq %rdi, 0xe3d4(%rip)      # 0x191e0
movb %bpl, (%rax)
movq %rbx, %rsi
movq %r14, %rdx
callq 0x5130
movq %r15, 0xe3bf(%rip)      # 0x191e0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x554b
callq 0x5526
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/buildvm_fold.c
// Function: tryhash
static int tryhash(uint32_t *htab, uint32_t sz, uint32_t r, int dorol)
{
  uint32_t i;
  if (dorol && ((r & 31) == 0 || (r>>5) == 0))
    return 0;  /* Avoid zero rotates. */
  memset(htab, 0xff, (sz+1)*sizeof(uint32_t));
  for (i = 0; i < nkeys; i++) {
    uint32_t key = foldkeys[i];
    uint32_t k = key & 0xffffff;
    uint32_t h = (dorol ? lj_rol(lj_rol(k, r>>5) - k, r&31) :
			  (((k << (r>>5)) - k) << (r&31))) % sz;
    if (htab[h] != 0xffffffff) {  /* Collision on primary slot. */
      if (htab[h+1] != 0xffffffff) {  /* Collision on secondary slot. */
	/* Try to move the colliding key, if possible. */
	if (h < sz-1 && htab[h+2] == 0xffffffff) {
	  uint32_t k2 = htab[h+1] & 0xffffff;
	  uint32_t h2 = (dorol ? lj_rol(lj_rol(k2, r>>5) - k2, r&31) :
				 (((k2 << (r>>5)) - k2) << (r&31))) % sz;
	  if (h2 != h+1) return 0;  /* Cannot resolve collision. */
	  htab[h+2] = htab[h+1];  /* Move colliding key to secondary slot. */
	} else {
	  return 0;  /* Collision. */
	}
      }
      htab[h+1] = key;
    } else {
      htab[h] = key;
    }
  }
  return 1;  /* Success, all keys could be stored. */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movl %edx, 0xc(%rsp)
movl %esi, %r14d
movq %rdi, %r15
testl %ecx, %ecx
je 0xb50c
movl 0xc(%rsp), %ecx
testb $0x1f, %cl
sete %al
cmpl $0x20, %ecx
setb %dl
xorl %ecx, %ecx
orb %al, %dl
jne 0xb612
movl %r14d, %eax
leaq 0x4(,%rax,4), %rdx
movq %r15, %rdi
movl $0xff, %esi
callq 0x50c0
movl 0xdd6d(%rip), %r9d      # 0x19298
testq %r9, %r9
je 0xb60d
leal -0x1(%r14), %eax
movl %eax, 0x14(%rsp)
movl 0xc(%rsp), %eax
movl %eax, %esi
shrl $0x5, %esi
andl $0x1f, %eax
movl %eax, 0x10(%rsp)
shlq $0x2, %r9
xorl %r11d, %r11d
leaq 0xdd46(%rip), %rbp      # 0x192a0
movl (%r11,%rbp), %r13d
movl %r13d, %edx
andl $0xffffff, %edx         # imm = 0xFFFFFF
movl %edx, %eax
movl %esi, %ecx
testl %ebx, %ebx
je 0xb57b
roll %cl, %eax
subl %edx, %eax
movl 0xc(%rsp), %ecx
roll %cl, %eax
jmp 0xb585
shll %cl, %eax
subl %edx, %eax
movl 0x10(%rsp), %ecx
shll %cl, %eax
xorl %edx, %edx
divl %r14d
movl %edx, %r8d
cmpl $-0x1, (%r15,%r8,4)
je 0xb5d9
movl %r8d, %eax
leaq (%r15,%rax,4), %r10
addq $0x4, %r10
movl (%r10), %r12d
cmpl $-0x1, %r12d
je 0xb5fd
xorl %ecx, %ecx
cmpl 0x14(%rsp), %r8d
jae 0xb612
movslq %r8d, %rdi
cmpl $-0x1, 0x8(%r15,%rdi,4)
jne 0xb612
movl %r12d, %edx
andl $0xffffff, %edx         # imm = 0xFFFFFF
movl %edx, %eax
movl %esi, %ecx
testl %ebx, %ebx
je 0xb5df
roll %cl, %eax
subl %edx, %eax
movl 0xc(%rsp), %ecx
roll %cl, %eax
jmp 0xb5e9
leaq (%r15,%r8,4), %r10
jmp 0xb5fd
shll %cl, %eax
subl %edx, %eax
movl 0x10(%rsp), %ecx
shll %cl, %eax
incl %r8d
xorl %ecx, %ecx
xorl %edx, %edx
divl %r14d
cmpl %r8d, %edx
jne 0xb612
movl %r12d, 0x8(%r15,%rdi,4)
movl %r13d, (%r10)
addq $0x4, %r11
cmpq %r11, %r9
jne 0xb55a
movl $0x1, %ecx
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_O1/zenkj[P]luajit-arm64/src/host/buildvm_fold.c
// Function: printhash
static void printhash(BuildCtx *ctx, uint32_t *htab, uint32_t sz)
{
  uint32_t i;
  fprintf(ctx->fp, "static const uint32_t fold_hash[%d] = {\n0x%08x",
	  sz+1, htab[0]);
  for (i = 1; i < sz+1; i++)
    fprintf(ctx->fp, ",\n0x%08x", htab[i]);
  fprintf(ctx->fp, "\n};\n\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
leal 0x1(%r12), %r15d
movl (%rsi), %ecx
leaq 0x705d(%rip), %rsi      # 0x126a4
movl %r15d, %edx
xorl %eax, %eax
callq 0x5120
testl %r12d, %r12d
je 0xb67d
movl $0x1, %r13d
leaq 0x7070(%rip), %r12      # 0x126d3
movq 0x10(%rbx), %rdi
movl (%r14,%r13,4), %edx
movq %r12, %rsi
xorl %eax, %eax
callq 0x5120
incq %r13
cmpq %r13, %r15
jne 0xb663
movq 0x10(%rbx), %rcx
leaq 0x6baf(%rip), %rdi      # 0x12237
movl $0x5, %esi
movl $0x1, %edx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x51b0
// File: /workspace/github_c_makefile_star2_O1/stevenmherring[P]DNS/sequential-trie.c
// Function: new_leaf
struct trie_node * new_leaf (const char *string, size_t strlen, int32_t ip4_address) {
  struct trie_node *new_node = malloc(sizeof(struct trie_node));
  if (!new_node) {
    printf ("WARNING: Node memory allocation failed.  Results may be bogus.\n");
    return NULL;
  }
  assert(strlen < 64);
  assert(strlen > 0);
  new_node->next = NULL;
  new_node->strlen = strlen;
  strncpy(new_node->key, string, strlen);
  new_node->key[strlen] = '\0';
  new_node->ip4_address = ip4_address;
  new_node->children = NULL;

  return new_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x58, %edi
callq 0x10f0
testq %rax, %rax
je 0x12e4
cmpq $0x40, %r14
jae 0x12fe
testq %r14, %r14
je 0x131d
movq %rax, %rbx
xorl %r12d, %r12d
movq %r12, (%rax)
movl %r14d, 0x8(%rax)
movq %rax, %rdi
addq $0x18, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1050
movb $0x0, 0x18(%rbx,%r14)
movl %ebp, 0xc(%rbx)
movq %r12, 0x10(%rbx)
jmp 0x12f2
leaq 0x207f(%rip), %rdi      # 0x336a
callq 0x1070
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1df0(%rip), %rdi      # 0x30f5
leaq 0x1cf8(%rip), %rsi      # 0x3004
leaq 0x1d03(%rip), %rcx      # 0x3016
movl $0x1c, %edx
callq 0x1090
leaq 0x1d2c(%rip), %rdi      # 0x3050
leaq 0x1cd9(%rip), %rsi      # 0x3004
leaq 0x1ce4(%rip), %rcx      # 0x3016
movl $0x1d, %edx
callq 0x1090