	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7670_try_fmt_internal
_ov7670_try_fmt_internal:               ## @ov7670_try_fmt_internal
	.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	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	callq	_to_state
	movq	48(%rax), %rcx
	movl	(%rcx), %r10d
	movq	_N_OV7670_FMTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_ov7670_formats@GOTPCREL(%rip), %r8
	movq	(%r8), %r9
	testl	%edi, %edi
	jle	LBB0_4
## %bb.1:
	movq	(%r12), %rbx
	xorl	%edx, %edx
	movq	%r9, %rcx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%rcx)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	addq	$16, %rcx
	cmpq	%rdx, %rdi
	jne	LBB0_2
LBB0_4:
	movq	(%r9), %rcx
	movq	%rcx, (%r12)
	xorl	%edx, %edx
LBB0_5:
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	movq	%rdx, %rcx
	shlq	$4, %rcx
	addq	%rcx, %r9
	movq	%r9, (%r15)
LBB0_7:
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%r12)
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.14:
	testq	%r10, %r10
	jne	LBB0_10
## %bb.15:
	movq	48(%rax), %rcx
	movq	8(%rcx), %rdi
	movq	$-1, %r9
	jmp	LBB0_23
LBB0_8:
	cmpq	$0, 8(%rax)
	je	LBB0_17
## %bb.9:
	testl	%r10d, %r10d
	je	LBB0_17
LBB0_10:
	movq	48(%rax), %rdi
	movq	8(%rdi), %rbx
	addq	$8, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rcx, -8(%rbx)
	jl	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	(%rbx), %rsi
	cmpq	8(%rax), %rsi
	jl	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%rdi
	addq	$16, %rbx
	cmpq	%rdi, %r10
	jne	LBB0_11
	jmp	LBB0_17
LBB0_16:
	movl	%edi, %r10d
LBB0_17:
	movq	48(%rax), %rcx
	movq	8(%rcx), %rdi
	movq	$-1, %r9
	testl	%r10d, %r10d
	je	LBB0_23
## %bb.18:
	movl	%r10d, %esi
	shlq	$4, %rsi
	addq	%rdi, %rsi
	movq	8(%r12), %rbx
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	addq	$16, %rdi
	cmpq	%rsi, %rdi
	jae	LBB0_23
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	cmpq	(%rdi), %rbx
	jl	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	16(%r12), %rcx
	cmpq	8(%rdi), %rcx
	jl	LBB0_22
## %bb.21:
	xorl	%r9d, %r9d
LBB0_23:
	shlq	$4, %r9
	leaq	(%rdi,%r9), %rsi
	testq	%r14, %r14
	je	LBB0_25
## %bb.24:
	movq	%rsi, (%r14)
LBB0_25:
	movq	(%rsi), %rcx
	movq	%rcx, 8(%r12)
	movq	8(%rdi,%r9), %rcx
	movq	%rcx, 16(%r12)
	movq	(%r8), %rcx
	shlq	$4, %rdx
	movl	8(%rcx,%rdx), %ecx
	movl	%ecx, 24(%r12)
	movups	(%r12), %xmm0
	movups	%xmm0, 16(%rax)
	movups	16(%r12), %xmm0
	movups	%xmm0, 32(%rax)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_N_OV7670_FMTS,4,2              ## @N_OV7670_FMTS
	.comm	_ov7670_formats,8,3             ## @ov7670_formats
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.no_dead_strip	_ov7670_try_fmt_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7670_try_fmt_internal
_ov7670_try_fmt_internal:               ; @ov7670_try_fmt_internal
	.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, x3
	mov	x21, x2
	mov	x19, x1
	bl	_to_state
	ldr	x8, [x0, #48]
Lloh0:
	adrp	x9, _N_OV7670_FMTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _N_OV7670_FMTS@GOTPAGEOFF]
	ldr	w10, [x8]
Lloh2:
	ldr	w12, [x9]
Lloh3:
	adrp	x8, _ov7670_formats@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ov7670_formats@GOTPAGEOFF]
	ldr	x11, [x8]
	cmp	w12, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x9, #0
	ldr	x13, [x19]
	mov	x14, x11
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x15, [x14]
	cmp	x15, x13
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	add	x14, x14, #16
	cmp	x12, x9
	b.ne	LBB0_2
LBB0_4:
	mov	x9, #0
	ldr	x12, [x11]
	str	x12, [x19]
LBB0_5:
	cbz	x21, LBB0_7
; %bb.6:
	add	x11, x11, x9, lsl #4
	str	x11, [x21]
LBB0_7:
Lloh5:
	adrp	x11, _V4L2_FIELD_NONE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x11]
	str	w11, [x19, #28]
	ldr	x11, [x0]
	cbz	x11, LBB0_10
; %bb.8:
	cbnz	w10, LBB0_12
; %bb.9:
	ldr	x10, [x0, #48]
	ldr	x11, [x10, #8]
	b	LBB0_23
LBB0_10:
	ldr	x12, [x0, #8]
	cbz	x12, LBB0_17
; %bb.11:
	cbz	w10, LBB0_17
LBB0_12:
	mov	x12, #0
	ldr	x13, [x0, #48]
	ldr	x13, [x13, #8]
	add	x13, x13, #8
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldur	x14, [x13, #-8]
	cmp	x14, x11
	b.lt	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x14, [x13]
	ldr	x15, [x0, #8]
	cmp	x14, x15
	b.lt	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x12, x12, #1
	add	x13, x13, #16
	cmp	x10, x12
	b.ne	LBB0_13
	b	LBB0_17
LBB0_16:
	mov	x10, x12
LBB0_17:
	ldr	x11, [x0, #48]
	ldr	x11, [x11, #8]
	cbz	w10, LBB0_23
; %bb.18:
	add	x10, x11, w10, uxtw #4
	ldr	x12, [x19, #8]
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x11, x11, #16
	cmp	x11, x10
	b.hs	LBB0_23
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x11]
	cmp	x12, x13
	b.lt	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	x13, [x19, #16]
	ldr	x14, [x11, #8]
	cmp	x13, x14
	b.lt	LBB0_19
; %bb.22:
	mov	x10, #0
	add	x10, x11, x10, lsl #4
	cbnz	x20, LBB0_24
	b	LBB0_25
LBB0_23:
	mov	x10, #-1
	add	x10, x11, x10, lsl #4
	cbz	x20, LBB0_25
LBB0_24:
	str	x10, [x20]
LBB0_25:
	ldp	x11, x10, [x10]
	stp	x11, x10, [x19, #8]
	ldr	x8, [x8]
	add	x8, x8, x9, lsl #4
	ldr	w8, [x8, #8]
	str	w8, [x19, #24]
	ldp	q0, q1, [x19]
	stp	q0, q1, [x0, #16]
	mov	w0, #0
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_N_OV7670_FMTS,4,2              ; @N_OV7670_FMTS
	.comm	_ov7670_formats,8,3             ; @ov7670_formats
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.no_dead_strip	_ov7670_try_fmt_internal
.subsections_via_symbols
