	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_crtc_handle_vblank      ## -- Begin function radeon_crtc_handle_vblank
	.p2align	4, 0x90
_radeon_crtc_handle_vblank:             ## @radeon_crtc_handle_vblank
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movslq	%esi, %r12
	movq	(%rax,%r12,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_radeon_use_pflipirq@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE4
	testq	%rax, %rax
	jne	LBB0_12
LBB0_3:
	movq	(%r15), %rdi
	callq	_spin_lock_irqsave
	movq	(%rbx), %rsi
	movq	_RADEON_FLIP_SUBMITTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_13
## %bb.4:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_radeon_page_flip_pending
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	_DRM_SCANOUTPOS_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_GET_DISTANCE_TO_VBLANKSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r15), %rdi
	movq	8(%r15), %rax
	movq	(%rax,%r12,8), %rax
	addq	$8, %rax
	leaq	-40(%rbp), %rcx
	leaq	-36(%rbp), %r8
	movl	%r14d, %esi
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	$0
	callq	_radeon_get_crtc_scanoutpos
	addq	$16, %rsp
	testl	%ebx, %eax
	je	LBB0_11
## %bb.6:
	cmpl	$0, -40(%rbp)
	movl	-36(%rbp), %eax
	js	LBB0_8
## %bb.7:
	testl	%eax, %eax
	js	LBB0_10
LBB0_8:
	testl	%eax, %eax
	js	LBB0_11
## %bb.9:
	movq	%r15, %rdi
	callq	_ASIC_IS_AVIVO
	testl	%eax, %eax
	je	LBB0_10
LBB0_11:
	movq	(%r15), %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_12
LBB0_13:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movq	(%r15), %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_10:
	movq	(%r15), %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_radeon_crtc_handle_flip
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_radeon_use_pflipirq,4,2        ## @radeon_use_pflipirq
	.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	_DRM_SCANOUTPOS_VALID,4,2       ## @DRM_SCANOUTPOS_VALID
	.comm	_GET_DISTANCE_TO_VBLANKSTART,4,2 ## @GET_DISTANCE_TO_VBLANKSTART
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_crtc_handle_vblank      ; -- Begin function radeon_crtc_handle_vblank
	.p2align	2
_radeon_crtc_handle_vblank:             ; @radeon_crtc_handle_vblank
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0, #8]
	ldr	x21, [x8, w1, sxtw #3]
	cbz	x21, LBB0_13
; %bb.1:
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _radeon_use_pflipirq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _radeon_use_pflipirq@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #2
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_ASIC_IS_DCE4
	cbnz	x0, LBB0_13
LBB0_3:
	ldr	x0, [x19]
	bl	_spin_lock_irqsave
	ldr	x1, [x21]
Lloh3:
	adrp	x8, _RADEON_FLIP_SUBMITTED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RADEON_FLIP_SUBMITTED@GOTPAGEOFF]
Lloh5:
	ldr	x2, [x8]
	cmp	x1, x2
	b.ne	LBB0_11
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_page_flip_pending
	cbz	x0, LBB0_12
; %bb.5:
	sxtw	x8, w20
Lloh6:
	adrp	x9, _DRM_SCANOUTPOS_VALID@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DRM_SCANOUTPOS_VALID@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x9]
Lloh9:
	adrp	x9, _GET_DISTANCE_TO_VBLANKSTART@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GET_DISTANCE_TO_VBLANKSTART@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x9]
	ldp	x0, x9, [x19]
	ldr	x8, [x9, x8, lsl #3]
	add	x7, x8, #8
	add	x3, sp, #12
	add	x4, sp, #8
	mov	x1, x20
	mov	x5, #0
	mov	x6, #0
	bl	_radeon_get_crtc_scanoutpos
	tst	w0, w21
	b.eq	LBB0_10
; %bb.6:
	ldp	w8, w9, [sp, #8]
	tbnz	w9, #31, LBB0_8
; %bb.7:
	tbnz	w8, #31, LBB0_12
LBB0_8:
	tbnz	w8, #31, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_ASIC_IS_AVIVO
	cbz	w0, LBB0_12
LBB0_10:
	ldr	x0, [x19]
	bl	_spin_unlock_irqrestore
	b	LBB0_13
LBB0_11:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	x0, [x19]
	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
	add	sp, sp, #64
	b	_spin_unlock_irqrestore
LBB0_12:
	ldr	x0, [x19]
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_crtc_handle_flip
LBB0_13:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_radeon_use_pflipirq,4,2        ; @radeon_use_pflipirq
	.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	_DRM_SCANOUTPOS_VALID,4,2       ; @DRM_SCANOUTPOS_VALID
	.comm	_GET_DISTANCE_TO_VBLANKSTART,4,2 ; @GET_DISTANCE_TO_VBLANKSTART
.subsections_via_symbols
