	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_crtc_get_sequence_ioctl    ## -- Begin function drm_crtc_get_sequence_ioctl
	.p2align	4, 0x90
_drm_crtc_get_sequence_ioctl:           ## @drm_crtc_get_sequence_ioctl
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_DRIVER_MODESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_drm_core_check_feature
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	cmpl	$0, 16(%r12)
	je	LBB0_4
## %bb.5:
	movl	12(%r14), %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_drm_crtc_find
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_drm_crtc_index
	movl	%eax, %r13d
	cmpq	$0, (%r12)
	je	LBB0_9
## %bb.8:
	movq	8(%r12), %rax
	movslq	%r13d, %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_READ_ONCE
	movb	$1, %cl
	testq	%rax, %rax
	jne	LBB0_11
LBB0_9:
	movq	%r15, %rdi
	callq	_drm_crtc_vblank_get
	testl	%eax, %eax
	je	LBB0_10
## %bb.14:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_DRM_DEBUG
	jmp	LBB0_13
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%ecx, %ecx
LBB0_11:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_drm_modeset_lock
	movq	8(%r15), %rax
	movq	%r15, %rcx
	addq	$4, %rcx
	testq	%rax, %rax
	cmovneq	%rax, %rcx
	movl	(%rcx), %eax
	movl	%eax, 8(%r14)
	movq	%r15, %rdi
	callq	_drm_modeset_unlock
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_drm_vblank_count_and_time
	movl	%eax, 4(%r14)
	movl	-48(%rbp), %edi
	callq	_ktime_to_ns
	movl	%eax, (%r14)
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_drm_crtc_vblank_put
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_MODESET,4,2             ## @DRIVER_MODESET
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOENT,4,2                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"crtc %d failed to acquire vblank counter, %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_crtc_get_sequence_ioctl    ; -- Begin function drm_crtc_get_sequence_ioctl
	.p2align	2
_drm_crtc_get_sequence_ioctl:           ; @drm_crtc_get_sequence_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _DRIVER_MODESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRIVER_MODESET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_drm_core_check_feature
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_7
; %bb.2:
	ldr	w2, [x19, #12]
	mov	x0, x20
	mov	x1, x21
	bl	_drm_crtc_find
	cbz	x0, LBB0_8
; %bb.3:
	mov	x21, x0
	bl	_drm_crtc_index
	mov	x22, x0
	ldr	x8, [x20]
	cbz	x8, LBB0_11
; %bb.4:
	ldr	x8, [x20, #8]
	ldr	w0, [x8, w22, sxtw #2]
	bl	_READ_ONCE
	cbz	x0, LBB0_11
; %bb.5:
	mov	w23, #1
	b	LBB0_13
LBB0_6:
Lloh3:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x8, _ENOENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
	mov	x0, x21
	bl	_drm_crtc_vblank_get
	mov	x23, x0
	cbz	w0, LBB0_13
; %bb.12:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x23
	bl	_DRM_DEBUG
	b	LBB0_10
LBB0_13:
	mov	x0, x21
	mov	x1, #0
	bl	_drm_modeset_lock
	ldr	x8, [x21, #8]
	add	x9, x21, #4
	cmp	x8, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	x0, x21
	bl	_drm_modeset_unlock
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x22
	bl	_drm_vblank_count_and_time
	str	w0, [x19, #4]
	ldr	w0, [sp, #12]
	bl	_ktime_to_ns
	str	w0, [x19]
	tbnz	w23, #0, LBB0_15
; %bb.14:
	mov	x0, x21
	bl	_drm_crtc_vblank_put
LBB0_15:
	mov	w23, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_MODESET,4,2             ; @DRIVER_MODESET
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOENT,4,2                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"crtc %d failed to acquire vblank counter, %d\n"

.subsections_via_symbols
