	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gistdeletepage
_gistdeletepage:                        ## @gistdeletepage
	.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
	movl	%r8d, %r13d
	movq	%rcx, %r14
	movl	%edx, %r12d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	%edx, %edi
	callq	_BufferGetPage
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_BufferGetPage
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_GistPageIsLeaf
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%r15d, %edi
	callq	_GistFollowRight
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_14
## %bb.3:
	movl	%r15d, %edi
	callq	_PageGetMaxOffsetNumber
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.4:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_PageIsNew
	testq	%rax, %rax
	jne	LBB0_1
## %bb.5:
	movl	%ebx, %edi
	callq	_GistPageIsDeleted
	testq	%rax, %rax
	jne	LBB0_1
## %bb.6:
	movl	%ebx, %edi
	callq	_GistPageIsLeaf
	testq	%rax, %rax
	je	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_Assert
LBB0_14:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%ebx, %edi
	callq	_PageGetMaxOffsetNumber
	cmpq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	jl	LBB0_14
## %bb.8:
	movl	%ebx, %edi
	callq	_PageGetMaxOffsetNumber
	movq	_FirstOffsetNumber@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_14
## %bb.9:
	movl	%ebx, %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_PageGetItemId
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_PageGetItem
	movq	%rax, %rbx
	movl	%r13d, %edi
	callq	_BufferGetBlockNumber
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_ItemPointerGetBlockNumber
	cmpq	%rax, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_14
## %bb.10:
	xorl	%eax, %eax
	callq	_ReadNextFullTransactionId
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	movl	%r13d, %edi
	callq	_MarkBufferDirty
	movl	%r15d, %edi
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	callq	_GistPageSetDeleted
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
	movl	%r12d, %edi
	callq	_MarkBufferDirty
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_PageIndexTupleDelete
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %edi
	callq	_RelationNeedsWAL
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	%r13d, %edi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	movq	%rbx, %rcx
	callq	_gistXLogPageDelete
	jmp	LBB0_13
LBB0_12:
	movl	(%r14), %edi
	callq	_gistGetFakeLSN
LBB0_13:
	movl	%eax, %r14d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_PageSetLSN
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_PageSetLSN
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	movl	$1, %r14d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidOffsetNumber,8,3        ## @InvalidOffsetNumber
	.comm	_FirstOffsetNumber,8,3          ## @FirstOffsetNumber
	.no_dead_strip	_gistdeletepage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gistdeletepage
_gistdeletepage:                        ; @gistdeletepage
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x4
	mov	x21, x3
	mov	x22, x2
	mov	x25, x1
	mov	x24, x0
	mov	x0, x2
	bl	_BufferGetPage
	mov	x19, x0
	mov	x0, x23
	bl	_BufferGetPage
	mov	x20, x0
	bl	_GistPageIsLeaf
	cbz	x0, LBB0_7
; %bb.1:
	mov	x0, x20
	bl	_GistFollowRight
	cbnz	x0, LBB0_8
; %bb.2:
	mov	x0, x20
	bl	_PageGetMaxOffsetNumber
Lloh0:
	adrp	x8, _InvalidOffsetNumber@GOTPAGE
Lloh1:
	ldr	x8, [x8, _InvalidOffsetNumber@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_PageIsNew
	cbnz	x0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_GistPageIsDeleted
	cbnz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_GistPageIsLeaf
	cbz	x0, LBB0_10
LBB0_6:
	mov	w0, #0
LBB0_7:
	bl	_Assert
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x19
	bl	_PageGetMaxOffsetNumber
	cmp	x0, x21
	b.lt	LBB0_8
; %bb.11:
	mov	x0, x19
	bl	_PageGetMaxOffsetNumber
Lloh3:
	adrp	x8, _FirstOffsetNumber@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FirstOffsetNumber@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_8
; %bb.12:
	mov	x0, x19
	mov	x1, x21
	bl	_PageGetItemId
	mov	x1, x0
	mov	x0, x19
	bl	_PageGetItem
	mov	x26, x0
	mov	x0, x23
	bl	_BufferGetBlockNumber
	mov	x27, x0
	mov	x0, x26
	bl	_ItemPointerGetBlockNumber
	cmp	x27, x0
	b.ne	LBB0_8
; %bb.13:
	bl	_ReadNextFullTransactionId
	mov	x26, x0
	bl	_START_CRIT_SECTION
	mov	x0, x23
	bl	_MarkBufferDirty
	mov	x0, x20
	mov	x1, x26
	bl	_GistPageSetDeleted
	ldr	w8, [x25]
	add	w8, w8, #1
	str	w8, [x25]
	mov	x0, x22
	bl	_MarkBufferDirty
	mov	x0, x19
	mov	x1, x21
	bl	_PageIndexTupleDelete
	ldr	w0, [x24]
	bl	_RelationNeedsWAL
	cbz	x0, LBB0_15
; %bb.14:
	mov	x0, x23
	mov	x1, x26
	mov	x2, x22
	mov	x3, x21
	bl	_gistXLogPageDelete
	b	LBB0_16
LBB0_15:
	ldr	w0, [x24]
	bl	_gistGetFakeLSN
LBB0_16:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_PageSetLSN
	mov	x0, x20
	mov	x1, x21
	bl	_PageSetLSN
	bl	_END_CRIT_SECTION
	mov	w0, #1
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidOffsetNumber,8,3        ; @InvalidOffsetNumber
	.comm	_FirstOffsetNumber,8,3          ; @FirstOffsetNumber
	.no_dead_strip	_gistdeletepage
.subsections_via_symbols
