	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_device_ip_suspend_phase2
_amdgpu_device_ip_suspend_phase2:       ## @amdgpu_device_ip_suspend_phase2
	.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
	movl	(%rdi), %ebx
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jle	LBB0_15
## %bb.1:
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	incq	%rbx
	movq	_AMD_IP_BLOCK_TYPE_DCE@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rax
	movl	$0, (%rax,%r15)
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	decq	%rbx
	cmpq	$1, %rbx
	jbe	LBB0_14
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %r15d
	shlq	$4, %r15
	cmpl	$0, 4(%rax,%r15)
	je	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rax,%r15), %rcx
	movq	(%rcx), %rdx
	cmpq	(%r14), %rdx
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rcx), %rax
	movq	%r13, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rcx
	movq	8(%rcx,%r15), %rcx
	movq	8(%rcx), %rcx
	movl	8(%rcx), %esi
	leaq	L_.str(%rip), %rdi
	movl	%eax, %edx
	callq	_DRM_ERROR
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rax
	movl	$0, (%rax,%r15)
	movq	8(%rax,%r15), %rax
	movq	(%rax), %rax
	movq	_AMD_IP_BLOCK_TYPE_SMC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_is_support_sw_smu
	testq	%rax, %rax
	jne	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%r13), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	16(%r13), %esi
	movl	24(%r13), %edi
	callq	*%rax
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r12d
	movl	16(%r13), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %edx
	callq	_DRM_ERROR
	movl	%r12d, %eax
	jmp	LBB0_15
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_IP_BLOCK_TYPE_DCE,8,3      ## @AMD_IP_BLOCK_TYPE_DCE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"suspend of IP block <%s> failed %d\n"

	.comm	_AMD_IP_BLOCK_TYPE_SMC,8,3      ## @AMD_IP_BLOCK_TYPE_SMC
L_.str.1:                               ## @.str.1
	.asciz	"SMC failed to set mp1 state %d, %d\n"

	.no_dead_strip	_amdgpu_device_ip_suspend_phase2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_device_ip_suspend_phase2
_amdgpu_device_ip_suspend_phase2:       ; @amdgpu_device_ip_suspend_phase2
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w9, [x0]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	add	x22, x9, #1
Lloh0:
	adrp	x23, _AMD_IP_BLOCK_TYPE_DCE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AMD_IP_BLOCK_TYPE_DCE@GOTPAGEOFF]
Lloh2:
	adrp	x20, l_.str@PAGE
Lloh3:
	add	x20, x20, l_.str@PAGEOFF
Lloh4:
	adrp	x24, _AMD_IP_BLOCK_TYPE_SMC@GOTPAGE
Lloh5:
	ldr	x24, [x24, _AMD_IP_BLOCK_TYPE_SMC@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	lsl	x9, x25, #4
	str	wzr, [x8, x9]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	x22, x22, #1
	cmp	x22, #1
	b.ls	LBB0_14
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	w25, w22, #2
	add	x9, x8, w25, uxtw #4
	ldr	w9, [x9, #4]
	cbz	w9, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x8, x25, lsl #4
	ldr	x9, [x9, #8]
	ldr	x10, [x9]
	ldr	x11, [x23]
	cmp	x10, x11
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x9, #8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x0
	ldr	x8, [x19, #8]
	add	x8, x8, x25, lsl #4
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #8]
	ldr	w1, [x8, #8]
	mov	x0, x20
	bl	_DRM_ERROR
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x25, lsl #4
	str	wzr, [x8]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_is_support_sw_smu
	cbnz	x0, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #24]
	ldr	w1, [x19, #16]
	blr	x8
	cbz	w0, LBB0_2
; %bb.13:
	mov	x21, x0
	ldr	w1, [x19, #16]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_DRM_ERROR
	b	LBB0_15
LBB0_14:
	mov	w21, #0
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_IP_BLOCK_TYPE_DCE,8,3      ; @AMD_IP_BLOCK_TYPE_DCE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"suspend of IP block <%s> failed %d\n"

	.comm	_AMD_IP_BLOCK_TYPE_SMC,8,3      ; @AMD_IP_BLOCK_TYPE_SMC
l_.str.1:                               ; @.str.1
	.asciz	"SMC failed to set mp1 state %d, %d\n"

	.no_dead_strip	_amdgpu_device_ip_suspend_phase2
.subsections_via_symbols
