	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov965x_set_sharpness
_ov965x_set_sharpness:                  ## @ov965x_set_sharpness
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_REG_COM14@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	callq	_ov965x_read
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movq	_REG_EDGE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_ov965x_read
	testl	%eax, %eax
	js	LBB0_9
## %bb.2:
	movl	-36(%rbp), %eax
	movq	_COM14_EDGE_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.4:
	orl	%eax, %edx
	decl	%ebx
	cmpl	$16, %ebx
	jae	LBB0_5
## %bb.6:
	movq	_COM14_EEF_X2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
	movl	%edx, -36(%rbp)
	jmp	LBB0_7
LBB0_3:
	notl	%edx
	andl	%eax, %edx
	movl	$-1, %ebx
LBB0_5:
	movq	_COM14_EEF_X2@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
	shrl	%ebx
LBB0_7:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_ov965x_write
	testl	%eax, %eax
	js	LBB0_9
## %bb.8:
	movq	_EDGE_FACTOR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	-40(%rbp), %eax
	andl	$15, %ebx
	orl	%eax, %ebx
	movl	%ebx, -40(%rbp)
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_ov965x_write
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_COM14,4,2                  ## @REG_COM14
	.comm	_REG_EDGE,4,2                   ## @REG_EDGE
	.comm	_COM14_EDGE_EN,4,2              ## @COM14_EDGE_EN
	.comm	_COM14_EEF_X2,4,2               ## @COM14_EEF_X2
	.comm	_EDGE_FACTOR_MASK,4,2           ## @EDGE_FACTOR_MASK
	.no_dead_strip	_ov965x_set_sharpness
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov965x_set_sharpness
_ov965x_set_sharpness:                  ; @ov965x_set_sharpness
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _REG_COM14@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_COM14@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_ov965x_read
	tbnz	w0, #31, LBB0_9
; %bb.1:
Lloh2:
	adrp	x21, _REG_EDGE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _REG_EDGE@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ov965x_read
	tbnz	w0, #31, LBB0_9
; %bb.2:
	ldr	w8, [sp, #12]
Lloh4:
	adrp	x9, _COM14_EDGE_EN@GOTPAGE
Lloh5:
	ldr	x9, [x9, _COM14_EDGE_EN@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cbz	w20, LBB0_5
; %bb.3:
	orr	w8, w9, w8
	sub	w20, w20, #1
	cmp	w20, #16
	b.hs	LBB0_6
; %bb.4:
Lloh7:
	adrp	x9, _COM14_EEF_X2@GOTPAGE
Lloh8:
	ldr	x9, [x9, _COM14_EEF_X2@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	bic	w2, w8, w9
	str	w2, [sp, #12]
	b	LBB0_7
LBB0_5:
	bic	w8, w8, w9
	mov	w20, #-1
LBB0_6:
Lloh10:
	adrp	x9, _COM14_EEF_X2@GOTPAGE
Lloh11:
	ldr	x9, [x9, _COM14_EEF_X2@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	lsr	w20, w20, #1
LBB0_7:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ov965x_write
	tbnz	w0, #31, LBB0_9
; %bb.8:
Lloh13:
	adrp	x8, _EDGE_FACTOR_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EDGE_FACTOR_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	bic	w8, w9, w8
	and	w9, w20, #0xf
	orr	w2, w8, w9
	str	w2, [sp, #8]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ov965x_write
LBB0_9:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_COM14,4,2                  ; @REG_COM14
	.comm	_REG_EDGE,4,2                   ; @REG_EDGE
	.comm	_COM14_EDGE_EN,4,2              ; @COM14_EDGE_EN
	.comm	_COM14_EEF_X2,4,2               ; @COM14_EEF_X2
	.comm	_EDGE_FACTOR_MASK,4,2           ; @EDGE_FACTOR_MASK
	.no_dead_strip	_ov965x_set_sharpness
.subsections_via_symbols
