	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov772x_edgectrl
_ov772x_edgectrl:                       ## @ov772x_edgectrl
	.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	(%rdi), %rax
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_OV772X_MANUAL_EDGE_CTRL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.2:
	movq	_DSPAUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EDGE_ACTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	movq	_EDGE_TRSHLD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OV772X_EDGE_THRESHOLD_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%rbx), %rax
	movl	4(%rax), %ecx
	movq	%r14, %rdi
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	movq	_EDGE_STRNGT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OV772X_EDGE_STRENGTH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%rbx), %rax
	movl	(%rax), %ecx
	jmp	LBB0_8
LBB0_5:
	movl	8(%rax), %ecx
	cmpl	12(%rax), %ecx
	jle	LBB0_10
## %bb.6:
	movq	_EDGE_UPPER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OV772X_EDGE_UPPER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_9
## %bb.7:
	movq	_EDGE_LOWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OV772X_EDGE_LOWER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%rbx), %rax
	movl	12(%rax), %ecx
LBB0_8:
	movq	%r14, %rdi
	callq	_regmap_update_bits
	testl	%eax, %eax
	jns	LBB0_10
LBB0_9:
	movl	%eax, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OV772X_MANUAL_EDGE_CTRL,4,2    ## @OV772X_MANUAL_EDGE_CTRL
	.comm	_DSPAUTO,4,2                    ## @DSPAUTO
	.comm	_EDGE_ACTRL,4,2                 ## @EDGE_ACTRL
	.comm	_EDGE_TRSHLD,4,2                ## @EDGE_TRSHLD
	.comm	_OV772X_EDGE_THRESHOLD_MASK,4,2 ## @OV772X_EDGE_THRESHOLD_MASK
	.comm	_EDGE_STRNGT,4,2                ## @EDGE_STRNGT
	.comm	_OV772X_EDGE_STRENGTH_MASK,4,2  ## @OV772X_EDGE_STRENGTH_MASK
	.comm	_EDGE_UPPER,4,2                 ## @EDGE_UPPER
	.comm	_OV772X_EDGE_UPPER_MASK,4,2     ## @OV772X_EDGE_UPPER_MASK
	.comm	_EDGE_LOWER,4,2                 ## @EDGE_LOWER
	.comm	_OV772X_EDGE_LOWER_MASK,4,2     ## @OV772X_EDGE_LOWER_MASK
	.no_dead_strip	_ov772x_edgectrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov772x_edgectrl
_ov772x_edgectrl:                       ; @ov772x_edgectrl
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_9
; %bb.1:
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	w9, [x8]
Lloh0:
	adrp	x10, _OV772X_MANUAL_EDGE_CTRL@GOTPAGE
Lloh1:
	ldr	x10, [x10, _OV772X_MANUAL_EDGE_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _DSPAUTO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DSPAUTO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _EDGE_ACTRL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EDGE_ACTRL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_10
; %bb.3:
Lloh9:
	adrp	x8, _EDGE_TRSHLD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EDGE_TRSHLD@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _OV772X_EDGE_THRESHOLD_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OV772X_EDGE_THRESHOLD_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	ldr	x8, [x20]
	ldr	w3, [x8, #4]
	mov	x0, x19
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_10
; %bb.4:
Lloh15:
	adrp	x8, _EDGE_STRNGT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EDGE_STRNGT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _OV772X_EDGE_STRENGTH_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _OV772X_EDGE_STRENGTH_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	ldr	x8, [x20]
	ldr	w3, [x8]
	b	LBB0_8
LBB0_5:
	ldp	w3, w8, [x8, #8]
	cmp	w3, w8
	b.le	LBB0_9
; %bb.6:
Lloh21:
	adrp	x8, _EDGE_UPPER@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EDGE_UPPER@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _OV772X_EDGE_UPPER_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _OV772X_EDGE_UPPER_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_10
; %bb.7:
Lloh27:
	adrp	x8, _EDGE_LOWER@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EDGE_LOWER@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _OV772X_EDGE_LOWER_MASK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _OV772X_EDGE_LOWER_MASK@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	ldr	x8, [x20]
	ldr	w3, [x8, #12]
LBB0_8:
	mov	x0, x19
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_OV772X_MANUAL_EDGE_CTRL,4,2    ; @OV772X_MANUAL_EDGE_CTRL
	.comm	_DSPAUTO,4,2                    ; @DSPAUTO
	.comm	_EDGE_ACTRL,4,2                 ; @EDGE_ACTRL
	.comm	_EDGE_TRSHLD,4,2                ; @EDGE_TRSHLD
	.comm	_OV772X_EDGE_THRESHOLD_MASK,4,2 ; @OV772X_EDGE_THRESHOLD_MASK
	.comm	_EDGE_STRNGT,4,2                ; @EDGE_STRNGT
	.comm	_OV772X_EDGE_STRENGTH_MASK,4,2  ; @OV772X_EDGE_STRENGTH_MASK
	.comm	_EDGE_UPPER,4,2                 ; @EDGE_UPPER
	.comm	_OV772X_EDGE_UPPER_MASK,4,2     ; @OV772X_EDGE_UPPER_MASK
	.comm	_EDGE_LOWER,4,2                 ; @EDGE_LOWER
	.comm	_OV772X_EDGE_LOWER_MASK,4,2     ; @OV772X_EDGE_LOWER_MASK
	.no_dead_strip	_ov772x_edgectrl
.subsections_via_symbols
