	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_dsi_encoder_atomic_check
_tegra_dsi_encoder_atomic_check:        ## @tegra_dsi_encoder_atomic_check
	.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	%rdx, %rbx
	movq	%rsi, %r15
	callq	_encoder_to_output
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_to_dsi_state
	movq	%rax, %r12
	movl	(%rbx), %edi
	callq	_to_tegra_dc
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_to_dsi
	movq	%rax, %r13
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	imull	$1000, (%r15), %eax             ## imm = 0x3E8
	movl	%eax, (%r12)
	movl	8(%r13), %edi
	leaq	4(%r12), %rsi
	leaq	8(%r12), %rdx
	callq	_tegra_dsi_get_muldiv
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	movq	%r13, %rdi
	callq	_tegra_dsi_get_lanes
	movl	%eax, 12(%r12)
	movl	8(%r13), %edi
	leaq	32(%r12), %rsi
	callq	_tegra_dsi_get_format
	testl	%eax, %eax
	js	LBB0_6
## %bb.2:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_mode_vrefresh
	movl	%eax, 28(%r12)
	movl	4(%r12), %esi
	movl	8(%r12), %ebx
	movl	(%r12), %eax
	imull	%esi, %eax
	movl	12(%r12), %ecx
	movl	%ecx, %edi
	imull	%ebx, %edi
	cltd
	idivl	%edi
	movl	%eax, 16(%r12)
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movl	28(%r12), %edx
	movl	32(%r12), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movl	16(%r12), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movl	16(%r12), %edi
	shll	$3, %edi
	movq	_USEC_PER_SEC@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	callq	_DIV_ROUND_UP
	movq	%rax, %r14
	imulq	(%rbx), %r14
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, 20(%r12)
	movq	%r12, %rbx
	addq	$24, %rbx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_mipi_dphy_timing_get_default
	testl	%eax, %eax
	js	LBB0_6
## %bb.3:
	movl	20(%r12), %esi
	movq	%rbx, %rdi
	callq	_mipi_dphy_timing_validate
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	shrq	%r14
	movl	4(%r12), %eax
	movl	12(%r12), %ecx
	shll	$3, %eax
	imull	8(%r12), %ecx
	cltd
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	leal	-2(%rax), %r8d
	movl	(%r13), %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_tegra_dc_state_setup_clock
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_11
## %bb.5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_10
LBB0_6:
	movl	%eax, %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%eax, %r15d
	movl	4(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	movl	%r15d, %edx
	callq	_dev_err
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mul: %u, div: %u, lanes: %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"format: %u, vrefresh: %u\n"

L_.str.2:                               ## @.str.2
	.asciz	"bclk: %lu\n"

	.comm	_USEC_PER_SEC,8,3               ## @USEC_PER_SEC
	.comm	_NSEC_PER_SEC,4,2               ## @NSEC_PER_SEC
L_.str.3:                               ## @.str.3
	.asciz	"failed to validate D-PHY timing: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to setup CRTC state: %d\n"

	.no_dead_strip	_tegra_dsi_encoder_atomic_check
.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_atomic_check
_tegra_dsi_encoder_atomic_check:        ; @tegra_dsi_encoder_atomic_check
	.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, x2
	mov	x20, x1
	bl	_encoder_to_output
	mov	x19, x0
	mov	x0, x22
	bl	_to_dsi_state
	mov	x21, x0
	ldr	w0, [x22]
	bl	_to_tegra_dc
	mov	x22, x0
	mov	x0, x19
	bl	_to_dsi
	mov	x23, x0
	ldr	w8, [x20]
	mov	w9, #1000
	mul	w8, w8, w9
	mov	x2, x21
	str	w8, [x2], #8
	ldr	w0, [x0, #8]
	add	x1, x21, #4
	bl	_tegra_dsi_get_muldiv
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x0, x23
	bl	_tegra_dsi_get_lanes
	str	w0, [x21, #12]
	ldr	w0, [x23, #8]
	add	x1, x21, #32
	bl	_tegra_dsi_get_format
	tbnz	w0, #31, LBB0_6
; %bb.2:
	mov	x0, x20
	bl	_drm_mode_vrefresh
	str	w0, [x21, #28]
	ldp	w8, w1, [x21]
	mul	w8, w1, w8
	ldp	w9, w10, [x21, #8]
	mul	w11, w10, w9
	sdiv	w8, w8, w11
	str	w8, [x21, #16]
	stp	x9, x10, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldp	w8, w1, [x21, #28]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w1, [x21, #16]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x21, #16]
	lsl	w0, w8, #3
Lloh6:
	adrp	x24, _USEC_PER_SEC@GOTPAGE
Lloh7:
	ldr	x24, [x24, _USEC_PER_SEC@GOTPAGEOFF]
	ldr	x1, [x24]
	bl	_DIV_ROUND_UP
	ldr	x8, [x24]
	mul	x25, x8, x0
Lloh8:
	adrp	x8, _NSEC_PER_SEC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NSEC_PER_SEC@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x25
	bl	_DIV_ROUND_CLOSEST
	mov	x1, x0
	str	w0, [x21, #20]
	add	x26, x21, #24
	mov	x0, x26
	bl	_mipi_dphy_timing_get_default
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	w1, [x21, #20]
	mov	x0, x26
	bl	_mipi_dphy_timing_validate
	tbnz	w0, #31, LBB0_8
; %bb.4:
	lsr	x3, x25, #1
	ldp	w8, w9, [x21, #4]
	lsl	w8, w8, #3
	ldr	w10, [x21, #12]
	mul	w9, w10, w9
	sdiv	w8, w8, w9
	sub	w4, w8, #2
	ldr	w2, [x23]
	mov	x0, x22
	mov	x1, x20
	bl	_tegra_dc_state_setup_clock
	mov	x24, x0
	tbz	w0, #31, LBB0_7
; %bb.5:
	ldr	w0, [x19]
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_9
LBB0_6:
	mov	x24, x0
LBB0_7:
	mov	x0, x24
	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
LBB0_8:
	mov	x24, x0
	ldr	w0, [x23, #4]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_9:
	mov	x2, x24
	bl	_dev_err
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mul: %u, div: %u, lanes: %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"format: %u, vrefresh: %u\n"

l_.str.2:                               ; @.str.2
	.asciz	"bclk: %lu\n"

	.comm	_USEC_PER_SEC,8,3               ; @USEC_PER_SEC
	.comm	_NSEC_PER_SEC,4,2               ; @NSEC_PER_SEC
l_.str.3:                               ; @.str.3
	.asciz	"failed to validate D-PHY timing: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to setup CRTC state: %d\n"

	.no_dead_strip	_tegra_dsi_encoder_atomic_check
.subsections_via_symbols
