	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setbgain
_setbgain:                              ## @setbgain
	.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	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	%edx, %eax
	imull	%esi, %eax
	movq	_GAIN_MAX@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	cltd
	idivl	%ecx
	addl	%ebx, %eax
	cmpl	%ecx, %eax
	jle	LBB0_2
## %bb.1:
	movq	_D_STREAM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_gspca_dbg
	movl	(%r12), %eax
LBB0_2:
	movl	%eax, %edi
	callq	_gainify
	movl	%eax, %ebx
	movq	_D_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG_BLUE_GAIN@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %r8d
	movl	%r14d, %r9d
	xorl	%eax, %eax
	callq	_gspca_dbg
	movl	(%r12), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_reg_w                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GAIN_MAX,4,2                   ## @GAIN_MAX
	.comm	_D_STREAM,4,2                   ## @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Truncating blue 0x%04X w/ value 0x%04X\n\n"

L_.str.1:                               ## @.str.1
	.asciz	"gain B (0x%04X): 0x%04X w/ source 0x%04X\n\n"

	.comm	_REG_BLUE_GAIN,4,2              ## @REG_BLUE_GAIN
	.no_dead_strip	_setbgain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setbgain
_setbgain:                              ; @setbgain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mul	w8, w2, w1
Lloh0:
	adrp	x21, _GAIN_MAX@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GAIN_MAX@GOTPAGEOFF]
	ldr	w3, [x21]
	sdiv	w8, w8, w3
	add	w4, w8, w2
	cmp	w4, w3
Lloh2:
	adrp	x22, _D_STREAM@GOTPAGE
Lloh3:
	ldr	x22, [x22, _D_STREAM@GOTPAGEOFF]
	b.le	LBB0_2
; %bb.1:
	ldr	w1, [x22]
Lloh4:
	adrp	x2, l_.str@PAGE
Lloh5:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
	ldr	w4, [x21]
LBB0_2:
	mov	x0, x4
	bl	_gainify
	mov	x21, x0
	ldr	w1, [x22]
Lloh6:
	adrp	x22, _REG_BLUE_GAIN@GOTPAGE
Lloh7:
	ldr	x22, [x22, _REG_BLUE_GAIN@GOTPAGEOFF]
	ldr	w3, [x22]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	str	x20, [sp]
	mov	x0, x19
	mov	x4, x21
	bl	_gspca_dbg
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_reg_w
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GAIN_MAX,4,2                   ; @GAIN_MAX
	.comm	_D_STREAM,4,2                   ; @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Truncating blue 0x%04X w/ value 0x%04X\n\n"

l_.str.1:                               ; @.str.1
	.asciz	"gain B (0x%04X): 0x%04X w/ source 0x%04X\n\n"

	.comm	_REG_BLUE_GAIN,4,2              ; @REG_BLUE_GAIN
	.no_dead_strip	_setbgain
.subsections_via_symbols
