	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7670_g_parm
_ov7670_g_parm:                         ## @ov7670_g_parm
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_to_state
	movq	%rax, %r15
	movq	(%rbx), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	leaq	8(%rbx), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movq	_V4L2_CAP_TIMEPERFRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	$1, 8(%rbx)
	movl	(%r15), %eax
	movl	%eax, 12(%rbx)
	movl	4(%r15), %ecx
	movq	_CLK_EXT@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_5
## %bb.3:
	movq	_CLK_SCALE@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	cmpl	$2, %ecx
	jl	LBB0_5
## %bb.4:
	cltd
	idivl	%ecx
	movl	%eax, 12(%rbx)
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_CAP_TIMEPERFRAME,4,2      ## @V4L2_CAP_TIMEPERFRAME
	.comm	_CLK_EXT,4,2                    ## @CLK_EXT
	.comm	_CLK_SCALE,4,2                  ## @CLK_SCALE
	.no_dead_strip	_ov7670_g_parm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7670_g_parm
_ov7670_g_parm:                         ; @ov7670_g_parm
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_to_state
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	mov	x20, x0
	add	x0, x19, #8
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	mov	w0, #0
Lloh3:
	adrp	x8, _V4L2_CAP_TIMEPERFRAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_CAP_TIMEPERFRAME@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	w10, #1
	ldp	w8, w9, [x20]
	stp	w10, w8, [x19, #8]
Lloh6:
	adrp	x10, _CLK_EXT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CLK_EXT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_5
; %bb.2:
Lloh9:
	adrp	x10, _CLK_SCALE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CLK_SCALE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	and	w9, w10, w9
	cmp	w9, #2
	b.lt	LBB0_6
; %bb.3:
	mov	w0, #0
	sdiv	w8, w8, w9
	str	w8, [x19, #12]
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_CAP_TIMEPERFRAME,4,2      ; @V4L2_CAP_TIMEPERFRAME
	.comm	_CLK_EXT,4,2                    ; @CLK_EXT
	.comm	_CLK_SCALE,4,2                  ; @CLK_SCALE
	.no_dead_strip	_ov7670_g_parm
.subsections_via_symbols
