	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gather_heap_insert
_gather_heap_insert:                    ## @gather_heap_insert
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_GH_N@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	_MAX_CLUSTER_SERVERS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setb	%dil
	callq	_assert
	xorl	%eax, %eax
	cmpq	$0, (%rbx)
	jle	LBB0_14
## %bb.1:
	movl	8(%rbx), %ecx
	cmpl	$8, %ecx
	jl	LBB0_14
## %bb.2:
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.3:
	shrl	$2, %ecx
	decl	%ecx
	movq	_GH_mode@GOTPCREL(%rip), %rdx
	movq	_g_double@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	(%rdx), %edi
	cmpl	$1, %edi
	movl	$3, %edi
	sbbl	$0, %edi
	cmpl	%ecx, %edi
	ja	LBB0_14
## %bb.4:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%edi
	imull	%eax, %edi
	movq	_GH_total@GOTPCREL(%rip), %rcx
	addl	%eax, (%rcx)
	movq	_GH_E@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r12
	movq	(%r14), %rbx
	shlq	$5, %rbx
	leaq	(%r12,%rbx), %r15
	movl	%eax, (%r12,%rbx)
	movq	%rsi, 24(%r12,%rbx)
	movl	(%rsi), %eax
	movl	%eax, 4(%r12,%rbx)
	movq	_CHUNK_INTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %edi
	cmovgel	%ecx, %edi
	addl	%eax, %edi
	movl	%edi, 8(%r12,%rbx)
	movq	%r15, %rdi
	callq	_load_heap_v
	movl	12(%r12,%rbx), %ecx
	movl	16(%r12,%rbx), %r9d
	movq	(%r14), %rax
	incq	%rax
	movq	%rax, (%r14)
	cmpl	$2, %eax
	jl	LBB0_12
## %bb.5:
	movq	_GH@GOTPCREL(%rip), %r8
	movl	%eax, %esi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %edx
	movq	%rdi, (%rbx,%rdx,8)
	cmpl	$3, %eax
	movl	%esi, %eax
	jbe	LBB0_13
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	shrl	%esi
	movq	(%r8), %rbx
	movq	(%rbx,%rsi,8), %rdi
	cmpl	%ecx, 12(%rdi)
	jl	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	jne	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%r9d, 16(%rdi)
	jg	LBB0_6
LBB0_12:
	movl	%eax, %esi
LBB0_13:
	movq	_GH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%esi, %rcx
	movq	%r15, (%rax,%rcx,8)
	movl	$1, %eax
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GH_N,8,3                       ## @GH_N
	.comm	_MAX_CLUSTER_SERVERS,8,3        ## @MAX_CLUSTER_SERVERS
	.comm	_GH_mode,4,2                    ## @GH_mode
	.comm	_g_double,4,2                   ## @g_double
	.comm	_GH_total,4,2                   ## @GH_total
	.comm	_GH_E,8,3                       ## @GH_E
	.comm	_CHUNK_INTS,4,2                 ## @CHUNK_INTS
	.comm	_GH,8,3                         ## @GH
	.no_dead_strip	_gather_heap_insert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gather_heap_insert
_gather_heap_insert:                    ; @gather_heap_insert
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _GH_N@GOTPAGE
Lloh1:
	ldr	x20, [x20, _GH_N@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _MAX_CLUSTER_SERVERS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX_CLUSTER_SERVERS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, lo
	bl	_assert
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.1:
	ldr	w9, [x19, #8]
	cmp	w9, #8
	b.lt	LBB0_4
; %bb.2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:
	lsr	w9, w9, #2
	sub	w9, w9, #1
Lloh5:
	adrp	x10, _GH_mode@GOTPAGE
Lloh6:
	ldr	x10, [x10, _GH_mode@GOTPAGEOFF]
Lloh7:
	adrp	x11, _g_double@GOTPAGE
Lloh8:
	ldr	x11, [x11, _g_double@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
Lloh10:
	ldr	w11, [x11]
	tst	w11, w10
	mov	w10, #2
	cinc	w10, w10, ne
	cmp	w10, w9
	b.ls	LBB0_6
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	udiv	w9, w9, w10
	mul	w10, w9, w10
Lloh11:
	adrp	x11, _GH_total@GOTPAGE
Lloh12:
	ldr	x11, [x11, _GH_total@GOTPAGEOFF]
	ldr	w12, [x11]
	add	w12, w12, w9
	str	w12, [x11]
Lloh13:
	adrp	x11, _GH_E@GOTPAGE
Lloh14:
	ldr	x11, [x11, _GH_E@GOTPAGEOFF]
Lloh15:
	ldr	x11, [x11]
	ldr	x12, [x20]
	add	x19, x11, x12, lsl #5
	str	x8, [x19, #24]
	ldr	w8, [x8]
Lloh16:
	adrp	x11, _CHUNK_INTS@GOTPAGE
Lloh17:
	ldr	x11, [x11, _CHUNK_INTS@GOTPAGEOFF]
	stp	w9, w8, [x19]
Lloh18:
	ldr	w9, [x11]
	cmp	w10, w9
	csel	w9, w10, w9, lt
	add	w8, w9, w8
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_load_heap_v
	ldp	w9, w11, [x19, #12]
	ldr	x8, [x20]
	add	x10, x8, #1
	str	x10, [x20]
Lloh19:
	adrp	x8, _GH@GOTPAGE
Lloh20:
	ldr	x8, [x8, _GH@GOTPAGEOFF]
	cmp	w10, #2
	b.ge	LBB0_10
LBB0_7:
	mov	x12, x10
LBB0_8:
	ldr	x8, [x8]
	str	x19, [x8, w12, sxtw #3]
	mov	w0, #1
	b	LBB0_5
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	str	x14, [x13, w10, uxtw #3]
	cmp	w10, #3
	mov	x10, x12
	b.ls	LBB0_8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	lsr	w12, w10, #1
	ldr	x13, [x8]
	ldr	x14, [x13, w12, uxtw #3]
	ldr	w15, [x14, #12]
	cmp	w15, w9
	b.lt	LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	b.ne	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w15, [x14, #16]
	cmp	w15, w11
	b.gt	LBB0_9
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GH_N,8,3                       ; @GH_N
	.comm	_MAX_CLUSTER_SERVERS,8,3        ; @MAX_CLUSTER_SERVERS
	.comm	_GH_mode,4,2                    ; @GH_mode
	.comm	_g_double,4,2                   ; @g_double
	.comm	_GH_total,4,2                   ; @GH_total
	.comm	_GH_E,8,3                       ; @GH_E
	.comm	_CHUNK_INTS,4,2                 ; @CHUNK_INTS
	.comm	_GH,8,3                         ; @GH
	.no_dead_strip	_gather_heap_insert
.subsections_via_symbols
