	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5645_set_aec_mode
_ov5645_set_aec_mode:                   ## @ov5645_set_aec_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	(%rdi), %eax
	movq	_V4L2_EXPOSURE_AUTO@GOTPCREL(%rip), %rcx
	movq	_OV5645_AEC_MANUAL_ENABLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	movl	%ebx, %edx
	notl	%edx
	andl	%eax, %edx
	orl	%eax, %ebx
	cmpq	%rsi, (%rcx)
	cmovel	%edx, %ebx
	movq	_OV5645_AEC_PK_MANUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_ov5645_write_reg
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	%ebx, (%r14)
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_EXPOSURE_AUTO,8,3         ## @V4L2_EXPOSURE_AUTO
	.comm	_OV5645_AEC_MANUAL_ENABLE,4,2   ## @OV5645_AEC_MANUAL_ENABLE
	.comm	_OV5645_AEC_PK_MANUAL,4,2       ## @OV5645_AEC_PK_MANUAL
	.no_dead_strip	_ov5645_set_aec_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov5645_set_aec_mode
_ov5645_set_aec_mode:                   ; @ov5645_set_aec_mode
	.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, x0
Lloh0:
	adrp	x8, _V4L2_EXPOSURE_AUTO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_EXPOSURE_AUTO@GOTPAGEOFF]
	ldr	w9, [x0]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _OV5645_AEC_MANUAL_ENABLE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _OV5645_AEC_MANUAL_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	bic	w11, w9, w10
	orr	w9, w10, w9
	cmp	x8, x1
	csel	w20, w11, w9, eq
Lloh6:
	adrp	x8, _OV5645_AEC_PK_MANUAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OV5645_AEC_PK_MANUAL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_ov5645_write_reg
	cbnz	w0, LBB0_2
; %bb.1:
	str	w20, [x19]
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_EXPOSURE_AUTO,8,3         ; @V4L2_EXPOSURE_AUTO
	.comm	_OV5645_AEC_MANUAL_ENABLE,4,2   ; @OV5645_AEC_MANUAL_ENABLE
	.comm	_OV5645_AEC_PK_MANUAL,4,2       ; @OV5645_AEC_PK_MANUAL
	.no_dead_strip	_ov5645_set_aec_mode
.subsections_via_symbols
