	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dce_v8_0_crtc_disable
_dce_v8_0_crtc_disable:                 ## @dce_v8_0_crtc_disable
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_to_amdgpu_crtc
	movq	%rax, %rbx
	movq	8(%r14), %rax
	movq	(%rax), %r12
	movq	_DRM_MODE_DPMS_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dce_v8_0_crtc_dpms
	movq	(%r14), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_gem_to_amdgpu_bo
	movq	%rax, %r15
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_amdgpu_bo_reserve
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_4
LBB0_3:
	movq	%r15, %rdi
	callq	_amdgpu_bo_unpin
	movq	%r15, %rdi
	callq	_amdgpu_bo_unreserve
LBB0_4:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dce_v8_0_grph_enable
	movq	_ATOM_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_amdgpu_atombios_crtc_powergate
	movl	8(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.5:
	movq	16(%r12), %rcx
	xorl	%edx, %edx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	je	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, 8(%rsi)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rbx), %edi
	cmpq	%rdi, %rdx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%rbx), %edi
	cmpl	(%rsi), %edi
	jne	LBB0_10
	jmp	LBB0_17
LBB0_11:
	movl	4(%rbx), %edx
	leal	-128(%rdx), %eax
	cmpl	$2, %eax
	jae	LBB0_12
LBB0_16:
	movl	(%rbx), %esi
	movq	_ATOM_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	leaq	-40(%rbp), %rax
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	callq	_amdgpu_atombios_crtc_program_pll
	addq	$64, %rsp
	jmp	LBB0_17
LBB0_12:
	cmpl	$130, %edx
	jne	LBB0_17
## %bb.13:
	movl	(%r12), %eax
	movq	_CHIP_KAVERI@GOTPCREL(%rip), %rcx
	movl	$130, %edx
	cmpl	(%rcx), %eax
	je	LBB0_16
## %bb.14:
	movq	_CHIP_BONAIRE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_16
## %bb.15:
	movq	_CHIP_HAWAII@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_16
LBB0_17:
	movq	_ATOM_PPLL_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movq	$0, 24(%rbx)
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_DPMS_OFF,4,2          ## @DRM_MODE_DPMS_OFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to reserve abo before unpin\n"

	.comm	_ATOM_ENABLE,4,2                ## @ATOM_ENABLE
	.comm	_ATOM_DISABLE,4,2               ## @ATOM_DISABLE
	.comm	_CHIP_KAVERI,4,2                ## @CHIP_KAVERI
	.comm	_CHIP_BONAIRE,4,2               ## @CHIP_BONAIRE
	.comm	_CHIP_HAWAII,4,2                ## @CHIP_HAWAII
	.comm	_ATOM_PPLL_INVALID,4,2          ## @ATOM_PPLL_INVALID
	.no_dead_strip	_dce_v8_0_crtc_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dce_v8_0_crtc_disable
_dce_v8_0_crtc_disable:                 ; @dce_v8_0_crtc_disable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x0
	bl	_to_amdgpu_crtc
	mov	x19, x0
	ldr	x8, [x20, #8]
	ldr	x22, [x8]
Lloh0:
	adrp	x8, _DRM_MODE_DPMS_OFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_DPMS_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_dce_v8_0_crtc_dpms
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_gem_to_amdgpu_bo
	mov	x21, x0
	mov	w1, #1
	bl	_amdgpu_bo_reserve
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_3:
	mov	x0, x21
	bl	_amdgpu_bo_unpin
	mov	x0, x21
	bl	_amdgpu_bo_unreserve
LBB0_4:
	mov	x0, x20
	mov	w1, #0
	bl	_dce_v8_0_grph_enable
Lloh5:
	adrp	x8, _ATOM_ENABLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATOM_ENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_amdgpu_atombios_crtc_powergate
	ldr	w8, [x22, #8]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.5:
	mov	x9, #0
	ldr	x10, [x22, #16]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.eq	LBB0_11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x9, lsl #3]
	cbz	x11, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x12, [x11, #8]
	cbz	x12, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w12, [x19]
	cmp	x9, x12
	b.eq	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w12, [x19, #4]
	ldr	w11, [x11]
	cmp	w12, w11
	b.ne	LBB0_6
	b	LBB0_16
LBB0_11:
	ldr	w2, [x19, #4]
	sub	w8, w2, #128
	cmp	w8, #2
	b.lo	LBB0_15
; %bb.12:
	cmp	w2, #130
	b.ne	LBB0_16
; %bb.13:
	ldr	w8, [x22]
Lloh8:
	adrp	x9, _CHIP_KAVERI@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CHIP_KAVERI@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _CHIP_BONAIRE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CHIP_BONAIRE@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _CHIP_HAWAII@GOTPAGE
Lloh15:
	ldr	x11, [x11, _CHIP_HAWAII@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	ccmp	w8, w11, #4, ne
	b.ne	LBB0_16
; %bb.14:
	mov	w2, #130
LBB0_15:
	ldr	w1, [x19]
Lloh17:
	adrp	x8, _ATOM_DISABLE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ATOM_DISABLE@GOTPAGEOFF]
Lloh19:
	ldr	w5, [x8]
	stp	xzr, xzr, [sp]
	add	x8, sp, #24
	str	x8, [sp, #16]
	mov	x0, x20
	mov	w3, #0
	mov	w4, #0
	mov	w6, #0
	mov	w7, #0
	bl	_amdgpu_atombios_crtc_program_pll
LBB0_16:
Lloh20:
	adrp	x8, _ATOM_PPLL_INVALID@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ATOM_PPLL_INVALID@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	stp	xzr, xzr, [x19, #16]
	str	xzr, [x19, #8]
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_DPMS_OFF,4,2          ; @DRM_MODE_DPMS_OFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to reserve abo before unpin\n"

	.comm	_ATOM_ENABLE,4,2                ; @ATOM_ENABLE
	.comm	_ATOM_DISABLE,4,2               ; @ATOM_DISABLE
	.comm	_CHIP_KAVERI,4,2                ; @CHIP_KAVERI
	.comm	_CHIP_BONAIRE,4,2               ; @CHIP_BONAIRE
	.comm	_CHIP_HAWAII,4,2                ; @CHIP_HAWAII
	.comm	_ATOM_PPLL_INVALID,4,2          ; @ATOM_PPLL_INVALID
	.no_dead_strip	_dce_v8_0_crtc_disable
.subsections_via_symbols
