	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_intel_finish_page_flip
_do_intel_finish_page_flip:             ## @do_intel_finish_page_flip
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	%rsi, %rdi
	callq	_to_intel_crtc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	8(%r14), %r12
	xorl	%eax, %eax
	callq	_smp_rmb
	testq	%r12, %r12
	je	LBB0_7
## %bb.2:
	leaq	24(%r12), %rdi
	callq	_atomic_read
	movq	_INTEL_FLIP_COMPLETE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_3
LBB0_7:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%eax, %eax
	callq	_smp_rmb
	movq	$0, 8(%r14)
	movq	16(%r12), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.4:
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_drm_send_vblank_event
LBB0_5:
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_drm_vblank_put
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	leaq	4(%r15), %rdi
	callq	_wake_up_all
	movl	(%r15), %edi
	leaq	4(%r12), %rsi
	callq	_queue_work
	movl	(%r14), %edi
	movl	(%r12), %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_trace_i915_flip_complete       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_FLIP_COMPLETE,8,3        ## @INTEL_FLIP_COMPLETE
	.no_dead_strip	_do_intel_finish_page_flip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_intel_finish_page_flip
_do_intel_finish_page_flip:             ; @do_intel_finish_page_flip
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	x21, [x0, #8]
	mov	x0, x1
	bl	_to_intel_crtc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x22, [x19, #8]
	bl	_smp_rmb
	cbz	x22, LBB0_3
; %bb.2:
	add	x0, x22, #24
	bl	_atomic_read
Lloh0:
	adrp	x8, _INTEL_FLIP_COMPLETE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTEL_FLIP_COMPLETE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_5
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	_smp_rmb
	str	xzr, [x19, #8]
	ldr	x2, [x22, #16]
	cbz	x2, LBB0_7
; %bb.6:
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_drm_send_vblank_event
LBB0_7:
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_drm_vblank_put
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	add	x0, x21, #4
	bl	_wake_up_all
	ldr	w0, [x21]
	add	x1, x22, #4
	bl	_queue_work
	ldr	w0, [x19]
	ldr	w1, [x22]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_trace_i915_flip_complete
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_FLIP_COMPLETE,8,3        ; @INTEL_FLIP_COMPLETE
	.no_dead_strip	_do_intel_finish_page_flip
.subsections_via_symbols
