	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv04_tv_dpms
_nv04_tv_dpms:                          ## @nv04_tv_dpms
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	%r12, %rdi
	callq	_nouveau_drm
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_nouveau_encoder
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_nv04_display
	movq	%rax, %r13
	movq	(%rbx), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_NV_DEBUG
	movq	_PLLSEL_TV_CRTC1_MASK@GOTPCREL(%rip), %rax
	movq	_PLLSEL_TV_CRTC2_MASK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	(%r13), %ecx
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, (%r13)
	movq	_DRM_MODE_DPMS_ON@GOTPCREL(%rip), %rax
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	cmpl	%r15d, (%rax)
	movq	%r14, %r15
	jne	LBB0_4
## %bb.1:
	movl	(%r15), %edi
	callq	_nouveau_crtc
	movl	(%rax), %r13d
	movq	_NV_CIO_CRE_RPC1_INDEX@GOTPCREL(%rip), %rax
	movq	%rax, %r14
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_NVReadVgaCrtc
	testl	%r13d, %r13d
	jne	LBB0_3
## %bb.2:
	movq	_PLLSEL_TV_CRTC1_MASK@GOTPCREL(%rip), %rbx
LBB0_3:
	movl	(%rbx), %ecx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	orl	%ecx, (%rbx)
	orl	$128, %eax
	movl	(%r14), %edx
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %ecx
	callq	_NVWriteVgaCrtc
	movl	(%rbx), %ecx
LBB0_4:
	movq	_NV_PRAMDAC_PLL_COEFF_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_NVWriteRAMDAC
	movq	%r15, %rdi
	callq	_get_slave_funcs
	movq	(%rax), %rax
	movq	%r15, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Setting dpms mode %d on TV encoder (output %d)\n"

	.comm	_PLLSEL_TV_CRTC1_MASK,4,2       ## @PLLSEL_TV_CRTC1_MASK
	.comm	_PLLSEL_TV_CRTC2_MASK,4,2       ## @PLLSEL_TV_CRTC2_MASK
	.comm	_DRM_MODE_DPMS_ON,4,2           ## @DRM_MODE_DPMS_ON
	.comm	_NV_CIO_CRE_RPC1_INDEX,4,2      ## @NV_CIO_CRE_RPC1_INDEX
	.comm	_NV_PRAMDAC_PLL_COEFF_SELECT,4,2 ## @NV_PRAMDAC_PLL_COEFF_SELECT
	.no_dead_strip	_nv04_tv_dpms
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv04_tv_dpms
_nv04_tv_dpms:                          ; @nv04_tv_dpms
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0, #8]
	mov	x0, x21
	bl	_nouveau_drm
	mov	x23, x0
	mov	x0, x20
	bl	_nouveau_encoder
	mov	x24, x0
	mov	x0, x21
	bl	_nv04_display
	mov	x22, x0
	ldr	x8, [x24]
	ldr	w3, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x19
	bl	_NV_DEBUG
Lloh2:
	adrp	x24, _PLLSEL_TV_CRTC1_MASK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PLLSEL_TV_CRTC1_MASK@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh4:
	adrp	x25, _PLLSEL_TV_CRTC2_MASK@GOTPAGE
Lloh5:
	ldr	x25, [x25, _PLLSEL_TV_CRTC2_MASK@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w8, w9, w8
	ldr	w9, [x22]
	bic	w3, w9, w8
	str	w3, [x22]
Lloh6:
	adrp	x8, _DRM_MODE_DPMS_ON@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DRM_MODE_DPMS_ON@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x20]
	bl	_nouveau_crtc
	ldr	w23, [x0]
Lloh9:
	adrp	x26, _NV_CIO_CRE_RPC1_INDEX@GOTPAGE
Lloh10:
	ldr	x26, [x26, _NV_CIO_CRE_RPC1_INDEX@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x21
	mov	x1, x23
	bl	_NVReadVgaCrtc
	cmp	w23, #0
	csel	x8, x24, x25, eq
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
	orr	w3, w0, #0x80
	ldr	w2, [x26]
	mov	x0, x21
	mov	x1, x23
	bl	_NVWriteVgaCrtc
	ldr	w3, [x22]
LBB0_2:
Lloh11:
	adrp	x8, _NV_PRAMDAC_PLL_COEFF_SELECT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NV_PRAMDAC_PLL_COEFF_SELECT@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #0
	bl	_NVWriteRAMDAC
	mov	x0, x20
	bl	_get_slave_funcs
	ldr	x2, [x0]
	mov	x0, x20
	mov	x1, x19
	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
	br	x2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Setting dpms mode %d on TV encoder (output %d)\n"

	.comm	_PLLSEL_TV_CRTC1_MASK,4,2       ; @PLLSEL_TV_CRTC1_MASK
	.comm	_PLLSEL_TV_CRTC2_MASK,4,2       ; @PLLSEL_TV_CRTC2_MASK
	.comm	_DRM_MODE_DPMS_ON,4,2           ; @DRM_MODE_DPMS_ON
	.comm	_NV_CIO_CRE_RPC1_INDEX,4,2      ; @NV_CIO_CRE_RPC1_INDEX
	.comm	_NV_PRAMDAC_PLL_COEFF_SELECT,4,2 ; @NV_PRAMDAC_PLL_COEFF_SELECT
	.no_dead_strip	_nv04_tv_dpms
.subsections_via_symbols
