	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SpGistSetLastUsedPage          ## -- Begin function SpGistSetLastUsedPage
	.p2align	4, 0x90
_SpGistSetLastUsedPage:                 ## @SpGistSetLastUsedPage
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	callq	_spgGetCache
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_BufferGetPage
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_BufferGetBlockNumber
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_SpGistBlockIsFixed
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	movl	%r14d, %edi
	callq	_SpGistPageIsLeaf
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_GBUF_LEAF@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_4
LBB0_3:
	movq	%r13, %rdi
	callq	_GBUF_INNER_PARITY
	movl	%eax, %r12d
LBB0_4:
	movl	%r14d, %edi
	callq	_SpGistPageStoresNulls
	xorl	%esi, %esi
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_GBUF_NULLS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_6:
	orl	%r12d, %esi
	movq	%r15, %rdi
	callq	_GET_LUP
	movq	%rax, %rbx
	movl	%r14d, %edi
	callq	_PageGetExactFreeSpace
	movq	(%rbx), %rcx
	cmpq	%r13, %rcx
	je	LBB0_9
## %bb.7:
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_9
## %bb.8:
	cmpl	%eax, 8(%rbx)
	jge	LBB0_10
LBB0_9:
	movq	%r13, (%rbx)
	movl	%eax, 8(%rbx)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GBUF_LEAF,4,2                  ## @GBUF_LEAF
	.comm	_GBUF_NULLS,4,2                 ## @GBUF_NULLS
	.comm	_InvalidBlockNumber,8,3         ## @InvalidBlockNumber
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SpGistSetLastUsedPage          ; -- Begin function SpGistSetLastUsedPage
	.p2align	2
_SpGistSetLastUsedPage:                 ; @SpGistSetLastUsedPage
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	bl	_spgGetCache
	mov	x21, x0
	mov	x0, x19
	bl	_BufferGetPage
	mov	x20, x0
	mov	x0, x19
	bl	_BufferGetBlockNumber
	mov	x19, x0
	bl	_SpGistBlockIsFixed
	cbnz	x0, LBB0_7
; %bb.1:
	mov	x0, x20
	bl	_SpGistPageIsLeaf
	cbz	x0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _GBUF_LEAF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GBUF_LEAF@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_GBUF_INNER_PARITY
	mov	x22, x0
LBB0_4:
	mov	x0, x20
	bl	_SpGistPageStoresNulls
Lloh3:
	adrp	x8, _GBUF_NULLS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GBUF_NULLS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w1, w8, w22
	mov	x0, x21
	bl	_GET_LUP
	mov	x21, x0
	mov	x0, x20
	bl	_PageGetExactFreeSpace
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _InvalidBlockNumber@GOTPAGE
Lloh7:
	ldr	x9, [x9, _InvalidBlockNumber@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x19
	ccmp	x8, x9, #4, ne
	b.eq	LBB0_6
; %bb.5:
	ldr	w8, [x21, #8]
	cmp	w8, w0
	b.ge	LBB0_7
LBB0_6:
	str	x19, [x21]
	str	w0, [x21, #8]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GBUF_LEAF,4,2                  ; @GBUF_LEAF
	.comm	_GBUF_NULLS,4,2                 ; @GBUF_NULLS
	.comm	_InvalidBlockNumber,8,3         ; @InvalidBlockNumber
.subsections_via_symbols
