	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_region                     ## -- Begin function get_region
	.p2align	4, 0x90
_get_region:                            ## @get_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	%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
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movq	_system_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_SYSTEM_MCD@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.2:
	movsbl	523(%rdi), %eax
	cmpl	$100, %eax
	je	LBB0_74
## %bb.3:
	cmpl	$122, %eax
	jne	LBB0_77
## %bb.4:
	movq	_REGION_USA@GOTPCREL(%rip), %rax
	jmp	LBB0_78
LBB0_5:
	movq	_rom_region@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_region_code@GOTPCREL(%rip), %rax
	jmp	LBB0_81
LBB0_6:
	movq	_SYSTEM_MD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
## %bb.7:
	movq	_rominfo@GOTPCREL(%rip), %rbx
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	$3, %edx
	callq	_memcmp
	movq	_REGION_EUROPE@GOTPCREL(%rip), %r14
	testl	%eax, %eax
	je	LBB0_18
## %bb.8:
	movq	16(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	$3, %edx
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_18
## %bb.9:
	movq	16(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edx
	callq	_memcmp
	movq	_REGION_JAPAN_NTSC@GOTPCREL(%rip), %r15
	testl	%eax, %eax
	je	LBB0_20
## %bb.10:
	movq	16(%rbx), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	$3, %edx
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_20
## %bb.11:
	movq	16(%rbx), %rdi
	leaq	L_.str.4(%rip), %rsi
	movl	$3, %edx
	callq	_memcmp
	movq	_REGION_USA@GOTPCREL(%rip), %r12
	testl	%eax, %eax
	je	LBB0_69
## %bb.12:
	movq	16(%rbx), %rdi
	leaq	L_.str.5(%rip), %rsi
	movl	$3, %edx
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_69
## %bb.13:
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	callq	_toupper
                                        ## kill: def $al killed $al def $rax
	leal	-69(%rax), %ecx
	cmpb	$16, %cl
	ja	LBB0_23
## %bb.14:
	movl	$4, %r13d
	movzbl	%cl, %ecx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_22:
	movl	$1, %r13d
	jmp	LBB0_27
LBB0_18:
	movq	%r14, %r12
	jmp	LBB0_69
LBB0_16:
	xorl	%eax, %eax
	callq	_sms_cart_region_detect
	jmp	LBB0_79
LBB0_20:
	movq	%r15, %r12
LBB0_69:
	movl	(%r12), %eax
	movq	_region_code@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	8(%rbx), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_71
## %bb.70:
	cmpl	$3969, (%rbx)                   ## imm = 0xF81
	je	LBB0_74
LBB0_71:
	movl	8(%rbx), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	jne	LBB0_74
## %bb.72:
	movl	8(%rbx), %edi
	leaq	L_.str.8(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	jne	LBB0_74
## %bb.73:
	movl	8(%rbx), %edi
	leaq	L_.str.9(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_75
LBB0_74:
	movq	_REGION_EUROPE@GOTPCREL(%rip), %rax
	jmp	LBB0_78
LBB0_75:
	cmpl	$21294, 4(%rbx)                 ## imm = 0x532E
	jne	LBB0_80
## %bb.76:
	movl	8(%rbx), %edi
	leaq	L_.str.10(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_80
LBB0_77:
	movq	_REGION_JAPAN_NTSC@GOTPCREL(%rip), %rax
LBB0_78:
	movl	(%rax), %eax
LBB0_79:
	movq	_region_code@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_80:
	movq	_region_code@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_rom_region@GOTPCREL(%rip), %rax
LBB0_81:
	movl	%ecx, (%rax)
	movq	_config@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	decl	%edx
	cmpl	$3, %edx
	ja	LBB0_83
## %bb.82:
	movslq	%edx, %rcx
	leaq	l_switch.table.get_region(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movl	(%rcx), %ecx
	movq	_region_code@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
LBB0_83:
	shrl	$6, %ecx
	movq	_vdp_pal@GOTPCREL(%rip), %r8
	andl	$1, %ecx
	movl	%ecx, (%r8)
	movq	_MCLOCK_PAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_MCLOCK_NTSC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%edi, %ecx
	cmovel	%esi, %ecx
	movq	_system_clock@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	movl	4(%rax), %ebx
	cmpl	$1, %ebx
	je	LBB0_86
## %bb.84:
	cmpl	$2, %ebx
	jne	LBB0_88
## %bb.85:
	movl	$1, %ebx
	jmp	LBB0_87
LBB0_86:
	xorl	%ebx, %ebx
LBB0_87:
	movl	%ebx, (%r8)
LBB0_88:
	movl	8(%rax), %eax
	cmpl	$1, %eax
	je	LBB0_91
## %bb.89:
	cmpl	$2, %eax
	jne	LBB0_92
## %bb.90:
	movl	%edi, %esi
LBB0_91:
	movl	%esi, (%rdx)
LBB0_92:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	$8, %r13d
	jmp	LBB0_27
LBB0_23:
	movzbl	%al, %r13d
	cmpb	$16, %al
	jl	LBB0_27
## %bb.24:
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	ja	LBB0_26
## %bb.25:
	addl	$-48, %r13d
	jmp	LBB0_27
LBB0_26:
	addb	$-65, %al
	addl	$-55, %r13d
	xorl	%ecx, %ecx
	cmpb	$6, %al
	cmovael	%ecx, %r13d
LBB0_27:
	movq	16(%rbx), %rax
	movl	8(%rax), %edi
	callq	_toupper
                                        ## kill: def $al killed $al def $rax
	leal	-69(%rax), %ecx
	cmpb	$16, %cl
	ja	LBB0_33
## %bb.28:
	movzbl	%cl, %ecx
	leaq	LJTI0_1(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_31:
	orl	$1, %r13d
	jmp	LBB0_39
LBB0_29:
	orl	$8, %r13d
	jmp	LBB0_39
LBB0_32:
	orl	$4, %r13d
	jmp	LBB0_39
LBB0_33:
	movzbl	%al, %ecx
	cmpb	$16, %al
	jl	LBB0_38
## %bb.34:
	leal	-48(%rax), %edx
	cmpb	$10, %dl
	jae	LBB0_36
## %bb.35:
	addl	$-48, %ecx
	jmp	LBB0_38
LBB0_36:
	addb	$-65, %al
	cmpb	$5, %al
	ja	LBB0_39
## %bb.37:
	addl	$-55, %ecx
LBB0_38:
	orl	%ecx, %r13d
LBB0_39:
	movq	16(%rbx), %rax
	movl	16(%rax), %edi
	callq	_toupper
                                        ## kill: def $al killed $al def $rax
	leal	-69(%rax), %ecx
	cmpb	$16, %cl
	ja	LBB0_45
## %bb.40:
	movzbl	%cl, %ecx
	leaq	LJTI0_2(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_43:
	orl	$1, %r13d
	jmp	LBB0_51
LBB0_41:
	orl	$8, %r13d
	jmp	LBB0_51
LBB0_44:
	orl	$4, %r13d
	jmp	LBB0_51
LBB0_45:
	movzbl	%al, %ecx
	cmpb	$16, %al
	jl	LBB0_50
## %bb.46:
	leal	-48(%rax), %edx
	cmpb	$10, %dl
	jae	LBB0_48
## %bb.47:
	addl	$-48, %ecx
	jmp	LBB0_50
LBB0_48:
	addb	$-65, %al
	cmpb	$5, %al
	ja	LBB0_51
## %bb.49:
	addl	$-55, %ecx
LBB0_50:
	orl	%ecx, %r13d
LBB0_51:
	movq	16(%rbx), %rax
	movl	24(%rax), %edi
	callq	_toupper
                                        ## kill: def $al killed $al def $rax
	leal	-69(%rax), %ecx
	cmpb	$16, %cl
	ja	LBB0_57
## %bb.52:
	movzbl	%cl, %ecx
	leaq	LJTI0_3(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_55:
	orl	$1, %r13d
	jmp	LBB0_63
LBB0_53:
	orl	$8, %r13d
	jmp	LBB0_63
LBB0_56:
	orl	$4, %r13d
	jmp	LBB0_63
LBB0_57:
	movzbl	%al, %ecx
	cmpb	$16, %al
	jl	LBB0_62
## %bb.58:
	leal	-48(%rax), %edx
	cmpb	$10, %dl
	jae	LBB0_60
## %bb.59:
	addl	$-48, %ecx
	jmp	LBB0_62
LBB0_60:
	addb	$-65, %al
	cmpb	$5, %al
	ja	LBB0_63
## %bb.61:
	addl	$-55, %ecx
LBB0_62:
	orl	%ecx, %r13d
LBB0_63:
	testb	$4, %r13b
	jne	LBB0_69
## %bb.64:
	movq	%r15, %r12
	testb	$1, %r13b
	jne	LBB0_69
## %bb.65:
	movq	%r14, %r12
	testb	$8, %r13b
	jne	LBB0_69
## %bb.66:
	testb	$2, %r13b
	jne	LBB0_68
## %bb.67:
	movq	_REGION_USA@GOTPCREL(%rip), %r12
	jmp	LBB0_69
LBB0_68:
	movq	_REGION_JAPAN_PAL@GOTPCREL(%rip), %r12
	jmp	LBB0_69
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
LJTI0_0:
	.long	L0_0_set_15
	.long	L0_0_set_23
	.long	L0_0_set_23
	.long	L0_0_set_23
	.long	L0_0_set_23
	.long	L0_0_set_22
	.long	L0_0_set_22
	.long	L0_0_set_23
	.long	L0_0_set_23
	.long	L0_0_set_23
	.long	L0_0_set_23
	.long	L0_0_set_23
	.long	L0_0_set_23
	.long	L0_0_set_23
	.long	L0_0_set_23
	.long	L0_0_set_23
	.long	L0_0_set_27
.set L0_1_set_29, LBB0_29-LJTI0_1
.set L0_1_set_33, LBB0_33-LJTI0_1
.set L0_1_set_31, LBB0_31-LJTI0_1
.set L0_1_set_32, LBB0_32-LJTI0_1
LJTI0_1:
	.long	L0_1_set_29
	.long	L0_1_set_33
	.long	L0_1_set_33
	.long	L0_1_set_33
	.long	L0_1_set_33
	.long	L0_1_set_31
	.long	L0_1_set_31
	.long	L0_1_set_33
	.long	L0_1_set_33
	.long	L0_1_set_33
	.long	L0_1_set_33
	.long	L0_1_set_33
	.long	L0_1_set_33
	.long	L0_1_set_33
	.long	L0_1_set_33
	.long	L0_1_set_33
	.long	L0_1_set_32
.set L0_2_set_41, LBB0_41-LJTI0_2
.set L0_2_set_45, LBB0_45-LJTI0_2
.set L0_2_set_43, LBB0_43-LJTI0_2
.set L0_2_set_44, LBB0_44-LJTI0_2
LJTI0_2:
	.long	L0_2_set_41
	.long	L0_2_set_45
	.long	L0_2_set_45
	.long	L0_2_set_45
	.long	L0_2_set_45
	.long	L0_2_set_43
	.long	L0_2_set_43
	.long	L0_2_set_45
	.long	L0_2_set_45
	.long	L0_2_set_45
	.long	L0_2_set_45
	.long	L0_2_set_45
	.long	L0_2_set_45
	.long	L0_2_set_45
	.long	L0_2_set_45
	.long	L0_2_set_45
	.long	L0_2_set_44
.set L0_3_set_53, LBB0_53-LJTI0_3
.set L0_3_set_57, LBB0_57-LJTI0_3
.set L0_3_set_55, LBB0_55-LJTI0_3
.set L0_3_set_56, LBB0_56-LJTI0_3
LJTI0_3:
	.long	L0_3_set_53
	.long	L0_3_set_57
	.long	L0_3_set_57
	.long	L0_3_set_57
	.long	L0_3_set_57
	.long	L0_3_set_55
	.long	L0_3_set_55
	.long	L0_3_set_57
	.long	L0_3_set_57
	.long	L0_3_set_57
	.long	L0_3_set_57
	.long	L0_3_set_57
	.long	L0_3_set_57
	.long	L0_3_set_57
	.long	L0_3_set_57
	.long	L0_3_set_57
	.long	L0_3_set_56
	.end_data_region
                                        ## -- End function
	.comm	_system_hw,4,2                  ## @system_hw
	.comm	_SYSTEM_MCD,4,2                 ## @SYSTEM_MCD
	.comm	_REGION_USA,4,2                 ## @REGION_USA
	.comm	_region_code,4,2                ## @region_code
	.comm	_REGION_EUROPE,4,2              ## @REGION_EUROPE
	.comm	_REGION_JAPAN_NTSC,4,2          ## @REGION_JAPAN_NTSC
	.comm	_SYSTEM_MD,4,2                  ## @SYSTEM_MD
	.comm	_rominfo,24,3                   ## @rominfo
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"eur"

L_.str.1:                               ## @.str.1
	.asciz	"EUR"

L_.str.2:                               ## @.str.2
	.asciz	"jap"

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

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

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

	.comm	_REGION_JAPAN_PAL,4,2           ## @REGION_JAPAN_PAL
L_.str.6:                               ## @.str.6
	.asciz	"T-45033"

L_.str.7:                               ## @.str.7
	.asciz	"T-69046-50"

L_.str.8:                               ## @.str.8
	.asciz	"T-120106-00"

L_.str.9:                               ## @.str.9
	.asciz	"T-70096 -00"

L_.str.10:                              ## @.str.10
	.asciz	"1011-00"

	.comm	_rom_region,4,2                 ## @rom_region
	.comm	_config,12,2                    ## @config
	.comm	_vdp_pal,4,2                    ## @vdp_pal
	.comm	_MCLOCK_PAL,4,2                 ## @MCLOCK_PAL
	.comm	_MCLOCK_NTSC,4,2                ## @MCLOCK_NTSC
	.comm	_system_clock,4,2               ## @system_clock
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.get_region
l_switch.table.get_region:
	.quad	_REGION_USA
	.quad	_REGION_EUROPE
	.quad	_REGION_JAPAN_NTSC
	.quad	_REGION_JAPAN_PAL

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_region                     ; -- Begin function get_region
	.p2align	2
_get_region:                            ; @get_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	x19, _region_code@GOTPAGE
Lloh1:
	ldr	x19, [x19, _region_code@GOTPAGEOFF]
	cbz	x0, LBB0_5
; %bb.1:
Lloh2:
	adrp	x8, _system_hw@GOTPAGE
Lloh3:
	ldr	x8, [x8, _system_hw@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _SYSTEM_MCD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SYSTEM_MCD@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.2:
	ldrsb	w8, [x0, #523]
	cmp	w8, #100
	b.eq	LBB0_17
; %bb.3:
	cmp	w8, #122
	b.ne	LBB0_71
; %bb.4:
Lloh8:
	adrp	x8, _REGION_USA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REGION_USA@GOTPAGEOFF]
	b	LBB0_72
LBB0_5:
Lloh10:
	adrp	x8, _rom_region@GOTPAGE
Lloh11:
	ldr	x8, [x8, _rom_region@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x8]
	str	w9, [x19]
	b	LBB0_75
LBB0_6:
Lloh13:
	adrp	x9, _SYSTEM_MD@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SYSTEM_MD@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.7:
Lloh16:
	adrp	x20, _rominfo@GOTPAGE
Lloh17:
	ldr	x20, [x20, _rominfo@GOTPAGEOFF]
	ldr	x0, [x20, #16]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #3
	bl	_memcmp
Lloh20:
	adrp	x21, _REGION_EUROPE@GOTPAGE
Lloh21:
	ldr	x21, [x21, _REGION_EUROPE@GOTPAGEOFF]
	cbz	w0, LBB0_18
; %bb.8:
	ldr	x0, [x20, #16]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #3
	bl	_memcmp
	cbz	w0, LBB0_62
; %bb.9:
	ldr	x0, [x20, #16]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #3
	bl	_memcmp
	cbz	w0, LBB0_61
; %bb.10:
	ldr	x0, [x20, #16]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w2, #3
	bl	_memcmp
	cbz	w0, LBB0_61
; %bb.11:
	ldr	x0, [x20, #16]
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w2, #3
	bl	_memcmp
	cbz	w0, LBB0_19
; %bb.12:
	ldr	x0, [x20, #16]
Lloh30:
	adrp	x1, l_.str.5@PAGE
Lloh31:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w2, #3
	bl	_memcmp
	cbz	w0, LBB0_19
; %bb.13:
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	bl	_toupper
	and	w8, w0, #0xff
	sub	w9, w8, #69
	cmp	w9, #16
	b.hi	LBB0_21
; %bb.14:
	mov	w22, #4
Lloh32:
	adrp	x10, lJTI0_0@PAGE
Lloh33:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_15
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_15:
	mov	w22, #1
	b	LBB0_24
LBB0_16:
	bl	_sms_cart_region_detect
	b	LBB0_73
LBB0_17:
Lloh34:
	adrp	x8, _REGION_EUROPE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _REGION_EUROPE@GOTPAGEOFF]
	b	LBB0_72
LBB0_18:
	mov	x8, x21
	b	LBB0_63
LBB0_19:
Lloh36:
	adrp	x8, _REGION_USA@GOTPAGE
Lloh37:
	ldr	x8, [x8, _REGION_USA@GOTPAGEOFF]
	b	LBB0_63
LBB0_20:
	mov	w22, #8
	b	LBB0_24
LBB0_21:
	sxtb	w9, w8
	mov	x22, x8
	cmp	w9, #16
	b.lt	LBB0_24
; %bb.22:
	sub	w22, w8, #48
	cmp	w22, #9
	b.ls	LBB0_24
; %bb.23:
	sub	w9, w8, #65
	sub	w8, w8, #55
	cmp	w9, #6
	csel	w22, w8, wzr, lo
LBB0_24:
	ldr	x8, [x20, #16]
	ldr	w0, [x8, #8]
	bl	_toupper
	and	w8, w0, #0xff
	sub	w9, w8, #69
	cmp	w9, #16
	b.hi	LBB0_29
; %bb.25:
Lloh38:
	adrp	x10, lJTI0_1@PAGE
Lloh39:
	add	x10, x10, lJTI0_1@PAGEOFF
	adr	x11, LBB0_26
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_26:
	orr	w22, w22, #0x1
	b	LBB0_35
LBB0_27:
	orr	w22, w22, #0x8
	b	LBB0_35
LBB0_28:
	orr	w22, w22, #0x4
	b	LBB0_35
LBB0_29:
	sxtb	w9, w8
	cmp	w9, #16
	b.ge	LBB0_31
; %bb.30:
	orr	w22, w22, w8
	b	LBB0_35
LBB0_31:
	sub	w9, w8, #48
	cmp	w9, #10
	b.hs	LBB0_33
; %bb.32:
	orr	w22, w9, w22
	b	LBB0_35
LBB0_33:
	sub	w9, w8, #65
	cmp	w9, #5
	b.hi	LBB0_35
; %bb.34:
	sub	w8, w8, #55
	orr	w22, w8, w22
LBB0_35:
	ldr	x8, [x20, #16]
	ldr	w0, [x8, #16]
	bl	_toupper
	and	w8, w0, #0xff
	sub	w9, w8, #69
	cmp	w9, #16
	b.hi	LBB0_40
; %bb.36:
Lloh40:
	adrp	x10, lJTI0_2@PAGE
Lloh41:
	add	x10, x10, lJTI0_2@PAGEOFF
	adr	x11, LBB0_37
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_37:
	orr	w22, w22, #0x1
	b	LBB0_46
LBB0_38:
	orr	w22, w22, #0x8
	b	LBB0_46
LBB0_39:
	orr	w22, w22, #0x4
	b	LBB0_46
LBB0_40:
	sxtb	w9, w8
	cmp	w9, #16
	b.ge	LBB0_42
; %bb.41:
	orr	w22, w22, w8
	b	LBB0_46
LBB0_42:
	sub	w9, w8, #48
	cmp	w9, #10
	b.hs	LBB0_44
; %bb.43:
	orr	w22, w9, w22
	b	LBB0_46
LBB0_44:
	sub	w9, w8, #65
	cmp	w9, #5
	b.hi	LBB0_46
; %bb.45:
	sub	w8, w8, #55
	orr	w22, w8, w22
LBB0_46:
	ldr	x8, [x20, #16]
	ldr	w0, [x8, #24]
	bl	_toupper
	and	w8, w0, #0xff
	sub	w9, w8, #69
	cmp	w9, #16
	b.hi	LBB0_51
; %bb.47:
Lloh42:
	adrp	x10, lJTI0_3@PAGE
Lloh43:
	add	x10, x10, lJTI0_3@PAGEOFF
	adr	x11, LBB0_48
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_48:
	orr	w22, w22, #0x1
	b	LBB0_57
LBB0_49:
	orr	w22, w22, #0x8
	b	LBB0_57
LBB0_50:
	orr	w22, w22, #0x4
	b	LBB0_57
LBB0_51:
	sxtb	w9, w8
	cmp	w9, #16
	b.ge	LBB0_53
; %bb.52:
	orr	w22, w22, w8
	b	LBB0_57
LBB0_53:
	sub	w9, w8, #48
	cmp	w9, #10
	b.hs	LBB0_55
; %bb.54:
	orr	w22, w9, w22
	b	LBB0_57
LBB0_55:
	sub	w9, w8, #65
	cmp	w9, #5
	b.hi	LBB0_57
; %bb.56:
	sub	w8, w8, #55
	orr	w22, w8, w22
LBB0_57:
Lloh44:
	adrp	x8, _REGION_USA@GOTPAGE
Lloh45:
	ldr	x8, [x8, _REGION_USA@GOTPAGEOFF]
	tbnz	w22, #2, LBB0_63
; %bb.58:
	tbnz	w22, #0, LBB0_61
; %bb.59:
	tbnz	w22, #3, LBB0_62
; %bb.60:
Lloh46:
	adrp	x9, _REGION_JAPAN_PAL@GOTPAGE
Lloh47:
	ldr	x9, [x9, _REGION_JAPAN_PAL@GOTPAGEOFF]
	tst	w22, #0x2
	csel	x8, x8, x9, eq
	b	LBB0_63
LBB0_61:
Lloh48:
	adrp	x8, _REGION_JAPAN_NTSC@GOTPAGE
Lloh49:
	ldr	x8, [x8, _REGION_JAPAN_NTSC@GOTPAGEOFF]
	b	LBB0_63
LBB0_62:
Lloh50:
	adrp	x8, _REGION_EUROPE@GOTPAGE
Lloh51:
	ldr	x8, [x8, _REGION_EUROPE@GOTPAGEOFF]
LBB0_63:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	w0, [x20, #8]
Lloh52:
	adrp	x1, l_.str.6@PAGE
Lloh53:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_65
; %bb.64:
	ldr	w8, [x20]
	cmp	w8, #3969
	b.eq	LBB0_68
LBB0_65:
	ldr	w0, [x20, #8]
Lloh54:
	adrp	x1, l_.str.7@PAGE
Lloh55:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_strstr
	cbnz	x0, LBB0_68
; %bb.66:
	ldr	w0, [x20, #8]
Lloh56:
	adrp	x1, l_.str.8@PAGE
Lloh57:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_strstr
	cbnz	x0, LBB0_68
; %bb.67:
	ldr	w0, [x20, #8]
Lloh58:
	adrp	x1, l_.str.9@PAGE
Lloh59:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_69
LBB0_68:
	ldr	w0, [x21]
	b	LBB0_73
LBB0_69:
	ldr	w8, [x20, #4]
	mov	w9, #21294
	cmp	w8, w9
	b.ne	LBB0_74
; %bb.70:
	ldr	w0, [x20, #8]
Lloh60:
	adrp	x1, l_.str.10@PAGE
Lloh61:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_74
LBB0_71:
Lloh62:
	adrp	x8, _REGION_JAPAN_NTSC@GOTPAGE
Lloh63:
	ldr	x8, [x8, _REGION_JAPAN_NTSC@GOTPAGEOFF]
LBB0_72:
	ldr	w0, [x8]
LBB0_73:
	str	w0, [x19]
LBB0_74:
	ldr	w9, [x19]
Lloh64:
	adrp	x8, _rom_region@GOTPAGE
Lloh65:
	ldr	x8, [x8, _rom_region@GOTPAGEOFF]
Lloh66:
	str	w9, [x8]
LBB0_75:
Lloh67:
	adrp	x8, _config@GOTPAGE
Lloh68:
	ldr	x8, [x8, _config@GOTPAGEOFF]
	ldr	w10, [x8]
	sub	w10, w10, #1
	cmp	w10, #3
	b.hi	LBB0_77
; %bb.76:
Lloh69:
	adrp	x9, l_switch.table.get_region@PAGE
Lloh70:
	add	x9, x9, l_switch.table.get_region@PAGEOFF
	ldr	x9, [x9, w10, sxtw #3]
	ldr	w9, [x9]
	str	w9, [x19]
LBB0_77:
Lloh71:
	adrp	x12, _vdp_pal@GOTPAGE
Lloh72:
	ldr	x12, [x12, _vdp_pal@GOTPAGEOFF]
	mov	w10, #1
	ands	w9, w10, w9, lsr #6
	str	w9, [x12]
Lloh73:
	adrp	x9, _MCLOCK_PAL@GOTPAGE
Lloh74:
	ldr	x9, [x9, _MCLOCK_PAL@GOTPAGEOFF]
Lloh75:
	ldr	w10, [x9]
Lloh76:
	adrp	x9, _MCLOCK_NTSC@GOTPAGE
Lloh77:
	ldr	x9, [x9, _MCLOCK_NTSC@GOTPAGEOFF]
Lloh78:
	ldr	w11, [x9]
	csel	w13, w11, w10, eq
Lloh79:
	adrp	x9, _system_clock@GOTPAGE
Lloh80:
	ldr	x9, [x9, _system_clock@GOTPAGEOFF]
	str	w13, [x9]
	ldr	w13, [x8, #4]
	cmp	w13, #1
	b.eq	LBB0_80
; %bb.78:
	cmp	w13, #2
	b.ne	LBB0_82
; %bb.79:
	mov	w13, #1
	b	LBB0_81
LBB0_80:
	mov	w13, #0
LBB0_81:
	str	w13, [x12]
LBB0_82:
	ldr	w8, [x8, #8]
	cmp	w8, #1
	b.eq	LBB0_85
; %bb.83:
	cmp	w8, #2
	b.ne	LBB0_86
; %bb.84:
	mov	x11, x10
LBB0_85:
	str	w11, [x9]
LBB0_86:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh62, Lloh63
	.loh AdrpLdrGotStr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh67, Lloh68
	.loh AdrpAdd	Lloh69, Lloh70
	.loh AdrpLdrGot	Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh71, Lloh72
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_20-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_15-LBB0_15)>>2
	.byte	(LBB0_15-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_21-LBB0_15)>>2
	.byte	(LBB0_24-LBB0_15)>>2
lJTI0_1:
	.byte	(LBB0_27-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_26-LBB0_26)>>2
	.byte	(LBB0_26-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_29-LBB0_26)>>2
	.byte	(LBB0_28-LBB0_26)>>2
lJTI0_2:
	.byte	(LBB0_38-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_37-LBB0_37)>>2
	.byte	(LBB0_37-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_40-LBB0_37)>>2
	.byte	(LBB0_39-LBB0_37)>>2
lJTI0_3:
	.byte	(LBB0_49-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_48-LBB0_48)>>2
	.byte	(LBB0_48-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_51-LBB0_48)>>2
	.byte	(LBB0_50-LBB0_48)>>2
                                        ; -- End function
	.comm	_system_hw,4,2                  ; @system_hw
	.comm	_SYSTEM_MCD,4,2                 ; @SYSTEM_MCD
	.comm	_REGION_USA,4,2                 ; @REGION_USA
	.comm	_region_code,4,2                ; @region_code
	.comm	_REGION_EUROPE,4,2              ; @REGION_EUROPE
	.comm	_REGION_JAPAN_NTSC,4,2          ; @REGION_JAPAN_NTSC
	.comm	_SYSTEM_MD,4,2                  ; @SYSTEM_MD
	.comm	_rominfo,24,3                   ; @rominfo
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"eur"

l_.str.1:                               ; @.str.1
	.asciz	"EUR"

l_.str.2:                               ; @.str.2
	.asciz	"jap"

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

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

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

	.comm	_REGION_JAPAN_PAL,4,2           ; @REGION_JAPAN_PAL
l_.str.6:                               ; @.str.6
	.asciz	"T-45033"

l_.str.7:                               ; @.str.7
	.asciz	"T-69046-50"

l_.str.8:                               ; @.str.8
	.asciz	"T-120106-00"

l_.str.9:                               ; @.str.9
	.asciz	"T-70096 -00"

l_.str.10:                              ; @.str.10
	.asciz	"1011-00"

	.comm	_rom_region,4,2                 ; @rom_region
	.comm	_config,12,2                    ; @config
	.comm	_vdp_pal,4,2                    ; @vdp_pal
	.comm	_MCLOCK_PAL,4,2                 ; @MCLOCK_PAL
	.comm	_MCLOCK_NTSC,4,2                ; @MCLOCK_NTSC
	.comm	_system_clock,4,2               ; @system_clock
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.get_region
l_switch.table.get_region:
	.quad	_REGION_USA
	.quad	_REGION_EUROPE
	.quad	_REGION_JAPAN_NTSC
	.quad	_REGION_JAPAN_PAL

.subsections_via_symbols
