	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7670_s_parm
_ov7670_s_parm:                         ## @ov7670_s_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_to_state
	movq	%rax, %rdi
	movq	(%rbx), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.1:
	cmpq	$0, 8(%rbx)
	je	LBB0_2
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movl	16(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	20(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.5:
	movl	(%rdi), %r8d
	imull	%r8d, %eax
	cltd
	idivl	%ecx
	movq	_CLK_SCALE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	cmovll	%eax, %ecx
	testl	%eax, %eax
	movl	$1, %esi
	cmovnel	%ecx, %esi
	jmp	LBB0_6
LBB0_4:
	movq	_CLK_SCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	movl	$1, %esi
	cmovlel	%eax, %esi
	movl	(%rdi), %r8d
LBB0_6:
	movl	$128, %ecx
	andl	4(%rdi), %ecx
	orl	%esi, %ecx
	movl	%ecx, 4(%rdi)
	movl	$1, 16(%rbx)
	movl	%r8d, %eax
	cltd
	idivl	%esi
	movl	%eax, 20(%rbx)
	movq	_REG_CLKRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ecx, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ov7670_write                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CLK_SCALE,4,2                  ## @CLK_SCALE
	.comm	_REG_CLKRC,4,2                  ## @REG_CLKRC
	.no_dead_strip	_ov7670_s_parm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7670_s_parm
_ov7670_s_parm:                         ; @ov7670_s_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	x20, x1
	mov	x19, x0
	bl	_to_state
	ldr	x8, [x20]
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_2
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	w9, [x20, #16]
	cbz	w9, LBB0_6
; %bb.4:
	ldr	w10, [x20, #20]
	cbz	w10, LBB0_6
; %bb.5:
	ldr	w8, [x0]
	mul	w9, w8, w9
Lloh6:
	adrp	x11, _CLK_SCALE@GOTPAGE
Lloh7:
	ldr	x11, [x11, _CLK_SCALE@GOTPAGEOFF]
	sdiv	w9, w9, w10
Lloh8:
	ldr	w10, [x11]
	cmp	w9, w10
	csel	w10, w9, w10, lt
	cmp	w9, #0
	csinc	w9, w10, wzr, ne
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x8, _CLK_SCALE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CLK_SCALE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, #1
	csinc	w9, w8, wzr, lt
	ldr	w8, [x0]
LBB0_7:
	ldr	w10, [x0, #4]
	and	w10, w10, #0x80
	orr	w2, w10, w9
	str	w2, [x0, #4]
	mov	w10, #1
	sdiv	w8, w8, w9
	stp	w10, w8, [x20, #16]
Lloh12:
	adrp	x8, _REG_CLKRC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_CLKRC@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ov7670_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.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	_CLK_SCALE,4,2                  ; @CLK_SCALE
	.comm	_REG_CLKRC,4,2                  ; @REG_CLKRC
	.no_dead_strip	_ov7670_s_parm
.subsections_via_symbols
