	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5640_try_fmt_internal
_ov5640_try_fmt_internal:               ## @ov5640_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r15d
	movq	%rsi, %r12
	callq	_to_ov5640_dev
	movl	24(%r12), %ecx
	movl	28(%r12), %edx
	movq	%rax, %rdi
	movl	%r15d, %esi
	movl	$1, %r8d
	callq	_ov5640_find_mode
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	4(%rax), %ecx
	movl	%ecx, 28(%r12)
	movl	(%rax), %ecx
	movl	%ecx, 24(%r12)
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	movq	%rax, (%r14)
LBB0_4:
	movq	_ov5640_formats@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	xorl	%r14d, %r14d
	movl	$0, %r13d
	testl	%eax, %eax
	jle	LBB0_8
## %bb.5:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movq	(%rdi,%rbx), %rax
	cmpq	(%r12), %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r13
	callq	_ARRAY_SIZE
	cltq
	addq	$16, %rbx
	cmpq	%rax, %r13
	jl	LBB0_6
LBB0_8:
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r13d
	cmovgel	%r14d, %r13d
	movq	(%r15), %rax
	shlq	$4, %r13
	movq	(%rax,%r13), %rcx
	movq	%rcx, (%r12)
	movl	8(%rax,%r13), %edi
	movl	%edi, 8(%r12)
	callq	_V4L2_MAP_YCBCR_ENC_DEFAULT
	movl	%eax, 20(%r12)
	movq	_V4L2_QUANTIZATION_FULL_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movl	8(%r12), %edi
	callq	_V4L2_MAP_XFER_FUNC_DEFAULT
	movl	%eax, 12(%r12)
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ov5640_formats,8,3             ## @ov5640_formats
	.comm	_V4L2_QUANTIZATION_FULL_RANGE,4,2 ## @V4L2_QUANTIZATION_FULL_RANGE
	.no_dead_strip	_ov5640_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 ov5640_try_fmt_internal
_ov5640_try_fmt_internal:               ; @ov5640_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_ov5640_dev
	ldp	w3, w2, [x19, #24]
	mov	x1, x21
	mov	w4, #1
	bl	_ov5640_find_mode
	cbz	x0, LBB0_7
; %bb.1:
	ldr	d0, [x0]
	str	d0, [x19, #24]
	cbz	x20, LBB0_3
; %bb.2:
	str	x0, [x20]
LBB0_3:
Lloh0:
	adrp	x20, _ov5640_formats@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ov5640_formats@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x22, #0
	mov	x21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	ldr	x8, [x0, x22]
	ldr	x9, [x19]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	add	x22, x22, #16
	cmp	x21, w0, sxtw
	b.lt	LBB0_5
	b	LBB0_9
LBB0_7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_8:
	mov	w21, #0
LBB0_9:
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w21, w0
	csel	w8, w21, wzr, lt
	ldr	x9, [x20]
	add	x8, x9, w8, uxtw #4
	ldr	x9, [x8]
	str	x9, [x19]
	ldr	w0, [x8, #8]
	str	w0, [x19, #8]
	bl	_V4L2_MAP_YCBCR_ENC_DEFAULT
Lloh5:
	adrp	x8, _V4L2_QUANTIZATION_FULL_RANGE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V4L2_QUANTIZATION_FULL_RANGE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	w8, w0, [x19, #16]
	ldr	w0, [x19, #8]
	bl	_V4L2_MAP_XFER_FUNC_DEFAULT
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #12]
LBB0_10:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ov5640_formats,8,3             ; @ov5640_formats
	.comm	_V4L2_QUANTIZATION_FULL_RANGE,4,2 ; @V4L2_QUANTIZATION_FULL_RANGE
	.no_dead_strip	_ov5640_try_fmt_internal
.subsections_via_symbols
