	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mdp4_dtv_encoder_enable
_mdp4_dtv_encoder_enable:               ## @mdp4_dtv_encoder_enable
	.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
	movq	8(%rdi), %r13
	callq	_to_mdp4_dtv_encoder
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_get_kms
	movq	%rax, %r14
	movq	(%r12), %r15
	movl	8(%r12), %edi
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	_BPC8@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_MDP4_DMA_CONFIG_R_BPC
	movl	%eax, %r14d
	movl	(%r13), %edi
	callq	_MDP4_DMA_CONFIG_G_BPC
	orl	%eax, %r14d
	movl	(%r13), %edi
	callq	_MDP4_DMA_CONFIG_B_BPC
	movl	%eax, %r13d
	movl	$33, %edi
	callq	_MDP4_DMA_CONFIG_PACK
	orl	%eax, %r13d
	orl	%r14d, %r13d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r13d, %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	callq	_mdp4_crtc_set_config
	movl	(%rbx), %edi
	movq	_INTF_LCDC_DTV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_mdp4_crtc_set_intf
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_bs_set
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_DBG
	movl	16(%r12), %edi
	movq	%r15, %rsi
	callq	_clk_set_rate
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
LBB0_3:
	movl	16(%r12), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
LBB0_5:
	movl	12(%r12), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_7
## %bb.6:
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
LBB0_7:
	movq	_REG_MDP4_DTV_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_mdp4_write
	movl	$1, 8(%r12)
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BPC8,4,2                       ## @BPC8
	.comm	_INTF_LCDC_DTV,4,2              ## @INTF_LCDC_DTV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setting mdp_clk=%lu"

L_.str.1:                               ## @.str.1
	.asciz	"failed to set mdp_clk to %lu: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to enabled mdp_clk: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to enable hdmi_clk: %d\n"

	.comm	_REG_MDP4_DTV_ENABLE,4,2        ## @REG_MDP4_DTV_ENABLE
	.no_dead_strip	_mdp4_dtv_encoder_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mdp4_dtv_encoder_enable
_mdp4_dtv_encoder_enable:               ; @mdp4_dtv_encoder_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x0
	ldr	x25, [x0, #8]
	bl	_to_mdp4_dtv_encoder
	mov	x19, x0
	mov	x0, x22
	bl	_get_kms
	mov	x20, x0
	ldr	x21, [x19]
	ldr	w0, [x19, #8]
	bl	_WARN_ON
	cbnz	x0, LBB0_8
; %bb.1:
	ldr	w23, [x22]
Lloh0:
	adrp	x26, _BPC8@GOTPAGE
Lloh1:
	ldr	x26, [x26, _BPC8@GOTPAGEOFF]
	ldr	w0, [x26]
	bl	_MDP4_DMA_CONFIG_R_BPC
	mov	x24, x0
	ldr	w0, [x26]
	bl	_MDP4_DMA_CONFIG_G_BPC
	orr	w24, w0, w24
	ldr	w0, [x26]
	bl	_MDP4_DMA_CONFIG_B_BPC
	orr	w24, w24, w0
	mov	w0, #33
	bl	_MDP4_DMA_CONFIG_PACK
	orr	w1, w24, w0
	mov	x0, x23
	bl	_mdp4_crtc_set_config
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _INTF_LCDC_DTV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INTF_LCDC_DTV@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_mdp4_crtc_set_intf
	mov	x0, x19
	mov	w1, #1
	bl	_bs_set
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DBG
	ldr	w0, [x19, #16]
	mov	x1, x21
	bl	_clk_set_rate
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_3
; %bb.2:
	ldr	w8, [x25]
	str	x0, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	mov	x2, x21
	bl	_DRM_DEV_ERROR
LBB0_3:
	ldr	w0, [x19, #16]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_5
; %bb.4:
	mov	x2, x0
	ldr	w0, [x25]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_DRM_DEV_ERROR
LBB0_5:
	ldr	w0, [x19, #12]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_7
; %bb.6:
	mov	x2, x0
	ldr	w0, [x25]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_DRM_DEV_ERROR
LBB0_7:
Lloh13:
	adrp	x8, _REG_MDP4_DTV_ENABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _REG_MDP4_DTV_ENABLE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	w21, #1
	mov	x0, x20
	mov	w2, #1
	bl	_mdp4_write
	str	w21, [x19, #8]
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_BPC8,4,2                       ; @BPC8
	.comm	_INTF_LCDC_DTV,4,2              ; @INTF_LCDC_DTV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setting mdp_clk=%lu"

l_.str.1:                               ; @.str.1
	.asciz	"failed to set mdp_clk to %lu: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to enabled mdp_clk: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to enable hdmi_clk: %d\n"

	.comm	_REG_MDP4_DTV_ENABLE,4,2        ; @REG_MDP4_DTV_ENABLE
	.no_dead_strip	_mdp4_dtv_encoder_enable
.subsections_via_symbols
