	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7740_set_gain
_ov7740_set_gain:                       ## @ov7740_set_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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_REG_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bl, %edx
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_REG_CTRL15@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG15_GAIN_MSB@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shrl	$8, %ebx
	andl	$3, %ebx
	movq	%r14, %rdi
	movl	%ebx, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_3
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	_REG_REG13@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG13_AGC_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_GAIN,4,2                   ## @REG_GAIN
	.comm	_REG_CTRL15,4,2                 ## @REG_CTRL15
	.comm	_REG15_GAIN_MSB,4,2             ## @REG15_GAIN_MSB
	.comm	_REG_REG13,4,2                  ## @REG_REG13
	.comm	_REG13_AGC_EN,4,2               ## @REG13_AGC_EN
	.no_dead_strip	_ov7740_set_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7740_set_gain
_ov7740_set_gain:                       ; @ov7740_set_gain
	.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
Lloh0:
	adrp	x8, _REG_GAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_GAIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	and	w2, w20, #0xff
	bl	_regmap_write
	cbnz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _REG_CTRL15@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_CTRL15@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _REG15_GAIN_MSB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG15_GAIN_MSB@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	ubfx	w3, w20, #8, #2
	mov	x0, x19
	bl	_regmap_update_bits
	cbz	w0, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh9:
	adrp	x8, _REG_REG13@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_REG13@GOTPAGEOFF]
Lloh11:
	adrp	x9, _REG13_AGC_EN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _REG13_AGC_EN@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	ldr	w2, [x9]
	mov	x0, x19
	mov	w3, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_regmap_update_bits
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_GAIN,4,2                   ; @REG_GAIN
	.comm	_REG_CTRL15,4,2                 ; @REG_CTRL15
	.comm	_REG15_GAIN_MSB,4,2             ; @REG15_GAIN_MSB
	.comm	_REG_REG13,4,2                  ; @REG_REG13
	.comm	_REG13_AGC_EN,4,2               ; @REG13_AGC_EN
	.no_dead_strip	_ov7740_set_gain
.subsections_via_symbols
