	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RelationTruncate               ## -- Begin function RelationTruncate
	.p2align	4, 0x90
_RelationTruncate:                      ## @RelationTruncate
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%rbx, %rax
	movl	%r14d, %ebx
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	%r15, %rdi
	callq	_RelationOpenSmgr
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15), %rdi
	movq	%rax, 16(%rdi)
	movq	%rax, 8(%rdi)
	movq	%rax, (%rdi)
	movq	_MAIN_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movl	%r14d, (%r13)
	movq	_FSM_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_smgrexists
	movl	%eax, %ecx
	movb	$1, %al
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	$1, %r14d
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	je	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_FreeSpaceMapPrepareTruncateRel
	movl	%eax, 4(%r13)
	movl	%eax, %edi
	callq	_BlockNumberIsValid
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_FSM_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movl	$2, %r14d
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
LBB0_3:
	movq	(%r15), %rdi
	movq	_VISIBILITYMAP_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_smgrexists
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movq	%r15, %rdi
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	callq	_visibilitymap_prepare_truncate
	movl	%r14d, %ebx
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movl	%eax, (%r13,%rbx,4)
	movl	%eax, %edi
	callq	_BlockNumberIsValid
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_VISIBILITYMAP_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12,%rbx,4)
	incl	%r14d
LBB0_6:
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
LBB0_7:
	movq	%r15, %rdi
	callq	_RelationNeedsWAL
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movl	%ebx, -80(%rbp)
	movl	8(%r15), %eax
	movl	%eax, -84(%rbp)
	movq	_SMGR_TRUNCATE_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	xorl	%eax, %eax
	callq	_XLogBeginInsert
	leaq	-88(%rbp), %rdi
	movl	$12, %esi
	callq	_XLogRegisterData
	movq	_RM_SMGR_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XLOG_SMGR_TRUNCATE@GOTPCREL(%rip), %rax
	movq	_XLR_SPECIAL_REL_UPDATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_XLogInsert
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	orl	%ecx, -64(%rbp)                 ## 4-byte Folded Spill
	je	LBB0_10
## %bb.9:
	movl	%eax, %edi
	callq	_XLogFlush
LBB0_10:
	movq	(%r15), %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	movq	%r13, %rcx
	callq	_smgrtruncate
	cmpb	$0, -56(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_12
## %bb.11:
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_FreeSpaceMapVacuumRange
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_FORKNUM,4,2                ## @MAX_FORKNUM
	.comm	_InvalidBlockNumber,8,3         ## @InvalidBlockNumber
	.comm	_MAIN_FORKNUM,4,2               ## @MAIN_FORKNUM
	.comm	_FSM_FORKNUM,4,2                ## @FSM_FORKNUM
	.comm	_VISIBILITYMAP_FORKNUM,4,2      ## @VISIBILITYMAP_FORKNUM
	.comm	_SMGR_TRUNCATE_ALL,4,2          ## @SMGR_TRUNCATE_ALL
	.comm	_RM_SMGR_ID,4,2                 ## @RM_SMGR_ID
	.comm	_XLOG_SMGR_TRUNCATE,4,2         ## @XLOG_SMGR_TRUNCATE
	.comm	_XLR_SPECIAL_REL_UPDATE,4,2     ## @XLR_SPECIAL_REL_UPDATE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RelationTruncate               ; -- Begin function RelationTruncate
	.p2align	2
_RelationTruncate:                      ; @RelationTruncate
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAX_FORKNUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_FORKNUM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x21, x9, x12
	mov	sp, x21
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x22, x8, x12
	mov	sp, x22
	bl	_RelationOpenSmgr
Lloh10:
	adrp	x26, _InvalidBlockNumber@GOTPAGE
Lloh11:
	ldr	x26, [x26, _InvalidBlockNumber@GOTPAGEOFF]
	ldr	x8, [x26]
	ldr	x0, [x20]
	stp	x8, x8, [x0, #8]
	str	x8, [x0]
Lloh12:
	adrp	x8, _MAIN_FORKNUM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAIN_FORKNUM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x21]
	str	w19, [x22]
Lloh15:
	adrp	x23, _FSM_FORKNUM@GOTPAGE
Lloh16:
	ldr	x23, [x23, _FSM_FORKNUM@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_smgrexists
	mov	x24, x0
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_FreeSpaceMapPrepareTruncateRel
	str	w0, [x22, #4]
	bl	_BlockNumberIsValid
	cbz	x0, LBB0_3
; %bb.2:
	mov	w27, #0
	ldr	w8, [x23]
	str	w8, [x21, #4]
	mov	w23, #2
	b	LBB0_4
LBB0_3:
	mov	w23, #1
	mov	w27, #1
LBB0_4:
	ldr	x0, [x20]
Lloh17:
	adrp	x28, _VISIBILITYMAP_FORKNUM@GOTPAGE
Lloh18:
	ldr	x28, [x28, _VISIBILITYMAP_FORKNUM@GOTPAGEOFF]
	ldr	w1, [x28]
	bl	_smgrexists
	mov	x25, x0
	cbz	w0, LBB0_7
; %bb.5:
	mov	x0, x20
	mov	x1, x19
	bl	_visibilitymap_prepare_truncate
	str	w0, [x22, w23, uxtw #2]
	bl	_BlockNumberIsValid
	cbz	x0, LBB0_7
; %bb.6:
	mov	w8, w23
	ldr	w9, [x28]
	str	w9, [x21, x8, lsl #2]
	add	w23, w23, #1
LBB0_7:
	mov	x0, x20
	bl	_RelationNeedsWAL
	cbz	x0, LBB0_10
; %bb.8:
	orr	w24, w24, w25
	stur	w19, [x29, #-96]
	ldr	w8, [x20, #8]
Lloh19:
	adrp	x9, _SMGR_TRUNCATE_ALL@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SMGR_TRUNCATE_ALL@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	stp	w9, w8, [x29, #-104]
	bl	_XLogBeginInsert
	sub	x0, x29, #104
	mov	w1, #12
	bl	_XLogRegisterData
Lloh22:
	adrp	x8, _RM_SMGR_ID@GOTPAGE
Lloh23:
	ldr	x8, [x8, _RM_SMGR_ID@GOTPAGEOFF]
Lloh24:
	adrp	x9, _XLOG_SMGR_TRUNCATE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _XLOG_SMGR_TRUNCATE@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	ldr	w8, [x9]
Lloh28:
	adrp	x9, _XLR_SPECIAL_REL_UPDATE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _XLR_SPECIAL_REL_UPDATE@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_XLogInsert
	cbz	w24, LBB0_10
; %bb.9:
	bl	_XLogFlush
LBB0_10:
	ldr	x0, [x20]
	mov	x1, x21
	mov	x2, x23
	mov	x3, x22
	bl	_smgrtruncate
	tbnz	w27, #0, LBB0_12
; %bb.11:
	ldr	x2, [x26]
	mov	x0, x20
	mov	x1, x19
	bl	_FreeSpaceMapVacuumRange
LBB0_12:
	ldur	x8, [x29, #-88]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh26
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_FORKNUM,4,2                ; @MAX_FORKNUM
	.comm	_InvalidBlockNumber,8,3         ; @InvalidBlockNumber
	.comm	_MAIN_FORKNUM,4,2               ; @MAIN_FORKNUM
	.comm	_FSM_FORKNUM,4,2                ; @FSM_FORKNUM
	.comm	_VISIBILITYMAP_FORKNUM,4,2      ; @VISIBILITYMAP_FORKNUM
	.comm	_SMGR_TRUNCATE_ALL,4,2          ; @SMGR_TRUNCATE_ALL
	.comm	_RM_SMGR_ID,4,2                 ; @RM_SMGR_ID
	.comm	_XLOG_SMGR_TRUNCATE,4,2         ; @XLOG_SMGR_TRUNCATE
	.comm	_XLR_SPECIAL_REL_UPDATE,4,2     ; @XLR_SPECIAL_REL_UPDATE
.subsections_via_symbols
