	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv_crtc_mode_set
_nv_crtc_mode_set:                      ## @nv_crtc_mode_set
	.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	%rdx, %r15
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	(%rdi), %r12
	callq	_nouveau_crtc
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_nouveau_drm
	movq	%rax, %r14
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_NV_DEBUG
	movq	%r15, %rdi
	callq	_drm_mode_debug_printmodeline
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$-1, %edx
	callq	_nv_lock_vga_crtc_shadow
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_nv_crtc_mode_set_vga
	movl	(%r14), %edi
	callq	_nv_device
	movq	(%rax), %rax
	movq	_NV_40@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_NV_PRAMDAC_SEL_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_nv04_display
	movl	(%rax), %ecx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_NVWriteRAMDAC
LBB0_2:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_nv_crtc_mode_set_regs
	movl	(%r15), %edx
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_nv_crtc_calc_state_ext
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CTRC mode on CRTC %d:\n"

	.comm	_NV_40,8,3                      ## @NV_40
	.comm	_NV_PRAMDAC_SEL_CLK,4,2         ## @NV_PRAMDAC_SEL_CLK
	.no_dead_strip	_nv_crtc_mode_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv_crtc_mode_set
_nv_crtc_mode_set:                      ; @nv_crtc_mode_set
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0]
	bl	_nouveau_crtc
	mov	x23, x0
	mov	x0, x22
	bl	_nouveau_drm
	mov	x24, x0
	ldr	w2, [x23]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_NV_DEBUG
	mov	x0, x21
	bl	_drm_mode_debug_printmodeline
	ldr	w1, [x23]
	mov	x0, x22
	mov	w2, #-1
	bl	_nv_lock_vga_crtc_shadow
	mov	x0, x20
	mov	x1, x21
	bl	_nv_crtc_mode_set_vga
	ldr	w0, [x24]
	bl	_nv_device
	ldr	x8, [x0]
Lloh2:
	adrp	x9, _NV_40@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NV_40@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _NV_PRAMDAC_SEL_CLK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NV_PRAMDAC_SEL_CLK@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
	mov	x0, x22
	bl	_nv04_display
	ldr	w3, [x0]
	mov	x0, x22
	mov	w1, #0
	mov	x2, x23
	bl	_NVWriteRAMDAC
LBB0_2:
	mov	x0, x20
	mov	x1, x21
	bl	_nv_crtc_mode_set_regs
	ldr	w2, [x21]
	mov	x0, x20
	mov	x1, x19
	bl	_nv_crtc_calc_state_ext
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CTRC mode on CRTC %d:\n"

	.comm	_NV_40,8,3                      ; @NV_40
	.comm	_NV_PRAMDAC_SEL_CLK,4,2         ; @NV_PRAMDAC_SEL_CLK
	.no_dead_strip	_nv_crtc_mode_set
.subsections_via_symbols
