	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7670_apply_fmt
_ov7670_apply_fmt:                      ## @ov7670_apply_fmt
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_to_state
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	24(%rbx), %r15
	movq	(%rax), %rax
	movb	(%r15), %cl
	orb	(%rax), %cl
	movq	_REG_COM7@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%cl, %edx
	movq	%r14, %rdi
	callq	_ov7670_write
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movl	(%rbx), %eax
	movq	_V4L2_MBUS_VSYNC_ACTIVE_LOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_COM10_VS_NEG@GOTPCREL(%rip), %rdx
	movzbl	(%rdx), %edx
	cmovel	%ecx, %edx
	movq	_V4L2_MBUS_HSYNC_ACTIVE_LOW@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_COM10_HREF_REV@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	cmovel	%eax, %ecx
	orl	%edx, %ecx
	xorl	%eax, %eax
	cmpq	$0, 16(%rbx)
	movq	_COM10_PCLK_HB@GOTPCREL(%rip), %rdx
	movzbl	(%rdx), %edx
	cmovel	%eax, %edx
	orl	%ecx, %edx
	movq	_REG_COM10@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%dl, %edx
	movq	%r14, %rdi
	callq	_ov7670_write
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movq	8(%rbx), %rax
	movq	(%rax), %rsi
	incq	%rsi
	movq	%r14, %rdi
	callq	_ov7670_write_array
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movl	28(%r15), %esi
	movl	24(%r15), %edx
	movl	16(%r15), %r8d
	movl	20(%r15), %ecx
	movq	%r14, %rdi
	callq	_ov7670_set_hw
	testl	%eax, %eax
	je	LBB0_4
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_ov7670_write_array
	testl	%eax, %eax
	jne	LBB0_6
LBB0_7:
	movq	_REG_CLKRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	4(%rbx), %edx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ov7670_write                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_COM7,4,2                   ## @REG_COM7
	.comm	_V4L2_MBUS_VSYNC_ACTIVE_LOW,4,2 ## @V4L2_MBUS_VSYNC_ACTIVE_LOW
	.comm	_COM10_VS_NEG,1,0               ## @COM10_VS_NEG
	.comm	_V4L2_MBUS_HSYNC_ACTIVE_LOW,4,2 ## @V4L2_MBUS_HSYNC_ACTIVE_LOW
	.comm	_COM10_HREF_REV,1,0             ## @COM10_HREF_REV
	.comm	_COM10_PCLK_HB,1,0              ## @COM10_PCLK_HB
	.comm	_REG_COM10,4,2                  ## @REG_COM10
	.comm	_REG_CLKRC,4,2                  ## @REG_CLKRC
	.no_dead_strip	_ov7670_apply_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7670_apply_fmt
_ov7670_apply_fmt:                      ; @ov7670_apply_fmt
	.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	x19, x0
	bl	_to_state
	mov	x20, x0
	ldr	x21, [x0, #24]
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldrb	w8, [x8]
	ldrb	w9, [x21]
	orr	w2, w9, w8
Lloh0:
	adrp	x8, _REG_COM7@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_COM7@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ov7670_write
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _V4L2_MBUS_VSYNC_ACTIVE_LOW@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_MBUS_VSYNC_ACTIVE_LOW@GOTPAGEOFF]
Lloh5:
	adrp	x10, _COM10_VS_NEG@GOTPAGE
Lloh6:
	ldr	x10, [x10, _COM10_VS_NEG@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	ldrb	w10, [x10]
	tst	w9, w8
	csel	w9, wzr, w10, eq
Lloh8:
	adrp	x10, _V4L2_MBUS_HSYNC_ACTIVE_LOW@GOTPAGE
Lloh9:
	ldr	x10, [x10, _V4L2_MBUS_HSYNC_ACTIVE_LOW@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _COM10_HREF_REV@GOTPAGE
Lloh12:
	ldr	x11, [x11, _COM10_HREF_REV@GOTPAGEOFF]
	ldrb	w11, [x11]
	tst	w10, w8
	csel	w8, wzr, w11, eq
	orr	w8, w8, w9
	ldr	x9, [x20, #16]
Lloh13:
	adrp	x10, _COM10_PCLK_HB@GOTPAGE
Lloh14:
	ldr	x10, [x10, _COM10_PCLK_HB@GOTPAGEOFF]
	ldrb	w10, [x10]
	cmp	x9, #0
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _REG_COM10@GOTPAGE
Lloh16:
	ldr	x9, [x9, _REG_COM10@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x9]
	and	w2, w8, #0xff
	mov	x0, x19
	bl	_ov7670_write
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	add	x1, x8, #1
	mov	x0, x19
	bl	_ov7670_write_array
	cbnz	w0, LBB0_4
; %bb.3:
	ldp	w2, w1, [x21, #24]
	ldp	w4, w3, [x21, #16]
	mov	x0, x19
	bl	_ov7670_set_hw
	cbz	w0, LBB0_5
LBB0_4:
	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
LBB0_5:
	ldr	x1, [x21, #8]
	cbz	x1, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_ov7670_write_array
	cbnz	w0, LBB0_4
LBB0_7:
Lloh18:
	adrp	x8, _REG_CLKRC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _REG_CLKRC@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldrb	w2, [x20, #4]
	mov	x0, x19
	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
	b	_ov7670_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_COM7,4,2                   ; @REG_COM7
	.comm	_V4L2_MBUS_VSYNC_ACTIVE_LOW,4,2 ; @V4L2_MBUS_VSYNC_ACTIVE_LOW
	.comm	_COM10_VS_NEG,1,0               ; @COM10_VS_NEG
	.comm	_V4L2_MBUS_HSYNC_ACTIVE_LOW,4,2 ; @V4L2_MBUS_HSYNC_ACTIVE_LOW
	.comm	_COM10_HREF_REV,1,0             ; @COM10_HREF_REV
	.comm	_COM10_PCLK_HB,1,0              ; @COM10_PCLK_HB
	.comm	_REG_COM10,4,2                  ; @REG_COM10
	.comm	_REG_CLKRC,4,2                  ; @REG_CLKRC
	.no_dead_strip	_ov7670_apply_fmt
.subsections_via_symbols
