	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_async_page_flip
_vc4_async_page_flip:                   ## @vc4_async_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	8(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_to_vc4_dev
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_drm_fb_cma_get_gem_obj
	movq	%rax, %rdi
	callq	_to_vc4_bo
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_vc4_bo_inc_usecnt
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_1
LBB0_8:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	%r15, %r12
	movq	%r15, %rdi
	callq	_drm_framebuffer_get
	movq	%r15, 32(%rbx)
	movq	%r13, 24(%rbx)
	movq	%r14, 16(%rbx)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_down_interruptible
	testl	%eax, %eax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_5
## %bb.4:
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_drm_framebuffer_put
	movq	%r15, %rdi
	callq	_vc4_bo_dec_usecnt
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_8
LBB0_2:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_vc4_bo_dec_usecnt
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_5:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rax
	movq	(%rax), %rdi
	movq	%rdi, 8(%rbx)
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_drm_framebuffer_get
LBB0_7:
	movq	%r13, %rdi
	callq	_drm_crtc_vblank_get
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_WARN_ON
	movq	(%r14), %rdi
	movq	%r12, %rsi
	callq	_drm_atomic_set_fb_for_plane
	movl	(%r15), %edx
	movq	_vc4_async_page_flip_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_vc4_queue_seqno_cb
	xorl	%r14d, %r14d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vc4_async_page_flip_complete,4,2 ## @vc4_async_page_flip_complete
	.no_dead_strip	_vc4_async_page_flip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_async_page_flip
_vc4_async_page_flip:                   ; @vc4_async_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	x24, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_to_vc4_dev
	mov	x25, x0
	ldr	x27, [x22]
	mov	x0, x20
	mov	w1, #0
	bl	_drm_fb_cma_get_gem_obj
	bl	_to_vc4_bo
	mov	x21, x0
	bl	_vc4_bo_inc_usecnt
	mov	x26, x0
	cbz	w0, LBB0_2
LBB0_1:
	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_2:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x23, x0
	mov	x0, x20
	bl	_drm_framebuffer_get
	stp	x22, x20, [x23, #24]
	str	x24, [x23, #16]
	mov	x0, x25
	bl	_down_interruptible
	cbz	w0, LBB0_6
; %bb.4:
	mov	x26, x0
	mov	x0, x20
	bl	_drm_framebuffer_put
	mov	x0, x21
	bl	_vc4_bo_dec_usecnt
	mov	x0, x23
	bl	_kfree
	b	LBB0_1
LBB0_5:
	mov	x0, x21
	bl	_vc4_bo_dec_usecnt
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_1
LBB0_6:
	ldr	x8, [x27]
	ldr	x0, [x8]
	str	x0, [x23, #8]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_drm_framebuffer_get
LBB0_8:
	mov	x0, x22
	bl	_drm_crtc_vblank_get
	cmp	x0, #0
	cset	w0, ne
	bl	_WARN_ON
	ldr	x0, [x27]
	mov	x1, x20
	bl	_drm_atomic_set_fb_for_plane
	ldr	w2, [x21]
Lloh6:
	adrp	x8, _vc4_async_page_flip_complete@GOTPAGE
Lloh7:
	ldr	x8, [x8, _vc4_async_page_flip_complete@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x23
	bl	_vc4_queue_seqno_cb
	mov	w26, #0
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vc4_async_page_flip_complete,4,2 ; @vc4_async_page_flip_complete
	.no_dead_strip	_vc4_async_page_flip
.subsections_via_symbols
