	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movl	%edi, %r15d
	xorl	%eax, %eax
	callq	_luaL_newstate
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_luaL_openlibs
	movq	_bitlib@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_luaL_register
	movl	$8, %ebx
	cmpl	$2, %r15d
	jl	LBB0_8
## %bb.1:
	movl	$1, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_lua_createtable
	movq	8(%r12), %rsi
	movq	%r13, %rdi
	callq	_lua_pushstring
	movq	%r13, %rdi
	movl	$-2, %esi
	xorl	%edx, %edx
	callq	_lua_rawseti
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_lua_setglobal
	movq	8(%r12), %rsi
	movq	%r13, %rdi
	callq	_luaL_loadfile
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	cmpl	$3, %r15d
	jb	LBB0_5
## %bb.3:
	movl	%r15d, %ebx
	movl	$2, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%r14,8), %rsi
	movq	%r13, %rdi
	callq	_lua_pushstring
	incq	%r14
	cmpq	%r14, %rbx
	jne	LBB0_4
LBB0_5:
	addl	$-2, %r15d
	movq	%r13, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_lua_pcall
	testq	%rax, %rax
	movl	$1, %ebx
	je	LBB0_7
LBB0_6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r13, %rdi
	movl	$-1, %esi
	callq	_lua_tostring
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edi
	movq	%rax, %rdx
	callq	_fprintf
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r13, %rdi
	callq	_lua_close
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bit"

	.comm	_bitlib,4,2                     ## @bitlib
L_.str.1:                               ## @.str.1
	.asciz	"arg"

	.comm	_stderr,4,2                     ## @stderr
L_.str.2:                               ## @.str.2
	.asciz	"Error: %s\n"

.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	x21, x1
	mov	x22, x0
	bl	_luaL_newstate
	mov	x19, x0
	bl	_luaL_openlibs
Lloh0:
	adrp	x8, _bitlib@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bitlib@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_luaL_register
	subs	w20, w22, #2
	b.ge	LBB0_2
; %bb.1:
	mov	w0, #8
	b	LBB0_8
LBB0_2:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	bl	_lua_createtable
	ldr	x1, [x21, #8]
	mov	x0, x19
	bl	_lua_pushstring
	mov	x0, x19
	mov	w1, #-2
	mov	w2, #0
	bl	_lua_rawseti
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_lua_setglobal
	ldr	x1, [x21, #8]
	mov	x0, x19
	bl	_luaL_loadfile
	cbnz	x0, LBB0_7
; %bb.3:
	cmp	w22, #3
	b.lo	LBB0_6
; %bb.4:
	mov	w8, w22
	add	x21, x21, #16
	sub	x22, x8, #2
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x21], #8
	mov	x0, x19
	bl	_lua_pushstring
	subs	x22, x22, #1
	b.ne	LBB0_5
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	w3, #0
	bl	_lua_pcall
	cbz	x0, LBB0_9
LBB0_7:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w20, [x8]
	mov	x0, x19
	mov	w1, #-1
	bl	_lua_tostring
	mov	x2, x0
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	mov	w0, #1
LBB0_8:
	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
LBB0_9:
	mov	x0, x19
	bl	_lua_close
	mov	w0, #0
	b	LBB0_8
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bit"

	.comm	_bitlib,4,2                     ; @bitlib
l_.str.1:                               ; @.str.1
	.asciz	"arg"

	.comm	_stderr,4,2                     ; @stderr
l_.str.2:                               ; @.str.2
	.asciz	"Error: %s\n"

.subsections_via_symbols
