	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mgn_opt_region
_mgn_opt_region:                        ## @mgn_opt_region
	.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	_PicoRegionOverride@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$-6, (%rsi)
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.1:
	addl	%ecx, %ecx
	je	LBB0_2
## %bb.3:
	movl	$-1, %eax
	movl	%ecx, %edx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	sarl	%edx
	incl	%eax
	cmpl	$3, %ecx
	movl	%edx, %ecx
	ja	LBB0_4
## %bb.5:
	cmpl	$3, %eax
	jbe	LBB0_6
## %bb.19:
	leaq	L_.str.9(%rip), %rax
	jmp	LBB0_18
LBB0_8:
	movq	_static_buff@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	leaq	L_.str.10(%rip), %rsi
	callq	_strcpy
	movq	_PicoAutoRgnOrder@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	xorl	%eax, %eax
	andl	$15, %ecx
	je	LBB0_11
## %bb.9:
	movl	%ecx, %edx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	shrl	%edx
	incq	%rax
	cmpl	$1, %ecx
	movl	%edx, %ecx
	ja	LBB0_10
LBB0_11:
	movq	(%rbx), %rdi
	leaq	_mgn_opt_region.names_short(%rip), %r14
	movq	(%r14,%rax,8), %rsi
	callq	_strcat
	movl	(%r15), %ecx
	shrl	$4, %ecx
	xorl	%eax, %eax
	andl	$15, %ecx
	je	LBB0_14
## %bb.12:
	movl	%ecx, %edx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	shrl	%edx
	incq	%rax
	cmpl	$1, %ecx
	movl	%edx, %ecx
	ja	LBB0_13
LBB0_14:
	movq	(%rbx), %rdi
	movq	(%r14,%rax,8), %rsi
	callq	_strcat
	movl	(%r15), %ecx
	shrl	$8, %ecx
	xorl	%eax, %eax
	andl	$15, %ecx
	je	LBB0_17
## %bb.15:
	movl	%ecx, %edx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	shrl	%edx
	incq	%rax
	cmpl	$1, %ecx
	movl	%edx, %ecx
	ja	LBB0_16
LBB0_17:
	movq	(%rbx), %rdi
	movq	(%r14,%rax,8), %rsi
	callq	_strcat
	movq	(%rbx), %rax
	jmp	LBB0_18
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_6:
	incl	%eax
LBB0_7:
	movl	%eax, %eax
	leaq	_reltable.mgn_opt_region(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @reltable.mgn_opt_region
_reltable.mgn_opt_region:
	.long	L_.str-_reltable.mgn_opt_region
	.long	L_.str.1-_reltable.mgn_opt_region
	.long	L_.str.2-_reltable.mgn_opt_region
	.long	L_.str.3-_reltable.mgn_opt_region
	.long	L_.str.4-_reltable.mgn_opt_region

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Auto"

L_.str.1:                               ## @.str.1
	.asciz	"      Japan NTSC"

L_.str.2:                               ## @.str.2
	.asciz	"      Japan PAL"

L_.str.3:                               ## @.str.3
	.asciz	"      USA"

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

	.section	__DATA,__const
	.p2align	4                               ## @mgn_opt_region.names_short
_mgn_opt_region.names_short:
	.quad	L_.str.5
	.quad	L_.str.6
	.quad	L_.str.6
	.quad	L_.str.7
	.quad	L_.str.8

	.section	__TEXT,__cstring,cstring_literals
L_.str.5:                               ## @.str.5
	.space	1

L_.str.6:                               ## @.str.6
	.asciz	" JP"

L_.str.7:                               ## @.str.7
	.asciz	" US"

L_.str.8:                               ## @.str.8
	.asciz	" EU"

	.comm	_PicoRegionOverride,4,2         ## @PicoRegionOverride
L_.str.9:                               ## @.str.9
	.asciz	"unknown"

	.comm	_static_buff,8,3                ## @static_buff
L_.str.10:                              ## @.str.10
	.asciz	"Auto:"

	.comm	_PicoAutoRgnOrder,4,2           ## @PicoAutoRgnOrder
	.no_dead_strip	_mgn_opt_region
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mgn_opt_region
_mgn_opt_region:                        ; @mgn_opt_region
	.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
Lloh0:
	adrp	x8, _PicoRegionOverride@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PicoRegionOverride@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #-6
	str	w9, [x1]
	cbz	w8, LBB0_6
; %bb.1:
	lsl	w9, w8, #1
	cbz	w9, LBB0_9
; %bb.2:
	mov	w8, #-1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	asr	w10, w9, #1
	add	w8, w8, #1
	cmp	w9, #3
	mov	x9, x10
	b.hi	LBB0_3
; %bb.4:
	cmp	w8, #3
	b.ls	LBB0_10
; %bb.5:
Lloh3:
	adrp	x0, l_.str.9@PAGE
Lloh4:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_22
LBB0_6:
Lloh5:
	adrp	x19, _static_buff@GOTPAGE
Lloh6:
	ldr	x19, [x19, _static_buff@GOTPAGEOFF]
	ldr	x0, [x19]
Lloh7:
	adrp	x1, l_.str.10@PAGE
Lloh8:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_strcpy
Lloh9:
	adrp	x20, _PicoAutoRgnOrder@GOTPAGE
Lloh10:
	ldr	x20, [x20, _PicoAutoRgnOrder@GOTPAGEOFF]
	ldr	w8, [x20]
	ands	w9, w8, #0xf
	b.eq	LBB0_12
; %bb.7:
	mov	x8, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w10, w9, #1
	add	x8, x8, #1
	cmp	w9, #1
	mov	x9, x10
	b.hi	LBB0_8
	b	LBB0_13
LBB0_9:
	mov	w8, #0
	b	LBB0_11
LBB0_10:
	add	w8, w8, #1
LBB0_11:
Lloh11:
	adrp	x9, _mgn_opt_region.names@PAGE
Lloh12:
	add	x9, x9, _mgn_opt_region.names@PAGEOFF
	ldr	x0, [x9, w8, uxtw #3]
	b	LBB0_22
LBB0_12:
	mov	x8, #0
LBB0_13:
	ldr	x0, [x19]
Lloh13:
	adrp	x21, _mgn_opt_region.names_short@PAGE
Lloh14:
	add	x21, x21, _mgn_opt_region.names_short@PAGEOFF
	ldr	x1, [x21, x8, lsl #3]
	bl	_strcat
	ldr	w8, [x20]
	ubfx	w9, w8, #4, #4
	cbz	w9, LBB0_16
; %bb.14:
	mov	x8, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	lsr	w10, w9, #1
	add	x8, x8, #1
	cmp	w9, #1
	mov	x9, x10
	b.hi	LBB0_15
	b	LBB0_17
LBB0_16:
	mov	x8, #0
LBB0_17:
	ldr	x0, [x19]
	ldr	x1, [x21, x8, lsl #3]
	bl	_strcat
	ldr	w8, [x20]
	ubfx	w9, w8, #8, #4
	cbz	w9, LBB0_20
; %bb.18:
	mov	x8, #0
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	lsr	w10, w9, #1
	add	x8, x8, #1
	cmp	w9, #1
	mov	x9, x10
	b.hi	LBB0_19
	b	LBB0_21
LBB0_20:
	mov	x8, #0
LBB0_21:
	ldr	x0, [x19]
	ldr	x1, [x21, x8, lsl #3]
	bl	_strcat
	ldr	x0, [x19]
LBB0_22:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__const
	.p2align	3                               ; @mgn_opt_region.names
_mgn_opt_region.names:
	.quad	l_.str
	.quad	l_.str.1
	.quad	l_.str.2
	.quad	l_.str.3
	.quad	l_.str.4

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Auto"

l_.str.1:                               ; @.str.1
	.asciz	"      Japan NTSC"

l_.str.2:                               ; @.str.2
	.asciz	"      Japan PAL"

l_.str.3:                               ; @.str.3
	.asciz	"      USA"

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

	.section	__DATA,__const
	.p2align	3                               ; @mgn_opt_region.names_short
_mgn_opt_region.names_short:
	.quad	l_.str.5
	.quad	l_.str.6
	.quad	l_.str.6
	.quad	l_.str.7
	.quad	l_.str.8

	.section	__TEXT,__cstring,cstring_literals
l_.str.5:                               ; @.str.5
	.space	1

l_.str.6:                               ; @.str.6
	.asciz	" JP"

l_.str.7:                               ; @.str.7
	.asciz	" US"

l_.str.8:                               ; @.str.8
	.asciz	" EU"

	.comm	_PicoRegionOverride,4,2         ; @PicoRegionOverride
l_.str.9:                               ; @.str.9
	.asciz	"unknown"

	.comm	_static_buff,8,3                ; @static_buff
l_.str.10:                              ; @.str.10
	.asciz	"Auto:"

	.comm	_PicoAutoRgnOrder,4,2           ; @PicoAutoRgnOrder
	.no_dead_strip	_mgn_opt_region
.subsections_via_symbols
