	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvb_ca_en50221_check_camstatus
_dvb_ca_en50221_check_camstatus:        ## @dvb_ca_en50221_check_camstatus
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	16(%rdi), %r14
	movslq	%esi, %rbx
	movq	_DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_2
## %bb.1:
	shlq	$4, %rbx
	leaq	(%r14,%rbx), %rdi
	addq	$8, %rdi
	callq	_atomic_read
	xorl	%ebx, %ebx
	testq	%rax, %rax
	setne	%bl
	jmp	LBB0_11
LBB0_2:
	movq	8(%rdi), %rax
	movl	4(%rdi), %edx
	movq	%rax, %rdi
	callq	*(%rax)
	movq	_DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_DVB_CA_EN50221_POLL_CAM_CHANGED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.3:
	testl	%eax, %edx
	sete	%r8b
	movq	%rbx, %rsi
	shlq	$4, %rsi
	movq	(%r14,%rsi), %r9
	movq	_DVB_CA_SLOTSTATE_NONE@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %r9
	sete	%cl
	cmpb	%cl, %r8b
	je	LBB0_8
LBB0_4:
	testl	%eax, %edx
	jne	LBB0_5
## %bb.6:
	movq	_DVB_CA_EN50221_CAMCHANGE_REMOVED@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_DVB_CA_EN50221_CAMCHANGE_INSERTED@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	shlq	$4, %rbx
	movl	%eax, 12(%r14,%rbx)
	leaq	(%r14,%rbx), %rdi
	addq	$8, %rdi
	movl	$1, %ebx
	movl	$1, %esi
	callq	_atomic_set
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movq	_DVB_CA_SLOTSTATE_WAITREADY@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %r9
	jne	LBB0_11
## %bb.9:
	movq	_DVB_CA_EN50221_POLL_CAM_READY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.10:
	addq	%rsi, %r14
	movq	_DVB_CA_SLOTSTATE_VALIDATE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE,4,2 ## @DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE
	.comm	_DVB_CA_EN50221_POLL_CAM_PRESENT,4,2 ## @DVB_CA_EN50221_POLL_CAM_PRESENT
	.comm	_DVB_CA_EN50221_POLL_CAM_CHANGED,4,2 ## @DVB_CA_EN50221_POLL_CAM_CHANGED
	.comm	_DVB_CA_SLOTSTATE_NONE,8,3      ## @DVB_CA_SLOTSTATE_NONE
	.comm	_DVB_CA_EN50221_CAMCHANGE_REMOVED,4,2 ## @DVB_CA_EN50221_CAMCHANGE_REMOVED
	.comm	_DVB_CA_EN50221_CAMCHANGE_INSERTED,4,2 ## @DVB_CA_EN50221_CAMCHANGE_INSERTED
	.comm	_DVB_CA_SLOTSTATE_WAITREADY,8,3 ## @DVB_CA_SLOTSTATE_WAITREADY
	.comm	_DVB_CA_EN50221_POLL_CAM_READY,4,2 ## @DVB_CA_EN50221_POLL_CAM_READY
	.comm	_DVB_CA_SLOTSTATE_VALIDATE,8,3  ## @DVB_CA_SLOTSTATE_VALIDATE
	.no_dead_strip	_dvb_ca_en50221_check_camstatus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dvb_ca_en50221_check_camstatus
_dvb_ca_en50221_check_camstatus:        ; @dvb_ca_en50221_check_camstatus
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
                                        ; kill: def $w1 killed $w1 def $x1
	ldr	x19, [x0, #16]
	sxtw	x20, w1
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	add	x8, x19, x20, lsl #4
	add	x0, x8, #8
	bl	_atomic_read
	cmp	x0, #0
	cset	w19, ne
	b	LBB0_5
LBB0_2:
	ldr	x8, [x0, #8]
	ldr	x9, [x8]
	ldr	w2, [x0, #4]
	mov	x0, x8
                                        ; kill: def $w1 killed $w1 killed $x1
	blr	x9
Lloh3:
	adrp	x8, _DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w9, w8, w0
Lloh6:
	adrp	x8, _DVB_CA_EN50221_POLL_CAM_CHANGED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DVB_CA_EN50221_POLL_CAM_CHANGED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.3:
	cmp	w9, #0
	cset	w11, eq
	add	x8, x19, x20, lsl #4
	ldr	x10, [x8]
Lloh9:
	adrp	x12, _DVB_CA_SLOTSTATE_NONE@GOTPAGE
Lloh10:
	ldr	x12, [x12, _DVB_CA_SLOTSTATE_NONE@GOTPAGEOFF]
Lloh11:
	ldr	x12, [x12]
	cmp	x10, x12
	cset	w12, eq
	cmp	w11, w12
	b.eq	LBB0_6
LBB0_4:
Lloh12:
	adrp	x8, _DVB_CA_EN50221_CAMCHANGE_REMOVED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DVB_CA_EN50221_CAMCHANGE_REMOVED@GOTPAGEOFF]
Lloh14:
	adrp	x10, _DVB_CA_EN50221_CAMCHANGE_INSERTED@GOTPAGE
Lloh15:
	ldr	x10, [x10, _DVB_CA_EN50221_CAMCHANGE_INSERTED@GOTPAGEOFF]
	cmp	w9, #0
	csel	x8, x8, x10, eq
	ldr	w8, [x8]
	add	x9, x19, x20, lsl #4
	str	w8, [x9, #12]
	add	x0, x9, #8
	mov	w19, #1
	mov	w1, #1
	bl	_atomic_set
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh16:
	adrp	x9, _DVB_CA_SLOTSTATE_WAITREADY@GOTPAGE
Lloh17:
	ldr	x9, [x9, _DVB_CA_SLOTSTATE_WAITREADY@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x10, x9
	b.ne	LBB0_9
; %bb.7:
Lloh19:
	adrp	x9, _DVB_CA_EN50221_POLL_CAM_READY@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DVB_CA_EN50221_POLL_CAM_READY@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_9
; %bb.8:
	mov	w19, #0
Lloh22:
	adrp	x9, _DVB_CA_SLOTSTATE_VALIDATE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _DVB_CA_SLOTSTATE_VALIDATE@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	str	x9, [x8]
	b	LBB0_5
LBB0_9:
	mov	w19, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE,4,2 ; @DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE
	.comm	_DVB_CA_EN50221_POLL_CAM_PRESENT,4,2 ; @DVB_CA_EN50221_POLL_CAM_PRESENT
	.comm	_DVB_CA_EN50221_POLL_CAM_CHANGED,4,2 ; @DVB_CA_EN50221_POLL_CAM_CHANGED
	.comm	_DVB_CA_SLOTSTATE_NONE,8,3      ; @DVB_CA_SLOTSTATE_NONE
	.comm	_DVB_CA_EN50221_CAMCHANGE_REMOVED,4,2 ; @DVB_CA_EN50221_CAMCHANGE_REMOVED
	.comm	_DVB_CA_EN50221_CAMCHANGE_INSERTED,4,2 ; @DVB_CA_EN50221_CAMCHANGE_INSERTED
	.comm	_DVB_CA_SLOTSTATE_WAITREADY,8,3 ; @DVB_CA_SLOTSTATE_WAITREADY
	.comm	_DVB_CA_EN50221_POLL_CAM_READY,4,2 ; @DVB_CA_EN50221_POLL_CAM_READY
	.comm	_DVB_CA_SLOTSTATE_VALIDATE,8,3  ; @DVB_CA_SLOTSTATE_VALIDATE
	.no_dead_strip	_dvb_ca_en50221_check_camstatus
.subsections_via_symbols
