	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ov7660_init                    ## -- Begin function ov7660_init
	.p2align	4, 0x90
_ov7660_init:                           ## @ov7660_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_init_ov7660@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movq	_BRIDGE@GOTPCREL(%rip), %r15
	leaq	-64(%rbp), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rax), %rcx
	movq	%rcx, -64(%rbp)
	movq	8(%rax), %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	_m5602_write_sensor
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movq	(%rax), %rcx
	cmpq	(%r15), %rcx
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rax), %rsi
	movq	16(%rax), %rdx
	movq	%r12, %rdi
	callq	_m5602_write_bridge
	jmp	LBB0_5
LBB0_6:
	movq	_dump_sensor@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_ov7660_dump_registers
LBB0_8:
	movq	_GAIN_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx,%rax,4), %esi
	movq	%r12, %rdi
	callq	_ov7660_set_gain
	testl	%eax, %eax
	js	LBB0_14
## %bb.9:
	movq	_AUTO_WHITE_BALANCE_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %esi
	movq	%r12, %rdi
	callq	_ov7660_set_auto_white_balance
	testl	%eax, %eax
	js	LBB0_14
## %bb.10:
	movq	_AUTO_GAIN_CTRL_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %esi
	movq	%r12, %rdi
	callq	_ov7660_set_auto_gain
	testl	%eax, %eax
	js	LBB0_14
## %bb.11:
	movq	_AUTO_EXPOSURE_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %esi
	movq	%r12, %rdi
	callq	_ov7660_set_auto_exposure
	testl	%eax, %eax
	js	LBB0_14
## %bb.12:
	movq	_HFLIP_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %esi
	movq	%r12, %rdi
	callq	_ov7660_set_hflip
	testl	%eax, %eax
	js	LBB0_14
## %bb.13:
	movq	_VFLIP_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %esi
	movq	%r12, %rdi
	callq	_ov7660_set_vflip
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_16
## %bb.15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_init_ov7660,8,3                ## @init_ov7660
	.comm	_BRIDGE,8,3                     ## @BRIDGE
	.comm	_dump_sensor,8,3                ## @dump_sensor
	.comm	_GAIN_IDX,8,3                   ## @GAIN_IDX
	.comm	_AUTO_WHITE_BALANCE_IDX,8,3     ## @AUTO_WHITE_BALANCE_IDX
	.comm	_AUTO_GAIN_CTRL_IDX,8,3         ## @AUTO_GAIN_CTRL_IDX
	.comm	_AUTO_EXPOSURE_IDX,8,3          ## @AUTO_EXPOSURE_IDX
	.comm	_HFLIP_IDX,8,3                  ## @HFLIP_IDX
	.comm	_VFLIP_IDX,8,3                  ## @VFLIP_IDX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ov7660_init                    ; -- Begin function ov7660_init
	.p2align	2
_ov7660_init:                           ; @ov7660_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x20, [x0, #8]
Lloh3:
	adrp	x21, _init_ov7660@GOTPAGE
Lloh4:
	ldr	x21, [x21, _init_ov7660@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x22, #0
Lloh5:
	adrp	x23, _BRIDGE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _BRIDGE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldp	x1, x9, [x8, #8]
	str	x9, [sp, #8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #1
	bl	_m5602_write_sensor
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x8, [x8, x22, lsl #3]
	ldr	x9, [x8]
	ldr	x10, [x23]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	x1, x2, [x8, #8]
	mov	x0, x19
	bl	_m5602_write_bridge
	b	LBB0_3
LBB0_6:
Lloh7:
	adrp	x8, _dump_sensor@GOTPAGE
Lloh8:
	ldr	x8, [x8, _dump_sensor@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_ov7660_dump_registers
LBB0_8:
Lloh10:
	adrp	x8, _GAIN_IDX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GAIN_IDX@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	w1, [x20, x8, lsl #2]
	mov	x0, x19
	bl	_ov7660_set_gain
	tbnz	w0, #31, LBB0_14
; %bb.9:
Lloh13:
	adrp	x8, _AUTO_WHITE_BALANCE_IDX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AUTO_WHITE_BALANCE_IDX@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldr	w1, [x20, x8, lsl #2]
	mov	x0, x19
	bl	_ov7660_set_auto_white_balance
	tbnz	w0, #31, LBB0_14
; %bb.10:
Lloh16:
	adrp	x8, _AUTO_GAIN_CTRL_IDX@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AUTO_GAIN_CTRL_IDX@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	ldr	w1, [x20, x8, lsl #2]
	mov	x0, x19
	bl	_ov7660_set_auto_gain
	tbnz	w0, #31, LBB0_14
; %bb.11:
Lloh19:
	adrp	x8, _AUTO_EXPOSURE_IDX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AUTO_EXPOSURE_IDX@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	ldr	w1, [x20, x8, lsl #2]
	mov	x0, x19
	bl	_ov7660_set_auto_exposure
	tbnz	w0, #31, LBB0_14
; %bb.12:
Lloh22:
	adrp	x8, _HFLIP_IDX@GOTPAGE
Lloh23:
	ldr	x8, [x8, _HFLIP_IDX@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	ldr	w1, [x20, x8, lsl #2]
	mov	x0, x19
	bl	_ov7660_set_hflip
	tbnz	w0, #31, LBB0_14
; %bb.13:
Lloh25:
	adrp	x8, _VFLIP_IDX@GOTPAGE
Lloh26:
	ldr	x8, [x8, _VFLIP_IDX@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	ldr	w1, [x20, x8, lsl #2]
	mov	x0, x19
	bl	_ov7660_set_vflip
LBB0_14:
	ldr	x8, [sp, #24]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_init_ov7660,8,3                ; @init_ov7660
	.comm	_BRIDGE,8,3                     ; @BRIDGE
	.comm	_dump_sensor,8,3                ; @dump_sensor
	.comm	_GAIN_IDX,8,3                   ; @GAIN_IDX
	.comm	_AUTO_WHITE_BALANCE_IDX,8,3     ; @AUTO_WHITE_BALANCE_IDX
	.comm	_AUTO_GAIN_CTRL_IDX,8,3         ; @AUTO_GAIN_CTRL_IDX
	.comm	_AUTO_EXPOSURE_IDX,8,3          ; @AUTO_EXPOSURE_IDX
	.comm	_HFLIP_IDX,8,3                  ; @HFLIP_IDX
	.comm	_VFLIP_IDX,8,3                  ; @VFLIP_IDX
.subsections_via_symbols
