	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_gen3_queue_flip
_intel_gen3_queue_flip:                 ## @intel_gen3_queue_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	%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	%rcx, %r14
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	movq	%rsi, %rdi
	callq	_to_intel_crtc
	movq	%rax, %r15
	movq	_RCS@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	shlq	$2, %r13
	addq	(%r12), %r13
	movq	%r14, %r12
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_intel_pin_and_fence_fb_obj
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	$6, %esi
	callq	_intel_ring_begin
	testl	%eax, %eax
	je	LBB0_2
## %bb.6:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_intel_unpin_fb_obj
	jmp	LBB0_7
LBB0_2:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %r12
	cmpq	$0, 8(%r15)
	jne	LBB0_3
## %bb.4:
	movq	_MI_WAIT_FOR_PLANE_A_FLIP@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_MI_WAIT_FOR_PLANE_B_FLIP@GOTPCREL(%rip), %rax
LBB0_5:
	movq	_MI_WAIT_FOR_EVENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r13, %rdi
	callq	_intel_ring_emit
	movq	_MI_NOOP@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_intel_ring_emit
	movq	_MI_DISPLAY_FLIP_I915@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	8(%r12), %rdi
	callq	_MI_DISPLAY_FLIP_PLANE
	orl	%eax, %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_intel_ring_emit
	movq	(%r14), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_intel_ring_emit
	movl	(%r12), %esi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addl	(%rax), %esi
	movq	%r13, %rdi
	callq	_intel_ring_emit
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_intel_ring_emit
	movq	%r12, %rdi
	callq	_intel_mark_page_flip_active
	movq	%r13, %rdi
	callq	_intel_ring_advance
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RCS,8,3                        ## @RCS
	.comm	_MI_WAIT_FOR_PLANE_B_FLIP,4,2   ## @MI_WAIT_FOR_PLANE_B_FLIP
	.comm	_MI_WAIT_FOR_PLANE_A_FLIP,4,2   ## @MI_WAIT_FOR_PLANE_A_FLIP
	.comm	_MI_WAIT_FOR_EVENT,4,2          ## @MI_WAIT_FOR_EVENT
	.comm	_MI_NOOP,4,2                    ## @MI_NOOP
	.comm	_MI_DISPLAY_FLIP_I915,4,2       ## @MI_DISPLAY_FLIP_I915
	.no_dead_strip	_intel_gen3_queue_flip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_gen3_queue_flip
_intel_gen3_queue_flip:                 ; @intel_gen3_queue_flip
	.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, x3
	mov	x22, x2
	mov	x23, x0
	ldr	x20, [x0]
	mov	x0, x1
	bl	_to_intel_crtc
	mov	x19, x0
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _RCS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RCS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x20, x8, x9, lsl #2
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	bl	_intel_pin_and_fence_fb_obj
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.1:
	mov	x0, x20
	mov	w1, #6
	bl	_intel_ring_begin
	cbz	w0, LBB0_3
; %bb.2:
	mov	x23, x0
	mov	x0, x21
	bl	_intel_unpin_fb_obj
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _MI_WAIT_FOR_PLANE_A_FLIP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MI_WAIT_FOR_PLANE_A_FLIP@GOTPAGEOFF]
Lloh5:
	adrp	x10, _MI_WAIT_FOR_PLANE_B_FLIP@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MI_WAIT_FOR_PLANE_B_FLIP@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _MI_WAIT_FOR_EVENT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MI_WAIT_FOR_EVENT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_intel_ring_emit
Lloh10:
	adrp	x23, _MI_NOOP@GOTPAGE
Lloh11:
	ldr	x23, [x23, _MI_NOOP@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_intel_ring_emit
Lloh12:
	adrp	x8, _MI_DISPLAY_FLIP_I915@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MI_DISPLAY_FLIP_I915@GOTPAGEOFF]
Lloh14:
	ldr	w24, [x8]
	ldr	x0, [x19, #8]
	bl	_MI_DISPLAY_FLIP_PLANE
	orr	w1, w0, w24
	mov	x0, x20
	bl	_intel_ring_emit
	ldr	x8, [x22]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_intel_ring_emit
	ldr	w8, [x21]
	ldr	w9, [x19]
	add	w1, w9, w8
	mov	x0, x20
	bl	_intel_ring_emit
	ldr	w1, [x23]
	mov	x0, x20
	bl	_intel_ring_emit
	mov	x0, x19
	bl	_intel_mark_page_flip_active
	mov	x0, x20
	bl	_intel_ring_advance
	mov	w23, #0
LBB0_4:
	mov	x0, x23
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_RCS,8,3                        ; @RCS
	.comm	_MI_WAIT_FOR_PLANE_B_FLIP,4,2   ; @MI_WAIT_FOR_PLANE_B_FLIP
	.comm	_MI_WAIT_FOR_PLANE_A_FLIP,4,2   ; @MI_WAIT_FOR_PLANE_A_FLIP
	.comm	_MI_WAIT_FOR_EVENT,4,2          ; @MI_WAIT_FOR_EVENT
	.comm	_MI_NOOP,4,2                    ; @MI_NOOP
	.comm	_MI_DISPLAY_FLIP_I915,4,2       ; @MI_DISPLAY_FLIP_I915
	.no_dead_strip	_intel_gen3_queue_flip
.subsections_via_symbols
