	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gistRedoPageUpdateRecord
_gistRedoPageUpdateRecord:              ## @gistRedoPageUpdateRecord
	.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
	movq	%rdi, %rbx
	movl	(%rdi), %r14d
	callq	_XLogRecGetData
	movq	%rax, %r15
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_XLogReadBufferForRedo
	movq	_BLK_NEEDS_REDO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.1:
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_XLogRecGetBlockData
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	-48(%rbp), %edi
	callq	_BufferGetPage
	movq	%rax, %r13
	movl	(%r15), %edx
	cmpq	$1, %rdx
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	jne	LBB0_6
## %bb.2:
	cmpl	$1, 4(%r15)
	jne	LBB0_8
## %bb.3:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %r15
	leaq	8(%r12), %r14
	movq	%r14, %rdi
	callq	_IndexTupleSize
	movl	%eax, %ebx
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_PageIndexTupleOverwrite
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_elog
LBB0_5:
	movslq	%ebx, %rax
	addq	%rax, %r14
	movq	%r14, %rax
	subq	%r12, %rax
	movslq	-44(%rbp), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	sete	%dil
	callq	_Assert
	movl	$1, %ebx
	movq	%r12, %r15
	movq	%r14, %rcx
	jmp	LBB0_11
LBB0_6:
	testl	%edx, %edx
	jle	LBB0_7
LBB0_8:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	leaq	(%r15,%rdx,8), %r12
	movq	%r13, %rdi
	movq	%r15, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_PageIndexMultiDelete
	movq	%r13, %rdi
	callq	_GistPageIsLeaf
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	callq	_GistMarkTuplesDeleted
LBB0_10:
	xorl	%ebx, %ebx
	movq	%r12, %rcx
	jmp	LBB0_11
LBB0_7:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rcx
	xorl	%ebx, %ebx
LBB0_11:
	movq	%rcx, %r14
	subq	%r15, %r14
	movslq	-44(%rbp), %rax
	cmpq	%rax, %r14
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jge	LBB0_20
## %bb.12:
	movq	%rcx, %r12
	movq	%r13, %rdi
	callq	_PageIsEmpty
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_FirstOffsetNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	jmp	LBB0_15
LBB0_14:
	movq	%r13, %rdi
	callq	_PageGetMaxOffsetNumber
	movl	%eax, %edi
	callq	_OffsetNumberNext
	movq	%rax, %r15
LBB0_15:
	movslq	-44(%rbp), %rax
	cmpq	%rax, %r14
	jge	LBB0_20
## %bb.16:
	movq	%r12, %r14
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%r15
	incl	%ebx
	movq	%r14, %rax
	subq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movslq	-44(%rbp), %rcx
	movq	%r14, %r12
	cmpq	%rcx, %rax
	jge	LBB0_20
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_IndexTupleSize
	movl	%eax, %r13d
	cltq
	addq	%r14, %rax
	movq	%rax, %r14
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movl	%r13d, %edx
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_PageAddItem
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_elog
	jmp	LBB0_19
LBB0_20:
	xorl	%edi, %edi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpl	4(%rax), %ebx
	sete	%dil
	callq	_Assert
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_PageSetLSN
	movl	-48(%rbp), %edi
	callq	_MarkBufferDirty
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
LBB0_21:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_XLogRecHasBlockRef
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_gistRedoClearFollowRight
LBB0_23:
	movl	-48(%rbp), %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movl	-48(%rbp), %edi
	callq	_UnlockReleaseBuffer
LBB0_25:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLK_NEEDS_REDO,8,3             ## @BLK_NEEDS_REDO
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to add item to GiST index page, size %d bytes"

	.comm	_FirstOffsetNumber,8,3          ## @FirstOffsetNumber
	.comm	_InvalidOffsetNumber,8,3        ## @InvalidOffsetNumber
	.no_dead_strip	_gistRedoPageUpdateRecord
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gistRedoPageUpdateRecord
_gistRedoPageUpdateRecord:              ; @gistRedoPageUpdateRecord
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
	ldr	w20, [x0]
	bl	_XLogRecGetData
	mov	x21, x0
	add	x2, sp, #28
	mov	x0, x19
	mov	w1, #0
	bl	_XLogReadBufferForRedo
Lloh0:
	adrp	x8, _BLK_NEEDS_REDO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLK_NEEDS_REDO@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_21
; %bb.1:
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #0
	bl	_XLogRecGetBlockData
	mov	x23, x0
	ldr	w0, [sp, #28]
	bl	_BufferGetPage
	mov	x22, x0
	ldr	w2, [x21]
	cmp	w2, #1
	str	w20, [sp, #20]                  ; 4-byte Folded Spill
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	b.ne	LBB0_6
; %bb.2:
	ldr	w8, [x21, #4]
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.3:
	mov	x24, x23
	ldr	x26, [x24], #8
	mov	x0, x24
	bl	_IndexTupleSize
	mov	x25, x0
	mov	x0, x22
	mov	x1, x26
	mov	x2, x24
	mov	x3, x25
	bl	_PageIndexTupleOverwrite
	cbnz	w0, LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x25
	bl	_elog
LBB0_5:
	add	x24, x24, w25, sxtw
	ldrsw	x8, [sp, #24]
	sub	x9, x24, x23
	cmp	x9, x8
	cset	w0, eq
	bl	_Assert
	mov	w28, #1
	b	LBB0_11
LBB0_6:
	cmp	w2, #1
	b.lt	LBB0_10
LBB0_7:
	add	x24, x23, x2, lsl #3
	mov	x0, x22
	mov	x1, x23
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_PageIndexMultiDelete
	mov	x0, x22
	bl	_GistPageIsLeaf
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x22
	bl	_GistMarkTuplesDeleted
LBB0_9:
	mov	w28, #0
	b	LBB0_11
LBB0_10:
	mov	w28, #0
	mov	x24, x23
LBB0_11:
	ldrsw	x8, [sp, #24]
	sub	x20, x24, x23
	cmp	x20, x8
	b.ge	LBB0_20
; %bb.12:
	mov	x0, x22
	bl	_PageIsEmpty
	cbz	x0, LBB0_14
; %bb.13:
Lloh8:
	adrp	x8, _FirstOffsetNumber@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FirstOffsetNumber@GOTPAGEOFF]
Lloh10:
	ldr	x25, [x8]
	b	LBB0_15
LBB0_14:
	mov	x0, x22
	bl	_PageGetMaxOffsetNumber
	bl	_OffsetNumberNext
	mov	x25, x0
LBB0_15:
	ldrsw	x8, [sp, #24]
	cmp	x20, x8
	b.ge	LBB0_20
; %bb.16:
Lloh11:
	adrp	x20, _InvalidOffsetNumber@GOTPAGE
Lloh12:
	ldr	x20, [x20, _InvalidOffsetNumber@GOTPAGEOFF]
Lloh13:
	adrp	x21, _ERROR@GOTPAGE
Lloh14:
	ldr	x21, [x21, _ERROR@GOTPAGEOFF]
Lloh15:
	adrp	x26, l_.str@PAGE
Lloh16:
	add	x26, x26, l_.str@PAGEOFF
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x24, x24, w27, sxtw
	add	x25, x25, #1
	add	w28, w28, #1
	ldrsw	x8, [sp, #24]
	sub	x9, x24, x23
	cmp	x9, x8
	b.ge	LBB0_20
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	bl	_IndexTupleSize
	mov	x27, x0
	mov	x0, x22
	mov	x1, x24
	mov	x2, x27
	mov	x3, x25
	mov	w4, #0
	mov	w5, #0
	bl	_PageAddItem
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w0, [x21]
	mov	x1, x26
	mov	x2, x27
	bl	_elog
	b	LBB0_17
LBB0_20:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w8, [x8, #4]
	cmp	w28, w8
	cset	w0, eq
	bl	_Assert
	mov	x0, x22
	ldr	w1, [sp, #20]                   ; 4-byte Folded Reload
	bl	_PageSetLSN
	ldr	w0, [sp, #28]
	bl	_MarkBufferDirty
LBB0_21:
	mov	x0, x19
	mov	w1, #1
	bl	_XLogRecHasBlockRef
	cbz	x0, LBB0_23
; %bb.22:
	mov	x0, x19
	mov	w1, #1
	bl	_gistRedoClearFollowRight
LBB0_23:
	ldr	w0, [sp, #28]
	bl	_BufferIsValid
	cbz	x0, LBB0_25
; %bb.24:
	ldr	w0, [sp, #28]
	bl	_UnlockReleaseBuffer
LBB0_25:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_BLK_NEEDS_REDO,8,3             ; @BLK_NEEDS_REDO
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to add item to GiST index page, size %d bytes"

	.comm	_FirstOffsetNumber,8,3          ; @FirstOffsetNumber
	.comm	_InvalidOffsetNumber,8,3        ; @InvalidOffsetNumber
	.no_dead_strip	_gistRedoPageUpdateRecord
.subsections_via_symbols
