	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvb_ca_en50221_io_read_condition
_dvb_ca_en50221_io_read_condition:      ## @dvb_ca_en50221_io_read_condition
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %ebx
	cmpl	$0, 4(%rdi)
	jle	LBB0_12
## %bb.1:
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movl	$-1, %r12d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	4(%rdi), %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	incl	%r13d
	movl	%edx, %ebx
	cmpl	%ecx, %r13d
	jge	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	8(%rdi), %rax
	movslq	%ebx, %rcx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %rdx
	movq	_DVB_CA_SLOTSTATE_RUNNING@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 8(%rax,%rcx)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rax,%rcx), %r15
	addq	$8, %r15
	movq	%r15, %rdi
	movl	$-1, %esi
	leaq	-80(%rbp), %rdx
	callq	_dvb_ringbuffer_pkt_next
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	%r15, %rdi
	movl	%r14d, %esi
	leaq	-80(%rbp), %rdx
	callq	_dvb_ringbuffer_pkt_next
	movl	%eax, %r14d
	cmpl	$-1, %eax
	je	LBB0_11
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	leaq	-56(%rbp), %rcx
	movl	$2, %r8d
	callq	_dvb_ringbuffer_pkt_read
	cmpl	$-1, %r12d
	movl	-56(%rbp), %eax
	cmovel	%eax, %r12d
	cmpl	%r12d, %eax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	testb	$-128, -52(%rbp)
	jne	LBB0_10
## %bb.9:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	incl	%ebx
	movl	%ebx, %eax
	cltd
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	idivl	4(%rdi)
	movl	$1, %eax
	movl	%edx, %ebx
	jmp	LBB0_13
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	movl	%ebx, (%rdi)
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_16
## %bb.15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DVB_CA_SLOTSTATE_RUNNING,8,3   ## @DVB_CA_SLOTSTATE_RUNNING
	.no_dead_strip	_dvb_ca_en50221_io_read_condition
.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_io_read_condition
_dvb_ca_en50221_io_read_condition:      ; @dvb_ca_en50221_io_read_condition
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldp	w23, w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x20, x2
	mov	w24, #0
	mov	w25, #-1
Lloh3:
	adrp	x26, _DVB_CA_SLOTSTATE_RUNNING@GOTPAGE
Lloh4:
	ldr	x26, [x26, _DVB_CA_SLOTSTATE_RUNNING@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w23, #1
	ldr	w9, [x19, #4]
	sdiv	w10, w8, w9
	msub	w23, w10, w9, w8
	add	w24, w24, #1
	cmp	w24, w9
	b.ge	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x8, [x19, #8]
	sbfiz	x9, x23, #4, #32
	ldr	x9, [x8, x9]
	ldr	x10, [x26]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x9, w23
	add	x21, x8, x9, lsl #4
	ldr	w8, [x21, #8]!
	cbz	w8, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #-1
	bl	_dvb_ringbuffer_pkt_next
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x22
	bl	_dvb_ringbuffer_pkt_next
	mov	x22, x0
	cmn	w0, #1
	b.eq	LBB0_2
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x3, sp, #16
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	mov	w4, #2
	bl	_dvb_ringbuffer_pkt_read
	ldr	w8, [sp, #16]
	cmn	w25, #1
	csel	w25, w8, w25, eq
	cmp	w8, w25
	b.ne	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldrb	w8, [sp, #20]
	tbnz	w8, #7, LBB0_7
; %bb.10:
	str	w23, [x20]
	add	w8, w23, #1
	ldr	w9, [x19, #4]
	sdiv	w10, w8, w9
	msub	w23, w10, w9, w8
	mov	w0, #1
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	str	w23, [x19]
LBB0_13:
	ldr	x8, [sp, #24]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
	mov	w0, #0
	b	LBB0_13
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DVB_CA_SLOTSTATE_RUNNING,8,3   ; @DVB_CA_SLOTSTATE_RUNNING
	.no_dead_strip	_dvb_ca_en50221_io_read_condition
.subsections_via_symbols
