	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fdtv_ca_register               ## -- Begin function fdtv_ca_register
	.p2align	4, 0x90
_fdtv_ca_register:                      ## @fdtv_ca_register
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	leaq	-32(%rbp), %rsi
	callq	_avc_tuner_status
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	leaq	-32(%rbp), %rdi
	callq	_fdtv_ca_ready
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	leaq	12(%r14), %rdi
	leaq	8(%r14), %rsi
	movq	_DVB_DEVICE_CA@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_fdtv_ca@GOTPCREL(%rip), %rdx
	movq	%r14, %rcx
	xorl	%r9d, %r9d
	callq	_dvb_register_device
	movl	%eax, %ebx
	cmpq	$0, -32(%rbp)
	je	LBB0_6
## %bb.7:
	cmpl	$1, -24(%rbp)
	jne	LBB0_9
	jmp	LBB0_8
LBB0_4:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	cmpl	$1, -24(%rbp)
	jne	LBB0_9
LBB0_8:
	movq	%r14, %rdi
	movq	%r14, %rsi
	callq	_avc_ca_get_time_date
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_fdtv_ca,4,2                    ## @fdtv_ca
	.comm	_DVB_DEVICE_CA,4,2              ## @DVB_DEVICE_CA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CaApplicationInfo is not set\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fdtv_ca_register               ; -- Begin function fdtv_ca_register
	.p2align	2
_fdtv_ca_register:                      ; @fdtv_ca_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	mov	x1, sp
	bl	_avc_tuner_status
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	mov	x0, sp
	bl	_fdtv_ca_ready
	cbz	w0, LBB0_9
; %bb.5:
	add	x0, x19, #12
	add	x1, x19, #8
Lloh2:
	adrp	x8, _DVB_DEVICE_CA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DVB_DEVICE_CA@GOTPAGEOFF]
Lloh4:
	ldr	w4, [x8]
Lloh5:
	adrp	x2, _fdtv_ca@GOTPAGE
Lloh6:
	ldr	x2, [x2, _fdtv_ca@GOTPAGEOFF]
	mov	x3, x19
	mov	w5, #0
	bl	_dvb_register_device
	mov	x20, x0
	ldr	x8, [sp]
	cbnz	x8, LBB0_7
; %bb.6:
	ldr	w0, [x19, #4]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_7:
	ldr	w8, [sp, #8]
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.8:
	mov	x0, x19
	mov	x1, x19
	bl	_avc_ca_get_time_date
	b	LBB0_3
LBB0_9:
Lloh9:
	adrp	x8, _EFAULT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_fdtv_ca,4,2                    ; @fdtv_ca
	.comm	_DVB_DEVICE_CA,4,2              ; @DVB_DEVICE_CA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CaApplicationInfo is not set\n"

.subsections_via_symbols
