	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_device_ip_suspend_phase1
_amdgpu_device_ip_suspend_phase1:       ## @amdgpu_device_ip_suspend_phase1
	.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	_AMD_PG_STATE_UNGATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_amdgpu_device_set_pg_state
	movq	_AMD_CG_STATE_UNGATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_amdgpu_device_set_cg_state
	movl	(%r15), %ebx
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.1:
	movq	8(%r15), %rax
	incq	%rbx
	movq	_AMD_IP_BLOCK_TYPE_DCE@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	decq	%rbx
	cmpq	$1, %rbx
	jbe	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %r14d
	shlq	$4, %r14
	cmpl	$0, 4(%rax,%r14)
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rax,%r14), %rcx
	movq	(%rcx), %rdx
	cmpq	(%r13), %rdx
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rcx), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	movl	%eax, %r12d
	movq	8(%r15), %rax
	testl	%r12d, %r12d
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, (%rax,%r14)
	jmp	LBB0_7
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_5:
	movq	8(%rax,%r14), %rax
	movq	8(%rax), %rax
	movl	8(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %edx
	callq	_DRM_ERROR
	movl	%r12d, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_PG_STATE_UNGATE,4,2        ## @AMD_PG_STATE_UNGATE
	.comm	_AMD_CG_STATE_UNGATE,4,2        ## @AMD_CG_STATE_UNGATE
	.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"

	.no_dead_strip	_amdgpu_device_ip_suspend_phase1
.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_phase1
_amdgpu_device_ip_suspend_phase1:       ; @amdgpu_device_ip_suspend_phase1
	.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	x19, x0
Lloh0:
	adrp	x8, _AMD_PG_STATE_UNGATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMD_PG_STATE_UNGATE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_amdgpu_device_set_pg_state
Lloh3:
	adrp	x8, _AMD_CG_STATE_UNGATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AMD_CG_STATE_UNGATE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amdgpu_device_set_cg_state
	ldr	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.1:
	ldr	x8, [x19, #8]
	add	x21, x9, #1
Lloh6:
	adrp	x22, _AMD_IP_BLOCK_TYPE_DCE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _AMD_IP_BLOCK_TYPE_DCE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	x21, x21, #1
	cmp	x21, #1
	b.ls	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w23, w21, #2
	add	x9, x8, w23, uxtw #4
	ldr	w9, [x9, #4]
	cbz	w9, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x8, x23, lsl #4
	ldr	x9, [x9, #8]
	ldr	x10, [x9]
	ldr	x11, [x22]
	cmp	x10, x11
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x9, #8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #8]
	cbnz	w0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	x9, x23, #4
	str	wzr, [x8, x9]
	b	LBB0_2
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	x0, x20
	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
LBB0_9:
	mov	x20, x0
	add	x8, x8, x23, lsl #4
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #8]
	ldr	w1, [x8, #8]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_DRM_ERROR
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_PG_STATE_UNGATE,4,2        ; @AMD_PG_STATE_UNGATE
	.comm	_AMD_CG_STATE_UNGATE,4,2        ; @AMD_CG_STATE_UNGATE
	.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"

	.no_dead_strip	_amdgpu_device_ip_suspend_phase1
.subsections_via_symbols
