LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: lua_objlen
static size_t lua_objlen(lua_State*L,int idx){
StkId o=index2adr(L,idx);
switch(ttype(o)){
case 4:return tsvalue(o)->len;
case 7:return uvalue(o)->len;
case 5:return luaH_getn(hvalue(o));
case 3:{
size_t l;
l=(luaV_tostring(L,o)?tsvalue(o)->len:0);
return l;
}
default:return 0;
}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x975f
movq %rax, %rbx
movl 0x8(%rax), %ecx
xorl %eax, %eax
addl $-0x3, %ecx
cmpl $0x4, %ecx
ja 0xfa89
leaq 0x4923(%rip), %rdx      # 0x14374
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5064
testl %eax, %eax
je 0xfa87
movq (%rbx), %rax
movq 0x10(%rax), %rax
jmp 0xfa89
movq (%rbx), %rdi
callq 0x72f1
cltq
jmp 0xfa89
movq (%rbx), %rax
movq 0x20(%rax), %rax
jmp 0xfa89
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: lua_checkstack
static int lua_checkstack(lua_State*L,int size){
int res=1;
if(size>8000||(L->top-L->base+size)>8000)
res=0;
else if(size>0){
luaD_checkstack(L,size);
if(L->ci->top<L->top+size)
L->ci->top=L->top+size;
}
return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
cmpl $0x1f40, %esi           # imm = 0x1F40
jg 0xfaf9
movq %rdi, %r14
movq 0x10(%rdi), %rax
movq %rax, %rcx
subq 0x18(%rdi), %rcx
sarq $0x4, %rcx
movslq %esi, %r15
addq %r15, %rcx
cmpq $0x1f40, %rcx           # imm = 0x1F40
jg 0xfaf9
movl $0x1, %ebx
testl %esi, %esi
jle 0xfaf9
movq 0x38(%r14), %rcx
subq %rax, %rcx
movl %esi, %eax
shll $0x4, %eax
cmpq %rax, %rcx
jg 0xfae3
movq %r14, %rdi
callq 0x4d13
movq 0x28(%r14), %rax
shlq $0x4, %r15
addq 0x10(%r14), %r15
cmpq %r15, 0x10(%rax)
jae 0xfaf9
movq %r15, 0x10(%rax)
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: lua_rawgeti
static void lua_rawgeti(lua_State*L,int idx,int n){
StkId o;
o=index2adr(L,idx);
luai_apicheck(L,ttistable(o));
setobj(L,L->top,luaH_getnum(hvalue(o),n));
api_incr_top(L);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
callq 0x975f
movq (%rax), %rdi
movl %ebx, %esi
callq 0x76d7
movq 0x10(%r14), %rcx
movq (%rax), %rdx
movq %rdx, (%rcx)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rcx)
addq $0x10, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: lua_newuserdata
static void*lua_newuserdata(lua_State*L,size_t size){
Udata*u;
luaC_checkGC(L);
u=luaS_newudata(L,size,getcurrenv(L));
setuvalue(L,L->top,u);
api_incr_top(L);
return u+1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movq 0x78(%rax), %rcx
cmpq 0x70(%rax), %rcx
jb 0xfb57
movq %rbx, %rdi
callq 0x68ed
movq 0x28(%rbx), %rax
cmpq 0x50(%rbx), %rax
je 0xfb6e
movq 0x8(%rax), %rax
movq (%rax), %rax
addq $0x18, %rax
jmp 0xfb72
leaq 0x78(%rbx), %rax
movq (%rax), %r15
leaq 0x28(%r14), %rcx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x42ab
movq 0x20(%rbx), %rcx
movb 0x20(%rcx), %cl
andb $0x3, %cl
movb %cl, 0x9(%rax)
movb $0x7, 0x8(%rax)
movq %r14, 0x20(%rax)
movq $0x0, 0x10(%rax)
movq %r15, 0x18(%rax)
movq 0x20(%rbx), %rcx
movq 0xb0(%rcx), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq 0x20(%rbx), %rcx
movq 0xb0(%rcx), %rcx
movq %rax, (%rcx)
movq 0x10(%rbx), %rcx
movq %rax, (%rcx)
movl $0x7, 0x8(%rcx)
addq $0x10, 0x10(%rbx)
addq $0x28, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: tconcat
static int tconcat(lua_State*L){
luaL_Buffer b;
size_t lsep;
int i,last;
const char*sep=luaL_optlstring(L,2,"",&lsep);
luaL_checktype(L,1,5);
i=luaL_optint(L,3,1);
last=luaL_opt(L,luaL_checkint,4,luaL_getn(L,1));
luaL_buffinit(L,&b);
for(;i<last;i++){
addfield(L,&b,i);
luaL_addlstring(&b,sep,lsep);
}
if(i==last)
addfield(L,&b,i);
luaL_pushresult(&b);
return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2020, %rsp           # imm = 0x2020
movq %rdi, %rbx
leaq 0x4cff(%rip), %rdx      # 0x148fb
movq %rsp, %rcx
movl $0x2, %esi
callq 0xa10c
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
movl $0x5, %edx
callq 0xf886
movl $0x1, %edx
movq %rbx, %rdi
movl $0x3, %esi
callq 0xa737
movq %rax, %r15
movq 0x18(%rbx), %rax
leaq 0x30(%rax), %rcx
cmpq 0x10(%rbx), %rcx
setae %dl
leaq 0x47d7(%rip), %rsi      # 0x14420
cmpq %rsi, %rcx
sete %cl
orb %dl, %cl
jne 0xfc68
cmpl $0x0, 0x38(%rax)
jle 0xfc68
movq %rbx, %rdi
movl $0x4, %esi
callq 0xa770
jmp 0xfc75
movq %rbx, %rdi
movl $0x1, %esi
callq 0xfa2e
movq %rax, %r12
leaq 0x20(%rsp), %rax
movq %rbx, -0x8(%rax)
movq %rax, -0x18(%rax)
movl $0x0, -0x10(%rax)
cmpl %r12d, %r15d
jge 0xfcbb
leaq 0x8(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0xff33
movq (%rsp), %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0xffb1
incl %r15d
cmpl %r15d, %r12d
jne 0xfc96
cmpl %r12d, %r15d
jne 0xfcd0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0xff33
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x1008f
movq 0x10(%rbx), %rdi
movl 0x8(%rbx), %esi
callq 0xa57b
movl $0x1, %eax
addq $0x2020, %rsp           # imm = 0x2020
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: tinsert
static int tinsert(lua_State*L){
int e=aux_getn(L,1)+1;
int pos;
switch(lua_gettop(L)){
case 2:{
pos=e;
break;
}
case 3:{
int i;
pos=luaL_checkint(L,2);
if(pos>e)e=pos;
for(i=e;i>pos;i--){
lua_rawgeti(L,1,i-1);
lua_rawseti(L,1,i);
}
break;
}
default:{
return luaL_error(L,"wrong number of arguments to "LUA_QL("insert"));
}
}
luaL_setn(L,1,e);
lua_rawseti(L,1,pos);
return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
movl $0x5, %edx
callq 0xf886
movq %rbx, %rdi
movl $0x1, %esi
callq 0xfa2e
movq %rax, %r14
movq 0x10(%rbx), %rax
subq 0x18(%rbx), %rax
shrq $0x4, %rax
cmpl $0x2, %eax
je 0xfd84
cmpl $0x3, %eax
jne 0xfda7
movq %rbx, %rdi
movl $0x2, %esi
callq 0xa770
movq %rax, %r15
cmpl %r15d, %r14d
jl 0xfd8a
leal 0x1(%r14), %ebp
movq %rbx, %rdi
movl $0x1, %esi
movl %r14d, %edx
callq 0xfb01
movq %rbx, %rdi
movl $0x1, %esi
movl %ebp, %edx
callq 0x3933
leal -0x1(%r14), %eax
cmpl %r15d, %r14d
movl %eax, %r14d
jg 0xfd53
jmp 0xfd8a
incl %r14d
movl %r14d, %r15d
movq %rbx, %rdi
movl $0x1, %esi
movl %r15d, %edx
callq 0x3933
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x516a(%rip), %rsi      # 0x14f18
movq %rbx, %rdi
xorl %eax, %eax
callq 0xa049
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: tremove
static int tremove(lua_State*L){
int e=aux_getn(L,1);
int pos=luaL_optint(L,2,e);
if(!(1<=pos&&pos<=e))
return 0;
luaL_setn(L,1,e-1);
lua_rawgeti(L,1,pos);
for(;pos<e;pos++){
lua_rawgeti(L,1,pos+1);
lua_rawseti(L,1,pos);
}
lua_pushnil(L);
lua_rawseti(L,1,e);
return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
movl $0x5, %edx
callq 0xf886
movq %rbx, %rdi
movl $0x1, %esi
callq 0xfa2e
movq %rax, %r14
movslq %r14d, %r12
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0xa737
movq %rax, %r15
testl %r15d, %r15d
setle %al
cmpl %r12d, %r15d
setg %cl
xorl %ebp, %ebp
orb %al, %cl
jne 0xfe73
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
movl %r15d, %edx
callq 0xfb01
cmpl %r14d, %r15d
jge 0xfe50
leal 0x1(%r15), %r12d
movq %rbx, %rdi
movl $0x1, %esi
movl %r12d, %edx
callq 0xfb01
movq %rbx, %rdi
movl $0x1, %esi
movl %r15d, %edx
callq 0x3933
movl %r12d, %r15d
cmpl %r12d, %r14d
jne 0xfe24
movq 0x10(%rbx), %rax
movl $0x0, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
movl %r14d, %edx
callq 0x3933
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: sort
static int sort(lua_State*L){
int n=aux_getn(L,1);
luaL_checkstack(L,40,"");
if(!lua_isnoneornil(L,2))
luaL_checktype(L,2,6);
lua_settop(L,2);
auxsort(L,1,n);
return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
movl $0x5, %edx
callq 0xf886
movq %rbx, %rdi
movl $0x1, %esi
callq 0xfa2e
movq %rax, %r14
leaq 0x4a50(%rip), %rdx      # 0x148fb
movq %rbx, %rdi
movl $0x28, %esi
callq 0x10148
movq 0x18(%rbx), %rax
leaq 0x10(%rax), %rcx
cmpq 0x10(%rbx), %rcx
setae %dl
leaq 0x4552(%rip), %rsi      # 0x14420
cmpq %rsi, %rcx
sete %cl
orb %dl, %cl
jne 0xfef0
cmpl $0x0, 0x18(%rax)
jle 0xfef0
movq %rbx, %rdi
movl $0x2, %esi
movl $0x6, %edx
callq 0xf886
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rax
addq $0x20, %rax
cmpq %rax, %rcx
jae 0xff15
movl $0x0, 0x8(%rcx)
addq $0x10, %rcx
cmpq %rax, %rcx
jb 0xff01
movq %rcx, 0x10(%rbx)
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
movl %r14d, %edx
callq 0x10177
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: addfield
static void addfield(lua_State*L,luaL_Buffer*b,int i){
lua_rawgeti(L,1,i);
if(!lua_isstring(L,-1))
luaL_error(L,"invalid value (%s) at index %d in table for "
LUA_QL("concat"),luaL_typename(L,-1),i);
luaL_addvalue(b);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl $0x1, %esi
callq 0xfb01
movq 0x10(%r14), %rcx
leaq -0x10(%rcx), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq 0x44c2(%rip), %rsi      # 0x14420
cmpq %rsi, %rdx
je 0xff83
movl -0x8(%rcx), %edi
addl $-0x5, %edi
cmpl $-0x3, %edi
jbe 0xff7b
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1000d
cmpq %rsi, %rdx
je 0xff83
movl -0x8(%rcx), %eax
cmpl $-0x1, %eax
jne 0xff91
leaq 0x4aa7(%rip), %rdx      # 0x14a36
jmp 0xff9e
cltq
leaq 0xa8c6(%rip), %rcx      # 0x1a860
movq (%rcx,%rax,8), %rdx
leaq 0x4f3e(%rip), %rsi      # 0x14ee3
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0xa049
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: luaL_addvalue
static void luaL_addvalue(luaL_Buffer*B){
lua_State*L=B->L;
size_t vl;
const char*s=lua_tolstring(L,-1,&vl);
if(vl<=bufffree(B)){
memcpy(B->p,s,vl);
B->p+=vl;
lua_pop(L,1);
}
else{
if(emptybuffer(B))
lua_insert(L,-2);
B->lvl++;
adjuststack(B);
}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x3c5a
movq (%r15), %rdx
movq (%rbx), %rdi
movq %rbx, %rcx
subq %rdi, %rcx
addq $0x2018, %rcx           # imm = 0x2018
cmpq %rcx, %rdx
jbe 0x10070
movq %rbx, %rdi
callq 0x1008f
testl %eax, %eax
je 0x10063
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xa80f
incl 0x8(%rbx)
movq %rbx, %rdi
callq 0x100c5
jmp 0x10085
movq %rax, %rsi
callq 0x31b0
movq 0x8(%rsp), %rax
addq %rax, (%rbx)
addq $-0x10, 0x10(%r14)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: emptybuffer
static int emptybuffer(luaL_Buffer*B){
size_t l=bufflen(B);
if(l==0)return 0;
else{
lua_pushlstring(B->L,B->buffer,l);
B->p=B->buffer;
B->lvl++;
return 1;
}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rdx
leaq 0x18(%rdi), %r14
subq %r14, %rdx
je 0x100bb
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq %r14, %rsi
callq 0x90a1
movq %r14, (%rbx)
incl 0x8(%rbx)
movl $0x1, %eax
jmp 0x100bd
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: adjuststack
static void adjuststack(luaL_Buffer*B){
if(B->lvl>1){
lua_State*L=B->L;
int toget=1;
size_t toplen=lua_strlen(L,-1);
do{
size_t l=lua_strlen(L,-(toget+1));
if(B->lvl-toget+1>=(20/2)||toplen>l){
toplen+=l;
toget++;
}
else break;
}while(toget<B->lvl);
lua_concat(L,toget);
B->lvl=B->lvl-toget+1;
}
}

// Assembly:
cmpl $0x2, 0x8(%rdi)
jl 0x10147
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xfa2e
movq %rax, %r15
movl $0x1, %ebp
xorl %r12d, %r12d
movl %ebp, %esi
notl %esi
movq %r14, %rdi
callq 0xfa2e
movl 0x8(%rbx), %ecx
movl %ecx, %edx
subl %ebp, %edx
cmpl $0x9, %edx
setge %dl
cmpq %rax, %r15
seta %sil
orb %dl, %sil
cmoveq %r12, %rax
movzbl %sil, %edx
addl %edx, %ebp
cmpb $0x1, %dl
jne 0x1012b
addq %rax, %r15
cmpl %ecx, %ebp
jl 0x100f2
movq %r14, %rdi
movl %ebp, %esi
callq 0xa57b
movl 0x8(%rbx), %eax
subl %ebp, %eax
incl %eax
movl %eax, 0x8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: sort_comp
static int sort_comp(lua_State*L,int a,int b){
if(!lua_isnil(L,2)){
int res;
lua_pushvalue(L,2);
lua_pushvalue(L,a-1);
lua_pushvalue(L,b-2);
lua_call(L,2,1);
res=lua_toboolean(L,-1);
lua_pop(L,1);
return res;
}
else
return lua_lessthan(L,a,b);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
addq $0x10, %rcx
cmpq %rax, %rcx
leaq 0x3f2e(%rip), %rdx      # 0x14420
cmovaeq %rdx, %rcx
cmpq %rdx, %rcx
je 0x10505
cmpl $0x0, 0x8(%rcx)
je 0x1059c
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
addq $0x10, 0x10(%rbx)
decl %esi
movq %rbx, %rdi
callq 0x975f
movq 0x10(%rbx), %rcx
movq (%rax), %rdx
movq %rdx, (%rcx)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rcx)
addq $0x10, 0x10(%rbx)
addl $-0x2, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x975f
movq 0x10(%rbx), %rcx
movq (%rax), %rdx
movq %rdx, (%rcx)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rcx)
movq 0x10(%rbx), %rsi
leaq 0x10(%rsi), %rax
movq %rax, 0x10(%rbx)
addq $-0x20, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x523c
movq 0x10(%rbx), %rcx
movl -0x8(%rcx), %eax
testl %eax, %eax
je 0x1058f
cmpl $0x1, %eax
jne 0x1058a
xorl %eax, %eax
cmpl $0x0, -0x10(%rcx)
setne %al
jmp 0x1058f
movl $0x1, %eax
addq $-0x10, %rcx
movq %rcx, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0x975f
movq %rax, %r14
movq %rbx, %rdi
movl %ebp, %esi
callq 0x975f
movq %rax, %rdx
leaq 0x3e65(%rip), %rax      # 0x14420
cmpq %rax, %r14
sete %cl
cmpq %rax, %rdx
sete %sil
xorl %eax, %eax
orb %cl, %sil
jne 0x10597
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x7410
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: io_fclose
static int io_fclose(lua_State*L){
FILE**p=tofilep(L);
int ok=(fclose(*p)==0);
*p=NULL;
return pushresult(L,ok,NULL);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x109ba
movq %rax, %r14
movq (%rax), %rdi
callq 0x30d0
xorl %esi, %esi
testl %eax, %eax
sete %sil
movq $0x0, (%r14)
movq %rbx, %rdi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10a99
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: lua_replace
static void lua_replace(lua_State*L,int idx){
StkId o;
if(idx==(-10001)&&L->ci==L->base_ci)
luaG_runerror(L,"no calling environment");
api_checknelems(L,1);
o=index2adr(L,idx);
api_checkvalidindex(L,o);
if(idx==(-10001)){
Closure*func=curr_func(L);
luai_apicheck(L,ttistable(L->top-1));
func->c.env=hvalue(L->top-1);
luaC_barrier(L,func,L->top-1);
}
else{
setobj(L,o,L->top-1);
if(idx<(-10002))
luaC_barrier(L,curr_func(L),L->top-1);
}
L->top--;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
jne 0x1066f
movq 0x28(%rbx), %rax
cmpq 0x50(%rbx), %rax
je 0x10719
movq %rbx, %rdi
movl %ebp, %esi
callq 0x975f
cmpl $0xffffd8ef, %ebp       # imm = 0xFFFFD8EF
jne 0x106ae
movq 0x10(%rbx), %rcx
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq -0x10(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq 0x10(%rbx), %rcx
cmpl $0x4, -0x8(%rcx)
jl 0x1070d
movq -0x10(%rcx), %rsi
testb $0x3, 0x9(%rsi)
jne 0x106e6
jmp 0x1070d
movq 0x10(%rbx), %rcx
movq -0x10(%rcx), %rdx
movq %rdx, (%rax)
movl -0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
cmpl $0xffffd8ed, %ebp       # imm = 0xFFFFD8ED
jg 0x1070d
movq 0x10(%rbx), %rax
cmpl $0x4, -0x8(%rax)
jl 0x1070d
movq -0x10(%rax), %rsi
testb $0x3, 0x9(%rsi)
je 0x1070d
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movb 0x9(%rax), %cl
testb $0x4, %cl
je 0x1070d
movq 0x20(%rbx), %rdi
cmpb $0x1, 0x21(%rdi)
jne 0x106ff
callq 0x4593
jmp 0x1070d
andb $-0x8, %cl
movb 0x20(%rdi), %dl
andb $0x3, %dl
orb %cl, %dl
movb %dl, 0x9(%rax)
addq $-0x10, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x48ec(%rip), %rsi      # 0x1500c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x46c4
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: createstdfile
static void createstdfile(lua_State*L,FILE*f,int k,const char*fname){
*newfile(L)=f;
if(k>0){
lua_pushvalue(L,-1);
lua_rawseti(L,(-10001),k);
}
lua_pushvalue(L,-2);
lua_setfenv(L,-2);
lua_setfield(L,-3,fname);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
callq 0x114f9
movq %r15, (%rax)
testl %ebp, %ebp
jle 0x10799
movq 0x10(%r14), %rax
movq -0x10(%rax), %rcx
movq %rcx, (%rax)
movl -0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
addq $0x10, 0x10(%r14)
movq %r14, %rdi
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
movl %ebp, %edx
callq 0x3933
movq 0x10(%r14), %rax
movq -0x20(%rax), %rcx
movq %rcx, (%rax)
movl -0x18(%rax), %ecx
movl %ecx, 0x8(%rax)
addq $0x10, 0x10(%r14)
movq %r14, %rdi
callq 0xf90a
movq %r14, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x39ab
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: lua_getfield
static void lua_getfield(lua_State*L,int idx,const char*k){
StkId t;
TValue key;
t=index2adr(L,idx);
api_checkvalidindex(L,t);
setsvalue(L,&key,luaS_new(L,k));
luaV_gettable(L,t,&key,L->top);
api_incr_top(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
callq 0x975f
movq %rax, %r15
movq %rbx, %rdi
callq 0x30e0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x412b
movq %rsp, %rdx
movq %rax, (%rdx)
movl $0x4, 0x8(%rdx)
movq 0x10(%r14), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x6e8f
addq $0x10, 0x10(%r14)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: io_pclose
static int io_pclose(lua_State*L){
FILE**p=tofilep(L);
int ok=lua_pclose(L,*p);
*p=NULL;
return pushresult(L,ok,NULL);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x109ba
movq $0x0, (%rax)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
popq %rbx
jmp 0x10a99
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: io_close
static int io_close(lua_State*L){
if(lua_isnone(L,1))
lua_rawgeti(L,(-10001),2);
tofile(L);
return aux_close(L);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
leaq 0x3bcb(%rip), %rcx      # 0x14420
cmpq %rcx, %rax
je 0x10866
cmpq 0x10(%rbx), %rax
jae 0x10866
cmpl $-0x1, 0x8(%rax)
jne 0x10878
movq %rbx, %rdi
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
movl $0x2, %edx
callq 0xfb01
movq %rbx, %rdi
callq 0x1091b
movq %rbx, %rdi
popq %rbx
jmp 0x10940
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: io_gc
static int io_gc(lua_State*L){
FILE*f=*tofilep(L);
if(f!=NULL)
aux_close(L);
return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x109ba
cmpq $0x0, (%rax)
je 0x10917
movq %rbx, %rdi
callq 0x10940
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: tofile
static FILE*tofile(lua_State*L){
FILE**f=tofilep(L);
if(*f==NULL)
luaL_error(L,"attempt to use a closed file");
return*f;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x109ba
cmpq $0x0, (%rax)
je 0x1092f
movq (%rax), %rax
popq %rbx
retq
leaq 0x4665(%rip), %rsi      # 0x14f9b
movq %rbx, %rdi
xorl %eax, %eax
callq 0xa049
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: luaL_checkudata
static void*luaL_checkudata(lua_State*L,int ud,const char*tname){
void*p=lua_touserdata(L,ud);
if(p!=NULL){
if(lua_getmetatable(L,ud)){
lua_getfield(L,(-10000),tname);
if(lua_rawequal(L,-1,-2)){
lua_pop(L,2);
return p;
}
}
}
luaL_typerror(L,ud,tname);
return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rcx
cmpq 0x10(%rdi), %rcx
leaq 0x3a50(%rip), %rax      # 0x14420
cmovbq %rcx, %rax
movl 0x8(%rax), %ecx
cmpl $0x2, %ecx
je 0x109ea
cmpl $0x7, %ecx
jne 0x109ef
movq (%rax), %r14
addq $0x28, %r14
jmp 0x109f2
movq (%rax), %r14
jmp 0x109f2
xorl %r14d, %r14d
testq %r14, %r14
je 0x10a3d
movq %rbx, %rdi
callq 0xf9a2
testl %eax, %eax
je 0x10a3d
leaq 0x457f(%rip), %rdx      # 0x14f89
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x107d1
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
callq 0x10a51
testl %eax, %eax
je 0x10a3d
addq $-0x20, 0x10(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4545(%rip), %rdx      # 0x14f89
movq %rbx, %rdi
movl $0x1, %esi
callq 0xa6d4
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: lua_rawequal
static int lua_rawequal(lua_State*L,int index1,int index2){
StkId o1=index2adr(L,index1);
StkId o2=index2adr(L,index2);
return(o1==(&luaO_nilobject_)||o2==(&luaO_nilobject_))?0
:luaO_rawequalObj(o1,o2);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %r14
callq 0x975f
movq %rax, %rbx
movq %r14, %rdi
movl %ebp, %esi
callq 0x975f
leaq 0x39ad(%rip), %rcx      # 0x14420
cmpq %rcx, %rbx
sete %dl
cmpq %rcx, %rax
sete %cl
orb %dl, %cl
je 0x10a8a
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x7805
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: pushresult
static int pushresult(lua_State*L,int i,const char*filename){
int en=errno;
if(i){
lua_pushboolean(L,1);
return 1;
}
else{
lua_pushnil(L);
if(filename)
lua_pushfstring(L,"%s: %s",filename,strerror(en));
else
lua_pushfstring(L,"%s",strerror(en));
lua_pushinteger(L,en);
return 3;
}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x3050
movq 0x10(%rbx), %rcx
testl %ebp, %ebp
je 0x10abf
movl $0x1, (%rcx)
movl $0x1, %eax
jmp 0x10b1a
movl (%rax), %ebp
movl $0x0, 0x8(%rcx)
addq $0x10, %rcx
movq %rcx, 0x10(%rbx)
movl %ebp, %edi
callq 0x32c0
testq %r14, %r14
je 0x10af5
leaq 0x480a(%rip), %rsi      # 0x152ed
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xa5f8
jmp 0x10b09
leaq 0x3b4b(%rip), %rsi      # 0x14647
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xa5f8
movq 0x10(%rbx), %rcx
cvtsi2sd %ebp, %xmm0
movsd %xmm0, (%rcx)
movl $0x3, %eax
movl %eax, 0x8(%rcx)
addq $0x10, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: io_readline
static int io_readline(lua_State*L){
FILE*f=*(FILE**)lua_touserdata(L,lua_upvalueindex(1));
int sucess;
if(f==NULL)
luaL_error(L,"file is already closed");
sucess=read_line(L,f);
if(ferror(f))
return luaL_error(L,"%s",strerror(errno));
if(sucess)return 1;
else{
if(lua_toboolean(L,lua_upvalueindex(2))){
lua_settop(L,0);
lua_pushvalue(L,lua_upvalueindex(1));
aux_close(L);
}
return 0;
}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
leaq 0x28(%rax), %rcx
cmpb $0x0, 0xb(%rax)
leaq 0x387a(%rip), %r15      # 0x14420
cmoveq %r15, %rcx
xorl %eax, %eax
cmpl $0x7, 0x8(%rcx)
movq (%rcx), %rcx
movl $0x28, %edx
cmovneq %rax, %rdx
movq (%rcx,%rdx), %r14
testq %r14, %r14
je 0x10c71
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10ca2
movl %eax, %ebp
movq %r14, %rdi
callq 0x3090
testl %eax, %eax
jne 0x10c82
movl $0x1, %eax
testl %ebp, %ebp
jne 0x10c66
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rcx
movq (%rcx), %rax
leaq 0x38(%rax), %rdx
cmpb $0x2, 0xb(%rax)
cmovbq %r15, %rdx
movl 0x8(%rdx), %eax
testl %eax, %eax
je 0x10c66
cmpl $0x1, %eax
jne 0x10c17
cmpl $0x0, (%rdx)
je 0x10c64
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rax
cmpq %rax, %rdx
jae 0x10c38
movl $0x0, 0x8(%rdx)
addq $0x10, %rdx
cmpq %rax, %rdx
jb 0x10c24
movq %rdx, 0x10(%rbx)
movq %rax, 0x10(%rbx)
movq (%rcx), %rcx
leaq 0x28(%rcx), %rdx
cmpb $0x0, 0xb(%rcx)
cmoveq %r15, %rdx
movq (%rdx), %rcx
movq %rcx, (%rax)
movl 0x8(%rdx), %ecx
movl %ecx, 0x8(%rax)
addq $0x10, 0x10(%rbx)
movq %rbx, %rdi
callq 0x10940
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4348(%rip), %rsi      # 0x14fc0
movq %rbx, %rdi
xorl %eax, %eax
callq 0xa049
callq 0x3050
movl (%rax), %edi
callq 0x32c0
leaq 0x39b2(%rip), %rsi      # 0x14647
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xa049
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: read_line
static int read_line(lua_State*L,FILE*f){
luaL_Buffer b;
luaL_buffinit(L,&b);
for(;;){
size_t l;
char*p=luaL_prepbuffer(&b);
if(fgets(p,BUFSIZ,f)==NULL){
luaL_pushresult(&b);
return(lua_objlen(L,-1)>0);
}
l=strlen(p);
if(l==0||p[l-1]!='\n')
luaL_addsize(&b,l);
else{
luaL_addsize(&b,l-1);
luaL_pushresult(&b);
return 1;
}
}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2020, %rsp           # imm = 0x2020
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %r15
movq %rdi, -0x8(%r15)
movq %r15, -0x18(%r15)
movl $0x0, -0x10(%r15)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x1008f
testl %eax, %eax
je 0x10ce5
movq %r12, %rdi
callq 0x100c5
movq %r15, %rdi
movl $0x2000, %esi           # imm = 0x2000
movq %rbx, %rdx
callq 0x3150
testq %rax, %rax
je 0x10d44
movq %r15, %rdi
callq 0x30e0
testq %rax, %rax
je 0x10d3b
cmpb $0xa, 0x1f(%rsp,%rax)
jne 0x10d3b
decq %rax
addq %rax, 0x8(%rsp)
movq %r12, %rdi
callq 0x1008f
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %esi
callq 0xa57b
movl $0x1, 0x10(%rsp)
movl $0x1, %ebp
jmp 0x10d78
addq %rax, 0x8(%rsp)
movb $0x1, %al
jmp 0x10d7a
movq %r12, %rdi
callq 0x1008f
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %esi
callq 0xa57b
movl $0x1, 0x10(%rsp)
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xfa2e
xorl %ebp, %ebp
testq %rax, %rax
setne %bpl
xorl %eax, %eax
testb %al, %al
jne 0x10cd1
movl %ebp, %eax
addq $0x2020, %rsp           # imm = 0x2020
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: read_chars
static int read_chars(lua_State*L,FILE*f,size_t n){
size_t rlen;
size_t nr;
luaL_Buffer b;
luaL_buffinit(L,&b);
rlen=BUFSIZ;
do{
char*p=luaL_prepbuffer(&b);
if(rlen>n)rlen=n;
nr=fread(p,sizeof(char),rlen,f);
luaL_addsize(&b,nr);
n-=nr;
}while(n>0&&nr==rlen);
luaL_pushresult(&b);
return(n==0||lua_objlen(L,-1)>0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x18(%rsp), %r12
movq %rdi, -0x8(%r12)
movq %r12, -0x18(%r12)
movl $0x0, -0x10(%r12)
movl $0x2000, %r13d          # imm = 0x2000
movq %rsp, %rbp
movq %rbp, %rdi
callq 0x1008f
testl %eax, %eax
je 0x10ff2
movq %rbp, %rdi
callq 0x100c5
cmpq %r14, %r13
cmovaeq %r14, %r13
movl $0x1, %esi
movq %r12, %rdi
movq %r13, %rdx
movq %r15, %rcx
callq 0x30a0
addq %rax, (%rsp)
subq %rax, %r14
cmpq %r13, %rax
jne 0x1101d
testq %r14, %r14
jne 0x10fde
movq %rsp, %r15
movq %r15, %rdi
callq 0x1008f
movq 0x10(%r15), %rdi
movl 0x8(%r15), %esi
callq 0xa57b
movl $0x1, 0x8(%r15)
testq %r14, %r14
je 0x1105c
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xfa2e
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %al
jmp 0x11061
movl $0x1, %eax
addq $0x2018, %rsp           # imm = 0x2018
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/minilua.c
// Function: g_write
static int g_write(lua_State*L,FILE*f,int arg){
int nargs=lua_gettop(L)-1;
int status=1;
for(;nargs--;arg++){
if(lua_type(L,arg)==3){
status=status&&
fprintf(f,"%.14g",lua_tonumber(L,arg))>0;
}
else{
size_t l;
const char*s=luaL_checklstring(L,arg,&l);
status=status&&(fwrite(s,sizeof(char),l,f)==l);
}
}
return pushresult(L,status,NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r12
subq 0x18(%rdi), %r12
shrq $0x4, %r12
decl %r12d
je 0x11127
movl %edx, %ebp
movq %rsi, %r14
movl $0x1, %r13d
leaq 0x3378(%rip), %r15      # 0x14420
movq %rbx, %rdi
movl %ebp, %esi
callq 0x975f
cmpq %r15, %rax
je 0x110e8
cmpl $0x3, 0x8(%rax)
jne 0x110e8
testl %r13d, %r13d
je 0x1111b
movq %rbx, %rdi
movl %ebp, %esi
callq 0xf8db
movq %r14, %rdi
leaq 0x35ab(%rip), %rsi      # 0x14681
movb $0x1, %al
callq 0x3180
xorl %r13d, %r13d
testl %eax, %eax
setg %r13b
jmp 0x1111e
movq %rbx, %rdi
movl %ebp, %esi
movq %rsp, %rdx
callq 0xa6a8
testl %r13d, %r13d
je 0x1111b
movq (%rsp), %rdx
movl $0x1, %esi
movq %rax, %rdi
movq %r14, %rcx
callq 0x32b0
xorl %r13d, %r13d
cmpq (%rsp), %rax
sete %r13b
jmp 0x1111e
xorl %r13d, %r13d
incl %ebp
decl %r12d
jne 0x110a8
jmp 0x1112d
movl $0x1, %r13d
movq %rbx, %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0x10a99
addq $0x8, %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/minilua.c
// Function: io_lines
static int io_lines(lua_State*L){
if(lua_isnoneornil(L,1)){
lua_rawgeti(L,(-10001),1);
return f_lines(L);
}
else{
const char*filename=luaL_checkstring(L,1);
FILE**pf=newfile(L);
*pf=fopen(filename,"r");
if(*pf==NULL)
fileerror(L,1,filename);
aux_lines(L,lua_gettop(L),1);
return 1;
}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
leaq 0x3282(%rip), %rcx      # 0x14420
cmpq %rcx, %rax
je 0x111f9
cmpq 0x10(%rbx), %rax
jae 0x111f9
cmpl $0x0, 0x8(%rax)
jle 0x111f9
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0xa6a8
movq %rax, %r14
movq %rbx, %rdi
callq 0x114f9
movq %rax, %r15
leaq 0x4034(%rip), %rsi      # 0x15207
movq %r14, %rdi
callq 0x3250
movq %rax, (%r15)
testq %rax, %rax
je 0x1122d
movq 0x10(%rbx), %rsi
subq 0x18(%rbx), %rsi
shrq $0x4, %rsi
movq %rbx, %rdi
movl $0x1, %edx
jmp 0x1121d
movq %rbx, %rdi
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
movl $0x1, %edx
callq 0xfb01
movq %rbx, %rdi
callq 0x1091b
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x10b27
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11540
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: io_open
static int io_open(lua_State*L){
const char*filename=luaL_checkstring(L,1);
const char*mode=luaL_optstring(L,2,"r");
FILE**pf=newfile(L);
*pf=fopen(filename,mode);
return(*pf==NULL)?pushresult(L,0,filename):1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0xa6a8
movq %rax, %r14
leaq 0x3fae(%rip), %rdx      # 0x15207
movq %rbx, %rdi
movl $0x2, %esi
xorl %ecx, %ecx
callq 0xa10c
movq %rax, %r15
movq %rbx, %rdi
callq 0x114f9
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x3250
movq %rax, (%r12)
testq %rax, %rax
je 0x1129b
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x10a99
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: io_type
static int io_type(lua_State*L){
void*ud;
luaL_checkany(L,1);
ud=lua_touserdata(L,1);
lua_getfield(L,(-10000),"FILE*");
if(ud==NULL||!lua_getmetatable(L,1)||!lua_rawequal(L,-2,-1))
lua_pushnil(L);
else if(*((FILE**)ud)==NULL)
lua_pushliteral(L,"closed file");
else
lua_pushliteral(L,"file");
return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0xa010
movq 0x18(%rbx), %rcx
cmpq 0x10(%rbx), %rcx
leaq 0x3115(%rip), %rax      # 0x14420
cmovbq %rcx, %rax
movl 0x8(%rax), %ecx
cmpl $0x2, %ecx
je 0x11325
cmpl $0x7, %ecx
jne 0x1132a
movq (%rax), %r14
addq $0x28, %r14
jmp 0x1132d
movq (%rax), %r14
jmp 0x1132d
xorl %r14d, %r14d
leaq 0x3c55(%rip), %rdx      # 0x14f89
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x107d1
testq %r14, %r14
je 0x1137c
movq %rbx, %rdi
callq 0xf9a2
testl %eax, %eax
je 0x1137c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x10a51
testl %eax, %eax
je 0x1137c
cmpq $0x0, (%r14)
je 0x11391
leaq 0x3c3e(%rip), %rsi      # 0x14fb3
movl $0x4, %edx
jmp 0x1139d
movq 0x10(%rbx), %rax
movl $0x0, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x10(%rbx)
jmp 0x113a5
leaq 0x3c14(%rip), %rsi      # 0x14fac
movl $0xb, %edx
movq %rbx, %rdi
callq 0x90a1
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: getiofile
static FILE*getiofile(lua_State*L,int findex){
FILE*f;
lua_rawgeti(L,(-10001),findex);
f=*(FILE**)lua_touserdata(L,-1);
if(f==NULL)
luaL_error(L,"standard %s file is closed",fnames[findex-1]);
return f;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
movl %r14d, %edx
callq 0xfb01
movq 0x10(%rbx), %rax
xorl %ecx, %ecx
cmpl $0x7, -0x8(%rax)
movq -0x10(%rax), %rax
movl $0x28, %edx
cmovneq %rcx, %rdx
movq (%rax,%rdx), %rax
testq %rax, %rax
je 0x11410
addq $0x8, %rsp
popq %rbx
popq %r14
retq
decl %r14d
leaq 0x3166(%rip), %rax      # 0x14580
movslq (%rax,%r14,4), %rdx
addq %rax, %rdx
leaq 0x3c08(%rip), %rsi      # 0x15030
movq %rbx, %rdi
xorl %eax, %eax
callq 0xa049
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: g_iofile
static int g_iofile(lua_State*L,int f,const char*mode){
if(!lua_isnoneornil(L,1)){
const char*filename=lua_tostring(L,1);
if(filename){
FILE**pf=newfile(L);
*pf=fopen(filename,mode);
if(*pf==NULL)
fileerror(L,1,filename);
}
else{
tofile(L);
lua_pushvalue(L,1);
}
lua_rawseti(L,(-10001),f);
}
lua_rawgeti(L,(-10001),f);
return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x18(%rdi), %rax
leaq 0x2fd5(%rip), %r13      # 0x14420
cmpq %r13, %rax
je 0x114e1
cmpq 0x10(%r14), %rax
jae 0x114e1
cmpl $0x0, 0x8(%rax)
jle 0x114e1
movq %rdx, %r15
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x3c5a
testq %rax, %rax
je 0x114a8
movq %rax, %r12
movq %r14, %rdi
callq 0x114f9
movq %rax, %r13
movq %r12, %rdi
movq %r15, %rsi
callq 0x3250
movq %rax, (%r13)
testq %rax, %rax
jne 0x114d2
movq %r14, %rdi
movq %r12, %rsi
callq 0x11540
movq %r14, %rdi
callq 0x1091b
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
cmpq %rax, %rcx
cmovbq %rcx, %r13
movq (%r13), %rcx
movq %rcx, (%rax)
movl 0x8(%r13), %ecx
movl %ecx, 0x8(%rax)
addq $0x10, 0x10(%r14)
movq %r14, %rdi
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
movl %ebx, %edx
callq 0x3933
movq %r14, %rdi
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
movl %ebx, %edx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xfb01
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: newfile
static FILE**newfile(lua_State*L){
FILE**pf=(FILE**)lua_newuserdata(L,sizeof(FILE*));
*pf=NULL;
luaL_getmetatable(L,"FILE*");
lua_setmetatable(L,-2);
return pf;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x8, %esi
callq 0xfb36
movq %rax, %r14
movq $0x0, (%rax)
leaq 0x3a6e(%rip), %rdx      # 0x14f89
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x107d1
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x94dd
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: str_byte
static int str_byte(lua_State*L){
size_t l;
const char*s=luaL_checklstring(L,1,&l);
ptrdiff_t posi=posrelat(luaL_optinteger(L,2,1),l);
ptrdiff_t pose=posrelat(luaL_optinteger(L,3,posi),l);
int n,i;
if(posi<=0)posi=1;
if((size_t)pose>l)pose=l;
if(posi>pose)return 0;
n=(int)(pose-posi+1);
if(posi+n<=pose)
luaL_error(L,"string slice too long");
luaL_checkstack(L,n,"string slice too long");
for(i=0;i<n;i++)
lua_pushinteger(L,uchar(s[posi+i-1]));
return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r12
movl $0x1, %esi
movq %r12, %rdx
callq 0xa6a8
movq %rax, %r15
movl $0x1, %ebp
movl $0x1, %edx
movq %rbx, %rdi
movl $0x2, %esi
callq 0xa737
movq (%r12), %rcx
incq %rcx
movq %rax, %r13
sarq $0x3f, %r13
andq %rcx, %r13
addq %rax, %r13
xorl %r14d, %r14d
testq %r13, %r13
movl $0x0, %edx
cmovgq %r13, %rdx
movq %rbx, %rdi
movl $0x3, %esi
callq 0xa737
movq (%r12), %rdx
leaq 0x1(%rdx), %rsi
movq %rax, %rcx
sarq $0x3f, %rcx
andq %rsi, %rcx
addq %rax, %rcx
testq %rcx, %rcx
cmovleq %r14, %rcx
cmpq $0x2, %r13
cmovlq %rbp, %r13
cmpq %rdx, %rcx
cmovaeq %rdx, %rcx
cmpq %r13, %rcx
jb 0x11744
movl %ecx, %r12d
subl %r13d, %r12d
leal 0x1(%r12), %r14d
movslq %r14d, %rax
addq %r13, %rax
cmpq %rcx, %rax
jle 0x11756
leaq 0x39a3(%rip), %rdx      # 0x15096
movq %rbx, %rdi
movl %r14d, %esi
callq 0x10148
cmpl $0x7ffffffe, %r12d      # imm = 0x7FFFFFFE
ja 0x11744
leaq (%r15,%r13), %rax
decq %rax
cmpl $0x2, %r14d
movl $0x1, %ecx
cmovgel %r14d, %ecx
xorl %edx, %edx
movzbl (%rax,%rdx), %esi
movq 0x10(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd %xmm0, (%rdi)
movl $0x3, 0x8(%rdi)
addq $0x10, 0x10(%rbx)
incq %rdx
cmpq %rdx, %rcx
jne 0x1171d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3939(%rip), %rsi      # 0x15096
movq %rbx, %rdi
xorl %eax, %eax
callq 0xa049
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: str_char
static int str_char(lua_State*L){
int n=lua_gettop(L);
int i;
luaL_Buffer b;
luaL_buffinit(L,&b);
for(i=1;i<=n;i++){
int c=luaL_checkint(L,i);
luaL_argcheck(L,uchar(c)==c,i,"invalid value");
luaL_addchar(&b,uchar(c));
}
luaL_pushresult(&b);
return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq 0x10(%rdi), %r13
subq 0x18(%rdi), %r13
shrq $0x4, %r13
leaq 0x18(%rsp), %rax
movq %rdi, -0x8(%rax)
movq %rax, -0x18(%rax)
movl $0x0, -0x10(%rax)
testl %r13d, %r13d
jle 0x11807
movq %rdi, %rbx
leaq 0x2018(%rsp), %rbp
negl %r13d
movl $0x1, %r14d
movq %rsp, %r15
movq %rbx, %rdi
movl %r14d, %esi
callq 0xa770
movq %rax, %r12
testl $0xffffff00, %r12d      # imm = 0xFFFFFF00
jne 0x11835
cmpq %rbp, (%rsp)
jb 0x117e5
movq %r15, %rdi
callq 0x1008f
testl %eax, %eax
je 0x117e5
movq %r15, %rdi
callq 0x100c5
movq (%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%rsp)
movb %r12b, (%rax)
leal (%r14,%r13), %eax
incl %eax
movl %r14d, %ecx
incl %ecx
movl %ecx, %r14d
cmpl $0x1, %eax
jne 0x117b4
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x1008f
movq 0x10(%rbx), %rdi
movl 0x8(%rbx), %esi
callq 0xa57b
movl $0x1, %eax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3870(%rip), %rdx      # 0x150ac
movq %rbx, %rdi
movl %r14d, %esi
callq 0xa173
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: gmatch
static int gmatch(lua_State*L){
luaL_checkstring(L,1);
luaL_checkstring(L,2);
lua_settop(L,2);
lua_pushinteger(L,0);
lua_pushcclosure(L,gmatch_aux,3);
return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0xa6a8
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0xa6a8
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rax
leaq 0x20(%rax), %rcx
cmpq %rcx, %rdx
jae 0x11e78
movl $0x0, 0x8(%rdx)
addq $0x10, %rdx
cmpq %rcx, %rdx
jb 0x11e64
movq %rdx, 0x10(%rbx)
movq %rcx, 0x10(%rbx)
movq $0x0, 0x20(%rax)
movl $0x3, 0x28(%rax)
addq $0x10, 0x10(%rbx)
leaq 0x1351(%rip), %rsi      # 0x131e8
movq %rbx, %rdi
movl $0x3, %edx
callq 0x8c51
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: str_lower
static int str_lower(lua_State*L){
size_t l;
size_t i;
luaL_Buffer b;
const char*s=luaL_checklstring(L,1,&l);
luaL_buffinit(L,&b);
for(i=0;i<l;i++)
luaL_addchar(&b,tolower(uchar(s[i])));
luaL_pushresult(&b);
return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2028, %rsp           # imm = 0x2028
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0xa6a8
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq %r14, -0x8(%rax)
movq %rax, -0x18(%rax)
movl $0x0, -0x10(%rax)
cmpq $0x0, (%r15)
je 0x123ff
leaq 0x2028(%rsp), %r15
xorl %r12d, %r12d
leaq 0x10(%rsp), %r14
cmpq %r15, 0x10(%rsp)
jb 0x123d5
movq %r14, %rdi
callq 0x1008f
testl %eax, %eax
je 0x123d5
movq %r14, %rdi
callq 0x100c5
callq 0x32e0
movq (%rax), %rax
movzbl (%rbx,%r12), %ecx
movb (%rax,%rcx,4), %al
movq 0x10(%rsp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%rsp)
movb %al, (%rcx)
incq %r12
cmpq 0x8(%rsp), %r12
jb 0x123ba
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x1008f
movq 0x10(%rbx), %rdi
movl 0x8(%rbx), %esi
callq 0xa57b
movl $0x1, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: str_rep
static int str_rep(lua_State*L){
size_t l;
luaL_Buffer b;
const char*s=luaL_checklstring(L,1,&l);
int n=luaL_checkint(L,2);
luaL_buffinit(L,&b);
while(n-->0)
luaL_addlstring(&b,s,l);
luaL_pushresult(&b);
return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x2020, %rsp           # imm = 0x2020
movq %rdi, %r15
movq %rsp, %rdx
movl $0x1, %esi
callq 0xa6a8
movq %rax, %rbx
movq %r15, %rdi
movl $0x2, %esi
callq 0xa770
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq %r15, -0x8(%rax)
movq %rax, -0x18(%rax)
movl $0x0, -0x10(%rax)
testl %r14d, %r14d
jle 0x1249b
incl %r14d
leaq 0x8(%rsp), %r15
movq (%rsp), %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xffb1
decl %r14d
cmpl $0x1, %r14d
jg 0x12483
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x1008f
movq 0x10(%rbx), %rdi
movl 0x8(%rbx), %esi
callq 0xa57b
movl $0x1, %eax
addq $0x2020, %rsp           # imm = 0x2020
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: str_sub
static int str_sub(lua_State*L){
size_t l;
const char*s=luaL_checklstring(L,1,&l);
ptrdiff_t start=posrelat(luaL_checkinteger(L,2),l);
ptrdiff_t end=posrelat(luaL_optinteger(L,3,-1),l);
if(start<1)start=1;
if(end>(ptrdiff_t)l)end=(ptrdiff_t)l;
if(start<=end)
lua_pushlstring(L,s+start-1,end-start+1);
else lua_pushliteral(L,"");
return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0xa6a8
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0xa770
movq (%r15), %rcx
incq %rcx
movq %rax, %r12
sarq $0x3f, %r12
andq %rcx, %r12
addq %rax, %r12
movq %rbx, %rdi
movl $0x3, %esi
movq $-0x1, %rdx
callq 0xa737
movq (%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rax, %rsi
sarq $0x3f, %rsi
andq %rdx, %rsi
addq %rax, %rsi
xorl %edx, %edx
testq %rsi, %rsi
cmovgq %rsi, %rdx
cmpq $0x2, %r12
movl $0x1, %eax
cmovgeq %r12, %rax
cmpq %rcx, %rdx
cmovgeq %rcx, %rdx
subq %rax, %rdx
jge 0x1255c
leaq 0x23a6(%rip), %rsi      # 0x148fb
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x12569
leaq (%r14,%rax), %rsi
decq %rsi
incq %rdx
movq %rbx, %rdi
callq 0x90a1
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: str_upper
static int str_upper(lua_State*L){
size_t l;
size_t i;
luaL_Buffer b;
const char*s=luaL_checklstring(L,1,&l);
luaL_buffinit(L,&b);
for(i=0;i<l;i++)
luaL_addchar(&b,toupper(uchar(s[i])));
luaL_pushresult(&b);
return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2028, %rsp           # imm = 0x2028
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0xa6a8
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq %r14, -0x8(%rax)
movq %rax, -0x18(%rax)
movl $0x0, -0x10(%rax)
cmpq $0x0, (%r15)
je 0x12614
leaq 0x2028(%rsp), %r15
xorl %r12d, %r12d
leaq 0x10(%rsp), %r14
cmpq %r15, 0x10(%rsp)
jb 0x125ea
movq %r14, %rdi
callq 0x1008f
testl %eax, %eax
je 0x125ea
movq %r14, %rdi
callq 0x100c5
callq 0x3030
movq (%rax), %rax
movzbl (%rbx,%r12), %ecx
movb (%rax,%rcx,4), %al
movq 0x10(%rsp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%rsp)
movb %al, (%rcx)
incq %r12
cmpq 0x8(%rsp), %r12
jb 0x125cf
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x1008f
movq 0x10(%rbx), %rdi
movl 0x8(%rbx), %esi
callq 0xa57b
movl $0x1, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: push_captures
static int push_captures(MatchState*ms,const char*s,const char*e){
int i;
int nlevels=(ms->level==0&&s)?1:ms->level;
luaL_checkstack(ms->L,nlevels,"too many captures");
for(i=0;i<nlevels;i++)
push_onecapture(ms,i,s,e);
return nlevels;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0x18(%rdi), %eax
testl %eax, %eax
movl $0x1, %ebp
cmovnel %eax, %ebp
testq %rsi, %rsi
cmovel %eax, %ebp
movq 0x10(%rdi), %rdi
leaq 0x2355(%rip), %rdx      # 0x150e8
movl %ebp, %esi
callq 0x10148
testl %ebp, %ebp
jle 0x12dba
xorl %r12d, %r12d
movq %r15, %rdi
movl %r12d, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1311b
incl %r12d
cmpl %r12d, %ebp
jne 0x12da1
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: start_capture
static const char*start_capture(MatchState*ms,const char*s,
const char*p,int what){
const char*res;
int level=ms->level;
if(level>=32)luaL_error(ms->L,"too many captures");
ms->capture[level].init=s;
ms->capture[level].len=what;
ms->level=level+1;
if((res=match(ms,s,p))==NULL)
ms->level--;
return res;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movslq 0x18(%rdi), %rax
cmpq $0x20, %rax
jge 0x12dfe
movq %rax, %rdi
shlq $0x4, %rdi
movq %rsi, 0x20(%rbx,%rdi)
movslq %ecx, %rcx
movq %rcx, 0x28(%rbx,%rdi)
incl %eax
movl %eax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x1292a
testq %rax, %rax
jne 0x12dfc
decl 0x18(%rbx)
popq %rbx
retq
movq 0x10(%rbx), %rdi
leaq 0x22df(%rip), %rsi      # 0x150e8
xorl %eax, %eax
callq 0xa049
// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: classend
static const char*classend(MatchState*ms,const char*p){
switch(*p++){
case'%':{
if(*p=='\0')
luaL_error(ms->L,"malformed pattern (ends with "LUA_QL("%%")")");
return p+1;
}
case'[':{
if(*p=='^')p++;
do{
if(*p=='\0')
luaL_error(ms->L,"malformed pattern (missing "LUA_QL("]")")");
if(*(p++)=='%'&&*p!='\0')
p++;
}while(*p!=']');
return p+1;
}
default:{
return p;
}
}
}

// Assembly:
pushq %rax
leaq 0x1(%rsi), %rax
movzbl (%rsi), %ecx
cmpl $0x5b, %ecx
je 0x12e30
cmpl $0x25, %ecx
jne 0x12e62
cmpb $0x0, (%rax)
je 0x12e76
addq $0x2, %rsi
movq %rsi, %rax
jmp 0x12e62
leaq 0x2(%rsi), %rcx
cmpb $0x5e, 0x1(%rsi)
cmoveq %rcx, %rax
cmpb $0x0, (%rax)
je 0x12e64
leaq 0x1(%rax), %rcx
cmpb $0x25, (%rax)
jne 0x12e57
cmpb $0x0, 0x1(%rax)
je 0x12e57
addq $0x2, %rax
movq %rax, %rcx
movq %rcx, %rax
cmpb $0x5d, (%rcx)
jne 0x12e3c
incq %rax
popq %rcx
retq
movq 0x10(%rdi), %rdi
leaq 0x22d9(%rip), %rsi      # 0x15148
xorl %eax, %eax
callq 0xa049
movq 0x10(%rdi), %rdi
leaq 0x22a4(%rip), %rsi      # 0x15125
jmp 0x12e6f