	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_sor_encoder_atomic_check
_tegra_sor_encoder_atomic_check:        ## @tegra_sor_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
	pushq	%rax
	.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, %r12
	callq	_encoder_to_output
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_to_sor_state
	movq	%rax, %r15
	movl	(%rbx), %edi
	callq	_to_tegra_dc
	movq	%rax, %r13
	movslq	(%r12), %rax
	imulq	$1000, %rax, %rbx               ## imm = 0x3E8
	movq	%r14, %rdi
	callq	_to_sor
	cmpl	$340000000, %ebx                ## imm = 0x1443FD00
	movl	$20, %ecx
	movl	$10, %edx
	cmovael	%ecx, %edx
	setae	%cl
	movq	%rbx, %rsi
	shrq	%cl, %rsi
	movl	%edx, (%r15)
	movq	%rsi, 8(%r15)
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	callq	_tegra_dc_state_setup_clock
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	4(%r14), %esi
	cmpl	$8, %esi
	je	LBB0_4
## %bb.3:
	cmpl	$6, %esi
	jne	LBB0_5
LBB0_4:
	movl	%esi, 16(%r15)
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	$8, 16(%r15)
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %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	"failed to setup CRTC state: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"%u bits-per-color not supported\n"

	.no_dead_strip	_tegra_sor_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_sor_encoder_atomic_check
_tegra_sor_encoder_atomic_check:        ; @tegra_sor_encoder_atomic_check
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x2
	mov	x22, x1
	bl	_encoder_to_output
	mov	x20, x0
	mov	x0, x21
	bl	_to_sor_state
	mov	x19, x0
	ldr	w0, [x21]
	bl	_to_tegra_dc
	mov	x21, x0
	ldrsw	x8, [x22]
	mov	w9, #1000
	mul	x23, x8, x9
	mov	x0, x20
	bl	_to_sor
	mov	w8, #64767
	movk	w8, #5187, lsl #16
	mov	w9, #10
	mov	w10, #20
	cmp	w23, w8
	csel	w8, w10, w9, hi
	cset	w9, hi
	lsr	x9, x23, x9
	str	w8, [x19]
	str	x9, [x19, #8]
	ldr	w2, [x0]
	mov	x0, x21
	mov	x1, x22
	mov	x3, x23
	mov	w4, #0
	bl	_tegra_dc_state_setup_clock
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w1, [x20, #4]
	cmp	w1, #8
	ccmp	w1, #6, #4, ne
	b.ne	LBB0_4
; %bb.2:
	mov	w21, #0
	str	w1, [x19, #16]
	b	LBB0_5
LBB0_3:
	mov	x21, x0
	ldr	w0, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	w21, #0
	mov	w8, #8
	str	w8, [x19, #16]
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to setup CRTC state: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"%u bits-per-color not supported\n"

	.no_dead_strip	_tegra_sor_encoder_atomic_check
.subsections_via_symbols
