	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gspca_expo_autogain            ## -- Begin function gspca_expo_autogain
	.p2align	4, 0x90
_gspca_expo_autogain:                   ## @gspca_expo_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	16(%rdi), %rdi
	callq	_v4l2_ctrl_g_ctrl
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	8(%r15), %rdi
	callq	_v4l2_ctrl_g_ctrl
	movq	%rax, %r12
	movq	(%r15), %rdi
	callq	_v4l2_ctrl_g_ctrl
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%r14d, %ecx
	subl	%r13d, %ecx
	movl	%ecx, %eax
	negl	%eax
	cmovsl	%ecx, %eax
	cltd
	idivl	%ebx
	movl	%eax, %ebx
	movq	_D_FRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%r13d, %ecx
	movl	%r14d, %r8d
	movl	%ebx, %r9d
	xorl	%eax, %eax
	callq	_gspca_dbg
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.2:
	movq	%r12, %rax
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r15d
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movl	%r8d, %r12d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_7
LBB0_3:
	xorl	%eax, %eax
	jmp	LBB0_31
LBB0_4:                                 ##   in Loop: Header=BB0_7 Depth=1
	cmpl	8(%rax), %r15d
	jge	LBB0_24
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_7 Depth=1
	incl	%r15d
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	decl	%ebx
	je	LBB0_24
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r13d, %r14d
	jge	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%esi, %r15d
	jle	LBB0_13
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	decl	%r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%rdi), %rax
	cmpl	(%rax), %r15d
	jl	LBB0_5
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%edx, %r12d
	jge	LBB0_15
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	incl	%r12d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%edx, %r12d
	jle	LBB0_18
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	decl	%r12d
	jmp	LBB0_6
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%esi, %r15d
	jl	LBB0_5
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rdi), %rcx
	cmpl	8(%rcx), %r12d
	jge	LBB0_4
	jmp	LBB0_12
LBB0_18:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%rdi), %rax
	cmpl	(%rax), %r15d
	jg	LBB0_9
## %bb.20:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rdi), %rcx
	cmpl	4(%rcx), %r12d
	jg	LBB0_14
## %bb.22:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	4(%rax), %r15d
	jg	LBB0_9
LBB0_24:
	cmpl	-64(%rbp), %r15d                ## 4-byte Folded Reload
	je	LBB0_26
## %bb.25:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movl	%r15d, %esi
	movq	%r8, %rbx
	callq	_v4l2_ctrl_s_ctrl
	movq	%rbx, %r8
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_26:
	cmpl	%r8d, %r12d
	jne	LBB0_29
## %bb.27:
	cmpl	-64(%rbp), %r15d                ## 4-byte Folded Reload
	movl	$0, %eax
	jne	LBB0_30
	jmp	LBB0_31
LBB0_29:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movl	%r12d, %esi
	callq	_v4l2_ctrl_s_ctrl
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_30:
	movq	_D_FRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_gspca_dbg
	movl	$1, %eax
LBB0_31:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D_FRAM,4,2                     ## @D_FRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"autogain: lum: %d, desired: %d, steps: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"autogain: changed gain: %d, expo: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gspca_expo_autogain            ; -- Begin function gspca_expo_autogain
	.p2align	2
_gspca_expo_autogain:                   ; @gspca_expo_autogain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x5
	mov	x22, x4
	mov	x26, x3
	mov	x24, x2
	mov	x25, x1
	mov	x19, x0
	ldr	x0, [x0, #16]
	bl	_v4l2_ctrl_g_ctrl
	cbz	x0, LBB0_26
; %bb.1:
	ldr	x0, [x19, #8]
	bl	_v4l2_ctrl_g_ctrl
	mov	x20, x0
	ldr	x0, [x19]
	bl	_v4l2_ctrl_g_ctrl
	mov	x23, x0
	subs	w8, w24, w25
	cneg	w8, w8, mi
Lloh0:
	adrp	x9, _D_FRAM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _D_FRAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	sdiv	w28, w8, w26
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	str	x28, [sp]
	mov	x0, x19
	mov	x3, x25
	mov	x4, x24
	bl	_gspca_dbg
	cmp	w28, #1
	b.lt	LBB0_23
; %bb.2:
	mov	x26, x20
	mov	x27, x23
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x8, #8]
	cmp	w26, w8
	b.ge	LBB0_19
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w26, w26, #1
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	subs	w28, w28, #1
	b.eq	LBB0_19
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w24, w25
	b.ge	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w26, w22
	b.le	LBB0_12
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	sub	w26, w26, #1
	b	LBB0_5
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	cmp	w26, w9
	b.lt	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	w27, w21
	b.ge	LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w27, w27, #1
	b	LBB0_5
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w27, w21
	b.le	LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	w27, w27, #1
	b	LBB0_5
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w26, w22
	b.lt	LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x19]
	ldr	w9, [x9, #8]
	cmp	w27, w9
	b.ge	LBB0_3
	b	LBB0_11
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	cmp	w26, w9
	b.gt	LBB0_8
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x19]
	ldr	w9, [x9, #4]
	cmp	w27, w9
	b.gt	LBB0_13
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x8, #4]
	cmp	w26, w8
	b.gt	LBB0_8
LBB0_19:
	cmp	w26, w20
	b.eq	LBB0_21
; %bb.20:
	ldr	x0, [x19, #8]
	mov	x1, x26
	bl	_v4l2_ctrl_s_ctrl
LBB0_21:
	cmp	w27, w23
	b.ne	LBB0_24
; %bb.22:
	cmp	w26, w20
	b.ne	LBB0_25
LBB0_23:
	mov	w0, #0
	b	LBB0_26
LBB0_24:
	ldr	x0, [x19]
	mov	x1, x27
	bl	_v4l2_ctrl_s_ctrl
LBB0_25:
Lloh5:
	adrp	x8, _D_FRAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _D_FRAM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x26
	mov	x4, x27
	bl	_gspca_dbg
	mov	w0, #1
LBB0_26:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_D_FRAM,4,2                     ; @D_FRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"autogain: lum: %d, desired: %d, steps: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"autogain: changed gain: %d, expo: %d\n"

.subsections_via_symbols
