	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function writeListPage
_writeListPage:                         ## @writeListPage
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r14
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %edi
	callq	_BufferGetPage
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	movq	_GIN_LIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_GinInitBuffer
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	_FirstOffsetNumber@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
                                        ## implicit-def: $r13
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r15d, %rax
	addq	%rax, %r13
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	addq	%rax, %rbx
	incq	%r14
	cmpq	%r14, -64(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r14), %ebx
	movq	(%r12,%r14,8), %rdi
	callq	_IndexTupleSize
	movl	%eax, %r15d
	movq	(%r12,%r14,8), %rsi
	movq	%r13, %rdi
	movl	%eax, %edx
	callq	_memcpy
	movl	(%r12,%r14,8), %esi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %edx
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_PageAddItem
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_RelationGetRelationName
	movl	%ebx, %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_elog
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
LBB0_6:
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	(%rax), %rbx
	setbe	%dil
	callq	_Assert
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	callq	_GinPageGetOpaque
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, 8(%rax)
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	movl	$0, %r14d
	jne	LBB0_8
## %bb.7:
	movl	%r15d, %edi
	callq	_GinPageSetFullRow
	movl	$1, %r14d
LBB0_8:
	movl	%r15d, %edi
	callq	_GinPageGetOpaque
	movl	%r14d, (%rax)
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	callq	_MarkBufferDirty
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_RelationNeedsWAL
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r13, -104(%rbp)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -112(%rbp)
	xorl	%eax, %eax
	callq	_XLogBeginInsert
	leaq	-112(%rbp), %rdi
	movl	$16, %esi
	callq	_XLogRegisterData
	movq	_REGBUF_WILL_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	%r14d, %esi
	callq	_XLogRegisterBuffer
	xorl	%edi, %edi
	movq	%rbx, %rdx
	callq	_XLogRegisterBufData
	movq	_RM_GIN_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XLOG_GIN_INSERT_LISTPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XLogInsert
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_PageSetLSN
LBB0_10:
	movl	%r15d, %edi
	callq	_PageGetExactFreeSpace
	movq	%rax, %rbx
	movl	%r14d, %edi
	callq	_UnlockReleaseBuffer
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	movq	%rbx, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GIN_LIST,4,2                   ## @GIN_LIST
	.comm	_FirstOffsetNumber,4,2          ## @FirstOffsetNumber
	.comm	_InvalidOffsetNumber,4,2        ## @InvalidOffsetNumber
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to add item to index page in \"%s\""

	.comm	_BLCKSZ,8,3                     ## @BLCKSZ
	.comm	_InvalidBlockNumber,8,3         ## @InvalidBlockNumber
	.comm	_REGBUF_WILL_INIT,4,2           ## @REGBUF_WILL_INIT
	.comm	_RM_GIN_ID,4,2                  ## @RM_GIN_ID
	.comm	_XLOG_GIN_INSERT_LISTPAGE,4,2   ## @XLOG_GIN_INSERT_LISTPAGE
	.no_dead_strip	_writeListPage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function writeListPage
_writeListPage:                         ; @writeListPage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	str	x4, [sp, #24]                   ; 8-byte Folded Spill
	mov	x27, x3
	mov	x25, x2
	mov	x19, x1
	mov	x24, x0
	mov	x0, x1
	bl	_BufferGetPage
	mov	x20, x0
	bl	_START_CRIT_SECTION
Lloh0:
	adrp	x8, _GIN_LIST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GIN_LIST@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	str	w19, [sp, #20]                  ; 4-byte Folded Spill
	mov	x0, x19
	bl	_GinInitBuffer
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
	mov	x23, #0
	cbz	x27, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _FirstOffsetNumber@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FirstOffsetNumber@GOTPAGEOFF]
Lloh5:
	adrp	x19, _InvalidOffsetNumber@GOTPAGE
Lloh6:
	ldr	x19, [x19, _InvalidOffsetNumber@GOTPAGEOFF]
Lloh7:
	ldr	w26, [x8]
                                        ; implicit-def: $x28
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x8, w21
	add	x28, x28, x8
	add	x23, x23, x8
	add	w26, w26, #1
	add	x25, x25, #8
	subs	x27, x27, #1
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	bl	_IndexTupleSize
	mov	x21, x0
	ldr	x1, [x25]
	mov	x0, x28
	mov	x2, x21
	bl	_memcpy
	ldr	w1, [x25]
	mov	x0, x20
	mov	x2, x21
	mov	x3, x26
	mov	w4, #0
	mov	w5, #0
	bl	_PageAddItem
	ldr	w8, [x19]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh8:
	adrp	x8, _ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
	mov	x0, x24
	bl	_RelationGetRelationName
	mov	x2, x0
	mov	x0, x22
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
	b	LBB0_2
LBB0_5:
Lloh13:
	adrp	x8, _BLCKSZ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BLCKSZ@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x23, x8
	cset	w0, ls
	bl	_Assert
	mov	x0, x20
	bl	_GinPageGetOpaque
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
	str	x22, [x0, #8]
Lloh16:
	adrp	x8, _InvalidBlockNumber@GOTPAGE
Lloh17:
	ldr	x8, [x8, _InvalidBlockNumber@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x8, x22
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_GinPageSetFullRow
	mov	w19, #1
	b	LBB0_8
LBB0_7:
	mov	w19, #0
LBB0_8:
	ldr	w21, [sp, #20]                  ; 4-byte Folded Reload
	mov	x0, x20
	bl	_GinPageGetOpaque
	str	w19, [x0]
	mov	x0, x21
	bl	_MarkBufferDirty
	mov	x0, x24
	bl	_RelationNeedsWAL
	cbz	x0, LBB0_10
; %bb.9:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	stp	x8, x22, [sp, #32]
	bl	_XLogBeginInsert
	add	x0, sp, #32
	mov	w1, #16
	bl	_XLogRegisterData
Lloh19:
	adrp	x8, _REGBUF_WILL_INIT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _REGBUF_WILL_INIT@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	w0, #0
	mov	x1, x21
	bl	_XLogRegisterBuffer
	mov	w0, #0
	mov	x2, x23
	bl	_XLogRegisterBufData
Lloh22:
	adrp	x8, _RM_GIN_ID@GOTPAGE
Lloh23:
	ldr	x8, [x8, _RM_GIN_ID@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x8, _XLOG_GIN_INSERT_LISTPAGE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _XLOG_GIN_INSERT_LISTPAGE@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	bl	_XLogInsert
	mov	x1, x0
	mov	x0, x20
	bl	_PageSetLSN
LBB0_10:
	mov	x0, x20
	bl	_PageGetExactFreeSpace
	mov	x20, x0
	mov	x0, x21
	bl	_UnlockReleaseBuffer
	bl	_END_CRIT_SECTION
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GIN_LIST,4,2                   ; @GIN_LIST
	.comm	_FirstOffsetNumber,4,2          ; @FirstOffsetNumber
	.comm	_InvalidOffsetNumber,4,2        ; @InvalidOffsetNumber
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to add item to index page in \"%s\""

	.comm	_BLCKSZ,8,3                     ; @BLCKSZ
	.comm	_InvalidBlockNumber,8,3         ; @InvalidBlockNumber
	.comm	_REGBUF_WILL_INIT,4,2           ; @REGBUF_WILL_INIT
	.comm	_RM_GIN_ID,4,2                  ; @RM_GIN_ID
	.comm	_XLOG_GIN_INSERT_LISTPAGE,4,2   ; @XLOG_GIN_INSERT_LISTPAGE
	.no_dead_strip	_writeListPage
.subsections_via_symbols
