LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x20
popq %rdi
callq 0x1060
testq %rax, %rax
je 0x1564
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
leaq 0xb96(%rip), %rdi       # 0x2101
callq 0x1070
pushq $0x1
popq %rdi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/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 0x2ad3(%rip), %rdx      # 0x4070
pushq $0x3
popq %rdi
pushq $0x3b
popq %rcx
xorl %esi, %esi
callq 0x1528
movq %rax, %r12
leaq 0x2aac(%rip), %rdi      # 0x4060
movq %rax, 0x2b05(%rip)      # 0x40c0
leaq 0x2afe(%rip), %r8       # 0x40c0
movslq %r15d, %rax
movq %rax, 0x2afc(%rip)      # 0x40c8
movslq %r14d, %rax
movq %rax, 0x2afa(%rip)      # 0x40d0
movslq %ebp, %rax
movq %rax, 0x2af8(%rip)      # 0x40d8
movl %ebx, (%rsp)
leaq 0x4b16(%rip), %rdx      # 0x6100
pushq $0x4b
popq %rsi
pushq $0x8
popq %r9
movl $0x400, %ecx            # imm = 0x400
callq 0x119c
movq %r12, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1578
// File: /workspace/github_c_makefile_star2_O2/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
movslq %edi, %rcx
cmpl $0x2, %ecx
pushq $0x1
popq %rdx
movl %edx, %eax
cmovgel %edi, %eax
movq %rsi, %rbx
xorl %ebp, %ebp
pushq $0x1
popq %rsi
pushq $0x2
popq %r8
cmpq %rcx, %rsi
jge 0x166f
movq (%rbx,%rsi,8), %r9
cmpb $0x2d, (%r9)
jne 0x166d
incq %r9
movzbl (%r9), %r10d
cmpl $0x73, %r10d
je 0x1658
movl %edx, %r11d
cmpl $0x74, %r10d
je 0x165b
jmp 0x1663
movl %r8d, %r11d
incq %r9
movl %r11d, %ebp
jmp 0x1643
testl %r10d, %r10d
jne 0x16af
incq %rsi
jmp 0x1631
movl %esi, %eax
leal 0x3(%rax), %ecx
cmpl %edi, %ecx
jg 0x16af
movl %eax, %r12d
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 0x1580
xorl %eax, %eax
jmp 0x16cd
movq 0x2942(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0xa4b(%rip), %rsi       # 0x210e
xorl %eax, %eax
callq 0x1050
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $-0x1
popq %rbp
testq %rdi, %rdi
je 0x1241
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x10
popq %rdi
callq 0x1050
testq %rax, %rax
je 0x1241
movq %rax, %r15
movl $0x1, (%rax)
movq %r14, %rdi
callq 0x1040
pushq $0x1
popq %rbp
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x1196
cmpb $0x3a, (%r14,%rcx)
jne 0x1191
incl %ebp
movl %ebp, (%r15)
incq %rcx
jmp 0x1180
movq %rbx, (%rsp)
movslq %ebp, %rdi
shlq $0x3, %rdi
callq 0x1050
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x1236
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ebx, %ebx
movzbl (%r14,%rbx), %eax
cmpl $0x3a, %eax
je 0x11c9
testl %eax, %eax
jne 0x1223
movq %rbx, %rdi
subq %r13, %rdi
incq %rdi
callq 0x1050
movq 0x8(%r15), %rcx
movslq %r12d, %r12
movq %rax, (%rcx,%r12,8)
testq %rax, %rax
je 0x1236
leaq (%r14,%r13), %rcx
xorl %eax, %eax
leaq (%rax,%r13), %rdx
cmpq %rbx, %rdx
jae 0x1209
movb (%rcx,%rax), %dl
movq 0x8(%r15), %rsi
movq (%rsi,%r12,8), %rsi
movb %dl, (%rsi,%rax)
incq %rax
jmp 0x11ed
movq 0x8(%r15), %rcx
movq (%rcx,%r12,8), %rcx
movl %eax, %edx
movb $0x0, (%rcx,%rdx)
addq %rax, %r13
incq %r13
incl %r12d
movl (%r15), %ebp
incq %rbx
cmpl %ebp, %r12d
jl 0x11bb
movq (%rsp), %rax
movq %r15, (%rax)
xorl %ebp, %ebp
jmp 0x1241
movq %r15, %rdi
callq 0x1060
pushq $-0x2
popq %rbp
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_O2/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 0x12bf
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq (%rdi), %r14
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
cmpq %r14, %r15
jge 0x12ad
movq (%rdi,%r15,8), %rax
testq %rax, %rax
je 0x128c
movq %rax, %rdi
callq 0x1030
movq 0x8(%rbx), %rax
andq $0x0, (%rax,%r15,8)
movq 0x8(%rbx), %rdi
movq -0x8(%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0x12a5
callq 0x1030
movq 0x8(%rbx), %rax
andq $0x0, -0x8(%rax,%r14,8)
incq %r15
decq %r14
jmp 0x1265
callq 0x1030
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O2/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
andq $0x0, (%rdi)
leal -0x1(%rbx), %eax
cltq
imulq $0x28, %rax, %rax
addq $0x78, %rax
pushq $0x10
popq %rcx
movq %rcx, %r15
addq %rcx, %rcx
cmpq %rax, %r15
jb 0x531a
movq %r15, %rdi
callq 0x5150
movq %rax, (%r14)
testq %rax, %rax
je 0x5387
movq %r15, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
andq $0x0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movl %ebx, 0x48(%rax)
addq $0x50, %rax
xorl %ecx, %ecx
testl %ebx, %ebx
cmovlel %ecx, %ebx
shlq $0x18, %rbx
cmpq %rcx, %rbx
je 0x5381
movups %xmm0, 0x8(%rax)
movslq %ecx, %rdx
negq %rdx
shlq $0x2, %rdx
movq %rdx, (%rax)
andl $0x0, 0x1c(%rax)
addq $0x1000000, %rcx        # imm = 0x1000000
addq $0x28, %rax
jmp 0x535a
popq %rbx
popq %r14
popq %r15
retq
pushq $0x1
popq %rdi
callq 0x51c0
// File: /workspace/github_c_makefile_star2_O2/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
leaq 0x58(%rbx), %r14
xorl %r15d, %r15d
movslq 0x48(%rbx), %rax
cmpq %rax, %r15
jge 0x53b8
movq (%r14), %rdi
callq 0x5030
incq %r15
addq $0x28, %r14
jmp 0x539e
movq 0x20(%rbx), %rdi
callq 0x5030
movq 0x10(%rbx), %rdi
callq 0x5030
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x5030
// File: /workspace/github_c_makefile_star2_O2/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 0x5480
cmpq $0x11, %r14
pushq $0x10
popq %rcx
cmovaeq %r14, %rcx
movq %rcx, %rbx
addq %rcx, %rcx
cmpq %rax, %rbx
jb 0x5457
movq 0x20(%r15), %rdi
movq %rbx, %rsi
callq 0x5180
movq %rax, 0x20(%r15)
testq %rax, %rax
je 0x549c
movq %rax, %rdi
movq %rbx, 0x28(%r15)
jmp 0x5487
movq 0x20(%r15), %rdi
movq %r14, %rbx
addq %r14, %rdi
subq %r14, %rbx
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x50c0
pushq $0x1
popq %rdi
callq 0x51c0
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq (%rdi), %rbx
movq %rsi, 0x8(%rbx)
andl $0x0, 0x4c(%rbx)
leaq 0x50(%rbx), %rax
movq %rax, 0x38(%rbx)
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rdx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x50c0
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x54e1
movq 0x28(%rbx), %rdx
xorl %esi, %esi
callq 0x50c0
movslq 0x48(%rbx), %rax
addq $0x70, %rbx
xorl %ecx, %ecx
cmpq %rax, %rcx
jge 0x5507
movl %r14d, -0x8(%rbx)
andl $0x0, (%rbx)
incq %rcx
addq $0x28, %rbx
addl $0x1000000, %r14d       # imm = 0x1000000
jmp 0x54eb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x60bd
movq 0x20(%rax), %rdx
movl (%rdx,%rcx,4), %ecx
testl %ecx, %ecx
js 0x60c1
je 0x60bd
pushq $-0x1
jmp 0x60bf
pushq $-0x2
popq %rax
retq
negl %ecx
movl %ecx, %edx
shrl $0x18, %edx
imulq $0x28, %rdx, %rdx
movq 0x50(%rax,%rdx), %rax
movl (%rax,%rcx,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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), %rcx
movl 0x4c(%rcx), %eax
testl %eax, %eax
je 0x60e0
retq
movq 0x10(%rcx), %rdx
pushq $0x1
popq %rax
cmpq $0xa, %rax
je 0x60fc
cmpl $0x0, (%rdx,%rax,4)
jg 0x613b
andl $0x0, (%rdx,%rax,4)
incq %rax
jmp 0x60e7
movl 0x4c(%rcx), %eax
testl %eax, %eax
setne %dl
testl %esi, %esi
sets %dil
orb %dl, %dil
jne 0x60df
movq 0x38(%rcx), %rax
movl %esi, %edx
imulq $0x28, %rdx, %rdx
addq %rcx, %rdx
addq $0x50, %rdx
cmpq %rdx, %rax
je 0x6146
leaq 0x50(%rcx), %rdx
subq %rdx, %rax
pushq $0x28
popq %rsi
cqto
idivq %rsi
movl $0x3000000, %edx        # imm = 0x3000000
jmp 0x6140
movl $0x21000000, %edx       # imm = 0x21000000
orl %edx, %eax
movl %eax, 0x4c(%rcx)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/zenkj[P]luajit-arm64/src/host/buildvm.c
// Function: owrite
void owrite(BuildCtx *ctx, const void *ptr, size_t sz)
{
  if (fwrite(ptr, 1, sz, ctx->fp) != sz) {
    fprintf(stderr, "Error: cannot write to output file: %s\n",
	    strerror(errno));
    exit(1);
  }
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rax
movq 0x10(%rdi), %rcx
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x51d0
cmpq %rbx, %rax
jne 0x6166
popq %rbx
retq
movq 0xfe8b(%rip), %rax      # 0x15ff8
movq (%rax), %rbx
callq 0x5040
movl (%rax), %edi
callq 0x51e0
leaq 0x8966(%rip), %rsi      # 0xeae9
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5130
pushq $0x1
popq %rdi
callq 0x51c0
// File: /workspace/github_c_makefile_star2_O2/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 0xa565(%rip), %rax      # 0x1115f
leaq 0x9e2e(%rip), %rdx      # 0x10a2f
cmoveq %rax, %rdx
leaq 0x8724(%rip), %rsi      # 0xf330
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x51b0
pushq $0x40
popq %rsi
movq %rbx, %rdi
callq 0x50b0
testq %rax, %rax
je 0x6c2c
movb $0x0, (%rax)
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x50a0
leaq 0x1(%rax), %rdi
callq 0x5150
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_O2/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 0xf38d(%rip), %r14      # 0x15ff8
movq (%r14), %rcx
leaq 0x8923(%rip), %rdi      # 0xf598
pushq $0x19
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x51d0
movq (%r14), %rcx
leaq 0x8925(%rip), %rdi      # 0xf5b2
pushq $0x36
popq %rsi
movq %rbx, %rdx
callq 0x51d0
movq (%r14), %rcx
leaq 0x8947(%rip), %rdi      # 0xf5e9
pushq $0x1a
popq %rsi
movq %rbx, %rdx
callq 0x51d0
movq (%r14), %rcx
leaq 0x894d(%rip), %rdi      # 0xf604
pushq $0x32
popq %rsi
movq %rbx, %rdx
callq 0x51d0
movq (%r14), %rcx
leaq 0x896b(%rip), %rdi      # 0xf637
pushq $0x11
popq %rsi
movq %rbx, %rdx
callq 0x51d0
leaq 0xe922(%rip), %r15      # 0x15600
leaq 0x8964(%rip), %rbx      # 0xf649
xorl %r12d, %r12d
cmpq $0x58, %r12
je 0x6d05
movq (%r14), %rdi
movq (%r12,%r15), %rdx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5130
addq $0x8, %r12
jmp 0x6ce8
pushq $0x1
popq %rdi
callq 0x51c0
// File: /workspace/github_c_makefile_star2_O2/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), %rax
leal 0x1(%rax), %edi
movl %edi, 0x40(%rbx)
movq %rax, %r14
shlq $0x4, %r14
movq 0x58(%rbx), %rdi
testq %rax, %rax
jle 0x8bed
cmpl %esi, -0x8(%rdi,%r14)
jle 0x8bed
movups -0x10(%rdi,%r14), %xmm0
addq %r14, %rdi
movups %xmm0, (%rdi)
decq %rax
addq $-0x10, %r14
jmp 0x8bc8
movl %esi, 0x8(%rdi,%r14)
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x6bdf
movq 0x58(%rbx), %rcx
movq %rax, (%rcx,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/zenkj[P]luajit-arm64/src/host/buildvm.c
// Function: lower
static const char *lower(char *buf, const char *s)
{
  char *p = buf;
  while (*s) {
    *p++ = (*s >= 'A' && *s <= 'Z') ? *s+0x20 : *s;
    s++;
  }
  *p = '\0';
  return buf;
}

// Assembly:
movq %rdi, %rax
xorl %ecx, %ecx
movb (%rsi,%rcx), %dl
testb %dl, %dl
je 0x8c3a
leal -0x41(%rdx), %edi
leal 0x20(%rdx), %r8d
cmpb $0x1a, %dil
movzbl %dl, %edx
movzbl %r8b, %edi
cmovael %edx, %edi
movb %dil, (%rax,%rcx)
incq %rcx
jmp 0x8c15
movb $0x0, (%rax,%rcx)
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x8fdb
movl %ecx, %ebp
cmpl $0x1, %eax
je 0x8f94
testl %eax, %eax
jne 0x8f8f
movl %edx, %r10d
movq 0x10(%r14), %rdi
testl %ebp, %ebp
leaq 0x7fbb(%rip), %rax      # 0x10f1c
leaq 0x7c43(%rip), %r9       # 0x10bab
cmoveq %rax, %r9
subq $0x8, %rsp
leaq 0x7f6b(%rip), %rsi      # 0x10ee2
movq %rbx, %rdx
movq %rbx, %rcx
movq %rbx, %r8
xorl %eax, %eax
pushq %rbx
pushq %r10
pushq %rbx
callq 0x5130
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x10(%r14), %rdi
leaq 0x7f84(%rip), %rsi      # 0x10f23
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5130
testl %ebp, %ebp
je 0x8fc2
movq 0x10(%r14), %rdi
leaq 0x7f78(%rip), %rsi      # 0x10f30
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5130
movq 0x10(%r14), %rdi
leaq 0x7f4a(%rip), %rsi      # 0x10f17
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x5130
movq 0x10(%r14), %rdi
leaq 0x7f6e(%rip), %rsi      # 0x10f54
movq %rbx, %rdx
movq %rbx, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x5130
// File: /workspace/github_c_makefile_star2_O2/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 %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
movl $0x0, %ebp
movl %edx, 0x4(%rsp)
cmovgl %edx, %ebp
leaq 0x7fd5(%rip), %r12      # 0x10ff2
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x9068
movl %r13d, %r15d
movq 0x10(%rbx), %rdi
movzbl (%r14,%r13), %edx
andl $0xf, %r15d
je 0x9055
movq %r12, %rsi
xorl %eax, %eax
callq 0x5130
cmpl $0xf, %r15d
jne 0x9063
movq 0x10(%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x5120
jmp 0x9063
leaq 0x7f8c(%rip), %rsi      # 0x10fe8
xorl %eax, %eax
callq 0x5130
incq %r13
jmp 0x9020
testb $0xf, 0x4(%rsp)
je 0x9089
movq 0x10(%rbx), %rsi
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5120
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, %ebp
movl %r8d, 0x4(%rsp)
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
movq %rsi, %rdi
callq 0x50a0
movq %rax, %r13
movq 0xcc26(%rip), %r14      # 0x161b8
testq %r14, %r14
je 0x95c4
cmpq $0x8, %r13
ja 0x95e4
leaq 0x14(%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x5140
leaq (%rsp,%r13), %rdi
addq $0x14, %rdi
pushq $0x8
popq %rdx
subq %r13, %rdx
xorl %esi, %esi
callq 0x50c0
jmp 0x9623
cmpq $0x9, %r13
jb 0x9651
movq 0xcbeb(%rip), %rax      # 0x161c0
addq %r13, %rax
incq %rax
movq %rax, 0xcbde(%rip)      # 0x161c0
jmp 0x9651
andl $0x0, 0x14(%rsp)
movl %ebp, (%rsp)
movq 0xcbcd(%rip), %rbp      # 0x161c0
movl %ebp, 0x18(%rsp)
addq %rbp, %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x5140
movb $0x0, (%r13,%r14)
leaq 0x1(,%rbp), %rax
addq %r13, %rax
movl (%rsp), %ebp
movq %rax, 0xcb9d(%rip)      # 0x161c0
leaq 0x14(%rsp), %rsi
movl %r12d, 0x8(%rsi)
incl %r15d
movw %r15w, 0xc(%rsi)
movl 0x4(%rsp), %eax
movw %ax, 0xe(%rsi)
movb %bpl, 0x10(%rsi)
movb $0x0, 0x11(%rsi)
pushq $0x12
popq %rdx
movq 0x8(%rsp), %rdi
callq 0x6149
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0xcb50(%rip)      # 0x161b8
je 0x96db
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %eax
imulq $0x28, %rax, %r12
movq (%rsi,%r12), %rax
movq %rsp, %rsi
movq %rax, (%rsi)
andl $0x0, 0x8(%rsi)
incl %edx
movw %dx, 0xc(%rsi)
movl $0x1030000, 0xe(%rsi)   # imm = 0x1030000
pushq $0x12
popq %r15
movq %r15, %rdx
callq 0x6149
xorps %xmm0, %xmm0
leaq 0x14(%rsp), %rsi
movups %xmm0, 0x4(%rsi)
movl 0x10(%r14,%r12), %eax
movl %eax, (%rsi)
movzwl 0x20(%r14,%r12), %eax
movw %ax, 0x4(%rsi)
movq %rbx, %rdi
movq %r15, %rdx
callq 0x6149
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xc6d2(%rip), %eax      # 0x161dc
testl %eax, %eax
je 0x9bfc
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
cmpl $0x1, %eax
jne 0x9b3e
movq 0x10(%rbx), %rcx
leaq 0x7925(%rip), %rdi      # 0x11458
pushq $0x12
popq %rsi
pushq $0x1
popq %rdx
callq 0x51d0
movq 0x10(%rbx), %rcx
leaq 0x7922(%rip), %rdi      # 0x1146b
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
callq 0x51d0
movq 0x10(%rbx), %rdi
leaq 0x7911(%rip), %rsi      # 0x11470
leaq 0x792b(%rip), %rdx      # 0x11491
leaq 0xe693(%rip), %rcx      # 0x18200
xorl %eax, %eax
callq 0x5130
movq %rsp, %r14
movb $0x0, (%r14)
leaq 0xc66e(%rip), %r13      # 0x161f0
leaq 0x7915(%rip), %r15      # 0x1149e
leaq 0x5abb(%rip), %r12      # 0xf64b
xorl %ebp, %ebp
cmpq 0xe657(%rip), %r13      # 0x181f0
jae 0x9bd4
movslq %ebp, %rbp
leaq (%rsp,%rbp), %rdi
movzbl (%r13), %edx
movq %r15, %rsi
xorl %eax, %eax
callq 0x51b0
addl %eax, %ebp
cmpl $0x4b, %ebp
jl 0x9bcf
movq 0x10(%rbx), %rdi
xorl %ebp, %ebp
movq %r12, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x5130
movb $0x0, (%rsp)
incq %r13
jmp 0x9b92
movq 0x10(%rbx), %rdi
leaq 0x78c3(%rip), %rsi      # 0x114a2
movq %rsp, %rdx
movl $0xff, %ecx
xorl %eax, %eax
callq 0x5130
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x9ca1
movq %rdi, %r14
callq 0x9b04
movb 0xc5b3(%rip), %al       # 0x161d0
movb %al, 0xc5cd(%rip)       # 0x161f0
movb 0xc5af(%rip), %al       # 0x161d8
movb %al, 0xc5c2(%rip)       # 0x161f1
leaq 0xc5bd(%rip), %rax      # 0x161f3
movq %rax, 0xe5b3(%rip)      # 0x181f0
movb $0x0, 0xc5ae(%rip)      # 0x161f2
movl $0x1, 0xc58e(%rip)      # 0x161dc
movq 0x10(%r14), %rdi
leaq 0x7655(%rip), %rsi      # 0x112ae
leaq 0x74fa(%rip), %r15      # 0x1115a
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x5130
movq 0x10(%r14), %rdi
leaq 0x764a(%rip), %rsi      # 0x112c2
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x5130
movq 0x10(%r14), %rdi
leaq 0x7646(%rip), %rsi      # 0x112d6
leaq 0x7666(%rip), %rdx      # 0x112fd
movq %rbx, %rcx
xorl %eax, %eax
callq 0x5130
movq %rbx, %rdi
callq 0x50a0
movq %rax, 0xe548(%rip)      # 0x181f8
cmpq $0x50, %rax
jae 0x9cca
leaq 0xe543(%rip), %rdi      # 0x18200
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x5060
movq 0xc327(%rip), %rax      # 0x15ff8
movq (%rax), %rdi
leaq 0x762d(%rip), %rsi      # 0x11308
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5130
pushq $0x1
popq %rdi
callq 0x51c0
// File: /workspace/github_c_makefile_star2_O2/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 0x9ff0
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc255(%rip), %eax      # 0x161d4
leaq 0x7486(%rip), %r15      # 0x1140c
pushq $0x3
popq %r12
pushq $0x1
popq %r13
incl %eax
movl 0xc23a(%rip), %ecx      # 0x161d0
cmpl %ecx, %eax
jge 0x9fbc
movq 0x10(%rbx), %rcx
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x51d0
movl 0xc222(%rip), %eax      # 0x161d4
incl %eax
movl %eax, 0xc21a(%rip)      # 0x161d4
jmp 0x9f8e
movl %ecx, 0xc212(%rip)      # 0x161d4
cmpb $0x2e, (%r14)
leaq 0xe283(%rip), %r15      # 0x18250
cmovneq %r14, %r15
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x50b0
testq %rax, %rax
je 0x9fff
movq %rax, %rcx
incq %rcx
movq %rcx, (%rsp)
movb $0x0, (%rax)
jmp 0xa007
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, (%rsp)
pushq $0x2
popq %rbp
xorl %r13d, %r13d
leaq 0xc1dc(%rip), %r14      # 0x161f0
leaq (%r14,%r13), %r12
cmpb $0x0, (%r13,%r14)
je 0xa041
movq %r12, %rdi
movq %r15, %rsi
callq 0x5110
testl %eax, %eax
je 0xa05f
movq %r12, %rdi
callq 0x50a0
addq %rax, %r13
incq %r13
incl %ebp
jmp 0xa014
movq %r15, %rdi
callq 0x50a0
addq %r13, %rax
cmpq $0x1fff, %rax           # imm = 0x1FFF
jge 0xa0a8
movq %r12, %rdi
movq %r15, %rsi
callq 0x5060
movq 0x10(%rbx), %rdi
movq (%rsp), %rcx
testq %rcx, %rcx
je 0xa08a
leaq 0x739d(%rip), %rsi      # 0x11410
movl %ebp, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5130
leaq 0x738f(%rip), %rsi      # 0x11420
movl %ebp, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5130
movq 0xbf49(%rip), %rax      # 0x15ff8
movq (%rax), %rcx
leaq 0x729f(%rip), %rdi      # 0x11358
pushq $0x1e
popq %rsi
pushq $0x1
popq %rdx
callq 0x51d0
pushq $0x1
popq %rdi
callq 0x51c0
// File: /workspace/github_c_makefile_star2_O2/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 0xa2a0
cmpb $0x21, (%rsi)
jne 0xa273
cmpb $0x0, 0x1(%rsi)
jne 0xa273
movb $0x0, (%rsi)
pushq %rax
movq %rsi, %rdi
movl $0xc0, %esi
callq 0xa2a8
movq 0xdf68(%rip), %rax      # 0x181f0
leaq 0x1(%rax), %rcx
movq %rcx, 0xdf5d(%rip)      # 0x181f0
movb $-0x6, (%rax)
incb 0xbf56(%rip)            # 0x161f2
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xa2f9
movq 0xdf2d(%rip), %r15      # 0x181f8
cmpq %r15, %r14
jbe 0xa2f9
cmpb $0x5f, (%rbx,%r15)
jne 0xa2f9
leaq 0xdf22(%rip), %rsi      # 0x18200
movq %rbx, %rdi
movq %r15, %rdx
callq 0x5050
testl %eax, %eax
jne 0xa2f9
addq %r15, %rbx
incq %rbx
incq %r15
subq %r15, %r14
cmpq $0x3a, %r14
jae 0xa348
movq 0xdeea(%rip), %rax      # 0x181f0
leaq (%rax,%r14), %rcx
addq $0x3, %rcx
leaq 0xdedb(%rip), %rdx      # 0x181f0
cmpq %rdx, %rcx
ja 0xa365
leaq 0x1(%rax), %rdi
leaq (%rax,%r14), %r15
incq %r15
orl %r14d, %ebp
movb %bpl, (%rax)
movq %rbx, %rsi
movq %r14, %rdx
callq 0x5140
movq %r15, 0xdeb3(%rip)      # 0x181f0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0xbca9(%rip), %rax      # 0x15ff8
movq (%rax), %rdi
leaq 0x7069(%rip), %rsi      # 0x113c2
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5130
jmp 0xa381
movq 0xbc8c(%rip), %rax      # 0x15ff8
movq (%rax), %rcx
leaq 0x6fe2(%rip), %rdi      # 0x11358
pushq $0x1e
popq %rsi
pushq $0x1
popq %rdx
callq 0x51d0
pushq $0x1
popq %rdi
callq 0x51c0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 %esi, %r14d
movq %rdi, %r15
movl %edx, 0xc(%rsp)
movl %edx, %eax
andl $0x1f, %eax
movl %eax, 0x10(%rsp)
testl %ecx, %ecx
je 0xaa67
cmpl $0x0, 0x10(%rsp)
sete %al
cmpl $0x20, 0xc(%rsp)
setb %dl
xorl %ecx, %ecx
orb %al, %dl
jne 0xab59
movl %r14d, %eax
leaq 0x4(,%rax,4), %rdx
movq %r15, %rdi
movl $0xff, %esi
callq 0x50c0
leal -0x1(%r14), %eax
movl %eax, 0x14(%rsp)
movl 0xd81a(%rip), %r9d      # 0x182a8
movl 0xc(%rsp), %esi
shrl $0x5, %esi
shlq $0x2, %r9
xorl %r10d, %r10d
leaq 0xd80d(%rip), %rbp      # 0x182b0
cmpq %r10, %r9
je 0xab56
movl (%r10,%rbp), %r11d
movl %r11d, %edx
andl $0xffffff, %edx         # imm = 0xFFFFFF
movl %edx, %eax
movl %esi, %ecx
testl %ebx, %ebx
je 0xaacd
roll %cl, %eax
subl %edx, %eax
movl 0xc(%rsp), %ecx
roll %cl, %eax
jmp 0xaad7
shll %cl, %eax
subl %edx, %eax
movl 0x10(%rsp), %ecx
shll %cl, %eax
xorl %edx, %edx
divl %r14d
movl %edx, %edi
cmpl $-0x1, (%r15,%rdi,4)
je 0xab28
movl %edi, %eax
leaq (%r15,%rax,4), %r8
addq $0x4, %r8
movl (%r8), %r13d
cmpl $-0x1, %r13d
je 0xab4a
xorl %ecx, %ecx
cmpl 0x14(%rsp), %edi
jae 0xab59
movslq %edi, %r12
cmpl $-0x1, 0x8(%r15,%r12,4)
jne 0xab59
movl %r13d, %edx
andl $0xffffff, %edx         # imm = 0xFFFFFF
movl %edx, %eax
movl %esi, %ecx
testl %ebx, %ebx
je 0xab2e
roll %cl, %eax
subl %edx, %eax
movl 0xc(%rsp), %ecx
roll %cl, %eax
jmp 0xab38
leaq (%r15,%rdi,4), %r8
jmp 0xab4a
shll %cl, %eax
subl %edx, %eax
movl 0x10(%rsp), %ecx
shll %cl, %eax
incl %edi
xorl %ecx, %ecx
xorl %edx, %edx
divl %r14d
cmpl %edi, %edx
jne 0xab59
movl %r13d, 0x8(%r15,%r12,4)
movl %r11d, (%r8)
addq $0x4, %r10
jmp 0xaaa3
pushq $0x1
popq %rcx
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_O2/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, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rdi
incl %ebx
movl (%rsi), %ecx
leaq 0x6b0a(%rip), %rsi      # 0x11694
movl %ebx, %edx
xorl %eax, %eax
callq 0x5130
pushq $0x1
popq %r13
leaq 0x6b25(%rip), %r12      # 0x116c3
movq 0x10(%r15), %rcx
cmpq %r13, %rbx
je 0xabbd
movl (%r14,%r13,4), %edx
movq %rcx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x5130
incq %r13
jmp 0xab9e
leaq 0x6663(%rip), %rdi      # 0x11227
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x51d0
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
pushq $0x58
popq %rdi
callq 0x10f0
movq %rax, %rbx
testq %rax, %rax
je 0x12e0
cmpq $0x40, %r14
jae 0x12fa
testq %r14, %r14
je 0x1313
andq $0x0, (%rbx)
movl %r14d, 0x8(%rbx)
movq %rbx, %rdi
addq $0x18, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1050
movb $0x0, 0x18(%rbx,%r14)
movl %ebp, 0xc(%rbx)
andq $0x0, 0x10(%rbx)
jmp 0x12ec
leaq 0x2083(%rip), %rdi      # 0x336a
callq 0x1070
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1df4(%rip), %rdi      # 0x30f5
leaq 0x1cfc(%rip), %rsi      # 0x3004
leaq 0x1d07(%rip), %rcx      # 0x3016
pushq $0x1c
jmp 0x132a
leaq 0x1d36(%rip), %rdi      # 0x3050
leaq 0x1ce3(%rip), %rsi      # 0x3004
leaq 0x1cee(%rip), %rcx      # 0x3016
pushq $0x1d
popq %rdx
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/stevenmherring[P]DNS/sequential-trie.c
// Function: compare_keys
int compare_keys (const char *string1, int len1, const char *string2, int len2, int *pKeylen) {
  int keylen, offset1, offset2;
  keylen = len1 < len2 ? len1 : len2;
  offset1 = len1 - keylen;
  offset2 = len2 - keylen;
  assert (keylen > 0);
  if (pKeylen)
  *pKeylen = keylen;
  return strncmp(&string1[offset1], &string2[offset2], keylen);
}

// Assembly:
cmpl %ecx, %esi
movl %ecx, %eax
cmovll %esi, %eax
testl %eax, %eax
jle 0x1360
testq %r8, %r8
je 0x1343
movl %eax, (%r8)
subl %eax, %ecx
subl %eax, %esi
movslq %esi, %rsi
addq %rsi, %rdi
movslq %ecx, %rcx
addq %rcx, %rdx
movl %eax, %eax
movq %rdx, %rsi
movq %rax, %rdx
jmp 0x1060
pushq %rax
leaq 0x1cf3(%rip), %rdi      # 0x305b
leaq 0x1c95(%rip), %rsi      # 0x3004
leaq 0x1cf0(%rip), %rcx      # 0x3066
pushq $0x2d
popq %rdx
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/stevenmherring[P]DNS/sequential-trie.c
// Function: search
struct trie_node *
_search (struct trie_node *node, const char *string, size_t strlen) {

  int keylen, cmp;

  // First things first, check if we are NULL
  if (node == NULL) return NULL;

  assert(node->strlen < 64);

  // See if this key is a substring of the string passed in
  cmp = compare_keys(node->key, node->strlen, string, strlen, &keylen);
  if (cmp == 0) {
    // Yes, either quit, or recur on the children

    // If this key is longer than our search string, the key isn't here
    if (node->strlen > keylen) {
      return NULL;
    } else if (strlen > keylen) {
      // Recur on children list
      return _search(node->children, string, strlen - keylen);
    } else {
      assert (strlen == keylen);

      return node;
    }

  } else if (cmp < 0) {
    // No, look right (the node's key is "less" than the search key)
    return _search(node->next, string, strlen);
  } else {
    // Quit early
    return 0;
  }

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x13e9
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdi), %esi
cmpl $0x40, %esi
jae 0x1415
movq %rdx, %r14
leaq 0x18(%rbx), %rdi
leaq 0xc(%rsp), %r8
movq %r15, %rdx
movl %r14d, %ecx
callq 0x1330
testl %eax, %eax
je 0x13df
jns 0x13e9
movq (%rbx), %rdi
jmp 0x13f6
movslq 0xc(%rsp), %rax
cmpl %eax, 0x8(%rbx)
jbe 0x13ed
xorl %ebx, %ebx
jmp 0x1408
subq %rax, %r14
jbe 0x1406
movq 0x10(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x13a1
movq %rax, %rbx
jmp 0x1408
jne 0x1432
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1cd3(%rip), %rdi      # 0x30ef
leaq 0x1be1(%rip), %rsi      # 0x3004
leaq 0x1cd7(%rip), %rcx      # 0x3101
pushq $0x47
popq %rdx
callq 0x1090
leaq 0x1d0c(%rip), %rdi      # 0x3145
leaq 0x1bc4(%rip), %rsi      # 0x3004
leaq 0x1cba(%rip), %rcx      # 0x3101
pushq $0x55
jmp 0x142c
// File: /workspace/github_c_makefile_star2_O2/stevenmherring[P]DNS/sequential-trie.c
// Function: search
int search  (const char *string, size_t strlen, int32_t *ip4_address) {
  struct trie_node *found;

  // Skip strings of length 0
  if (strlen == 0)
  return 0;

  found = _search(root, string, strlen);

  if (found && ip4_address)
  *ip4_address = found->ip4_address;

  return (found != NULL);
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rdx
testq %rsi, %rsi
je 0x1485
movq %rdi, %rsi
movq 0x4c87(%rip), %rdi      # 0x60e8
callq 0x13a1
testq %rax, %rax
sete %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x147b
movl 0xc(%rax), %ecx
movl %ecx, (%rbx)
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
jmp 0x1487
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stevenmherring[P]DNS/sequential-trie.c
// Function: insert
int insert (const char *string, size_t strlen, int32_t ip4_address) {
          // Skip strings of length 0
          //int rv;
          while(allow_squatting && search(string, strlen, &ip4_address)) {
            printf("Thread: %ld entered the squatting deadlock\n", pthread_self());
            pthread_testcancel();
            //rv = pthread_cond_wait(&cv, &lock);
            //assert(rv == 0);
          }
          if (strlen == 0)
          return 0;

          /* Edge case: root is null */
          if (root == NULL) {
            root = new_leaf (string, strlen, ip4_address);
            return 1;
          }
          return _insert (string, strlen, ip4_address, root, NULL, NULL);
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xc(%rsp), %r15
movl %edx, (%r15)
leaq 0x482f(%rip), %r13      # 0x60f0
leaq 0x195a(%rip), %r12      # 0x3222
cmpl $0x0, (%r13)
je 0x18fa
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x144b
testl %eax, %eax
je 0x18fa
callq 0x1110
movq %r12, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x1080
callq 0x10c0
jmp 0x18c8
testq %rbx, %rbx
je 0x1922
movq 0x47e2(%rip), %rcx      # 0x60e8
movl 0xc(%rsp), %edx
movq %r14, %rdi
movq %rbx, %rsi
testq %rcx, %rcx
je 0x1926
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x148b
jmp 0x1935
xorl %eax, %eax
jmp 0x1935
callq 0x128c
movq %rax, 0x47b6(%rip)      # 0x60e8
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq