	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pd_dvb_usb_device_init         ## -- Begin function pd_dvb_usb_device_init
	.p2align	4, 0x90
_pd_dvb_usb_device_init:                ## @pd_dvb_usb_device_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
	movl	$130, (%rdi)
	addq	$100, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	96(%rbx), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movq	%rbx, 88(%rbx)
	leaq	4(%rbx), %r14
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_adapter_nr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_dvb_register_adapter
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	8(%rbx), %r15
	movq	%rbx, 16(%rbx)
	movq	_poseidon_frontend_ops@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_memcpy
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_dvb_register_frontend
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_DMX_TS_FILTERING@GOTPCREL(%rip), %rax
	movq	_DMX_SECTION_FILTERING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	48(%rbx), %rdi
	movl	%ecx, 56(%rbx)
	movq	%rbx, 80(%rbx)
	movabsq	$274877907008, %rax             ## imm = 0x4000000040
	movq	%rax, 48(%rbx)
	movq	_pd_start_feed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 76(%rbx)
	movq	_pd_stop_feed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%rbx)
	movq	$0, 64(%rbx)
	callq	_dvb_dmx_init
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	leaq	56(%rbx), %rax
	movl	52(%rbx), %ecx
	leaq	24(%rbx), %rdi
	movl	%ecx, 24(%rbx)
	movq	%rax, 40(%rbx)
	movq	$0, 32(%rbx)
	movq	%r14, %rsi
	callq	_dvb_dmxdev_init
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jns	LBB0_8
LBB0_6:
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_dvb_unregister_frontend
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %r12d
	jmp	LBB0_8
LBB0_3:
	movl	%eax, %r12d
LBB0_7:
	movq	%r14, %rdi
	callq	_dvb_unregister_adapter
LBB0_8:
	movl	%r12d, %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	"Poseidon dvbt adapter"

	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_adapter_nr,4,2                 ## @adapter_nr
	.comm	_poseidon_frontend_ops,4,2      ## @poseidon_frontend_ops
	.comm	_DMX_TS_FILTERING,4,2           ## @DMX_TS_FILTERING
	.comm	_DMX_SECTION_FILTERING,4,2      ## @DMX_SECTION_FILTERING
	.comm	_pd_start_feed,4,2              ## @pd_start_feed
	.comm	_pd_stop_feed,4,2               ## @pd_stop_feed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pd_dvb_usb_device_init         ; -- Begin function pd_dvb_usb_device_init
	.p2align	2
_pd_dvb_usb_device_init:                ; @pd_dvb_usb_device_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	mov	w8, #130
	str	w8, [x0], #100
	mov	w1, #0
	bl	_atomic_set
	add	x0, x20, #96
	mov	w1, #0
	bl	_atomic_set
	str	x20, [x20, #88]
	add	x19, x20, #4
Lloh0:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [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
	mov	x0, x19
	mov	x3, #0
	bl	_dvb_register_adapter
	tbnz	w0, #31, LBB0_5
; %bb.1:
	add	x21, x20, #8
	str	x20, [x20, #16]
Lloh8:
	adrp	x1, _poseidon_frontend_ops@GOTPAGE
Lloh9:
	ldr	x1, [x1, _poseidon_frontend_ops@GOTPAGEOFF]
	mov	x0, x21
	mov	w2, #4
	bl	_memcpy
	mov	x0, x19
	mov	x1, x21
	bl	_dvb_register_frontend
	tbnz	w0, #31, LBB0_6
; %bb.2:
Lloh10:
	adrp	x8, _DMX_TS_FILTERING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DMX_TS_FILTERING@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _DMX_SECTION_FILTERING@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DMX_SECTION_FILTERING@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mov	x23, x20
	str	w8, [x23, #56]!
	str	x20, [x20, #80]
	movi.2s	v0, #64
	mov	x0, x20
	str	d0, [x0, #48]!
Lloh16:
	adrp	x8, _pd_start_feed@GOTPAGE
Lloh17:
	ldr	x8, [x8, _pd_start_feed@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _pd_stop_feed@GOTPAGE
Lloh20:
	ldr	x9, [x9, _pd_stop_feed@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #72]
	str	xzr, [x20, #64]
	bl	_dvb_dmx_init
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	w8, [x20, #52]
	str	w8, [x20, #24]!
	stp	xzr, x23, [x20, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_dvb_dmxdev_init
	tbnz	w0, #31, LBB0_7
; %bb.4:
	mov	w22, #0
	b	LBB0_9
LBB0_5:
	mov	x22, x0
	b	LBB0_9
LBB0_6:
	mov	x22, x0
	b	LBB0_8
LBB0_7:
	mov	x22, x0
	mov	x0, x21
	bl	_dvb_unregister_frontend
LBB0_8:
	mov	x0, x19
	bl	_dvb_unregister_adapter
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Poseidon dvbt adapter"

	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_adapter_nr,4,2                 ; @adapter_nr
	.comm	_poseidon_frontend_ops,4,2      ; @poseidon_frontend_ops
	.comm	_DMX_TS_FILTERING,4,2           ; @DMX_TS_FILTERING
	.comm	_DMX_SECTION_FILTERING,4,2      ; @DMX_SECTION_FILTERING
	.comm	_pd_start_feed,4,2              ; @pd_start_feed
	.comm	_pd_stop_feed,4,2               ; @pd_stop_feed
.subsections_via_symbols
