	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_autogain
_do_autogain:                           ## @do_autogain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	addq	$16, %rdi
	callq	_atomic_read
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.1:
	movq	8(%rbx), %rcx
	testq	%rcx, %rcx
	jle	LBB0_3
## %bb.2:
	decq	%rcx
	jmp	LBB0_5
LBB0_3:
	movl	$270, %edx                      ## imm = 0x10E
	addl	(%rbx), %edx
	movq	_GAIN_KNEE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_EXPOSURE_KNEE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$30, %ecx
	callq	_gspca_auto_gain_n_exposure
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	_PAC_AUTOGAIN_IGNORE_FRAMES@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_5:
	movq	%rcx, 8(%rbx)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GAIN_KNEE,4,2                  ## @GAIN_KNEE
	.comm	_EXPOSURE_KNEE,4,2              ## @EXPOSURE_KNEE
	.comm	_PAC_AUTOGAIN_IGNORE_FRAMES,8,3 ## @PAC_AUTOGAIN_IGNORE_FRAMES
	.no_dead_strip	_do_autogain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_autogain
_do_autogain:                           ; @do_autogain
	.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
	add	x0, x0, #16
	bl	_atomic_read
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.1:
	ldr	x8, [x19, #8]
	subs	x8, x8, #1
	b.ge	LBB0_4
; %bb.2:
	mov	x1, x0
	ldr	w8, [x19]
	add	w2, w8, #270
Lloh0:
	adrp	x8, _GAIN_KNEE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GAIN_KNEE@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
Lloh3:
	adrp	x8, _EXPOSURE_KNEE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXPOSURE_KNEE@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
	mov	x0, x19
	mov	w3, #30
	bl	_gspca_auto_gain_n_exposure
	cbz	x0, LBB0_5
; %bb.3:
Lloh6:
	adrp	x8, _PAC_AUTOGAIN_IGNORE_FRAMES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAC_AUTOGAIN_IGNORE_FRAMES@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
LBB0_4:
	str	x8, [x19, #8]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GAIN_KNEE,4,2                  ; @GAIN_KNEE
	.comm	_EXPOSURE_KNEE,4,2              ; @EXPOSURE_KNEE
	.comm	_PAC_AUTOGAIN_IGNORE_FRAMES,8,3 ; @PAC_AUTOGAIN_IGNORE_FRAMES
	.no_dead_strip	_do_autogain
.subsections_via_symbols
