	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dce_v8_0_crtc_get_scanoutpos
_dce_v8_0_crtc_get_scanoutpos:          ## @dce_v8_0_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%esi, %esi
	js	LBB0_2
## %bb.1:
	cmpl	%esi, (%rdi)
	jle	LBB0_2
## %bb.3:
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	_mmCRTC_V_BLANK_START_END@GOTPCREL(%rip), %rax
	movq	_crtc_offsets@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movl	%esi, %r12d
	movq	(%rcx,%r12,8), %rdi
	addq	(%rax), %rdi
	callq	_RREG32
	movl	%eax, (%rbx)
	movq	_mmCRTC_STATUS_POSITION@GOTPCREL(%rip), %rax
	movq	(%r15), %rcx
	movq	(%rcx,%r12,8), %rdi
	addq	(%rax), %rdi
	callq	_RREG32
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_mmCRTC_V_BLANK_START_END,8,3   ## @mmCRTC_V_BLANK_START_END
	.comm	_crtc_offsets,8,3               ## @crtc_offsets
	.comm	_mmCRTC_STATUS_POSITION,8,3     ## @mmCRTC_STATUS_POSITION
	.no_dead_strip	_dce_v8_0_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 dce_v8_0_crtc_get_scanoutpos
_dce_v8_0_crtc_get_scanoutpos:          ; @dce_v8_0_crtc_get_scanoutpos
	.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
	tbnz	w1, #31, LBB0_3
; %bb.1:
	ldr	w8, [x0]
	cmp	w8, w1
	b.le	LBB0_3
; %bb.2:
	mov	x19, x3
	mov	x20, x2
Lloh0:
	adrp	x8, _mmCRTC_V_BLANK_START_END@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mmCRTC_V_BLANK_START_END@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x21, _crtc_offsets@GOTPAGE
Lloh4:
	ldr	x21, [x21, _crtc_offsets@GOTPAGEOFF]
	ldr	x9, [x21]
	mov	w10, w1
	lsl	x22, x10, #3
	ldr	x9, [x9, x22]
	add	x0, x9, x8
	bl	_RREG32
Lloh5:
	adrp	x8, _mmCRTC_STATUS_POSITION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mmCRTC_STATUS_POSITION@GOTPAGEOFF]
	str	w0, [x20]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x21]
	ldr	x9, [x9, x22]
	add	x0, x9, x8
	bl	_RREG32
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mmCRTC_V_BLANK_START_END,8,3   ; @mmCRTC_V_BLANK_START_END
	.comm	_crtc_offsets,8,3               ; @crtc_offsets
	.comm	_mmCRTC_STATUS_POSITION,8,3     ; @mmCRTC_STATUS_POSITION
	.no_dead_strip	_dce_v8_0_crtc_get_scanoutpos
.subsections_via_symbols
