	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dce_v11_0_crtc_disable
_dce_v11_0_crtc_disable:                ## @dce_v11_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_v11_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_v11_0_grph_enable
	movq	_ATOM_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_amdgpu_atombios_crtc_powergate
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.5:
	movq	8(%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_16
LBB0_11:
	movl	4(%rbx), %edx
	leal	-131(%rdx), %eax
	cmpl	$6, %eax
	jae	LBB0_13
## %bb.12:
	movq	_ATOM_CRTC_INVALID@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	leal	-128(%rdx), %eax
	cmpl	$2, %eax
	ja	LBB0_16
## %bb.14:
	movq	%rbx, %rax
LBB0_15:
	movl	(%rax), %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
LBB0_16:
	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	_ATOM_CRTC_INVALID,4,2          ## @ATOM_CRTC_INVALID
	.comm	_ATOM_PPLL_INVALID,4,2          ## @ATOM_PPLL_INVALID
	.no_dead_strip	_dce_v11_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_v11_0_crtc_disable
_dce_v11_0_crtc_disable:                ; @dce_v11_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_v11_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_v11_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]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.5:
	mov	x9, #0
	ldr	x10, [x22, #8]
	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, #131
	cmp	w8, #6
	b.hs	LBB0_13
; %bb.12:
Lloh8:
	adrp	x8, _ATOM_CRTC_INVALID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATOM_CRTC_INVALID@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
	sub	w8, w2, #128
	cmp	w8, #2
	b.hi	LBB0_16
; %bb.14:
	mov	x8, x19
LBB0_15:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _ATOM_DISABLE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ATOM_DISABLE@GOTPAGEOFF]
Lloh12:
	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:
Lloh13:
	adrp	x8, _ATOM_PPLL_INVALID@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ATOM_PPLL_INVALID@GOTPAGEOFF]
Lloh15:
	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 AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.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	_ATOM_CRTC_INVALID,4,2          ; @ATOM_CRTC_INVALID
	.comm	_ATOM_PPLL_INVALID,4,2          ; @ATOM_PPLL_INVALID
	.no_dead_strip	_dce_v11_0_crtc_disable
.subsections_via_symbols
