	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_dsi_encoder_disable
_tegra_dsi_encoder_disable:             ## @tegra_dsi_encoder_disable
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_encoder_to_output
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_to_tegra_dc
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_to_dsi
	movq	%rax, %rbx
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_drm_panel_disable
LBB0_2:
	movq	%rbx, %rdi
	callq	_tegra_dsi_video_disable
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	movq	_DC_DISP_DISP_WIN_OPTIONS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_tegra_dc_readl
	movq	_DSI_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%r12), %edx
	movq	%r15, %rdi
	callq	_tegra_dc_writel
	movq	%r15, %rdi
	callq	_tegra_dc_commit
LBB0_4:
	movq	%rbx, %rdi
	movl	$100, %esi
	callq	_tegra_dsi_wait_idle
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_dbg
LBB0_6:
	movq	%rbx, %rdi
	callq	_tegra_dsi_soft_reset
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_drm_panel_unprepare
LBB0_8:
	movq	%rbx, %rdi
	callq	_tegra_dsi_disable
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tegra_dsi_unprepare            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DC_DISP_DISP_WIN_OPTIONS,4,2   ## @DC_DISP_DISP_WIN_OPTIONS
	.comm	_DSI_ENABLE,4,2                 ## @DSI_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to idle DSI: %d\n"

	.no_dead_strip	_tegra_dsi_encoder_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_dsi_encoder_disable
_tegra_dsi_encoder_disable:             ; @tegra_dsi_encoder_disable
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_encoder_to_output
	mov	x20, x0
	ldr	w0, [x19]
	bl	_to_tegra_dc
	mov	x21, x0
	mov	x0, x20
	bl	_to_dsi
	mov	x19, x0
	ldr	x0, [x20]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_drm_panel_disable
LBB0_2:
	mov	x0, x19
	bl	_tegra_dsi_video_disable
	cbz	x21, LBB0_4
; %bb.3:
Lloh0:
	adrp	x22, _DC_DISP_DISP_WIN_OPTIONS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DC_DISP_DISP_WIN_OPTIONS@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_tegra_dc_readl
Lloh2:
	adrp	x8, _DSI_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DSI_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w2, [x22]
	mov	x0, x21
	bl	_tegra_dc_writel
	mov	x0, x21
	bl	_tegra_dc_commit
LBB0_4:
	mov	x0, x19
	mov	w1, #100
	bl	_tegra_dsi_wait_idle
	tbz	w0, #31, LBB0_6
; %bb.5:
	mov	x2, x0
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
LBB0_6:
	mov	x0, x19
	bl	_tegra_dsi_soft_reset
	ldr	x0, [x20]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_drm_panel_unprepare
LBB0_8:
	mov	x0, x19
	bl	_tegra_dsi_disable
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_tegra_dsi_unprepare
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DC_DISP_DISP_WIN_OPTIONS,4,2   ; @DC_DISP_DISP_WIN_OPTIONS
	.comm	_DSI_ENABLE,4,2                 ; @DSI_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to idle DSI: %d\n"

	.no_dead_strip	_tegra_dsi_encoder_disable
.subsections_via_symbols
