	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5640_find_mode
_ov5640_find_mode:                      ## @ov5640_find_mode
	.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
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	_ov5640_mode_data@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	_hact@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_vact@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	%r13d, %r8d
	movl	%r15d, %r9d
	callq	_v4l2_find_nearest_size
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	testl	%r12d, %r12d
	je	LBB0_2
LBB0_4:
	movq	_OV5640_60_FPS@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_8
## %bb.5:
	cmpl	$640, (%rax)                    ## imm = 0x280
	jne	LBB0_7
## %bb.6:
	cmpl	$480, 4(%rax)                   ## imm = 0x1E0
	jne	LBB0_7
	jmp	LBB0_8
LBB0_2:
	cmpl	%r13d, (%rax)
	jne	LBB0_7
## %bb.3:
	cmpl	%r15d, 4(%rax)
	je	LBB0_4
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ov5640_mode_data,4,2           ## @ov5640_mode_data
	.comm	_hact,4,2                       ## @hact
	.comm	_vact,4,2                       ## @vact
	.comm	_OV5640_60_FPS,4,2              ## @OV5640_60_FPS
	.no_dead_strip	_ov5640_find_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov5640_find_mode
_ov5640_find_mode:                      ; @ov5640_find_mode
	.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	x22, x4
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
Lloh0:
	adrp	x8, _ov5640_mode_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ov5640_mode_data@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	mov	x0, x23
	bl	_ARRAY_SIZE
	mov	x1, x0
Lloh3:
	adrp	x8, _hact@GOTPAGE
Lloh4:
	ldr	x8, [x8, _hact@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _vact@GOTPAGE
Lloh7:
	ldr	x8, [x8, _vact@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x23
	mov	x4, x21
	mov	x5, x20
	bl	_v4l2_find_nearest_size
	cbz	x0, LBB0_8
; %bb.1:
	cbz	w22, LBB0_5
LBB0_2:
Lloh9:
	adrp	x8, _OV5640_60_FPS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OV5640_60_FPS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x0]
	cmp	w8, #640
	b.ne	LBB0_7
; %bb.4:
	ldr	w8, [x0, #4]
	cmp	w8, #480
	b.ne	LBB0_7
	b	LBB0_8
LBB0_5:
	ldr	w8, [x0]
	cmp	w8, w21
	b.ne	LBB0_7
; %bb.6:
	ldr	w8, [x0, #4]
	cmp	w8, w20
	b.eq	LBB0_2
LBB0_7:
	mov	x0, #0
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ov5640_mode_data,4,2           ; @ov5640_mode_data
	.comm	_hact,4,2                       ; @hact
	.comm	_vact,4,2                       ; @vact
	.comm	_OV5640_60_FPS,4,2              ; @OV5640_60_FPS
	.no_dead_strip	_ov5640_find_mode
.subsections_via_symbols
