	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpu_encoder_vsync_time         ## -- Begin function dpu_encoder_vsync_time
	.p2align	4, 0x90
_dpu_encoder_vsync_time:                ## @dpu_encoder_vsync_time
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_to_dpu_encoder_virt
	movq	%rax, %r14
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.2:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	__dpu_encoder_calculate_linetime
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	movl	%eax, %r13d
	movq	(%r14), %rdi
	callq	*(%rdi)
	movl	%eax, %ecx
	movl	(%rbx), %esi
	xorl	%ebx, %ebx
	cmpl	%eax, %esi
	movl	$0, %eax
	cmovgl	%ecx, %eax
	movl	%esi, %r12d
	subl	%eax, %r12d
	imull	%r13d, %r12d
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.4:
	xorl	%eax, %eax
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_ktime_get
	movl	%eax, %r13d
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_ktime_add_ns
	movl	%eax, (%r15)
	movl	%r13d, %edi
	callq	_ktime_to_ms
	movl	%eax, %r13d
	movl	(%r15), %edi
	callq	_ktime_to_ms
	movl	%eax, (%rsp)
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%r12d, %r8d
	movl	%r13d, %r9d
	callq	_DPU_DEBUG_ENC
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DPU_ERROR
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DPU_ERROR
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"crtc/crtc state object is NULL\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"time to vsync should not be zero, vtotal=%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"cur_line=%u vtotal=%u time_to_vsync=%u, cur_time=%lld, wakeup_time=%lld\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpu_encoder_vsync_time         ; -- Begin function dpu_encoder_vsync_time
	.p2align	2
_dpu_encoder_vsync_time:                ; @dpu_encoder_vsync_time
	.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	x20, x1
	mov	x21, x0
	bl	_to_dpu_encoder_virt
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x21, [x8]
	cbz	x21, LBB0_5
; %bb.2:
	mov	x19, x0
	mov	x1, x21
	bl	__dpu_encoder_calculate_linetime
	cbz	w0, LBB0_7
; %bb.3:
	mov	x23, x0
	ldr	x0, [x19]
	ldr	x8, [x0]
	blr	x8
	ldr	w21, [x21]
	cmp	w21, w0
	csel	w8, w0, wzr, gt
	sub	w8, w21, w8
	mul	w23, w8, w23
	cbz	w23, LBB0_9
; %bb.4:
	mov	x22, x0
	bl	_ktime_get
	mov	x24, x0
	mov	x1, x23
	bl	_ktime_add_ns
	str	w0, [x20]
	mov	x0, x24
	bl	_ktime_to_ms
	mov	x24, x0
	ldr	w0, [x20]
	bl	_ktime_to_ms
	mov	x6, x0
Lloh0:
	adrp	x1, l_.str.2@PAGE
Lloh1:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	mov	x3, x21
	mov	x4, x23
	mov	x5, x24
	bl	_DPU_DEBUG_ENC
	mov	w0, #0
	b	LBB0_8
LBB0_5:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
LBB0_6:
	bl	_DPU_ERROR
LBB0_7:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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_9:
	str	x21, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"crtc/crtc state object is NULL\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"time to vsync should not be zero, vtotal=%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"cur_line=%u vtotal=%u time_to_vsync=%u, cur_time=%lld, wakeup_time=%lld\n"

.subsections_via_symbols
