	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_queue_vblank_event
_drm_queue_vblank_event:                ## @drm_queue_vblank_event
	.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	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	8(%rdi), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r13, %rcx
	movl	%r14d, %r13d
	movl	%r14d, (%rax)
	movq	_DRM_EVENT_VBLANK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movl	$16, 16(%rbx)
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %eax
	movl	%eax, 32(%rbx)
	movq	$0, 24(%rbx)
	movq	_DRIVER_MODESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_drm_core_check_feature
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_drm_crtc_from_index
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
LBB0_5:
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movl	(%r15,%r13,4), %edi
	callq	_READ_ONCE
	testl	%eax, %eax
	je	LBB0_6
## %bb.9:
	leaq	16(%rbx), %rcx
	movq	%rbx, %r13
	addq	$4, %r13
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_drm_event_reserve_init_locked
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.10:
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_drm_vblank_count_and_time
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%rax, %rdx
	movl	%r14d, %ecx
	callq	_DRM_DEBUG
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_trace_drm_vblank_event_queued
	movq	%r15, 8(%rbx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_vblank_passed
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_drm_vblank_put
	movl	-44(%rbp), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_send_vblank_event
	jmp	LBB0_13
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_7:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_kfree
LBB0_8:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_drm_vblank_put
LBB0_14:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	4(%r12), %rsi
	movq	%r13, %rdi
	callq	_list_add_tail
LBB0_13:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%r15d, %r15d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DRM_EVENT_VBLANK,4,2           ## @DRM_EVENT_VBLANK
	.comm	_DRIVER_MODESET,4,2             ## @DRIVER_MODESET
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"event on vblank count %llu, current %llu, crtc %u\n"

	.no_dead_strip	_drm_queue_vblank_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_queue_vblank_event
_drm_queue_vblank_event:                ; @drm_queue_vblank_event
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x4
	mov	x21, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x26, [x0, #8]
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_8
; %bb.1:
	mov	x22, x0
	mov	w27, w20
	str	w20, [x0]
Lloh3:
	adrp	x8, _DRM_EVENT_VBLANK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_EVENT_VBLANK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #16
	mov	x25, x0
	str	w9, [x25, #16]!
	str	w8, [x0, #20]
	ldr	w8, [x21]
	str	w8, [x0, #32]
	str	xzr, [x0, #24]
Lloh6:
	adrp	x8, _DRIVER_MODESET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DRIVER_MODESET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_drm_core_check_feature
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_drm_crtc_from_index
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x0]
	str	x8, [x22, #24]
LBB0_4:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w0, [x26, x27, lsl #2]
	bl	_READ_ONCE
	cbz	w0, LBB0_9
; %bb.5:
	add	x26, x22, #4
	mov	x0, x19
	mov	x1, x24
	mov	x2, x26
	mov	x3, x25
	bl	_drm_event_reserve_init_locked
	mov	x25, x0
	cbnz	w0, LBB0_10
; %bb.6:
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_drm_vblank_count_and_time
	mov	x25, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	mov	x2, x25
	mov	x3, x20
	bl	_DRM_DEBUG
	mov	x0, x24
	mov	x1, x20
	mov	x2, x23
	bl	_trace_drm_vblank_event_queued
	str	x23, [x22, #8]
	mov	x0, x25
	mov	x1, x23
	bl	_vblank_passed
	cbz	x0, LBB0_13
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	bl	_drm_vblank_put
	ldr	w3, [sp, #12]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x25
	bl	_send_vblank_event
	mov	x23, x25
	b	LBB0_14
LBB0_8:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_11
LBB0_9:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_10:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x22
	bl	_kfree
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	bl	_drm_vblank_put
LBB0_12:
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	add	x1, x19, #4
	mov	x0, x26
	bl	_list_add_tail
LBB0_14:
	str	x23, [x21]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w25, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DRM_EVENT_VBLANK,4,2           ; @DRM_EVENT_VBLANK
	.comm	_DRIVER_MODESET,4,2             ; @DRIVER_MODESET
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"event on vblank count %llu, current %llu, crtc %u\n"

	.no_dead_strip	_drm_queue_vblank_event
.subsections_via_symbols
