	.file	"extr_nbtutils.c__bt_truncate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	_bt_truncate
	.type	_bt_truncate, @function
_bt_truncate:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, edi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	RelationGetDescr@PLT
	mov	edi, r15d
	mov	DWORD PTR [rsp], eax
	call	IndexRelationGetNumberOfAttributes@PLT
	mov	edi, r15d
	mov	r12d, eax
	call	IndexRelationGetNumberOfKeyAttributes@PLT
	mov	esi, r15d
	mov	rdi, rbp
	mov	r13d, eax
	call	BTreeTupleGetNAtts@PLT
	xor	edi, edi
	cmp	eax, r12d
	sete	dil
	call	Assert@PLT
	mov	esi, r15d
	mov	rdi, rbx
	call	BTreeTupleGetNAtts@PLT
	xor	edi, edi
	cmp	eax, r12d
	sete	dil
	call	Assert@PLT
	mov	rcx, r14
	mov	rdx, rbx
	mov	rsi, rbp
	mov	edi, r15d
	call	_bt_keep_natts@PLT
	cmp	r12d, eax
	jl	.L2
	mov	edi, DWORD PTR [rsp]
	mov	edx, eax
	mov	rsi, rbx
	mov	DWORD PTR 12[rsp], eax
	call	index_truncate_tuple@PLT
	mov	r8d, DWORD PTR 12[rsp]
	cmp	r13d, r8d
	jge	.L8
	mov	edi, 1
	mov	QWORD PTR [rsp], rax
	call	Assert@PLT
	mov	r9, QWORD PTR [rsp]
	mov	rdi, r9
	call	IndexTupleSize@PLT
	mov	edi, 4
	mov	r15d, eax
	call	MAXALIGN@PLT
	add	r15d, eax
	mov	edi, r15d
	call	palloc0@PLT
	mov	r9, QWORD PTR [rsp]
	mov	r12, rax
	mov	rdi, r9
	call	IndexTupleSize@PLT
	mov	r9, QWORD PTR [rsp]
	mov	rdi, r12
	mov	edx, eax
	mov	rsi, r9
	call	memcpy@PLT
	mov	r9, QWORD PTR [rsp]
	mov	rdi, r9
	call	pfree@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	xor	edi, edi
	cmp	r12d, r13d
	sete	dil
	call	Assert@PLT
	mov	rdi, rbx
	call	IndexTupleSize@PLT
	mov	edi, 4
	mov	r15d, eax
	call	MAXALIGN@PLT
	add	r15d, eax
	mov	edi, r15d
	call	palloc0@PLT
	mov	rdi, rbx
	mov	r12, rax
	call	IndexTupleSize@PLT
	mov	rsi, rbx
	mov	rdi, r12
	mov	edx, eax
	call	memcpy@PLT
.L5:
	mov	edi, DWORD PTR [r14]
	add	rbp, 4
	lea	r14, 4[rbx]
	call	Assert@PLT
	mov	eax, DWORD PTR INDEX_SIZE_MASK[rip]
	mov	rdi, rbp
	not	eax
	and	eax, DWORD PTR [r12]
	or	eax, r15d
	movsx	r15, r15d
	mov	DWORD PTR [r12], eax
	lea	r15, -4[r12+r15]
	mov	rsi, r15
	call	ItemPointerCopy@PLT
	mov	rsi, r14
	mov	rdi, rbp
	call	ItemPointerCompare@PLT
	shr	rax, 63
	mov	rdi, rax
	call	Assert@PLT
	mov	rsi, rbp
	mov	rdi, r15
	call	ItemPointerCompare@PLT
	not	rax
	mov	rdi, rax
	shr	rdi, 63
	call	Assert@PLT
	mov	rsi, r14
	mov	rdi, r15
	call	ItemPointerCompare@PLT
	shr	rax, 63
	mov	rdi, rax
	call	Assert@PLT
	mov	rdi, r12
	mov	esi, r13d
	call	BTreeTupleSetNAtts@PLT
	mov	rdi, r12
	call	BTreeTupleSetAltHeapTID@PLT
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	esi, r8d
	mov	rdi, rax
	mov	QWORD PTR [rsp], rax
	call	BTreeTupleSetNAtts@PLT
	mov	r9, QWORD PTR [rsp]
	mov	r12, r9
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	_bt_truncate, .-_bt_truncate
	.comm	INDEX_SIZE_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_nbtutils.c__bt_truncate.c"
	.text
	.align	2
	.global	_bt_truncate
	.syntax unified
	.arm
	.fpu softvfp
	.type	_bt_truncate, %function
_bt_truncate:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r2
	mov	r9, r3
	mov	r5, r0
	mov	r6, r1
	bl	RelationGetDescr
	mov	r10, r0
	mov	r0, r5
	bl	IndexRelationGetNumberOfAttributes
	mov	r7, r0
	mov	r0, r5
	bl	IndexRelationGetNumberOfKeyAttributes
	mov	r1, r5
	mov	r8, r0
	mov	r0, r6
	bl	BTreeTupleGetNAtts
	sub	r0, r0, r7
	clz	r0, r0
	lsr	r0, r0, #5
	bl	Assert
	mov	r1, r5
	mov	r0, r4
	bl	BTreeTupleGetNAtts
	sub	r0, r0, r7
	clz	r0, r0
	lsr	r0, r0, #5
	bl	Assert
	mov	r3, r9
	mov	r2, r4
	mov	r1, r6
	mov	r0, r5
	bl	_bt_keep_natts
	cmp	r7, r0
	blt	.L2
	mov	r5, r0
	mov	r1, r4
	mov	r0, r10
	mov	r2, r5
	bl	index_truncate_tuple
	cmp	r8, r5
	mov	r10, r0
	bge	.L8
	mov	r0, #1
	bl	Assert
	mov	r0, r10
	bl	IndexTupleSize
	mov	r7, r0
	mov	r0, #4
	bl	MAXALIGN
	add	r7, r7, r0
	mov	r0, r7
	bl	palloc0
	mov	r5, r0
	mov	r0, r10
	bl	IndexTupleSize
	mov	r1, r10
	mov	r2, r0
	mov	r0, r5
	bl	memcpy
	mov	r0, r10
	bl	pfree
	b	.L5
.L2:
	sub	r0, r7, r8
	clz	r0, r0
	lsr	r0, r0, #5
	bl	Assert
	mov	r0, r4
	bl	IndexTupleSize
	mov	r7, r0
	mov	r0, #4
	bl	MAXALIGN
	add	r7, r7, r0
	mov	r0, r7
	bl	palloc0
	mov	r5, r0
	mov	r0, r4
	bl	IndexTupleSize
	mov	r1, r4
	mov	r2, r0
	mov	r0, r5
	bl	memcpy
.L5:
	ldr	r0, [r9]
	bl	Assert
	ldr	r3, .L9
	ldr	r0, [r5]
	ldr	r3, [r3]
	sub	r9, r7, #4
	bic	r0, r0, r3
	add	r6, r6, #4
	add	r9, r5, r9
	orr	r7, r0, r7
	mov	r1, r9
	add	r4, r4, #4
	mov	r0, r6
	str	r7, [r5]
	bl	ItemPointerCopy
	mov	r1, r4
	mov	r0, r6
	bl	ItemPointerCompare
	lsr	r0, r0, #31
	bl	Assert
	mov	r1, r6
	mov	r0, r9
	bl	ItemPointerCompare
	mvn	r0, r0
	lsr	r0, r0, #31
	bl	Assert
	mov	r1, r4
	mov	r0, r9
	bl	ItemPointerCompare
	lsr	r0, r0, #31
	bl	Assert
	mov	r1, r8
	mov	r0, r5
	bl	BTreeTupleSetNAtts
	mov	r0, r5
	bl	BTreeTupleSetAltHeapTID
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	mov	r1, r5
	mov	r5, r10
	bl	BTreeTupleSetNAtts
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	.align	2
.L9:
	.word	INDEX_SIZE_MASK
	.size	_bt_truncate, .-_bt_truncate
	.comm	INDEX_SIZE_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
