	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vv6410_init
_vv6410_init:                           ## @vv6410_init
	.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
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movq	_stv_bridge_init@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_12
## %bb.1:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rdi,%rcx,8), %rsi
	movl	8(%rdi,%rcx,8), %edx
	movq	%r14, %rdi
	callq	_stv06xx_write_bridge
	movl	%eax, %ebx
	movq	(%r12), %rdi
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r13
	jge	LBB0_11
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	(%r12), %rdi
	leaq	(,%r13,2), %rcx
	addq	%r13, %rcx
	movq	(%rdi,%rcx,8), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 8(%rdi,%rcx,8)
	jle	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(,%r13,8), %rcx
	leaq	(%rcx,%rcx,2), %r15
	movq	16(%rdi,%r15), %rsi
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_stv06xx_write_bridge
	movq	(%r12), %rdi
	cmpl	$2, 8(%rdi,%r15)
	jl	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %r13
	movq	%r12, %r14
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rdi,%r15), %rax
	movq	16(%rdi,%r15), %rsi
	addq	%r12, %rsi
	movl	(%rax,%r12,4), %edx
	movq	%r13, %rdi
	callq	_stv06xx_write_bridge
	movl	%eax, %ebx
	incq	%r12
	movq	(%r14), %rdi
	movslq	8(%rdi,%r15), %rax
	cmpq	%rax, %r12
	jl	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %r12
	movq	%r13, %r14
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_11:
	testl	%ebx, %ebx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	js	LBB0_15
LBB0_12:
	movq	_vv6410_sensor_init@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_stv06xx_write_sensor_bytes
	testl	%eax, %eax
	js	LBB0_14
## %bb.13:
	movq	_EXPOSURE_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r15,%rax,4), %esi
	movq	%r14, %rdi
	callq	_vv6410_set_exposure
	testl	%eax, %eax
	js	LBB0_14
## %bb.17:
	movq	_GAIN_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r15,%rax,4), %esi
	movq	%r14, %rdi
	callq	_vv6410_set_analog_gain
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
	jmp	LBB0_16
LBB0_14:
	movl	%eax, %ebx
LBB0_15:
	movl	%ebx, %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stv_bridge_init,8,3            ## @stv_bridge_init
	.comm	_vv6410_sensor_init,8,3         ## @vv6410_sensor_init
	.comm	_EXPOSURE_IDX,8,3               ## @EXPOSURE_IDX
	.comm	_GAIN_IDX,8,3                   ## @GAIN_IDX
	.no_dead_strip	_vv6410_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vv6410_init
_vv6410_init:                           ; @vv6410_init
	.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	x19, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x22, _stv_bridge_init@GOTPAGE
Lloh1:
	ldr	x22, [x22, _stv_bridge_init@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x23, #0
	mov	w20, #0
	mov	w24, #24
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	madd	x8, x23, x24, x0
	ldr	x1, [x8, #16]
	ldr	w2, [x8, #8]
	mov	x0, x19
	bl	_stv06xx_write_bridge
	mov	x20, x0
	ldr	x0, [x22]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x0, [x22]
	mul	x8, x23, x24
	ldr	x8, [x0, x8]
	cbz	x8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	madd	x9, x23, x24, x0
	ldr	w9, [x9, #8]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x23, x23, lsl #1
	lsl	x25, x9, #3
	add	x9, x0, x25
	ldr	x1, [x9, #16]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_stv06xx_write_bridge
	mov	x20, x0
	ldr	x0, [x22]
	add	x8, x0, x25
	ldr	w8, [x8, #8]
	cmp	w8, #2
	b.lt	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w25, #1
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x8, x23, x23, lsl #1
	lsl	x26, x8, #3
	add	x8, x0, x26
	ldr	x9, [x8]
	ldr	x8, [x8, #16]
	add	x1, x25, x8
	ldr	w2, [x9, x25, lsl #2]
	mov	x0, x19
	bl	_stv06xx_write_bridge
	mov	x20, x0
	add	x25, x25, #1
	ldr	x0, [x22]
	add	x8, x0, x26
	ldrsw	x8, [x8, #8]
	cmp	x25, x8
	b.lt	LBB0_8
	b	LBB0_3
LBB0_9:
	tbnz	w20, #31, LBB0_14
LBB0_10:
Lloh2:
	adrp	x8, _vv6410_sensor_init@GOTPAGE
Lloh3:
	ldr	x8, [x8, _vv6410_sensor_init@GOTPAGEOFF]
Lloh4:
	ldr	x20, [x8]
	mov	x0, x20
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_stv06xx_write_sensor_bytes
	tbnz	w0, #31, LBB0_13
; %bb.11:
Lloh5:
	adrp	x8, _EXPOSURE_IDX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EXPOSURE_IDX@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	w1, [x21, x8, lsl #2]
	mov	x0, x19
	bl	_vv6410_set_exposure
	tbnz	w0, #31, LBB0_13
; %bb.12:
Lloh8:
	adrp	x8, _GAIN_IDX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GAIN_IDX@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	w1, [x21, x8, lsl #2]
	mov	x0, x19
	bl	_vv6410_set_analog_gain
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	b	LBB0_15
LBB0_13:
	mov	x20, x0
LBB0_14:
	mov	x0, x20
LBB0_15:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_stv_bridge_init,8,3            ; @stv_bridge_init
	.comm	_vv6410_sensor_init,8,3         ; @vv6410_sensor_init
	.comm	_EXPOSURE_IDX,8,3               ; @EXPOSURE_IDX
	.comm	_GAIN_IDX,8,3                   ; @GAIN_IDX
	.no_dead_strip	_vv6410_init
.subsections_via_symbols
