// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: luaL_loadfile
static int luaL_loadfile(lua_State*L,const char*filename){
LoadF lf;
int status,readstatus;
int c;
int fnameindex=lua_gettop(L)+1;
lf.extraline=0;
if(filename==NULL){
lua_pushliteral(L,"=stdin");
lf.f=stdin;
}
else{
lua_pushfstring(L,"@%s",filename);
lf.f=fopen(filename,"r");
if(lf.f==NULL)return errfile(L,"open",fnameindex);
}
c=getc(lf.f);
if(c=='#'){
lf.extraline=1;
while((c=getc(lf.f))!=EOF&&c!='\n');
if(c=='\n')c=getc(lf.f);
}
if(c=="\033Lua"[0]&&filename){
lf.f=freopen(filename,"rb",lf.f);
if(lf.f==NULL)return errfile(L,"reopen",fnameindex);
while((c=getc(lf.f))!=EOF&&c!="\033Lua"[0]);
lf.extraline=0;
}
ungetc(c,lf.f);
status=lua_load(L,getF,&lf,lua_tostring(L,-1));
readstatus=ferror(lf.f);
if(filename)fclose(lf.f);
if(readstatus){
lua_settop(L,fnameindex);
return errfile(L,"read",fnameindex);
}
lua_remove(L,fnameindex);
return status;
}

// Assembly:
subq $0x2048, %rsp           # imm = 0x2048
movq %rdi, 0x2038(%rsp)
movq %rsi, 0x2030(%rsp)
movq 0x2038(%rsp), %rdi
callq 0x10910
addl $0x1, %eax
movl %eax, 0x10(%rsp)
movl $0x0, 0x20(%rsp)
cmpq $0x0, 0x2030(%rsp)
jne 0x3918
movq 0x2038(%rsp), %rdi
leaq 0x1fba8(%rip), %rsi     # 0x234a5
movl $0x6, %edx
callq 0xf860
movq 0x256ca(%rip), %rax     # 0x28fd8
movq (%rax), %rax
movq %rax, 0x28(%rsp)
jmp 0x397d
movq 0x2038(%rsp), %rdi
movq 0x2030(%rsp), %rdx
leaq 0x1fb7d(%rip), %rsi     # 0x234ac
movb $0x0, %al
callq 0x11350
movq 0x2030(%rsp), %rdi
leaq 0x1fa99(%rip), %rsi     # 0x233de
callq 0x3240
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x397b
movq 0x2038(%rsp), %rdi
movl 0x10(%rsp), %edx
leaq 0x1fb50(%rip), %rsi     # 0x234ba
callq 0x211a0
movl %eax, 0x2044(%rsp)
jmp 0x3b59
jmp 0x397d
movq 0x28(%rsp), %rdi
callq 0x32c0
movl %eax, 0x14(%rsp)
cmpl $0x23, 0x14(%rsp)
jne 0x39e4
movl $0x1, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x32c0
movl %eax, %ecx
movl %ecx, 0x14(%rsp)
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, 0xf(%rsp)
je 0x39c1
cmpl $0xa, 0x14(%rsp)
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x39cb
jmp 0x39cd
jmp 0x399a
cmpl $0xa, 0x14(%rsp)
jne 0x39e2
movq 0x28(%rsp), %rdi
callq 0x32c0
movl %eax, 0x14(%rsp)
jmp 0x39e4
movl 0x14(%rsp), %eax
movsbl 0x1fac1(%rip), %ecx     # 0x234b0
cmpl %ecx, %eax
jne 0x3a95
cmpq $0x0, 0x2030(%rsp)
je 0x3a95
movq 0x2030(%rsp), %rdi
movq 0x28(%rsp), %rdx
leaq 0x1fa9b(%rip), %rsi     # 0x234b5
callq 0x3110
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x3a50
movq 0x2038(%rsp), %rdi
movl 0x10(%rsp), %edx
leaq 0x1fa79(%rip), %rsi     # 0x234b8
callq 0x211a0
movl %eax, 0x2044(%rsp)
jmp 0x3b59
jmp 0x3a52
movq 0x28(%rsp), %rdi
callq 0x32c0
movl %eax, %ecx
movl %ecx, 0x14(%rsp)
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, 0xe(%rsp)
je 0x3a81
movl 0x14(%rsp), %eax
movsbl 0x1fa38(%rip), %ecx     # 0x234b0
cmpl %ecx, %eax
setne %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
testb $0x1, %al
jne 0x3a8b
jmp 0x3a8d
jmp 0x3a52
movl $0x0, 0x20(%rsp)
movl 0x14(%rsp), %edi
movq 0x28(%rsp), %rsi
callq 0x31f0
movq 0x2038(%rsp), %rax
movq %rax, (%rsp)
movq 0x2038(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x3c60
movq (%rsp), %rdi
movq %rax, %rcx
leaq 0x1d74d(%rip), %rsi     # 0x21220
leaq 0x20(%rsp), %rdx
callq 0x119b0
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rdi
callq 0x30a0
movl %eax, 0x18(%rsp)
cmpq $0x0, 0x2030(%rsp)
je 0x3b04
movq 0x28(%rsp), %rdi
callq 0x30e0
cmpl $0x0, 0x18(%rsp)
je 0x3b3d
movq 0x2038(%rsp), %rdi
movl 0x10(%rsp), %esi
callq 0x11600
movq 0x2038(%rsp), %rdi
movl 0x10(%rsp), %edx
leaq 0x1ed70(%rip), %rsi     # 0x2289f
callq 0x211a0
movl %eax, 0x2044(%rsp)
jmp 0x3b59
movq 0x2038(%rsp), %rdi
movl 0x10(%rsp), %esi
callq 0x1a7e0
movl 0x1c(%rsp), %eax
movl %eax, 0x2044(%rsp)
movl 0x2044(%rsp), %eax
addq $0x2048, %rsp           # imm = 0x2048
retq
nopl (%rax,%rax)