	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__bt_truncate                   ## -- Begin function _bt_truncate
	.p2align	4, 0x90
__bt_truncate:                          ## @_bt_truncate
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %r15
	movl	%edi, %ebx
	callq	_RelationGetDescr
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_IndexRelationGetNumberOfAttributes
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_IndexRelationGetNumberOfKeyAttributes
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_BTreeTupleGetNAtts
	xorl	%edi, %edi
	cmpl	%r14d, %eax
	sete	%dil
	callq	_Assert
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_BTreeTupleGetNAtts
	xorl	%edi, %edi
	cmpl	%r14d, %eax
	sete	%dil
	callq	_Assert
	movl	%ebx, %edi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rcx
	callq	__bt_keep_natts
	cmpl	%r14d, %eax
	jle	LBB0_1
## %bb.4:
	xorl	%edi, %edi
	cmpl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	sete	%dil
	callq	_Assert
	movq	%r13, %rdi
	callq	_IndexTupleSize
	movl	%eax, %ebx
	movl	$4, %edi
	callq	_MAXALIGN
	movl	%eax, %r14d
	addl	%ebx, %r14d
	movl	%r14d, %edi
	callq	_palloc0
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_IndexTupleSize
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_memcpy
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %ebx
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_index_truncate_tuple
	movq	%rax, %r12
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	jle	LBB0_3
## %bb.2:
	xorl	%edi, %edi
	cmpl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	setne	%dil
	callq	_Assert
	movq	%r12, %rdi
	callq	_IndexTupleSize
	movl	%eax, %ebx
	movl	$4, %edi
	callq	_MAXALIGN
	movl	%eax, %r14d
	addl	%ebx, %r14d
	movl	%r14d, %edi
	callq	_palloc0
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_IndexTupleSize
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_memcpy
	movq	%r12, %rdi
	callq	_pfree
	movq	%rbx, %r12
LBB0_5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_Assert
	movq	_INDEX_SIZE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	(%r12), %eax
	orl	%r14d, %eax
	movl	%eax, (%r12)
	movslq	%r14d, %rax
	leaq	(%r12,%rax), %rbx
	addq	$-4, %rbx
	addq	$4, %r15
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ItemPointerCopy
	addq	$4, %r13
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_ItemPointerCompare
	shrq	$63, %rax
	movl	%eax, %edi
	callq	_Assert
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ItemPointerCompare
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_Assert
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_ItemPointerCompare
	shrq	$63, %rax
	movl	%eax, %edi
	callq	_Assert
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_BTreeTupleSetNAtts
	movq	%r12, %rdi
	callq	_BTreeTupleSetAltHeapTID
	jmp	LBB0_6
LBB0_3:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_BTreeTupleSetNAtts
LBB0_6:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INDEX_SIZE_MASK,4,2            ## @INDEX_SIZE_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__bt_truncate                   ; -- Begin function _bt_truncate
	.p2align	2
__bt_truncate:                          ; @_bt_truncate
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x25, x0
	bl	_RelationGetDescr
	mov	x23, x0
	mov	x0, x25
	bl	_IndexRelationGetNumberOfAttributes
	mov	x24, x0
	mov	x0, x25
	bl	_IndexRelationGetNumberOfKeyAttributes
	mov	x19, x0
	mov	x0, x21
	mov	x1, x25
	bl	_BTreeTupleGetNAtts
	cmp	w0, w24
	cset	w0, eq
	bl	_Assert
	mov	x0, x20
	mov	x1, x25
	bl	_BTreeTupleGetNAtts
	cmp	w0, w24
	cset	w0, eq
	bl	_Assert
	mov	x0, x25
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	bl	__bt_keep_natts
	cmp	w0, w24
	b.le	LBB0_2
; %bb.1:
	cmp	w24, w19
	cset	w0, eq
	bl	_Assert
	mov	x0, x20
	bl	_IndexTupleSize
	mov	x23, x0
	mov	w0, #4
	bl	_MAXALIGN
	add	w24, w0, w23
	mov	x0, x24
	bl	_palloc0
	mov	x23, x0
	mov	x0, x20
	bl	_IndexTupleSize
	mov	x2, x0
	mov	x0, x23
	mov	x1, x20
	bl	_memcpy
	b	LBB0_4
LBB0_2:
	mov	x25, x0
	mov	x0, x23
	mov	x1, x20
	mov	x2, x25
	bl	_index_truncate_tuple
	mov	x23, x0
	cmp	w25, w19
	b.le	LBB0_5
; %bb.3:
	cmp	w24, w19
	cset	w0, ne
	bl	_Assert
	mov	x0, x23
	bl	_IndexTupleSize
	mov	x24, x0
	mov	w0, #4
	bl	_MAXALIGN
	add	w24, w0, w24
	mov	x0, x24
	bl	_palloc0
	mov	x25, x0
	mov	x0, x23
	bl	_IndexTupleSize
	mov	x2, x0
	mov	x0, x25
	mov	x1, x23
	bl	_memcpy
	mov	x0, x23
	bl	_pfree
	mov	x23, x25
LBB0_4:
	ldr	w0, [x22]
	bl	_Assert
Lloh0:
	adrp	x8, _INDEX_SIZE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INDEX_SIZE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x23]
	bic	w8, w9, w8
	orr	w8, w8, w24
	str	w8, [x23]
	add	x8, x23, w24, sxtw
	sub	x22, x8, #4
	add	x21, x21, #4
	mov	x0, x21
	mov	x1, x22
	bl	_ItemPointerCopy
	add	x20, x20, #4
	mov	x0, x21
	mov	x1, x20
	bl	_ItemPointerCompare
	lsr	x0, x0, #63
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_Assert
	mov	x0, x22
	mov	x1, x21
	bl	_ItemPointerCompare
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_Assert
	mov	x0, x22
	mov	x1, x20
	bl	_ItemPointerCompare
	lsr	x0, x0, #63
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_Assert
	mov	x0, x23
	mov	x1, x19
	bl	_BTreeTupleSetNAtts
	mov	x0, x23
	bl	_BTreeTupleSetAltHeapTID
	b	LBB0_6
LBB0_5:
	mov	x0, x23
	mov	x1, x25
	bl	_BTreeTupleSetNAtts
LBB0_6:
	mov	x0, x23
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INDEX_SIZE_MASK,4,2            ; @INDEX_SIZE_MASK
.subsections_via_symbols
