	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ws_recv_frame                  ## -- Begin function ws_recv_frame
	.p2align	4, 0x90
_ws_recv_frame:                         ## @ws_recv_frame
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	8(%rdi), %r14
	movl	$-1, %eax
	cmpq	$0, 32(%r14)
	je	LBB0_2
LBB0_1:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.3:
	movq	24(%r14), %rdx
	movq	(%rdx), %rsi
	subq	8(%rdx), %rsi
	cmpq	%rcx, %rsi
	jl	LBB0_1
## %bb.4:
	movq	%rdi, %rbx
	leaq	-20(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rcx
	callq	_ws_read_frame
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:
	movl	$1, -24(%rbp)
	movl	-20(%rbp), %esi
	movq	-32(%rbp), %rdx
	movl	-36(%rbp), %ecx
	movq	16(%r14), %rax
	movq	(%rax), %r8
	movq	8(%rax), %r9
	subq	%r8, %r9
	leaq	-24(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	callq	*(%rbx)
	testq	%rax, %rax
	je	LBB0_8
LBB0_5:
	movq	_STATE_ERROR@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
	jmp	LBB0_1
LBB0_8:
	cmpl	$0, -20(%rbp)
	jne	LBB0_10
## %bb.9:
	cmpl	$0, -24(%rbp)
	jne	LBB0_12
LBB0_10:
	movq	16(%r14), %rdi
	callq	_cb_clear
	cmpl	$0, -20(%rbp)
	je	LBB0_12
## %bb.11:
	movq	$0, 8(%r14)
	movq	-32(%rbp), %rax
	jmp	LBB0_14
LBB0_12:
	movq	-32(%rbp), %rax
	movq	_OPCODE_CONTINUATION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.13:
	movq	%rax, 8(%r14)
LBB0_14:
	movq	_OPCODE_CLOSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.15:
	movq	_STATE_CLOSED@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_16:
	movq	_STATE_READ_FRAME_LENGTH@GOTPCREL(%rip), %rax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_STATE_ERROR,4,2                ## @STATE_ERROR
	.comm	_OPCODE_CONTINUATION,8,3        ## @OPCODE_CONTINUATION
	.comm	_OPCODE_CLOSE,8,3               ## @OPCODE_CLOSE
	.comm	_STATE_CLOSED,4,2               ## @STATE_CLOSED
	.comm	_STATE_READ_FRAME_LENGTH,4,2    ## @STATE_READ_FRAME_LENGTH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ws_recv_frame                  ; -- Begin function ws_recv_frame
	.p2align	2
_ws_recv_frame:                         ; @ws_recv_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	ldr	x20, [x0, #8]
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_3
LBB0_1:
	mov	w0, #-1
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_3:
	ldr	x8, [x20]
	cbz	x8, LBB0_1
; %bb.4:
	ldr	x9, [x20, #24]
	ldp	x10, x9, [x9]
	sub	x9, x10, x9
	cmp	x9, x8
	b.lt	LBB0_1
; %bb.5:
	mov	x19, x0
	sub	x1, x29, #20
	add	x2, sp, #16
	add	x3, sp, #12
	bl	_ws_read_frame
	cbnz	x0, LBB0_7
; %bb.6:
	mov	w8, #1
	str	w8, [sp, #8]
	ldr	x8, [x19]
	ldur	w1, [x29, #-20]
	ldr	x2, [sp, #16]
	ldr	w3, [sp, #12]
	ldr	x9, [x20, #16]
	ldp	x4, x9, [x9]
	sub	x5, x9, x4
	add	x6, sp, #8
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_9
LBB0_7:
Lloh0:
	adrp	x8, _STATE_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STATE_ERROR@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	b	LBB0_2
LBB0_9:
	ldur	w8, [x29, #-20]
	cbnz	w8, LBB0_11
; %bb.10:
	ldr	w8, [sp, #8]
	cbnz	w8, LBB0_13
LBB0_11:
	ldr	x0, [x20, #16]
	bl	_cb_clear
	ldur	w8, [x29, #-20]
	cbz	w8, LBB0_13
; %bb.12:
	str	xzr, [x20, #8]
	ldr	x8, [sp, #16]
	b	LBB0_15
LBB0_13:
	ldr	x8, [sp, #16]
Lloh2:
	adrp	x9, _OPCODE_CONTINUATION@GOTPAGE
Lloh3:
	ldr	x9, [x9, _OPCODE_CONTINUATION@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.14:
	str	x8, [x20, #8]
LBB0_15:
Lloh5:
	adrp	x9, _OPCODE_CLOSE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _OPCODE_CLOSE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _STATE_READ_FRAME_LENGTH@GOTPAGE
Lloh9:
	ldr	x10, [x10, _STATE_READ_FRAME_LENGTH@GOTPAGEOFF]
Lloh10:
	adrp	x11, _STATE_CLOSED@GOTPAGE
Lloh11:
	ldr	x11, [x11, _STATE_CLOSED@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x11, x10, eq
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_STATE_ERROR,4,2                ; @STATE_ERROR
	.comm	_OPCODE_CONTINUATION,8,3        ; @OPCODE_CONTINUATION
	.comm	_OPCODE_CLOSE,8,3               ; @OPCODE_CLOSE
	.comm	_STATE_CLOSED,4,2               ; @STATE_CLOSED
	.comm	_STATE_READ_FRAME_LENGTH,4,2    ; @STATE_READ_FRAME_LENGTH
.subsections_via_symbols
