	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_bios                      ## -- Begin function load_bios
	.p2align	4, 0x90
_load_bios:                             ## @load_bios
	.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	_system_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leal	-128(%rcx), %eax
	cmpl	$2, %eax
	jb	LBB0_17
## %bb.1:
	leal	-131(%rcx), %eax
	cmpl	$2, %eax
	jae	LBB0_2
## %bb.13:
	movq	_system_bios@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movl	$-1, %eax
	testb	$-124, %cl
	jne	LBB0_28
## %bb.14:
	andl	$-134, %ecx
	movl	%ecx, (%rbx)
	movq	_cart@GOTPCREL(%rip), %rcx
	cmpl	$4194304, (%rcx)                ## imm = 0x400000
	movl	$0, %eax
	jg	LBB0_28
## %bb.15:
	movq	_GG_BIOS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movslq	4(%rcx), %rsi
	addq	$4194304, %rsi                  ## imm = 0x400000
	movl	$1048576, %edx                  ## imm = 0x100000
	xorl	%ecx, %ecx
	callq	_load_archive
	testl	%eax, %eax
	jle	LBB0_28
## %bb.16:
	movl	$132, %ecx
	orl	(%rbx), %ecx
	jmp	LBB0_27
LBB0_17:
	movq	_system_bios@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	testb	$-127, %cl
	je	LBB0_19
## %bb.18:
	movl	%ecx, %edx
	andl	$12, %edx
	movq	_region_code@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$4, %esi
	movl	$-1, %eax
	cmpl	%esi, %edx
	je	LBB0_28
LBB0_19:
	andl	$-134, %ecx
	movl	%ecx, (%rbx)
	movq	_cart@GOTPCREL(%rip), %rcx
	cmpl	$4194304, (%rcx)                ## imm = 0x400000
	movl	$0, %eax
	jg	LBB0_28
## %bb.20:
	movq	_region_code@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	cmpl	$134, %edx
	jne	LBB0_21
## %bb.22:
	movq	_MS_BIOS_EU@GOTPCREL(%rip), %rax
	cmpl	$133, %edx
	je	LBB0_24
	jmp	LBB0_25
LBB0_2:
	movl	$0, %eax
	cmpl	$130, %ecx
	jne	LBB0_28
## %bb.3:
	movq	_system_bios@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	testb	$16, %dl
	jne	LBB0_4
## %bb.5:
	movq	_region_code@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_6
LBB0_4:
	andl	$12, %edx
	movq	_region_code@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %esi
	sarl	$4, %esi
	movl	$-1, %eax
	cmpl	%esi, %edx
	je	LBB0_28
LBB0_6:
	cmpl	$134, %ecx
	jne	LBB0_7
## %bb.8:
	movq	_CD_BIOS_EU@GOTPCREL(%rip), %rax
	cmpl	$133, %ecx
	je	LBB0_10
	jmp	LBB0_11
LBB0_7:
	movq	_CD_BIOS_JP@GOTPCREL(%rip), %rax
	cmpl	$133, %ecx
	jne	LBB0_11
LBB0_10:
	movq	_CD_BIOS_US@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %edi
	movq	_scd@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	$8, %edx
	xorl	%ecx, %ecx
	callq	_load_archive
	testl	%eax, %eax
	jle	LBB0_28
## %bb.12:
	movl	$224, %edx
	andl	(%rbx), %edx
	movq	_region_code@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	sarl	$4, %ecx
	orl	%edx, %ecx
	orl	$16, %ecx
	jmp	LBB0_27
LBB0_21:
	movq	_MS_BIOS_JP@GOTPCREL(%rip), %rax
	cmpl	$133, %edx
	jne	LBB0_25
LBB0_24:
	movq	_MS_BIOS_US@GOTPCREL(%rip), %rax
LBB0_25:
	movl	(%rax), %edi
	movslq	4(%rcx), %rsi
	addq	$4194304, %rsi                  ## imm = 0x400000
	movl	$4194304, %edx                  ## imm = 0x400000
	xorl	%ecx, %ecx
	callq	_load_archive
	testl	%eax, %eax
	jle	LBB0_28
## %bb.26:
	movl	(%rbx), %edx
	andl	$112, %edx
	movl	(%r14), %ecx
	sarl	$4, %ecx
	orl	%edx, %ecx
	orl	$128, %ecx
LBB0_27:
	movq	_system_bios@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
LBB0_28:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_system_hw,4,2                  ## @system_hw
	.comm	_system_bios,4,2                ## @system_bios
	.comm	_region_code,4,2                ## @region_code
	.comm	_CD_BIOS_US,4,2                 ## @CD_BIOS_US
	.comm	_scd,8,3                        ## @scd
	.comm	_CD_BIOS_EU,4,2                 ## @CD_BIOS_EU
	.comm	_CD_BIOS_JP,4,2                 ## @CD_BIOS_JP
	.comm	_cart,8,2                       ## @cart
	.comm	_GG_BIOS,4,2                    ## @GG_BIOS
	.comm	_MS_BIOS_US,4,2                 ## @MS_BIOS_US
	.comm	_MS_BIOS_EU,4,2                 ## @MS_BIOS_EU
	.comm	_MS_BIOS_JP,4,2                 ## @MS_BIOS_JP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_bios                      ; -- Begin function load_bios
	.p2align	2
_load_bios:                             ; @load_bios
	.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	x8, _system_hw@GOTPAGE
Lloh1:
	ldr	x8, [x8, _system_hw@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w9, w8, #128
	cmp	w9, #2
	b.lo	LBB0_6
; %bb.1:
	sub	w9, w8, #131
	cmp	w9, #2
	b.hs	LBB0_11
; %bb.2:
Lloh3:
	adrp	x19, _system_bios@GOTPAGE
Lloh4:
	ldr	x19, [x19, _system_bios@GOTPAGEOFF]
	ldr	w8, [x19]
	mov	w9, #132
	tst	w8, w9
	b.ne	LBB0_16
; %bb.3:
	mov	w9, #-134
	and	w8, w8, w9
	str	w8, [x19]
Lloh5:
	adrp	x8, _cart@GOTPAGE
Lloh6:
	ldr	x8, [x8, _cart@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1024, lsl #12              ; =4194304
	b.gt	LBB0_14
; %bb.4:
Lloh7:
	adrp	x9, _GG_BIOS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _GG_BIOS@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x9]
	ldrsw	x8, [x8, #4]
	add	x1, x8, #1024, lsl #12          ; =4194304
	mov	w2, #1048576
	mov	w3, #0
	bl	_load_archive
	cmp	w0, #1
	b.lt	LBB0_20
; %bb.5:
	ldr	w8, [x19]
	mov	w9, #132
	orr	w8, w8, w9
	b	LBB0_19
LBB0_6:
Lloh10:
	adrp	x19, _system_bios@GOTPAGE
Lloh11:
	ldr	x19, [x19, _system_bios@GOTPAGEOFF]
	ldr	w8, [x19]
	mov	w9, #129
	tst	w8, w9
	b.eq	LBB0_8
; %bb.7:
	and	w9, w8, #0xc
Lloh12:
	adrp	x10, _region_code@GOTPAGE
Lloh13:
	ldr	x10, [x10, _region_code@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	w9, w10, asr #4
	b.eq	LBB0_16
LBB0_8:
	mov	w9, #-134
	and	w8, w8, w9
	str	w8, [x19]
Lloh15:
	adrp	x8, _cart@GOTPAGE
Lloh16:
	ldr	x8, [x8, _cart@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1024, lsl #12              ; =4194304
	b.gt	LBB0_14
; %bb.9:
Lloh17:
	adrp	x20, _region_code@GOTPAGE
Lloh18:
	ldr	x20, [x20, _region_code@GOTPAGEOFF]
Lloh19:
	adrp	x9, _MS_BIOS_US@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MS_BIOS_US@GOTPAGEOFF]
	ldr	w10, [x20]
Lloh21:
	adrp	x11, _MS_BIOS_EU@GOTPAGE
Lloh22:
	ldr	x11, [x11, _MS_BIOS_EU@GOTPAGEOFF]
Lloh23:
	adrp	x12, _MS_BIOS_JP@GOTPAGE
Lloh24:
	ldr	x12, [x12, _MS_BIOS_JP@GOTPAGEOFF]
	cmp	w10, #134
	csel	x11, x11, x12, eq
	cmp	w10, #133
	csel	x9, x9, x11, eq
	ldr	w0, [x9]
	ldrsw	x8, [x8, #4]
	add	x1, x8, #1024, lsl #12          ; =4194304
	mov	w2, #4194304
	mov	w3, #0
	bl	_load_archive
	cmp	w0, #1
	b.lt	LBB0_20
; %bb.10:
	ldr	w8, [x19]
	and	w8, w8, #0x70
	ldr	w9, [x20]
	orr	w8, w8, w9, asr #4
	orr	w8, w8, #0x80
	b	LBB0_19
LBB0_11:
	cmp	w8, #130
	b.ne	LBB0_14
; %bb.12:
Lloh25:
	adrp	x19, _system_bios@GOTPAGE
Lloh26:
	ldr	x19, [x19, _system_bios@GOTPAGEOFF]
	ldr	w8, [x19]
	tbnz	w8, #4, LBB0_15
; %bb.13:
Lloh27:
	adrp	x8, _region_code@GOTPAGE
Lloh28:
	ldr	x8, [x8, _region_code@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	b	LBB0_17
LBB0_14:
	mov	w0, #0
	b	LBB0_20
LBB0_15:
	and	w9, w8, #0xc
Lloh30:
	adrp	x8, _region_code@GOTPAGE
Lloh31:
	ldr	x8, [x8, _region_code@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	w9, w8, asr #4
	b.ne	LBB0_17
LBB0_16:
	mov	w0, #-1
	b	LBB0_20
LBB0_17:
Lloh33:
	adrp	x9, _CD_BIOS_US@GOTPAGE
Lloh34:
	ldr	x9, [x9, _CD_BIOS_US@GOTPAGEOFF]
Lloh35:
	adrp	x10, _CD_BIOS_EU@GOTPAGE
Lloh36:
	ldr	x10, [x10, _CD_BIOS_EU@GOTPAGEOFF]
Lloh37:
	adrp	x11, _CD_BIOS_JP@GOTPAGE
Lloh38:
	ldr	x11, [x11, _CD_BIOS_JP@GOTPAGEOFF]
	cmp	w8, #134
	csel	x10, x10, x11, eq
	cmp	w8, #133
	csel	x8, x9, x10, eq
	ldr	w0, [x8]
Lloh39:
	adrp	x8, _scd@GOTPAGE
Lloh40:
	ldr	x8, [x8, _scd@GOTPAGEOFF]
Lloh41:
	ldr	x1, [x8]
	mov	w2, #8
	mov	w3, #0
	bl	_load_archive
	cmp	w0, #1
	b.lt	LBB0_20
; %bb.18:
	ldr	w8, [x19]
	and	w8, w8, #0xe0
Lloh42:
	adrp	x9, _region_code@GOTPAGE
Lloh43:
	ldr	x9, [x9, _region_code@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	orr	w8, w8, w9, asr #4
	orr	w8, w8, #0x10
LBB0_19:
Lloh45:
	adrp	x9, _system_bios@GOTPAGE
Lloh46:
	ldr	x9, [x9, _system_bios@GOTPAGEOFF]
Lloh47:
	str	w8, [x9]
LBB0_20:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotStr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_system_hw,4,2                  ; @system_hw
	.comm	_system_bios,4,2                ; @system_bios
	.comm	_region_code,4,2                ; @region_code
	.comm	_CD_BIOS_US,4,2                 ; @CD_BIOS_US
	.comm	_scd,8,3                        ; @scd
	.comm	_CD_BIOS_EU,4,2                 ; @CD_BIOS_EU
	.comm	_CD_BIOS_JP,4,2                 ; @CD_BIOS_JP
	.comm	_cart,8,2                       ; @cart
	.comm	_GG_BIOS,4,2                    ; @GG_BIOS
	.comm	_MS_BIOS_US,4,2                 ; @MS_BIOS_US
	.comm	_MS_BIOS_EU,4,2                 ; @MS_BIOS_EU
	.comm	_MS_BIOS_JP,4,2                 ; @MS_BIOS_JP
.subsections_via_symbols
