	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5640_try_frame_interval
_ov5640_try_frame_interval:             ## @ov5640_try_frame_interval
	.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	%rsi, %rax
	movq	_ov5640_framerates@GOTPCREL(%rip), %rbx
	movq	(%rbx), %r8
	movq	_OV5640_60_FPS@GOTPCREL(%rip), %rsi
	movq	(%rsi), %r12
	movl	(%r8,%r12,4), %r15d
	movl	(%rax), %esi
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	_OV5640_15_FPS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r12
	movl	(%r8,%r12,4), %r14d
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	4(%rax), %edi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, %edi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_clamp_val
	movl	%eax, %r15d
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_5
## %bb.3:
	xorl	%r13d, %r13d
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movl	(%rax,%r13,4), %r15d
	movl	%r15d, %edi
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	subl	%ebx, %edi
	callq	_abs
	movq	%rax, %r12
	movl	%r14d, %edi
	subl	%ebx, %edi
	callq	_abs
	cmpq	%rax, %r12
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	_ov5640_framerates@GOTPCREL(%rip), %rbx
	cmovll	%r15d, %r14d
	cmovll	%r13d, %r12d
	incq	%r13
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r13
	jl	LBB0_4
LBB0_5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movl	%r14d, 4(%rax)
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_1:
	movl	%r15d, 4(%rax)
	movl	$1, (%rax)
LBB0_6:
	xorl	%r14d, %r14d
	movl	%r12d, %esi
	xorl	%r8d, %r8d
	callq	_ov5640_find_mode
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	subl	(%rcx), %r14d
	testq	%rax, %rax
	cmovnel	%r12d, %r14d
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OV5640_15_FPS,8,3              ## @OV5640_15_FPS
	.comm	_ov5640_framerates,8,3          ## @ov5640_framerates
	.comm	_OV5640_60_FPS,8,3              ## @OV5640_60_FPS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ov5640_try_frame_interval
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov5640_try_frame_interval
_ov5640_try_frame_interval:             ; @ov5640_try_frame_interval
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x27, _ov5640_framerates@GOTPAGE
Lloh1:
	ldr	x27, [x27, _ov5640_framerates@GOTPAGEOFF]
	ldr	x8, [x27]
Lloh2:
	adrp	x9, _OV5640_60_FPS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _OV5640_60_FPS@GOTPAGEOFF]
Lloh4:
	ldr	x22, [x9]
	ldr	w25, [x8, x22, lsl #2]
	ldr	w1, [x1]
	cbz	w1, LBB0_5
; %bb.1:
	str	w3, [sp, #12]                   ; 4-byte Folded Spill
Lloh5:
	adrp	x9, _OV5640_15_FPS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _OV5640_15_FPS@GOTPAGEOFF]
Lloh7:
	ldr	x22, [x9]
	ldr	w24, [x8, x22, lsl #2]
	ldr	w0, [x23, #4]
	bl	_DIV_ROUND_CLOSEST
	mov	x1, x24
	mov	x2, x25
	bl	_clamp_val
	mov	x25, x0
	ldr	x0, [x27]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x28, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27]
	ldr	w19, [x8, x28, lsl #2]
	sub	w0, w19, w25
	bl	_abs
	mov	x26, x0
	sub	w0, w24, w25
	bl	_abs
	cmp	x26, x0
	csel	w24, w19, w24, lt
	csel	w22, w28, w22, lt
	add	x28, x28, #1
	ldr	x0, [x27]
	bl	_ARRAY_SIZE
	cmp	x28, w0, sxtw
	b.lt	LBB0_3
LBB0_4:
	mov	w8, #1
	stp	w8, w24, [x23]
	ldr	w3, [sp, #12]                   ; 4-byte Folded Reload
	b	LBB0_6
LBB0_5:
	mov	w8, #1
	stp	w8, w25, [x23]
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
LBB0_6:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	w4, #0
	bl	_ov5640_find_mode
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	x0, #0
	csneg	w0, w22, w8, ne
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_OV5640_15_FPS,8,3              ; @OV5640_15_FPS
	.comm	_ov5640_framerates,8,3          ; @ov5640_framerates
	.comm	_OV5640_60_FPS,8,3              ; @OV5640_60_FPS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ov5640_try_frame_interval
.subsections_via_symbols
