	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_dvb_adapter_init
_pvr2_dvb_adapter_init:                 ## @pvr2_dvb_adapter_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	80(%rdi), %rax
	movq	(%rax), %rcx
	movq	_adapter_nr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	callq	_dvb_register_adapter
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%rbx, (%rbx)
	movq	_DMX_TS_FILTERING@GOTPCREL(%rip), %rax
	movq	_DMX_SECTION_FILTERING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_DMX_MEMORY_BASED_FILTERING@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	leaq	8(%rbx), %r15
	movl	%ecx, 16(%rbx)
	movq	%rbx, 40(%rbx)
	movabsq	$1099511628032, %rax            ## imm = 0x10000000100
	movq	%rax, 8(%rbx)
	movq	_pvr2_dvb_start_feed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_pvr2_dvb_stop_feed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	$0, 24(%rbx)
	movq	%r15, %rdi
	callq	_dvb_dmx_init
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	leaq	16(%rbx), %r12
	movl	8(%rbx), %eax
	leaq	56(%rbx), %rdi
	movl	%eax, 56(%rbx)
	movq	%r12, 72(%rbx)
	movq	$0, 64(%rbx)
	movq	%rbx, %rsi
	callq	_dvb_dmxdev_init
	testl	%eax, %eax
	js	LBB0_5
## %bb.8:
	leaq	48(%rbx), %rsi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_dvb_net_init
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %r14d
	movq	_PVR2_TRACE_ERROR_LEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	callq	_pvr2_trace
	jmp	LBB0_7
LBB0_3:
	movl	%eax, %r14d
	movq	_PVR2_TRACE_ERROR_LEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	callq	_pvr2_trace
	jmp	LBB0_6
LBB0_5:
	movl	%eax, %r14d
	movq	_PVR2_TRACE_ERROR_LEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edx
	callq	_pvr2_trace
	movq	%r15, %rdi
	callq	_dvb_dmx_release
LBB0_6:
	movq	%rbx, %rdi
	callq	_dvb_unregister_adapter
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pvrusb2-dvb"

	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_adapter_nr,4,2                 ## @adapter_nr
	.comm	_PVR2_TRACE_ERROR_LEGS,4,2      ## @PVR2_TRACE_ERROR_LEGS
L_.str.1:                               ## @.str.1
	.asciz	"dvb_register_adapter failed: error %d"

	.comm	_DMX_TS_FILTERING,4,2           ## @DMX_TS_FILTERING
	.comm	_DMX_SECTION_FILTERING,4,2      ## @DMX_SECTION_FILTERING
	.comm	_DMX_MEMORY_BASED_FILTERING,4,2 ## @DMX_MEMORY_BASED_FILTERING
	.comm	_pvr2_dvb_start_feed,4,2        ## @pvr2_dvb_start_feed
	.comm	_pvr2_dvb_stop_feed,4,2         ## @pvr2_dvb_stop_feed
L_.str.2:                               ## @.str.2
	.asciz	"dvb_dmx_init failed: error %d"

L_.str.3:                               ## @.str.3
	.asciz	"dvb_dmxdev_init failed: error %d"

	.no_dead_strip	_pvr2_dvb_adapter_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_dvb_adapter_init
_pvr2_dvb_adapter_init:                 ; @pvr2_dvb_adapter_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	ldr	x8, [x0, #80]
	ldr	x3, [x8]
Lloh3:
	adrp	x8, _adapter_nr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _adapter_nr@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dvb_register_adapter
	tbnz	w0, #31, LBB0_4
; %bb.1:
	str	x19, [x19]
Lloh8:
	adrp	x8, _DMX_TS_FILTERING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMX_TS_FILTERING@GOTPAGEOFF]
Lloh10:
	adrp	x9, _DMX_SECTION_FILTERING@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DMX_SECTION_FILTERING@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _DMX_MEMORY_BASED_FILTERING@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DMX_MEMORY_BASED_FILTERING@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
	movi.2s	v0, #1, lsl #8
	mov	x21, x19
	str	d0, [x21, #8]!
	mov	x22, x19
	str	w8, [x22, #16]!
	str	x19, [x19, #40]
Lloh17:
	adrp	x8, _pvr2_dvb_start_feed@GOTPAGE
Lloh18:
	ldr	x8, [x8, _pvr2_dvb_start_feed@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _pvr2_dvb_stop_feed@GOTPAGE
Lloh21:
	ldr	x9, [x9, _pvr2_dvb_stop_feed@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #32]
	str	xzr, [x19, #24]
	mov	x0, x21
	bl	_dvb_dmx_init
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	w8, [x19, #8]
	mov	x0, x19
	str	w8, [x0, #56]!
	stp	xzr, x22, [x19, #64]
	mov	x1, x19
	bl	_dvb_dmxdev_init
	tbnz	w0, #31, LBB0_6
; %bb.3:
	add	x1, x19, #48
	mov	x0, x19
	mov	x2, x22
	bl	_dvb_net_init
	mov	w20, #0
	b	LBB0_8
LBB0_4:
	mov	x20, x0
Lloh23:
	adrp	x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_pvr2_trace
	b	LBB0_8
LBB0_5:
	mov	x20, x0
Lloh28:
	adrp	x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_pvr2_trace
	b	LBB0_7
LBB0_6:
	mov	x20, x0
Lloh33:
	adrp	x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	bl	_pvr2_trace
	mov	x0, x21
	bl	_dvb_dmx_release
LBB0_7:
	mov	x0, x19
	bl	_dvb_unregister_adapter
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pvrusb2-dvb"

	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_adapter_nr,4,2                 ; @adapter_nr
	.comm	_PVR2_TRACE_ERROR_LEGS,4,2      ; @PVR2_TRACE_ERROR_LEGS
l_.str.1:                               ; @.str.1
	.asciz	"dvb_register_adapter failed: error %d"

	.comm	_DMX_TS_FILTERING,4,2           ; @DMX_TS_FILTERING
	.comm	_DMX_SECTION_FILTERING,4,2      ; @DMX_SECTION_FILTERING
	.comm	_DMX_MEMORY_BASED_FILTERING,4,2 ; @DMX_MEMORY_BASED_FILTERING
	.comm	_pvr2_dvb_start_feed,4,2        ; @pvr2_dvb_start_feed
	.comm	_pvr2_dvb_stop_feed,4,2         ; @pvr2_dvb_stop_feed
l_.str.2:                               ; @.str.2
	.asciz	"dvb_dmx_init failed: error %d"

l_.str.3:                               ; @.str.3
	.asciz	"dvb_dmxdev_init failed: error %d"

	.no_dead_strip	_pvr2_dvb_adapter_init
.subsections_via_symbols
