	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_GH_N@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_MAX_CLUSTER_SERVERS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setb	%dil
	callq	_assert
	movl	(%rbx), %ecx
	xorl	%eax, %eax
	cmpl	$8, %ecx
	jl	LBB0_13
## %bb.1:
	movq	8(%rbx), %rsi
	movl	(%rsi), %edx
	movq	_TL_VECTOR@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %edx
	jne	LBB0_13
## %bb.2:
	movl	4(%rsi), %edx
	testl	%edx, %edx
	jle	LBB0_13
## %bb.3:
	leal	(%rdx,%rdx,2), %edi
	leal	8(,%rdi,8), %edi
	cmpl	%edi, %ecx
	jne	LBB0_13
## %bb.4:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpl	$3, (%rax)
	jl	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_fprintf
	movq	8(%rbx), %rsi
	movl	4(%rsi), %edx
LBB0_6:
	movq	_GH_total@GOTPCREL(%rip), %rax
	addl	%edx, (%rax)
	movq	_GH_E@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	(%r15), %rbx
	shlq	$5, %rbx
	leaq	(%rbx,%r13), %r14
	movl	%edx, (%r13,%rbx)
	leaq	8(%rsi), %rax
	movq	%rax, 8(%r13,%rbx)
	addl	%edx, %edx
	leal	(%rdx,%rdx,2), %eax
	cltq
	leaq	(%rsi,%rax,4), %rax
	addq	$8, %rax
	movq	%rax, 16(%r13,%rbx)
	movq	%r14, %rdi
	callq	_load_heap_v
	movq	(%r15), %r12
	incq	%r12
	movq	%r12, (%r15)
	cmpl	$2, %r12d
	jl	LBB0_11
## %bb.7:
	movl	24(%r13,%rbx), %r15d
	movq	_GH@GOTPCREL(%rip), %r13
	movl	%r12d, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	shrl	%ebx
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movl	24(%rax), %edi
	movl	%r15d, %esi
	callq	_news_id_compare
	testq	%rax, %rax
	jle	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rcx
	movl	%r12d, %edx
	movq	%rcx, (%rax,%rdx,8)
	cmpl	$3, %r12d
	movl	%ebx, %r12d
	ja	LBB0_8
	jmp	LBB0_12
LBB0_11:
	movl	%r12d, %ebx
LBB0_12:
	movq	_GH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movq	%r14, (%rax,%rcx,8)
	movl	$1, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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	_TL_VECTOR,4,2                  ## @TL_VECTOR
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gather_heap_insert: %d elements (size %d)\n"

	.comm	_GH_total,4,2                   ## @GH_total
	.comm	_GH_E,8,3                       ## @GH_E
	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	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	w3, [x19]
	cmp	w3, #8
	b.lt	LBB0_10
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
Lloh5:
	adrp	x10, _TL_VECTOR@GOTPAGE
Lloh6:
	ldr	x10, [x10, _TL_VECTOR@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_10
; %bb.2:
	ldr	w2, [x8, #4]
	cmp	w2, #1
	b.lt	LBB0_10
; %bb.3:
	mov	w9, #24
	orr	w10, wzr, #0x8
	madd	w9, w2, w9, w10
	cmp	w3, w9
	b.ne	LBB0_10
; %bb.4:
Lloh8:
	adrp	x9, _verbosity@GOTPAGE
Lloh9:
	ldr	x9, [x9, _verbosity@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w9, #2
	b.le	LBB0_6
; %bb.5:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	ldr	x8, [x19, #8]
	ldr	w2, [x8, #4]
LBB0_6:
Lloh16:
	adrp	x9, _GH_total@GOTPAGE
Lloh17:
	ldr	x9, [x9, _GH_total@GOTPAGEOFF]
	ldr	w10, [x9]
	add	w10, w10, w2
	str	w10, [x9]
Lloh18:
	adrp	x9, _GH_E@GOTPAGE
Lloh19:
	ldr	x9, [x9, _GH_E@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	ldr	x10, [x20]
	add	x19, x9, x10, lsl #5
	str	w2, [x19]
	add	x8, x8, #8
	add	w9, w2, w2, lsl #1
	lsl	w9, w9, #1
	add	x9, x8, w9, sxtw #2
	stp	x8, x9, [x19, #8]
	mov	x0, x19
	bl	_load_heap_v
	ldr	x8, [x20]
	add	x22, x8, #1
	str	x22, [x20]
Lloh21:
	adrp	x21, _GH@GOTPAGE
Lloh22:
	ldr	x21, [x21, _GH@GOTPAGEOFF]
	cmp	w22, #2
	b.lt	LBB0_12
; %bb.7:
	ldr	w20, [x19, #24]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w23, w22, #1
	ldr	x8, [x21]
	ldr	x8, [x8, w23, uxtw #3]
	ldr	w0, [x8, #24]
	mov	x1, x20
	bl	_news_id_compare
	cmp	x0, #1
	b.lt	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x8, x23, lsl #3]
	str	x9, [x8, w22, uxtw #3]
	cmp	w22, #3
	mov	x22, x23
	b.hi	LBB0_8
	b	LBB0_13
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	x23, x22
LBB0_13:
	ldr	x8, [x21]
	str	x19, [x8, w23, sxtw #3]
	mov	w0, #1
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GH_N,8,3                       ; @GH_N
	.comm	_MAX_CLUSTER_SERVERS,8,3        ; @MAX_CLUSTER_SERVERS
	.comm	_TL_VECTOR,4,2                  ; @TL_VECTOR
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gather_heap_insert: %d elements (size %d)\n"

	.comm	_GH_total,4,2                   ; @GH_total
	.comm	_GH_E,8,3                       ; @GH_E
	.comm	_GH,8,3                         ; @GH
	.no_dead_strip	_gather_heap_insert
.subsections_via_symbols
