	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ws_error
_ws_error:                              ## @ws_error
	.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	%rbx
	subq	$152, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm0, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movl	%esi, %edi
	callq	_htobe16
	movw	%ax, -162(%rbp)
	leaq	-160(%rbp), %rdi
	leaq	-162(%rbp), %rsi
	movl	$2, %ebx
	movl	$2, %edx
	callq	_memcpy
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	leaq	-158(%rbp), %rdi
	leaq	L_.str(%rip), %rdx
	movl	$124, %esi
	movq	%r15, %rcx
	callq	_snprintf
	movq	%rax, %rbx
	addl	$2, %ebx
LBB0_2:
	movq	_WS_OPCODE_CLOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-160(%rbp), %rdx
	movq	%r14, %rdi
	movl	%ebx, %ecx
	callq	_ws_send_frame
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	addq	$152, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_WS_OPCODE_CLOSE,4,2            ## @WS_OPCODE_CLOSE
	.no_dead_strip	_ws_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ws_error
_ws_error:                              ; @ws_error
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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, x2
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #112]
	stp	q0, q0, [sp, #80]
	stp	q0, q0, [sp, #48]
	stp	q0, q0, [sp, #16]
	mov	x0, x1
	bl	_htobe16
	strh	w0, [sp, #14]
	add	x22, sp, #16
	mov	w21, #2
	add	x0, sp, #16
	add	x1, sp, #14
	mov	w2, #2
	bl	_memcpy
	cbz	x20, LBB0_2
; %bb.1:
	orr	x0, x22, #0x2
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #124
	mov	x3, x20
	bl	_snprintf
	add	w21, w0, #2
LBB0_2:
Lloh5:
	adrp	x8, _WS_OPCODE_CLOSE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WS_OPCODE_CLOSE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x19
	mov	x3, x21
	bl	_ws_send_frame
	ldur	x8, [x29, #-40]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_WS_OPCODE_CLOSE,4,2            ; @WS_OPCODE_CLOSE
	.no_dead_strip	_ws_error
.subsections_via_symbols
