	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_flip_complete          ## -- Begin function nouveau_flip_complete
	.p2align	4, 0x90
_nouveau_flip_complete:                 ## @nouveau_flip_complete
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	(%rdi), %rbx
	leaq	-40(%rbp), %rsi
	callq	_nouveau_finish_page_flip
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movl	4(%rbx), %edi
	callq	_nv_device
	movq	(%rax), %rax
	movq	_NV_50@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_3
## %bb.2:
	movl	(%rbx), %edi
	movl	-28(%rbp), %eax
	movslq	-40(%rbp), %rcx
	movslq	-36(%rbp), %rbx
	imulq	%rcx, %rbx
	addq	-24(%rbp), %rbx
	imull	-32(%rbp), %eax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	movl	-16(%rbp), %esi
	sarl	$3, %ecx
	movslq	%ecx, %rdx
	addq	%rbx, %rdx
	callq	_nv_set_crtc_base
LBB0_3:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_50,8,3                      ## @NV_50
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_flip_complete          ; -- Begin function nouveau_flip_complete
	.p2align	2
_nouveau_flip_complete:                 ; @nouveau_flip_complete
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	ldr	x19, [x0]
	mov	x1, sp
	bl	_nouveau_finish_page_flip
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	w0, [x19, #4]
	bl	_nv_device
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _NV_50@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NV_50@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.2:
	ldr	w0, [x19]
	ldr	w1, [sp, #24]
	ldr	x8, [sp, #16]
	ldpsw	x9, x10, [sp]
	madd	x8, x10, x9, x8
	ldp	w9, w10, [sp, #8]
	mul	w9, w10, w9
	add	w10, w9, #7
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #3
	add	x2, x8, w9, sxtw
	bl	_nv_set_crtc_base
LBB0_3:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_50,8,3                      ; @NV_50
.subsections_via_symbols
