	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpu_encoder_kickoff            ## -- Begin function dpu_encoder_kickoff
	.p2align	4, 0x90
_dpu_encoder_kickoff:                   ## @dpu_encoder_kickoff
	.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	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_DPU_ATRACE_BEGIN
	movq	%rbx, %rdi
	callq	_to_dpu_encoder_virt
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_DRMID
	movl	%eax, %edi
	callq	_trace_dpu_enc_kickoff
	movq	_DPU_ENCODER_FRAME_DONE_TIMEOUT_FRAMES@GOTPCREL(%rip), %rax
	imull	$1000, (%rax), %r15d            ## imm = 0x3E8
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	callq	_drm_mode_vrefresh
	movl	%eax, %ecx
	movl	%r15d, %eax
	cltd
	idivl	%ecx
	movslq	%eax, %r15
	leaq	28(%r14), %rdi
	movq	%r15, %rsi
	callq	_atomic_set
	leaq	24(%r14), %r12
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%r15, %rdi
	callq	_msecs_to_jiffies
	addq	%rax, %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_mod_timer
	movq	%r14, %rdi
	callq	__dpu_encoder_kickoff_phys
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	*%rcx
	movl	(%r14), %eax
	jmp	LBB0_5
LBB0_6:
	movq	8(%r14), %rax
	movq	_DRM_MODE_ENCODER_DSI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	leaq	-44(%rbp), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dpu_encoder_vsync_time
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_DRMID
	movl	%eax, %ebx
	movl	-44(%rbp), %edi
	callq	_ktime_to_ms
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_trace_dpu_enc_early_kickoff
	addq	$4, %r14
	movl	-44(%rbp), %edi
	callq	_ktime_to_ns
	movl	%eax, %edi
	callq	_nsecs_to_jiffies
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_mod_timer
LBB0_9:
	leaq	L_.str(%rip), %rdi
	callq	_DPU_ATRACE_END
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"encoder_kickoff"

	.comm	_DPU_ENCODER_FRAME_DONE_TIMEOUT_FRAMES,4,2 ## @DPU_ENCODER_FRAME_DONE_TIMEOUT_FRAMES
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_DRM_MODE_ENCODER_DSI,8,3       ## @DRM_MODE_ENCODER_DSI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpu_encoder_kickoff            ; -- Begin function dpu_encoder_kickoff
	.p2align	2
_dpu_encoder_kickoff:                   ; @dpu_encoder_kickoff
	.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, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPU_ATRACE_BEGIN
	mov	x0, x20
	bl	_to_dpu_encoder_virt
	mov	x19, x0
	mov	x0, x20
	bl	_DRMID
	bl	_trace_dpu_enc_kickoff
Lloh2:
	adrp	x8, _DPU_ENCODER_FRAME_DONE_TIMEOUT_FRAMES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DPU_ENCODER_FRAME_DONE_TIMEOUT_FRAMES@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	mov	w9, #1000
	mul	w21, w8, w9
	ldr	x8, [x20]
	ldr	x0, [x8]
	bl	_drm_mode_vrefresh
	sdiv	w8, w21, w0
	sxtw	x21, w8
	add	x0, x19, #28
	mov	x1, x21
	bl	_atomic_set
	add	x22, x19, #24
Lloh5:
	adrp	x8, _jiffies@GOTPAGE
Lloh6:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh7:
	ldr	x23, [x8]
	mov	x0, x21
	bl	_msecs_to_jiffies
	add	x1, x0, x23
	mov	x0, x22
	bl	_mod_timer
	mov	x0, x19
	bl	__dpu_encoder_kickoff_phys
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x21, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, uxtw
	b.hs	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	ldr	x0, [x9, x21, lsl #3]
	cbz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x0]
	cbz	x9, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	blr	x9
	ldr	w8, [x19]
	b	LBB0_2
LBB0_6:
	ldr	x8, [x19, #8]
Lloh8:
	adrp	x9, _DRM_MODE_ENCODER_DSI@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DRM_MODE_ENCODER_DSI@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	add	x1, sp, #12
	mov	x0, x20
	bl	_dpu_encoder_vsync_time
	cbnz	w0, LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_DRMID
	mov	x20, x0
	ldr	w0, [sp, #12]
	bl	_ktime_to_ms
	mov	x1, x0
	mov	x0, x20
	bl	_trace_dpu_enc_early_kickoff
	add	x19, x19, #4
	ldr	w0, [sp, #12]
	bl	_ktime_to_ns
	bl	_nsecs_to_jiffies
	mov	x1, x0
	mov	x0, x19
	bl	_mod_timer
LBB0_9:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPU_ATRACE_END
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"encoder_kickoff"

	.comm	_DPU_ENCODER_FRAME_DONE_TIMEOUT_FRAMES,4,2 ; @DPU_ENCODER_FRAME_DONE_TIMEOUT_FRAMES
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_DRM_MODE_ENCODER_DSI,8,3       ; @DRM_MODE_ENCODER_DSI
.subsections_via_symbols
