	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dvb_dmx_init                   ## -- Begin function dvb_dmx_init
	.p2align	4, 0x90
_dvb_dmx_init:                          ## @dvb_dmx_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	$0, 88(%rdi)
	movq	$0, 112(%rdi)
	movl	(%rdi), %esi
	movl	$4, %edi
	callq	_array_size
	movq	%rax, %rdi
	callq	_vmalloc
	movq	%rax, 104(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	4(%rbx), %esi
	movl	$4, %edi
	callq	_array_size
	movq	%rax, %rdi
	callq	_vmalloc
	movq	%rax, 96(%rbx)
	testq	%rax, %rax
	je	LBB0_28
## %bb.3:
	movl	(%rbx), %r9d
	testl	%r9d, %r9d
	jle	LBB0_8
## %bb.4:
	movq	104(%rbx), %r8
	cmpl	$1, %r9d
	jne	LBB0_11
## %bb.5:
	xorl	%esi, %esi
	jmp	LBB0_6
LBB0_28:
	movq	104(%rbx), %rdi
	callq	_vfree
	movq	$0, 104(%rbx)
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_27
LBB0_11:
	movl	%r9d, %r10d
	andl	$-2, %r10d
	leaq	24(%r8), %rcx
	xorl	%esi, %esi
	movq	_DMX_STATE_FREE@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rdi
	movq	%rdi, -16(%rcx)
	movl	%esi, -24(%rcx)
	movq	(%rdx), %rdi
	movq	%rdi, (%rcx)
	leal	1(%rsi), %edi
	movl	%edi, -8(%rcx)
	addq	$2, %rsi
	addq	$32, %rcx
	cmpq	%r10, %rsi
	jne	LBB0_12
LBB0_6:
	testb	$1, %r9b
	je	LBB0_8
## %bb.7:
	movq	_DMX_STATE_FREE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rsi, %rdx
	shlq	$4, %rdx
	movq	%rcx, 8(%r8,%rdx)
	movl	%esi, (%r8,%rdx)
LBB0_8:
	movl	4(%rbx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_17
## %bb.9:
	cmpl	$1, %r8d
	jne	LBB0_13
## %bb.10:
	xorl	%edx, %edx
	jmp	LBB0_15
LBB0_13:
	movl	%r8d, %r9d
	andl	$-2, %r9d
	leaq	24(%rax), %rdi
	xorl	%edx, %edx
	movq	_DMX_STATE_FREE@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx), %rsi
	movq	%rsi, -16(%rdi)
	movl	%edx, -24(%rdi)
	movq	(%rcx), %rsi
	movq	%rsi, (%rdi)
	leal	1(%rdx), %esi
	movl	%esi, -8(%rdi)
	addq	$2, %rdx
	addq	$32, %rdi
	cmpq	%r9, %rdx
	jne	LBB0_14
LBB0_15:
	testb	$1, %r8b
	je	LBB0_17
## %bb.16:
	movq	_DMX_STATE_FREE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rdx, %rsi
	shlq	$4, %rsi
	movq	%rcx, 8(%rax,%rsi)
	movl	%edx, (%rax,%rsi)
LBB0_17:
	movq	_MAX_PID@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	incq	%rdi
	callq	_vmalloc
	movq	%rax, 88(%rbx)
	testq	%rax, %rax
	jne	LBB0_19
## %bb.18:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
LBB0_19:
	leaq	80(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	_DMX_PES_OTHER@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_22
## %bb.20:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	72(%rbx), %rdx
	movq	$0, (%rdx,%rcx,8)
	movq	8(%rbx), %rdx
	movl	$65535, (%rdx,%rcx,4)           ## imm = 0xFFFF
	incq	%rcx
	movslq	(%rax), %rdx
	cmpq	%rdx, %rcx
	jl	LBB0_21
LBB0_22:
	leaq	64(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rbx)
	movq	$0, 56(%rbx)
	cmpq	$0, 32(%rbx)
	je	LBB0_23
## %bb.24:
	cmpq	$0, 24(%rbx)
	jne	LBB0_26
LBB0_25:
	movq	_dvb_dmx_memcopy@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
LBB0_26:
	movq	$0, 184(%rbx)
	movq	%rbx, 176(%rbx)
	movq	_dvbdmx_open@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 168(%rbx)
	movq	_dvbdmx_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 164(%rbx)
	movq	_dvbdmx_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 160(%rbx)
	movq	_dvbdmx_allocate_ts_feed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 156(%rbx)
	movq	_dvbdmx_release_ts_feed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 152(%rbx)
	movq	_dvbdmx_allocate_section_feed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 148(%rbx)
	movq	_dvbdmx_release_section_feed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 144(%rbx)
	movq	_dvbdmx_add_frontend@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 140(%rbx)
	movq	_dvbdmx_remove_frontend@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 136(%rbx)
	movq	_dvbdmx_get_frontends@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 132(%rbx)
	movq	_dvbdmx_connect_frontend@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 128(%rbx)
	movq	_dvbdmx_disconnect_frontend@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 124(%rbx)
	movq	_dvbdmx_get_pes_pids@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 120(%rbx)
	leaq	20(%rbx), %rdi
	callq	_mutex_init
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_init
	xorl	%eax, %eax
LBB0_27:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_23:
	movq	_dvb_dmx_crc32@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	cmpq	$0, 24(%rbx)
	jne	LBB0_26
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMX_STATE_FREE,8,3             ## @DMX_STATE_FREE
	.comm	_MAX_PID,8,3                    ## @MAX_PID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't allocate memory for TS/TEI check. Disabling it\n"

	.comm	_DMX_PES_OTHER,4,2              ## @DMX_PES_OTHER
	.comm	_dvb_dmx_crc32,8,3              ## @dvb_dmx_crc32
	.comm	_dvb_dmx_memcopy,8,3            ## @dvb_dmx_memcopy
	.comm	_dvbdmx_open,4,2                ## @dvbdmx_open
	.comm	_dvbdmx_close,4,2               ## @dvbdmx_close
	.comm	_dvbdmx_write,4,2               ## @dvbdmx_write
	.comm	_dvbdmx_allocate_ts_feed,4,2    ## @dvbdmx_allocate_ts_feed
	.comm	_dvbdmx_release_ts_feed,4,2     ## @dvbdmx_release_ts_feed
	.comm	_dvbdmx_allocate_section_feed,4,2 ## @dvbdmx_allocate_section_feed
	.comm	_dvbdmx_release_section_feed,4,2 ## @dvbdmx_release_section_feed
	.comm	_dvbdmx_add_frontend,4,2        ## @dvbdmx_add_frontend
	.comm	_dvbdmx_remove_frontend,4,2     ## @dvbdmx_remove_frontend
	.comm	_dvbdmx_get_frontends,4,2       ## @dvbdmx_get_frontends
	.comm	_dvbdmx_connect_frontend,4,2    ## @dvbdmx_connect_frontend
	.comm	_dvbdmx_disconnect_frontend,4,2 ## @dvbdmx_disconnect_frontend
	.comm	_dvbdmx_get_pes_pids,4,2        ## @dvbdmx_get_pes_pids
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dvb_dmx_init                   ; -- Begin function dvb_dmx_init
	.p2align	2
_dvb_dmx_init:                          ; @dvb_dmx_init
	.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
	mov	x19, x0
	str	xzr, [x0, #88]
	str	xzr, [x0, #112]
	ldr	w1, [x0]
	mov	w0, #4
	bl	_array_size
	bl	_vmalloc
	str	x0, [x19, #104]
	cbz	x0, LBB0_17
; %bb.1:
	ldr	w1, [x19, #4]
	mov	w0, #4
	bl	_array_size
	bl	_vmalloc
	str	x0, [x19, #96]
	cbz	x0, LBB0_16
; %bb.2:
	ldr	w9, [x19]
Lloh0:
	adrp	x8, _DMX_STATE_FREE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMX_STATE_FREE@GOTPAGEOFF]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x10, #0
	ldr	x11, [x19, #104]
	add	x11, x11, #8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x8]
	str	x12, [x11]
	stur	w10, [x11, #-8]
	add	x10, x10, #1
	add	x11, x11, #16
	cmp	x9, x10
	b.ne	LBB0_4
LBB0_5:
	ldr	w9, [x19, #4]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x10, #0
	add	x11, x0, #8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x8]
	str	x12, [x11]
	stur	w10, [x11, #-8]
	add	x10, x10, #1
	add	x11, x11, #16
	cmp	x9, x10
	b.ne	LBB0_7
LBB0_8:
Lloh2:
	adrp	x8, _MAX_PID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_PID@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x0, x8, #1
	bl	_vmalloc
	str	x0, [x19, #88]
	cbnz	x0, LBB0_10
; %bb.9:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_10:
	add	x0, x19, #80
	bl	_INIT_LIST_HEAD
Lloh7:
	adrp	x8, _DMX_PES_OTHER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DMX_PES_OTHER@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x9, #0
	mov	w10, #65535
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x19, #72]
	str	xzr, [x11, x9, lsl #3]
	ldr	x11, [x19, #8]
	str	w10, [x11, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x11, [x8]
	cmp	x9, x11
	b.lt	LBB0_12
LBB0_13:
	add	x0, x19, #64
	bl	_INIT_LIST_HEAD
	stp	xzr, xzr, [x19, #48]
	str	xzr, [x19, #40]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_19
; %bb.14:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_20
LBB0_15:
Lloh9:
	adrp	x8, _dvbdmx_open@GOTPAGE
Lloh10:
	ldr	x8, [x8, _dvbdmx_open@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #168]
Lloh12:
	adrp	x8, _dvbdmx_close@GOTPAGE
Lloh13:
	ldr	x8, [x8, _dvbdmx_close@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _dvbdmx_write@GOTPAGE
Lloh16:
	ldr	x9, [x9, _dvbdmx_write@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _dvbdmx_allocate_ts_feed@GOTPAGE
Lloh19:
	ldr	x10, [x10, _dvbdmx_allocate_ts_feed@GOTPAGEOFF]
	stp	w9, w8, [x19, #160]
Lloh20:
	ldr	w8, [x10]
Lloh21:
	adrp	x9, _dvbdmx_release_ts_feed@GOTPAGE
Lloh22:
	ldr	x9, [x9, _dvbdmx_release_ts_feed@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #152]
Lloh24:
	adrp	x8, _dvbdmx_allocate_section_feed@GOTPAGE
Lloh25:
	ldr	x8, [x8, _dvbdmx_allocate_section_feed@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _dvbdmx_release_section_feed@GOTPAGE
Lloh28:
	ldr	x9, [x9, _dvbdmx_release_section_feed@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #144]
Lloh30:
	adrp	x8, _dvbdmx_add_frontend@GOTPAGE
Lloh31:
	ldr	x8, [x8, _dvbdmx_add_frontend@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, _dvbdmx_remove_frontend@GOTPAGE
Lloh34:
	ldr	x9, [x9, _dvbdmx_remove_frontend@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
Lloh36:
	adrp	x10, _dvbdmx_get_frontends@GOTPAGE
Lloh37:
	ldr	x10, [x10, _dvbdmx_get_frontends@GOTPAGEOFF]
	stp	w9, w8, [x19, #136]
Lloh38:
	ldr	w8, [x10]
Lloh39:
	adrp	x9, _dvbdmx_connect_frontend@GOTPAGE
Lloh40:
	ldr	x9, [x9, _dvbdmx_connect_frontend@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #128]
Lloh42:
	adrp	x8, _dvbdmx_disconnect_frontend@GOTPAGE
Lloh43:
	ldr	x8, [x8, _dvbdmx_disconnect_frontend@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
Lloh45:
	adrp	x9, _dvbdmx_get_pes_pids@GOTPAGE
Lloh46:
	ldr	x9, [x9, _dvbdmx_get_pes_pids@GOTPAGEOFF]
Lloh47:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #120]
	add	x0, x19, #20
	stp	x19, xzr, [x19, #176]
	bl	_mutex_init
	add	x0, x19, #16
	bl	_spin_lock_init
	mov	w0, #0
	b	LBB0_18
LBB0_16:
	ldr	x0, [x19, #104]
	bl	_vfree
	str	xzr, [x19, #104]
LBB0_17:
Lloh48:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh49:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_19:
Lloh51:
	adrp	x8, _dvb_dmx_crc32@GOTPAGE
Lloh52:
	ldr	x8, [x8, _dvb_dmx_crc32@GOTPAGEOFF]
Lloh53:
	ldr	x8, [x8]
	str	x8, [x19, #32]
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_15
LBB0_20:
Lloh54:
	adrp	x8, _dvb_dmx_memcopy@GOTPAGE
Lloh55:
	ldr	x8, [x8, _dvb_dmx_memcopy@GOTPAGEOFF]
Lloh56:
	ldr	x8, [x8]
	str	x8, [x19, #24]
	b	LBB0_15
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMX_STATE_FREE,8,3             ; @DMX_STATE_FREE
	.comm	_MAX_PID,8,3                    ; @MAX_PID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't allocate memory for TS/TEI check. Disabling it\n"

	.comm	_DMX_PES_OTHER,4,2              ; @DMX_PES_OTHER
	.comm	_dvb_dmx_crc32,8,3              ; @dvb_dmx_crc32
	.comm	_dvb_dmx_memcopy,8,3            ; @dvb_dmx_memcopy
	.comm	_dvbdmx_open,4,2                ; @dvbdmx_open
	.comm	_dvbdmx_close,4,2               ; @dvbdmx_close
	.comm	_dvbdmx_write,4,2               ; @dvbdmx_write
	.comm	_dvbdmx_allocate_ts_feed,4,2    ; @dvbdmx_allocate_ts_feed
	.comm	_dvbdmx_release_ts_feed,4,2     ; @dvbdmx_release_ts_feed
	.comm	_dvbdmx_allocate_section_feed,4,2 ; @dvbdmx_allocate_section_feed
	.comm	_dvbdmx_release_section_feed,4,2 ; @dvbdmx_release_section_feed
	.comm	_dvbdmx_add_frontend,4,2        ; @dvbdmx_add_frontend
	.comm	_dvbdmx_remove_frontend,4,2     ; @dvbdmx_remove_frontend
	.comm	_dvbdmx_get_frontends,4,2       ; @dvbdmx_get_frontends
	.comm	_dvbdmx_connect_frontend,4,2    ; @dvbdmx_connect_frontend
	.comm	_dvbdmx_disconnect_frontend,4,2 ; @dvbdmx_disconnect_frontend
	.comm	_dvbdmx_get_pes_pids,4,2        ; @dvbdmx_get_pes_pids
.subsections_via_symbols
