	.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, %rbx
	cmpl	$2, %edi
	jg	LBB0_2
## %bb.1:
	movq	(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	$1, %r13d
	jmp	LBB0_7
LBB0_2:
	movl	%edi, %r12d
	movq	8(%rbx), %r14
	movq	16(%rbx), %r13
	xorl	%eax, %eax
	callq	_luaL_newstate
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_luaL_openlibs
	movq	_LUA_COMMON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_luaL_dostring
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_luaL_dofile
	movl	$1, %r13d
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	addq	$16, %rbx
	addl	$-2, %r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%rbx, %rdx
	callq	_call_init
	movq	_RETRO_VFS_FILE_ACCESS_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_filestream_open
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	_value_provider@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_libretrodb_create
	movl	%eax, %r13d
	jmp	LBB0_6
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_printf
	movl	(%r12), %r13d
LBB0_6:
	movq	%r15, %rdi
	callq	_lua_close
	movq	%rbx, %rdi
	callq	_filestream_close
LBB0_7:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usage:\n%s <db file> <lua file> [args ...]\n"

	.comm	_LUA_COMMON,4,2                 ## @LUA_COMMON
	.comm	_RETRO_VFS_FILE_ACCESS_WRITE,4,2 ## @RETRO_VFS_FILE_ACCESS_WRITE
	.comm	_RETRO_VFS_FILE_ACCESS_HINT_NONE,4,2 ## @RETRO_VFS_FILE_ACCESS_HINT_NONE
L_.str.1:                               ## @.str.1
	.asciz	"Could not open destination file '%s': %s\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_value_provider,4,2             ## @value_provider
.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:
	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
	subs	w22, w0, #2
	b.gt	LBB0_2
; %bb.1:
	ldr	x1, [x21]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	mov	w20, #1
	b	LBB0_8
LBB0_2:
	ldr	x23, [x21, #16]!
	ldur	x20, [x21, #-8]
	bl	_luaL_newstate
	mov	x19, x0
	bl	_luaL_openlibs
Lloh2:
	adrp	x8, _LUA_COMMON@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LUA_COMMON@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_luaL_dostring
	mov	x0, x19
	mov	x1, x23
	bl	_luaL_dofile
	cbz	x0, LBB0_4
; %bb.3:
	mov	w20, #1
	b	LBB0_8
LBB0_4:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_call_init
Lloh5:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_WRITE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_WRITE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_filestream_open
	mov	x21, x0
	cbz	x0, LBB0_6
; %bb.5:
Lloh11:
	adrp	x1, _value_provider@GOTPAGE
Lloh12:
	ldr	x1, [x1, _value_provider@GOTPAGEOFF]
	mov	x0, x21
	mov	x2, x19
	bl	_libretrodb_create
	mov	x20, x0
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x22, _errno@GOTPAGE
Lloh14:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_strerror
	str	x0, [sp]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_printf
	ldr	w20, [x22]
LBB0_7:
	mov	x0, x19
	bl	_lua_close
	mov	x0, x21
	bl	_filestream_close
LBB0_8:
	mov	x0, x20
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usage:\n%s <db file> <lua file> [args ...]\n"

	.comm	_LUA_COMMON,4,2                 ; @LUA_COMMON
	.comm	_RETRO_VFS_FILE_ACCESS_WRITE,4,2 ; @RETRO_VFS_FILE_ACCESS_WRITE
	.comm	_RETRO_VFS_FILE_ACCESS_HINT_NONE,4,2 ; @RETRO_VFS_FILE_ACCESS_HINT_NONE
l_.str.1:                               ; @.str.1
	.asciz	"Could not open destination file '%s': %s\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_value_provider,4,2             ; @value_provider
.subsections_via_symbols
