	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brinRevmapDesummarizeRange     ## -- Begin function brinRevmapDesummarizeRange
	.p2align	4, 0x90
_brinRevmapDesummarizeRange:            ## @brinRevmapDesummarizeRange
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r12d
	leaq	-92(%rbp), %rsi
	xorl	%edx, %edx
	callq	_brinRevmapInitialize
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	%r14d, %esi
	callq	_revmap_get_blkno
	movl	%eax, %edi
	callq	_BlockNumberIsValid
	testl	%eax, %eax
	je	LBB0_14
## %bb.1:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_brinLockRevmapPageForUpdate
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_BufferGetPage
	movl	%eax, %r15d
	movl	(%rbx), %edi
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movl	%r14d, %esi
	callq	_HEAPBLK_TO_REVMAP_INDEX
	movq	%rax, %r14
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	callq	_PageGetContents
	shlq	$2, %r14
	addq	(%rax), %r14
	movq	%r14, %rdi
	callq	_ItemPointerIsValid
	testl	%eax, %eax
	je	LBB0_13
## %bb.2:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movq	%r14, %rdi
	callq	_ItemPointerGetBlockNumber
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_ReadBuffer
	movl	%eax, %r15d
	movq	_BUFFER_LOCK_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_LockBuffer
	movl	%r15d, %edi
	callq	_BufferGetPage
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_BRIN_IS_REGULAR_PAGE
	testl	%eax, %eax
	je	LBB0_17
## %bb.3:
	movq	%r14, %rdi
	callq	_ItemPointerGetOffsetNumber
	movq	%rax, %r13
	movl	%ebx, %edi
	callq	_PageGetMaxOffsetNumber
	cmpq	%rax, %r13
	jle	LBB0_5
## %bb.4:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_INDEX_CORRUPTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_5:
	movl	%ebx, %edi
	movq	%r13, %rsi
	callq	_PageGetItemId
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_ItemIdIsUsed
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_ERRCODE_INDEX_CORRUPTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_ereport
LBB0_7:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_PageGetItem
	movq	%rax, %rdi
	callq	_BrinTupleIsPlaceholder
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r12d, %edi
	callq	_RelationGetRelationName
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_9:
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	leaq	-64(%rbp), %rdi
	callq	_ItemPointerSetInvalid
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movl	(%r12), %esi
	movl	-64(%rbp), %ecx
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_brinSetHeapBlockItemptr
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	callq	_PageIndexTupleDeleteNoCompact
	movl	%r15d, %edi
	callq	_MarkBufferDirty
	movl	%r14d, %edi
	callq	_MarkBufferDirty
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_RelationNeedsWAL
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	(%r12), %eax
	movl	%eax, -76(%rbp)
	movl	%ebx, -80(%rbp)
	movq	%r13, -88(%rbp)
	xorl	%eax, %eax
	callq	_XLogBeginInsert
	movq	_SizeOfBrinDesummarize@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-88(%rbp), %rdi
	callq	_XLogRegisterData
	xorl	%edi, %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_XLogRegisterBuffer
	movq	_REGBUF_STANDARD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %edi
	movl	%r15d, %esi
	callq	_XLogRegisterBuffer
	movq	_RM_BRIN_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XLOG_BRIN_DESUMMARIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XLogInsert
	movl	%eax, %ebx
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_PageSetLSN
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_PageSetLSN
LBB0_11:
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	movl	%r15d, %edi
	callq	_UnlockReleaseBuffer
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_LockBuffer
	movq	%r12, %rdi
	jmp	LBB0_15
LBB0_13:
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	callq	_LockBuffer
LBB0_14:
	movq	%rbx, %rdi
LBB0_15:
	callq	_brinRevmapTerminate
	movl	$1, %eax
LBB0_16:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_LockBuffer
	movl	(%rbx), %esi
	movl	%r15d, %edi
	callq	_LockBuffer
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_brinRevmapTerminate
	xorl	%eax, %eax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ## @BUFFER_LOCK_UNLOCK
	.comm	_BUFFER_LOCK_EXCLUSIVE,4,2      ## @BUFFER_LOCK_EXCLUSIVE
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_INDEX_CORRUPTED,4,2    ## @ERRCODE_INDEX_CORRUPTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"corrupted BRIN index: inconsistent range map"

	.comm	_WARNING,4,2                    ## @WARNING
L_.str.1:                               ## @.str.1
	.asciz	"leftover placeholder tuple detected in BRIN index \"%s\", deleting"

	.comm	_SizeOfBrinDesummarize,4,2      ## @SizeOfBrinDesummarize
	.comm	_REGBUF_STANDARD,4,2            ## @REGBUF_STANDARD
	.comm	_RM_BRIN_ID,4,2                 ## @RM_BRIN_ID
	.comm	_XLOG_BRIN_DESUMMARIZE,4,2      ## @XLOG_BRIN_DESUMMARIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brinRevmapDesummarizeRange     ; -- Begin function brinRevmapDesummarizeRange
	.p2align	2
_brinRevmapDesummarizeRange:            ; @brinRevmapDesummarizeRange
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x24, x0
	add	x1, sp, #28
	mov	x2, #0
	bl	_brinRevmapInitialize
	mov	x19, x0
	mov	x1, x22
	bl	_revmap_get_blkno
	bl	_BlockNumberIsValid
	cbz	w0, LBB0_13
; %bb.1:
	mov	x0, x19
	mov	x1, x22
	bl	_brinLockRevmapPageForUpdate
	mov	x20, x0
	bl	_BufferGetPage
	mov	x21, x0
	ldr	w0, [x19]
	mov	x1, x22
	bl	_HEAPBLK_TO_REVMAP_INDEX
	mov	x23, x0
	mov	x0, x21
	bl	_PageGetContents
	ldr	x8, [x0]
	add	x26, x8, x23, lsl #2
	mov	x0, x26
	bl	_ItemPointerIsValid
	cbz	w0, LBB0_12
; %bb.2:
	mov	x0, x26
	bl	_ItemPointerGetBlockNumber
	mov	x1, x0
	mov	x0, x24
	bl	_ReadBuffer
	mov	x23, x0
Lloh0:
	adrp	x8, _BUFFER_LOCK_EXCLUSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BUFFER_LOCK_EXCLUSIVE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_LockBuffer
	mov	x0, x23
	bl	_BufferGetPage
	mov	x25, x0
	bl	_BRIN_IS_REGULAR_PAGE
	cbz	w0, LBB0_15
; %bb.3:
	mov	x0, x26
	bl	_ItemPointerGetOffsetNumber
	mov	x26, x0
	mov	x0, x25
	bl	_PageGetMaxOffsetNumber
	cmp	x26, x0
	b.le	LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w27, [x8]
Lloh6:
	adrp	x8, _ERRCODE_INDEX_CORRUPTED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERRCODE_INDEX_CORRUPTED@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_errcode
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x27
	bl	_ereport
LBB0_5:
	mov	x0, x25
	mov	x1, x26
	bl	_PageGetItemId
	mov	x27, x0
	bl	_ItemIdIsUsed
	cbnz	w0, LBB0_7
; %bb.6:
Lloh11:
	adrp	x8, _ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w28, [x8]
Lloh14:
	adrp	x8, _ERRCODE_INDEX_CORRUPTED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERRCODE_INDEX_CORRUPTED@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_errcode
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x28
	bl	_ereport
LBB0_7:
	mov	x0, x25
	mov	x1, x27
	bl	_PageGetItem
	bl	_BrinTupleIsPlaceholder
	cbz	x0, LBB0_9
; %bb.8:
Lloh19:
	adrp	x8, _WARNING@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh21:
	ldr	w27, [x8]
	mov	x0, x24
	bl	_RelationGetRelationName
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x27
	bl	_ereport
LBB0_9:
	bl	_START_CRIT_SECTION
	add	x0, sp, #24
	bl	_ItemPointerSetInvalid
	ldr	w1, [x19]
	ldr	w3, [sp, #24]
	mov	x0, x20
	mov	x2, x22
	bl	_brinSetHeapBlockItemptr
	mov	x0, x25
	mov	x1, x26
	bl	_PageIndexTupleDeleteNoCompact
	mov	x0, x23
	bl	_MarkBufferDirty
	mov	x0, x20
	bl	_MarkBufferDirty
	mov	x0, x24
	bl	_RelationNeedsWAL
	cbz	x0, LBB0_11
; %bb.10:
	ldr	w8, [x19]
	stp	w22, w8, [sp, #16]
	str	x26, [sp, #8]
	bl	_XLogBeginInsert
Lloh24:
	adrp	x8, _SizeOfBrinDesummarize@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SizeOfBrinDesummarize@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_XLogRegisterData
	mov	w0, #0
	mov	x1, x20
	mov	w2, #0
	bl	_XLogRegisterBuffer
Lloh27:
	adrp	x8, _REGBUF_STANDARD@GOTPAGE
Lloh28:
	ldr	x8, [x8, _REGBUF_STANDARD@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	w0, #1
	mov	x1, x23
	bl	_XLogRegisterBuffer
Lloh30:
	adrp	x8, _RM_BRIN_ID@GOTPAGE
Lloh31:
	ldr	x8, [x8, _RM_BRIN_ID@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
Lloh33:
	adrp	x8, _XLOG_BRIN_DESUMMARIZE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _XLOG_BRIN_DESUMMARIZE@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	bl	_XLogInsert
	mov	x22, x0
	mov	x0, x21
	mov	x1, x22
	bl	_PageSetLSN
	mov	x0, x25
	mov	x1, x22
	bl	_PageSetLSN
LBB0_11:
	bl	_END_CRIT_SECTION
	mov	x0, x23
	bl	_UnlockReleaseBuffer
LBB0_12:
Lloh36:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_LockBuffer
LBB0_13:
	mov	x0, x19
	bl	_brinRevmapTerminate
	mov	w0, #1
LBB0_14:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_15:
Lloh39:
	adrp	x21, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh40:
	ldr	x21, [x21, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_LockBuffer
	ldr	w1, [x21]
	mov	x0, x23
	bl	_LockBuffer
	mov	x0, x19
	bl	_brinRevmapTerminate
	mov	w0, #0
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ; @BUFFER_LOCK_UNLOCK
	.comm	_BUFFER_LOCK_EXCLUSIVE,4,2      ; @BUFFER_LOCK_EXCLUSIVE
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_INDEX_CORRUPTED,4,2    ; @ERRCODE_INDEX_CORRUPTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"corrupted BRIN index: inconsistent range map"

	.comm	_WARNING,4,2                    ; @WARNING
l_.str.1:                               ; @.str.1
	.asciz	"leftover placeholder tuple detected in BRIN index \"%s\", deleting"

	.comm	_SizeOfBrinDesummarize,4,2      ; @SizeOfBrinDesummarize
	.comm	_REGBUF_STANDARD,4,2            ; @REGBUF_STANDARD
	.comm	_RM_BRIN_ID,4,2                 ; @RM_BRIN_ID
	.comm	_XLOG_BRIN_DESUMMARIZE,4,2      ; @XLOG_BRIN_DESUMMARIZE
.subsections_via_symbols
