	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pb0100_set_gain
_pb0100_set_gain:                       ## @pb0100_set_gain
	.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	%esi, %r15d
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movq	_PB_G1GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	callq	_stv06xx_write_sensor
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movq	_D_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	callq	_gspca_dbg
	jmp	LBB0_4
LBB0_2:
	movq	_PB_G2GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_stv06xx_write_sensor
	movl	%eax, %ebx
	movq	_D_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	callq	_gspca_dbg
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.3:
	movq	8(%r12), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pb0100_set_red_balance
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%r12), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pb0100_set_blue_balance        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PB_G1GAIN,4,2                  ## @PB_G1GAIN
	.comm	_PB_G2GAIN,4,2                  ## @PB_G2GAIN
	.comm	_D_CONF,4,2                     ## @D_CONF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set green gain to %d, status: %d\n"

	.no_dead_strip	_pb0100_set_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pb0100_set_gain
_pb0100_set_gain:                       ; @pb0100_set_gain
	.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	x20, x1
	mov	x19, x0
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _PB_G1GAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PB_G1GAIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_stv06xx_write_sensor
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x8, _D_CONF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D_CONF@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	mov	x4, x21
	bl	_gspca_dbg
	b	LBB0_4
LBB0_2:
Lloh8:
	adrp	x8, _PB_G2GAIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PB_G2GAIN@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_stv06xx_write_sensor
	mov	x21, x0
Lloh11:
	adrp	x8, _D_CONF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _D_CONF@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	mov	x4, x21
	bl	_gspca_dbg
	cbnz	w21, LBB0_4
; %bb.3:
	ldr	x8, [x22, #8]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pb0100_set_red_balance
	mov	x21, x0
	cbz	w0, LBB0_5
LBB0_4:
	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
LBB0_5:
	ldr	x8, [x22]
	ldr	w1, [x8]
	mov	x0, x19
	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	_pb0100_set_blue_balance
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PB_G1GAIN,4,2                  ; @PB_G1GAIN
	.comm	_PB_G2GAIN,4,2                  ; @PB_G2GAIN
	.comm	_D_CONF,4,2                     ; @D_CONF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set green gain to %d, status: %d\n"

	.no_dead_strip	_pb0100_set_gain
.subsections_via_symbols
