	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_clear_client                   ## -- Begin function clear_client
	.p2align	4, 0x90
_clear_client:                          ## @clear_client
	.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	40(%rdi), %r14
	movq	_verbosity@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	jle	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_2:
	movq	8(%rbx), %rax
	movq	_C_INCONN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	40(%rbx), %rax
	movl	32(%rax), %edi
	callq	_inet_ntoa
	movq	40(%rbx), %rcx
	movl	(%rcx), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_5
LBB0_4:
	movq	8(%r14), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, 8(%r14)
	xorl	%edi, %edi
	testq	%rax, %rax
	setg	%dil
	callq	_assert
	movq	_active_outbound_connections@GOTPCREL(%rip), %rax
	decl	(%rax)
LBB0_5:
	movq	16(%r14), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, 16(%r14)
	xorl	%edi, %edi
	testq	%rax, %rax
	setg	%dil
	callq	_assert
	movq	_outbound_connections@GOTPCREL(%rip), %rax
	decl	(%rax)
	movq	24(%rbx), %rax
	movq	32(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.6:
	movq	%rax, (%rcx)
LBB0_7:
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rcx, 32(%rax)
LBB0_9:
	cmpq	%rbx, 40(%r14)
	jne	LBB0_11
## %bb.10:
	movq	%rax, 40(%r14)
LBB0_11:
	movq	%rbx, %rdi
	callq	_free_connection_buffers
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	$0, (%rax)
LBB0_13:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	16(%r14), %rdi
	shrq	$63, %rdi
	xorl	$1, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_assert
	cmpq	$0, 16(%r14)
	jne	LBB0_18
## %bb.14:
	movq	$0, 40(%r14)
	movq	_now@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	24(%r14), %rax
	jl	LBB0_18
## %bb.15:
	incq	%rax
	movq	%rax, 24(%r14)
	incl	36(%r14)
	cmpq	$0, (%r12)
	jle	LBB0_17
## %bb.16:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	32(%r14), %edi
	callq	_inet_ntoa
	movl	(%r14), %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_17:
	movq	%r14, %rdi
	callq	_create_client
LBB0_18:
	movq	_EVA_DESTROY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verbosity,8,3                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cleaning outbound socket %d...\n"

	.comm	_C_INCONN,8,3                   ## @C_INCONN
L_.str.1:                               ## @.str.1
	.asciz	"could not connect to %s:%d\n"

	.comm	_active_outbound_connections,4,2 ## @active_outbound_connections
	.comm	_outbound_connections,4,2       ## @outbound_connections
	.comm	_now,8,3                        ## @now
L_.str.2:                               ## @.str.2
	.asciz	"trying to reconnect to %s:%d...\n"

	.comm	_EVA_DESTROY,4,2                ## @EVA_DESTROY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_clear_client                   ; -- Begin function clear_client
	.p2align	2
_clear_client:                          ; @clear_client
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	ldr	x19, [x0, #40]
Lloh0:
	adrp	x22, _verbosity@GOTPAGE
Lloh1:
	ldr	x22, [x22, _verbosity@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_2:
	ldr	x8, [x20, #8]
Lloh7:
	adrp	x9, _C_INCONN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _C_INCONN@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh10:
	adrp	x8, _stderr@GOTPAGE
Lloh11:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh12:
	ldr	w21, [x8]
	ldr	x8, [x20, #40]
	ldr	w0, [x8, #32]
	bl	_inet_ntoa
	ldr	x8, [x20, #40]
	ldr	w8, [x8]
	stp	x0, x8, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	b	LBB0_5
LBB0_4:
	ldr	x8, [x19, #8]
	sub	x9, x8, #1
	str	x9, [x19, #8]
	cmp	x8, #0
	cset	w0, gt
	bl	_assert
Lloh15:
	adrp	x8, _active_outbound_connections@GOTPAGE
Lloh16:
	ldr	x8, [x8, _active_outbound_connections@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
LBB0_5:
	ldr	x8, [x19, #16]
	sub	x9, x8, #1
	str	x9, [x19, #16]
	cmp	x8, #0
	cset	w0, gt
	bl	_assert
Lloh17:
	adrp	x8, _outbound_connections@GOTPAGE
Lloh18:
	ldr	x8, [x8, _outbound_connections@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
	ldp	x8, x9, [x20, #24]
	cbz	x9, LBB0_7
; %bb.6:
	str	x8, [x9]
LBB0_7:
	cbz	x8, LBB0_9
; %bb.8:
	str	x9, [x8, #32]
LBB0_9:
	ldr	x9, [x19, #40]
	cmp	x9, x20
	b.ne	LBB0_11
; %bb.10:
	str	x8, [x19, #40]
LBB0_11:
	mov	x0, x20
	bl	_free_connection_buffers
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_13
; %bb.12:
	str	xzr, [x8]
LBB0_13:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	ldr	x8, [x19, #16]
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
	bl	_assert
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_18
; %bb.14:
	str	xzr, [x19, #40]
Lloh19:
	adrp	x8, _now@GOTPAGE
Lloh20:
	ldr	x8, [x8, _now@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	ldr	x9, [x19, #24]
	cmp	x8, x9
	b.lt	LBB0_18
; %bb.15:
	add	x8, x8, #1
	str	x8, [x19, #24]
	ldr	w8, [x19, #36]
	add	w8, w8, #1
	str	w8, [x19, #36]
	ldr	x8, [x22]
	cmp	x8, #1
	b.lt	LBB0_17
; %bb.16:
Lloh22:
	adrp	x8, _stderr@GOTPAGE
Lloh23:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh24:
	ldr	w20, [x8]
	ldr	w0, [x19, #32]
	bl	_inet_ntoa
	ldr	w8, [x19]
	stp	x0, x8, [sp]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_fprintf
LBB0_17:
	mov	x0, x19
	bl	_create_client
LBB0_18:
Lloh27:
	adrp	x8, _EVA_DESTROY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EVA_DESTROY@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cleaning outbound socket %d...\n"

	.comm	_C_INCONN,8,3                   ; @C_INCONN
l_.str.1:                               ; @.str.1
	.asciz	"could not connect to %s:%d\n"

	.comm	_active_outbound_connections,4,2 ; @active_outbound_connections
	.comm	_outbound_connections,4,2       ; @outbound_connections
	.comm	_now,8,3                        ; @now
l_.str.2:                               ; @.str.2
	.asciz	"trying to reconnect to %s:%d...\n"

	.comm	_EVA_DESTROY,4,2                ; @EVA_DESTROY
.subsections_via_symbols
