	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function writetup_heap
_writetup_heap:                         ## @writetup_heap
	.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, %r15d
	movq	%rdi, %r12
	movslq	(%rdx), %r14
	movq	_MINIMAL_TUPLE_DATA_OFFSET@GOTPCREL(%rip), %rax
	movslq	(%rax), %r13
	movl	(%r14), %ebx
	subl	%r13d, %ebx
	addq	%r14, %r13
	leal	4(%rbx), %eax
	movl	%eax, -44(%rbp)
	movl	4(%rdi), %edi
	leaq	-44(%rbp), %rdx
	movl	$4, %ecx
	callq	_LogicalTapeWrite
	movl	4(%r12), %edi
	movl	%r15d, %esi
	movq	%r13, %rdx
	movl	%ebx, %ecx
	callq	_LogicalTapeWrite
	cmpq	$0, 8(%r12)
	je	LBB0_2
## %bb.1:
	movl	4(%r12), %edi
	leaq	-44(%rbp), %rdx
	movl	%r15d, %esi
	movl	$4, %ecx
	callq	_LogicalTapeWrite
LBB0_2:
	cmpl	$0, (%r12)
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_GetMemoryChunkSpace
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_FREEMEM
	movq	%r14, %rdi
	callq	_heap_free_minimal_tuple
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MINIMAL_TUPLE_DATA_OFFSET,4,2  ## @MINIMAL_TUPLE_DATA_OFFSET
	.no_dead_strip	_writetup_heap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function writetup_heap
_writetup_heap:                         ; @writetup_heap
	.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	x21, x1
	mov	x20, x0
	ldrsw	x19, [x2]
Lloh0:
	adrp	x8, _MINIMAL_TUPLE_DATA_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MINIMAL_TUPLE_DATA_OFFSET@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	add	x22, x19, x8
	ldr	w9, [x19]
	sub	w23, w9, w8
	add	w8, w23, #4
	str	w8, [sp, #12]
	ldr	w0, [x0, #4]
	add	x2, sp, #12
	mov	w3, #4
	bl	_LogicalTapeWrite
	ldr	w0, [x20, #4]
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	bl	_LogicalTapeWrite
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x20, #4]
	add	x2, sp, #12
	mov	x1, x21
	mov	w3, #4
	bl	_LogicalTapeWrite
LBB0_2:
	ldr	w8, [x20]
	cbnz	w8, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_GetMemoryChunkSpace
	mov	x1, x0
	mov	x0, x20
	bl	_FREEMEM
	mov	x0, x19
	bl	_heap_free_minimal_tuple
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MINIMAL_TUPLE_DATA_OFFSET,4,2  ; @MINIMAL_TUPLE_DATA_OFFSET
	.no_dead_strip	_writetup_heap
.subsections_via_symbols
