	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function slot_autoload
LCPI0_0:
	.long	0                               ## 0x0
	.long	4294967293                      ## 0xfffffffd
	.long	0                               ## 0x0
	.long	4294967293                      ## 0xfffffffd
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_slot_autoload
	.p2align	4, 0x90
_slot_autoload:                         ## @slot_autoload
	.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
	movl	%esi, %r14d
	movl	%edi, %r15d
	testl	%edi, %edi
	je	LBB0_1
## %bb.22:
	movq	_config@GOTPCREL(%rip), %rax
	testb	$2, (%rax)
	jne	LBB0_19
	jmp	LBB0_21
LBB0_1:
	movq	_system_hw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_SYSTEM_MCD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.2:
	movq	_brm_filename@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_region_code@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	sarl	$6, %ecx
	xorl	$1, %ecx
	movslq	%ecx, %rcx
	movl	-4(%rax,%rcx,4), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	movq	_scd@GOTPCREL(%rip), %r13
	movq	24(%r13), %rdi
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rbx
	movl	$8192, %esi                     ## imm = 0x2000
	movl	$1, %edx
	movq	%rax, %rcx
	callq	_fread
	movq	%rbx, %rdi
	callq	_fclose
	movq	24(%r13), %rsi
	xorl	%edi, %edi
	movl	$8192, %edx                     ## imm = 0x2000
	callq	_crc32
	movq	_brm_crc@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%rcx)
	movq	24(%r13), %rdi
	jmp	LBB0_5
LBB0_4:
	movq	$0, 65528(%rdi)
LBB0_5:
	addq	$65280, %rdi                    ## imm = 0xFF00
	movq	_brm_format@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	subq	$-128, %rsi
	movl	$32, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	24(%r13), %rdi
	xorl	%esi, %esi
	movl	$8128, %edx                     ## imm = 0x1FC0
	callq	_memset
	movq	(%rbx), %rsi
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,4294967293,0,4294967293]
	movups	%xmm0, 80(%rsi)
	movups	%xmm0, 64(%rsi)
	movl	$65024, %edi                    ## imm = 0xFE00
	addq	24(%r13), %rdi
	movl	$64, %edx
	callq	_memcpy
	movq	_brm_crc@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	$0, (%rax)
LBB0_7:
	cmpq	$0, 16(%r13)
	je	LBB0_18
## %bb.8:
	movq	_CART_BRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_16
## %bb.9:
	movq	%rax, %r12
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movl	(%r13), %eax
	leal	1(%rax), %r13d
	movq	_CHUNKSIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	xorl	%ebx, %ebx
	cmpl	%esi, %eax
	jl	LBB0_13
## %bb.10:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	_scd@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rbx
	leaq	(,%rbx,8), %rdi
	addq	8(%r15), %rdi
	movl	$1, %edx
	movq	%r12, %rcx
	callq	_fread
	movl	(%r14), %esi
	addl	%esi, %ebx
	subl	%esi, %r13d
	cmpl	%esi, %r13d
	jg	LBB0_11
## %bb.12:
	movslq	%ebx, %rbx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
LBB0_13:
	testl	%r13d, %r13d
	movq	_scd@GOTPCREL(%rip), %r14
	je	LBB0_15
## %bb.14:
	shlq	$3, %rbx
	addq	8(%r14), %rbx
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	$1, %edx
	movq	%r12, %rcx
	callq	_fread
LBB0_15:
	movq	%r12, %rdi
	callq	_fclose
	movq	8(%r14), %rsi
	movl	(%r14), %edx
	incl	%edx
	xorl	%edi, %edi
	callq	_crc32
	movq	_brm_crc@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 8(%rcx)
	movq	%r14, %r13
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movq	_brm_format@GOTPCREL(%rip), %rbx
LBB0_16:
	movq	8(%r13), %rax
	movslq	(%r13), %rcx
	leaq	(%rax,%rcx,8), %rdi
	addq	$-248, %rdi
	movq	(%rbx), %rsi
	subq	$-128, %rsi
	movl	$32, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	8(%r13), %rdi
	movl	(%r13), %edx
	incl	%edx
	xorl	%esi, %esi
	callq	_memset
	movslq	(%r13), %rax
	leal	1(%rax), %ecx
	leal	64(%rax), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$6, %edx
	leal	-3(%rdx), %ecx
	sarl	$8, %ecx
	movq	(%rbx), %rsi
	movl	%ecx, 88(%rsi)
	movl	%ecx, 80(%rsi)
	movl	%ecx, 72(%rsi)
	movl	%ecx, 64(%rsi)
	addl	$253, %edx
	movzbl	%dl, %ecx
	movl	%ecx, 92(%rsi)
	movl	%ecx, 84(%rsi)
	movl	%ecx, 76(%rsi)
	movl	%ecx, 68(%rsi)
	movq	8(%r13), %rcx
	leaq	(%rcx,%rax,8), %rdi
	addq	$-504, %rdi                     ## imm = 0xFE08
	movl	$64, %edx
	callq	_memcpy
LBB0_18:
	movq	_config@GOTPCREL(%rip), %rax
	testb	$1, (%rax)
	je	LBB0_21
LBB0_19:
	movq	_rom_filename@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strlen
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	_SILENT@GOTPCREL(%rip), %rbx
	movl	$1, (%rbx)
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_slot_load
	movl	$0, (%rbx)
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_system_hw,8,3                  ## @system_hw
	.comm	_SYSTEM_MCD,8,3                 ## @SYSTEM_MCD
	.comm	_brm_filename,8,3               ## @brm_filename
	.comm	_region_code,4,2                ## @region_code
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_scd,32,3                       ## @scd
	.comm	_brm_crc,8,3                    ## @brm_crc
	.comm	_brm_format,8,3                 ## @brm_format
	.comm	_CART_BRAM,4,2                  ## @CART_BRAM
	.comm	_CHUNKSIZE,4,2                  ## @CHUNKSIZE
	.comm	_config,4,2                     ## @config
	.comm	_rom_filename,4,2               ## @rom_filename
	.comm	_SILENT,4,2                     ## @SILENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function slot_autoload
lCPI0_0:
	.long	0                               ; 0x0
	.long	4294967293                      ; 0xfffffffd
	.long	0                               ; 0x0
	.long	4294967293                      ; 0xfffffffd
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_slot_autoload
	.p2align	2
_slot_autoload:                         ; @slot_autoload
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _config@GOTPAGE
Lloh1:
	ldr	x8, [x8, _config@GOTPAGEOFF]
	ldrb	w8, [x8]
	tbnz	w8, #1, LBB0_21
	b	LBB0_23
LBB0_2:
Lloh2:
	adrp	x8, _system_hw@GOTPAGE
Lloh3:
	ldr	x8, [x8, _system_hw@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _SYSTEM_MCD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SYSTEM_MCD@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.3:
Lloh8:
	adrp	x8, _brm_filename@GOTPAGE
Lloh9:
	ldr	x8, [x8, _brm_filename@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _region_code@GOTPAGE
Lloh12:
	ldr	x9, [x9, _region_code@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	asr	w9, w9, #6
	eor	w9, w9, #0x1
	sub	w9, w9, #1
	ldr	w0, [x8, w9, sxtw #2]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	mov	x21, x0
Lloh16:
	adrp	x23, _scd@GOTPAGE
Lloh17:
	ldr	x23, [x23, _scd@GOTPAGEOFF]
	ldr	x0, [x23, #24]
Lloh18:
	adrp	x24, _brm_crc@GOTPAGE
Lloh19:
	ldr	x24, [x24, _brm_crc@GOTPAGEOFF]
	cbz	x21, LBB0_5
; %bb.4:
	mov	w1, #8192
	mov	w2, #1
	mov	x3, x21
	bl	_fread
	mov	x0, x21
	bl	_fclose
	ldr	x1, [x23, #24]
	mov	w0, #0
	mov	w2, #8192
	bl	_crc32
	ldr	x8, [x24]
	str	x0, [x8]
	ldr	x0, [x23, #24]
	b	LBB0_6
LBB0_5:
	mov	w8, #65528
	str	xzr, [x0, x8]
LBB0_6:
	mov	w8, #65280
	add	x0, x0, x8
Lloh20:
	adrp	x25, _brm_format@GOTPAGE
Lloh21:
	ldr	x25, [x25, _brm_format@GOTPAGEOFF]
	ldr	x8, [x25]
	add	x1, x8, #128
	mov	w2, #32
	bl	_memcmp
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x0, [x23, #24]
	mov	w1, #0
	mov	w2, #8128
	bl	_memset
	ldr	x1, [x25]
Lloh22:
	adrp	x8, lCPI0_0@PAGE
Lloh23:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	stp	q0, q0, [x1, #64]
	ldr	x8, [x23, #24]
	mov	w9, #65024
	add	x0, x8, x9
	mov	w2, #64
	bl	_memcpy
	ldr	x8, [x24]
	str	xzr, [x8]
LBB0_8:
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_20
; %bb.9:
Lloh24:
	adrp	x8, _CART_BRAM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CART_BRAM@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_18
; %bb.10:
	mov	x21, x0
	ldr	w8, [x23]
	add	w22, w8, #1
Lloh29:
	adrp	x26, _CHUNKSIZE@GOTPAGE
Lloh30:
	ldr	x26, [x26, _CHUNKSIZE@GOTPAGEOFF]
	ldr	w1, [x26]
	cmp	w8, w1
	b.ge	LBB0_12
; %bb.11:
	mov	x8, #0
	b	LBB0_15
LBB0_12:
	mov	w27, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	add	x0, x8, w27, sxtw #3
	mov	w2, #1
	mov	x3, x21
	bl	_fread
	ldr	w1, [x26]
	add	w27, w1, w27
	sub	w22, w22, w1
	cmp	w22, w1
	b.gt	LBB0_13
; %bb.14:
	sxtw	x8, w27
LBB0_15:
	cbz	w22, LBB0_17
; %bb.16:
	ldr	x9, [x23, #8]
	add	x0, x9, x8, lsl #3
	mov	x1, x22
	mov	w2, #1
	mov	x3, x21
	bl	_fread
LBB0_17:
	mov	x0, x21
	bl	_fclose
	ldr	x1, [x23, #8]
	ldr	w8, [x23]
	add	w2, w8, #1
	mov	w0, #0
	bl	_crc32
	ldr	x8, [x24]
	str	x0, [x8, #8]
LBB0_18:
	ldr	x8, [x23, #8]
	ldrsw	x9, [x23]
	add	x8, x8, x9, lsl #3
	sub	x0, x8, #248
	ldr	x8, [x25]
	add	x1, x8, #128
	mov	w2, #32
	bl	_memcmp
	cbz	x0, LBB0_20
; %bb.19:
	ldr	x0, [x23, #8]
	ldr	w8, [x23]
	add	w2, w8, #1
	mov	w1, #0
	bl	_memset
	ldrsw	x8, [x23]
	add	w9, w8, #1
	add	w10, w8, #64
	cmp	w9, #0
	csinc	w9, w10, w8, lt
	asr	w9, w9, #6
	sub	w10, w9, #3
	asr	w10, w10, #8
	ldr	x1, [x25]
	add	w9, w9, #253
	and	w9, w9, #0xff
	stp	w10, w9, [x1, #88]
	stp	w10, w9, [x1, #80]
	stp	w10, w9, [x1, #72]
	stp	w10, w9, [x1, #64]
	ldr	x9, [x23, #8]
	add	x8, x9, x8, lsl #3
	sub	x0, x8, #504
	mov	w2, #64
	bl	_memcpy
LBB0_20:
Lloh31:
	adrp	x8, _config@GOTPAGE
Lloh32:
	ldr	x8, [x8, _config@GOTPAGEOFF]
	ldrb	w8, [x8]
	tbz	w8, #0, LBB0_23
LBB0_21:
Lloh33:
	adrp	x8, _rom_filename@GOTPAGE
Lloh34:
	ldr	x8, [x8, _rom_filename@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	bl	_strlen
	cbz	x0, LBB0_23
; %bb.22:
Lloh36:
	adrp	x21, _SILENT@GOTPAGE
Lloh37:
	ldr	x21, [x21, _SILENT@GOTPAGEOFF]
	mov	w8, #1
	str	w8, [x21]
	mov	x0, x20
	mov	x1, x19
	bl	_slot_load
	str	wzr, [x21]
LBB0_23:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdr	Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_system_hw,8,3                  ; @system_hw
	.comm	_SYSTEM_MCD,8,3                 ; @SYSTEM_MCD
	.comm	_brm_filename,8,3               ; @brm_filename
	.comm	_region_code,4,2                ; @region_code
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_scd,32,3                       ; @scd
	.comm	_brm_crc,8,3                    ; @brm_crc
	.comm	_brm_format,8,3                 ; @brm_format
	.comm	_CART_BRAM,4,2                  ; @CART_BRAM
	.comm	_CHUNKSIZE,4,2                  ; @CHUNKSIZE
	.comm	_config,4,2                     ; @config
	.comm	_rom_filename,4,2               ; @rom_filename
	.comm	_SILENT,4,2                     ; @SILENT
.subsections_via_symbols
