	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PageRepairFragmentation        ## -- Begin function PageRepairFragmentation
	.p2align	4, 0x90
_PageRepairFragmentation:               ## @PageRepairFragmentation
	.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	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r13
	movq	8(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %rbx
	movq	_MaxHeapTuplesPerPage@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$4, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_SizeOfPageHeaderData@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jl	LBB0_5
## %bb.1:
	cmpq	-64(%rbp), %r13                 ## 8-byte Folded Reload
	jg	LBB0_5
## %bb.2:
	cmpq	%rbx, -64(%rbp)                 ## 8-byte Folded Reload
	jg	LBB0_5
## %bb.3:
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jg	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_MAXALIGN
	cmpq	%rax, %rbx
	je	LBB0_6
LBB0_5:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_DATA_CORRUPTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_6:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_PageGetMaxOffsetNumber
	movq	_FirstOffsetNumber@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	cmpl	%eax, %r14d
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	jle	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
LBB0_16:
	movq	-104(%rbp), %r13                ## 8-byte Reload
	subq	%r13, %r15
	shrq	$4, %r15
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.18:
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	subq	-96(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	cmpq	%rbx, %r14
	jle	LBB0_20
## %bb.19:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_ERRCODE_DATA_CORRUPTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_errmsg
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_ereport
LBB0_20:
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%r12, %rdx
	callq	_compactify_tuples
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_23
LBB0_22:
	movq	%r12, %rdi
	callq	_PageSetHasFreeLinePointers
	jmp	LBB0_24
LBB0_8:
	decl	%r14d
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%r13d, %edi
	callq	_ItemIdSetUnused
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%r14d, -52(%rbp)                ## 4-byte Folded Reload
	je	LBB0_16
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %ebx
	leal	1(%rbx), %r14d
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_PageGetItemId
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_ItemIdIsUsed
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%r13d, %edi
	callq	_ItemIdHasStorage
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%ebx, (%r15)
	movl	%r13d, %edi
	callq	_ItemIdGetOffset
	movl	%eax, 4(%r15)
	cmpl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	setl	%cl
	cmpl	-88(%rbp), %eax                 ## 4-byte Folded Reload
	setge	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r12, %rbx
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_ERRCODE_DATA_CORRUPTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movl	4(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r12d, %edi
	movq	%rbx, %r12
	movl	%eax, %esi
	callq	_ereport
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%r13d, %edi
	callq	_ItemIdGetLength
	movq	%rax, %rdi
	callq	_MAXALIGN
	movq	%rax, 8(%r15)
	addq	%rax, -80(%rbp)                 ## 8-byte Folded Spill
	addq	$16, %r15
	jmp	LBB0_15
LBB0_17:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r12)
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jg	LBB0_22
LBB0_23:
	movq	%r12, %rdi
	callq	_PageClearHasFreeLinePointers
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.25:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MaxHeapTuplesPerPage,4,2       ## @MaxHeapTuplesPerPage
	.comm	_SizeOfPageHeaderData,8,3       ## @SizeOfPageHeaderData
	.comm	_BLCKSZ,8,3                     ## @BLCKSZ
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_DATA_CORRUPTED,4,2     ## @ERRCODE_DATA_CORRUPTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"corrupted page pointers: lower = %u, upper = %u, special = %u"

	.comm	_FirstOffsetNumber,4,2          ## @FirstOffsetNumber
L_.str.1:                               ## @.str.1
	.asciz	"corrupted line pointer: %u"

L_.str.2:                               ## @.str.2
	.asciz	"corrupted item lengths: total %u, available space %u"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PageRepairFragmentation        ; -- Begin function PageRepairFragmentation
	.p2align	2
_PageRepairFragmentation:               ; @PageRepairFragmentation
	.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
	sub	sp, sp, #32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldp	x20, x28, [x0]
	ldr	x22, [x0, #16]
Lloh3:
	adrp	x8, _MaxHeapTuplesPerPage@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MaxHeapTuplesPerPage@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #4
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x21, x9, x8
	mov	sp, x21
Lloh8:
	adrp	x8, _SizeOfPageHeaderData@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SizeOfPageHeaderData@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _BLCKSZ@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BLCKSZ@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x20, x8
	ccmp	x20, x28, #0, ge
	ccmp	x28, x22, #0, le
	ccmp	x22, x9, #0, le
	b.gt	LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_MAXALIGN
	cmp	x22, x0
	b.eq	LBB0_3
LBB0_2:
Lloh14:
	adrp	x8, _ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w23, [x8]
Lloh17:
	adrp	x8, _ERRCODE_DATA_CORRUPTED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERRCODE_DATA_CORRUPTED@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_errcode
	stp	x28, x22, [sp, #-16]!
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	add	sp, sp, #16
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_3:
	stur	x20, [x29, #-104]               ; 8-byte Folded Spill
	mov	x0, x19
	bl	_PageGetMaxOffsetNumber
Lloh22:
	adrp	x8, _FirstOffsetNumber@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FirstOffsetNumber@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w8, w0
	stur	x21, [x29, #-96]                ; 8-byte Folded Spill
	b.le	LBB0_9
; %bb.4:
	mov	w25, #0
	mov	x23, #0
LBB0_5:
	ldur	x26, [x29, #-96]                ; 8-byte Folded Reload
	sub	x8, x21, x26
	lsr	x24, x8, #4
	cbz	w24, LBB0_17
; %bb.6:
	ldur	x8, [x29, #-104]                ; 8-byte Folded Reload
	sub	x20, x22, x8
	cmp	x23, x20
	b.le	LBB0_8
; %bb.7:
Lloh25:
	adrp	x8, _ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w21, [x8]
Lloh28:
	adrp	x8, _ERRCODE_DATA_CORRUPTED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ERRCODE_DATA_CORRUPTED@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	bl	_errcode
	str	x20, [sp, #-16]!
Lloh31:
	adrp	x0, l_.str.2@PAGE
Lloh32:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	bl	_errmsg
	add	sp, sp, #16
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_8:
	mov	x0, x26
	mov	x1, x24
	mov	x2, x19
	bl	_compactify_tuples
	b	LBB0_18
LBB0_9:
	mov	x24, x0
	mov	x23, #0
	mov	w25, #0
	sub	w20, w8, #1
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x26
	bl	_ItemIdSetUnused
	add	w25, w25, #1
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w20, w20, #1
	cmp	w24, w20
	b.eq	LBB0_5
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	w1, w20, #1
	mov	x0, x19
	bl	_PageGetItemId
	mov	x26, x0
	bl	_ItemIdIsUsed
	cbz	x0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x26
	bl	_ItemIdHasStorage
	cbz	x0, LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	str	w20, [x21]
	mov	x0, x26
	bl	_ItemIdGetOffset
	str	w0, [x21, #4]
	cmp	w0, w28
	ccmp	w0, w22, #0, ge
	cset	w0, ge
	bl	_unlikely
	cbz	x0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
Lloh33:
	adrp	x8, _ERROR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh35:
	ldr	w27, [x8]
Lloh36:
	adrp	x8, _ERRCODE_DATA_CORRUPTED@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ERRCODE_DATA_CORRUPTED@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	bl	_errcode
	ldr	w1, [x21, #4]
Lloh39:
	adrp	x0, l_.str.1@PAGE
Lloh40:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x27
	bl	_ereport
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x26
	bl	_ItemIdGetLength
	bl	_MAXALIGN
	str	x0, [x21, #8]
	add	x23, x0, x23
	add	x21, x21, #16
	b	LBB0_11
LBB0_17:
	str	x22, [x19, #8]
LBB0_18:
	mov	x0, x19
	cmp	w25, #1
	b.lt	LBB0_20
; %bb.19:
	bl	_PageSetHasFreeLinePointers
	b	LBB0_21
LBB0_20:
	bl	_PageClearHasFreeLinePointers
LBB0_21:
	ldur	x8, [x29, #-88]
Lloh41:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh42:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.22:
	sub	sp, x29, #80
	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
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_MaxHeapTuplesPerPage,4,2       ; @MaxHeapTuplesPerPage
	.comm	_SizeOfPageHeaderData,8,3       ; @SizeOfPageHeaderData
	.comm	_BLCKSZ,8,3                     ; @BLCKSZ
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_DATA_CORRUPTED,4,2     ; @ERRCODE_DATA_CORRUPTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"corrupted page pointers: lower = %u, upper = %u, special = %u"

	.comm	_FirstOffsetNumber,4,2          ; @FirstOffsetNumber
l_.str.1:                               ; @.str.1
	.asciz	"corrupted line pointer: %u"

l_.str.2:                               ; @.str.2
	.asciz	"corrupted item lengths: total %u, available space %u"

.subsections_via_symbols
