	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function channel_swdemux_tsklet
_channel_swdemux_tsklet:                ## @channel_swdemux_tsklet
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpq	$0, 16(%r15)
	sete	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	16(%r15), %rbx
	movq	40(%r15), %r13
	xorl	%edi, %edi
	callq	_DMA_PRDS_BUSWP_TP
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
	movq	%rax, %r12
	movq	16(%r15), %rbx
	xorl	%edi, %edi
	callq	_DMA_PRDS_BUSRP_TP
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
	movq	(%r15), %rdx
	movl	%eax, %r14d
	subl	%edx, %r14d
	movq	_FEI_BUFFER_SIZE@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rdx
	cmpq	%rax, %r12
	cmovaeq	%r12, %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %r8d
	subl	%eax, %r8d
	movq	%rax, %rsi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_PACKET_SIZE@GOTPCREL(%rip), %rcx
	movl	%r8d, %eax
	cltd
	idivl	(%rcx)
	movl	%eax, %ebx
	movl	8(%r13), %edi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r8d, %edx
	callq	_dma_sync_single_for_cpu
	movq	32(%r15), %r12
	movl	8(%r13), %edi
	movl	24(%r15), %edx
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rcx
	movl	%ebx, %r8d
	movq	%r12, %r9
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	%r14
	callq	_dev_dbg
	addq	$32, %rsp
	testl	%ebx, %ebx
	jle	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%rax), %rax
	movq	8(%r15), %rdi
	shlq	$2, %rdi
	addq	(%rax), %rdi
	movslq	%r14d, %r14
	leaq	(%r12,%r14,4), %rsi
	movl	$1, %edx
	callq	_dvb_dmx_swfilter_packets
	movq	_PACKET_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
	decl	%ebx
	jne	LBB0_5
LBB0_6:
	movq	(%r15), %r14
	movq	16(%r15), %r15
	movq	_FEI_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	addq	%r14, %rbx
	xorl	%edi, %edi
	callq	_DMA_PRDS_BUSRP_TP
	addq	%rax, %r15
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	cmpq	%rbx, %rdi
	cmoveq	%r14, %rdi
	movq	%r15, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FEI_BUFFER_SIZE,8,3            ## @FEI_BUFFER_SIZE
	.comm	_PACKET_SIZE,4,2                ## @PACKET_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chan=%d channel=%p num_packets = %d, buf = %p, pos = 0x%x\n\trp=0x%lx, wp=0x%lx\n"

	.no_dead_strip	_channel_swdemux_tsklet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function channel_swdemux_tsklet
_channel_swdemux_tsklet:                ; @channel_swdemux_tsklet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_4
LBB0_2:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_3:
	mov	w0, #1
	bl	_unlikely
	cbnz	x0, LBB0_2
LBB0_4:
	ldr	x24, [x19, #40]
	ldr	x20, [x19, #16]
	bl	_DMA_PRDS_BUSWP_TP
	add	x0, x0, x20
	bl	_readl
	mov	x21, x0
	ldr	x20, [x19, #16]
	mov	w0, #0
	bl	_DMA_PRDS_BUSRP_TP
	add	x0, x0, x20
	bl	_readl
	mov	x23, x0
	ldr	x8, [x19]
	sub	w20, w23, w8
Lloh0:
	adrp	x26, _FEI_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _FEI_BUFFER_SIZE@GOTPAGEOFF]
	ldr	x9, [x26]
	add	x8, x9, x8
	cmp	x21, x0
	csel	x25, x8, x21, lo
	sub	w2, w25, w23
Lloh2:
	adrp	x27, _PACKET_SIZE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _PACKET_SIZE@GOTPAGEOFF]
	ldr	w8, [x27]
	sdiv	w21, w2, w8
	ldr	w0, [x24, #8]
Lloh4:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	mov	x1, x23
	bl	_dma_sync_single_for_cpu
	ldr	x22, [x19, #32]
	ldr	w0, [x24, #8]
	ldr	w2, [x19, #24]
	str	x25, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x19
	mov	x4, x21
	mov	x5, x22
	mov	x6, x20
	mov	x7, x23
	bl	_dev_dbg
	cmp	w21, #1
	b.lt	LBB0_6
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	add	x0, x8, x9, lsl #2
	add	x1, x22, w20, sxtw #2
	mov	w2, #1
	bl	_dvb_dmx_swfilter_packets
	ldr	w8, [x27]
	add	w20, w8, w20
	subs	w21, w21, #1
	b.ne	LBB0_5
LBB0_6:
	ldr	x20, [x19]
	ldr	x8, [x26]
	add	x21, x8, x20
	ldr	x19, [x19, #16]
	mov	w0, #0
	bl	_DMA_PRDS_BUSRP_TP
	add	x1, x0, x19
	cmp	x25, x21
	csel	x0, x20, x25, eq
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_writel
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_FEI_BUFFER_SIZE,8,3            ; @FEI_BUFFER_SIZE
	.comm	_PACKET_SIZE,4,2                ; @PACKET_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chan=%d channel=%p num_packets = %d, buf = %p, pos = 0x%x\n\trp=0x%lx, wp=0x%lx\n"

	.no_dead_strip	_channel_swdemux_tsklet
.subsections_via_symbols
