	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pb0100_set_autogain
_pb0100_set_autogain:                   ## @pb0100_set_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r13
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	movq	(%r13), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movl	$6, %edi
	callq	_BIT
	movl	%eax, %ebx
	movl	$4, %edi
	callq	_BIT
	movl	%eax, %r15d
	orl	%ebx, %r15d
	xorl	%edi, %edi
	callq	_BIT
	movl	%eax, %r12d
	jmp	LBB0_5
LBB0_1:
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_4:
	movl	$4, %edi
	callq	_BIT
	movl	%eax, %r12d
	xorl	%edi, %edi
	callq	_BIT
	movl	%eax, %r15d
LBB0_5:
	orl	%r15d, %r12d
LBB0_6:
	movq	_PB_EXPGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_stv06xx_write_sensor
	movl	%eax, %ebx
	movq	_D_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r13), %rax
	movq	(%rax), %r8
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r12d, %ecx
	movl	%ebx, %r9d
	callq	_gspca_dbg
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PB_EXPGAIN,4,2                 ## @PB_EXPGAIN
	.comm	_D_CONF,4,2                     ## @D_CONF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set autogain to %d (natural: %d), status: %d\n"

	.no_dead_strip	_pb0100_set_autogain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pb0100_set_autogain
_pb0100_set_autogain:                   ; @pb0100_set_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	x19, x0
	ldr	x22, [x0]
	cbz	w1, LBB0_3
; %bb.1:
	ldr	x8, [x22]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
	mov	w0, #6
	bl	_BIT
	mov	x20, x0
	mov	w0, #4
	bl	_BIT
	orr	w21, w0, w20
	mov	w0, #0
	bl	_BIT
	mov	x20, x0
	b	LBB0_5
LBB0_3:
	mov	w20, #0
	b	LBB0_6
LBB0_4:
	mov	w0, #4
	bl	_BIT
	mov	x20, x0
	mov	w0, #0
	bl	_BIT
	mov	x21, x0
LBB0_5:
	orr	w20, w21, w20
LBB0_6:
Lloh0:
	adrp	x8, _PB_EXPGAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PB_EXPGAIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_stv06xx_write_sensor
	mov	x21, x0
Lloh3:
	adrp	x8, _D_CONF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D_CONF@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x8, [x22]
	ldr	x4, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	mov	x5, x21
	bl	_gspca_dbg
	mov	x0, x21
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PB_EXPGAIN,4,2                 ; @PB_EXPGAIN
	.comm	_D_CONF,4,2                     ; @D_CONF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set autogain to %d (natural: %d), status: %d\n"

	.no_dead_strip	_pb0100_set_autogain
.subsections_via_symbols
