	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7670_s_gain
_ov7670_s_gain:                         ## @ov7670_s_gain
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_REG_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movzbl	%sil, %edx
	movl	%eax, %esi
	callq	_ov7670_write
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_REG_COM8@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-17(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ov7670_read
	movl	(%r14), %esi
	movq	_COM8_AGC@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	notb	%al
	andb	-17(%rbp), %al
	movzbl	%al, %edx
	movq	%rbx, %rdi
	callq	_ov7670_write
LBB0_2:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_GAIN,4,2                   ## @REG_GAIN
	.comm	_REG_COM8,4,2                   ## @REG_COM8
	.comm	_COM8_AGC,1,0                   ## @COM8_AGC
	.no_dead_strip	_ov7670_s_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7670_s_gain
_ov7670_s_gain:                         ; @ov7670_s_gain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, _REG_GAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_GAIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w2, w1, #0xff
	mov	x1, x8
	bl	_ov7670_write
	cbnz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x20, _REG_COM8@GOTPAGE
Lloh4:
	ldr	x20, [x20, _REG_COM8@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #15
	mov	x0, x19
	bl	_ov7670_read
	ldr	w1, [x20]
	ldrb	w8, [sp, #15]
Lloh5:
	adrp	x9, _COM8_AGC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _COM8_AGC@GOTPAGEOFF]
	ldrb	w9, [x9]
	eor	w9, w9, #0xff
	and	w2, w8, w9
	mov	x0, x19
	bl	_ov7670_write
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_GAIN,4,2                   ; @REG_GAIN
	.comm	_REG_COM8,4,2                   ; @REG_COM8
	.comm	_COM8_AGC,1,0                   ; @COM8_AGC
	.no_dead_strip	_ov7670_s_gain
.subsections_via_symbols
