	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mx3_camera_set_bus_param
_mx3_camera_set_bus_param:              ## @mx3_camera_set_bus_param
	.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
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	16(%rdi), %rdi
	callq	_to_soc_camera_host
	movq	(%rax), %rdi
	movl	8(%r14), %esi
	leaq	-56(%rbp), %rdx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_test_platform_param
	movl	%eax, %r15d
	movq	16(%r14), %r12
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_soc_camera_xlate_by_fourcc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movl	8(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	testl	%r15d, %r15d
	js	LBB0_39
## %bb.2:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	movq	%rax, %rbx
	movq	-56(%rbp), %rsi
	movq	%rax, %rdi
	callq	_soc_camera_bus_param_compatible
	movq	%rax, %r13
	movq	-56(%rbp), %rcx
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	movq	%rbx, %rdx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_dev_dbg
	testq	%r13, %r13
	je	LBB0_8
## %bb.3:
	movq	_SOCAM_HSYNC_ACTIVE_HIGH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%r13, %rax
	je	LBB0_9
## %bb.4:
	movq	_SOCAM_HSYNC_ACTIVE_LOW@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testq	%r13, %rcx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_11
## %bb.5:
	movq	_MX3_CAMERA_HSP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rbx)
	je	LBB0_10
## %bb.6:
	notq	%rax
	andq	%rax, %r13
	jmp	LBB0_11
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_39
LBB0_8:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_39
LBB0_9:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_10:
	notq	%rcx
	andq	%rcx, %r13
LBB0_11:
	movq	_SOCAM_VSYNC_ACTIVE_HIGH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%r13, %rax
	je	LBB0_16
## %bb.12:
	movq	_SOCAM_VSYNC_ACTIVE_LOW@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testq	%r13, %rcx
	je	LBB0_16
## %bb.13:
	movq	_MX3_CAMERA_VSP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rbx)
	je	LBB0_15
## %bb.14:
	notq	%rax
	andq	%rax, %r13
	jmp	LBB0_16
LBB0_15:
	notq	%rcx
	andq	%rcx, %r13
LBB0_16:
	movq	_SOCAM_DATA_ACTIVE_HIGH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%r13, %rax
	je	LBB0_21
## %bb.17:
	movq	_SOCAM_DATA_ACTIVE_LOW@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testq	%r13, %rcx
	je	LBB0_21
## %bb.18:
	movq	_MX3_CAMERA_DP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rbx)
	je	LBB0_20
## %bb.19:
	notq	%rax
	andq	%rax, %r13
	jmp	LBB0_21
LBB0_20:
	notq	%rcx
	andq	%rcx, %r13
LBB0_21:
	movq	_SOCAM_PCLK_SAMPLE_RISING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%r13, %rax
	je	LBB0_26
## %bb.22:
	movq	_SOCAM_PCLK_SAMPLE_FALLING@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testq	%r13, %rcx
	je	LBB0_26
## %bb.23:
	movq	_MX3_CAMERA_PCP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rbx)
	je	LBB0_25
## %bb.24:
	notq	%rax
	andq	%rax, %r13
	jmp	LBB0_26
LBB0_25:
	notq	%rcx
	andq	%rcx, %r13
LBB0_26:
	movq	_SOCAM_DATAWIDTH_15@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%r13, %rax
	jne	LBB0_28
## %bb.27:
	movq	_SOCAM_DATAWIDTH_10@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%r13, %rax
	je	LBB0_40
LBB0_28:
	movq	_SOCAM_DATAWIDTH_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	notq	%rcx
	andq	%rcx, %r13
	orq	%rax, %r13
LBB0_29:
	movq	(%r14), %rax
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	*8(%rax)
	testl	%eax, %eax
	js	LBB0_35
## %bb.30:
	movq	_CSI_SENS_CONF@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_csi_reg_read
	movq	_CSI_SENS_CONF_VSYNC_POL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %r8b
	movl	$1, %r11d
	movl	%r8d, %ecx
	shll	%cl, %r11d
	movq	_CSI_SENS_CONF_HSYNC_POL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movl	$1, %r10d
	movl	%edx, %edi
	movq	_CSI_SENS_CONF_DATA_POL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %sil
	movl	$1, %ebx
	movl	%esi, %ecx
	shll	%cl, %ebx
	movq	_CSI_SENS_CONF_PIX_CLK_POL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %r9b
	movl	%r9d, %ecx
	shll	%cl, %r10d
	btsl	%r8d, %edi
	btsl	%esi, %edi
	movq	_CSI_SENS_CONF_DATA_FMT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$3, %esi
	shll	%cl, %esi
	btsl	%r9d, %edi
	movl	$3, %r8d
	movq	_CSI_SENS_CONF_DATA_WIDTH_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	%cl, %r8d
	orl	%r8d, %esi
	orl	%edi, %esi
	notl	%esi
	andl	%eax, %esi
	movq	_CSI_SENS_CONF_DATA_FMT_BAYER@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_SOCAM_PCLK_SAMPLE_FALLING@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	testq	%r13, (%rax)
	cmovel	%r15d, %r10d
	movq	_SOCAM_HSYNC_ACTIVE_LOW@GOTPCREL(%rip), %rax
	testq	%r13, (%rax)
	cmovel	%r15d, %edx
	orl	%r10d, %edx
	movq	_SOCAM_VSYNC_ACTIVE_LOW@GOTPCREL(%rip), %rax
	testq	%r13, (%rax)
	cmovel	%r15d, %r11d
	orl	%edx, %r11d
	movq	_SOCAM_DATA_ACTIVE_LOW@GOTPCREL(%rip), %rax
	testq	%r13, (%rax)
	cmovel	%r15d, %ebx
	orl	%r11d, %ebx
	orl	%esi, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %edx
	movl	$0, %eax
	cmpl	$4, %edx
	je	LBB0_38
## %bb.31:
	cmpl	$10, %edx
	je	LBB0_36
## %bb.32:
	cmpl	$8, %edx
	jne	LBB0_37
## %bb.33:
	movl	$1, %eax
	jmp	LBB0_34
LBB0_35:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	movq	%r13, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_39
LBB0_36:
	movl	$2, %eax
LBB0_34:
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	jmp	LBB0_38
LBB0_37:
	movl	%r8d, %eax
LBB0_38:
	orl	%eax, %ebx
	movl	(%r14), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_csi_reg_write
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_39:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_40:
	movq	_SOCAM_DATAWIDTH_8@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_SOCAM_DATAWIDTH_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	notq	%rax
	andq	%r13, %rax
	testq	%r13, %rcx
	je	LBB0_42
## %bb.41:
	orq	%rcx, %rax
	jmp	LBB0_43
LBB0_42:
	movq	_SOCAM_DATAWIDTH_4@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
LBB0_43:
	movq	%rax, %r13
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Format %x not found\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"requested bus width %d bit: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Flags cam: 0x%lx host: 0x%lx common: 0x%lx\n"

L_.str.3:                               ## @.str.3
	.asciz	"no common flags"

	.comm	_SOCAM_HSYNC_ACTIVE_HIGH,8,3    ## @SOCAM_HSYNC_ACTIVE_HIGH
	.comm	_SOCAM_HSYNC_ACTIVE_LOW,8,3     ## @SOCAM_HSYNC_ACTIVE_LOW
	.comm	_MX3_CAMERA_HSP,4,2             ## @MX3_CAMERA_HSP
	.comm	_SOCAM_VSYNC_ACTIVE_HIGH,8,3    ## @SOCAM_VSYNC_ACTIVE_HIGH
	.comm	_SOCAM_VSYNC_ACTIVE_LOW,8,3     ## @SOCAM_VSYNC_ACTIVE_LOW
	.comm	_MX3_CAMERA_VSP,4,2             ## @MX3_CAMERA_VSP
	.comm	_SOCAM_DATA_ACTIVE_HIGH,8,3     ## @SOCAM_DATA_ACTIVE_HIGH
	.comm	_SOCAM_DATA_ACTIVE_LOW,8,3      ## @SOCAM_DATA_ACTIVE_LOW
	.comm	_MX3_CAMERA_DP,4,2              ## @MX3_CAMERA_DP
	.comm	_SOCAM_PCLK_SAMPLE_RISING,8,3   ## @SOCAM_PCLK_SAMPLE_RISING
	.comm	_SOCAM_PCLK_SAMPLE_FALLING,8,3  ## @SOCAM_PCLK_SAMPLE_FALLING
	.comm	_MX3_CAMERA_PCP,4,2             ## @MX3_CAMERA_PCP
	.comm	_SOCAM_DATAWIDTH_15,8,3         ## @SOCAM_DATAWIDTH_15
	.comm	_SOCAM_DATAWIDTH_MASK,8,3       ## @SOCAM_DATAWIDTH_MASK
	.comm	_SOCAM_DATAWIDTH_10,8,3         ## @SOCAM_DATAWIDTH_10
	.comm	_SOCAM_DATAWIDTH_8,8,3          ## @SOCAM_DATAWIDTH_8
	.comm	_SOCAM_DATAWIDTH_4,8,3          ## @SOCAM_DATAWIDTH_4
L_.str.4:                               ## @.str.4
	.asciz	"camera set_bus_param(%lx) returned %d\n"

	.comm	_CSI_SENS_CONF,4,2              ## @CSI_SENS_CONF
	.comm	_CSI_SENS_CONF_VSYNC_POL_SHIFT,4,2 ## @CSI_SENS_CONF_VSYNC_POL_SHIFT
	.comm	_CSI_SENS_CONF_HSYNC_POL_SHIFT,4,2 ## @CSI_SENS_CONF_HSYNC_POL_SHIFT
	.comm	_CSI_SENS_CONF_DATA_POL_SHIFT,4,2 ## @CSI_SENS_CONF_DATA_POL_SHIFT
	.comm	_CSI_SENS_CONF_PIX_CLK_POL_SHIFT,4,2 ## @CSI_SENS_CONF_PIX_CLK_POL_SHIFT
	.comm	_CSI_SENS_CONF_DATA_FMT_SHIFT,4,2 ## @CSI_SENS_CONF_DATA_FMT_SHIFT
	.comm	_CSI_SENS_CONF_DATA_WIDTH_SHIFT,4,2 ## @CSI_SENS_CONF_DATA_WIDTH_SHIFT
	.comm	_CSI_SENS_CONF_DATA_FMT_BAYER,4,2 ## @CSI_SENS_CONF_DATA_FMT_BAYER
L_.str.5:                               ## @.str.5
	.asciz	"Set SENS_CONF to %x\n"

	.no_dead_strip	_mx3_camera_set_bus_param
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mx3_camera_set_bus_param
_mx3_camera_set_bus_param:              ; @mx3_camera_set_bus_param
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x1
	mov	x22, x0
	ldr	x0, [x0, #16]
	bl	_to_soc_camera_host
	ldr	x20, [x0]
	ldr	w1, [x22, #8]
	add	x2, sp, #24
	mov	x0, x20
	bl	_test_platform_param
	mov	x23, x0
	ldr	x19, [x22, #16]
	mov	x0, x22
	mov	x1, x24
	bl	_soc_camera_xlate_by_fourcc
	cbz	x0, LBB0_23
; %bb.1:
	mov	x21, x0
	ldr	w8, [x22, #8]
	stp	x8, x23, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	tbnz	w23, #31, LBB0_31
; %bb.2:
	ldr	x8, [x22]
	ldr	x8, [x8]
	mov	x0, x22
	blr	x8
	mov	x24, x0
	ldr	x1, [sp, #24]
	bl	_soc_camera_bus_param_compatible
	mov	x23, x0
	ldr	x8, [sp, #24]
	stp	x8, x0, [sp, #8]
	str	x24, [sp]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	cbz	x23, LBB0_24
; %bb.3:
Lloh4:
	adrp	x8, _SOCAM_HSYNC_ACTIVE_HIGH@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SOCAM_HSYNC_ACTIVE_HIGH@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x24, _SOCAM_HSYNC_ACTIVE_LOW@GOTPAGE
Lloh8:
	ldr	x24, [x24, _SOCAM_HSYNC_ACTIVE_LOW@GOTPAGEOFF]
	tst	x8, x23
	b.eq	LBB0_6
; %bb.4:
	ldr	x9, [x24]
	tst	x9, x23
	b.eq	LBB0_6
; %bb.5:
Lloh9:
	adrp	x10, _MX3_CAMERA_HSP@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MX3_CAMERA_HSP@GOTPAGEOFF]
	ldr	w11, [x20]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w11
	bic	x9, x23, x9
	bic	x8, x23, x8
	csel	x23, x9, x8, eq
LBB0_6:
Lloh12:
	adrp	x8, _SOCAM_VSYNC_ACTIVE_HIGH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SOCAM_VSYNC_ACTIVE_HIGH@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x25, _SOCAM_VSYNC_ACTIVE_LOW@GOTPAGE
Lloh16:
	ldr	x25, [x25, _SOCAM_VSYNC_ACTIVE_LOW@GOTPAGEOFF]
	tst	x8, x23
	b.eq	LBB0_9
; %bb.7:
	ldr	x9, [x25]
	tst	x9, x23
	b.eq	LBB0_9
; %bb.8:
Lloh17:
	adrp	x10, _MX3_CAMERA_VSP@GOTPAGE
Lloh18:
	ldr	x10, [x10, _MX3_CAMERA_VSP@GOTPAGEOFF]
	ldr	w11, [x20]
Lloh19:
	ldr	w10, [x10]
	tst	w10, w11
	bic	x9, x23, x9
	bic	x8, x23, x8
	csel	x23, x9, x8, eq
LBB0_9:
Lloh20:
	adrp	x8, _SOCAM_DATA_ACTIVE_HIGH@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SOCAM_DATA_ACTIVE_HIGH@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
Lloh23:
	adrp	x26, _SOCAM_DATA_ACTIVE_LOW@GOTPAGE
Lloh24:
	ldr	x26, [x26, _SOCAM_DATA_ACTIVE_LOW@GOTPAGEOFF]
	tst	x8, x23
	b.eq	LBB0_12
; %bb.10:
	ldr	x9, [x26]
	tst	x9, x23
	b.eq	LBB0_12
; %bb.11:
Lloh25:
	adrp	x10, _MX3_CAMERA_DP@GOTPAGE
Lloh26:
	ldr	x10, [x10, _MX3_CAMERA_DP@GOTPAGEOFF]
	ldr	w11, [x20]
Lloh27:
	ldr	w10, [x10]
	tst	w10, w11
	bic	x9, x23, x9
	bic	x8, x23, x8
	csel	x23, x9, x8, eq
LBB0_12:
Lloh28:
	adrp	x8, _SOCAM_PCLK_SAMPLE_RISING@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SOCAM_PCLK_SAMPLE_RISING@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
Lloh31:
	adrp	x27, _SOCAM_PCLK_SAMPLE_FALLING@GOTPAGE
Lloh32:
	ldr	x27, [x27, _SOCAM_PCLK_SAMPLE_FALLING@GOTPAGEOFF]
	tst	x8, x23
	b.eq	LBB0_15
; %bb.13:
	ldr	x9, [x27]
	tst	x9, x23
	b.eq	LBB0_15
; %bb.14:
Lloh33:
	adrp	x10, _MX3_CAMERA_PCP@GOTPAGE
Lloh34:
	ldr	x10, [x10, _MX3_CAMERA_PCP@GOTPAGEOFF]
	ldr	w11, [x20]
Lloh35:
	ldr	w10, [x10]
	tst	w10, w11
	bic	x9, x23, x9
	bic	x8, x23, x8
	csel	x23, x9, x8, eq
LBB0_15:
Lloh36:
	adrp	x8, _SOCAM_DATAWIDTH_15@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SOCAM_DATAWIDTH_15@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
	tst	x8, x23
	b.ne	LBB0_17
; %bb.16:
Lloh39:
	adrp	x8, _SOCAM_DATAWIDTH_10@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SOCAM_DATAWIDTH_10@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	tst	x8, x23
	b.eq	LBB0_32
LBB0_17:
Lloh42:
	adrp	x9, _SOCAM_DATAWIDTH_MASK@GOTPAGE
Lloh43:
	ldr	x9, [x9, _SOCAM_DATAWIDTH_MASK@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	bic	x9, x23, x9
LBB0_18:
	orr	x23, x9, x8
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	mov	x0, x22
	mov	x1, x23
	blr	x8
	tbnz	w0, #31, LBB0_26
; %bb.19:
Lloh45:
	adrp	x22, _CSI_SENS_CONF@GOTPAGE
Lloh46:
	ldr	x22, [x22, _CSI_SENS_CONF@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_csi_reg_read
Lloh47:
	adrp	x8, _CSI_SENS_CONF_VSYNC_POL_SHIFT@GOTPAGE
Lloh48:
	ldr	x8, [x8, _CSI_SENS_CONF_VSYNC_POL_SHIFT@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w10, w9, w8
Lloh50:
	adrp	x8, _CSI_SENS_CONF_HSYNC_POL_SHIFT@GOTPAGE
Lloh51:
	ldr	x8, [x8, _CSI_SENS_CONF_HSYNC_POL_SHIFT@GOTPAGEOFF]
Lloh52:
	ldr	w8, [x8]
	lsl	w11, w9, w8
	orr	w8, w11, w10
Lloh53:
	adrp	x12, _CSI_SENS_CONF_DATA_POL_SHIFT@GOTPAGE
Lloh54:
	ldr	x12, [x12, _CSI_SENS_CONF_DATA_POL_SHIFT@GOTPAGEOFF]
Lloh55:
	ldr	w12, [x12]
	lsl	w12, w9, w12
	orr	w8, w8, w12
Lloh56:
	adrp	x13, _CSI_SENS_CONF_PIX_CLK_POL_SHIFT@GOTPAGE
Lloh57:
	ldr	x13, [x13, _CSI_SENS_CONF_PIX_CLK_POL_SHIFT@GOTPAGEOFF]
Lloh58:
	ldr	w13, [x13]
	lsl	w13, w9, w13
	orr	w8, w8, w13
Lloh59:
	adrp	x9, _CSI_SENS_CONF_DATA_FMT_SHIFT@GOTPAGE
Lloh60:
	ldr	x9, [x9, _CSI_SENS_CONF_DATA_FMT_SHIFT@GOTPAGEOFF]
Lloh61:
	ldr	w9, [x9]
	mov	w14, #3
	lsl	w9, w14, w9
	orr	w15, w8, w9
Lloh62:
	adrp	x8, _CSI_SENS_CONF_DATA_WIDTH_SHIFT@GOTPAGE
Lloh63:
	ldr	x8, [x8, _CSI_SENS_CONF_DATA_WIDTH_SHIFT@GOTPAGEOFF]
Lloh64:
	ldr	w9, [x8]
	lsl	w8, w14, w9
	orr	w14, w15, w8
	bic	w14, w0, w14
Lloh65:
	adrp	x15, _CSI_SENS_CONF_DATA_FMT_BAYER@GOTPAGE
Lloh66:
	ldr	x15, [x15, _CSI_SENS_CONF_DATA_FMT_BAYER@GOTPAGEOFF]
Lloh67:
	ldr	w15, [x15]
	orr	w14, w14, w15
	ldr	x15, [x27]
	tst	x15, x23
	csel	w13, wzr, w13, eq
	orr	w13, w14, w13
	ldr	x14, [x24]
	tst	x14, x23
	csel	w11, wzr, w11, eq
	orr	w11, w13, w11
	ldr	x13, [x25]
	tst	x13, x23
	csel	w10, wzr, w10, eq
	orr	w10, w11, w10
	ldr	x11, [x26]
	tst	x11, x23
	csel	w11, wzr, w12, eq
	orr	w10, w10, w11
	ldr	x11, [x21]
	ldr	w11, [x11]
	cmp	w11, #4
	b.eq	LBB0_27
; %bb.20:
	cmp	w11, #10
	b.eq	LBB0_28
; %bb.21:
	cmp	w11, #8
	b.ne	LBB0_30
; %bb.22:
	mov	w8, #1
	b	LBB0_29
LBB0_23:
Lloh68:
	adrp	x1, l_.str@PAGE
Lloh69:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x24
	bl	_dev_warn
	b	LBB0_25
LBB0_24:
Lloh70:
	adrp	x1, l_.str.3@PAGE
Lloh71:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_25:
Lloh72:
	adrp	x8, _EINVAL@GOTPAGE
Lloh73:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh74:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_31
LBB0_26:
	mov	x22, x0
	stp	x23, x22, [sp]
Lloh75:
	adrp	x1, l_.str.4@PAGE
Lloh76:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	x23, x22
	b	LBB0_31
LBB0_27:
	mov	w8, #0
	b	LBB0_30
LBB0_28:
	mov	w8, #2
LBB0_29:
	lsl	w8, w8, w9
LBB0_30:
	orr	w21, w10, w8
	ldr	w2, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_csi_reg_write
	str	x21, [sp]
Lloh77:
	adrp	x1, l_.str.5@PAGE
Lloh78:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w23, #0
LBB0_31:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_32:
Lloh79:
	adrp	x8, _SOCAM_DATAWIDTH_8@GOTPAGE
Lloh80:
	ldr	x8, [x8, _SOCAM_DATAWIDTH_8@GOTPAGEOFF]
Lloh81:
	ldr	x8, [x8]
Lloh82:
	adrp	x9, _SOCAM_DATAWIDTH_MASK@GOTPAGE
Lloh83:
	ldr	x9, [x9, _SOCAM_DATAWIDTH_MASK@GOTPAGEOFF]
Lloh84:
	ldr	x9, [x9]
	bic	x9, x23, x9
	tst	x8, x23
	b.ne	LBB0_18
; %bb.33:
Lloh85:
	adrp	x8, _SOCAM_DATAWIDTH_4@GOTPAGE
Lloh86:
	ldr	x8, [x8, _SOCAM_DATAWIDTH_4@GOTPAGEOFF]
Lloh87:
	ldr	x8, [x8]
	b	LBB0_18
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpAdd	Lloh68, Lloh69
	.loh AdrpAdd	Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpAdd	Lloh75, Lloh76
	.loh AdrpAdd	Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Format %x not found\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"requested bus width %d bit: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Flags cam: 0x%lx host: 0x%lx common: 0x%lx\n"

l_.str.3:                               ; @.str.3
	.asciz	"no common flags"

	.comm	_SOCAM_HSYNC_ACTIVE_HIGH,8,3    ; @SOCAM_HSYNC_ACTIVE_HIGH
	.comm	_SOCAM_HSYNC_ACTIVE_LOW,8,3     ; @SOCAM_HSYNC_ACTIVE_LOW
	.comm	_MX3_CAMERA_HSP,4,2             ; @MX3_CAMERA_HSP
	.comm	_SOCAM_VSYNC_ACTIVE_HIGH,8,3    ; @SOCAM_VSYNC_ACTIVE_HIGH
	.comm	_SOCAM_VSYNC_ACTIVE_LOW,8,3     ; @SOCAM_VSYNC_ACTIVE_LOW
	.comm	_MX3_CAMERA_VSP,4,2             ; @MX3_CAMERA_VSP
	.comm	_SOCAM_DATA_ACTIVE_HIGH,8,3     ; @SOCAM_DATA_ACTIVE_HIGH
	.comm	_SOCAM_DATA_ACTIVE_LOW,8,3      ; @SOCAM_DATA_ACTIVE_LOW
	.comm	_MX3_CAMERA_DP,4,2              ; @MX3_CAMERA_DP
	.comm	_SOCAM_PCLK_SAMPLE_RISING,8,3   ; @SOCAM_PCLK_SAMPLE_RISING
	.comm	_SOCAM_PCLK_SAMPLE_FALLING,8,3  ; @SOCAM_PCLK_SAMPLE_FALLING
	.comm	_MX3_CAMERA_PCP,4,2             ; @MX3_CAMERA_PCP
	.comm	_SOCAM_DATAWIDTH_15,8,3         ; @SOCAM_DATAWIDTH_15
	.comm	_SOCAM_DATAWIDTH_MASK,8,3       ; @SOCAM_DATAWIDTH_MASK
	.comm	_SOCAM_DATAWIDTH_10,8,3         ; @SOCAM_DATAWIDTH_10
	.comm	_SOCAM_DATAWIDTH_8,8,3          ; @SOCAM_DATAWIDTH_8
	.comm	_SOCAM_DATAWIDTH_4,8,3          ; @SOCAM_DATAWIDTH_4
l_.str.4:                               ; @.str.4
	.asciz	"camera set_bus_param(%lx) returned %d\n"

	.comm	_CSI_SENS_CONF,4,2              ; @CSI_SENS_CONF
	.comm	_CSI_SENS_CONF_VSYNC_POL_SHIFT,4,2 ; @CSI_SENS_CONF_VSYNC_POL_SHIFT
	.comm	_CSI_SENS_CONF_HSYNC_POL_SHIFT,4,2 ; @CSI_SENS_CONF_HSYNC_POL_SHIFT
	.comm	_CSI_SENS_CONF_DATA_POL_SHIFT,4,2 ; @CSI_SENS_CONF_DATA_POL_SHIFT
	.comm	_CSI_SENS_CONF_PIX_CLK_POL_SHIFT,4,2 ; @CSI_SENS_CONF_PIX_CLK_POL_SHIFT
	.comm	_CSI_SENS_CONF_DATA_FMT_SHIFT,4,2 ; @CSI_SENS_CONF_DATA_FMT_SHIFT
	.comm	_CSI_SENS_CONF_DATA_WIDTH_SHIFT,4,2 ; @CSI_SENS_CONF_DATA_WIDTH_SHIFT
	.comm	_CSI_SENS_CONF_DATA_FMT_BAYER,4,2 ; @CSI_SENS_CONF_DATA_FMT_BAYER
l_.str.5:                               ; @.str.5
	.asciz	"Set SENS_CONF to %x\n"

	.no_dead_strip	_mx3_camera_set_bus_param
.subsections_via_symbols
