	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pgstat_heap
_pgstat_heap:                           ## @pgstat_heap
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, -108(%rbp)
	movq	$0, -92(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_HEAP_TABLE_AM_OID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_FEATURE_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_2:
	movq	_SnapshotAny@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_table_beginscan_strat
	movq	%rax, %r13
	callq	_InitDirtySnapshot
	movq	(%r13), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_ForwardScanDirection@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_heap_getnext
	movl	$0, %ebx
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %r14
	xorl	%r15d, %r15d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_heap_getnext
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_7
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movl	12(%r13), %edi
	movq	_BUFFER_LOCK_SHARE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LockBuffer
	movl	12(%r13), %edx
	movq	%r14, %rdi
	leaq	-116(%rbp), %rsi
	callq	_HeapTupleSatisfiesVisibility
	movl	8(%r14), %ecx
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	addl	%ecx, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%eax, -92(%rbp)
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%eax, -96(%rbp)
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	%ecx, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, -100(%rbp)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, -104(%rbp)
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	12(%r13), %edi
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LockBuffer
	movq	%r14, %rdi
	callq	_ItemPointerGetBlockNumber
	cmpq	%rax, %rbx
	jg	LBB0_6
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r14
	incq	%r14
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movq	_MAIN_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RBM_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	8(%r13), %r8d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_ReadBufferExtended
	movq	%r13, %r12
	movl	%eax, %r13d
	movq	_BUFFER_LOCK_SHARE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	callq	_LockBuffer
	movl	%r13d, %edi
	callq	_BufferGetPage
	movl	%eax, %edi
	callq	_PageGetHeapFreeSpace
	addl	%eax, %r15d
	movl	%r15d, -108(%rbp)
	movl	%r13d, %edi
	movq	%r12, %r13
	callq	_UnlockReleaseBuffer
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rbx
	movq	_ForwardScanDirection@GOTPCREL(%rip), %r12
	jmp	LBB0_6
LBB0_7:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	cmpq	%r14, %rbx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jge	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movq	_MAIN_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RBM_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	8(%r13), %r8d
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_ReadBufferExtended
	movl	%eax, %r14d
	movq	_BUFFER_LOCK_SHARE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_LockBuffer
	movl	%r14d, %edi
	callq	_BufferGetPage
	movl	%eax, %edi
	callq	_PageGetHeapFreeSpace
	addl	%eax, %r15d
	movl	%r15d, -108(%rbp)
	movl	%r14d, %edi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	callq	_UnlockReleaseBuffer
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_8
LBB0_9:
	movq	%r13, %rdi
	callq	_table_endscan
	movq	_AccessShareLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_relation_close
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	imull	(%rax), %r14d
	movl	%r14d, -112(%rbp)
	leaq	-112(%rbp), %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_build_pgstattuple_type
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HEAP_TABLE_AM_OID,8,3          ## @HEAP_TABLE_AM_OID
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_FEATURE_NOT_SUPPORTED,4,2 ## @ERRCODE_FEATURE_NOT_SUPPORTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"only heap AM is supported"

	.comm	_SnapshotAny,4,2                ## @SnapshotAny
	.comm	_ForwardScanDirection,4,2       ## @ForwardScanDirection
	.comm	_BUFFER_LOCK_SHARE,4,2          ## @BUFFER_LOCK_SHARE
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ## @BUFFER_LOCK_UNLOCK
	.comm	_MAIN_FORKNUM,4,2               ## @MAIN_FORKNUM
	.comm	_RBM_NORMAL,4,2                 ## @RBM_NORMAL
	.comm	_AccessShareLock,4,2            ## @AccessShareLock
	.comm	_BLCKSZ,4,2                     ## @BLCKSZ
	.no_dead_strip	_pgstat_heap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pgstat_heap
_pgstat_heap:                           ; @pgstat_heap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	str	w1, [sp, #8]                    ; 4-byte Folded Spill
	mov	x20, x0
	stur	xzr, [sp, #44]
	stur	xzr, [sp, #36]
	stur	xzr, [sp, #52]
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _HEAP_TABLE_AM_OID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HEAP_TABLE_AM_OID@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
Lloh6:
	adrp	x8, _ERRCODE_FEATURE_NOT_SUPPORTED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERRCODE_FEATURE_NOT_SUPPORTED@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, x21
	bl	_ereport
LBB0_2:
Lloh11:
	adrp	x8, _SnapshotAny@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SnapshotAny@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	x3, #0
	mov	w4, #1
	mov	w5, #0
	bl	_table_beginscan_strat
	mov	x21, x0
	bl	_InitDirtySnapshot
	ldr	x8, [x21]
	str	x8, [sp]                        ; 8-byte Folded Spill
Lloh14:
	adrp	x19, _ForwardScanDirection@GOTPAGE
Lloh15:
	ldr	x19, [x19, _ForwardScanDirection@GOTPAGEOFF]
	ldr	w1, [x19]
	mov	x0, x21
	bl	_heap_getnext
	cbz	x0, LBB0_12
; %bb.3:
	mov	x23, x0
	mov	w25, #0
	stp	wzr, wzr, [sp, #12]             ; 8-byte Folded Spill
	mov	w26, #0
	str	wzr, [sp, #24]                  ; 4-byte Folded Spill
	mov	x22, #0
Lloh16:
	adrp	x24, _BUFFER_LOCK_SHARE@GOTPAGE
Lloh17:
	ldr	x24, [x24, _BUFFER_LOCK_SHARE@GOTPAGEOFF]
Lloh18:
	adrp	x27, _MAIN_FORKNUM@GOTPAGE
Lloh19:
	ldr	x27, [x27, _MAIN_FORKNUM@GOTPAGEOFF]
Lloh20:
	adrp	x28, _RBM_NORMAL@GOTPAGE
Lloh21:
	ldr	x28, [x28, _RBM_NORMAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x19]
	mov	x0, x21
	bl	_heap_getnext
	mov	x23, x0
	cbz	x0, LBB0_13
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	bl	_CHECK_FOR_INTERRUPTS
	ldr	w0, [x21, #12]
	ldr	w1, [x24]
	bl	_LockBuffer
	ldr	w2, [x21, #12]
	add	x1, sp, #28
	mov	x0, x23
	bl	_HeapTupleSatisfiesVisibility
	ldr	w8, [x23, #8]
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	add	w9, w9, w8
	add	w26, w26, #1
	str	w9, [sp, #24]                   ; 4-byte Folded Spill
	stp	w26, w9, [sp, #48]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	add	w9, w9, w8
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	add	w8, w8, #1
	stp	w9, w8, [sp, #12]               ; 8-byte Folded Spill
	stp	w8, w9, [sp, #40]
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x21, #12]
Lloh22:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_LockBuffer
	mov	x0, x23
	bl	_ItemPointerGetBlockNumber
	cmp	x22, x0
	b.gt	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w26, [sp, #20]                  ; 4-byte Folded Spill
	mov	x26, x19
	add	x19, x0, #1
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_CHECK_FOR_INTERRUPTS
	ldr	w1, [x27]
	ldr	w3, [x28]
	ldr	w4, [x21, #8]
	mov	x0, x20
	mov	x2, x22
	bl	_ReadBufferExtended
	mov	x23, x0
	ldr	w1, [x24]
	bl	_LockBuffer
	mov	x0, x23
	bl	_BufferGetPage
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_PageGetHeapFreeSpace
	add	w25, w25, w0
	str	w25, [sp, #36]
	mov	x0, x23
	bl	_UnlockReleaseBuffer
	add	x22, x22, #1
	cmp	x19, x22
	b.ne	LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, x19
	mov	x19, x26
	ldr	w26, [sp, #20]                  ; 4-byte Folded Reload
	b	LBB0_4
LBB0_12:
	mov	w25, #0
	mov	x22, #0
LBB0_13:
	ldr	x27, [sp]                       ; 8-byte Folded Reload
	cmp	x22, x27
	b.ge	LBB0_16
; %bb.14:
Lloh25:
	adrp	x19, _MAIN_FORKNUM@GOTPAGE
Lloh26:
	ldr	x19, [x19, _MAIN_FORKNUM@GOTPAGEOFF]
Lloh27:
	adrp	x24, _RBM_NORMAL@GOTPAGE
Lloh28:
	ldr	x24, [x24, _RBM_NORMAL@GOTPAGEOFF]
Lloh29:
	adrp	x26, _BUFFER_LOCK_SHARE@GOTPAGE
Lloh30:
	ldr	x26, [x26, _BUFFER_LOCK_SHARE@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	bl	_CHECK_FOR_INTERRUPTS
	ldr	w1, [x19]
	ldr	w3, [x24]
	ldr	w4, [x21, #8]
	mov	x0, x20
	mov	x2, x22
	bl	_ReadBufferExtended
	mov	x23, x0
	ldr	w1, [x26]
	bl	_LockBuffer
	mov	x0, x23
	bl	_BufferGetPage
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_PageGetHeapFreeSpace
	add	w25, w25, w0
	str	w25, [sp, #36]
	mov	x0, x23
	bl	_UnlockReleaseBuffer
	add	x22, x22, #1
	cmp	x27, x22
	b.ne	LBB0_15
LBB0_16:
	mov	x0, x21
	bl	_table_endscan
Lloh31:
	adrp	x8, _AccessShareLock@GOTPAGE
Lloh32:
	ldr	x8, [x8, _AccessShareLock@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_relation_close
Lloh34:
	adrp	x8, _BLCKSZ@GOTPAGE
Lloh35:
	ldr	x8, [x8, _BLCKSZ@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	mul	w8, w8, w27
	str	w8, [sp, #32]
	add	x0, sp, #32
	ldr	w1, [sp, #8]                    ; 4-byte Folded Reload
	bl	_build_pgstattuple_type
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_HEAP_TABLE_AM_OID,8,3          ; @HEAP_TABLE_AM_OID
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_FEATURE_NOT_SUPPORTED,4,2 ; @ERRCODE_FEATURE_NOT_SUPPORTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"only heap AM is supported"

	.comm	_SnapshotAny,4,2                ; @SnapshotAny
	.comm	_ForwardScanDirection,4,2       ; @ForwardScanDirection
	.comm	_BUFFER_LOCK_SHARE,4,2          ; @BUFFER_LOCK_SHARE
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ; @BUFFER_LOCK_UNLOCK
	.comm	_MAIN_FORKNUM,4,2               ; @MAIN_FORKNUM
	.comm	_RBM_NORMAL,4,2                 ; @RBM_NORMAL
	.comm	_AccessShareLock,4,2            ; @AccessShareLock
	.comm	_BLCKSZ,4,2                     ; @BLCKSZ
	.no_dead_strip	_pgstat_heap
.subsections_via_symbols
