	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5640_s_frame_interval
_ov5640_s_frame_interval:               ## @ov5640_s_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_to_ov5640_dev
	cmpq	$0, (%r15)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_2:
	movq	%rax, %r12
	movq	%rax, %r14
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 32(%r12)
	je	LBB0_5
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_5:
	movq	16(%r12), %rbx
	addq	$8, %r15
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ov5640_try_frame_interval
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movl	%eax, %r13d
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$1, %r8d
	callq	_ov5640_find_mode
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	cmpq	16(%r12), %rax
	jne	LBB0_11
## %bb.10:
	xorl	%ebx, %ebx
	cmpl	(%r12), %r13d
	je	LBB0_13
LBB0_11:
	movl	%r13d, (%r12)
	movl	(%r15), %ecx
	movl	%ecx, 24(%r12)
	movq	%rax, 16(%r12)
	movl	$1, 4(%r12)
	jmp	LBB0_12
LBB0_6:
	movl	24(%r12), %eax
	movl	%eax, (%r15)
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_ov5640_s_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_s_frame_interval
_ov5640_s_frame_interval:               ; @ov5640_s_frame_interval
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	bl	_to_ov5640_dev
	ldr	x8, [x21]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_6
LBB0_2:
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x22, [x20, #16]
	add	x21, x21, #8
	ldp	w3, w2, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_ov5640_try_frame_interval
	tbnz	w0, #31, LBB0_12
; %bb.8:
	mov	x23, x0
	ldp	w3, w2, [x22]
	mov	x0, x20
	mov	x1, x23
	mov	w4, #1
	bl	_ov5640_find_mode
	cbz	x0, LBB0_14
; %bb.9:
	ldr	x8, [x20, #16]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.10:
	ldr	w8, [x20]
	cmp	w23, w8
	b.ne	LBB0_13
; %bb.11:
	mov	w22, #0
	b	LBB0_5
LBB0_12:
	mov	w22, #0
	ldr	w8, [x20, #24]
	str	w8, [x21]
	b	LBB0_5
LBB0_13:
	mov	w22, #0
	ldr	w8, [x21]
	str	w8, [x20, #24]
	str	x0, [x20, #16]
	mov	w8, #1
	stp	w23, w8, [x20]
	b	LBB0_5
LBB0_14:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_ov5640_s_frame_interval
.subsections_via_symbols
