	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bundle_UpdateSet
_bundle_UpdateSet:                      ## @bundle_UpdateSet
	.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	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %r15
	callq	_descriptor2bundle
	movq	%rax, %r13
	movq	16(%rax), %rax
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movq	8(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	leaq	8(%r13), %rdi
	testq	%r15, %r15
	je	LBB0_3
## %bb.4:
	movq	%r13, %rsi
	callq	_ncp_FillPhysicalQueues
	movq	(%r13), %rcx
	movq	_PHASE_NETWORK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_6
## %bb.5:
	movq	_PHYS_AUTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 84(%r13)
	je	LBB0_14
LBB0_6:
	movl	72(%r13), %edx
	cmpl	%edx, %ebx
	cmovgl	%ebx, %edx
	leaq	32(%r13), %rdi
	movq	32(%r13), %rcx
	cmpq	%rdx, %rax
	jae	LBB0_12
## %bb.7:
	movq	_TIMER_RUNNING@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_9
## %bb.8:
	callq	_timer_Stop
LBB0_9:
	movl	80(%r13), %edi
	movq	%r15, %rsi
	callq	_FD_SET
	movl	80(%r13), %ecx
	cmpl	%ecx, (%rbx)
	jg	LBB0_11
## %bb.10:
	incl	%ecx
	movl	%ecx, (%rbx)
	movl	80(%r13), %ecx
LBB0_11:
	movq	_LogTIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TUN_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_log_Printf
	movl	$1, %ebx
	jmp	LBB0_15
LBB0_3:
	callq	_ncp_QueueLen
	jmp	LBB0_14
LBB0_12:
	movq	_TIMER_STOPPED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_14
## %bb.13:
	movq	_bundle_ClearQueues@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r13)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, 40(%r13)
	movq	_SECTICKS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	76(%r13), %eax
	movl	%eax, 48(%r13)
	movq	%r13, 56(%r13)
	callq	_timer_Start
LBB0_14:
	xorl	%ebx, %ebx
LBB0_15:
	leaq	24(%r13), %rdi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	movq	%r12, %r15
	movq	%r12, %rdx
	movq	%r14, %r12
	movq	%r14, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	callq	_descriptor_UpdateSet
	movq	%r13, %rcx
	movq	%rax, %r13
	addq	%rbx, %r13
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rcx), %r14
	testq	%r14, %r14
	je	LBB0_16
## %bb.17:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	callq	_descriptor_UpdateSet
	movslq	%r13d, %r13
	addq	%rax, %r13
	movq	8(%r14), %r14
	testq	%r14, %r14
	jne	LBB0_18
	jmp	LBB0_19
LBB0_16:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_19:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	callq	_descriptor_UpdateSet
	addl	%r13d, %eax
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHASE_NETWORK,8,3              ## @PHASE_NETWORK
	.comm	_PHYS_AUTO,4,2                  ## @PHYS_AUTO
	.comm	_TIMER_RUNNING,8,3              ## @TIMER_RUNNING
	.comm	_LogTIMER,4,2                   ## @LogTIMER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: fdset(r) %d\n"

	.comm	_TUN_NAME,4,2                   ## @TUN_NAME
	.comm	_TIMER_STOPPED,8,3              ## @TIMER_STOPPED
	.comm	_bundle_ClearQueues,4,2         ## @bundle_ClearQueues
L_.str.1:                               ## @.str.1
	.asciz	"output choke"

	.comm	_SECTICKS,4,2                   ## @SECTICKS
	.no_dead_strip	_bundle_UpdateSet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bundle_UpdateSet
_bundle_UpdateSet:                      ; @bundle_UpdateSet
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	bl	_descriptor2bundle
	mov	x23, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_15
; %bb.1:
	mov	w24, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w24, w24, #1
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_2
; %bb.3:
	add	x0, x23, #8
	cbz	x22, LBB0_12
; %bb.4:
	mov	x1, x23
	bl	_ncp_FillPhysicalQueues
	mov	x8, x0
	ldr	x9, [x23]
Lloh0:
	adrp	x10, _PHASE_NETWORK@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PHASE_NETWORK@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_6
; %bb.5:
	ldr	w9, [x23, #84]
Lloh3:
	adrp	x10, _PHYS_AUTO@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PHYS_AUTO@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_15
LBB0_6:
	mov	x0, x23
	ldr	x9, [x0, #32]!
	ldr	w10, [x0, #40]
	cmp	w24, w10
	csel	w10, w24, w10, gt
	cmp	x8, x10
	b.hs	LBB0_13
; %bb.7:
Lloh6:
	adrp	x8, _TIMER_RUNNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TIMER_RUNNING@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	bl	_timer_Stop
LBB0_9:
	ldr	w0, [x23, #80]
	mov	x1, x22
	bl	_FD_SET
	ldr	w8, [x19]
	ldr	w3, [x23, #80]
	cmp	w8, w3
	b.gt	LBB0_11
; %bb.10:
	add	w8, w3, #1
	str	w8, [x19]
	ldr	w3, [x23, #80]
LBB0_11:
Lloh9:
	adrp	x8, _LogTIMER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LogTIMER@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _TUN_NAME@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TUN_NAME@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_log_Printf
	mov	w24, #1
	b	LBB0_16
LBB0_12:
	bl	_ncp_QueueLen
	b	LBB0_15
LBB0_13:
Lloh17:
	adrp	x8, _TIMER_STOPPED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TIMER_STOPPED@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
Lloh20:
	adrp	x8, _bundle_ClearQueues@GOTPAGE
Lloh21:
	ldr	x8, [x8, _bundle_ClearQueues@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x23, #64]
Lloh23:
	adrp	x8, l_.str.1@PAGE
Lloh24:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x23, #40]
	ldr	w8, [x23, #76]
Lloh25:
	adrp	x9, _SECTICKS@GOTPAGE
Lloh26:
	ldr	x9, [x9, _SECTICKS@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	mul	w8, w9, w8
	str	w8, [x23, #48]
	str	x23, [x23, #56]
	bl	_timer_Start
LBB0_15:
	mov	x24, #0
LBB0_16:
	add	x0, x23, #24
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_descriptor_UpdateSet
	add	x25, x0, x24
	ldr	x24, [x23, #16]
	cbz	x24, LBB0_18
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_descriptor_UpdateSet
	add	x25, x0, w25, sxtw
	ldr	x24, [x24, #8]
	cbnz	x24, LBB0_17
LBB0_18:
	add	x0, x23, #8
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_descriptor_UpdateSet
	add	w0, w0, w25
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_PHASE_NETWORK,8,3              ; @PHASE_NETWORK
	.comm	_PHYS_AUTO,4,2                  ; @PHYS_AUTO
	.comm	_TIMER_RUNNING,8,3              ; @TIMER_RUNNING
	.comm	_LogTIMER,4,2                   ; @LogTIMER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: fdset(r) %d\n"

	.comm	_TUN_NAME,4,2                   ; @TUN_NAME
	.comm	_TIMER_STOPPED,8,3              ; @TIMER_STOPPED
	.comm	_bundle_ClearQueues,4,2         ; @bundle_ClearQueues
l_.str.1:                               ; @.str.1
	.asciz	"output choke"

	.comm	_SECTICKS,4,2                   ; @SECTICKS
	.no_dead_strip	_bundle_UpdateSet
.subsections_via_symbols
