	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psp_v3_1_bootloader_load_sos
_psp_v3_1_bootloader_load_sos:          ## @psp_v3_1_bootloader_load_sos
	.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
	movq	%rdi, %r15
	movq	24(%rdi), %r14
	movq	_MP0@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_mmMP0_SMN_C2PMSG_81@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movl	(%r12), %edi
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_mmMP0_SMN_C2PMSG_58@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movl	%eax, (%r15)
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_printk
	jmp	LBB0_5
LBB0_2:
	movq	_mmMP0_SMN_C2PMSG_35@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$-2147483648, %edx              ## imm = 0x80000000
	movl	$-2147483648, %ecx              ## imm = 0x80000000
	xorl	%r8d, %r8d
	callq	_psp_wait_for
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	16(%r15), %edi
	movq	_PSP_1_MEG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
	movl	16(%r15), %edi
	movl	8(%r15), %edx
	movl	12(%r15), %esi
	callq	_memcpy
	movl	(%r12), %edi
	movq	_mmMP0_SMN_C2PMSG_36@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%r15), %ecx
	sarl	$20, %ecx
	xorl	%esi, %esi
	callq	_WREG32_SOC15
	movq	_PSP_BL__LOAD_SOSDRV@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r12), %edi
	movq	_mmMP0_SMN_C2PMSG_35@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_WREG32_SOC15
	movl	$20, %edi
	callq	_mdelay
	movl	(%r12), %edi
	movl	(%r13), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %ebx
	movl	(%r12), %edi
	movl	(%r13), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	_psp_wait_for
	movl	%eax, %ebx
	movl	(%r12), %edi
	movq	_mmMP0_SMN_C2PMSG_58@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_psp_v3_1_match_version
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_WARN
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MP0,4,2                        ## @MP0
	.comm	_mmMP0_SMN_C2PMSG_81,4,2        ## @mmMP0_SMN_C2PMSG_81
	.comm	_mmMP0_SMN_C2PMSG_58,4,2        ## @mmMP0_SMN_C2PMSG_58
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sos fw version = 0x%x.\n"

	.comm	_mmMP0_SMN_C2PMSG_35,4,2        ## @mmMP0_SMN_C2PMSG_35
	.comm	_PSP_1_MEG,4,2                  ## @PSP_1_MEG
	.comm	_mmMP0_SMN_C2PMSG_36,4,2        ## @mmMP0_SMN_C2PMSG_36
	.comm	_PSP_BL__LOAD_SOSDRV,4,2        ## @PSP_BL__LOAD_SOSDRV
L_.str.1:                               ## @.str.1
	.asciz	"SOS version doesn't match\n"

	.no_dead_strip	_psp_v3_1_bootloader_load_sos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psp_v3_1_bootloader_load_sos
_psp_v3_1_bootloader_load_sos:          ; @psp_v3_1_bootloader_load_sos
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x19, [x0, #24]
Lloh0:
	adrp	x22, _MP0@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MP0@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x23, _mmMP0_SMN_C2PMSG_81@GOTPAGE
Lloh3:
	ldr	x23, [x23, _mmMP0_SMN_C2PMSG_81@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w1, #0
	bl	_RREG32_SOC15
	mov	x8, x0
	ldr	w0, [x22]
	cbz	w8, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _mmMP0_SMN_C2PMSG_58@GOTPAGE
Lloh5:
	ldr	x8, [x8, _mmMP0_SMN_C2PMSG_58@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_RREG32_SOC15
	mov	x1, x0
	str	w0, [x20]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	mov	w21, #0
	b	LBB0_5
LBB0_2:
Lloh9:
	adrp	x24, _mmMP0_SMN_C2PMSG_35@GOTPAGE
Lloh10:
	ldr	x24, [x24, _mmMP0_SMN_C2PMSG_35@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x1, x0
	mov	x0, x20
	mov	w2, #-2147483648
	mov	w3, #-2147483648
	mov	w4, #0
	bl	_psp_wait_for
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x20, #16]
Lloh11:
	adrp	x8, _PSP_1_MEG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PSP_1_MEG@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	ldp	w1, w0, [x20, #12]
	ldr	w2, [x20, #8]
	bl	_memcpy
	ldr	w0, [x22]
Lloh14:
	adrp	x8, _mmMP0_SMN_C2PMSG_36@GOTPAGE
Lloh15:
	ldr	x8, [x8, _mmMP0_SMN_C2PMSG_36@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	ldr	w8, [x20, #4]
	asr	w3, w8, #20
	mov	w1, #0
	bl	_WREG32_SOC15
Lloh17:
	adrp	x8, _PSP_BL__LOAD_SOSDRV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PSP_BL__LOAD_SOSDRV@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	ldr	w0, [x22]
	ldr	w2, [x24]
	mov	w1, #0
	bl	_WREG32_SOC15
	mov	w0, #20
	bl	_mdelay
	ldr	w0, [x22]
	ldr	w2, [x23]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x21, x0
	ldr	w0, [x22]
	ldr	w2, [x23]
	mov	w1, #0
	bl	_RREG32_SOC15
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	mov	w4, #1
	bl	_psp_wait_for
	mov	x21, x0
	ldr	w0, [x22]
Lloh20:
	adrp	x8, _mmMP0_SMN_C2PMSG_58@GOTPAGE
Lloh21:
	ldr	x8, [x8, _mmMP0_SMN_C2PMSG_58@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_RREG32_SOC15
	mov	x1, x0
	mov	x0, x19
	bl	_psp_v3_1_match_version
	cbnz	w0, LBB0_5
; %bb.4:
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_WARN
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_MP0,4,2                        ; @MP0
	.comm	_mmMP0_SMN_C2PMSG_81,4,2        ; @mmMP0_SMN_C2PMSG_81
	.comm	_mmMP0_SMN_C2PMSG_58,4,2        ; @mmMP0_SMN_C2PMSG_58
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sos fw version = 0x%x.\n"

	.comm	_mmMP0_SMN_C2PMSG_35,4,2        ; @mmMP0_SMN_C2PMSG_35
	.comm	_PSP_1_MEG,4,2                  ; @PSP_1_MEG
	.comm	_mmMP0_SMN_C2PMSG_36,4,2        ; @mmMP0_SMN_C2PMSG_36
	.comm	_PSP_BL__LOAD_SOSDRV,4,2        ; @PSP_BL__LOAD_SOSDRV
l_.str.1:                               ; @.str.1
	.asciz	"SOS version doesn't match\n"

	.no_dead_strip	_psp_v3_1_bootloader_load_sos
.subsections_via_symbols
