	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_dsi_check_conf
_cdns_dsi_check_conf:                   ## @cdns_dsi_check_conf
	.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
	movl	%ecx, %ebx
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movl	(%rax), %r13d
	callq	_cdns_dsi_mode2cfg
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	leaq	16(%r14), %rax
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%rax, %rbx
	imull	$1000, (%r12), %r13d            ## imm = 0x3E8
	movq	8(%r14), %rax
	movl	8(%rax), %edi
	callq	_mipi_dsi_pixel_format_to_bpp
	movl	%r13d, %edi
	movl	%eax, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%rbx, %rcx
	callq	_phy_mipi_dphy_get_default_config
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_cdns_dsi_adjust_phy_config
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movl	(%r14), %edi
	movq	_PHY_MODE_MIPI_DPHY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_phy_validate
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_DSI_HBP_FRAME_OVERHEAD@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	addq	(%r15), %r13
	movq	8(%r14), %rax
	movq	_MIPI_DSI_MODE_VIDEO_SYNC_PULSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	je	LBB0_5
## %bb.4:
	movq	_DSI_HSA_FRAME_OVERHEAD@GOTPCREL(%rip), %rax
	addq	8(%r15), %r13
	addq	(%rax), %r13
LBB0_5:
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	imull	(%rbx), %r14d
	movq	%r12, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_mode_to_dpi_hfp
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ebx, %ebx
	setne	%al
	imull	(%r12,%rax,4), %r13d
	imull	%r14d, %ecx
	imull	$1000, %r13d, %edx              ## imm = 0x3E8
	xorl	%eax, %eax
	cmpl	%edx, %ecx
	jae	LBB0_7
## %bb.6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_MODE_MIPI_DPHY,4,2         ## @PHY_MODE_MIPI_DPHY
	.comm	_DSI_HBP_FRAME_OVERHEAD,8,3     ## @DSI_HBP_FRAME_OVERHEAD
	.comm	_MIPI_DSI_MODE_VIDEO_SYNC_PULSE,4,2 ## @MIPI_DSI_MODE_VIDEO_SYNC_PULSE
	.comm	_DSI_HSA_FRAME_OVERHEAD,8,3     ## @DSI_HSA_FRAME_OVERHEAD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cdns_dsi_check_conf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_dsi_check_conf
_cdns_dsi_check_conf:                   ; @cdns_dsi_check_conf
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x3
	mov	x22, x2
	mov	x19, x1
	mov	x24, x0
	ldr	x8, [x0, #8]
	ldr	w21, [x8]
	bl	_cdns_dsi_mode2cfg
	cbnz	w0, LBB0_8
; %bb.1:
	add	x23, x24, #16
	ldr	w8, [x19]
	mov	w9, #1000
	mul	w25, w8, w9
	ldr	x8, [x24, #8]
	ldr	w0, [x8, #8]
	bl	_mipi_dsi_pixel_format_to_bpp
	mov	x1, x0
	mov	x0, x25
	mov	x2, x21
	mov	x3, x23
	bl	_phy_mipi_dphy_get_default_config
	mov	x0, x24
	mov	x1, x22
	mov	x2, x23
	mov	x3, x19
	mov	x4, x20
	bl	_cdns_dsi_adjust_phy_config
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	w0, [x24]
Lloh0:
	adrp	x8, _PHY_MODE_MIPI_DPHY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_MODE_MIPI_DPHY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	mov	x3, x23
	bl	_phy_validate
	cbnz	w0, LBB0_8
; %bb.3:
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _DSI_HBP_FRAME_OVERHEAD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DSI_HBP_FRAME_OVERHEAD@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x25, x9, x8
	ldr	x8, [x24, #8]
	ldr	w8, [x8, #4]
Lloh6:
	adrp	x9, _MIPI_DSI_MODE_VIDEO_SYNC_PULSE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MIPI_DSI_MODE_VIDEO_SYNC_PULSE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x22, #8]
Lloh9:
	adrp	x9, _DSI_HSA_FRAME_OVERHEAD@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DSI_HSA_FRAME_OVERHEAD@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x8, x8, x25
	add	x25, x8, x9
LBB0_5:
	ldr	w22, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_mode_to_dpi_hfp
	cmp	w20, #0
	cset	w8, ne
	mul	w9, w21, w22
	mul	w9, w9, w0
	ldr	w8, [x19, w8, uxtw #2]
	mul	w8, w25, w8
	mov	w10, #1000
	mul	w8, w8, w10
	cmp	w9, w8
	b.hs	LBB0_7
; %bb.6:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_MODE_MIPI_DPHY,4,2         ; @PHY_MODE_MIPI_DPHY
	.comm	_DSI_HBP_FRAME_OVERHEAD,8,3     ; @DSI_HBP_FRAME_OVERHEAD
	.comm	_MIPI_DSI_MODE_VIDEO_SYNC_PULSE,4,2 ; @MIPI_DSI_MODE_VIDEO_SYNC_PULSE
	.comm	_DSI_HSA_FRAME_OVERHEAD,8,3     ; @DSI_HSA_FRAME_OVERHEAD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cdns_dsi_check_conf
.subsections_via_symbols
