	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpu_encoder_phys_vid_setup_timing_engine
_dpu_encoder_phys_vid_setup_timing_engine: ## @dpu_encoder_phys_vid_setup_timing_engine
	.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
	subq	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$0, -40(%rbp)
	movq	_DRM_FORMAT_RGB888@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	16(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.2:
	movdqu	32(%rbx), %xmm0
	movdqa	%xmm0, -64(%rbp)
	movq	24(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_DPU_DEBUG_VIDENC
	leaq	-64(%rbp), %rdi
	callq	_drm_mode_debug_printmodeline
	movq	(%rbx), %rdx
	movq	_ENC_ROLE_SOLO@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_5
## %bb.4:
	movdqa	-64(%rbp), %xmm0
	psrad	$1, %xmm0
	movdqa	%xmm0, -64(%rbp)
	movd	%xmm0, %ecx
	pextrd	$1, %xmm0, %r8d
	pextrd	$2, %xmm0, %r9d
	pextrd	$3, %xmm0, (%rsp)
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_DPU_DEBUG_VIDENC
LBB0_5:
	leaq	-64(%rbp), %rsi
	leaq	-40(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_drm_mode_to_intf_timing_params
	movl	%r14d, %edi
	callq	_dpu_get_dpu_format
	movq	%rax, %r12
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_DPU_DEBUG_VIDENC
	movq	24(%rbx), %rax
	movl	8(%rax), %eax
	movl	%eax, -76(%rbp)
	movq	_DPU_CTL_MODE_SEL_VID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	$0, -88(%rbp)
	movq	%rbx, %rdi
	callq	_dpu_encoder_helper_get_3d_blend_mode
	movl	%eax, -96(%rbp)
	movl	8(%rbx), %edi
	callq	_spin_lock_irqsave
	movq	24(%rbx), %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	*(%rdi)
	movq	16(%rbx), %rdi
	leaq	-96(%rbp), %rsi
	callq	*(%rdi)
	movl	8(%rbx), %edi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_programmable_fetch_config
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%esi, %esi
	testq	%rbx, %rbx
	setne	%sil
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DPU_ERROR                      ## TAILCALL
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DPU_ERROR                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_FORMAT_RGB888,4,2          ## @DRM_FORMAT_RGB888
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid encoder %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"timing engine setup is not supported\n"

L_.str.2:                               ## @.str.2
	.asciz	"enabling mode:\n"

	.comm	_ENC_ROLE_SOLO,8,3              ## @ENC_ROLE_SOLO
L_.str.3:                               ## @.str.3
	.asciz	"split_role %d, halve horizontal %d %d %d %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"fmt_fourcc 0x%X\n"

	.comm	_DPU_CTL_MODE_SEL_VID,4,2       ## @DPU_CTL_MODE_SEL_VID
	.no_dead_strip	_dpu_encoder_phys_vid_setup_timing_engine
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpu_encoder_phys_vid_setup_timing_engine
_dpu_encoder_phys_vid_setup_timing_engine: ; @dpu_encoder_phys_vid_setup_timing_engine
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x19, x0
	stur	wzr, [x29, #-56]
Lloh0:
	adrp	x8, _DRM_FORMAT_RGB888@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_FORMAT_RGB888@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #48]
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	q0, [x19, #32]
	stur	q0, [x29, #-48]
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.3:
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_DPU_DEBUG_VIDENC
	sub	x0, x29, #48
	bl	_drm_mode_debug_printmodeline
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _ENC_ROLE_SOLO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ENC_ROLE_SOLO@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
	ldp	w9, w10, [x29, #-48]
	asr	w9, w9, #1
	asr	w10, w10, #1
	stp	w9, w10, [x29, #-48]
	ldp	w11, w12, [x29, #-40]
	asr	w11, w11, #1
	asr	w12, w12, #1
	stp	w11, w12, [x29, #-40]
	stp	x11, x12, [sp, #24]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_DPU_DEBUG_VIDENC
LBB0_5:
	sub	x1, x29, #48
	sub	x2, x29, #56
	mov	x0, x19
	bl	_drm_mode_to_intf_timing_params
	mov	x0, x20
	bl	_dpu_get_dpu_format
	mov	x21, x0
	str	x20, [sp]
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_DPU_DEBUG_VIDENC
	ldr	x8, [x19, #24]
	ldr	w8, [x8, #8]
Lloh12:
	adrp	x9, _DPU_CTL_MODE_SEL_VID@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DPU_CTL_MODE_SEL_VID@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #64]
	str	xzr, [sp, #56]
	mov	x0, x19
	bl	_dpu_encoder_helper_get_3d_blend_mode
	str	w0, [sp, #48]
	ldr	w0, [x19, #8]
	bl	_spin_lock_irqsave
	ldr	x0, [x19, #24]
	ldr	x8, [x0]
	sub	x1, x29, #56
	mov	x2, x21
	blr	x8
	ldr	x0, [x19, #16]
	ldr	x8, [x0]
	add	x1, sp, #48
	blr	x8
	ldr	w0, [x19, #8]
	bl	_spin_unlock_irqrestore
	sub	x1, x29, #56
	mov	x0, x19
	bl	_programmable_fetch_config
	b	LBB0_7
LBB0_6:
	cmp	x19, #0
	cset	w8, ne
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPU_ERROR
LBB0_7:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_8:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #160
	b	_DPU_ERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_FORMAT_RGB888,4,2          ; @DRM_FORMAT_RGB888
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid encoder %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"timing engine setup is not supported\n"

l_.str.2:                               ; @.str.2
	.asciz	"enabling mode:\n"

	.comm	_ENC_ROLE_SOLO,8,3              ; @ENC_ROLE_SOLO
l_.str.3:                               ; @.str.3
	.asciz	"split_role %d, halve horizontal %d %d %d %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"fmt_fourcc 0x%X\n"

	.comm	_DPU_CTL_MODE_SEL_VID,4,2       ; @DPU_CTL_MODE_SEL_VID
	.no_dead_strip	_dpu_encoder_phys_vid_setup_timing_engine
.subsections_via_symbols
