	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function process_loop
_process_loop:                          ## @process_loop
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_num_clients@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_30
## %bb.1:
	movq	_clients@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_free
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_30
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
                                        ##     Child Loop BB0_19 Depth 2
                                        ##     Child Loop BB0_7 Depth 2
	shll	$2, %eax
	leal	(%rax,%rax,2), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_31
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r13
	movl	(%r15), %r14d
	testq	%r14, %r14
	je	LBB0_4
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rax
	leaq	(,%r14,4), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	xorl	%edx, %edx
	movq	_WAITING_READ@GOTPCREL(%rip), %r8
	movq	_WAITING_WRITE@GOTPCREL(%rip), %rbx
	movq	_POLLIN@GOTPCREL(%rip), %r9
	movq	_POLLOUT@GOTPCREL(%rip), %r10
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=2
	movl	$0, 4(%r13,%rdx)
	addq	$8, %rax
	addq	$12, %rdx
	cmpq	%rdx, %rcx
	je	LBB0_18
LBB0_12:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rax), %rsi
	movl	4(%rsi), %edi
	movl	%edi, 8(%r13,%rdx)
	movl	$0, (%r13,%rdx)
	movl	(%rsi), %edi
	testl	%edi, (%r8)
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	(%r9), %esi
	movl	%esi, (%r13,%rdx)
	testl	%edi, (%rbx)
	jne	LBB0_16
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_12 Depth=2
	xorl	%esi, %esi
	testl	%edi, (%rbx)
	je	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=2
	orl	(%r10), %esi
	movl	%esi, (%r13,%rdx)
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	$-1, %edx
	callq	_poll
	movq	%r13, %rbx
	addq	$4, %rbx
	xorl	%r15d, %r15d
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=2
	movq	_WAITING_CLOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rdi)
LBB0_26:                                ##   in Loop: Header=BB0_19 Depth=2
	incq	%r15
	addq	$12, %rbx
	cmpq	%r15, %r14
	je	LBB0_5
LBB0_19:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rax
	movq	(%rax,%r15,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=2
	movl	(%rbx), %eax
	movq	_POLLERR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=2
	movq	_POLLIN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_19 Depth=2
	callq	_handle_read
	movl	(%rbx), %eax
LBB0_24:                                ##   in Loop: Header=BB0_19 Depth=2
	movq	_POLLOUT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_19 Depth=2
	movq	(%r12), %rax
	movq	(%rax,%r15,8), %rdi
	callq	_handle_write
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	$-1, %edx
	callq	_poll
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_num_clients@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_29
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	%eax, (%r15)
	cmpl	%eax, %r14d
	jae	LBB0_29
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rax
	movl	%r14d, %ebx
	movq	(%rax,%rbx,8), %rdi
	callq	_maybe_close
	testq	%rax, %rax
	je	LBB0_27
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movslq	(%r15), %rcx
	leal	-1(%rcx), %eax
	cmpl	%eax, %r14d
	jae	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	(%r12), %rdx
	movq	-8(%rdx,%rcx,8), %rcx
	movq	%rcx, (%rdx,%rbx,8)
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_7 Depth=2
	incl	%r14d
	movl	(%r15), %eax
	cmpl	%eax, %r14d
	jb	LBB0_7
	jmp	LBB0_29
LBB0_30:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	xorl	%eax, %eax
	callq	_abort
	.cfi_endproc
                                        ## -- End function
	.comm	_num_clients,4,2                ## @num_clients
	.comm	_clients,8,3                    ## @clients
	.comm	_WAITING_READ,4,2               ## @WAITING_READ
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_WAITING_WRITE,4,2              ## @WAITING_WRITE
	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_POLLERR,4,2                    ## @POLLERR
	.comm	_WAITING_CLOSE,4,2              ## @WAITING_CLOSE
	.no_dead_strip	_process_loop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function process_loop
_process_loop:                          ; @process_loop
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x21, _num_clients@GOTPAGE
Lloh1:
	ldr	x21, [x21, _num_clients@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_29
; %bb.1:
Lloh2:
	adrp	x22, _clients@GOTPAGE
Lloh3:
	ldr	x22, [x22, _clients@GOTPAGEOFF]
Lloh4:
	adrp	x23, _WAITING_READ@GOTPAGE
Lloh5:
	ldr	x23, [x23, _WAITING_READ@GOTPAGEOFF]
Lloh6:
	adrp	x24, _WAITING_WRITE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _WAITING_WRITE@GOTPAGEOFF]
Lloh8:
	adrp	x26, _POLLIN@GOTPAGE
Lloh9:
	ldr	x26, [x26, _POLLIN@GOTPAGEOFF]
Lloh10:
	adrp	x27, _POLLOUT@GOTPAGE
Lloh11:
	ldr	x27, [x27, _POLLOUT@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_free
	ldr	w8, [x21]
	cmp	w8, #0
	b.le	LBB0_29
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_15 Depth 2
                                        ;     Child Loop BB0_25 Depth 2
	add	w8, w8, w8, lsl #1
	lsl	w0, w8, #2
	bl	_malloc
	cbz	x0, LBB0_30
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x19, x0
	ldr	w20, [x21]
	cbz	w20, LBB0_21
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, #0
	ldr	x9, [x22]
	add	x10, x20, x20, lsl #1
	lsl	x10, x10, #2
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x11, x19, x8
	str	wzr, [x11, #4]
	add	x9, x9, #8
	add	x8, x8, #12
	cmp	x10, x8
	b.eq	LBB0_12
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x12, [x9]
	add	x11, x19, x8
	ldp	w12, w13, [x12]
	str	w13, [x11, #8]
	str	wzr, [x11]
	ldr	w13, [x23]
	tst	w13, w12
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w13, [x26]
	str	w13, [x11]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=2
	mov	w13, #0
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w14, [x24]
	tst	w14, w12
	b.eq	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=2
	ldr	w12, [x27]
	orr	w12, w13, w12
	str	w12, [x11]
	b	LBB0_6
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #-1
	bl	_poll
	mov	x28, #0
	add	x25, x19, #4
	lsl	x20, x20, #3
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=2
Lloh12:
	adrp	x8, _WAITING_CLOSE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WAITING_CLOSE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x0]
	orr	w8, w9, w8
	str	w8, [x0]
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=2
	add	x28, x28, #8
	add	x25, x25, #12
	cmp	x20, x28
	b.eq	LBB0_22
LBB0_15:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22]
	ldr	x0, [x8, x28]
	cbz	x0, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	w8, [x25]
Lloh15:
	adrp	x9, _POLLERR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _POLLERR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_13
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=2
	bl	_handle_read
	ldr	w8, [x25]
LBB0_19:                                ;   in Loop: Header=BB0_15 Depth=2
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.20:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	x8, [x22]
	ldr	x0, [x8, x28]
	bl	_handle_write
	b	LBB0_14
LBB0_21:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #-1
	bl	_poll
LBB0_22:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	cbz	w8, LBB0_2
; %bb.23:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w20, #0
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_25 Depth=2
	str	w8, [x21]
	cmp	w20, w8
	b.hs	LBB0_2
LBB0_25:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22]
	ldr	x0, [x8, w20, uxtw #3]
	bl	_maybe_close
	cbz	x0, LBB0_28
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=2
	ldrsw	x8, [x21]
	sub	x8, x8, #1
	cmp	w20, w8
	b.hs	LBB0_24
; %bb.27:                               ;   in Loop: Header=BB0_25 Depth=2
	mov	w9, w20
	ldr	x10, [x22]
	ldr	x11, [x10, x8, lsl #3]
	str	x11, [x10, x9, lsl #3]
	b	LBB0_24
LBB0_28:                                ;   in Loop: Header=BB0_25 Depth=2
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lo	LBB0_25
	b	LBB0_2
LBB0_29:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_30:
	bl	_abort
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_num_clients,4,2                ; @num_clients
	.comm	_clients,8,3                    ; @clients
	.comm	_WAITING_READ,4,2               ; @WAITING_READ
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_WAITING_WRITE,4,2              ; @WAITING_WRITE
	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_POLLERR,4,2                    ; @POLLERR
	.comm	_WAITING_CLOSE,4,2              ; @WAITING_CLOSE
	.no_dead_strip	_process_loop
.subsections_via_symbols
