	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r13
	movq	%rdx, %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	(%rdi), %rbx
	callq	_nouveau_crtc
	movq	%rax, %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r14, %rbx
	callq	_nouveau_drm
	movq	%rax, %r14
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_NV_DEBUG
	movq	%rbx, %rdi
	callq	_drm_mode_debug_printmodeline
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_nv_crtc_swap_fbs
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movl	(%r15), %esi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	$-1, %edx
	callq	_nv_lock_vga_crtc_shadow
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_nv_crtc_mode_set_vga
	movq	(%r14), %rax
	movq	_NV_DEVICE_INFO_V0_CURIE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	_NV_PRAMDAC_SEL_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r15, %rdi
	callq	_nv04_display
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_NVWriteRAMDAC
LBB0_3:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_nv_crtc_mode_set_regs
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_nv_crtc_calc_state_ext
LBB0_4:
	movl	%r13d, %eax
	addq	$24, %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_DEVICE_INFO_V0_CURIE,8,3    ## @NV_DEVICE_INFO_V0_CURIE
	.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	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	x23, x5
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0]
	bl	_nouveau_crtc
	mov	x25, x0
	mov	x0, x22
	bl	_nouveau_drm
	mov	x24, x0
	ldr	w2, [x25]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_NV_DEBUG
	mov	x0, x21
	bl	_drm_mode_debug_printmodeline
	mov	x0, x20
	mov	x1, x23
	bl	_nv_crtc_swap_fbs
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w1, [x25]
	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	x8, [x24]
Lloh2:
	adrp	x9, _NV_DEVICE_INFO_V0_CURIE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NV_DEVICE_INFO_V0_CURIE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _NV_PRAMDAC_SEL_CLK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NV_PRAMDAC_SEL_CLK@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
	mov	x0, x22
	bl	_nv04_display
	ldr	w3, [x0]
	mov	x0, x22
	mov	w1, #0
	mov	x2, x24
	bl	_NVWriteRAMDAC
LBB0_3:
	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
LBB0_4:
	mov	x0, x23
	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
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.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_DEVICE_INFO_V0_CURIE,8,3    ; @NV_DEVICE_INFO_V0_CURIE
	.comm	_NV_PRAMDAC_SEL_CLK,4,2         ; @NV_PRAMDAC_SEL_CLK
	.no_dead_strip	_nv_crtc_mode_set
.subsections_via_symbols
