	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov2680_gain_set
_ov2680_gain_set:                       ## @ov2680_gain_set
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_OV2680_REG_R_MANUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	$1, %edi
	callq	_BIT
	movl	%eax, %ebx
	xorl	%ecx, %ecx
	testl	%r15d, %r15d
	jne	LBB0_2
## %bb.1:
	movl	$1, %edi
	callq	_BIT
	movl	%eax, %ecx
LBB0_2:
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_ov2680_mod_reg
	movl	%eax, %ebx
	sarl	$31, %ebx
	andl	%eax, %ebx
	testl	%r15d, %r15d
	jne	LBB0_6
## %bb.3:
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:
	movq	(%r14), %rax
	xorl	%ebx, %ebx
	cmpl	$0, 4(%rax)
	je	LBB0_6
## %bb.5:
	movl	(%rax), %edx
	movq	_OV2680_REG_GAIN_PK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ov2680_write_reg16
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OV2680_REG_R_MANUAL,4,2        ## @OV2680_REG_R_MANUAL
	.comm	_OV2680_REG_GAIN_PK,4,2         ## @OV2680_REG_GAIN_PK
	.no_dead_strip	_ov2680_gain_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov2680_gain_set
_ov2680_gain_set:                       ; @ov2680_gain_set
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _OV2680_REG_R_MANUAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OV2680_REG_R_MANUAL@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	w0, #1
	bl	_BIT
	mov	x22, x0
	cbz	w20, LBB0_2
; %bb.1:
	mov	w3, #0
	b	LBB0_3
LBB0_2:
	mov	w0, #1
	bl	_BIT
	mov	x3, x0
LBB0_3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_ov2680_mod_reg
	mov	x8, x0
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	cbnz	w20, LBB0_8
; %bb.4:
	tbnz	w8, #31, LBB0_8
; %bb.5:
	ldr	x8, [x19]
	ldr	w9, [x8, #4]
	cbz	w9, LBB0_7
; %bb.6:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _OV2680_REG_GAIN_PK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OV2680_REG_GAIN_PK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ov2680_write_reg16
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_OV2680_REG_R_MANUAL,4,2        ; @OV2680_REG_R_MANUAL
	.comm	_OV2680_REG_GAIN_PK,4,2         ; @OV2680_REG_GAIN_PK
	.no_dead_strip	_ov2680_gain_set
.subsections_via_symbols
