	.file	"extr_firedtv-avc.c_avc_ca_info.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	avc_ca_info
	.type	avc_ca_info, @function
avc_ca_info:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	r15, 8[rdi]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r12, QWORD PTR 16[rdi]
	mov	rdi, r15
	call	mutex_lock@PLT
	mov	eax, DWORD PTR AVC_CTYPE_STATUS[rip]
	mov	esi, 6
	mov	rdx, QWORD PTR SFE_VENDOR_DE_COMPANYID_0[rip]
	mov	rdi, r12
	mov	DWORD PTR 20[r12], eax
	mov	eax, DWORD PTR 0[rbp]
	or	eax, DWORD PTR AVC_SUBUNIT_TYPE_TUNER[rip]
	mov	DWORD PTR [r12], eax
	mov	eax, DWORD PTR AVC_OPCODE_VENDOR[rip]
	mov	DWORD PTR 16[r12], eax
	mov	rax, QWORD PTR 8[r12]
	mov	QWORD PTR [rax], rdx
	mov	rdx, QWORD PTR SFE_VENDOR_DE_COMPANYID_1[rip]
	mov	QWORD PTR 32[rax], 0
	mov	QWORD PTR 8[rax], rdx
	mov	rdx, QWORD PTR SFE_VENDOR_DE_COMPANYID_2[rip]
	mov	QWORD PTR 16[rax], rdx
	mov	rdx, QWORD PTR SFE_VENDOR_OPCODE_CA2HOST[rip]
	mov	QWORD PTR 24[rax], rdx
	mov	rdx, QWORD PTR SFE_VENDOR_TAG_CA_APPLICATION_INFO[rip]
	mov	QWORD PTR 40[rax], rdx
	mov	edx, DWORD PTR LAST_OPERAND[rip]
	call	clear_operands@PLT
	mov	DWORD PTR 4[rbp], 12
	mov	rdi, rbp
	call	avc_write@PLT
	mov	r14d, eax
	test	eax, eax
	js	.L2
	mov	rdi, r12
	call	get_ca_object_pos@PLT
	movsx	edx, WORD PTR EN50221_TAG_CA_INFO[rip+2]
	mov	BYTE PTR [rbx], dl
	mov	edx, DWORD PTR EN50221_TAG_CA_INFO[rip]
	mov	BYTE PTR 1[rbx], dh
	mov	edx, DWORD PTR EN50221_TAG_CA_INFO[rip]
	mov	BYTE PTR 2[rbx], dl
	mov	edx, DWORD PTR num_fake_ca_system_ids[rip]
	test	edx, edx
	je	.L10
	add	edx, edx
	mov	BYTE PTR 3[rbx], dl
	mov	eax, DWORD PTR num_fake_ca_system_ids[rip]
	test	eax, eax
	jle	.L5
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdx, QWORD PTR fake_ca_system_ids[rip]
	mov	edx, DWORD PTR [rdx+rax*4]
	mov	BYTE PTR 4[rbx+rax*2], dh
	mov	rdx, QWORD PTR fake_ca_system_ids[rip]
	mov	edx, DWORD PTR [rdx+rax*4]
	mov	BYTE PTR 5[rbx+rax*2], dl
	add	rax, 1
	cmp	DWORD PTR num_fake_ca_system_ids[rip], eax
	jg	.L6
	movsx	eax, BYTE PTR 3[rbx]
	add	eax, 4
	mov	DWORD PTR 0[r13], eax
.L2:
	mov	rdi, r15
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	BYTE PTR 3[rbx], 2
	mov	rdx, QWORD PTR [r12]
	cdqe
	movzx	edx, BYTE PTR [rdx+rax]
	mov	BYTE PTR 4[rbx], dl
	mov	rdx, QWORD PTR [r12]
	movzx	eax, BYTE PTR 1[rdx+rax]
	mov	BYTE PTR 5[rbx], al
	mov	eax, 6
.L4:
	mov	DWORD PTR 0[r13], eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	movsx	edx, dl
	lea	eax, 4[rdx]
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	avc_ca_info, .-avc_ca_info
	.comm	num_fake_ca_system_ids,4,4
	.comm	fake_ca_system_ids,8,8
	.comm	SFE_VENDOR_TAG_CA_APPLICATION_INFO,8,8
	.comm	SFE_VENDOR_OPCODE_CA2HOST,8,8
	.comm	SFE_VENDOR_DE_COMPANYID_2,8,8
	.comm	SFE_VENDOR_DE_COMPANYID_1,8,8
	.comm	SFE_VENDOR_DE_COMPANYID_0,8,8
	.comm	LAST_OPERAND,4,4
	.comm	EN50221_TAG_CA_INFO,4,4
	.comm	AVC_SUBUNIT_TYPE_TUNER,4,4
	.comm	AVC_OPCODE_VENDOR,4,4
	.comm	AVC_CTYPE_STATUS,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_firedtv-avc.c_avc_ca_info.c"
	.text
	.align	2
	.global	avc_ca_info
	.syntax unified
	.arm
	.fpu softvfp
	.type	avc_ca_info, %function
avc_ca_info:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	mov	r4, #0
	add	r8, r0, #8
	mov	r0, r8
	ldr	r9, [r5, #12]
	mov	r6, r1
	mov	r7, r2
	bl	mutex_lock
	ldr	r0, .L11
	ldr	r1, .L11+4
	ldr	r2, .L11+8
	ldr	r3, .L11+12
	ldr	ip, [r0]
	ldr	r3, [r3]
	ldr	r0, [r1]
	ldr	r1, [r2]
	ldr	r2, [r5]
	str	ip, [r9, #12]
	orr	r2, r2, r3
	ldr	r3, [r9, #4]
	str	r2, [r9]
	ldr	r2, .L11+16
	str	r0, [r9, #8]
	str	r1, [r3]
	ldr	r2, [r2]
	ldr	ip, .L11+20
	ldr	r0, .L11+24
	ldr	r1, .L11+28
	ldr	ip, [ip]
	ldr	r0, [r0]
	ldr	r1, [r1]
	str	r2, [r3, #8]
	ldr	r2, .L11+32
	str	ip, [r3, #4]
	str	r0, [r3, #12]
	str	r1, [r3, #20]
	ldr	r2, [r2]
	mov	r1, #6
	str	r4, [r3, #16]
	mov	r0, r9
	bl	clear_operands
	mov	r3, #12
	mov	r0, r5
	str	r3, [r5, #4]
	bl	avc_write
	subs	r5, r0, #0
	blt	.L2
	mov	r0, r9
	bl	get_ca_object_pos
	ldr	r3, .L11+36
	ldr	lr, .L11+40
	ldrsh	r2, [r3, #2]
	strb	r2, [r6]
	ldr	r2, [r3]
	asr	r2, r2, #8
	strb	r2, [r6, #1]
	ldr	r3, [r3]
	strb	r3, [r6, #2]
	ldr	r3, [lr]
	cmp	r3, r4
	beq	.L10
	lsl	r3, r3, #1
	and	r3, r3, #255
	strb	r3, [r6, #3]
	ldr	r2, [lr]
	cmp	r2, #0
	ble	.L5
	ldr	r2, .L11+44
	mov	r3, r4
	add	r0, r6, #5
	add	r4, r6, #4
.L6:
	ldr	r1, [r2]
	ldr	ip, [r1, r3, lsl #2]
	asr	ip, ip, #8
	strb	ip, [r4, r3, lsl #1]
	ldr	r1, [r2]
	ldr	r1, [r1, r3, lsl #2]
	strb	r1, [r0, r3, lsl #1]
	ldr	r1, [lr]
	add	r3, r3, #1
	cmp	r1, r3
	bgt	.L6
	ldrb	r3, [r6, #3]	@ zero_extendqisi2
	add	r3, r3, #4
	str	r3, [r7]
.L2:
	mov	r0, r8
	bl	mutex_unlock
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	mov	r3, #2
	strb	r3, [r6, #3]
	mov	r3, #6
	ldr	r2, [r9]
	ldrb	r2, [r2, r0]	@ zero_extendqisi2
	strb	r2, [r6, #4]
	ldr	r2, [r9]
	add	r0, r2, r0
	ldrb	r2, [r0, #1]	@ zero_extendqisi2
	strb	r2, [r6, #5]
.L4:
	str	r3, [r7]
	b	.L2
.L5:
	add	r3, r3, #4
	b	.L4
.L12:
	.align	2
.L11:
	.word	AVC_CTYPE_STATUS
	.word	AVC_OPCODE_VENDOR
	.word	SFE_VENDOR_DE_COMPANYID_0
	.word	AVC_SUBUNIT_TYPE_TUNER
	.word	SFE_VENDOR_DE_COMPANYID_2
	.word	SFE_VENDOR_DE_COMPANYID_1
	.word	SFE_VENDOR_OPCODE_CA2HOST
	.word	SFE_VENDOR_TAG_CA_APPLICATION_INFO
	.word	LAST_OPERAND
	.word	EN50221_TAG_CA_INFO
	.word	num_fake_ca_system_ids
	.word	fake_ca_system_ids
	.size	avc_ca_info, .-avc_ca_info
	.comm	num_fake_ca_system_ids,4,4
	.comm	fake_ca_system_ids,4,4
	.comm	SFE_VENDOR_TAG_CA_APPLICATION_INFO,4,4
	.comm	SFE_VENDOR_OPCODE_CA2HOST,4,4
	.comm	SFE_VENDOR_DE_COMPANYID_2,4,4
	.comm	SFE_VENDOR_DE_COMPANYID_1,4,4
	.comm	SFE_VENDOR_DE_COMPANYID_0,4,4
	.comm	LAST_OPERAND,4,4
	.comm	EN50221_TAG_CA_INFO,4,4
	.comm	AVC_SUBUNIT_TYPE_TUNER,4,4
	.comm	AVC_OPCODE_VENDOR,4,4
	.comm	AVC_CTYPE_STATUS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
