	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm_crtc_get_scanoutpos
_dm_crtc_get_scanoutpos:                ## @dm_crtc_get_scanoutpos
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%esi, %esi
	js	LBB0_2
## %bb.1:
	movl	%esi, %ebx
	cmpl	%esi, (%rdi)
	jle	LBB0_2
## %bb.3:
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	8(%rdi), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %edi
	callq	_to_dm_crtc_state
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.5:
	leaq	-40(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	leaq	-32(%rbp), %rcx
	leaq	-28(%rbp), %r8
	callq	_dc_stream_get_scanoutpos
	movl	-32(%rbp), %eax
	shll	$16, %eax
	orl	-28(%rbp), %eax
	movl	%eax, (%r15)
	movl	-36(%rbp), %eax
	shll	$16, %eax
	orl	-40(%rbp), %eax
	movl	%eax, (%r14)
	jmp	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_DRM_ERROR
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dc_stream_state is NULL for crtc '%d'!\n"

	.no_dead_strip	_dm_crtc_get_scanoutpos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm_crtc_get_scanoutpos
_dm_crtc_get_scanoutpos:                ; @dm_crtc_get_scanoutpos
	.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
	tbnz	w1, #31, LBB0_4
; %bb.1:
	mov	x21, x1
	ldr	w8, [x0]
	cmp	w8, w1
	b.le	LBB0_4
; %bb.2:
	mov	x20, x3
	mov	x19, x2
	ldr	x8, [x0, #8]
	ldr	x8, [x8, w21, uxtw #3]
	ldr	w0, [x8]
	bl	_to_dm_crtc_state
	ldr	x0, [x0]
	cbz	x0, LBB0_6
; %bb.3:
	add	x1, sp, #12
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x4, sp
	bl	_dc_stream_get_scanoutpos
	mov	w0, #0
	ldp	w8, w9, [sp]
	orr	w8, w8, w9, lsl #16
	str	w8, [x20]
	ldp	w9, w8, [sp, #8]
	orr	w8, w8, w9, lsl #16
	str	w8, [x19]
	b	LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
LBB0_6:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DRM_ERROR
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dc_stream_state is NULL for crtc '%d'!\n"

	.no_dead_strip	_dm_crtc_get_scanoutpos
.subsections_via_symbols
