	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psp_suspend
_psp_suspend:                           ## @psp_suspend
	.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
	leaq	8(%rdi), %r14
	cmpl	$2, (%rdi)
	jl	LBB0_4
## %bb.1:
	cmpl	$1, 16(%rdi)
	jne	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	_psp_xgmi_terminate
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_9
LBB0_4:
	movq	(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_psp_ras_terminate
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_9
LBB0_7:
	movq	_PSP_RING_TYPE__KM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_psp_ring_stop
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
LBB0_9:
	callq	_DRM_ERROR
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to terminate xgmi ta\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to terminate ras ta\n"

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

	.no_dead_strip	_psp_suspend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psp_suspend
_psp_suspend:                           ; @psp_suspend
	.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
	mov	x20, x0
	ldr	w8, [x20], #8
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.1:
	ldr	w8, [x0, #16]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_psp_xgmi_terminate
	cbz	w0, LBB0_4
; %bb.3:
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_4:
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_psp_ras_terminate
	cbz	w0, LBB0_7
; %bb.6:
	mov	x19, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_7:
Lloh4:
	adrp	x8, _PSP_RING_TYPE__KM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PSP_RING_TYPE__KM@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_psp_ring_stop
	mov	x19, x0
	cbz	w0, LBB0_10
; %bb.8:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_9:
	bl	_DRM_ERROR
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to terminate xgmi ta\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to terminate ras ta\n"

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

	.no_dead_strip	_psp_suspend
.subsections_via_symbols
