	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gather_heap_advance
_gather_heap_advance:                   ## @gather_heap_advance
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_GH_N@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.1:
	movq	_GH@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	movq	8(%rdx), %r14
	cmpl	$0, 8(%r14)
	je	LBB0_2
## %bb.4:
	movq	%r14, %rdi
	callq	_load_heap_v
	movl	(%rbx), %r9d
	jmp	LBB0_5
LBB0_2:
	movl	%ecx, %r9d
	decl	%r9d
	movl	%r9d, (%rbx)
	je	LBB0_14
## %bb.3:
	movq	(%rdx,%rcx,8), %r14
LBB0_5:
	movl	$1, %edx
	cmpl	$2, %r9d
	jl	LBB0_13
## %bb.6:
	movq	(%r14), %r8
	movl	$1, %esi
	movl	$2, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpl	%r9d, %ebx
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %edx
	orl	$1, %edx
	movslq	%edx, %rcx
	movq	(%rdi,%rcx,8), %rcx
	movq	(%rcx), %rcx
	movslq	%ebx, %rax
	movq	(%rdi,%rax,8), %rax
	cmpq	(%rax), %rcx
	jb	LBB0_10
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %edx
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movslq	%edx, %rax
	movq	(%rdi,%rax,8), %rbx
	cmpq	(%rbx), %r8
	jbe	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movslq	%esi, %rax
	movq	%rbx, (%rdi,%rax,8)
	leal	(%rdx,%rdx), %ebx
	movl	%edx, %esi
	cmpl	%r9d, %ebx
	jle	LBB0_7
	jmp	LBB0_13
LBB0_11:
	movl	%esi, %edx
LBB0_13:
	movq	(%r15), %rax
	movslq	%edx, %rcx
	movq	%r14, (%rax,%rcx,8)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GH_N,4,2                       ## @GH_N
	.comm	_GH,8,3                         ## @GH
	.no_dead_strip	_gather_heap_advance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gather_heap_advance
_gather_heap_advance:                   ; @gather_heap_advance
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, _GH_N@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GH_N@GOTPAGEOFF]
	ldrsw	x9, [x21]
	cbz	w9, LBB0_14
; %bb.1:
Lloh2:
	adrp	x20, _GH@GOTPAGE
Lloh3:
	ldr	x20, [x20, _GH@GOTPAGEOFF]
	ldr	x10, [x20]
	ldr	x19, [x10, #8]
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_load_heap_v
	ldr	w8, [x21]
	cmp	w8, #2
	b.ge	LBB0_6
LBB0_3:
	mov	w11, #1
	b	LBB0_13
LBB0_4:
	subs	w8, w9, #1
	str	w8, [x21]
	b.eq	LBB0_14
; %bb.5:
	ldr	x19, [x10, x9, lsl #3]
	cmp	w8, #2
	b.lt	LBB0_3
LBB0_6:
	ldr	x9, [x19]
	mov	w10, #1
	mov	w12, #2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x20]
	cmp	w12, w8
	b.ge	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	sxtw	x11, w12
	orr	x11, x11, #0x1
	ldr	x14, [x13, x11, lsl #3]
	ldr	x14, [x14]
	ldr	x15, [x13, w12, sxtw #3]
	ldr	x15, [x15]
	cmp	x14, x15
	csel	w11, w11, w12, lo
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x11, x12
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x12, [x13, w11, sxtw #3]
	ldr	x14, [x12]
	cmp	x9, x14
	b.ls	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	str	x12, [x13, w10, sxtw #3]
	lsl	w12, w11, #1
	mov	x10, x11
	cmp	w12, w8
	b.le	LBB0_7
	b	LBB0_13
LBB0_12:
	mov	x11, x10
LBB0_13:
	ldr	x8, [x20]
	str	x19, [x8, w11, sxtw #3]
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_GH_N,4,2                       ; @GH_N
	.comm	_GH,8,3                         ; @GH
	.no_dead_strip	_gather_heap_advance
.subsections_via_symbols
