	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psp_hw_start
_psp_hw_start:                          ## @psp_hw_start
	.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	%rdi, %rbx
	movq	(%rdi), %r15
	movq	%r15, %rdi
	callq	_amdgpu_sriov_vf
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$0, 20(%r15)
	je	LBB0_4
LBB0_2:
	movq	_PSP_RING_TYPE__KM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_psp_ring_create
	testl	%eax, %eax
	je	LBB0_12
## %bb.3:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_20
LBB0_4:
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.5:
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_psp_bootloader_load_kdb
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_20
LBB0_8:
	movq	%rbx, %rdi
	callq	_psp_bootloader_load_sysdrv
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_20
LBB0_10:
	movq	%rbx, %rdi
	callq	_psp_bootloader_load_sos
	testl	%eax, %eax
	je	LBB0_2
## %bb.11:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_20
LBB0_12:
	movq	%rbx, %rdi
	callq	_psp_tmr_init
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	%eax, %r14d
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_20
LBB0_14:
	movq	%rbx, %rdi
	callq	_psp_tmr_load
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %r14d
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_20
LBB0_16:
	movq	%rbx, %rdi
	callq	_psp_asd_init
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %r14d
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_20
LBB0_18:
	movq	%rbx, %rdi
	callq	_psp_asd_load
	testl	%eax, %eax
	je	LBB0_22
## %bb.19:
	movl	%eax, %r14d
	leaq	L_.str.7(%rip), %rdi
LBB0_20:
	callq	_DRM_ERROR
LBB0_21:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	cmpl	$2, 16(%r15)
	jl	LBB0_25
## %bb.23:
	movq	%rbx, %rdi
	callq	_psp_xgmi_initialize
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	callq	_dev_err
LBB0_25:
	movq	(%rbx), %rax
	xorl	%r14d, %r14d
	cmpq	$0, 8(%rax)
	je	LBB0_21
## %bb.26:
	movq	%rbx, %rdi
	callq	_psp_ras_initialize
	testl	%eax, %eax
	je	LBB0_21
## %bb.27:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str.9(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PSP load kdb failed!\n"

L_.str.1:                               ## @.str.1
	.asciz	"PSP load sysdrv failed!\n"

L_.str.2:                               ## @.str.2
	.asciz	"PSP load sos failed!\n"

	.comm	_PSP_RING_TYPE__KM,4,2          ## @PSP_RING_TYPE__KM
L_.str.3:                               ## @.str.3
	.asciz	"PSP create ring failed!\n"

L_.str.4:                               ## @.str.4
	.asciz	"PSP tmr init failed!\n"

L_.str.5:                               ## @.str.5
	.asciz	"PSP load tmr failed!\n"

L_.str.6:                               ## @.str.6
	.asciz	"PSP asd init failed!\n"

L_.str.7:                               ## @.str.7
	.asciz	"PSP load asd failed!\n"

L_.str.8:                               ## @.str.8
	.asciz	"XGMI: Failed to initialize XGMI session\n"

L_.str.9:                               ## @.str.9
	.asciz	"RAS: Failed to initialize RAS\n"

	.no_dead_strip	_psp_hw_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psp_hw_start
_psp_hw_start:                          ; @psp_hw_start
	.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
	mov	x19, x0
	ldr	x21, [x0]
	mov	x0, x21
	bl	_amdgpu_sriov_vf
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w8, [x21, #20]
	cbz	w8, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _PSP_RING_TYPE__KM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSP_RING_TYPE__KM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_psp_ring_create
	cbz	w0, LBB0_12
; %bb.3:
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str.3@PAGE
Lloh4:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_4:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_psp_bootloader_load_kdb
	cbz	w0, LBB0_8
; %bb.7:
	mov	x20, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_8:
	mov	x0, x19
	bl	_psp_bootloader_load_sysdrv
	cbz	w0, LBB0_10
; %bb.9:
	mov	x20, x0
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_10:
	mov	x0, x19
	bl	_psp_bootloader_load_sos
	cbz	w0, LBB0_2
; %bb.11:
	mov	x20, x0
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_12:
	mov	x0, x19
	bl	_psp_tmr_init
	cbz	w0, LBB0_14
; %bb.13:
	mov	x20, x0
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_14:
	mov	x0, x19
	bl	_psp_tmr_load
	cbz	w0, LBB0_16
; %bb.15:
	mov	x20, x0
Lloh13:
	adrp	x0, l_.str.5@PAGE
Lloh14:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_16:
	mov	x0, x19
	bl	_psp_asd_init
	cbz	w0, LBB0_18
; %bb.17:
	mov	x20, x0
Lloh15:
	adrp	x0, l_.str.6@PAGE
Lloh16:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_18:
	mov	x0, x19
	bl	_psp_asd_load
	cbz	w0, LBB0_20
; %bb.19:
	mov	x20, x0
Lloh17:
	adrp	x0, l_.str.7@PAGE
Lloh18:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_20:
	ldr	w8, [x21, #16]
	cmp	w8, #2
	b.lt	LBB0_23
; %bb.21:
	mov	x0, x19
	bl	_psp_xgmi_initialize
	cbz	w0, LBB0_23
; %bb.22:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str.8@PAGE
Lloh20:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_dev_err
LBB0_23:
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_26
; %bb.24:
	mov	x0, x19
	bl	_psp_ras_initialize
	cbz	w0, LBB0_26
; %bb.25:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.9@PAGE
Lloh22:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_dev_err
LBB0_26:
	mov	w20, #0
LBB0_27:
	mov	x0, x20
	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 AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PSP load kdb failed!\n"

l_.str.1:                               ; @.str.1
	.asciz	"PSP load sysdrv failed!\n"

l_.str.2:                               ; @.str.2
	.asciz	"PSP load sos failed!\n"

	.comm	_PSP_RING_TYPE__KM,4,2          ; @PSP_RING_TYPE__KM
l_.str.3:                               ; @.str.3
	.asciz	"PSP create ring failed!\n"

l_.str.4:                               ; @.str.4
	.asciz	"PSP tmr init failed!\n"

l_.str.5:                               ; @.str.5
	.asciz	"PSP load tmr failed!\n"

l_.str.6:                               ; @.str.6
	.asciz	"PSP asd init failed!\n"

l_.str.7:                               ; @.str.7
	.asciz	"PSP load asd failed!\n"

l_.str.8:                               ; @.str.8
	.asciz	"XGMI: Failed to initialize XGMI session\n"

l_.str.9:                               ; @.str.9
	.asciz	"RAS: Failed to initialize RAS\n"

	.no_dead_strip	_psp_hw_start
.subsections_via_symbols
