	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_StopLink                       ## -- Begin function StopLink
	.p2align	4, 0x90
_StopLink:                              ## @StopLink
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	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
	callq	_LockLink
	cmpl	$0, (%rbx)
	je	LBB0_5
## %bb.2:
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, (%rbx)
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	callq	_Dec
	movq	%rbx, %rdi
	callq	_UnlockLink
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_StopSession
	movq	%rbx, %rdi
	callq	_LockLink
	movq	8(%rbx), %rdi
	callq	_ReleaseSession
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	callq	_UnlockLink
LBB0_4:
	movq	%rbx, %rdi
	callq	_LockLink
	movl	$0, 4(%rbx)
LBB0_5:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_UnlockLink                     ## TAILCALL
LBB0_6:
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function StopLink
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_StopLink
	.p2align	2
_StopLink:                              ; @StopLink
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_6
; %bb.1:
	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
	bl	_LockLink
	ldr	w8, [x19]
	cbz	w8, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_Dec
	mov	x0, x19
	bl	_UnlockLink
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_StopSession
	mov	x0, x19
	bl	_LockLink
	ldr	x0, [x19, #8]
	bl	_ReleaseSession
	str	xzr, [x19, #8]
	mov	x0, x19
	bl	_UnlockLink
LBB0_4:
	mov	x0, x19
	bl	_LockLink
	str	wzr, [x19, #4]
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_UnlockLink
LBB0_6:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
