	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psp_v10_0_init_microcode
_psp_v10_0_init_microcode:              ## @psp_v10_0_init_microcode
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	(%rdi), %rbx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	cmpl	$128, (%rbx)
	jne	LBB0_3
## %bb.1:
	cmpl	$7, 4(%rbx)
	jle	LBB0_4
## %bb.2:
	leaq	L_.str.1(%rip), %rcx
	jmp	LBB0_5
LBB0_4:
	movq	48(%rbx), %rax
	cmpl	$5592, (%rax)                   ## imm = 0x15D8
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rcx
	cmoveq	%rax, %rcx
LBB0_5:
	leaq	L_.str.4(%rip), %rdx
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	movl	$30, %esi
	callq	_snprintf
	leaq	24(%rbx), %r14
	movl	40(%rbx), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_request_firmware
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movq	(%r14), %rdi
	callq	_amdgpu_ucode_validate
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_7
LBB0_8:
	movl	40(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	leaq	-64(%rbp), %rdx
	callq	_dev_err
	movq	24(%rbx), %rdi
	callq	_release_firmware
	movq	$0, 24(%rbx)
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	24(%rbx), %rax
	movq	(%rax), %r14
	movl	8(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, 8(%rbx)
	movl	12(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, 12(%rbx)
	movl	4(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, 16(%rbx)
	movl	(%r14), %edi
	callq	_le32_to_cpu
	cltq
	leaq	(%r14,%rax,4), %rax
	movq	%rax, 32(%rbx)
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_11:
	callq	___stack_chk_fail
LBB0_3:
	xorl	%eax, %eax
	callq	_BUG
	ud2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

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

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

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

L_.str.4:                               ## @.str.4
	.asciz	"amdgpu/%s_asd.bin"

L_.str.5:                               ## @.str.5
	.asciz	"psp v10.0: Failed to load firmware \"%s\"\n"

	.no_dead_strip	_psp_v10_0_init_microcode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psp_v10_0_init_microcode
_psp_v10_0_init_microcode:              ; @psp_v10_0_init_microcode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x21, [x0]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w8, [x21]
	cmp	w8, #128
	b.ne	LBB0_11
; %bb.1:
	ldr	w8, [x21, #4]
	cmp	w8, #7
	b.le	LBB0_3
; %bb.2:
Lloh5:
	adrp	x3, l_.str.1@PAGE
Lloh6:
	add	x3, x3, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	ldr	x8, [x21, #48]
Lloh7:
	adrp	x9, l_.str.3@PAGE
Lloh8:
	add	x9, x9, l_.str.3@PAGEOFF
	ldr	w8, [x8]
Lloh9:
	adrp	x10, l_.str.2@PAGE
Lloh10:
	add	x10, x10, l_.str.2@PAGEOFF
	mov	w11, #5592
	cmp	w8, w11
	csel	x3, x10, x9, eq
LBB0_4:
Lloh11:
	adrp	x2, l_.str.4@PAGE
Lloh12:
	add	x2, x2, l_.str.4@PAGEOFF
	add	x0, sp, #10
	mov	w1, #30
	bl	_snprintf
	add	x20, x21, #24
	ldr	w2, [x21, #40]
	add	x1, sp, #10
	mov	x0, x20
	bl	_request_firmware
	mov	x19, x0
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	x0, [x20]
	bl	_amdgpu_ucode_validate
	mov	x19, x0
	cbz	w0, LBB0_9
LBB0_6:
	ldr	w0, [x21, #40]
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	add	x2, sp, #10
	bl	_dev_err
	ldr	x0, [x21, #24]
	bl	_release_firmware
	str	xzr, [x21, #24]
LBB0_7:
	ldr	x8, [sp, #40]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.8:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_9:
	ldr	x8, [x21, #24]
	ldr	x20, [x8]
	ldr	w0, [x20, #8]
	bl	_le32_to_cpu
	str	w0, [x21, #8]
	ldr	w0, [x20, #12]
	bl	_le32_to_cpu
	str	w0, [x21, #12]
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
	str	w0, [x21, #16]
	ldr	w0, [x20]
	bl	_le32_to_cpu
	add	x8, x20, w0, sxtw #2
	str	x8, [x21, #32]
	b	LBB0_7
LBB0_10:
	bl	___stack_chk_fail
LBB0_11:
	bl	_BUG
	brk	#0x1
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

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

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

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

l_.str.4:                               ; @.str.4
	.asciz	"amdgpu/%s_asd.bin"

l_.str.5:                               ; @.str.5
	.asciz	"psp v10.0: Failed to load firmware \"%s\"\n"

	.no_dead_strip	_psp_v10_0_init_microcode
.subsections_via_symbols
