	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpu_hw_pp_get_line_count
_dpu_hw_pp_get_line_count:              ## @dpu_hw_pp_get_line_count
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_PP_VSYNC_INIT_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DPU_REG_READ
	movzwl	%ax, %r14d
	movq	_PP_SYNC_CONFIG_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_DPU_REG_READ
	movzwl	%ax, %ecx
	movl	$65535, %eax                    ## imm = 0xFFFF
	cmpl	%r14d, %ecx
	jb	LBB0_4
## %bb.3:
	movq	_PP_INT_COUNT_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_DPU_REG_READ
	movzwl	%ax, %ecx
	movl	%r14d, %edx
	xorl	$65535, %edx                    ## imm = 0xFFFF
	movl	%r14d, %eax
	negl	%eax
	cmpl	%r14d, %ecx
	cmovbl	%edx, %eax
	addl	%ecx, %eax
	jmp	LBB0_4
LBB0_1:
	xorl	%eax, %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PP_VSYNC_INIT_VAL,4,2          ## @PP_VSYNC_INIT_VAL
	.comm	_PP_SYNC_CONFIG_HEIGHT,4,2      ## @PP_SYNC_CONFIG_HEIGHT
	.comm	_PP_INT_COUNT_VAL,4,2           ## @PP_INT_COUNT_VAL
	.no_dead_strip	_dpu_hw_pp_get_line_count
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpu_hw_pp_get_line_count
_dpu_hw_pp_get_line_count:              ; @dpu_hw_pp_get_line_count
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _PP_VSYNC_INIT_VAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PP_VSYNC_INIT_VAL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_DPU_REG_READ
	and	w20, w0, #0xffff
Lloh3:
	adrp	x8, _PP_SYNC_CONFIG_HEIGHT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PP_SYNC_CONFIG_HEIGHT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_DPU_REG_READ
	cmp	w20, w0, uxth
	b.ls	LBB0_3
; %bb.2:
	mov	w0, #65535
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _PP_INT_COUNT_VAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PP_INT_COUNT_VAL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_DPU_REG_READ
	and	w8, w0, #0xffff
	eor	w9, w20, #0xffff
	cmp	w8, w20
	csneg	w9, w9, w20, lo
	add	w0, w9, w8
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PP_VSYNC_INIT_VAL,4,2          ; @PP_VSYNC_INIT_VAL
	.comm	_PP_SYNC_CONFIG_HEIGHT,4,2      ; @PP_SYNC_CONFIG_HEIGHT
	.comm	_PP_INT_COUNT_VAL,4,2           ; @PP_INT_COUNT_VAL
	.no_dead_strip	_dpu_hw_pp_get_line_count
.subsections_via_symbols
