	.file	"extr_cx25840-audio.c_cx25840_audio_s_ctrl.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cx25840_audio_s_ctrl, @function
cx25840_audio_s_ctrl:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	to_sd@PLT
	mov	rbp, rax
	mov	rdi, rax
	call	to_state@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	v4l2_get_subdevdata@PLT
	mov	edx, DWORD PTR [rbx]
	mov	rdi, rax
	cmp	edx, 130
	je	.L2
	jg	.L3
	cmp	edx, 128
	je	.L4
	cmp	edx, 129
	jne	.L6
	mov	eax, DWORD PTR 4[rbx]
	mov	edx, -64
	mov	esi, 2267
	xor	r13d, r13d
	lea	ecx, [rax+rax*2]
	sal	ecx, 4
	movsx	rax, ecx
	imul	rax, rax, -2147450879
	shr	rax, 32
	add	eax, ecx
	sar	ecx, 31
	sar	eax, 15
	sub	ecx, eax
	add	ecx, 48
	call	cx25840_and_or@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	cmp	edx, 131
	jne	.L6
	mov	esi, DWORD PTR 4[rbx]
	xor	r13d, r13d
	call	set_balance@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR 4[rbx]
	mov	edx, -64
	mov	esi, 2265
	xor	r13d, r13d
	lea	ecx, [rax+rax*2]
	sal	ecx, 4
	movsx	rax, ecx
	imul	rax, rax, -2147450879
	shr	rax, 32
	add	eax, ecx
	sar	ecx, 31
	sar	eax, 15
	sub	ecx, eax
	add	ecx, 48
	call	cx25840_and_or@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	r13d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r13d
	pop	r12
	.cfi_def_cfa_offset 16
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[r12]
	mov	r13d, DWORD PTR [rax]
	test	r13d, r13d
	je	.L8
	xor	esi, esi
	xor	r13d, r13d
	call	set_volume@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rax, QWORD PTR [r12]
	mov	esi, DWORD PTR [rax]
	call	set_volume@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	cx25840_audio_s_ctrl, .-cx25840_audio_s_ctrl
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cx25840-audio.c_cx25840_audio_s_ctrl.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cx25840_audio_s_ctrl, %function
cx25840_audio_s_ctrl:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	to_sd
	mov	r5, r0
	bl	to_state
	mov	r3, r0
	mov	r0, r5
	mov	r5, r3
	bl	v4l2_get_subdevdata
	ldr	r3, [r4]
	sub	r3, r3, #128
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L3:
	ldr	r1, [r4, #4]
	bl	set_balance
	mov	r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L5:
	ldr	r3, [r4, #4]
	mov	r4, #0
	ldr	r2, .L12
	add	r3, r3, r3, lsl #1
	lsl	r3, r3, #4
	smull	r1, r2, r3, r2
	asr	r1, r3, #31
	add	r3, r2, r3
	sub	r3, r1, r3, asr #15
	mvn	r2, #63
	ldr	r1, .L12+4
	add	r3, r3, #48
	bl	cx25840_and_or
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L6:
	ldr	r3, [r4, #4]
	mov	r4, #0
	ldr	r2, .L12
	add	r3, r3, r3, lsl #1
	lsl	r3, r3, #4
	smull	r1, r2, r3, r2
	asr	r1, r3, #31
	add	r3, r2, r3
	sub	r3, r1, r3, asr #15
	mvn	r2, #63
	ldr	r1, .L12+8
	add	r3, r3, #48
	bl	cx25840_and_or
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L7:
	ldr	r3, [r5, #4]
	ldr	r4, [r3]
	cmp	r4, #0
	beq	.L8
	mov	r4, #0
	mov	r1, #0
	bl	set_volume
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r3, [r5]
	ldr	r1, [r3]
	bl	set_volume
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r3, .L12+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L13:
	.align	2
.L12:
	.word	-2147450879
	.word	2265
	.word	2267
	.word	EINVAL
	.size	cx25840_audio_s_ctrl, .-cx25840_audio_s_ctrl
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
