	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_dsi_bridge_mode_valid
_cdns_dsi_bridge_mode_valid:            ## @cdns_dsi_bridge_mode_valid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	callq	_bridge_to_cdns_dsi_input
	movq	%rax, %rdi
	callq	_input_to_dsi
	movq	%rax, %r14
	movl	(%rbx), %edx
	movl	4(%rbx), %ecx
	subl	%ecx, %edx
	movq	_MODE_V_ILLEGAL@GOTPCREL(%rip), %rax
	cmpl	$2, %edx
	jl	LBB0_7
## %bb.1:
	subl	8(%rbx), %ecx
	cmpl	$2, %ecx
	jl	LBB0_7
## %bb.2:
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_mipi_dsi_pixel_format_to_bpp
	imull	12(%rbx), %eax
	testb	$31, %al
	je	LBB0_4
## %bb.3:
	movq	_MODE_H_ILLEGAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	leaq	-24(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	_cdns_dsi_check_conf
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_MODE_BAD@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MODE_V_ILLEGAL,4,2             ## @MODE_V_ILLEGAL
	.comm	_MODE_H_ILLEGAL,4,2             ## @MODE_H_ILLEGAL
	.comm	_MODE_BAD,4,2                   ## @MODE_BAD
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.no_dead_strip	_cdns_dsi_bridge_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_dsi_bridge_mode_valid
_cdns_dsi_bridge_mode_valid:            ; @cdns_dsi_bridge_mode_valid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	bl	_bridge_to_cdns_dsi_input
	bl	_input_to_dsi
	ldp	w9, w8, [x19]
	sub	w9, w9, w8
	cmp	w9, #2
	b.lt	LBB0_2
; %bb.1:
	ldr	w9, [x19, #8]
	sub	w8, w8, w9
	cmp	w8, #2
	b.ge	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _MODE_V_ILLEGAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MODE_V_ILLEGAL@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	mov	x20, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_mipi_dsi_pixel_format_to_bpp
	ldr	w8, [x19, #12]
	mul	w8, w8, w0
	tst	w8, #0x1f
	b.eq	LBB0_6
; %bb.5:
Lloh2:
	adrp	x8, _MODE_H_ILLEGAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MODE_H_ILLEGAL@GOTPAGEOFF]
	b	LBB0_3
LBB0_6:
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	mov	w3, #1
	bl	_cdns_dsi_check_conf
Lloh4:
	adrp	x8, _MODE_BAD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MODE_BAD@GOTPAGEOFF]
Lloh6:
	adrp	x9, _MODE_OK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MODE_OK@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x9, x8, eq
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MODE_V_ILLEGAL,4,2             ; @MODE_V_ILLEGAL
	.comm	_MODE_H_ILLEGAL,4,2             ; @MODE_H_ILLEGAL
	.comm	_MODE_BAD,4,2                   ; @MODE_BAD
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.no_dead_strip	_cdns_dsi_bridge_mode_valid
.subsections_via_symbols
