	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ginRedoUpdateMetapage
_ginRedoUpdateMetapage:                 ## @ginRedoUpdateMetapage
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movl	(%rdi), %r12d
	callq	_XLogRecGetData
	movq	%rax, %r14
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_XLogInitBufferForRedo
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_BufferGetBlockNumber
	movq	_GIN_METAPAGE_BLKNO@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movl	%r15d, %edi
	callq	_BufferGetPage
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_GinInitMetabuffer
	movl	%ebx, %edi
	callq	_GinPageGetMeta
	leaq	20(%r14), %rsi
	movl	%eax, %edi
	movl	$4, %edx
	callq	_memcpy
	movl	%ebx, %edi
	movl	%r12d, %esi
	callq	_PageSetLSN
	movl	%r15d, %edi
	callq	_MarkBufferDirty
	cmpq	$0, (%r14)
	jle	LBB0_11
## %bb.1:
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_XLogReadBufferForRedo
	movq	_BLK_NEEDS_REDO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.2:
	movl	-44(%rbp), %edi
	callq	_BufferGetPage
	movl	%eax, %ebx
	leaq	-60(%rbp), %rdx
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_XLogRecGetBlockData
	movq	%rax, %r13
	movl	%ebx, %edi
	callq	_PageIsEmpty
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_FirstOffsetNumber@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_11:
	movq	8(%r14), %rax
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.12:
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_XLogReadBufferForRedo
	movq	_BLK_NEEDS_REDO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.13:
	movl	-44(%rbp), %edi
	callq	_BufferGetPage
	movl	%eax, %ebx
	movl	16(%r14), %r14d
	movl	%eax, %edi
	callq	_GinPageGetOpaque
	movl	%r14d, (%rax)
	movl	%ebx, %edi
	movl	%r12d, %esi
	callq	_PageSetLSN
	movl	-44(%rbp), %edi
	callq	_MarkBufferDirty
	jmp	LBB0_14
LBB0_4:
	movl	%ebx, %edi
	callq	_PageGetMaxOffsetNumber
	movl	%eax, %edi
	callq	_OffsetNumberNext
LBB0_5:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	cmpq	$0, (%r14)
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jle	LBB0_10
## %bb.6:
	movl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movslq	%r15d, %rax
	addq	%rax, %r13
	incq	%rbx
	movq	%r12, %r14
	cmpq	%rbx, (%r12)
	jle	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %r12
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%rbx), %r14d
	movq	%r13, %rdi
	callq	_IndexTupleSize
	movl	%eax, %r15d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%r13d, %esi
	movl	%eax, %edx
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_PageAddItem
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
	jmp	LBB0_9
LBB0_10:
	movslq	-60(%rbp), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addq	%rax, %rcx
	xorl	%edi, %edi
	cmpq	%r13, %rcx
	sete	%dil
	callq	_Assert
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_GinPageGetOpaque
	incl	4(%rax)
	movl	%ebx, %edi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_PageSetLSN
	movl	-44(%rbp), %edi
	callq	_MarkBufferDirty
	movl	-56(%rbp), %r15d                ## 4-byte Reload
LBB0_14:
	movl	-44(%rbp), %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movl	-44(%rbp), %edi
	callq	_UnlockReleaseBuffer
LBB0_16:
	movl	%r15d, %edi
	callq	_UnlockReleaseBuffer
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GIN_METAPAGE_BLKNO,8,3         ## @GIN_METAPAGE_BLKNO
	.comm	_BLK_NEEDS_REDO,8,3             ## @BLK_NEEDS_REDO
	.comm	_FirstOffsetNumber,4,2          ## @FirstOffsetNumber
	.comm	_InvalidOffsetNumber,8,3        ## @InvalidOffsetNumber
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to add item to index page"

	.comm	_InvalidBlockNumber,8,3         ## @InvalidBlockNumber
	.no_dead_strip	_ginRedoUpdateMetapage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ginRedoUpdateMetapage
_ginRedoUpdateMetapage:                 ; @ginRedoUpdateMetapage
	.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	x23, x0
	ldr	w24, [x0]
	bl	_XLogRecGetData
	mov	x21, x0
	mov	x0, x23
	mov	w1, #0
	bl	_XLogInitBufferForRedo
	mov	x20, x0
	bl	_BufferGetBlockNumber
Lloh0:
	adrp	x8, _GIN_METAPAGE_BLKNO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GIN_METAPAGE_BLKNO@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	bl	_Assert
	mov	x0, x20
	bl	_BufferGetPage
	mov	x22, x0
	mov	x0, x20
	bl	_GinInitMetabuffer
	mov	x0, x22
	bl	_GinPageGetMeta
	add	x1, x21, #20
	mov	w2, #4
	bl	_memcpy
	mov	x0, x22
	mov	x1, x24
	bl	_PageSetLSN
	mov	x0, x20
	bl	_MarkBufferDirty
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.1:
	add	x2, sp, #28
	mov	x0, x23
	mov	w1, #1
	bl	_XLogReadBufferForRedo
Lloh3:
	adrp	x8, _BLK_NEEDS_REDO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BLK_NEEDS_REDO@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.2:
	ldr	w0, [sp, #28]
	bl	_BufferGetPage
	mov	x22, x0
	add	x2, sp, #24
	mov	x0, x23
	mov	w1, #1
	bl	_XLogRecGetBlockData
	mov	x25, x0
	mov	x0, x22
	bl	_PageIsEmpty
	cbz	x0, LBB0_7
; %bb.3:
Lloh6:
	adrp	x8, _FirstOffsetNumber@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FirstOffsetNumber@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_4:
	ldr	x8, [x21, #8]
Lloh9:
	adrp	x9, _InvalidBlockNumber@GOTPAGE
Lloh10:
	ldr	x9, [x9, _InvalidBlockNumber@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_17
; %bb.5:
	add	x2, sp, #28
	mov	x0, x23
	mov	w1, #1
	bl	_XLogReadBufferForRedo
Lloh12:
	adrp	x8, _BLK_NEEDS_REDO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BLK_NEEDS_REDO@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.6:
	ldr	w0, [sp, #28]
	bl	_BufferGetPage
	mov	x22, x0
	ldr	w19, [x21, #16]
	bl	_GinPageGetOpaque
	str	w19, [x0]
	mov	x0, x22
	mov	x1, x24
	bl	_PageSetLSN
	ldr	w0, [sp, #28]
	bl	_MarkBufferDirty
	b	LBB0_15
LBB0_7:
	mov	x0, x22
	bl	_PageGetMaxOffsetNumber
	bl	_OffsetNumberNext
LBB0_8:
	stp	w24, w20, [sp, #16]             ; 8-byte Folded Spill
	ldr	x8, [x21]
	cmp	x8, #1
	str	x25, [sp, #8]                   ; 8-byte Folded Spill
	b.lt	LBB0_13
; %bb.9:
	mov	x28, #0
Lloh15:
	adrp	x23, _InvalidOffsetNumber@GOTPAGE
Lloh16:
	ldr	x23, [x23, _InvalidOffsetNumber@GOTPAGEOFF]
	mov	w20, w0
Lloh17:
	adrp	x19, _ERROR@GOTPAGE
Lloh18:
	ldr	x19, [x19, _ERROR@GOTPAGEOFF]
	mov	x24, x25
Lloh19:
	adrp	x25, l_.str@PAGE
Lloh20:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x24, x24, w26, sxtw
	add	x28, x28, #1
	ldr	x8, [x21]
	cmp	x8, x28
	b.le	LBB0_14
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	w27, w20, w28
	mov	x0, x24
	bl	_IndexTupleSize
	mov	x26, x0
	mov	x0, x22
	mov	x1, x24
	mov	x2, x26
	mov	x3, x27
	mov	w4, #0
	mov	w5, #0
	bl	_PageAddItem
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x19]
	mov	x1, x25
	bl	_elog
	b	LBB0_10
LBB0_13:
	mov	x24, x25
LBB0_14:
	ldrsw	x8, [sp, #24]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	add	x8, x9, x8
	cmp	x8, x24
	cset	w0, eq
	bl	_Assert
	mov	x0, x22
	bl	_GinPageGetOpaque
	ldr	w8, [x0, #4]
	add	w8, w8, #1
	str	w8, [x0, #4]
	mov	x0, x22
	ldr	w1, [sp, #16]                   ; 4-byte Folded Reload
	bl	_PageSetLSN
	ldr	w0, [sp, #28]
	bl	_MarkBufferDirty
	ldr	w20, [sp, #20]                  ; 4-byte Folded Reload
LBB0_15:
	ldr	w0, [sp, #28]
	bl	_BufferIsValid
	cbz	x0, LBB0_17
; %bb.16:
	ldr	w0, [sp, #28]
	bl	_UnlockReleaseBuffer
LBB0_17:
	mov	x0, x20
	bl	_UnlockReleaseBuffer
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GIN_METAPAGE_BLKNO,8,3         ; @GIN_METAPAGE_BLKNO
	.comm	_BLK_NEEDS_REDO,8,3             ; @BLK_NEEDS_REDO
	.comm	_FirstOffsetNumber,4,2          ; @FirstOffsetNumber
	.comm	_InvalidOffsetNumber,8,3        ; @InvalidOffsetNumber
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to add item to index page"

	.comm	_InvalidBlockNumber,8,3         ; @InvalidBlockNumber
	.no_dead_strip	_ginRedoUpdateMetapage
.subsections_via_symbols
