// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %r13
subq 0x18(%rdi), %r13
shrq $0x4, %r13
leal 0x1(%r13), %r12d
movl $0x0, 0x8(%rsp)
testq %rsi, %rsi
je 0x3a7b
leaq 0x128b7(%rip), %rsi     # 0x162fd
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xaf5c
leaq 0x127d5(%rip), %rsi     # 0x1622f
movq %r15, %rdi
callq 0x3250
movq %rax, %r14
movq %rax, 0x10(%rsp)
testq %rax, %rax
jne 0x3a9e
leaq 0x12890(%rip), %rsi     # 0x16306
jmp 0x3d13
leaq 0x12874(%rip), %rsi     # 0x162f6
movl $0x6, %edx
movq %rbx, %rdi
callq 0x94a5
movq 0x18542(%rip), %rax     # 0x1bfd8
movq (%rax), %r14
movq %r14, 0x10(%rsp)
movq %r14, %rdi
callq 0x32d0
cmpl $0x23, %eax
jne 0x3ae0
movl $0x1, 0x8(%rsp)
movq %r14, %rdi
callq 0x32d0
cmpl $0xa, %eax
je 0x3ad8
cmpl $-0x1, %eax
jne 0x3ab3
movl %r12d, 0x4(%rsp)
testq %r15, %r15
setne %bpl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3b40
movq %r14, %rdi
callq 0x32d0
cmpl $0x1b, %eax
setne %cl
testq %r15, %r15
setne %bpl
sete %dl
orb %cl, %dl
jne 0x3b3b
leaq 0x12806(%rip), %rsi     # 0x16301
movq %r15, %rdi
movq %r14, %rdx
callq 0x3110
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x3d0c
movq %rax, %r14
movq %r14, %rdi
callq 0x32d0
cmpl $0x1b, %eax
je 0x3b29
cmpl $-0x1, %eax
jne 0x3b17
movl %r12d, 0x4(%rsp)
movl $0x0, 0x8(%rsp)
movb $0x1, %bpl
jmp 0x3b40
movl %r12d, 0x4(%rsp)
movl %eax, %edi
movq %r14, %rsi
callq 0x31f0
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x3d8d
leaq 0x10b80(%rip), %rsi     # 0x146e0
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
callq 0xb1a8
movl %eax, %r14d
movq 0x8(%r15), %r15
movq %r15, %rdi
callq 0x3090
movl %eax, %r12d
testb %bpl, %bpl
je 0x3b92
movq %r15, %rdi
callq 0x30d0
testl %r12d, %r12d
je 0x3cdc
cmpl $-0x1, %r13d
movl 0x4(%rsp), %edx
jl 0x3cea
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rsi
movl %edx, %edi
shlq $0x4, %rdi
leaq (%rsi,%rdi), %rax
cmpq %rax, %rcx
jae 0x3cfc
addq %rdi, %rsi
leaq 0x10(%rcx), %rdi
cmpq %rdi, %rsi
cmovbeq %rdi, %rsi
movq %rcx, %r8
notq %r8
addq %rsi, %r8
movq %r8, %xmm0
shrq $0x4, %r8
addq $0x4, %r8
andq $-0x4, %r8
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
psrlq $0x4, %xmm0
addq $0x38, %rcx
xorl %esi, %esi
movdqa 0x1140c(%rip), %xmm1    # 0x15010
movdqa 0x11414(%rip), %xmm2    # 0x15020
movdqa 0x1141c(%rip), %xmm3    # 0x15030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rsi, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edi
notl %edi
testb $0x1, %dil
je 0x3c66
movl $0x0, -0x30(%rcx)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edi
testb $0x1, %dil
je 0x3c7c
movl $0x0, -0x20(%rcx)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %edi
testb $0x1, %dil
je 0x3cb8
movl $0x0, -0x10(%rcx)
pextrw $0x4, %xmm5, %edi
testb $0x1, %dil
je 0x3cc9
movl $0x0, (%rcx)
addq $0x4, %rsi
addq $0x40, %rcx
cmpq %rsi, %r8
jne 0x3c1c
jmp 0x3cfc
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x105a9
jmp 0x3d24
movq 0x10(%rbx), %rax
movslq %edx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x10, %rax
movq %rax, 0x10(%rbx)
leaq 0x119e5(%rip), %rsi     # 0x156ec
movq %rbx, %rdi
jmp 0x3d19
leaq 0x125f1(%rip), %rsi     # 0x16304
movq %rbx, %rdi
movl %r12d, %edx
callq 0x14685
movl $0x6, %r14d
movl %r14d, %eax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq