	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function heap_free
_heap_free:                             ## @heap_free
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movb	(%rdi), %cl
	decb	%cl
	movl	$1, %edx
	movl	$1, %eax
	shll	%cl, %eax
	addl	%esi, %eax
	movq	8(%rdi), %rcx
	movslq	%eax, %rsi
	cmpl	$0, (%rcx,%rsi,4)
	jle	LBB0_3
## %bb.1:
	movl	$1, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	sarl	%eax
	incl	%edx
	movslq	%eax, %rsi
	cmpl	$0, (%rcx,%rsi,4)
	jg	LBB0_2
LBB0_3:
	movl	%edx, (%rcx,%rsi,4)
	movl	%eax, %esi
	xorl	$1, %esi
	movslq	%esi, %rsi
	cmpl	(%rcx,%rsi,4), %edx
	jne	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	sarl	%eax
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	incl	%edx
	movl	%edx, (%rcx,%rsi,4)
	xorl	$1, %esi
	movslq	%esi, %rsi
	cmpl	(%rcx,%rsi,4), %edx
	je	LBB0_9
LBB0_5:
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	(%rcx,%rsi,4), %edx
	jle	LBB0_8
## %bb.6:
	leaq	(%rcx,%rsi,4), %rsi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%edx, (%rsi)
	cltq
	movl	(%rcx,%rax,4), %edx
	sarl	%eax
	movslq	%eax, %rdi
	leaq	(%rcx,%rdi,4), %rsi
	cmpl	(%rcx,%rdi,4), %edx
	jg	LBB0_7
LBB0_8:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_heap_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function heap_free
_heap_free:                             ; @heap_free
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	sub	w8, w8, #1
	mov	w9, #1
	lsl	w8, w9, w8
	add	w10, w8, w1
	ldr	x8, [x0, #8]
	ldr	w11, [x8, w10, sxtw #2]
	cmp	w11, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w9, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x11, x10
	asr	w10, w10, #1
	add	w9, w9, #1
	ldr	w12, [x8, w10, sxtw #2]
	cmp	w12, #0
	b.gt	LBB0_2
; %bb.3:
	sbfx	x11, x11, #1, #31
	b	LBB0_5
LBB0_4:
	mov	x11, x10
	sxtw	x11, w11
LBB0_5:
	str	w9, [x8, x11, lsl #2]
	eor	w11, w10, #0x1
	ldr	w11, [x8, w11, sxtw #2]
	cmp	w9, w11
	b.ne	LBB0_7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x10
	asr	w10, w10, #1
	sbfx	x11, x9, #1, #31
	sbfiz	x12, x10, #2, #32
	ldr	w9, [x8, x12]
	add	w9, w9, #1
	str	w9, [x8, x12]
	eor	x11, x11, #0x1
	ldr	w11, [x8, x11, lsl #2]
	cmp	w9, w11
	b.eq	LBB0_6
LBB0_7:
	asr	w10, w10, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x11, x8, w10, sxtw #2
	ldr	w12, [x11]
	cmp	w9, w12
	b.le	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	str	w9, [x11]
	ldr	w9, [x8, w10, sxtw #2]
	asr	w10, w10, #1
	b	LBB0_8
LBB0_10:
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_heap_free
.subsections_via_symbols
