	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ws_send_close                  ## -- Begin function ws_send_close
	.p2align	4, 0x90
_ws_send_close:                         ## @ws_send_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movl	%esi, %r12d
	movq	%rdi, %r14
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%r13, %rdi
	callq	_strlen
	addl	$2, %eax
	movslq	%eax, %r15
	jmp	LBB0_3
LBB0_1:
	movl	$2, %r15d
LBB0_3:
	leaq	1(%r15), %rdi
	movl	$1, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %rbx
	rolw	$8, %r12w
	movw	%r12w, (%rax)
	testq	%r13, %r13
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	addq	$2, %rdi
	movq	%r13, %rsi
	callq	_strcpy
LBB0_8:
	movq	_OPCODE_CLOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	movq	%r15, %r9
	callq	*(%r14)
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_free
	movl	%r14d, %eax
	jmp	LBB0_5
LBB0_4:
	movq	_WS_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WS_ERROR,4,2                   ## @WS_ERROR
	.comm	_OPCODE_CLOSE,4,2               ## @OPCODE_CLOSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ws_send_close                  ; -- Begin function ws_send_close
	.p2align	2
_ws_send_close:                         ; @ws_send_close
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
	cbz	x2, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_strlen
	add	w8, w0, #2
	sxtw	x20, w8
	b	LBB0_3
LBB0_2:
	mov	w20, #2
LBB0_3:
	add	x0, x20, #1
	mov	w1, #1
	bl	_calloc
	cbz	x0, LBB0_7
; %bb.4:
	mov	x22, x0
	rev	w8, w23
	lsr	w8, w8, #16
	strh	w8, [x0]
	cbz	x21, LBB0_6
; %bb.5:
	add	x0, x22, #2
	mov	x1, x21
	bl	_strcpy
LBB0_6:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _OPCODE_CLOSE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OPCODE_CLOSE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
	mov	x0, x19
	mov	w1, #1
	mov	w3, #0
	mov	x4, x22
	mov	x5, x20
	blr	x8
	mov	x19, x0
	mov	x0, x22
	bl	_free
	mov	x0, x19
	b	LBB0_8
LBB0_7:
Lloh3:
	adrp	x8, _WS_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WS_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_8:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_WS_ERROR,4,2                   ; @WS_ERROR
	.comm	_OPCODE_CLOSE,4,2               ; @OPCODE_CLOSE
.subsections_via_symbols
