	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fill_csi_bus_cfg
_fill_csi_bus_cfg:                      ## @fill_csi_bus_cfg
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	4(%r12), %esi
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_mbus_code_to_bus_cfg
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	(%rbx), %eax
	cmpl	$130, %eax
	je	LBB0_7
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_4
## %bb.5:
	cmpl	$128, %eax
	jne	LBB0_12
## %bb.6:
	movl	$1, (%r15)
	movl	4(%rbx), %eax
	movq	_V4L2_MBUS_VSYNC_ACTIVE_LOW@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%dl
	movl	%edx, 4(%r15)
	movq	_V4L2_MBUS_HSYNC_ACTIVE_LOW@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%dl
	movl	%edx, 8(%r15)
	movq	_V4L2_MBUS_PCLK_SAMPLE_FALLING@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, 12(%r15)
	movq	_IPU_CSI_CLK_MODE_GATED_CLK@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_1:
	movl	%eax, %r14d
	jmp	LBB0_12
LBB0_7:
	movl	$0, (%r15)
	movl	(%r12), %edi
	callq	_V4L2_FIELD_HAS_BOTH
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movl	(%r12), %eax
	movq	_V4L2_FIELD_ALTERNATE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
LBB0_10:
	movq	_IPU_CSI_CLK_MODE_CCIR656_INTERLACED@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_4:
	movq	_IPU_CSI_CLK_MODE_NONGATED_CLK@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
LBB0_12:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MBUS_VSYNC_ACTIVE_LOW,4,2 ## @V4L2_MBUS_VSYNC_ACTIVE_LOW
	.comm	_V4L2_MBUS_HSYNC_ACTIVE_LOW,4,2 ## @V4L2_MBUS_HSYNC_ACTIVE_LOW
	.comm	_V4L2_MBUS_PCLK_SAMPLE_FALLING,4,2 ## @V4L2_MBUS_PCLK_SAMPLE_FALLING
	.comm	_IPU_CSI_CLK_MODE_GATED_CLK,4,2 ## @IPU_CSI_CLK_MODE_GATED_CLK
	.comm	_V4L2_FIELD_ALTERNATE,4,2       ## @V4L2_FIELD_ALTERNATE
	.comm	_IPU_CSI_CLK_MODE_CCIR656_INTERLACED,4,2 ## @IPU_CSI_CLK_MODE_CCIR656_INTERLACED
	.comm	_IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE,4,2 ## @IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE
	.comm	_IPU_CSI_CLK_MODE_NONGATED_CLK,4,2 ## @IPU_CSI_CLK_MODE_NONGATED_CLK
	.no_dead_strip	_fill_csi_bus_cfg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_csi_bus_cfg
_fill_csi_bus_cfg:                      ; @fill_csi_bus_cfg
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	ldr	w1, [x20, #4]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_mbus_code_to_bus_cfg
	tbnz	w0, #31, LBB0_10
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, #130
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #128
	b.ne	LBB0_9
; %bb.4:
	mov	w8, #1
	str	w8, [x19]
	ldr	w8, [x21, #4]
Lloh0:
	adrp	x9, _V4L2_MBUS_VSYNC_ACTIVE_LOW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_MBUS_VSYNC_ACTIVE_LOW@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w9, ne
Lloh3:
	adrp	x10, _V4L2_MBUS_HSYNC_ACTIVE_LOW@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_MBUS_HSYNC_ACTIVE_LOW@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w8
	cset	w10, ne
	stp	w9, w10, [x19, #4]
Lloh6:
	adrp	x9, _V4L2_MBUS_PCLK_SAMPLE_FALLING@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_MBUS_PCLK_SAMPLE_FALLING@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	str	w8, [x19, #12]
Lloh9:
	adrp	x8, _IPU_CSI_CLK_MODE_GATED_CLK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IPU_CSI_CLK_MODE_GATED_CLK@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	str	wzr, [x19]
	ldr	w0, [x20]
	bl	_V4L2_FIELD_HAS_BOTH
Lloh11:
	adrp	x8, _IPU_CSI_CLK_MODE_CCIR656_INTERLACED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IPU_CSI_CLK_MODE_CCIR656_INTERLACED@GOTPAGEOFF]
	cbnz	w0, LBB0_8
; %bb.6:
Lloh13:
	adrp	x9, _V4L2_FIELD_ALTERNATE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _V4L2_FIELD_ALTERNATE@GOTPAGEOFF]
	ldr	w10, [x20]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x11, _IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE@GOTPAGE
Lloh17:
	ldr	x11, [x11, _IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE@GOTPAGEOFF]
	cmp	w10, w9
	csel	x8, x8, x11, eq
	b	LBB0_8
LBB0_7:
Lloh18:
	adrp	x8, _IPU_CSI_CLK_MODE_NONGATED_CLK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IPU_CSI_CLK_MODE_NONGATED_CLK@GOTPAGEOFF]
LBB0_8:
	mov	w0, #0
	ldr	w8, [x8]
	str	w8, [x19, #16]
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MBUS_VSYNC_ACTIVE_LOW,4,2 ; @V4L2_MBUS_VSYNC_ACTIVE_LOW
	.comm	_V4L2_MBUS_HSYNC_ACTIVE_LOW,4,2 ; @V4L2_MBUS_HSYNC_ACTIVE_LOW
	.comm	_V4L2_MBUS_PCLK_SAMPLE_FALLING,4,2 ; @V4L2_MBUS_PCLK_SAMPLE_FALLING
	.comm	_IPU_CSI_CLK_MODE_GATED_CLK,4,2 ; @IPU_CSI_CLK_MODE_GATED_CLK
	.comm	_V4L2_FIELD_ALTERNATE,4,2       ; @V4L2_FIELD_ALTERNATE
	.comm	_IPU_CSI_CLK_MODE_CCIR656_INTERLACED,4,2 ; @IPU_CSI_CLK_MODE_CCIR656_INTERLACED
	.comm	_IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE,4,2 ; @IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE
	.comm	_IPU_CSI_CLK_MODE_NONGATED_CLK,4,2 ; @IPU_CSI_CLK_MODE_NONGATED_CLK
	.no_dead_strip	_fill_csi_bus_cfg
.subsections_via_symbols
