	.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
	movl	%esi, %ecx
	cmpl	$11, %esi
	jg	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movl	%ecx, %edx
	jmp	LBB0_10
LBB0_2:
	movq	%rdi, %r15
	movl	(%rdi), %edx
	movq	_TL_VECTOR_TOTAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_9
## %bb.3:
	movq	_GH_E@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_GH_N@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	shlq	$4, %r12
	movl	4(%r15), %eax
	movq	_GH_total@GOTPCREL(%rip), %rdx
	addl	%eax, (%rdx)
	movl	8(%r15), %edx
	movl	%edx, (%r13,%r12)
	movl	%edx, %eax
	shll	$4, %eax
	orl	$12, %eax
	cmpl	%ecx, %eax
	jne	LBB0_13
## %bb.4:
	leaq	(%r12,%r13), %r14
	addl	$-12, %ecx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movl	$4, %edi
	xorl	%eax, %eax
	callq	_vkprintf
	cmpl	$0, (%r14)
	je	LBB0_12
## %bb.5:
	addq	$12, %r15
	movq	%r15, 8(%r13,%r12)
	movq	%r14, %rdi
	callq	_load_heap_v
	movq	_GH_N@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	incq	%r15
	movq	%r15, (%rax)
	cmpl	$2, %r15d
	jl	LBB0_15
## %bb.6:
	movq	_GH@GOTPCREL(%rip), %r12
	movl	%r15d, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	shrl	%ebx
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	%r14, %rsi
	callq	_gh_entry_less
	testq	%rax, %rax
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rcx
	movl	%r15d, %edx
	movq	%rcx, (%rax,%rdx,8)
	cmpl	$3, %r15d
	movl	%ebx, %r15d
	ja	LBB0_7
	jmp	LBB0_16
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
LBB0_10:
	xorl	%eax, %eax
	callq	_vkprintf
LBB0_11:
	movl	$-1, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_vkprintf
	jmp	LBB0_11
LBB0_15:
	movl	%r15d, %ebx
LBB0_16:
	movq	_GH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movq	%r14, (%rax,%rcx,8)
	movl	$1, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad result: bytes = %d\n"

	.comm	_TL_VECTOR_TOTAL,4,2            ## @TL_VECTOR_TOTAL
L_.str.1:                               ## @.str.1
	.asciz	"Bad result: data = %08x\n"

	.comm	_GH_E,8,3                       ## @GH_E
	.comm	_GH_N,8,3                       ## @GH_N
	.comm	_GH_total,4,2                   ## @GH_total
L_.str.2:                               ## @.str.2
	.asciz	"Bad result: H->remaining = %d, bytes = %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"gather_heap_insert: %d elements (size %d)\n"

	.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:
	sub	sp, sp, #80
	.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
	mov	x8, x1
	cmp	w1, #11
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	mov	x2, x8
	b	LBB0_11
LBB0_2:
	mov	x20, x0
	ldr	w2, [x0]
Lloh2:
	adrp	x9, _TL_VECTOR_TOTAL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TL_VECTOR_TOTAL@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w2, w9
	b.ne	LBB0_8
; %bb.3:
Lloh5:
	adrp	x9, _GH_E@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GH_E@GOTPAGEOFF]
Lloh7:
	ldr	x22, [x9]
Lloh8:
	adrp	x21, _GH_N@GOTPAGE
Lloh9:
	ldr	x21, [x21, _GH_N@GOTPAGEOFF]
	ldr	x23, [x21]
Lloh10:
	adrp	x9, _GH_total@GOTPAGE
Lloh11:
	ldr	x9, [x9, _GH_total@GOTPAGEOFF]
	ldr	w10, [x9]
	ldp	w11, w2, [x20, #4]
	add	w10, w10, w11
	add	x19, x22, x23, lsl #4
	str	w10, [x9]
	str	w2, [x19]
	mov	w9, #12
	bfi	w9, w2, #4, #28
	cmp	w9, w8
	b.ne	LBB0_9
; %bb.4:
	sub	w8, w8, #12
	str	x8, [sp]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #4
	bl	_vkprintf
	ldr	w8, [x19]
	cbz	w8, LBB0_15
; %bb.5:
	add	x8, x20, #12
	add	x9, x22, x23, lsl #4
	str	x8, [x9, #8]
	mov	x0, x19
	bl	_load_heap_v
	ldr	x8, [x21]
	add	x22, x8, #1
	str	x22, [x21]
Lloh14:
	adrp	x20, _GH@GOTPAGE
Lloh15:
	ldr	x20, [x20, _GH@GOTPAGEOFF]
	cmp	w22, #2
	b.lt	LBB0_13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w21, w22, #1
	ldr	x8, [x20]
	ldr	x0, [x8, w21, uxtw #3]
	mov	x1, x19
	bl	_gh_entry_less
	cbnz	x0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x8, x21, lsl #3]
	str	x9, [x8, w22, uxtw #3]
	cmp	w22, #3
	mov	x22, x21
	b.hi	LBB0_6
	b	LBB0_14
LBB0_8:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_9:
	str	x8, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_10:
	mov	w0, #2
LBB0_11:
	bl	_vkprintf
	mov	w0, #-1
LBB0_12:
	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
	add	sp, sp, #80
	ret
LBB0_13:
	mov	x21, x22
LBB0_14:
	ldr	x8, [x20]
	str	x19, [x8, w21, sxtw #3]
	mov	w0, #1
	b	LBB0_12
LBB0_15:
	mov	w0, #0
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad result: bytes = %d\n"

	.comm	_TL_VECTOR_TOTAL,4,2            ; @TL_VECTOR_TOTAL
l_.str.1:                               ; @.str.1
	.asciz	"Bad result: data = %08x\n"

	.comm	_GH_E,8,3                       ; @GH_E
	.comm	_GH_N,8,3                       ; @GH_N
	.comm	_GH_total,4,2                   ; @GH_total
l_.str.2:                               ; @.str.2
	.asciz	"Bad result: H->remaining = %d, bytes = %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"gather_heap_insert: %d elements (size %d)\n"

	.comm	_GH,8,3                         ; @GH
	.no_dead_strip	_gather_heap_insert
.subsections_via_symbols
