	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ws_start                       ## -- Begin function ws_start
	.p2align	4, 0x90
_ws_start:                              ## @ws_start
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %r15
	movq	16(%rdi), %rbx
	movl	$0, -44(%rbp)
	movq	_fdstate@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	leaq	-44(%rbp), %rdi
	callq	_ws_socket
	movq	_max_file_fd@GOTPCREL(%rip), %r13
	leaq	4(%r14), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_ws_fifos
	movq	_fdstate@GOTPCREL(%rip), %r14
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movl	-44(%rbp), %edi
	movl	(%r15), %esi
	callq	_MAX
	movl	%eax, (%r13)
	movq	%r14, %rdi
	callq	_FD_ZERO
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_FD_ZERO
	movl	-44(%rbp), %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_set_rfds_wfds
	movl	(%r13), %edi
	incl	%edi
	movl	%edi, (%r13)
	movq	%r14, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_select
	cmpl	$-1, %eax
	jne	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	$128, %edi
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_LOG
	jmp	LBB0_5
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	callq	_strerror
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_FATAL
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_FD_ISSET
	testq	%rax, %rax
	jne	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_max_file_fd@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, %eax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jle	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=2
	incl	%r12d
	cmpl	%eax, %r12d
	jge	LBB0_12
LBB0_8:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	(%rbx), %r12d
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	cmpl	(%r15), %r12d
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	movl	-44(%rbp), %edi
	movl	%r12d, %esi
	movq	%r14, %rdx
	callq	_ws_listen
	movl	(%r13), %eax
	jmp	LBB0_11
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	callq	_LOG
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fdstate,8,2                    ## @fdstate
	.comm	_max_file_fd,4,2                ## @max_file_fd
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"A signal was caught on select(2)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unable to select: %s."

L_.str.2:                               ## @.str.2
	.asciz	"Handled self-pipe to close event loop.\n"

	.comm	_wsconfig,24,3                  ## @wsconfig
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ws_start                       ; -- Begin function ws_start
	.p2align	2
_ws_start:                              ; @ws_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldp	x21, x20, [x0, #8]
	str	wzr, [sp, #12]
Lloh0:
	adrp	x22, _fdstate@GOTPAGE
Lloh1:
	ldr	x22, [x22, _fdstate@GOTPAGEOFF]
	mov	x0, x22
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	x0, sp, #12
	bl	_ws_socket
Lloh2:
	adrp	x26, _max_file_fd@GOTPAGE
Lloh3:
	ldr	x26, [x26, _max_file_fd@GOTPAGEOFF]
Lloh4:
	adrp	x27, _errno@GOTPAGE
Lloh5:
	ldr	x27, [x27, _errno@GOTPAGEOFF]
Lloh6:
	adrp	x23, l_.str@PAGE
Lloh7:
	add	x23, x23, l_.str@PAGEOFF
Lloh8:
	adrp	x24, l_.str.1@PAGE
Lloh9:
	add	x24, x24, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_ws_fifos
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	w0, [sp, #12]
	ldr	w1, [x21]
	bl	_MAX
	str	w0, [x26]
	mov	x0, x22
	bl	_FD_ZERO
	add	x25, x22, #4
	mov	x0, x25
	bl	_FD_ZERO
	ldr	w0, [sp, #12]
	mov	x1, x19
	mov	x2, x20
	mov	x3, x21
	bl	_set_rfds_wfds
	ldr	w8, [x26]
	add	w0, w8, #1
	str	w0, [x26]
	mov	x1, x22
	mov	x2, x25
	mov	x3, #0
	mov	x4, #0
	bl	_select
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x27]
	cmp	w0, #128
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_LOG
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	bl	_strerror
	mov	x1, x0
	mov	x0, x24
	bl	_FATAL
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	ldr	w0, [x8]
	mov	x1, x22
	bl	_FD_ISSET
	cbnz	x0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w25, #0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	w25, w25, #1
	cmp	w25, w8
	b.ge	LBB0_1
LBB0_10:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w9, [x20]
	cmp	w25, w9
	b.eq	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w9, [x21]
	cmp	w25, w9
	b.eq	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w0, [sp, #12]
	mov	x1, x25
	mov	x2, x19
	bl	_ws_listen
	ldr	w8, [x26]
	b	LBB0_9
LBB0_13:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_LOG
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_fdstate,8,2                    ; @fdstate
	.comm	_max_file_fd,4,2                ; @max_file_fd
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"A signal was caught on select(2)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unable to select: %s."

l_.str.2:                               ; @.str.2
	.asciz	"Handled self-pipe to close event loop.\n"

	.comm	_wsconfig,24,3                  ; @wsconfig
.subsections_via_symbols
