	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CARTRIDGE_ReadConfig           ## -- Begin function CARTRIDGE_ReadConfig
	.p2align	4, 0x90
_CARTRIDGE_ReadConfig:                  ## @CARTRIDGE_ReadConfig
	.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
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.14:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	movq	_FALSE@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	jne	LBB0_18
## %bb.15:
	movq	%r14, %rdi
	callq	_Util_sscanbool
	testl	%eax, %eax
	js	LBB0_18
## %bb.16:
	movq	_CARTRIDGE_autoreboot@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_1:
	movq	_CARTRIDGE_main@GOTPCREL(%rip), %r15
	jmp	LBB0_2
LBB0_5:
	movq	%r14, %rdi
	callq	_Util_sscandec
	movq	_FALSE@GOTPCREL(%rip), %rbx
	testl	%eax, %eax
	js	LBB0_18
## %bb.6:
	movq	_CARTRIDGE_LAST_SUPPORTED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_18
## %bb.7:
	movq	_CARTRIDGE_main@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_9:
	movq	_CARTRIDGE_piggyback@GOTPCREL(%rip), %r15
LBB0_2:
	movl	4(%r15), %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_Util_strlcpy
	movl	(%r15), %eax
	movq	_CARTRIDGE_NONE@GOTPCREL(%rip), %rcx
	movq	_TRUE@GOTPCREL(%rip), %rbx
	cmpl	(%rcx), %eax
	jne	LBB0_18
## %bb.3:
	movq	_CARTRIDGE_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	jmp	LBB0_18
LBB0_11:
	movq	%r14, %rdi
	callq	_Util_sscandec
	movq	_FALSE@GOTPCREL(%rip), %rbx
	testl	%eax, %eax
	js	LBB0_18
## %bb.12:
	movq	_CARTRIDGE_LAST_SUPPORTED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_18
## %bb.13:
	movq	_CARTRIDGE_piggyback@GOTPCREL(%rip), %rcx
LBB0_17:
	movl	%eax, (%rcx)
	movq	_TRUE@GOTPCREL(%rip), %rbx
LBB0_18:
	movl	(%rbx), %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	"CARTRIDGE_FILENAME"

	.comm	_CARTRIDGE_main,8,2             ## @CARTRIDGE_main
	.comm	_CARTRIDGE_NONE,4,2             ## @CARTRIDGE_NONE
	.comm	_CARTRIDGE_UNKNOWN,8,3          ## @CARTRIDGE_UNKNOWN
L_.str.1:                               ## @.str.1
	.asciz	"CARTRIDGE_TYPE"

	.comm	_CARTRIDGE_LAST_SUPPORTED,4,2   ## @CARTRIDGE_LAST_SUPPORTED
	.comm	_FALSE,4,2                      ## @FALSE
L_.str.2:                               ## @.str.2
	.asciz	"CARTRIDGE_PIGGYBACK_FILENAME"

	.comm	_CARTRIDGE_piggyback,8,2        ## @CARTRIDGE_piggyback
L_.str.3:                               ## @.str.3
	.asciz	"CARTRIDGE_PIGGYBACK_TYPE"

L_.str.4:                               ## @.str.4
	.asciz	"CARTRIDGE_AUTOREBOOT"

	.comm	_CARTRIDGE_autoreboot,4,2       ## @CARTRIDGE_autoreboot
	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CARTRIDGE_ReadConfig           ; -- Begin function CARTRIDGE_ReadConfig
	.p2align	2
_CARTRIDGE_ReadConfig:                  ; @CARTRIDGE_ReadConfig
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_6
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_7
; %bb.2:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.3:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_13
; %bb.4:
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_16
LBB0_5:
Lloh10:
	adrp	x8, _FALSE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	b	LBB0_20
LBB0_6:
Lloh12:
	adrp	x20, _CARTRIDGE_main@GOTPAGE
Lloh13:
	ldr	x20, [x20, _CARTRIDGE_main@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
	mov	x0, x19
	bl	_Util_sscandec
Lloh14:
	adrp	x8, _FALSE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	tbnz	w0, #31, LBB0_20
; %bb.8:
Lloh16:
	adrp	x9, _CARTRIDGE_LAST_SUPPORTED@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CARTRIDGE_LAST_SUPPORTED@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w0, w9
	b.gt	LBB0_20
; %bb.9:
Lloh19:
	adrp	x8, _CARTRIDGE_main@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CARTRIDGE_main@GOTPAGEOFF]
	b	LBB0_18
LBB0_10:
Lloh21:
	adrp	x20, _CARTRIDGE_piggyback@GOTPAGE
Lloh22:
	ldr	x20, [x20, _CARTRIDGE_piggyback@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x20, #4]
	mov	x1, x19
	mov	w2, #4
	bl	_Util_strlcpy
	ldr	w8, [x20]
Lloh23:
	adrp	x9, _CARTRIDGE_NONE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _CARTRIDGE_NONE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.12:
Lloh26:
	adrp	x8, _CARTRIDGE_UNKNOWN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CARTRIDGE_UNKNOWN@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	str	w8, [x20]
	b	LBB0_19
LBB0_13:
	mov	x0, x19
	bl	_Util_sscandec
Lloh29:
	adrp	x8, _FALSE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	tbnz	w0, #31, LBB0_20
; %bb.14:
Lloh31:
	adrp	x9, _CARTRIDGE_LAST_SUPPORTED@GOTPAGE
Lloh32:
	ldr	x9, [x9, _CARTRIDGE_LAST_SUPPORTED@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	cmp	w0, w9
	b.gt	LBB0_20
; %bb.15:
Lloh34:
	adrp	x8, _CARTRIDGE_piggyback@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CARTRIDGE_piggyback@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:
	mov	x0, x19
	bl	_Util_sscanbool
	tbnz	w0, #31, LBB0_5
; %bb.17:
Lloh36:
	adrp	x8, _CARTRIDGE_autoreboot@GOTPAGE
Lloh37:
	ldr	x8, [x8, _CARTRIDGE_autoreboot@GOTPAGEOFF]
LBB0_18:
	str	w0, [x8]
LBB0_19:
Lloh38:
	adrp	x8, _TRUE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
LBB0_20:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CARTRIDGE_FILENAME"

	.comm	_CARTRIDGE_main,8,2             ; @CARTRIDGE_main
	.comm	_CARTRIDGE_NONE,4,2             ; @CARTRIDGE_NONE
	.comm	_CARTRIDGE_UNKNOWN,8,3          ; @CARTRIDGE_UNKNOWN
l_.str.1:                               ; @.str.1
	.asciz	"CARTRIDGE_TYPE"

	.comm	_CARTRIDGE_LAST_SUPPORTED,4,2   ; @CARTRIDGE_LAST_SUPPORTED
	.comm	_FALSE,4,2                      ; @FALSE
l_.str.2:                               ; @.str.2
	.asciz	"CARTRIDGE_PIGGYBACK_FILENAME"

	.comm	_CARTRIDGE_piggyback,8,2        ; @CARTRIDGE_piggyback
l_.str.3:                               ; @.str.3
	.asciz	"CARTRIDGE_PIGGYBACK_TYPE"

l_.str.4:                               ; @.str.4
	.asciz	"CARTRIDGE_AUTOREBOOT"

	.comm	_CARTRIDGE_autoreboot,4,2       ; @CARTRIDGE_autoreboot
	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
