	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_crtc_page_flip
_intel_crtc_page_flip:                  ## @intel_crtc_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r12
	movq	8(%r12), %rbx
	movq	%rsi, %rdi
	callq	_to_intel_framebuffer
	movq	(%rax), %r13
	movq	%r14, %rdi
	callq	_to_intel_crtc
	movq	(%r15), %rdx
	movq	(%r14), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_1
## %bb.3:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_INTEL_INFO
	cmpl	$4, (%rax)
	movq	%r14, %rbx
	jl	LBB0_6
## %bb.4:
	movq	8(%r15), %rax
	movq	(%rax), %rcx
	movq	(%rbx), %rax
	movq	8(%rax), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_1
## %bb.5:
	movq	16(%r15), %rcx
	movq	(%rcx), %rcx
	movq	16(%rax), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_1
LBB0_6:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r14
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 40(%r14)
	movq	%rbx, 32(%r14)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_to_intel_framebuffer
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	movq	%r14, %rdi
	addq	$24, %rdi
	movq	_intel_unpin_work_fn@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	4(%r15), %esi
	movq	%r12, %rdi
	callq	_drm_vblank_get
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_9
LBB0_18:
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_19
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_19:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_9:
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 8(%r15)
	je	LBB0_11
## %bb.10:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	callq	_kfree
	movl	4(%r15), %esi
	movq	%r12, %rdi
	callq	_drm_vblank_put
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_11:
	movq	%r14, 8(%r15)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	addq	$16, %r15
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_atomic_read
	cmpl	$2, %eax
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	jl	LBB0_13
## %bb.12:
	movl	12(%r15), %edi
	callq	_flush_workqueue
LBB0_13:
	movq	%r12, %rdi
	callq	_i915_mutex_lock_interruptible
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.14:
	movq	8(%r14), %rdi
	callq	_drm_gem_object_reference
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_drm_gem_object_reference
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movq	%r13, 16(%r14)
	movl	$1, (%r14)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_inc
	leaq	8(%r15), %rdi
	callq	_atomic_read
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	%r12, %rdi
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rbx
	movq	%r13, %r14
	movq	%r13, %rcx
	callq	*(%r15)
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:
	movl	%eax, %r13d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_dec
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	8(%rbx), %rdi
	callq	_drm_gem_object_unreference
	movq	%r14, %rdi
	callq	_drm_gem_object_unreference
	leaq	4(%r12), %rdi
	callq	_mutex_unlock
	movq	%rbx, %r14
LBB0_17:
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	$0, 8(%rbx)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	4(%rbx), %esi
	movq	%r12, %rdi
	callq	_drm_vblank_put
	jmp	LBB0_18
LBB0_15:
	movq	%r12, %rdi
	callq	_intel_disable_fbc
	movq	%r14, %rdi
	callq	_intel_mark_fb_busy
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	20(%rax), %edi
	movq	%r14, %rsi
	callq	_trace_i915_flip_request
	xorl	%r13d, %r13d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_intel_unpin_work_fn,4,2        ## @intel_unpin_work_fn
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"flip queue: crtc already busy\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_intel_crtc_page_flip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_crtc_page_flip
_intel_crtc_page_flip:                  ; @intel_crtc_page_flip
	.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	x26, x2
	mov	x24, x1
	mov	x22, x0
	ldp	x23, x19, [x0]
	ldr	x28, [x19, #8]
	mov	x0, x1
	bl	_to_intel_framebuffer
	ldr	x21, [x0]
	mov	x0, x22
	bl	_to_intel_crtc
	ldr	x8, [x24]
	ldr	x9, [x22]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_INTEL_INFO
	ldr	w8, [x0]
	cmp	w8, #4
	b.lt	LBB0_4
; %bb.2:
	ldr	x8, [x24, #8]
	ldr	x9, [x8]
	ldr	x8, [x22]
	ldr	x10, [x8, #8]
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.3:
	ldr	x9, [x24, #16]
	ldr	x9, [x9]
	ldr	x8, [x8, #16]
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_7
LBB0_4:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.5:
	mov	x25, x0
	stp	x22, x26, [x0, #32]
	mov	x0, x23
	bl	_to_intel_framebuffer
	ldr	x8, [x0]
	str	x8, [x25, #8]
	add	x0, x25, #24
Lloh3:
	adrp	x8, _intel_unpin_work_fn@GOTPAGE
Lloh4:
	ldr	x8, [x8, _intel_unpin_work_fn@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_INIT_WORK
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_drm_vblank_get
	mov	x26, x0
	cbz	w0, LBB0_11
LBB0_6:
	mov	x0, x25
	bl	_kfree
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w26, w8
LBB0_9:
	mov	x0, x26
	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
LBB0_10:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_11:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x25
	bl	_kfree
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_drm_vblank_put
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_13:
	str	x25, [x20, #8]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	add	x27, x20, #16
	mov	x0, x27
	bl	_atomic_read
	cmp	w0, #2
	b.lt	LBB0_15
; %bb.14:
	ldr	w0, [x28, #12]
	bl	_flush_workqueue
LBB0_15:
	mov	x0, x19
	bl	_i915_mutex_lock_interruptible
	mov	x26, x0
	cbnz	w0, LBB0_18
; %bb.16:
	ldr	x0, [x25, #8]
	bl	_drm_gem_object_reference
	mov	x0, x21
	bl	_drm_gem_object_reference
	str	x24, [x22]
	str	x21, [x25, #16]
	mov	w8, #1
	str	w8, [x25]
	mov	x0, x27
	bl	_atomic_inc
	add	x0, x28, #8
	bl	_atomic_read
	str	w0, [x20]
	ldr	x8, [x28]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x24
	mov	x3, x21
	blr	x8
	mov	x26, x0
	cbz	w0, LBB0_19
; %bb.17:
	mov	x0, x27
	bl	_atomic_dec
	str	x23, [x22]
	ldr	x0, [x25, #8]
	bl	_drm_gem_object_unreference
	mov	x0, x21
	bl	_drm_gem_object_unreference
	add	x0, x19, #4
	bl	_mutex_unlock
LBB0_18:
	mov	x0, x19
	bl	_spin_lock_irqsave
	str	xzr, [x20, #8]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_drm_vblank_put
	b	LBB0_6
LBB0_19:
	mov	x0, x19
	bl	_intel_disable_fbc
	mov	x0, x21
	bl	_intel_mark_fb_busy
	add	x0, x19, #4
	bl	_mutex_unlock
	ldr	w0, [x20, #20]
	mov	x1, x21
	bl	_trace_i915_flip_request
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_intel_unpin_work_fn,4,2        ; @intel_unpin_work_fn
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"flip queue: crtc already busy\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_intel_crtc_page_flip
.subsections_via_symbols
