	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avc_ca_info                    ## -- Begin function avc_ca_info
	.p2align	4, 0x90
_avc_ca_info:                           ## @avc_ca_info
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	16(%rdi), %r12
	leaq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_AVC_CTYPE_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r12)
	movq	_AVC_SUBUNIT_TYPE_TUNER@GOTPCREL(%rip), %rax
	movl	(%r13), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r12)
	movq	_AVC_OPCODE_VENDOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movq	_SFE_VENDOR_DE_COMPANYID_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r12), %rcx
	movq	%rax, (%rcx)
	movq	_SFE_VENDOR_DE_COMPANYID_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rcx)
	movq	_SFE_VENDOR_DE_COMPANYID_2@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rcx)
	movq	_SFE_VENDOR_OPCODE_CA2HOST@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rcx)
	movq	$0, 32(%rcx)
	movq	_SFE_VENDOR_TAG_CA_APPLICATION_INFO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%rcx)
	movq	_LAST_OPERAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$6, %esi
	callq	_clear_operands
	movl	$12, 4(%r13)
	movq	%r13, %rdi
	callq	_avc_write
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movq	%r12, %rdi
	callq	_get_ca_object_pos
	movq	_EN50221_TAG_CA_INFO@GOTPCREL(%rip), %rcx
	movb	2(%rcx), %dl
	movb	%dl, (%rbx)
	movb	1(%rcx), %dl
	movb	%dl, 1(%rbx)
	movb	(%rcx), %cl
	movb	%cl, 2(%rbx)
	movq	_num_fake_ca_system_ids@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	testl	%r8d, %r8d
	je	LBB0_2
## %bb.3:
	addb	%r8b, %r8b
	movb	%r8b, 3(%rbx)
	cmpl	$0, (%rdx)
	jle	LBB0_6
## %bb.4:
	xorl	%eax, %eax
	movq	_fake_ca_system_ids@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rsi), %rdi
	movzbl	1(%rdi,%rax,4), %ecx
	movb	%cl, 4(%rbx,%rax,2)
	movq	(%rsi), %rcx
	movzbl	(%rcx,%rax,4), %ecx
	movb	%cl, 5(%rbx,%rax,2)
	incq	%rax
	movslq	(%rdx), %rcx
	cmpq	%rcx, %rax
	jl	LBB0_5
	jmp	LBB0_6
LBB0_2:
	movb	$2, 3(%rbx)
	movq	(%r12), %rcx
	cltq
	movb	(%rcx,%rax), %cl
	movb	%cl, 4(%rbx)
	movq	(%r12), %rcx
	movb	1(%rax,%rcx), %al
	movb	%al, 5(%rbx)
	movb	$2, %r8b
LBB0_6:
	movzbl	%r8b, %eax
	addl	$4, %eax
	movl	%eax, (%r14)
LBB0_7:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVC_CTYPE_STATUS,4,2           ## @AVC_CTYPE_STATUS
	.comm	_AVC_SUBUNIT_TYPE_TUNER,4,2     ## @AVC_SUBUNIT_TYPE_TUNER
	.comm	_AVC_OPCODE_VENDOR,4,2          ## @AVC_OPCODE_VENDOR
	.comm	_SFE_VENDOR_DE_COMPANYID_0,8,3  ## @SFE_VENDOR_DE_COMPANYID_0
	.comm	_SFE_VENDOR_DE_COMPANYID_1,8,3  ## @SFE_VENDOR_DE_COMPANYID_1
	.comm	_SFE_VENDOR_DE_COMPANYID_2,8,3  ## @SFE_VENDOR_DE_COMPANYID_2
	.comm	_SFE_VENDOR_OPCODE_CA2HOST,8,3  ## @SFE_VENDOR_OPCODE_CA2HOST
	.comm	_SFE_VENDOR_TAG_CA_APPLICATION_INFO,8,3 ## @SFE_VENDOR_TAG_CA_APPLICATION_INFO
	.comm	_LAST_OPERAND,4,2               ## @LAST_OPERAND
	.comm	_EN50221_TAG_CA_INFO,4,2        ## @EN50221_TAG_CA_INFO
	.comm	_num_fake_ca_system_ids,4,2     ## @num_fake_ca_system_ids
	.comm	_fake_ca_system_ids,8,3         ## @fake_ca_system_ids
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avc_ca_info                    ; -- Begin function avc_ca_info
	.p2align	2
_avc_ca_info:                           ; @avc_ca_info
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x23, [x0, #16]
	add	x20, x0, #8
	mov	x0, x20
	bl	_mutex_lock
Lloh0:
	adrp	x8, _AVC_CTYPE_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVC_CTYPE_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AVC_SUBUNIT_TYPE_TUNER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AVC_SUBUNIT_TYPE_TUNER@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldr	w10, [x22]
	orr	w9, w10, w9
	str	w9, [x23]
Lloh6:
	adrp	x9, _AVC_OPCODE_VENDOR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AVC_OPCODE_VENDOR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _SFE_VENDOR_DE_COMPANYID_0@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SFE_VENDOR_DE_COMPANYID_0@GOTPAGEOFF]
	stp	w9, w8, [x23, #16]
Lloh11:
	ldr	x8, [x10]
	ldr	x9, [x23, #8]
	str	x8, [x9]
Lloh12:
	adrp	x8, _SFE_VENDOR_DE_COMPANYID_1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SFE_VENDOR_DE_COMPANYID_1@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x10, _SFE_VENDOR_DE_COMPANYID_2@GOTPAGE
Lloh16:
	ldr	x10, [x10, _SFE_VENDOR_DE_COMPANYID_2@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	stp	x8, x10, [x9, #8]
Lloh18:
	adrp	x8, _SFE_VENDOR_OPCODE_CA2HOST@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SFE_VENDOR_OPCODE_CA2HOST@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
Lloh21:
	adrp	x10, _SFE_VENDOR_TAG_CA_APPLICATION_INFO@GOTPAGE
Lloh22:
	ldr	x10, [x10, _SFE_VENDOR_TAG_CA_APPLICATION_INFO@GOTPAGEOFF]
	stp	x8, xzr, [x9, #24]
Lloh23:
	ldr	x8, [x10]
	str	x8, [x9, #40]
Lloh24:
	adrp	x8, _LAST_OPERAND@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LAST_OPERAND@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x23
	mov	w1, #6
	bl	_clear_operands
	mov	w8, #12
	str	w8, [x22, #4]
	mov	x0, x22
	bl	_avc_write
	mov	x22, x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x0, x23
	bl	_get_ca_object_pos
                                        ; kill: def $w0 killed $w0 def $x0
Lloh27:
	adrp	x8, _EN50221_TAG_CA_INFO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EN50221_TAG_CA_INFO@GOTPAGEOFF]
	ldrh	w9, [x8, #2]
	strb	w9, [x21]
	ldr	w9, [x8]
	lsr	w9, w9, #8
	strb	w9, [x21, #1]
	ldr	w8, [x8]
	strb	w8, [x21, #2]
Lloh29:
	adrp	x9, _num_fake_ca_system_ids@GOTPAGE
Lloh30:
	ldr	x9, [x9, _num_fake_ca_system_ids@GOTPAGEOFF]
	ldr	w8, [x9]
	cbz	w8, LBB0_5
; %bb.2:
	lsl	w8, w8, #1
	strb	w8, [x21, #3]
	ldr	w10, [x9]
	cmp	w10, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x10, #0
	add	x11, x21, #5
Lloh31:
	adrp	x12, _fake_ca_system_ids@GOTPAGE
Lloh32:
	ldr	x12, [x12, _fake_ca_system_ids@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x12]
	lsl	x14, x10, #2
	ldr	w13, [x13, x14]
	lsr	w13, w13, #8
	sturb	w13, [x11, #-1]
	ldr	x13, [x12]
	ldr	w13, [x13, x14]
	strb	w13, [x11], #2
	add	x10, x10, #1
	ldrsw	x13, [x9]
	cmp	x10, x13
	b.lt	LBB0_4
	b	LBB0_6
LBB0_5:
	mov	w8, #2
	strb	w8, [x21, #3]
	ldr	x9, [x23]
	sxtw	x10, w0
	ldrb	w9, [x9, x10]
	strb	w9, [x21, #4]
	ldr	x9, [x23]
	add	x9, x10, x9
	ldrb	w9, [x9, #1]
	strb	w9, [x21, #5]
LBB0_6:
	and	w8, w8, #0xff
	add	w8, w8, #4
	str	w8, [x19]
LBB0_7:
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_AVC_CTYPE_STATUS,4,2           ; @AVC_CTYPE_STATUS
	.comm	_AVC_SUBUNIT_TYPE_TUNER,4,2     ; @AVC_SUBUNIT_TYPE_TUNER
	.comm	_AVC_OPCODE_VENDOR,4,2          ; @AVC_OPCODE_VENDOR
	.comm	_SFE_VENDOR_DE_COMPANYID_0,8,3  ; @SFE_VENDOR_DE_COMPANYID_0
	.comm	_SFE_VENDOR_DE_COMPANYID_1,8,3  ; @SFE_VENDOR_DE_COMPANYID_1
	.comm	_SFE_VENDOR_DE_COMPANYID_2,8,3  ; @SFE_VENDOR_DE_COMPANYID_2
	.comm	_SFE_VENDOR_OPCODE_CA2HOST,8,3  ; @SFE_VENDOR_OPCODE_CA2HOST
	.comm	_SFE_VENDOR_TAG_CA_APPLICATION_INFO,8,3 ; @SFE_VENDOR_TAG_CA_APPLICATION_INFO
	.comm	_LAST_OPERAND,4,2               ; @LAST_OPERAND
	.comm	_EN50221_TAG_CA_INFO,4,2        ; @EN50221_TAG_CA_INFO
	.comm	_num_fake_ca_system_ids,4,2     ; @num_fake_ca_system_ids
	.comm	_fake_ca_system_ids,8,3         ; @fake_ca_system_ids
.subsections_via_symbols
