	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ginvacuumcleanup               ## -- Begin function ginvacuumcleanup
	.p2align	4, 0x90
_ginvacuumcleanup:                      ## @ginvacuumcleanup
	.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	%rsi, %r15
	movl	(%rdi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpq	$0, 16(%rdi)
	je	LBB0_3
## %bb.1:
	xorl	%eax, %eax
	callq	_IsAutoVacuumWorkerProcess
	testq	%rax, %rax
	je	LBB0_22
## %bb.2:
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_initGinState
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	$1, %ecx
	movq	%r15, %r8
	callq	_ginInsertCleanup
	jmp	LBB0_22
LBB0_3:
	movq	%rdi, %rbx
	testq	%r15, %r15
	jne	LBB0_5
## %bb.4:
	movl	$24, %edi
	callq	_palloc0
	movq	%rax, %r15
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_initGinState
	xorl	%eax, %eax
	callq	_IsAutoVacuumWorkerProcess
	xorl	%esi, %esi
	testq	%rax, %rax
	sete	%sil
	movq	%r14, %rdi
	xorl	%edx, %edx
	movl	$1, %ecx
	movq	%r15, %r8
	callq	_ginInsertCleanup
LBB0_5:
	leaq	-104(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	12(%rbx), %eax
	movl	%eax, 20(%r15)
	movl	8(%rbx), %eax
	movl	%eax, 16(%r15)
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edi
	callq	_RELATION_IS_LOCAL
	testl	%eax, %eax
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	je	LBB0_7
## %bb.6:
	movl	%r12d, %edi
	callq	_RelationGetNumberOfBlocks
	movq	%rax, %r13
	jmp	LBB0_8
LBB0_7:
	movq	_ExclusiveLock@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	%r12d, %edi
	callq	_LockRelationForExtension
	movl	%r12d, %edi
	callq	_RelationGetNumberOfBlocks
	movq	%rax, %r13
	movl	(%r14), %esi
	movl	%r12d, %edi
	callq	_UnlockRelationForExtension
LBB0_8:
	movq	_GIN_ROOT_BLKNO@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	xorl	%eax, %eax
	cmpq	%r13, %r12
	jge	LBB0_9
## %bb.10:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_11 Depth=1
	xorl	%edi, %edi
	movq	_GIN_ROOT_BLKNO@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	setne	%dil
	callq	_Assert
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_RecordFreeIndexPage
	incq	-56(%rbp)                       ## 8-byte Folded Spill
LBB0_18:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%r14d, %edi
	callq	_UnlockReleaseBuffer
	incq	%r12
	cmpq	%r12, %r13
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_19
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_vacuum_delay_point
	movq	_MAIN_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RBM_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	4(%rbx), %r8d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	movq	%r12, %rdx
	callq	_ReadBufferExtended
	movl	%eax, %r14d
	movq	_GIN_SHARE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_LockBuffer
	movl	%r14d, %edi
	callq	_BufferGetPage
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_GinPageIsRecyclable
	testq	%rax, %rax
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	callq	_GinPageIsData
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	incl	-88(%rbp)
	jmp	LBB0_18
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	callq	_GinPageIsList
	testl	%eax, %eax
	jne	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	incl	-92(%rbp)
	movq	%r15, %rdi
	callq	_GinPageIsLeaf
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	callq	_PageGetMaxOffsetNumber
	addl	%eax, -96(%rbp)
	jmp	LBB0_18
LBB0_9:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_19:
	movq	%r13, -104(%rbp)
	movl	(%rbx), %edi
	leaq	-104(%rbp), %rsi
	xorl	%edx, %edx
	callq	_ginUpdateStats
	movl	(%rbx), %edi
	callq	_IndexFreeSpaceMapVacuum
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r15)
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_20
## %bb.21:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_RelationGetNumberOfBlocks
	movq	%rax, (%r15)
	jmp	LBB0_22
LBB0_20:
	movq	_ExclusiveLock@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_LockRelationForExtension
	movl	%ebx, %edi
	callq	_RelationGetNumberOfBlocks
	movq	%rax, (%r15)
	movl	(%r14), %esi
	movl	%ebx, %edi
	callq	_UnlockRelationForExtension
LBB0_22:
	movq	%r15, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ExclusiveLock,4,2              ## @ExclusiveLock
	.comm	_GIN_ROOT_BLKNO,8,3             ## @GIN_ROOT_BLKNO
	.comm	_MAIN_FORKNUM,4,2               ## @MAIN_FORKNUM
	.comm	_RBM_NORMAL,4,2                 ## @RBM_NORMAL
	.comm	_GIN_SHARE,4,2                  ## @GIN_SHARE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ginvacuumcleanup               ; -- Begin function ginvacuumcleanup
	.p2align	2
_ginvacuumcleanup:                      ; @ginvacuumcleanup
	.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
	mov	x22, x1
	ldr	w20, [x0]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_3
; %bb.1:
	bl	_IsAutoVacuumWorkerProcess
	cbz	x0, LBB0_21
; %bb.2:
	add	x0, sp, #44
	mov	x1, x20
	bl	_initGinState
	add	x0, sp, #44
	mov	w1, #0
	mov	w2, #1
	mov	w3, #1
	mov	x4, x22
	bl	_ginInsertCleanup
	b	LBB0_21
LBB0_3:
	mov	x21, x0
	cbnz	x22, LBB0_5
; %bb.4:
	mov	w0, #24
	bl	_palloc0
	mov	x22, x0
	add	x0, sp, #44
	mov	x1, x20
	bl	_initGinState
	bl	_IsAutoVacuumWorkerProcess
	cmp	x0, #0
	cset	w1, eq
	add	x0, sp, #44
	mov	w2, #0
	mov	w3, #1
	mov	x4, x22
	bl	_ginInsertCleanup
LBB0_5:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	d0, [x21, #8]
	str	d0, [x22, #16]
	mov	x0, x20
	bl	_RELATION_IS_LOCAL
	str	w0, [sp, #4]                    ; 4-byte Folded Spill
	cbz	w0, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_RelationGetNumberOfBlocks
	mov	x23, x0
	b	LBB0_8
LBB0_7:
Lloh0:
	adrp	x19, _ExclusiveLock@GOTPAGE
Lloh1:
	ldr	x19, [x19, _ExclusiveLock@GOTPAGEOFF]
	ldr	w1, [x19]
	mov	x0, x20
	bl	_LockRelationForExtension
	mov	x0, x20
	bl	_RelationGetNumberOfBlocks
	mov	x23, x0
	ldr	w1, [x19]
	mov	x0, x20
	bl	_UnlockRelationForExtension
LBB0_8:
Lloh2:
	adrp	x8, _GIN_ROOT_BLKNO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GIN_ROOT_BLKNO@GOTPAGEOFF]
Lloh4:
	ldr	x24, [x8]
	cmp	x24, x23
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
	mov	x27, #0
	b.ge	LBB0_18
; %bb.9:
Lloh5:
	adrp	x22, _MAIN_FORKNUM@GOTPAGE
Lloh6:
	ldr	x22, [x22, _MAIN_FORKNUM@GOTPAGEOFF]
Lloh7:
	adrp	x19, _RBM_NORMAL@GOTPAGE
Lloh8:
	ldr	x19, [x19, _RBM_NORMAL@GOTPAGEOFF]
Lloh9:
	adrp	x28, _GIN_SHARE@GOTPAGE
Lloh10:
	ldr	x28, [x28, _GIN_SHARE@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
Lloh11:
	adrp	x8, _GIN_ROOT_BLKNO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GIN_ROOT_BLKNO@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x24, x8
	cset	w0, ne
	bl	_Assert
	mov	x0, x20
	mov	x1, x24
	bl	_RecordFreeIndexPage
	add	x27, x27, #1
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x25
	bl	_UnlockReleaseBuffer
	add	x24, x24, #1
	cmp	x23, x24
	b.eq	LBB0_18
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	bl	_vacuum_delay_point
	ldr	w1, [x22]
	ldr	w3, [x19]
	ldr	w4, [x21, #4]
	mov	x0, x20
	mov	x2, x24
	bl	_ReadBufferExtended
	mov	x25, x0
	ldr	w1, [x28]
	bl	_LockBuffer
	mov	x0, x25
	bl	_BufferGetPage
	mov	x26, x0
	bl	_GinPageIsRecyclable
	cbnz	x0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x26
	bl	_GinPageIsData
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [sp, #32]
	add	w8, w8, #1
	str	w8, [sp, #32]
	b	LBB0_11
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x26
	bl	_GinPageIsList
	cbnz	w0, LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [sp, #28]
	add	w8, w8, #1
	str	w8, [sp, #28]
	mov	x0, x26
	bl	_GinPageIsLeaf
	cbz	x0, LBB0_11
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x26
	bl	_PageGetMaxOffsetNumber
	ldr	w8, [sp, #24]
	add	w8, w8, w0
	str	w8, [sp, #24]
	b	LBB0_11
LBB0_18:
	str	x23, [sp, #16]
	ldr	w0, [x21]
	add	x1, sp, #16
	mov	w2, #0
	bl	_ginUpdateStats
	ldr	w0, [x21]
	bl	_IndexFreeSpaceMapVacuum
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	str	x27, [x22, #8]
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	cbz	w8, LBB0_20
; %bb.19:
	mov	x0, x20
	bl	_RelationGetNumberOfBlocks
	str	x0, [x22]
	b	LBB0_21
LBB0_20:
Lloh14:
	adrp	x19, _ExclusiveLock@GOTPAGE
Lloh15:
	ldr	x19, [x19, _ExclusiveLock@GOTPAGEOFF]
	ldr	w1, [x19]
	mov	x0, x20
	bl	_LockRelationForExtension
	mov	x0, x20
	bl	_RelationGetNumberOfBlocks
	str	x0, [x22]
	ldr	w1, [x19]
	mov	x0, x20
	bl	_UnlockRelationForExtension
LBB0_21:
	mov	x0, x22
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ExclusiveLock,4,2              ; @ExclusiveLock
	.comm	_GIN_ROOT_BLKNO,8,3             ; @GIN_ROOT_BLKNO
	.comm	_MAIN_FORKNUM,4,2               ; @MAIN_FORKNUM
	.comm	_RBM_NORMAL,4,2                 ; @RBM_NORMAL
	.comm	_GIN_SHARE,4,2                  ; @GIN_SHARE
.subsections_via_symbols
