	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function service_loop
_service_loop:                          ## @service_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movl	$12, %esi
	callq	_xcalloc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_7
## %bb.1:
	movq	8(%rbx), %rcx
	cmpl	$1, %r8d
	jne	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	jmp	LBB0_5
LBB0_3:
	movl	%r8d, %r9d
	andl	$-2, %r9d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	20(%rax), %rdi
	xorl	%edx, %edx
	movq	_POLLIN@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdx,4), %eax
	movl	%eax, -12(%rdi)
	movl	(%rsi), %eax
	movl	%eax, -20(%rdi)
	movl	4(%rcx,%rdx,4), %eax
	movl	%eax, (%rdi)
	movl	(%rsi), %eax
	movl	%eax, -8(%rdi)
	addq	$2, %rdx
	addq	$24, %rdi
	cmpq	%rdx, %r9
	jne	LBB0_4
LBB0_5:
	testb	$1, %r8b
	je	LBB0_7
## %bb.6:
	movl	(%rcx,%rdx,4), %eax
	leaq	(%rdx,%rdx,2), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 8(%rdx,%rcx,4)
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdx,%rcx,4)
LBB0_7:
	movq	_SIGCHLD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_child_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_signal
	addq	$8, -56(%rbp)                   ## 8-byte Folded Spill
	leaq	-72(%rbp), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	xorl	%eax, %eax
	callq	_check_dead_children
	movl	(%rbx), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	$-1, %edx
	callq	_poll
	testq	%rax, %rax
	js	LBB0_18
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	xorl	%r13d, %r13d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=2
	movl	-44(%rbp), %edx
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_handle
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=2
	movl	(%rbx), %eax
LBB0_17:                                ##   in Loop: Header=BB0_11 Depth=2
	incq	%r13
	movslq	%eax, %rcx
	addq	$12, %r12
	cmpq	%rcx, %r13
	jge	LBB0_8
LBB0_11:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_POLLIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, -4(%r12)
	je	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movl	$4, -44(%rbp)
	movl	(%r12), %edi
	movq	%r14, %rsi
	leaq	-44(%rbp), %rdx
	callq	_accept
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	jb	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=2
	leaq	L_.str.1(%rip), %rdi
	callq	_die_errno
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	$128, %edi
	je	LBB0_8
## %bb.19:                              ##   in Loop: Header=BB0_8 Depth=1
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_logerror
	movl	$1, %edi
	callq	_sleep
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_SIGCHLD,4,2                    ## @SIGCHLD
	.comm	_child_handler,4,2              ## @child_handler
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Poll failed, resuming: %s"

L_.str.1:                               ## @.str.1
	.asciz	"accept returned"

	.no_dead_strip	_service_loop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function service_loop
_service_loop:                          ; @service_loop
	.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
	ldr	w0, [x0]
	mov	w1, #12
	bl	_xcalloc
	mov	x20, x0
	ldr	w8, [x19]
Lloh0:
	adrp	x24, _POLLIN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _POLLIN@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	x9, [x19, #8]
	add	x10, x20, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9], #4
	str	w11, [x10]
	ldr	w11, [x24]
	stur	w11, [x10, #-8]
	add	x10, x10, #12
	subs	x8, x8, #1
	b.ne	LBB0_2
LBB0_3:
Lloh2:
	adrp	x8, _SIGCHLD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SIGCHLD@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _child_handler@GOTPAGE
Lloh6:
	ldr	x8, [x8, _child_handler@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_signal
Lloh8:
	adrp	x25, _errno@GOTPAGE
Lloh9:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
	add	x21, x20, #8
	mov	w27, #4
Lloh10:
	adrp	x22, l_.str.1@PAGE
Lloh11:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	bl	_check_dead_children
	ldr	w1, [x19]
	mov	x0, x20
	mov	w2, #-1
	bl	_poll
	tbnz	x0, #63, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, #0
	mov	x26, x21
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	w2, [sp, #4]
	add	x1, sp, #8
	mov	x0, x23
	bl	_handle
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x19]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	x28, x28, #1
	add	x26, x26, #12
	cmp	x28, w8, sxtw
	b.ge	LBB0_4
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	w9, [x26, #-4]
	ldr	w10, [x24]
	tst	w10, w9
	b.eq	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	str	w27, [sp, #4]
	ldr	w0, [x26]
	add	x1, sp, #8
	add	x2, sp, #4
	bl	_accept
	mov	x23, x0
	tbz	w0, #31, LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x25]
	sub	w8, w8, #128
	cmp	w8, #3
	b.lo	LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x22
	bl	_die_errno
	b	LBB0_7
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x25]
	cmp	w0, #128
	b.eq	LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	bl	_strerror
	mov	x1, x0
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_logerror
	mov	w0, #1
	bl	_sleep
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_SIGCHLD,4,2                    ; @SIGCHLD
	.comm	_child_handler,4,2              ; @child_handler
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Poll failed, resuming: %s"

l_.str.1:                               ; @.str.1
	.asciz	"accept returned"

	.no_dead_strip	_service_loop
.subsections_via_symbols
