	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function RelationAddExtraBlocks
_RelationAddExtraBlocks:                ## @RelationAddExtraBlocks
	.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, -48(%rbp)                 ## 4-byte Spill
	movl	%edi, %r13d
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	callq	_RelationExtensionLockWaiterCount
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	shll	$2, %eax
	leal	(%rax,%rax,4), %esi
	movl	$512, %edi                      ## imm = 0x200
	callq	_Min
	movl	%eax, %r14d
	incl	%r14d
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %edi
	callq	_BufferGetBlockNumber
	movq	%rax, %r15
	movl	%r13d, %edi
	callq	_BufferGetPageSize
	movq	%rax, %rbx
	movq	_SizeOfPageHeaderData@GOTPCREL(%rip), %rax
	subq	(%rax), %rbx
	movl	%r13d, %edi
	callq	_UnlockReleaseBuffer
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	cmoveq	%r15, %r12
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_RecordPageWithFreeSpace
	decl	%r14d
	cmpl	$1, %r14d
	jle	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_P_NEW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RBM_ZERO_AND_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %edi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_ReadBufferBI
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_BufferGetPage
	movl	%eax, %edi
	callq	_PageIsNew
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r13d, %edi
	callq	_BufferGetBlockNumber
	movq	%rax, %rbx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_RelationGetRelationName
	movl	%r15d, %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	callq	_elog
	jmp	LBB0_4
LBB0_5:
	incq	%r15
	movl	%r13d, %edi
	movq	%r12, %rsi
	movq	%r15, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FreeSpaceMapVacuumRange        ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidBlockNumber,8,3         ## @InvalidBlockNumber
	.comm	_P_NEW,4,2                      ## @P_NEW
	.comm	_RBM_ZERO_AND_LOCK,4,2          ## @RBM_ZERO_AND_LOCK
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"page %u of relation \"%s\" should be empty but is not"

	.comm	_SizeOfPageHeaderData,8,3       ## @SizeOfPageHeaderData
	.no_dead_strip	_RelationAddExtraBlocks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function RelationAddExtraBlocks
_RelationAddExtraBlocks:                ; @RelationAddExtraBlocks
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _InvalidBlockNumber@GOTPAGE
Lloh1:
	ldr	x8, [x8, _InvalidBlockNumber@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	bl	_RelationExtensionLockWaiterCount
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
	add	w8, w0, w0, lsl #2
	lsl	w1, w8, #2
	mov	w0, #512
	bl	_Min
	add	w27, w0, #1
Lloh3:
	adrp	x28, _P_NEW@GOTPAGE
Lloh4:
	ldr	x28, [x28, _P_NEW@GOTPAGEOFF]
Lloh5:
	adrp	x22, _RBM_ZERO_AND_LOCK@GOTPAGE
Lloh6:
	ldr	x22, [x22, _RBM_ZERO_AND_LOCK@GOTPAGEOFF]
Lloh7:
	adrp	x26, _SizeOfPageHeaderData@GOTPAGE
Lloh8:
	ldr	x26, [x26, _SizeOfPageHeaderData@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_BufferGetBlockNumber
	mov	x24, x0
	mov	x0, x23
	bl	_BufferGetPageSize
	ldr	x8, [x26]
	sub	x25, x0, x8
	mov	x0, x23
	bl	_UnlockReleaseBuffer
Lloh9:
	adrp	x8, _InvalidBlockNumber@GOTPAGE
Lloh10:
	ldr	x8, [x8, _InvalidBlockNumber@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x20, x8
	csel	x20, x24, x20, eq
	mov	x0, x19
	mov	x1, x24
	mov	x2, x25
	bl	_RecordPageWithFreeSpace
	sub	w27, w27, #1
	cmp	w27, #1
	b.le	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x28]
	ldr	w2, [x22]
	mov	x0, x19
	mov	x3, x21
	bl	_ReadBufferBI
	mov	x23, x0
	bl	_BufferGetPage
	bl	_PageIsNew
	cbnz	w0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh12:
	adrp	x8, _ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w24, [x8]
	mov	x0, x23
	bl	_BufferGetBlockNumber
	mov	x25, x0
	mov	x0, x19
	bl	_RelationGetRelationName
	mov	x3, x0
	mov	x0, x24
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x25
	bl	_elog
	b	LBB0_2
LBB0_5:
	add	x2, x24, #1
	mov	x0, x19
	mov	x1, x20
	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
	b	_FreeSpaceMapVacuumRange
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidBlockNumber,8,3         ; @InvalidBlockNumber
	.comm	_P_NEW,4,2                      ; @P_NEW
	.comm	_RBM_ZERO_AND_LOCK,4,2          ; @RBM_ZERO_AND_LOCK
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"page %u of relation \"%s\" should be empty but is not"

	.comm	_SizeOfPageHeaderData,8,3       ; @SizeOfPageHeaderData
	.no_dead_strip	_RelationAddExtraBlocks
.subsections_via_symbols
