	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv50_crtc_set_image
_nv50_crtc_set_image:                   ## @nv50_crtc_set_image
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movl	%ecx, %r12d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	%rsi, %rdi
	callq	_nouveau_framebuffer
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r13), %edi
	callq	_nv50_mast
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movl	$16, %esi
	callq	_evo_wait
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_nv50_vers
	movq	_NVD0_DISP_MAST_CLASS@GOTPCREL(%rip), %rcx
	movl	(%r13), %esi
	cmpq	(%rcx), %rax
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	jge	LBB0_4
## %bb.2:
	shll	$10, %esi
	addl	$2144, %esi                     ## imm = 0x860
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$1, %edx
	callq	_evo_mthd
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	16(%r14), %rax
	movl	(%rax), %esi
	sarl	$8, %esi
	movq	%rbx, %rdi
	callq	_evo_data
	movl	(%r13), %esi
	shll	$10, %esi
	addl	$2152, %esi                     ## imm = 0x868
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_evo_mthd
	movl	(%r15), %esi
	shll	$16, %esi
	orl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_evo_data
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_evo_data
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_evo_data
	movl	(%r13), %esi
	shll	$10, %esi
	addl	$2240, %esi                     ## imm = 0x8C0
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_evo_mthd
	shll	$16, %r12d
	orl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_evo_data
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_nv50_vers
	movq	_NV50_DISP_MAST_CLASS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_6
## %bb.3:
	movl	(%r13), %esi
	shll	$10, %esi
	addl	$2164, %esi                     ## imm = 0x874
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_evo_mthd
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %r12d
	jmp	LBB0_5
LBB0_4:
	leal	(%rsi,%rsi,2), %esi
	shll	$8, %esi
	addl	$1120, %esi                     ## imm = 0x460
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_evo_mthd
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	16(%r14), %rax
	movl	(%rax), %esi
	sarl	$8, %esi
	movq	%rbx, %rdi
	callq	_evo_data
	movl	(%r13), %eax
	leal	(%rax,%rax,2), %esi
	shll	$8, %esi
	addl	$1128, %esi                     ## imm = 0x468
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_evo_mthd
	movl	(%r15), %esi
	shll	$16, %esi
	orl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_evo_data
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_evo_data
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_evo_data
	movl	8(%r14), %esi
	movq	%rbx, %rdi
	callq	_evo_data
	movl	(%r13), %eax
	leal	(%rax,%rax,2), %esi
	shll	$8, %esi
	addl	$1200, %esi                     ## imm = 0x4B0
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_evo_mthd
	shll	$16, %r12d
	orl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_5:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_evo_data
LBB0_6:
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	movl	$128, %esi
	movl	$1, %edx
	callq	_evo_mthd
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_evo_data
LBB0_8:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_evo_kick
LBB0_9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %eax
	movl	%eax, 4(%r13)
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVD0_DISP_MAST_CLASS,8,3       ## @NVD0_DISP_MAST_CLASS
	.comm	_NV50_DISP_MAST_CLASS,8,3       ## @NV50_DISP_MAST_CLASS
	.no_dead_strip	_nv50_crtc_set_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv50_crtc_set_image
_nv50_crtc_set_image:                   ; @nv50_crtc_set_image
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, x1
	mov	x19, x0
	mov	x0, x1
	bl	_nouveau_framebuffer
	mov	x20, x0
	ldr	w0, [x19, #8]
	bl	_nv50_mast
	mov	x21, x0
	mov	w1, #16
	bl	_evo_wait
	cbz	x0, LBB0_9
; %bb.1:
	mov	x23, x0
	mov	x0, x21
	bl	_nv50_vers
Lloh0:
	adrp	x8, _NVD0_DISP_MAST_CLASS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVD0_DISP_MAST_CLASS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldr	w8, [x19]
	cmp	x0, x9
	b.ge	LBB0_4
; %bb.2:
	lsl	w8, w8, #10
	add	w1, w8, #2144
	mov	x0, x23
	mov	w2, #1
	bl	_evo_mthd
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	asr	w1, w8, #8
	mov	x0, x23
	bl	_evo_data
	ldr	w8, [x19]
	lsl	w8, w8, #10
	add	w1, w8, #2152
	mov	x0, x23
	mov	w2, #3
	bl	_evo_mthd
	ldp	w8, w9, [x26]
	orr	w1, w9, w8, lsl #16
	mov	x0, x23
	bl	_evo_data
	ldr	w1, [x20]
	mov	x0, x23
	bl	_evo_data
	ldr	w1, [x20, #4]
	mov	x0, x23
	bl	_evo_data
	ldr	w8, [x19]
	lsl	w8, w8, #10
	add	w1, w8, #2240
	mov	x0, x23
	mov	w2, #1
	bl	_evo_mthd
	orr	w1, w25, w24, lsl #16
	mov	x0, x23
	bl	_evo_data
	mov	x0, x21
	bl	_nv50_vers
Lloh3:
	adrp	x8, _NV50_DISP_MAST_CLASS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NV50_DISP_MAST_CLASS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_6
; %bb.3:
	ldr	w8, [x19]
	lsl	w8, w8, #10
	add	w1, w8, #2164
	mov	x0, x23
	mov	w2, #1
	bl	_evo_mthd
	ldr	w1, [x20, #8]
	b	LBB0_5
LBB0_4:
	mov	w27, #768
	mul	w8, w8, w27
	add	w1, w8, #1120
	mov	x0, x23
	mov	w2, #1
	bl	_evo_mthd
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	asr	w1, w8, #8
	mov	x0, x23
	bl	_evo_data
	ldr	w8, [x19]
	mul	w8, w8, w27
	add	w1, w8, #1128
	mov	x0, x23
	mov	w2, #4
	bl	_evo_mthd
	ldp	w8, w9, [x26]
	orr	w1, w9, w8, lsl #16
	mov	x0, x23
	bl	_evo_data
	ldr	w1, [x20]
	mov	x0, x23
	bl	_evo_data
	ldr	w1, [x20, #4]
	mov	x0, x23
	bl	_evo_data
	ldr	w1, [x20, #8]
	mov	x0, x23
	bl	_evo_data
	ldr	w8, [x19]
	mul	w8, w8, w27
	add	w1, w8, #1200
	mov	x0, x23
	mov	w2, #1
	bl	_evo_mthd
	orr	w1, w25, w24, lsl #16
LBB0_5:
	mov	x0, x23
	bl	_evo_data
LBB0_6:
	cbz	w22, LBB0_8
; %bb.7:
	mov	x0, x23
	mov	w1, #128
	mov	w2, #1
	bl	_evo_mthd
	mov	x0, x23
	mov	w1, #0
	bl	_evo_data
LBB0_8:
	mov	x0, x23
	mov	x1, x21
	bl	_evo_kick
LBB0_9:
	ldr	w8, [x20, #8]
	str	w8, [x19, #4]
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NVD0_DISP_MAST_CLASS,8,3       ; @NVD0_DISP_MAST_CLASS
	.comm	_NV50_DISP_MAST_CLASS,8,3       ; @NV50_DISP_MAST_CLASS
	.no_dead_strip	_nv50_crtc_set_image
.subsections_via_symbols
