	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_compute_xid_horizon_for_tuples ## -- Begin function heap_compute_xid_horizon_for_tuples
	.p2align	4, 0x90
_heap_compute_xid_horizon_for_tuples:   ## @heap_compute_xid_horizon_for_tuples
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_InvalidTransactionId@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_InvalidBuffer@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ItemPointerCompare@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	movl	%edx, %esi
	movl	$4, %edx
	callq	_qsort
	testl	%ebx, %ebx
	jle	LBB0_16
## %bb.1:
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	%rax, %rbx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r13,4), %r15
	cmpq	%rax, %rbx
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_ItemPointerGetBlockNumber
	cmpq	%rbx, %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_LockBuffer
	movl	%r14d, %edi
	callq	_ReleaseBuffer
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_ItemPointerGetBlockNumber
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	callq	_ReadBuffer
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_BufferGetPage
	movq	%rax, %r12
	movq	_BUFFER_LOCK_SHARE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_LockBuffer
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_ItemPointerGetOffsetNumber
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_PageGetItemId
	movl	%eax, %ebx
	movl	%eax, %edi
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	callq	_ItemIdIsRedirected
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=2
	movl	%ebx, %edi
	callq	_ItemIdGetRedirect
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_PageGetItemId
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movl	%ebx, %edi
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_ItemIdHasStorage
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_PageGetItem
	movq	%rax, %rdi
	leaq	-44(%rbp), %rsi
	callq	_HeapTupleHeaderAdvanceLatestRemovedXid
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_ItemIdIsDead
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_ItemIdIsUsed
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_Assert
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	cmpq	-72(%rbp), %r13                 ## 8-byte Folded Reload
	je	LBB0_16
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_2
LBB0_16:
	movl	%r14d, %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_LockBuffer
	movl	%r14d, %edi
	callq	_ReleaseBuffer
LBB0_18:
	movl	-44(%rbp), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidTransactionId,4,2       ## @InvalidTransactionId
	.comm	_InvalidBuffer,4,2              ## @InvalidBuffer
	.comm	_ItemPointerCompare,8,3         ## @ItemPointerCompare
	.comm	_InvalidBlockNumber,8,3         ## @InvalidBlockNumber
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ## @BUFFER_LOCK_UNLOCK
	.comm	_BUFFER_LOCK_SHARE,4,2          ## @BUFFER_LOCK_SHARE
	.comm	_MAX_IO_CONCURRENCY,4,2         ## @MAX_IO_CONCURRENCY
	.comm	_effective_io_concurrency,4,2   ## @effective_io_concurrency
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_compute_xid_horizon_for_tuples ; -- Begin function heap_compute_xid_horizon_for_tuples
	.p2align	2
_heap_compute_xid_horizon_for_tuples:   ; @heap_compute_xid_horizon_for_tuples
	.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	x22, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _InvalidTransactionId@GOTPAGE
Lloh1:
	ldr	x8, [x8, _InvalidTransactionId@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #12]
Lloh3:
	adrp	x8, _InvalidBuffer@GOTPAGE
Lloh4:
	ldr	x8, [x8, _InvalidBuffer@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
Lloh6:
	adrp	x8, _ItemPointerCompare@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ItemPointerCompare@GOTPAGEOFF]
Lloh8:
	ldr	x3, [x8]
	mov	x0, x1
	mov	x1, x2
	mov	w2, #4
	bl	_qsort
	cmp	w22, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x26, #0
	mov	x23, #0
Lloh9:
	adrp	x27, _InvalidBlockNumber@GOTPAGE
Lloh10:
	ldr	x27, [x27, _InvalidBlockNumber@GOTPAGEOFF]
	ldr	x8, [x27]
	mov	w28, w22
Lloh11:
	adrp	x25, _BUFFER_LOCK_SHARE@GOTPAGE
Lloh12:
	ldr	x25, [x25, _BUFFER_LOCK_SHARE@GOTPAGEOFF]
	mov	x22, x8
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	add	x24, x20, x26, lsl #2
	cmp	x22, x8
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	bl	_ItemPointerGetBlockNumber
	cmp	x0, x22
	b.eq	LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_BufferIsValid
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh13:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_LockBuffer
	mov	x0, x19
	bl	_ReleaseBuffer
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	bl	_ItemPointerGetBlockNumber
	mov	x22, x0
	mov	x0, x21
	mov	x1, x22
	bl	_ReadBuffer
	mov	x19, x0
	bl	_BufferGetPage
	mov	x23, x0
	ldr	w1, [x25]
	mov	x0, x19
	bl	_LockBuffer
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	bl	_ItemPointerGetOffsetNumber
	mov	x1, x0
	mov	x0, x23
	bl	_PageGetItemId
	mov	x24, x0
	bl	_ItemIdIsRedirected
	cbz	x0, LBB0_9
LBB0_8:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x24
	bl	_ItemIdGetRedirect
	mov	x1, x0
	mov	x0, x23
	bl	_PageGetItemId
	mov	x24, x0
	bl	_CHECK_FOR_INTERRUPTS
	mov	x0, x24
	bl	_ItemIdIsRedirected
	cbnz	x0, LBB0_8
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	bl	_ItemIdHasStorage
	cbz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	mov	x1, x24
	bl	_PageGetItem
	add	x1, sp, #12
	bl	_HeapTupleHeaderAdvanceLatestRemovedXid
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	bl	_ItemIdIsDead
	cbnz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	bl	_ItemIdIsUsed
	cmp	w0, #0
	cset	w0, eq
	bl	_Assert
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x26, x26, #1
	cmp	x26, x28
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x27]
	b	LBB0_2
LBB0_15:
	mov	x0, x19
	bl	_BufferIsValid
	cbz	x0, LBB0_17
; %bb.16:
Lloh16:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_LockBuffer
	mov	x0, x19
	bl	_ReleaseBuffer
LBB0_17:
	ldr	w0, [sp, #12]
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidTransactionId,4,2       ; @InvalidTransactionId
	.comm	_InvalidBuffer,4,2              ; @InvalidBuffer
	.comm	_ItemPointerCompare,8,3         ; @ItemPointerCompare
	.comm	_InvalidBlockNumber,8,3         ; @InvalidBlockNumber
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ; @BUFFER_LOCK_UNLOCK
	.comm	_BUFFER_LOCK_SHARE,4,2          ; @BUFFER_LOCK_SHARE
	.comm	_MAX_IO_CONCURRENCY,4,2         ; @MAX_IO_CONCURRENCY
	.comm	_effective_io_concurrency,4,2   ; @effective_io_concurrency
.subsections_via_symbols
