	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ws_handle_ping
_ws_handle_ping:                        ## @ws_handle_ping
	.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, %r14
	movq	16(%rdi), %rax
	cmpl	$0, 8(%rax)
	je	LBB0_8
## %bb.1:
	movslq	(%rax), %rbx
	cmpl	$126, %ebx
	jl	LBB0_2
LBB0_8:
	movq	_WS_CLOSE_PROTO_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WS_ERR@GOTPCREL(%rip), %rax
	movq	_WS_CLOSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ws_handle_err                  ## TAILCALL
LBB0_2:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.3:
	movq	8(%r14), %rax
	movslq	(%rax), %r12
	subq	%rbx, %r12
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_xcalloc
	movq	%rax, %r15
	movq	8(%r14), %rax
	addq	8(%rax), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movq	16(%r14), %rax
	movl	4(%rax), %ecx
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_ws_unmask_payload
	movq	8(%r14), %rax
	movl	(%rax), %r12d
	movq	8(%rax), %rdi
	movl	%r12d, %esi
	subl	%ebx, %esi
	callq	_realloc
	movq	8(%r14), %rcx
	cmpl	%ebx, %r12d
	jle	LBB0_5
## %bb.4:
	testq	%rax, %rax
	jne	LBB0_5
## %bb.10:
	movq	8(%rcx), %rdi
	callq	_free
	movq	%r15, %rdi
	callq	_free
	movq	8(%r14), %rax
	movq	$0, 8(%rax)
	movq	_WS_ERR@GOTPCREL(%rip), %rax
	movq	_WS_CLOSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_WS_OPCODE_PONG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ws_send_frame                  ## TAILCALL
LBB0_5:
	movq	%rax, 8(%rcx)
	movq	8(%r14), %rax
	subl	%ebx, (%rax)
	movq	_WS_OPCODE_PONG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	callq	_ws_send_frame
	movq	8(%r14), %rax
	movq	$0, 24(%rax)
	cmpl	$0, 16(%rax)
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_ws_free_message
LBB0_7:
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WS_CLOSE_PROTO_ERR,4,2         ## @WS_CLOSE_PROTO_ERR
	.comm	_WS_ERR,4,2                     ## @WS_ERR
	.comm	_WS_CLOSE,4,2                   ## @WS_CLOSE
	.comm	_WS_OPCODE_PONG,4,2             ## @WS_OPCODE_PONG
	.no_dead_strip	_ws_handle_ping
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ws_handle_ping
_ws_handle_ping:                        ; @ws_handle_ping
	.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, x0
	ldr	x8, [x0, #16]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_2
; %bb.1:
	ldrsw	x21, [x8]
	cmp	w21, #126
	b.lt	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _WS_CLOSE_PROTO_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WS_CLOSE_PROTO_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _WS_ERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WS_ERR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _WS_CLOSE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WS_CLOSE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	x3, #0
	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	_ws_handle_err
LBB0_3:
	cbz	w21, LBB0_8
; %bb.4:
	ldr	x8, [x19, #8]
	ldrsw	x8, [x8]
	sub	x22, x8, x21
	mov	x0, x21
	mov	w1, #1
	bl	_xcalloc
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	add	x1, x8, x22
	mov	x2, x21
	bl	_memcpy
	ldr	x8, [x19, #16]
	ldr	w3, [x8, #4]
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_ws_unmask_payload
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	sub	w22, w9, w21
	ldr	x0, [x8, #8]
	mov	x1, x22
	bl	_realloc
	ldr	x8, [x19, #8]
	cmp	w22, #1
	ccmp	x0, #0, #0, ge
	b.eq	LBB0_9
; %bb.5:
	str	x0, [x8, #8]
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	sub	w9, w9, w21
	str	w9, [x8]
Lloh9:
	adrp	x8, _WS_OPCODE_PONG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WS_OPCODE_PONG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_ws_send_frame
	ldr	x8, [x19, #8]
	str	xzr, [x8, #24]
	ldr	w8, [x8, #16]
	cbnz	w8, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_ws_free_message
LBB0_7:
	mov	x0, x20
	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	_free
LBB0_8:
Lloh12:
	adrp	x8, _WS_OPCODE_PONG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WS_OPCODE_PONG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	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	_ws_send_frame
LBB0_9:
	ldr	x0, [x8, #8]
	bl	_free
	mov	x0, x20
	bl	_free
	ldr	x8, [x19, #8]
	str	xzr, [x8, #8]
Lloh15:
	adrp	x8, _WS_ERR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WS_ERR@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _WS_CLOSE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _WS_CLOSE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_WS_CLOSE_PROTO_ERR,4,2         ; @WS_CLOSE_PROTO_ERR
	.comm	_WS_ERR,4,2                     ; @WS_ERR
	.comm	_WS_CLOSE,4,2                   ; @WS_CLOSE
	.comm	_WS_OPCODE_PONG,4,2             ; @WS_OPCODE_PONG
	.no_dead_strip	_ws_handle_ping
.subsections_via_symbols
