	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmain
_pmain:                                 ## @pmain
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$1, %esi
	callq	_lua_touserdata
	movq	%rax, %r14
	movq	(%rax), %r15
	movl	$0, -44(%rbp)
	movl	$0, -36(%rbp)
	movl	$0, -40(%rbp)
	movq	_globalL@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpb	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_progname@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_3:
	movq	_LUA_GCSTOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_lua_gc
	movq	%rbx, %rdi
	callq	_luaL_openlibs
	movq	_LUA_GCRESTART@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_lua_gc
	movq	%rbx, %rdi
	callq	_handle_luainit
	movl	%eax, 8(%r14)
	testl	%eax, %eax
	je	LBB0_4
LBB0_21:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	-44(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	movq	%r15, %rdi
	callq	_collectargs
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movl	%eax, %r12d
	cmpl	$0, -36(%rbp)
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_print_version
LBB0_8:
	movl	%r12d, %edx
	testl	%r12d, %r12d
	jne	LBB0_10
## %bb.9:
	movl	12(%r14), %edx
LBB0_10:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_runargs
	movl	%eax, 8(%r14)
	testl	%eax, %eax
	jne	LBB0_21
## %bb.11:
	testl	%r12d, %r12d
	je	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_handle_script
	movl	%eax, 8(%r14)
	testl	%eax, %eax
	jne	LBB0_21
LBB0_13:
	cmpl	$0, -44(%rbp)
	je	LBB0_15
LBB0_14:
	movq	%rbx, %rdi
	callq	_dotty
	jmp	LBB0_21
LBB0_5:
	xorl	%eax, %eax
	callq	_print_usage
	movl	$1, 8(%r14)
	jmp	LBB0_21
LBB0_15:
	testl	%r12d, %r12d
	jne	LBB0_21
## %bb.16:
	cmpl	$0, -40(%rbp)
	jne	LBB0_21
## %bb.17:
	cmpl	$0, -36(%rbp)
	jne	LBB0_21
## %bb.18:
	xorl	%eax, %eax
	callq	_lua_stdin_is_tty
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	xorl	%eax, %eax
	callq	_print_version
	jmp	LBB0_14
LBB0_20:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_dofile
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_globalL,8,3                    ## @globalL
	.comm	_progname,8,3                   ## @progname
	.comm	_LUA_GCSTOP,4,2                 ## @LUA_GCSTOP
	.comm	_LUA_GCRESTART,4,2              ## @LUA_GCRESTART
	.no_dead_strip	_pmain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmain
_pmain:                                 ; @pmain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	mov	w1, #1
	bl	_lua_touserdata
	mov	x20, x0
	ldr	x21, [x0]
	str	xzr, [sp, #8]
	str	wzr, [sp, #4]
Lloh0:
	adrp	x8, _globalL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _globalL@GOTPAGEOFF]
Lloh2:
	str	x19, [x8]
	ldr	x8, [x21]
	cbz	x8, LBB0_3
; %bb.1:
	ldrb	w9, [x8]
	cbz	w9, LBB0_3
; %bb.2:
Lloh3:
	adrp	x9, _progname@GOTPAGE
Lloh4:
	ldr	x9, [x9, _progname@GOTPAGEOFF]
Lloh5:
	str	x8, [x9]
LBB0_3:
Lloh6:
	adrp	x8, _LUA_GCSTOP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LUA_GCSTOP@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_lua_gc
	mov	x0, x19
	bl	_luaL_openlibs
Lloh9:
	adrp	x8, _LUA_GCRESTART@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LUA_GCRESTART@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_lua_gc
	mov	x0, x19
	bl	_handle_luainit
	str	w0, [x20, #8]
	cbz	w0, LBB0_5
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_5:
	add	x1, sp, #12
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x21
	bl	_collectargs
	tbnz	w0, #31, LBB0_15
; %bb.6:
	mov	x22, x0
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_8
; %bb.7:
	bl	_print_version
LBB0_8:
	mov	x2, x22
	cbnz	w22, LBB0_10
; %bb.9:
	ldr	w2, [x20, #12]
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	bl	_runargs
	str	w0, [x20, #8]
	cbnz	w0, LBB0_4
; %bb.11:
	cbz	w22, LBB0_13
; %bb.12:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_handle_script
	str	w0, [x20, #8]
	cbnz	w0, LBB0_4
LBB0_13:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_16
LBB0_14:
	mov	x0, x19
	bl	_dotty
	b	LBB0_4
LBB0_15:
	bl	_print_usage
	mov	w8, #1
	str	w8, [x20, #8]
	b	LBB0_4
LBB0_16:
	cbnz	w22, LBB0_4
; %bb.17:
	ldr	w8, [sp, #4]
	cbnz	w8, LBB0_4
; %bb.18:
	ldr	w8, [sp, #8]
	cbnz	w8, LBB0_4
; %bb.19:
	bl	_lua_stdin_is_tty
	cbz	x0, LBB0_21
; %bb.20:
	bl	_print_version
	b	LBB0_14
LBB0_21:
	mov	x0, x19
	mov	x1, #0
	bl	_dofile
	b	LBB0_4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_globalL,8,3                    ; @globalL
	.comm	_progname,8,3                   ; @progname
	.comm	_LUA_GCSTOP,4,2                 ; @LUA_GCSTOP
	.comm	_LUA_GCRESTART,4,2              ; @LUA_GCRESTART
	.no_dead_strip	_pmain
.subsections_via_symbols
