	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ltdc_crtc_scanoutpos           ## -- Begin function ltdc_crtc_scanoutpos
	.p2align	4, 0x90
_ltdc_crtc_scanoutpos:                  ## @ltdc_crtc_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	%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	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	testq	%r9, %r9
	je	LBB0_2
## %bb.1:
	movq	%r9, %r12
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, (%r12)
LBB0_2:
	movq	16(%rbp), %r12
	movl	(%rbx), %edi
	callq	_pm_runtime_active
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%r14), %edi
	movq	_LTDC_CPSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_reg_read
	movl	%eax, %r13d
	movq	_CPSR_CYPOS@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movl	(%r14), %edi
	movq	_LTDC_BPCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_reg_read
	movl	%eax, %r12d
	movq	_BPCR_AVBP@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movl	(%r14), %edi
	movq	_LTDC_AWCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_reg_read
	movl	%eax, %ebx
	movq	_AWCR_AAH@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movl	(%r14), %edi
	movq	_LTDC_TWCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_reg_read
	cmpl	%ebx, %r13d
	jle	LBB0_6
## %bb.5:
	movq	_TWCR_TOTALH@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	addl	%eax, %r12d
LBB0_6:
	subl	%r12d, %r13d
	movq	16(%rbp), %r12
	jmp	LBB0_7
LBB0_3:
	xorl	%r13d, %r13d
LBB0_7:
	movl	%r13d, (%r15)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	testq	%r12, %r12
	je	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, (%r12)
LBB0_9:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LTDC_CPSR,4,2                  ## @LTDC_CPSR
	.comm	_CPSR_CYPOS,4,2                 ## @CPSR_CYPOS
	.comm	_LTDC_BPCR,4,2                  ## @LTDC_BPCR
	.comm	_BPCR_AVBP,4,2                  ## @BPCR_AVBP
	.comm	_LTDC_AWCR,4,2                  ## @LTDC_AWCR
	.comm	_AWCR_AAH,4,2                   ## @AWCR_AAH
	.comm	_LTDC_TWCR,4,2                  ## @LTDC_TWCR
	.comm	_TWCR_TOTALH,4,2                ## @TWCR_TOTALH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ltdc_crtc_scanoutpos           ; -- Begin function ltdc_crtc_scanoutpos
	.p2align	2
_ltdc_crtc_scanoutpos:                  ; @ltdc_crtc_scanoutpos
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x6
	mov	x20, x4
	mov	x21, x3
	mov	x23, x0
	ldr	x24, [x0, #8]
	cbz	x5, LBB0_2
; %bb.1:
	mov	x22, x5
	bl	_ktime_get
	str	w0, [x22]
LBB0_2:
	ldr	w0, [x23]
	bl	_pm_runtime_active
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w0, [x24]
Lloh0:
	adrp	x8, _LTDC_CPSR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LTDC_CPSR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_reg_read
Lloh3:
	adrp	x8, _CPSR_CYPOS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CPSR_CYPOS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w22, w8, w0
	ldr	w0, [x24]
Lloh6:
	adrp	x8, _LTDC_BPCR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LTDC_BPCR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_reg_read
Lloh9:
	adrp	x8, _BPCR_AVBP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BPCR_AVBP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w23, w8, w0
	ldr	w0, [x24]
Lloh12:
	adrp	x8, _LTDC_AWCR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LTDC_AWCR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_reg_read
Lloh15:
	adrp	x8, _AWCR_AAH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AWCR_AAH@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	and	w25, w8, w0
	ldr	w0, [x24]
Lloh18:
	adrp	x8, _LTDC_TWCR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LTDC_TWCR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_reg_read
	cmp	w22, w25
	b.le	LBB0_6
; %bb.4:
Lloh21:
	adrp	x8, _TWCR_TOTALH@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TWCR_TOTALH@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	and	w8, w8, w0
	add	w8, w23, w8
	sub	w8, w22, w8
	b	LBB0_7
LBB0_5:
	mov	w8, #0
	b	LBB0_7
LBB0_6:
	sub	w8, w22, w23
LBB0_7:
	str	w8, [x21]
	str	wzr, [x20]
	cbz	x19, LBB0_9
; %bb.8:
	bl	_ktime_get
	str	w0, [x19]
LBB0_9:
	mov	w0, #1
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_LTDC_CPSR,4,2                  ; @LTDC_CPSR
	.comm	_CPSR_CYPOS,4,2                 ; @CPSR_CYPOS
	.comm	_LTDC_BPCR,4,2                  ; @LTDC_BPCR
	.comm	_BPCR_AVBP,4,2                  ; @BPCR_AVBP
	.comm	_LTDC_AWCR,4,2                  ; @LTDC_AWCR
	.comm	_AWCR_AAH,4,2                   ; @AWCR_AAH
	.comm	_LTDC_TWCR,4,2                  ; @LTDC_TWCR
	.comm	_TWCR_TOTALH,4,2                ; @TWCR_TOTALH
.subsections_via_symbols
