	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_tcp_close
_handle_tcp_close:                      ## @handle_tcp_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movl	%edi, %r15d
	movq	_SHUT_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_shutdown
	movq	24(%r14), %rax
	movq	_wsconfig@GOTPCREL(%rip), %r12
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	cmpq	$0, 16(%r12)
	je	LBB0_4
## %bb.2:
	cmpl	$0, 8(%r12)
	jne	LBB0_4
## %bb.3:
	movl	16(%r14), %edi
	movq	%rbx, %rsi
	callq	*%rax
LBB0_4:
	leaq	16(%rbx), %rdi
	xorl	%esi, %esi
	callq	_gettimeofday
	cmpq	$0, (%r12)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	movl	$200, %esi
	callq	_access_log
LBB0_6:
	movq	_WS_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_ws_clear_queue
	movq	%rbx, %rdi
	callq	_ws_free_frame
	movq	%rbx, %rdi
	callq	_ws_free_message
LBB0_8:
	movq	$0, 8(%r14)
	movl	%r15d, %edi
	callq	_ws_close
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ws_remove_client_from_list
	movl	(%r14), %edi
	callq	_list_count
	movslq	%eax, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_LOG                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SHUT_RDWR,4,2                  ## @SHUT_RDWR
	.comm	_wsconfig,24,3                  ## @wsconfig
	.comm	_WS_ERR,4,2                     ## @WS_ERR
	.no_dead_strip	_handle_tcp_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_tcp_close
_handle_tcp_close:                      ; @handle_tcp_close
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _SHUT_RDWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SHUT_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_shutdown
Lloh3:
	adrp	x22, _wsconfig@GOTPAGE
Lloh4:
	ldr	x22, [x22, _wsconfig@GOTPAGEOFF]
	ldr	x8, [x19, #24]
	ldr	x9, [x22, #16]
	ldr	w10, [x22, #8]
	cmp	x8, #0
	ccmp	x9, #0, #4, ne
	ccmp	w10, #0, #0, ne
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19, #16]
	mov	x1, x20
	blr	x8
LBB0_2:
	add	x0, x20, #16
	mov	x1, #0
	bl	_gettimeofday
	ldr	x8, [x22]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x20
	mov	w1, #200
	bl	_access_log
LBB0_4:
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _WS_ERR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WS_ERR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_ws_clear_queue
	mov	x0, x20
	bl	_ws_free_frame
	mov	x0, x20
	bl	_ws_free_message
LBB0_6:
	str	xzr, [x19, #8]
	mov	x0, x21
	bl	_ws_close
	mov	x0, x20
	mov	x1, x19
	bl	_ws_remove_client_from_list
	ldr	w0, [x19]
	bl	_list_count
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	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	_LOG
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SHUT_RDWR,4,2                  ; @SHUT_RDWR
	.comm	_wsconfig,24,3                  ; @wsconfig
	.comm	_WS_ERR,4,2                     ; @WS_ERR
	.no_dead_strip	_handle_tcp_close
.subsections_via_symbols
