	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_gen4_queue_flip
_intel_gen4_queue_flip:                 ## @intel_gen4_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	movq	%rsi, %rdi
	callq	_to_intel_crtc
	movq	%rax, %r14
	movq	_RCS@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	shlq	$2, %r13
	addq	(%r12), %r13
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_intel_pin_and_fence_fb_obj
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	%r14, %r12
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	$4, %esi
	callq	_intel_ring_begin
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_intel_unpin_fb_obj
	jmp	LBB0_4
LBB0_2:
	movq	_MI_DISPLAY_FLIP@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	8(%r12), %edi
	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
	addl	(%r15), %esi
	orl	4(%r15), %esi
	movq	%r13, %rdi
	callq	_intel_ring_emit
	movl	4(%r12), %edi
	callq	_PIPESRC
	movl	%eax, %edi
	callq	_I915_READ
	andl	$268374015, %eax                ## imm = 0xFFF0FFF
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_intel_ring_emit
	movq	%r12, %rdi
	callq	_intel_mark_page_flip_active
	movq	%r13, %rdi
	callq	_intel_ring_advance
	xorl	%ebx, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %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_DISPLAY_FLIP,4,2            ## @MI_DISPLAY_FLIP
	.no_dead_strip	_intel_gen4_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_gen4_queue_flip
_intel_gen4_queue_flip:                 ; @intel_gen4_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, #4
	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:
Lloh3:
	adrp	x8, _MI_DISPLAY_FLIP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MI_DISPLAY_FLIP@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	ldr	w0, [x19, #8]
	bl	_MI_DISPLAY_FLIP_PLANE
	orr	w1, w0, w23
	mov	x0, x20
	bl	_intel_ring_emit
	ldr	x8, [x22]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_intel_ring_emit
	ldr	w8, [x19]
	ldp	w9, w10, [x21]
	add	w8, w8, w9
	orr	w1, w8, w10
	mov	x0, x20
	bl	_intel_ring_emit
	ldr	w0, [x19, #4]
	bl	_PIPESRC
	bl	_I915_READ
	and	w1, w0, #0xfff0fff
	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	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RCS,8,3                        ; @RCS
	.comm	_MI_DISPLAY_FLIP,4,2            ; @MI_DISPLAY_FLIP
	.no_dead_strip	_intel_gen4_queue_flip
.subsections_via_symbols
