	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdtruncate                     ## -- Begin function mdtruncate
	.p2align	4, 0x90
_mdtruncate:                            ## @mdtruncate
	.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	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_mdnblocks
	movl	%eax, %r12d
	cmpl	%r14d, %eax
	jge	LBB0_3
## %bb.1:
	movq	_InRecovery@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_17
## %bb.2:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	16(%rbx), %edi
	movq	%r15, %rsi
	callq	_relpath
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_3:
	cmpl	%r14d, %r12d
	je	LBB0_17
## %bb.4:
	movq	(%rbx), %rax
	movl	(%rax,%r15,4), %eax
	testl	%eax, %eax
	jg	LBB0_5
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rbx), %rax
	xorl	%edi, %edi
	cmpq	(%rax,%r15,8), %r12
	setne	%dil
	callq	_Assert
	movl	(%r12), %edi
	callq	_FileClose
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	__fdvec_resize
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rcx
	incq	%rcx
	movq	%r13, %rax
	cmpq	$1, %rcx
	jbe	LBB0_17
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-1(%rax), %r13
	movq	_RELSEG_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %ecx
	imull	%r13d, %ecx
	movq	8(%rbx), %rsi
	movl	%r13d, %r12d
	shlq	$2, %r12
	addq	(%rsi,%r15,8), %r12
	cmpl	%r14d, %ecx
	jle	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12), %edi
	movq	_WAIT_EVENT_DATA_FILE_TRUNCATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_FileTruncate
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	movl	(%r12), %edi
	callq	_FilePathName
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_errmsg
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_ereport
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_SmgrIsTemp
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_register_dirty_segment
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	imull	%eax, %edx
	cmpl	%r14d, %edx
	jle	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, %esi
	subl	%ecx, %esi
	movl	(%r12), %edi
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	movq	_WAIT_EVENT_DATA_FILE_TRUNCATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_FileTruncate
	testq	%rax, %rax
	jns	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	movl	(%r12), %edi
	callq	_FilePathName
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_errmsg
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_ereport
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_SmgrIsTemp
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_register_dirty_segment
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_InRecovery,8,3                 ## @InRecovery
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not truncate file \"%s\" to %u blocks: it's only %u blocks now"

	.comm	_RELSEG_SIZE,4,2                ## @RELSEG_SIZE
	.comm	_WAIT_EVENT_DATA_FILE_TRUNCATE,4,2 ## @WAIT_EVENT_DATA_FILE_TRUNCATE
L_.str.1:                               ## @.str.1
	.asciz	"could not truncate file \"%s\": %m"

	.comm	_BLCKSZ,4,2                     ## @BLCKSZ
L_.str.2:                               ## @.str.2
	.asciz	"could not truncate file \"%s\" to %u blocks: %m"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdtruncate                     ; -- Begin function mdtruncate
	.p2align	2
_mdtruncate:                            ; @mdtruncate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_mdnblocks
	mov	x22, x0
	cmp	w0, w19
	b.ge	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _InRecovery@GOTPAGE
Lloh1:
	ldr	x8, [x8, _InRecovery@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbnz	x8, LBB0_18
; %bb.2:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	ldr	w0, [x21, #16]
	mov	x1, x20
	bl	_relpath
	mov	x1, x0
	mov	x8, x19
	stp	x8, x22, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_3:
	cmp	w22, w19
	b.eq	LBB0_18
; %bb.4:
	ldr	x8, [x21]
	ldr	w8, [x8, x20, lsl #2]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.5:
Lloh8:
	adrp	x27, _RELSEG_SIZE@GOTPAGE
Lloh9:
	ldr	x27, [x27, _RELSEG_SIZE@GOTPAGEOFF]
Lloh10:
	adrp	x28, _WAIT_EVENT_DATA_FILE_TRUNCATE@GOTPAGE
Lloh11:
	ldr	x28, [x28, _WAIT_EVENT_DATA_FILE_TRUNCATE@GOTPAGEOFF]
Lloh12:
	adrp	x23, _ERROR@GOTPAGE
Lloh13:
	ldr	x23, [x23, _ERROR@GOTPAGEOFF]
Lloh14:
	adrp	x22, _BLCKSZ@GOTPAGE
Lloh15:
	ldr	x22, [x22, _BLCKSZ@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x21, #8]
	ldr	x8, [x8, x20, lsl #3]
	cmp	x25, x8
	cset	w0, ne
	bl	_Assert
	ldr	w0, [x25]
	bl	_FileClose
	mov	x0, x21
	mov	x1, x20
	mov	x2, x24
	bl	__fdvec_resize
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x9, x24, #1
	mov	x8, x24
	cmp	x9, #1
	b.ls	LBB0_18
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	sub	x24, x8, #1
	ldr	w10, [x27]
	mul	w9, w10, w24
	ldr	x11, [x21, #8]
	ldr	x11, [x11, x20, lsl #3]
	add	x25, x11, w24, uxtw #2
	cmp	w9, w19
	b.le	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x25]
	ldr	w2, [x28]
	mov	w1, #0
	bl	_FileTruncate
	tbz	x0, #63, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w26, [x23]
	bl	_errcode_for_file_access
	ldr	w0, [x25]
	bl	_FilePathName
	mov	x1, x0
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x26
	bl	_ereport
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	bl	_SmgrIsTemp
	cbnz	w0, LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x25
	bl	_register_dirty_segment
	b	LBB0_6
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	mul	w8, w10, w8
	cmp	w8, w19
	b.le	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=1
	sub	w8, w19, w9
	ldr	w0, [x25]
	ldr	w9, [x22]
	mul	w1, w9, w8
	ldr	w2, [x28]
	bl	_FileTruncate
	tbz	x0, #63, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w26, [x23]
	bl	_errcode_for_file_access
	ldr	w0, [x25]
	bl	_FilePathName
	mov	x1, x0
	str	x19, [sp]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x26
	bl	_ereport
LBB0_16:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	bl	_SmgrIsTemp
	cbnz	w0, LBB0_7
; %bb.17:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x25
	bl	_register_dirty_segment
	b	LBB0_7
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_InRecovery,8,3                 ; @InRecovery
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not truncate file \"%s\" to %u blocks: it's only %u blocks now"

	.comm	_RELSEG_SIZE,4,2                ; @RELSEG_SIZE
	.comm	_WAIT_EVENT_DATA_FILE_TRUNCATE,4,2 ; @WAIT_EVENT_DATA_FILE_TRUNCATE
l_.str.1:                               ; @.str.1
	.asciz	"could not truncate file \"%s\": %m"

	.comm	_BLCKSZ,4,2                     ; @BLCKSZ
l_.str.2:                               ; @.str.2
	.asciz	"could not truncate file \"%s\" to %u blocks: %m"

.subsections_via_symbols
