	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_crtc_handle_flip        ## -- Begin function radeon_crtc_handle_flip
	.p2align	4, 0x90
_radeon_crtc_handle_flip:               ## @radeon_crtc_handle_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movslq	%esi, %rcx
	movq	(%rax,%rcx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	callq	_spin_lock_irqsave
	movq	(%rbx), %rsi
	movq	_RADEON_FLIP_SUBMITTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_6
## %bb.2:
	movq	16(%rbx), %r14
	movq	_RADEON_FLIP_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	$0, 16(%rbx)
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	leaq	12(%rbx), %rdi
	callq	_drm_crtc_send_vblank_event
LBB0_4:
	movq	(%r15), %rdi
	callq	_spin_unlock_irqrestore
	leaq	12(%rbx), %rdi
	callq	_drm_crtc_vblank_put
	movl	4(%r14), %esi
	movq	%r15, %rdi
	callq	_radeon_irq_kms_pflip_irq_put
	movl	8(%rbx), %edi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_queue_work                     ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movq	(%r15), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_FLIP_SUBMITTED,8,3      ## @RADEON_FLIP_SUBMITTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"radeon_crtc->flip_status = %d != RADEON_FLIP_SUBMITTED(%d)\n"

	.comm	_RADEON_FLIP_NONE,8,3           ## @RADEON_FLIP_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_crtc_handle_flip        ; -- Begin function radeon_crtc_handle_flip
	.p2align	2
_radeon_crtc_handle_flip:               ; @radeon_crtc_handle_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
	ldr	x8, [x0, #8]
	ldr	x21, [x8, w1, sxtw #3]
	cbz	x21, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0]
	bl	_spin_lock_irqsave
	ldr	x1, [x21]
Lloh0:
	adrp	x8, _RADEON_FLIP_SUBMITTED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RADEON_FLIP_SUBMITTED@GOTPAGEOFF]
Lloh2:
	ldr	x2, [x8]
	cmp	x1, x2
	b.ne	LBB0_6
; %bb.2:
	ldr	x20, [x21, #16]
Lloh3:
	adrp	x8, _RADEON_FLIP_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RADEON_FLIP_NONE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x21]
	str	xzr, [x21, #16]
	ldr	x1, [x20, #8]
	cbz	x1, LBB0_4
; %bb.3:
	add	x0, x21, #12
	bl	_drm_crtc_send_vblank_event
LBB0_4:
	ldr	x0, [x19]
	bl	_spin_unlock_irqrestore
	add	x0, x21, #12
	bl	_drm_crtc_vblank_put
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_radeon_irq_kms_pflip_irq_put
	ldr	w0, [x21, #8]
	mov	x1, 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	_queue_work
LBB0_5:
	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_6:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	x0, [x19]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_FLIP_SUBMITTED,8,3      ; @RADEON_FLIP_SUBMITTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"radeon_crtc->flip_status = %d != RADEON_FLIP_SUBMITTED(%d)\n"

	.comm	_RADEON_FLIP_NONE,8,3           ; @RADEON_FLIP_NONE
.subsections_via_symbols
