	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ws_new                         ## -- Begin function ws_new
	.p2align	4, 0x90
_ws_new:                                ## @ws_new
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ws_private_new
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r14
	movl	$4, %edi
	callq	_malloc
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movslq	%eax, %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_ws_send_connect@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_ws_send_upgrade@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_ws_send_frame@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_ws_send_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_ws_on_recv@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_ws_on_error@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%r14, (%rbx)
	jmp	LBB0_4
LBB0_2:
	movq	%r14, %rdi
	callq	_ws_private_free
	xorl	%ebx, %ebx
LBB0_4:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ws_send_connect,4,2            ## @ws_send_connect
	.comm	_ws_send_upgrade,4,2            ## @ws_send_upgrade
	.comm	_ws_send_frame,4,2              ## @ws_send_frame
	.comm	_ws_send_close,4,2              ## @ws_send_close
	.comm	_ws_on_recv,4,2                 ## @ws_on_recv
	.comm	_ws_on_error,4,2                ## @ws_on_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ws_new                         ; -- Begin function ws_new
	.p2align	2
_ws_new:                                ; @ws_new
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_ws_private_new
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	w0, #4
	bl	_malloc
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_3
; %bb.2:
	sxtw	x20, w0
	mov	x0, x20
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh0:
	adrp	x8, _ws_send_connect@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ws_send_connect@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _ws_send_upgrade@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ws_send_upgrade@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #24]
Lloh6:
	adrp	x8, _ws_send_frame@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ws_send_frame@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _ws_send_close@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ws_send_close@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #16]
Lloh12:
	adrp	x8, _ws_on_recv@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ws_on_recv@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _ws_on_error@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ws_on_error@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #8]
	str	x19, [x20]
	b	LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_ws_private_free
LBB0_4:
	mov	x20, #0
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ws_send_connect,4,2            ; @ws_send_connect
	.comm	_ws_send_upgrade,4,2            ; @ws_send_upgrade
	.comm	_ws_send_frame,4,2              ; @ws_send_frame
	.comm	_ws_send_close,4,2              ; @ws_send_close
	.comm	_ws_on_recv,4,2                 ; @ws_on_recv
	.comm	_ws_on_error,4,2                ; @ws_on_error
.subsections_via_symbols
