	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7670_s_mbus_fmt
_ov7670_s_mbus_fmt:                     ## @ov7670_s_mbus_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_to_state
	movq	%rax, %r14
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ov7670_try_fmt_internal
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	-40(%rbp), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx
	movb	(%rcx), %cl
	orb	(%rax), %cl
	movq	_REG_COM7@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%cl, %edx
	movq	%r12, %rdi
	callq	_ov7670_write
	movq	-40(%rbp), %rax
	movq	(%rax), %rsi
	incq	%rsi
	movq	%r12, %rdi
	callq	_ov7670_write_array
	movq	-48(%rbp), %rax
	movl	28(%rax), %esi
	movl	24(%rax), %edx
	movl	16(%rax), %r8d
	movl	20(%rax), %ecx
	movq	%r12, %rdi
	callq	_ov7670_set_hw
	movq	-48(%rbp), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	callq	_ov7670_write_array
	movq	-40(%rbp), %rcx
	movq	%rcx, 8(%r14)
	testl	%eax, %eax
	jne	LBB0_5
	jmp	LBB0_4
LBB0_3:
	movq	-40(%rbp), %rax
	movq	%rax, 8(%r14)
LBB0_4:
	movq	_REG_CLKRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	(%r14), %edx
	movq	%r12, %rdi
	callq	_ov7670_write
LBB0_5:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_COM7,4,2                   ## @REG_COM7
	.comm	_REG_CLKRC,4,2                  ## @REG_CLKRC
	.no_dead_strip	_ov7670_s_mbus_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7670_s_mbus_fmt
_ov7670_s_mbus_fmt:                     ; @ov7670_s_mbus_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
	bl	_to_state
	mov	x20, x0
	add	x2, sp, #8
	mov	x3, sp
	mov	x0, x19
	mov	x1, x21
	bl	_ov7670_try_fmt_internal
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.1:
	ldp	x9, x8, [sp]
	ldr	x8, [x8]
	ldrb	w8, [x8]
	ldrb	w9, [x9]
	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
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	add	x1, x8, #1
	mov	x0, x19
	bl	_ov7670_write_array
	ldr	x8, [sp]
	ldp	w2, w1, [x8, #24]
	ldp	w4, w3, [x8, #16]
	mov	x0, x19
	bl	_ov7670_set_hw
	ldr	x8, [sp]
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_ov7670_write_array
	ldr	x8, [sp, #8]
	str	x8, [x20, #8]
	cbnz	w0, LBB0_5
	b	LBB0_4
LBB0_3:
	ldr	x8, [sp, #8]
	str	x8, [x20, #8]
LBB0_4:
Lloh3:
	adrp	x8, _REG_CLKRC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_CLKRC@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldrb	w2, [x20]
	mov	x0, x19
	bl	_ov7670_write
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_COM7,4,2                   ; @REG_COM7
	.comm	_REG_CLKRC,4,2                  ; @REG_CLKRC
	.no_dead_strip	_ov7670_s_mbus_fmt
.subsections_via_symbols
