	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_connection_close               ## -- Begin function connection_close
	.p2align	4, 0x90
_connection_close:                      ## @connection_close
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	cmpq	$0, 104(%rbx)
	je	LBB0_6
## %bb.1:
	movl	128(%rbx), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	xorps	%xmm0, %xmm0
	movups	%xmm0, 112(%rbx)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 104(%rbx)
	movq	%rax, 96(%rbx)
	movq	%rax, 88(%rbx)
	movl	80(%rbx), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	$0, 72(%rbx)
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.2:
	cmpq	$0, 64(%rbx)
	je	LBB0_4
## %bb.3:
	addq	$8, %rdi
	callq	_ATOMIC_INC
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	24(%rbx), %ecx
	movl	56(%rbx), %edi
	movzbl	%cl, %r12d
	movzbl	%ch, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %eax
	shrl	$16, %eax
	movzbl	%al, %r13d
	shrl	$24, %ecx
	movl	%ecx, %r15d
	callq	_ntohs
	movups	32(%rbx), %xmm0
	movq	48(%rbx), %rcx
	movq	%rcx, 24(%rsp)
	movups	%xmm0, 8(%rsp)
	movl	%eax, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_9:
	leaq	L_str(%rip), %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_puts                           ## TAILCALL
LBB0_4:
	addq	$4, %rdi
	callq	_ATOMIC_INC
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	24(%rbx), %ecx
	movl	56(%rbx), %edi
	movzbl	%cl, %r12d
	movzbl	%ch, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %eax
	shrl	$16, %eax
	movzbl	%al, %r13d
	shrl	$24, %ecx
	movl	%ecx, %r15d
	callq	_ntohs
	movups	32(%rbx), %xmm0
	movq	48(%rbx), %rcx
	movl	4(%rbx), %edx
	movl	%edx, 32(%rsp)
	movq	%rcx, 24(%rsp)
	movups	%xmm0, 8(%rsp)
	movl	%eax, (%rsp)
	leaq	L_.str.2(%rip), %rsi
LBB0_5:
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%r12d, %edx
	movl	%r15d, %r9d
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r13d, %r8d
	xorl	%eax, %eax
	callq	_fprintf
LBB0_6:
	movq	_TELNET_CLOSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	(%rbx), %edi
	cmpl	$-1, %edi
	je	LBB0_8
## %bb.7:
	callq	_close
	movl	$-1, (%rbx)
	movq	16(%rbx), %rdi
	callq	_ATOMIC_DEC
LBB0_8:
	movq	%r14, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pthread_mutex_unlock           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"OK|%d.%d.%d.%d:%d %s:%s %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"ERR|%d.%d.%d.%d:%d %s:%s %s|%d\n"

	.comm	_TELNET_CLOSED,4,2              ## @TELNET_CLOSED
L_str:                                  ## @str
	.asciz	"srv == NULL"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_connection_close               ; -- Begin function connection_close
	.p2align	2
_connection_close:                      ; @connection_close
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_pthread_mutex_lock
	ldr	x8, [x20, #104]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	w0, [x20, #128]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	xzr, [x20, #120]
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stp	x8, xzr, [x20, #104]
	stp	x8, x8, [x20, #88]
	ldr	w0, [x20, #80]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	xzr, [x20, #72]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x9, [x20, #64]
	cbz	x9, LBB0_5
; %bb.3:
	add	x0, x8, #8
	bl	_ATOMIC_INC
Lloh3:
	adrp	x8, _stderr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	ldr	w8, [x20, #24]
	and	w22, w8, #0xff
	ubfx	w23, w8, #8, #8
	ubfx	w24, w8, #16, #8
	lsr	w25, w8, #24
	ldr	w0, [x20, #56]
	bl	_ntohs
	mov	x6, x0
	ldp	x7, x8, [x20, #32]
	ldr	x9, [x20, #48]
	stp	x8, x9, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x0, l_str@PAGE
Lloh9:
	add	x0, x0, l_str@PAGEOFF
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_puts
LBB0_5:
	add	x0, x8, #4
	bl	_ATOMIC_INC
Lloh10:
	adrp	x8, _stderr@GOTPAGE
Lloh11:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh12:
	ldr	w21, [x8]
	ldr	w8, [x20, #24]
	and	w22, w8, #0xff
	ubfx	w23, w8, #8, #8
	ubfx	w24, w8, #16, #8
	lsr	w25, w8, #24
	ldr	w0, [x20, #56]
	bl	_ntohs
	mov	x6, x0
	ldp	x7, x8, [x20, #32]
	ldr	x9, [x20, #48]
	ldr	w10, [x20, #4]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x21
	mov	x2, x22
	mov	x3, x23
	mov	x4, x24
	mov	x5, x25
	bl	_fprintf
LBB0_7:
Lloh15:
	adrp	x8, _TELNET_CLOSED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TELNET_CLOSED@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	ldr	w0, [x20]
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.8:
	bl	_close
	mov	w8, #-1
	str	w8, [x20]
	ldr	x0, [x20, #16]
	bl	_ATOMIC_DEC
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_pthread_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"OK|%d.%d.%d.%d:%d %s:%s %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"ERR|%d.%d.%d.%d:%d %s:%s %s|%d\n"

	.comm	_TELNET_CLOSED,4,2              ; @TELNET_CLOSED
l_str:                                  ; @str
	.asciz	"srv == NULL"

.subsections_via_symbols
