	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	xorl	%eax, %eax
	callq	_luaL_newstate
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_pmain@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	callq	_lua_pushcfunction
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_lua_pushinteger
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_lua_pushlightuserdata
	movq	%rbx, %rdi
	movl	$2, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_lua_pcall
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_lua_toboolean
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_report
	movq	%rbx, %rdi
	callq	_lua_close
	movq	_LUA_OK@GOTPCREL(%rip), %rdx
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movq	%rax, %rcx
	cmpl	(%rdx), %r15d
	jne	LBB0_4
## %bb.3:
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rcx
LBB0_4:
	testl	%r14d, %r14d
	cmovneq	%rcx, %rax
	jmp	LBB0_5
LBB0_1:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_l_message
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot create state: not enough memory"

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_pmain,4,2                      ## @pmain
	.comm	_LUA_OK,4,2                     ## @LUA_OK
	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	mov	x21, x0
	bl	_luaL_newstate
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x1, _pmain@GOTPAGE
Lloh1:
	ldr	x1, [x1, _pmain@GOTPAGEOFF]
	bl	_lua_pushcfunction
	mov	x0, x19
	mov	x1, x21
	bl	_lua_pushinteger
	mov	x0, x19
	mov	x1, x20
	bl	_lua_pushlightuserdata
	mov	x0, x19
	mov	w1, #2
	mov	w2, #1
	mov	w3, #0
	bl	_lua_pcall
	mov	x20, x0
	mov	x0, x19
	mov	w1, #-1
	bl	_lua_toboolean
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	bl	_report
	mov	x0, x19
	bl	_lua_close
Lloh2:
	adrp	x8, _LUA_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LUA_OK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w20, w8
	ccmp	w21, #0, #4, eq
Lloh5:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh7:
	adrp	x9, _EXIT_SUCCESS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _EXIT_SUCCESS@GOTPAGEOFF]
	csel	x8, x9, x8, ne
	b	LBB0_3
LBB0_2:
	ldr	x0, [x20]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_l_message
Lloh11:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot create state: not enough memory"

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_pmain,4,2                      ; @pmain
	.comm	_LUA_OK,4,2                     ; @LUA_OK
	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
.subsections_via_symbols
