	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_round_robin
_test_round_robin:                      ## @test_round_robin
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$10, %edi
	callq	_gen_targets
	movq	%rax, %r15
	movq	%rdx, %rbx
	movq	%rax, -80(%rbp)
	movq	%rdx, -72(%rbp)
	movw	$0, -56(%rbp)
	movq	$0, -64(%rbp)
	xorl	%eax, %eax
	callq	_h2o_balancer_create_rr
	movq	%rax, %r14
	testq	%r15, %r15
	je	LBB0_16
## %bb.1:
	leaq	-1(%r15), %rcx
	movl	%r15d, %eax
	andl	$3, %eax
	cmpq	$3, %rcx
	jae	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	LBB0_5
LBB0_3:
	andq	$-4, %r15
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx,%rdx,8), %rsi
	movq	8(%rbx,%rdx,8), %rdi
	movl	8(%rsi), %esi
	incl	%esi
	addq	%rcx, %rsi
	movl	8(%rdi), %ecx
	incl	%ecx
	addq	%rsi, %rcx
	movq	16(%rbx,%rdx,8), %rsi
	movl	8(%rsi), %esi
	incl	%esi
	addq	%rcx, %rsi
	movq	24(%rbx,%rdx,8), %rcx
	movl	8(%rcx), %ecx
	incl	%ecx
	addq	%rsi, %rcx
	addq	$4, %rdx
	cmpq	%rdx, %r15
	jne	LBB0_4
LBB0_5:
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	leaq	(%rbx,%rdx,8), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rsi,8), %rdi
	movl	8(%rdi), %edi
	incl	%edi
	addq	%rdi, %rcx
	incq	%rsi
	cmpq	%rsi, %rax
	jne	LBB0_7
LBB0_8:
	imulq	$1000, %rcx, %rbx               ## imm = 0x3E8
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.9:
	leaq	-80(%rbp), %r12
	leaq	-64(%rbp), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-72(%rbp), %rcx
	movq	(%rcx,%rax,8), %rcx
	incl	(%rcx)
	movq	%rax, %r15
	decq	%rbx
	je	LBB0_16
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_selector
	movq	-80(%rbp), %rcx
	cmpq	%rcx, %rax
	ja	LBB0_19
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%r15, %rax
	jae	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	decq	%rcx
	cmpq	%rcx, %r15
	jne	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	testq	%rax, %rax
	je	LBB0_10
LBB0_19:
	xorl	%edi, %edi
	jmp	LBB0_17
LBB0_16:
	leaq	-80(%rbp), %rdi
	callq	_check_weight_distribution
	movl	%eax, %edi
LBB0_17:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ok
	movq	%r14, %rdi
	callq	_destroy
	leaq	-80(%rbp), %rdi
	callq	_free_targets
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_test_round_robin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_round_robin
_test_round_robin:                      ; @test_round_robin
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	w0, #10
	bl	_gen_targets
	mov	x21, x0
	mov	x20, x1
	stp	x0, x1, [sp, #8]
	strh	wzr, [sp, #32]
	str	xzr, [sp, #24]
	bl	_h2o_balancer_create_rr
	mov	x19, x0
	cbz	x21, LBB0_15
; %bb.1:
	cmp	x21, #4
	b.hs	LBB0_3
; %bb.2:
	mov	x8, #0
	mov	x9, #0
	b	LBB0_6
LBB0_3:
	mov	x11, #0
	mov	x12, #0
	mov	x10, #0
	mov	x9, #0
	and	x8, x21, #0xfffffffffffffffc
	add	x13, x20, #16
	mov	x14, x8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x15, x16, [x13, #-16]
	ldp	x17, x0, [x13], #32
	ldr	w15, [x15, #8]
	ldr	w16, [x16, #8]
	ldr	w17, [x17, #8]
	add	w15, w15, #1
	add	w16, w16, #1
	ldr	w0, [x0, #8]
	add	w17, w17, #1
	add	w0, w0, #1
	add	x11, x15, x11
	add	x12, x16, x12
	add	x10, x17, x10
	add	x9, x0, x9
	subs	x14, x14, #4
	b.ne	LBB0_4
; %bb.5:
	add	x11, x12, x11
	add	x10, x10, x11
	add	x9, x9, x10
	cmp	x21, x8
	b.eq	LBB0_8
LBB0_6:
	sub	x10, x21, x8
	add	x8, x20, x8, lsl #3
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x8], #8
	ldr	w11, [x11, #8]
	add	w11, w11, #1
	add	x9, x11, x9
	subs	x10, x10, #1
	b.ne	LBB0_7
LBB0_8:
	mov	w8, #1000
	mul	x20, x9, x8
	cbz	x20, LBB0_15
; %bb.9:
	mov	x21, #0
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [sp, #16]
	ldr	x8, [x8, x0, lsl #3]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	x21, x0
	subs	x20, x20, #1
	b.eq	LBB0_15
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	add	x2, sp, #24
	mov	x0, x19
	bl	_selector
	ldr	x8, [sp, #8]
	cmp	x0, x8
	b.hi	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	x0, x21
	b.hs	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	sub	x8, x8, #1
	cmp	x21, x8
	ccmp	x0, #0, #0, eq
	b.eq	LBB0_10
LBB0_14:
	mov	w0, #0
	b	LBB0_16
LBB0_15:
	add	x0, sp, #8
	bl	_check_weight_distribution
LBB0_16:
	bl	_ok
	mov	x0, x19
	bl	_destroy
	add	x0, sp, #8
	bl	_free_targets
	ldr	x8, [sp, #40]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	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
	add	sp, sp, #96
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_test_round_robin
.subsections_via_symbols
