	.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	%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	_GH_mode@GOTPCREL(%rip), %rax
	movq	_g_double@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	cmpl	$1, %ecx
	movl	$3, %ebx
	sbbl	$0, %ebx
	movq	_GH_N@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_23
## %bb.1:
	movq	_GH@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	8(%rax), %r12
	movslq	(%r12), %rdx
	movslq	%ebx, %rcx
	addq	%rdx, %rcx
	movl	%ecx, (%r12)
	decl	4(%r12)
	je	LBB0_5
## %bb.2:
	cmpq	%rcx, 8(%r12)
	jg	LBB0_4
## %bb.3:
	movq	24(%r12), %rax
	movq	8(%rax), %rdi
	movq	%rdi, 24(%r12)
	callq	_assert
	movq	24(%r12), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	imull	4(%r12), %ebx
	movq	_CHUNK_INTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %ebx
	cmovgel	%ecx, %ebx
	addl	%eax, %ebx
	movslq	%ebx, %rax
	movq	%rax, 8(%r12)
LBB0_4:
	movq	%r12, %rdi
	callq	_load_heap_v
	movl	(%r15), %r10d
	jmp	LBB0_7
LBB0_5:
	movslq	(%r15), %rcx
	movl	%ecx, %r10d
	decl	%r10d
	movl	%r10d, (%r15)
	je	LBB0_23
## %bb.6:
	movq	(%rax,%rcx,8), %r12
LBB0_7:
	movl	$1, %ebx
	cmpl	$2, %r10d
	jl	LBB0_22
## %bb.8:
	movl	16(%r12), %r9d
	movl	20(%r12), %r8d
	movl	$1, %esi
	movl	$2, %edx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	movslq	%esi, %rcx
	movq	%rax, (%rdi,%rcx,8)
	leal	(%rbx,%rbx), %edx
	movl	%ebx, %esi
	cmpl	%r10d, %edx
	jg	LBB0_22
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	cmpl	%r10d, %edx
	jge	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%edx, %eax
	orl	$1, %eax
	movslq	%eax, %r11
	movq	(%rdi,%r11,8), %r13
	movslq	%edx, %rcx
	movq	(%rdi,%rcx,8), %r15
	movl	16(%r15), %ebx
	cmpl	%ebx, 16(%r13)
	jl	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	jne	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	20(%r13), %r13d
	movl	%edx, %ebx
	cmpl	20(%r15), %r13d
	jge	LBB0_17
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r11, %rcx
	movl	%eax, %ebx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	movslq	%edx, %rcx
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%edx, %ebx
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	(%rdi,%rcx,8), %rax
	cmpl	16(%rax), %r9d
	jl	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_10 Depth=1
	jne	LBB0_9
## %bb.19:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	20(%rax), %r8d
	jg	LBB0_9
LBB0_21:
	movl	%esi, %ebx
LBB0_22:
	movq	(%r14), %rax
	movslq	%ebx, %rcx
	movq	%r12, (%rax,%rcx,8)
LBB0_23:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GH_mode,4,2                    ## @GH_mode
	.comm	_g_double,4,2                   ## @g_double
	.comm	_GH_N,4,2                       ## @GH_N
	.comm	_GH,8,3                         ## @GH
	.comm	_CHUNK_INTS,4,2                 ## @CHUNK_INTS
	.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	x8, _GH_mode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GH_mode@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _g_double@GOTPAGE
Lloh4:
	ldr	x9, [x9, _g_double@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #2
	cinc	w22, w8, ne
Lloh6:
	adrp	x21, _GH_N@GOTPAGE
Lloh7:
	ldr	x21, [x21, _GH_N@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_22
; %bb.1:
Lloh8:
	adrp	x20, _GH@GOTPAGE
Lloh9:
	ldr	x20, [x20, _GH@GOTPAGEOFF]
	ldr	x9, [x20]
	ldr	x19, [x9, #8]
	ldp	w8, w10, [x19]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	x8, x8, w22, sxtw
	subs	w10, w10, #1
	stp	w8, w10, [x19]
	b.eq	LBB0_6
; %bb.2:
	ldr	x9, [x19, #8]
	cmp	x9, x8
	b.gt	LBB0_4
; %bb.3:
	ldr	x8, [x19, #24]
	ldr	x0, [x8, #8]
	str	x0, [x19, #24]
	bl	_assert
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	w9, [x19, #4]
	mul	w9, w9, w22
Lloh10:
	adrp	x10, _CHUNK_INTS@GOTPAGE
Lloh11:
	ldr	x10, [x10, _CHUNK_INTS@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	cmp	w9, w10
	csel	w9, w9, w10, lt
	add	w8, w9, w8
	sxtw	x8, w8
	str	x8, [x19, #8]
LBB0_4:
	mov	x0, x19
	bl	_load_heap_v
	ldr	w8, [x21]
	cmp	w8, #2
	b.ge	LBB0_8
LBB0_5:
	mov	w14, #1
	b	LBB0_21
LBB0_6:
	ldrsw	x10, [x21]
	subs	w8, w10, #1
	str	w8, [x21]
	b.eq	LBB0_22
; %bb.7:
	ldr	x19, [x9, x10, lsl #3]
	cmp	w8, #2
	b.lt	LBB0_5
LBB0_8:
	ldp	w9, w10, [x19, #16]
	mov	w11, #1
	mov	w13, #2
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	str	x13, [x12, w11, sxtw #3]
	lsl	w13, w14, #1
	mov	x11, x14
	cmp	w13, w8
	b.gt	LBB0_21
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x20]
	cmp	w13, w8
	b.ge	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	sxtw	x15, w13
	orr	x16, x15, #0x1
	ldr	x14, [x12, x16, lsl #3]
	ldr	w0, [x14, #16]
	ldr	x17, [x12, w13, sxtw #3]
	ldr	w1, [x17, #16]
	cmp	w0, w1
	b.lt	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	b.ne	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x14, #20]
	ldr	w17, [x17, #20]
	mov	x14, x13
	cmp	w0, w17
	b.ge	LBB0_17
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x15, x16
	mov	x14, x16
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x14, x13
	sxtw	x15, w14
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x14, x13
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	x13, [x12, x15, lsl #3]
	ldr	w15, [x13, #16]
	cmp	w9, w15
	b.lt	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_10 Depth=1
	b.ne	LBB0_9
; %bb.19:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w15, [x13, #20]
	cmp	w10, w15
	b.gt	LBB0_9
LBB0_20:
	mov	x14, x11
LBB0_21:
	ldr	x8, [x20]
	str	x19, [x8, w14, sxtw #3]
LBB0_22:
	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	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GH_mode,4,2                    ; @GH_mode
	.comm	_g_double,4,2                   ; @g_double
	.comm	_GH_N,4,2                       ; @GH_N
	.comm	_GH,8,3                         ; @GH
	.comm	_CHUNK_INTS,4,2                 ; @CHUNK_INTS
	.no_dead_strip	_gather_heap_advance
.subsections_via_symbols
