	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stop_ws_server                 ## -- Begin function stop_ws_server
	.p2align	4, 0x90
_stop_ws_server:                        ## @stop_ws_server
	.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
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.1:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.2:
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	testq	%r15, %r15
	je	LBB0_12
## %bb.3:
	leaq	4(%rbx), %r12
	movq	%r12, %rdi
	callq	_pthread_mutex_lock
	movq	8(%rbx), %rax
	movl	4(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	$1, %edx
	callq	_write
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.4:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_LOG
LBB0_6:
	movq	%r12, %rdi
	callq	_pthread_mutex_unlock
	leaq	4(%r14), %r12
	movq	%r12, %rdi
	callq	_pthread_mutex_lock
	movq	(%r15), %rax
	movl	4(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	$1, %edx
	callq	_write
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.7:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_ws_stop
LBB0_9:
	movq	%r12, %rdi
	callq	_pthread_mutex_unlock
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_pthread_join
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	movslq	%eax, %rdi
	callq	_LOG
LBB0_11:
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_pthread_join
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	movslq	%eax, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_LOG                            ## TAILCALL
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"x"

	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
L_.str.1:                               ## @.str.1
	.asciz	"Unable to write to self pipe on pipeout.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stop_ws_server                 ; -- Begin function stop_ws_server
	.p2align	2
_stop_ws_server:                        ; @stop_ws_server
	.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
	cbz	x0, LBB0_13
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_13
; %bb.2:
	mov	x19, x0
	ldr	x21, [x0, #8]
	cbz	x21, LBB0_13
; %bb.3:
	add	x22, x20, #4
	mov	x0, x22
	bl	_pthread_mutex_lock
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #1
	bl	_write
Lloh2:
	adrp	x23, _errno@GOTPAGE
Lloh3:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x23]
Lloh4:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh5:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.5:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LOG
LBB0_6:
	mov	x0, x22
	bl	_pthread_mutex_unlock
	add	x22, x19, #4
	mov	x0, x22
	bl	_pthread_mutex_lock
	ldr	x8, [x21]
	ldr	w0, [x8, #4]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #1
	bl	_write
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.7:
	ldr	x8, [x23]
Lloh11:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x21
	bl	_ws_stop
LBB0_9:
	mov	x0, x22
	bl	_pthread_mutex_unlock
	ldr	w0, [x20]
	mov	x1, #0
	bl	_pthread_join
	cbz	x0, LBB0_11
; %bb.10:
	ldr	x0, [x23]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	bl	_LOG
LBB0_11:
	ldr	w0, [x19]
	mov	x1, #0
	bl	_pthread_join
	cbz	x0, LBB0_13
; %bb.12:
	ldr	x0, [x23]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	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
	b	_LOG
LBB0_13:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"x"

	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
l_.str.1:                               ; @.str.1
	.asciz	"Unable to write to self pipe on pipeout.\n"

.subsections_via_symbols
