	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function luaL_loadfile
_luaL_loadfile:                         ## @luaL_loadfile
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	_lua_gettop
	movl	%eax, %r13d
	incl	%r13d
	movl	$0, -64(%rbp)
	testq	%r12, %r12
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_lua_pushfstring
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_fopen
	movq	%rax, %rbx
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_26
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_lua_pushliteral
	movq	_stdin@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%rbx, -56(%rbp)
LBB0_4:
	movq	%rbx, %rdi
	callq	_getc
	cmpl	$35, %eax
	jne	LBB0_10
## %bb.5:
	movl	$1, -64(%rbp)
	movq	_EOF@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_getc
	cmpl	$10, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	(%r14), %eax
	jne	LBB0_6
LBB0_8:
	cmpl	$10, %eax
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	_getc
LBB0_10:
	testq	%r12, %r12
	je	LBB0_18
## %bb.11:
	cmpl	$27, %eax
	jne	LBB0_18
## %bb.12:
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_freopen
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	je	LBB0_25
## %bb.13:
	movq	%rax, %rbx
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	_EOF@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_getc
	cmpl	$27, %eax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpl	(%r14), %eax
	jne	LBB0_14
LBB0_16:
	movl	$0, -64(%rbp)
	jmp	LBB0_19
LBB0_18:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
LBB0_19:
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_ungetc
	movq	_getF@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	movl	$-1, %esi
	callq	_lua_tostring
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_lua_load
	movl	%eax, %r13d
	movq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_ferror
	movl	%eax, %r14d
	testq	%r12, %r12
	je	LBB0_21
## %bb.20:
	movq	%rbx, %rdi
	callq	_fclose
LBB0_21:
	testl	%r14d, %r14d
	je	LBB0_23
## %bb.22:
	movq	%r15, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_lua_settop
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_errfile
	movl	%eax, %r13d
	jmp	LBB0_24
LBB0_23:
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_lua_remove
LBB0_24:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	leaq	L_.str.6(%rip), %rsi
LBB0_26:
	movq	%r15, %rdi
	movl	%r13d, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_errfile                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"=stdin"

	.comm	_stdin,8,3                      ## @stdin
L_.str.1:                               ## @.str.1
	.asciz	"@%s"

L_.str.2:                               ## @.str.2
	.asciz	"r"

L_.str.3:                               ## @.str.3
	.asciz	"open"

	.comm	_EOF,4,2                        ## @EOF
L_.str.5:                               ## @.str.5
	.asciz	"rb"

L_.str.6:                               ## @.str.6
	.asciz	"reopen"

	.comm	_getF,4,2                       ## @getF
L_.str.7:                               ## @.str.7
	.asciz	"read"

	.no_dead_strip	_luaL_loadfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function luaL_loadfile
_luaL_loadfile:                         ; @luaL_loadfile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x20, x0
	bl	_lua_gettop
	add	w19, w0, #1
	str	wzr, [sp]
	cbz	x21, LBB0_3
; %bb.1:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_lua_pushfstring
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_fopen
	mov	x22, x0
	str	x0, [sp, #8]
	cbnz	x0, LBB0_4
; %bb.2:
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_24
LBB0_3:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_lua_pushliteral
Lloh8:
	adrp	x8, _stdin@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh10:
	ldr	x22, [x8]
	str	x22, [sp, #8]
LBB0_4:
	mov	x0, x22
	bl	_getc
	cmp	w0, #35
	b.ne	LBB0_10
; %bb.5:
	mov	w8, #1
	str	w8, [sp]
Lloh11:
	adrp	x23, _EOF@GOTPAGE
Lloh12:
	ldr	x23, [x23, _EOF@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_getc
	cmp	w0, #10
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_6
LBB0_8:
	cmp	w0, #10
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x22
	bl	_getc
LBB0_10:
	cbz	x21, LBB0_17
; %bb.11:
	cmp	w0, #27
	b.ne	LBB0_17
; %bb.12:
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_freopen
	str	x0, [sp, #8]
	cbz	x0, LBB0_23
; %bb.13:
	mov	x22, x0
Lloh15:
	adrp	x23, _EOF@GOTPAGE
Lloh16:
	ldr	x23, [x23, _EOF@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_getc
	cmp	w0, #27
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_14
LBB0_16:
	str	wzr, [sp]
LBB0_17:
	mov	x1, x22
	bl	_ungetc
Lloh17:
	adrp	x8, _getF@GOTPAGE
Lloh18:
	ldr	x8, [x8, _getF@GOTPAGEOFF]
Lloh19:
	ldr	w22, [x8]
	mov	x0, x20
	mov	w1, #-1
	bl	_lua_tostring
	mov	x3, x0
	mov	x2, sp
	mov	x0, x20
	mov	x1, x22
	bl	_lua_load
	mov	x22, x0
	ldr	x23, [sp, #8]
	mov	x0, x23
	bl	_ferror
	mov	x24, x0
	cbz	x21, LBB0_19
; %bb.18:
	mov	x0, x23
	bl	_fclose
LBB0_19:
	cbz	w24, LBB0_21
; %bb.20:
	mov	x0, x20
	mov	x1, x19
	bl	_lua_settop
Lloh20:
	adrp	x1, l_.str.7@PAGE
Lloh21:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_errfile
	mov	x22, x0
	b	LBB0_22
LBB0_21:
	mov	x0, x20
	mov	x1, x19
	bl	_lua_remove
LBB0_22:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_23:
Lloh22:
	adrp	x1, l_.str.6@PAGE
Lloh23:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_24:
	mov	x0, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_errfile
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"=stdin"

	.comm	_stdin,8,3                      ; @stdin
l_.str.1:                               ; @.str.1
	.asciz	"@%s"

l_.str.2:                               ; @.str.2
	.asciz	"r"

l_.str.3:                               ; @.str.3
	.asciz	"open"

	.comm	_EOF,4,2                        ; @EOF
l_.str.5:                               ; @.str.5
	.asciz	"rb"

l_.str.6:                               ; @.str.6
	.asciz	"reopen"

	.comm	_getF,4,2                       ; @getF
l_.str.7:                               ; @.str.7
	.asciz	"read"

	.no_dead_strip	_luaL_loadfile
.subsections_via_symbols
