	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function poseidon_disconnect
_poseidon_disconnect:                   ## @poseidon_disconnect
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_get_pd
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_logpm
	movq	%rbx, %rdi
	callq	_in_hibernation
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	12(%rbx), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_POSEIDON_STATE_DISCONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_stop_all_video_stream
	leaq	8(%rbx), %rdi
	callq	_dvb_stop_streaming
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_v4l2_device_unregister
	movq	%rbx, %rdi
	callq	_pd_dvb_usb_device_exit
	movq	%rbx, %rdi
	callq	_poseidon_fm_exit
	movq	%rbx, %rdi
	callq	_poseidon_audio_free
	movq	%rbx, %rdi
	callq	_pd_video_exit
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_usb_set_intfdata
	movq	_poseidon_delete@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kref_put                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_POSEIDON_STATE_DISCONNECT,4,2  ## @POSEIDON_STATE_DISCONNECT
	.comm	_poseidon_delete,4,2            ## @poseidon_delete
	.no_dead_strip	_poseidon_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function poseidon_disconnect
_poseidon_disconnect:                   ; @poseidon_disconnect
	.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	x20, x0
	bl	_get_pd
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	bl	_logpm
	mov	x0, x19
	bl	_in_hibernation
	cbz	x0, LBB0_3
LBB0_2:
	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
LBB0_3:
	add	x21, x19, #12
	mov	x0, x21
	bl	_mutex_lock
Lloh0:
	adrp	x8, _POSEIDON_STATE_DISCONNECT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POSEIDON_STATE_DISCONNECT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
	bl	_stop_all_video_stream
	add	x0, x19, #8
	bl	_dvb_stop_streaming
	add	x0, x19, #4
	bl	_v4l2_device_unregister
	mov	x0, x19
	bl	_pd_dvb_usb_device_exit
	mov	x0, x19
	bl	_poseidon_fm_exit
	mov	x0, x19
	bl	_poseidon_audio_free
	mov	x0, x19
	bl	_pd_video_exit
	mov	x0, x20
	mov	x1, #0
	bl	_usb_set_intfdata
Lloh3:
	adrp	x8, _poseidon_delete@GOTPAGE
Lloh4:
	ldr	x8, [x8, _poseidon_delete@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_kref_put
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_POSEIDON_STATE_DISCONNECT,4,2  ; @POSEIDON_STATE_DISCONNECT
	.comm	_poseidon_delete,4,2            ; @poseidon_delete
	.no_dead_strip	_poseidon_disconnect
.subsections_via_symbols
