	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_iso
_handle_iso:                            ## @handle_iso
	.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	8(%r8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rax), %r14d
	andq	$-4, %rdx
	addq	%rcx, %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	cmpq	%rcx, %rdx
	jbe	LBB0_11
## %bb.1:
	movq	%r8, %rbx
	leaq	4(%r8), %r13
	movq	_MPEG2_TS_SOURCE_PACKET_SIZE@GOTPCREL(%rip), %r12
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r14d
	movq	_N_PACKETS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	andl	%eax, %r14d
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addq	$4, %rcx
	cmpq	-64(%rbp), %rcx                 ## 8-byte Folded Reload
	jae	LBB0_11
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rdi
	callq	_be32_to_cpup
	movl	%eax, %r15d
	sarl	$16, %r15d
	xorl	%edi, %edi
	movq	_MAX_PACKET_SIZE@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %r15d
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%rbx), %ecx
	movl	%ecx, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %ecx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %eax
	cltd
	movq	_PACKETS_PER_PAGE@GOTPCREL(%rip), %rsi
	idivl	(%rsi)
	movslq	%r15d, %r15
	movq	_MPEG2_TS_HEADER_SIZE@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	_CIP_HEADER_SIZE@GOTPCREL(%rip), %rdi
	addq	(%rdi), %rsi
	cmpq	%r15, %rsi
	jge	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	8(%rdi), %rdi
	cltq
	imull	%edx, %ecx
	movslq	%ecx, %rbx
	addq	(%rdi,%rax,8), %rbx
	addq	%rbx, %r15
	addq	%rsi, %rbx
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_dvb_dmx_swfilter_packets
	movslq	(%r12), %rax
	addq	%rax, %rbx
	cmpq	%r15, %rbx
	jb	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_queue_iso
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_11:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	16(%rbx), %edi
	callq	_fw_iso_context_queue_flush
	movl	%r14d, (%rbx)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PACKET_SIZE,4,2            ## @MAX_PACKET_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"length = %d\n"

	.comm	_PACKETS_PER_PAGE,4,2           ## @PACKETS_PER_PAGE
	.comm	_CIP_HEADER_SIZE,8,3            ## @CIP_HEADER_SIZE
	.comm	_MPEG2_TS_HEADER_SIZE,8,3       ## @MPEG2_TS_HEADER_SIZE
	.comm	_MPEG2_TS_SOURCE_PACKET_SIZE,4,2 ## @MPEG2_TS_SOURCE_PACKET_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"requeue failed\n"

	.comm	_N_PACKETS,4,2                  ## @N_PACKETS
	.no_dead_strip	_handle_iso
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_iso
_handle_iso:                            ; @handle_iso
	.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
	ldr	x19, [x4, #8]
	ldr	w20, [x19]
	and	x8, x2, #0xfffffffffffffffc
	add	x27, x3, x8
	cmp	x27, x3
	b.ls	LBB0_11
; %bb.1:
	mov	x21, x4
	mov	x22, x3
	add	x23, x4, #4
Lloh0:
	adrp	x28, _MAX_PACKET_SIZE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _MAX_PACKET_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _MPEG2_TS_SOURCE_PACKET_SIZE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MPEG2_TS_SOURCE_PACKET_SIZE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w20, #1
Lloh4:
	adrp	x9, _N_PACKETS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _N_PACKETS@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	sub	w9, w9, #1
	and	w20, w9, w8
	add	x22, x22, #4
	cmp	x22, x27
	b.hs	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	mov	x0, x22
	bl	_be32_to_cpup
	asr	w26, w0, #16
	ldr	w8, [x28]
	cmp	w26, w8
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21]
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	str	x26, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	w8, [x28]
	mov	x26, x8
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x28]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x9, w26
Lloh9:
	adrp	x10, _CIP_HEADER_SIZE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CIP_HEADER_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
Lloh12:
	adrp	x11, _MPEG2_TS_HEADER_SIZE@GOTPAGE
Lloh13:
	ldr	x11, [x11, _MPEG2_TS_HEADER_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
	add	x10, x11, x10
	cmp	x10, x9
	b.ge	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x11, [x19, #8]
Lloh15:
	adrp	x12, _PACKETS_PER_PAGE@GOTPAGE
Lloh16:
	ldr	x12, [x12, _PACKETS_PER_PAGE@GOTPAGEOFF]
Lloh17:
	ldr	w12, [x12]
	sdiv	w13, w20, w12
	ldr	x11, [x11, w13, sxtw #3]
	msub	w12, w13, w12, w20
	mul	w8, w8, w12
	add	x8, x11, w8, sxtw
	add	x25, x8, x9
	add	x26, x8, x10
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	mov	x1, x26
	mov	w2, #1
	bl	_dvb_dmx_swfilter_packets
	ldrsw	x8, [x24]
	add	x26, x26, x8
	cmp	x26, x25
	b.lo	LBB0_8
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_queue_iso
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_2
LBB0_11:
	ldr	w0, [x19, #16]
	bl	_fw_iso_context_queue_flush
	str	w20, [x19]
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PACKET_SIZE,4,2            ; @MAX_PACKET_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"length = %d\n"

	.comm	_PACKETS_PER_PAGE,4,2           ; @PACKETS_PER_PAGE
	.comm	_CIP_HEADER_SIZE,8,3            ; @CIP_HEADER_SIZE
	.comm	_MPEG2_TS_HEADER_SIZE,8,3       ; @MPEG2_TS_HEADER_SIZE
	.comm	_MPEG2_TS_SOURCE_PACKET_SIZE,4,2 ; @MPEG2_TS_SOURCE_PACKET_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"requeue failed\n"

	.comm	_N_PACKETS,4,2                  ; @N_PACKETS
	.no_dead_strip	_handle_iso
.subsections_via_symbols
