	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tuplestore_clear               ## -- Begin function tuplestore_clear
	.p2align	4, 0x90
_tuplestore_clear:                      ## @tuplestore_clear
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	48(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_BufFileClose
LBB0_2:
	movq	$0, 48(%r14)
	movq	40(%r14), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movslq	(%r14), %rbx
	cmpl	4(%r14), %ebx
	jge	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rbx,4), %edi
	callq	_GetMemoryChunkSpace
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_FREEMEM
	movq	40(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_pfree
	incq	%rbx
	movslq	4(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	40(%r14), %rax
	jmp	LBB0_5
LBB0_6:
	movq	_TSS_INMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	movl	$0, 8(%r14)
	movq	$0, (%r14)
	movq	$0, 24(%r14)
	movl	12(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.7:
	movq	16(%r14), %rcx
	leal	-1(%rax), %edx
	cmpl	$7, %edx
	jb	LBB0_10
## %bb.8:
	movl	%eax, %edx
	andl	$-8, %edx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rcx)
	movq	$0, 8(%rcx)
	movl	$0, 16(%rcx)
	movq	$0, 24(%rcx)
	movl	$0, 32(%rcx)
	movq	$0, 40(%rcx)
	movl	$0, 48(%rcx)
	movq	$0, 56(%rcx)
	movl	$0, 64(%rcx)
	movq	$0, 72(%rcx)
	movl	$0, 80(%rcx)
	movq	$0, 88(%rcx)
	movl	$0, 96(%rcx)
	movq	$0, 104(%rcx)
	movl	$0, 112(%rcx)
	movq	$0, 120(%rcx)
	subq	$-128, %rcx
	addl	$-8, %edx
	jne	LBB0_9
LBB0_10:
	testb	$7, %al
	je	LBB0_13
## %bb.11:
	andl	$7, %eax
	shlq	$4, %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rcx,%rdx)
	movq	$0, 8(%rcx,%rdx)
	addq	$16, %rdx
	cmpl	%edx, %eax
	jne	LBB0_12
LBB0_13:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TSS_INMEM,4,2                  ## @TSS_INMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tuplestore_clear               ; -- Begin function tuplestore_clear
	.p2align	2
_tuplestore_clear:                      ; @tuplestore_clear
	.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
	mov	x19, x0
	ldr	x0, [x0, #48]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_BufFileClose
LBB0_2:
	str	xzr, [x19, #48]
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_6
; %bb.3:
	ldp	w20, w9, [x19]
                                        ; kill: def $w20 killed $w20 def $x20
	sxtw	x20, w20
	cmp	w20, w9
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x21, x20, #2
	ldr	w0, [x8, x21]
	bl	_GetMemoryChunkSpace
	mov	x1, x0
	mov	x0, x19
	bl	_FREEMEM
	ldr	x8, [x19, #40]
	ldr	w0, [x8, x21]
	bl	_pfree
	add	x20, x20, #1
	ldrsw	x8, [x19, #4]
	cmp	x20, x8
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #40]
	b	LBB0_4
LBB0_6:
Lloh0:
	adrp	x8, _TSS_INMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TSS_INMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	str	wzr, [x19, #8]
	str	xzr, [x19]
	str	xzr, [x19, #24]
	ldr	w9, [x19, #12]
	subs	w8, w9, #1
	b.lt	LBB0_14
; %bb.7:
	ldr	x12, [x19, #16]
	cmp	w8, #3
	b.hs	LBB0_9
; %bb.8:
	mov	w10, #0
	mov	x8, x12
	b	LBB0_12
LBB0_9:
	add	x11, x8, #1
	and	x10, x11, #0x1fffffffc
	add	x8, x12, x10, lsl #4
	add	x12, x12, #32
	mov	x13, x10
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	stur	wzr, [x12, #-32]
	stur	wzr, [x12, #-16]
	str	wzr, [x12]
	str	wzr, [x12, #16]
	stur	xzr, [x12, #-24]
	stur	xzr, [x12, #-8]
	str	xzr, [x12, #8]
	str	xzr, [x12, #24]
	add	x12, x12, #64
	subs	x13, x13, #4
	b.ne	LBB0_10
; %bb.11:
	cmp	x11, x10
	b.eq	LBB0_14
LBB0_12:
	sub	w9, w9, w10
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	str	wzr, [x8]
	str	xzr, [x8, #8]
	add	x8, x8, #16
	subs	w9, w9, #1
	b.ne	LBB0_13
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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TSS_INMEM,4,2                  ; @TSS_INMEM
.subsections_via_symbols
