	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcp_svc_run
_tcp_svc_run:                           ## @tcp_svc_run
	.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
	movl	$16, %esi
	callq	_rs_svc_grow_sets
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	%eax, -56(%rbp)
	movq	16(%r12), %rax
	movl	4(%rax), %edi
	leaq	-56(%rbp), %rsi
	movl	$4, %edx
	callq	_write_all
	movslq	%ebx, %rax
	jmp	LBB0_12
LBB0_2:
	movq	24(%r12), %rax
	movq	_tcp_svc_timeouts@GOTPCREL(%rip), %r13
	movq	%rax, (%r13)
	movq	16(%r12), %rax
	movl	4(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	$-1, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	subl	%ebx, %r14d
	testl	%eax, %eax
	jle	LBB0_11
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	imull	$1000, %r14d, %edx              ## imm = 0x3E8
	leaq	-56(%rbp), %rdi
	movl	$1, %esi
	callq	_poll
	cmpq	$0, -56(%rbp)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_tcp_svc_process_sock
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_rs_get_time
	movq	%rax, %rbx
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rcx
	movq	$-1, %r14
	xorl	%r15d, %r15d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=2
	cmpq	%r14, %rdx
	cmovlq	%rdx, %r14
	movslq	%eax, %rdx
	incq	%r15
	cmpq	%rdx, %r15
	jge	LBB0_10
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rcx,%r15,8), %rdx
	cmpq	%rbx, %rdx
	jg	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	8(%r12), %rax
	movq	8(%rax,%r15,8), %rdi
	callq	_tcp_svc_send_keepalive
	movq	8(%r12), %rax
	movq	8(%rax,%r15,8), %rax
	movq	(%rax), %rdx
	addq	%rbx, %rdx
	movq	(%r13), %rcx
	movq	%rdx, 8(%rcx,%r15,8)
	movl	(%r12), %eax
	jmp	LBB0_9
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tcp_svc_timeouts,8,3           ## @tcp_svc_timeouts
	.comm	_POLLIN,4,2                     ## @POLLIN
	.no_dead_strip	_tcp_svc_run
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcp_svc_run
_tcp_svc_run:                           ; @tcp_svc_run
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
	mov	w1, #16
	bl	_rs_svc_grow_sets
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	str	w0, [sp]
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #4]
	mov	x1, sp
	mov	w2, #4
	bl	_write_all
	sxtw	x0, w20
	b	LBB0_12
LBB0_2:
Lloh0:
	adrp	x21, _tcp_svc_timeouts@GOTPAGE
Lloh1:
	ldr	x21, [x21, _tcp_svc_timeouts@GOTPAGEOFF]
	ldp	x9, x8, [x19, #16]
	str	x8, [x21]
Lloh2:
	adrp	x8, _POLLIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
	ldr	w9, [x9, #4]
Lloh4:
	ldr	w8, [x8]
	stp	w8, w9, [sp, #8]
	mov	w9, #-1
	mov	w22, #1000
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	w9, w23, w20
	cmp	w8, #0
	b.le	LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	mul	w2, w9, w22
	mov	x0, sp
	mov	w1, #1
	bl	_poll
	ldr	x8, [sp]
	cbz	x8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_tcp_svc_process_sock
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_rs_get_time
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x0
	ldr	x9, [x21]
	mov	x23, #-1
	mov	w24, #1
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	cmp	x10, x23
	csel	x23, x10, x23, lt
	cmp	x24, w8, sxtw
	add	x24, x24, #1
	b.ge	LBB0_3
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x10, [x9, x24, lsl #3]
	cmp	x10, x20
	b.gt	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x19, #8]
	lsl	x25, x24, #3
	ldr	x0, [x8, x25]
	bl	_tcp_svc_send_keepalive
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x25]
	ldr	x8, [x8]
	add	x10, x8, x20
	ldr	x9, [x21]
	str	x10, [x9, x25]
	ldr	w8, [x19]
	b	LBB0_8
LBB0_11:
	mov	x0, #0
LBB0_12:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_tcp_svc_timeouts,8,3           ; @tcp_svc_timeouts
	.comm	_POLLIN,4,2                     ; @POLLIN
	.no_dead_strip	_tcp_svc_run
.subsections_via_symbols
