	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FreeSpaceMapPrepareTruncateRel ## -- Begin function FreeSpaceMapPrepareTruncateRel
	.p2align	4, 0x90
_FreeSpaceMapPrepareTruncateRel:        ## @FreeSpaceMapPrepareTruncateRel
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_RelationOpenSmgr
	movl	(%r12), %edi
	movq	_FSM_FORKNUM@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_smgrexists
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_fsm_get_location
	movl	%eax, %r14d
	cmpq	$0, -40(%rbp)
	jle	LBB0_8
## %bb.2:
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_fsm_readbuf
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_BufferIsValid
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	movq	_BUFFER_LOCK_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_LockBuffer
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	movl	%r15d, %edi
	callq	_BufferGetPage
	movq	-40(%rbp), %rsi
	movl	%eax, %edi
	callq	_fsm_truncate_avail
	movl	%r15d, %edi
	callq	_MarkBufferDirty
	movq	_InRecovery@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_7
## %bb.4:
	movq	%r12, %rdi
	callq	_RelationNeedsWAL
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	xorl	%eax, %eax
	callq	_XLogHintBitIsNeeded
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_log_newpage_buffer
LBB0_7:
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	movl	%r15d, %edi
	callq	_UnlockReleaseBuffer
	movl	%r14d, %edi
	callq	_fsm_logical_to_physical
	movq	%rax, %rbx
	incq	%rbx
	jmp	LBB0_10
LBB0_8:
	movl	%r14d, %edi
	callq	_fsm_logical_to_physical
	movq	%rax, %rbx
	movl	(%r12), %edi
	movl	(%r15), %esi
	callq	_smgrnblocks
	cmpq	%rbx, %rax
	jg	LBB0_10
LBB0_9:
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_10:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FSM_FORKNUM,4,2                ## @FSM_FORKNUM
	.comm	_InvalidBlockNumber,8,3         ## @InvalidBlockNumber
	.comm	_BUFFER_LOCK_EXCLUSIVE,4,2      ## @BUFFER_LOCK_EXCLUSIVE
	.comm	_InRecovery,4,2                 ## @InRecovery
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FreeSpaceMapPrepareTruncateRel ; -- Begin function FreeSpaceMapPrepareTruncateRel
	.p2align	2
_FreeSpaceMapPrepareTruncateRel:        ; @FreeSpaceMapPrepareTruncateRel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	bl	_RelationOpenSmgr
	ldr	w0, [x20]
Lloh0:
	adrp	x21, _FSM_FORKNUM@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FSM_FORKNUM@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_smgrexists
	cbz	w0, LBB0_8
; %bb.1:
	add	x1, sp, #8
	mov	x0, x19
	bl	_fsm_get_location
	mov	x19, x0
	ldr	x8, [sp, #8]
	cmp	x8, #1
	b.lt	LBB0_9
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_fsm_readbuf
	mov	x21, x0
	bl	_BufferIsValid
	cbz	w0, LBB0_8
; %bb.3:
Lloh2:
	adrp	x8, _BUFFER_LOCK_EXCLUSIVE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BUFFER_LOCK_EXCLUSIVE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_LockBuffer
	bl	_START_CRIT_SECTION
	mov	x0, x21
	bl	_BufferGetPage
	ldr	x1, [sp, #8]
	bl	_fsm_truncate_avail
	mov	x0, x21
	bl	_MarkBufferDirty
Lloh5:
	adrp	x8, _InRecovery@GOTPAGE
Lloh6:
	ldr	x8, [x8, _InRecovery@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cbnz	w8, LBB0_7
; %bb.4:
	mov	x0, x20
	bl	_RelationNeedsWAL
	cbz	x0, LBB0_7
; %bb.5:
	bl	_XLogHintBitIsNeeded
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x21
	mov	w1, #0
	bl	_log_newpage_buffer
LBB0_7:
	bl	_END_CRIT_SECTION
	mov	x0, x21
	bl	_UnlockReleaseBuffer
	mov	x0, x19
	bl	_fsm_logical_to_physical
	add	x0, x0, #1
	b	LBB0_10
LBB0_8:
Lloh8:
	adrp	x8, _InvalidBlockNumber@GOTPAGE
Lloh9:
	ldr	x8, [x8, _InvalidBlockNumber@GOTPAGEOFF]
Lloh10:
	ldr	x0, [x8]
	b	LBB0_10
LBB0_9:
	mov	x0, x19
	bl	_fsm_logical_to_physical
	mov	x19, x0
	ldr	w0, [x20]
	ldr	w1, [x21]
	bl	_smgrnblocks
Lloh11:
	adrp	x8, _InvalidBlockNumber@GOTPAGE
Lloh12:
	ldr	x8, [x8, _InvalidBlockNumber@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x19
	csel	x0, x19, x8, gt
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_FSM_FORKNUM,4,2                ; @FSM_FORKNUM
	.comm	_InvalidBlockNumber,8,3         ; @InvalidBlockNumber
	.comm	_BUFFER_LOCK_EXCLUSIVE,4,2      ; @BUFFER_LOCK_EXCLUSIVE
	.comm	_InRecovery,4,2                 ; @InRecovery
.subsections_via_symbols
