	.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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_MIN_AVG_LUM@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jle	LBB0_3
## %bb.1:
	movl	(%r14), %eax
	cmpl	$27, %eax
	jg	LBB0_3
## %bb.2:
	incl	%eax
	movl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_set_gain
LBB0_3:
	movq	_MAX_AVG_LUM@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jge	LBB0_5
## %bb.4:
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.6:
	decl	%eax
	movl	%eax, (%r14)
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_set_gain                       ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIN_AVG_LUM,8,3                ## @MIN_AVG_LUM
	.comm	_MAX_AVG_LUM,8,3                ## @MAX_AVG_LUM
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _MIN_AVG_LUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MIN_AVG_LUM@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.le	LBB0_3
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #27
	b.gt	LBB0_3
; %bb.2:
	add	w8, w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_set_gain
LBB0_3:
Lloh3:
	adrp	x8, _MAX_AVG_LUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_AVG_LUM@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ge	LBB0_6
; %bb.4:
	ldr	w8, [x19]
	subs	w8, w8, #1
	b.lt	LBB0_6
; %bb.5:
	str	w8, [x19]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_set_gain
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MIN_AVG_LUM,8,3                ; @MIN_AVG_LUM
	.comm	_MAX_AVG_LUM,8,3                ; @MAX_AVG_LUM
	.no_dead_strip	_do_autogain
.subsections_via_symbols
