	.file	"extr_bttv-driver.c_audio_mux_gpio.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	audio_mux_gpio, @function
audio_mux_gpio:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	rcx, QWORD PTR bttv_tvcards[rip]
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR [rdi]
	movsx	rbx, esi
	lea	rax, [rax+rax*2]
	lea	rax, [rcx+rax*8]
	mov	edi, DWORD PTR 16[rax]
	mov	esi, edi
	call	gpio_inout@PLT
	mov	edi, DWORD PTR BT848_DSTATUS[rip]
	call	btread@PLT
	test	r12d, r12d
	jne	.L2
	cmp	QWORD PTR 16[rbp], 0
	je	.L3
	test	DWORD PTR BT848_DSTATUS_HLOC[rip], eax
	jne	.L16
.L4:
	mov	eax, DWORD PTR 8[rbp]
	test	eax, eax
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR bttv_tvcards[rip]
	mov	r12d, 1
	lea	rcx, [rax+rax*2]
	mov	esi, DWORD PTR [rdx+rcx*8]
	lea	rcx, -128[rax]
	cmp	rcx, 1
	jbe	.L17
.L6:
	lea	rax, [rax+rax*2]
	mov	edi, DWORD PTR 16[rdx+rax*8]
	call	gpio_bits@PLT
	cmp	QWORD PTR bttv_gpio[rip], 0
	je	.L1
.L18:
	sal	rbx, 2
	mov	eax, 16
	test	r12d, r12d
	mov	rdi, rbp
	cmovne	rbx, rax
	mov	rax, QWORD PTR audio_modes[rip]
	mov	esi, DWORD PTR [rax+rbx]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	bttv_gpio_tracking@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	edx, DWORD PTR 12[rbp]
	test	edx, edx
	je	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR bttv_tvcards[rip]
	movsx	rcx, ebx
	lea	rsi, [rax+rax*2]
	mov	rsi, QWORD PTR 8[rdx+rsi*8]
	mov	esi, DWORD PTR [rsi+rcx*4]
	lea	rcx, -128[rax]
	cmp	rcx, 1
	ja	.L6
.L17:
	mov	rdi, rbp
	call	bttv_tda9880_setnorm@PLT
	cmp	QWORD PTR bttv_gpio[rip], 0
	jne	.L18
.L1:
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	audio_mux_gpio, .-audio_mux_gpio
	.comm	bttv_tvcards,8,8
	.comm	bttv_gpio,8,8
	.comm	audio_modes,8,8
	.comm	BT848_DSTATUS_HLOC,4,4
	.comm	BT848_DSTATUS,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_bttv-driver.c_audio_mux_gpio.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	audio_mux_gpio, %function
audio_mux_gpio:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r2
	ldr	r7, .L24
	ldr	r3, [r0]
	mov	r4, r0
	ldr	r0, [r7]
	add	r3, r3, r3, lsl #1
	add	r3, r0, r3, lsl #2
	ldr	r3, [r3, #8]
	mov	r6, r1
	mov	r0, r3
	mov	r1, r3
	bl	gpio_inout
	ldr	r3, .L24+4
	ldr	r0, [r3]
	bl	btread
	cmp	r5, #0
	bne	.L2
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L24+8
	ldr	r3, [r3]
	tst	r0, r3
	bne	.L22
.L4:
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bne	.L3
.L2:
	mov	r5, #1
	ldr	r3, [r4]
	ldr	r2, [r7]
	sub	r0, r3, #128
	add	r1, r3, r3, lsl r5
	cmp	r0, #1
	ldr	r1, [r2, r1, lsl #2]
	lsl	r2, r3, r5
	bls	.L23
.L6:
	ldr	r0, [r7]
	add	r3, r2, r3
	add	r3, r0, r3, lsl #2
	ldr	r0, [r3, #8]
	bl	gpio_bits
.L7:
	ldr	r3, .L24+12
	ldr	r3, [r3]
	cmp	r3, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	cmp	r5, #0
	movne	r6, #16
	ldr	r3, .L24+16
	lsleq	r6, r6, #2
	ldr	r3, [r3]
	mov	r0, r4
	ldr	r1, [r3, r6]
	pop	{r4, r5, r6, r7, r8, lr}
	b	bttv_gpio_tracking
.L22:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L4
.L3:
	ldr	r3, [r4]
	ldr	r2, [r7]
	add	r1, r3, r3, lsl #1
	add	r2, r2, r1, lsl #2
	ldr	r1, [r2, #4]
	sub	r0, r3, #128
	cmp	r0, #1
	ldr	r1, [r1, r6, lsl #2]
	lsl	r2, r3, #1
	bhi	.L6
.L23:
	mov	r0, r4
	bl	bttv_tda9880_setnorm
	b	.L7
.L25:
	.align	2
.L24:
	.word	bttv_tvcards
	.word	BT848_DSTATUS
	.word	BT848_DSTATUS_HLOC
	.word	bttv_gpio
	.word	audio_modes
	.size	audio_mux_gpio, .-audio_mux_gpio
	.comm	bttv_tvcards,4,4
	.comm	bttv_gpio,4,4
	.comm	audio_modes,4,4
	.comm	BT848_DSTATUS_HLOC,4,4
	.comm	BT848_DSTATUS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
