	.file	"extr_heapam.c_heap_finish_speculative.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"invalid lp"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"invalid speculative token constant"
	.text
	.p2align 4
	.globl	heap_finish_speculative
	.type	heap_finish_speculative, @function
heap_finish_speculative:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	r15d, r15d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edi
	mov	rdi, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	ItemPointerGetBlockNumber@PLT
	mov	edi, r14d
	mov	esi, eax
	call	ReadBuffer@PLT
	mov	esi, DWORD PTR BUFFER_LOCK_EXCLUSIVE[rip]
	mov	ebp, eax
	mov	edi, eax
	call	LockBuffer@PLT
	mov	edi, ebp
	call	BufferGetPage@PLT
	mov	rdi, r13
	mov	r12, rax
	call	ItemPointerGetOffsetNumber@PLT
	mov	rdi, r12
	mov	rbx, rax
	call	PageGetMaxOffsetNumber@PLT
	cmp	rax, rbx
	jge	.L18
.L2:
	mov	rdi, r12
	call	PageGetMaxOffsetNumber@PLT
	cmp	rax, rbx
	jl	.L5
	mov	rdi, r15
	call	ItemIdIsNormal@PLT
	test	eax, eax
	je	.L5
.L4:
	mov	rsi, r15
	mov	rdi, r12
	call	PageGetItem@PLT
	xor	edi, edi
	lea	rsi, .LC1[rip]
	mov	rbx, rax
	mov	rax, QWORD PTR SpecTokenOffsetNumber[rip]
	cmp	QWORD PTR MaxOffsetNumber[rip], rax
	setl	dil
	call	StaticAssertStmt@PLT
	xor	eax, eax
	call	START_CRIT_SECTION@PLT
	mov	rdi, rbx
	call	HeapTupleHeaderIsSpeculative@PLT
	mov	edi, eax
	call	Assert@PLT
	mov	edi, ebp
	call	MarkBufferDirty@PLT
	mov	eax, DWORD PTR 0[r13]
	mov	edi, r14d
	mov	DWORD PTR [rbx], eax
	call	RelationNeedsWAL@PLT
	test	rax, rax
	jne	.L19
.L6:
	xor	eax, eax
	call	END_CRIT_SECTION@PLT
	mov	edi, ebp
	call	UnlockReleaseBuffer@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L20
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L5:
	.cfi_restore_state
	mov	edi, DWORD PTR ERROR[rip]
	lea	rsi, .LC0[rip]
	call	elog@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rsi, rbx
	mov	rdi, r12
	call	PageGetItemId@PLT
	mov	r15, rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, r13
	call	ItemPointerGetOffsetNumber@PLT
	mov	QWORD PTR [rsp], rax
	xor	eax, eax
	call	XLogBeginInsert@PLT
	mov	edi, DWORD PTR XLOG_INCLUDE_ORIGIN[rip]
	call	XLogSetRecordFlags@PLT
	mov	esi, DWORD PTR SizeOfHeapConfirm[rip]
	mov	rdi, rsp
	call	XLogRegisterData@PLT
	mov	edx, DWORD PTR REGBUF_STANDARD[rip]
	mov	esi, ebp
	xor	edi, edi
	call	XLogRegisterBuffer@PLT
	mov	esi, DWORD PTR XLOG_HEAP_CONFIRM[rip]
	mov	edi, DWORD PTR RM_HEAP_ID[rip]
	call	XLogInsert@PLT
	mov	rdi, r12
	mov	esi, eax
	call	PageSetLSN@PLT
	jmp	.L6
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	heap_finish_speculative, .-heap_finish_speculative
	.comm	XLOG_INCLUDE_ORIGIN,4,4
	.comm	XLOG_HEAP_CONFIRM,4,4
	.comm	SpecTokenOffsetNumber,8,8
	.comm	SizeOfHeapConfirm,4,4
	.comm	RM_HEAP_ID,4,4
	.comm	REGBUF_STANDARD,4,4
	.comm	MaxOffsetNumber,8,8
	.comm	ERROR,4,4
	.comm	BUFFER_LOCK_EXCLUSIVE,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_heapam.c_heap_finish_speculative.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"invalid lp\000"
	.align	2
.LC1:
	.ascii	"invalid speculative token constant\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	heap_finish_speculative
	.syntax unified
	.arm
	.fpu softvfp
	.type	heap_finish_speculative, %function
heap_finish_speculative:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L20
	sub	sp, sp, #12
	mov	r8, r0
	mov	r0, r1
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	ItemPointerGetBlockNumber
	mov	r1, r0
	mov	r0, r8
	bl	ReadBuffer
	mov	r5, r0
	ldr	r3, .L20+4
	ldr	r1, [r3]
	bl	LockBuffer
	mov	r0, r5
	bl	BufferGetPage
	mov	r4, r0
	mov	r0, r6
	bl	ItemPointerGetOffsetNumber
	mov	r7, r0
	mov	r0, r4
	bl	PageGetMaxOffsetNumber
	cmp	r0, r7
	movlt	r9, #0
	bge	.L17
.L2:
	mov	r0, r4
	bl	PageGetMaxOffsetNumber
	cmp	r0, r7
	blt	.L5
	mov	r0, r9
	bl	ItemIdIsNormal
	cmp	r0, #0
	beq	.L5
.L4:
	mov	r1, r9
	mov	r0, r4
	bl	PageGetItem
	mov	r7, r0
	ldr	r2, .L20+8
	ldr	r3, .L20+12
	ldr	r0, [r2]
	ldr	r3, [r3]
	ldr	r1, .L20+16
	cmp	r0, r3
	movge	r0, #0
	movlt	r0, #1
	bl	StaticAssertStmt
	bl	START_CRIT_SECTION
	mov	r0, r7
	bl	HeapTupleHeaderIsSpeculative
	bl	Assert
	mov	r0, r5
	bl	MarkBufferDirty
	ldr	r3, [r6]
	mov	r0, r8
	str	r3, [r7]
	bl	RelationNeedsWAL
	cmp	r0, #0
	bne	.L18
.L6:
	bl	END_CRIT_SECTION
	mov	r0, r5
	bl	UnlockReleaseBuffer
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L5:
	ldr	r3, .L20+20
	ldr	r1, .L20+24
	ldr	r0, [r3]
	bl	elog
	b	.L4
.L17:
	mov	r1, r7
	mov	r0, r4
	bl	PageGetItemId
	mov	r9, r0
	b	.L2
.L18:
	mov	r0, r6
	bl	ItemPointerGetOffsetNumber
	str	r0, [sp]
	bl	XLogBeginInsert
	ldr	r3, .L20+28
	ldr	r0, [r3]
	bl	XLogSetRecordFlags
	ldr	r3, .L20+32
	mov	r0, sp
	ldr	r1, [r3]
	bl	XLogRegisterData
	ldr	r3, .L20+36
	mov	r1, r5
	ldr	r2, [r3]
	mov	r0, #0
	bl	XLogRegisterBuffer
	ldr	r2, .L20+40
	ldr	r3, .L20+44
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	XLogInsert
	mov	r1, r0
	mov	r0, r4
	bl	PageSetLSN
	b	.L6
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC2
	.word	BUFFER_LOCK_EXCLUSIVE
	.word	MaxOffsetNumber
	.word	SpecTokenOffsetNumber
	.word	.LC1
	.word	ERROR
	.word	.LC0
	.word	XLOG_INCLUDE_ORIGIN
	.word	SizeOfHeapConfirm
	.word	REGBUF_STANDARD
	.word	XLOG_HEAP_CONFIRM
	.word	RM_HEAP_ID
	.size	heap_finish_speculative, .-heap_finish_speculative
	.comm	XLOG_INCLUDE_ORIGIN,4,4
	.comm	XLOG_HEAP_CONFIRM,4,4
	.comm	SpecTokenOffsetNumber,4,4
	.comm	SizeOfHeapConfirm,4,4
	.comm	RM_HEAP_ID,4,4
	.comm	REGBUF_STANDARD,4,4
	.comm	MaxOffsetNumber,4,4
	.comm	ERROR,4,4
	.comm	BUFFER_LOCK_EXCLUSIVE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
