	.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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	callq	_v4l2_ctrl_g_ctrl
	movq	%rax, %r14
	movq	_MIN_AVG_LUM@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jle	LBB0_3
## %bb.1:
	movq	(%r15), %rdi
	cmpq	(%rdi), %r14
	jge	LBB0_3
## %bb.2:
	leaq	1(%r14), %rsi
	callq	_v4l2_ctrl_s_ctrl
LBB0_3:
	movq	_MAX_AVG_LUM@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jge	LBB0_5
## %bb.4:
	movq	(%r15), %rdi
	cmpq	8(%rdi), %r14
	jle	LBB0_5
## %bb.6:
	decq	%r14
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_v4l2_ctrl_s_ctrl               ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	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	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	x21, x1
	mov	x20, x0
	ldr	x0, [x0]
	bl	_v4l2_ctrl_g_ctrl
	mov	x19, x0
Lloh0:
	adrp	x8, _MIN_AVG_LUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MIN_AVG_LUM@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x21
	b.le	LBB0_3
; %bb.1:
	ldr	x0, [x20]
	ldr	x8, [x0]
	cmp	x19, x8
	b.ge	LBB0_3
; %bb.2:
	add	x1, x19, #1
	bl	_v4l2_ctrl_s_ctrl
LBB0_3:
Lloh3:
	adrp	x8, _MAX_AVG_LUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_AVG_LUM@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ge	LBB0_6
; %bb.4:
	ldr	x0, [x20]
	ldr	x8, [x0, #8]
	cmp	x19, x8
	b.le	LBB0_6
; %bb.5:
	sub	x1, x19, #1
	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
	b	_v4l2_ctrl_s_ctrl
LBB0_6:
	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	_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
