	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reloadrom                      ## -- Begin function reloadrom
	.p2align	4, 0x90
_reloadrom:                             ## @reloadrom
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_config@GOTPCREL(%rip), %r14
	cmpl	$3, (%r14)
	movq	_system_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_SYSTEM_MCD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jne	LBB0_6
## %bb.1:
	cmpl	%ecx, %eax
	jne	LBB0_3
## %bb.2:
	movq	_scd@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_7
LBB0_3:
	movq	_SYSTEM_PBC@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_SYSTEM_MD@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_md_cart_init
	movl	$1, %edi
	callq	_md_cart_reset
	jmp	LBB0_9
LBB0_6:
	cmpl	%ecx, %eax
	jne	LBB0_8
LBB0_7:
	movq	_cdd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CD_OPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
LBB0_8:
	movq	_interlaced@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_SAMPLERATE_48KHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_get_framerate
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_audio_init
	xorl	%eax, %eax
	callq	_system_init
	xorl	%eax, %eax
	callq	_system_reset
	orb	$2, (%r14)
	jmp	LBB0_9
LBB0_5:
	xorl	%eax, %eax
	callq	_sms_cart_init
	xorl	%eax, %eax
	callq	_sms_cart_reset
LBB0_9:
	movl	4(%r14), %esi
	xorl	%edi, %edi
	callq	_slot_autoload
	movl	4(%r14), %esi
	movl	8(%r14), %edi
	callq	_slot_autoload
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_CheatLoad                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_config,12,2                    ## @config
	.comm	_system_hw,4,2                  ## @system_hw
	.comm	_SYSTEM_MCD,4,2                 ## @SYSTEM_MCD
	.comm	_scd,8,3                        ## @scd
	.comm	_SYSTEM_PBC,4,2                 ## @SYSTEM_PBC
	.comm	_SYSTEM_MD,4,2                  ## @SYSTEM_MD
	.comm	_cdd,8,3                        ## @cdd
	.comm	_CD_OPEN,8,3                    ## @CD_OPEN
	.comm	_interlaced,8,3                 ## @interlaced
	.comm	_SAMPLERATE_48KHZ,4,2           ## @SAMPLERATE_48KHZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reloadrom                      ; -- Begin function reloadrom
	.p2align	2
_reloadrom:                             ; @reloadrom
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x20, _config@GOTPAGE
Lloh1:
	ldr	x20, [x20, _config@GOTPAGEOFF]
Lloh2:
	adrp	x8, _system_hw@GOTPAGE
Lloh3:
	ldr	x8, [x8, _system_hw@GOTPAGEOFF]
	ldr	w10, [x20]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _SYSTEM_MCD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SYSTEM_MCD@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w10, #3
	b.ne	LBB0_4
; %bb.1:
Lloh8:
	adrp	x10, _scd@GOTPAGE
Lloh9:
	ldr	x10, [x10, _scd@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	w8, w9
	ccmp	x10, #0, #0, eq
	b.eq	LBB0_5
; %bb.2:
Lloh11:
	adrp	x9, _SYSTEM_PBC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SYSTEM_PBC@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh14:
	adrp	x9, _SYSTEM_MD@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SYSTEM_MD@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.3:
	bl	_md_cart_init
	mov	w0, #1
	bl	_md_cart_reset
	b	LBB0_8
LBB0_4:
	cmp	w8, w9
	b.ne	LBB0_6
LBB0_5:
Lloh17:
	adrp	x8, _cdd@GOTPAGE
Lloh18:
	ldr	x8, [x8, _cdd@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
Lloh20:
	adrp	x9, _CD_OPEN@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CD_OPEN@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
LBB0_6:
Lloh23:
	adrp	x8, _interlaced@GOTPAGE
Lloh24:
	ldr	x8, [x8, _interlaced@GOTPAGEOFF]
Lloh25:
	str	xzr, [x8]
Lloh26:
	adrp	x8, _SAMPLERATE_48KHZ@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SAMPLERATE_48KHZ@GOTPAGEOFF]
Lloh28:
	ldr	w19, [x8]
	bl	_get_framerate
	mov	x1, x0
	mov	x0, x19
	bl	_audio_init
	bl	_system_init
	bl	_system_reset
	ldr	w8, [x20]
	orr	w8, w8, #0x2
	str	w8, [x20]
	b	LBB0_8
LBB0_7:
	bl	_sms_cart_init
	bl	_sms_cart_reset
LBB0_8:
	ldr	w1, [x20, #4]
	mov	w0, #0
	bl	_slot_autoload
	ldp	w1, w0, [x20, #4]
	bl	_slot_autoload
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_CheatLoad
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_config,12,2                    ; @config
	.comm	_system_hw,4,2                  ; @system_hw
	.comm	_SYSTEM_MCD,4,2                 ; @SYSTEM_MCD
	.comm	_scd,8,3                        ; @scd
	.comm	_SYSTEM_PBC,4,2                 ; @SYSTEM_PBC
	.comm	_SYSTEM_MD,4,2                  ; @SYSTEM_MD
	.comm	_cdd,8,3                        ; @cdd
	.comm	_CD_OPEN,8,3                    ; @CD_OPEN
	.comm	_interlaced,8,3                 ; @interlaced
	.comm	_SAMPLERATE_48KHZ,4,2           ; @SAMPLERATE_48KHZ
.subsections_via_symbols
