	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rewrite_heap_tuple             ## -- Begin function rewrite_heap_tuple
	.p2align	4, 0x90
_rewrite_heap_tuple:                    ## @rewrite_heap_tuple
	.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
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r13
	movl	32(%rdi), %edi
	callq	_MemoryContextSwitchTo
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	(%rbx), %rdi
	addq	$20, %rdi
	movq	(%r15), %rsi
	addq	$20, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	_HEAP_XACT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	notl	%ecx
	movq	(%rbx), %rdi
	andl	(%rdi), %ecx
	movl	%ecx, (%rdi)
	movq	_HEAP2_XACT_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	%edx, 16(%rdi)
	movq	(%r15), %rdx
	movl	(%rax), %eax
	andl	(%rdx), %eax
	orl	%ecx, %eax
	movl	%eax, (%rdi)
	movq	24(%r13), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movl	12(%r13), %r8d
	movl	16(%r13), %ecx
	callq	_heap_freeze_tuple
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rdi
	addq	$8, %rdi
	callq	_ItemPointerSetInvalid
	movq	(%r15), %rdi
	movq	_HEAP_XMAX_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_7
## %bb.1:
	callq	_HeapTupleHeaderIsOnlyLocked
	testq	%rax, %rax
	jne	LBB0_7
## %bb.2:
	movq	(%r15), %rdi
	callq	_HeapTupleHeaderIndicatesMovedPartitions
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	leaq	8(%r15), %r14
	movq	(%r15), %rsi
	addq	$8, %rsi
	movq	%r14, %rdi
	callq	_ItemPointerEquals
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	%r13, %rbx
	leaq	-72(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	(%r15), %rdi
	callq	_HeapTupleHeaderGetUpdateXid
	movl	%eax, -64(%rbp)
	movq	(%r15), %rax
	movq	8(%rax), %rax
	movq	%rax, -72(%rbp)
	movl	(%rbx), %edi
	movq	_HASH_FIND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rsi
	xorl	%ecx, %ecx
	callq	_hash_search
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	%rax, 8(%rcx)
	movl	(%rbx), %edi
	movq	_HASH_REMOVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %rsi
	leaq	-44(%rbp), %rcx
	callq	_hash_search
	movl	-44(%rbp), %edi
	callq	_Assert
	movq	%rbx, %r13
LBB0_7:
	movq	8(%r15), %r15
	movq	%r13, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_raw_heap_insert
	movq	8(%rbx), %r12
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_logical_rewrite_heap_tuple
	movq	(%rbx), %rdi
	movq	_HEAP_UPDATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_17
## %bb.8:
	movb	$1, %r14b
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r13), %rcx
	movq	8(%r13), %rbx
	movq	(%rbx), %rax
	movq	%r12, 8(%rax)
	movq	%r15, %r13
	movq	%rcx, %r15
	movl	4(%r13), %edi
	movq	_HASH_REMOVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %rsi
	leaq	-44(%rbp), %rcx
	callq	_hash_search
	movl	-44(%rbp), %edi
	callq	_Assert
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_raw_heap_insert
	movq	8(%rbx), %r12
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_logical_rewrite_heap_tuple
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rdi
	movq	_HEAP_UPDATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	testl	%eax, (%rdi)
	je	LBB0_16
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	callq	_HeapTupleHeaderGetXmin
	movl	8(%r13), %esi
	movl	%eax, %edi
	callq	_TransactionIdPrecedes
	testl	%eax, %eax
	jne	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	leaq	-72(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_HeapTupleHeaderGetXmin
	movl	%eax, -64(%rbp)
	movq	%r15, -72(%rbp)
	movq	%r13, %r15
	movl	4(%r13), %edi
	movq	_HASH_FIND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_hash_search
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %r13
	testb	$1, %r14b
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_heap_freetuple
	jmp	LBB0_13
LBB0_14:
	movl	(%r15), %edi
	movq	_HASH_ENTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %rsi
	leaq	-44(%rbp), %rcx
	callq	_hash_search
	movq	%rax, %rbx
	xorl	%edi, %edi
	cmpl	$0, -44(%rbp)
	sete	%dil
	callq	_Assert
	movq	%r12, (%rbx)
LBB0_15:
	testb	$1, %r14b
	jne	LBB0_17
LBB0_16:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_heap_freetuple
LBB0_17:
	movl	-76(%rbp), %edi                 ## 4-byte Reload
	callq	_MemoryContextSwitchTo
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	4(%rbx), %edi
	movq	_HASH_ENTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %rsi
	leaq	-44(%rbp), %rcx
	callq	_hash_search
	movq	%rax, %r15
	xorl	%edi, %edi
	cmpl	$0, -44(%rbp)
	sete	%dil
	callq	_Assert
	movq	(%r14), %rax
	movq	%rax, (%r15)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_heap_copytuple
	movq	%rax, 8(%r15)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_HEAP_XACT_MASK,4,2             ## @HEAP_XACT_MASK
	.comm	_HEAP2_XACT_MASK,4,2            ## @HEAP2_XACT_MASK
	.comm	_HEAP_XMAX_INVALID,4,2          ## @HEAP_XMAX_INVALID
	.comm	_HASH_FIND,4,2                  ## @HASH_FIND
	.comm	_HASH_REMOVE,4,2                ## @HASH_REMOVE
	.comm	_HASH_ENTER,4,2                 ## @HASH_ENTER
	.comm	_HEAP_UPDATED,4,2               ## @HEAP_UPDATED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rewrite_heap_tuple             ; -- Begin function rewrite_heap_tuple
	.p2align	2
_rewrite_heap_tuple:                    ; @rewrite_heap_tuple
	.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	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldr	w0, [x0, #32]
	bl	_MemoryContextSwitchTo
	mov	x19, x0
	ldr	x8, [x20]
	add	x0, x8, #20
	ldr	x8, [x22]
	add	x1, x8, #20
	mov	w2, #4
	bl	_memcpy
Lloh0:
	adrp	x8, _HEAP_XACT_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HEAP_XACT_MASK@GOTPAGEOFF]
	ldr	w9, [x8]
	ldr	x0, [x20]
	ldr	w10, [x0]
	bic	w9, w10, w9
	str	w9, [x0]
Lloh2:
	adrp	x10, _HEAP2_XACT_MASK@GOTPAGE
Lloh3:
	ldr	x10, [x10, _HEAP2_XACT_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	ldr	w11, [x0, #16]
	bic	w10, w11, w10
	str	w10, [x0, #16]
	ldr	x10, [x22]
	ldr	w10, [x10]
	ldr	w8, [x8]
	and	w8, w8, w10
	orr	w8, w8, w9
	str	w8, [x0]
	ldr	x8, [x21, #24]
	ldr	x8, [x8]
	ldp	w2, w1, [x8]
	ldp	w4, w3, [x21, #12]
	bl	_heap_freeze_tuple
	ldr	x8, [x20]
	add	x0, x8, #8
	bl	_ItemPointerSetInvalid
	ldr	x0, [x22]
	ldr	w8, [x0]
Lloh5:
	adrp	x9, _HEAP_XMAX_INVALID@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HEAP_XMAX_INVALID@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.1:
	bl	_HeapTupleHeaderIsOnlyLocked
	cbnz	x0, LBB0_6
; %bb.2:
	ldr	x0, [x22]
	bl	_HeapTupleHeaderIndicatesMovedPartitions
	cbnz	w0, LBB0_6
; %bb.3:
	mov	x23, x22
	ldr	x8, [x23], #8
	add	x1, x8, #8
	mov	x0, x23
	bl	_ItemPointerEquals
	cbnz	w0, LBB0_6
; %bb.4:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	x0, [x22]
	bl	_HeapTupleHeaderGetUpdateXid
	str	w0, [sp, #24]
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	str	x8, [sp, #16]
	ldr	w0, [x21]
Lloh8:
	adrp	x8, _HASH_FIND@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HASH_FIND@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x1, sp, #16
	mov	x3, #0
	bl	_hash_search
	cbz	x0, LBB0_17
; %bb.5:
	ldr	x8, [x0]
	ldr	x9, [x20]
	str	x8, [x9, #8]
	ldr	w0, [x21]
Lloh11:
	adrp	x8, _HASH_REMOVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HASH_REMOVE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x1, sp, #16
	add	x3, sp, #12
	bl	_hash_search
	ldr	w0, [sp, #12]
	bl	_Assert
LBB0_6:
	ldr	x22, [x22, #8]
	mov	x0, x21
	mov	x1, x20
	bl	_raw_heap_insert
	ldr	x23, [x20, #8]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_logical_rewrite_heap_tuple
	ldr	x0, [x20]
	ldr	w8, [x0]
Lloh14:
	adrp	x24, _HEAP_UPDATED@GOTPAGE
Lloh15:
	ldr	x24, [x24, _HEAP_UPDATED@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.7:
	mov	w27, #1
Lloh16:
	adrp	x25, _HASH_FIND@GOTPAGE
Lloh17:
	ldr	x25, [x25, _HASH_FIND@GOTPAGEOFF]
Lloh18:
	adrp	x26, _HASH_REMOVE@GOTPAGE
Lloh19:
	ldr	x26, [x26, _HASH_REMOVE@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldp	x22, x20, [x22]
	ldr	x8, [x20]
	str	x23, [x8, #8]
	ldr	w0, [x21, #4]
	ldr	w2, [x26]
	add	x1, sp, #16
	add	x3, sp, #12
	bl	_hash_search
	ldr	w0, [sp, #12]
	bl	_Assert
	mov	x0, x21
	mov	x1, x20
	bl	_raw_heap_insert
	ldr	x23, [x20, #8]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_logical_rewrite_heap_tuple
	mov	w27, #0
	ldr	x0, [x20]
	ldr	w8, [x0]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_15
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	bl	_HeapTupleHeaderGetXmin
	ldr	w1, [x21, #8]
	bl	_TransactionIdPrecedes
	cbnz	w0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	x0, [x20]
	bl	_HeapTupleHeaderGetXmin
	str	w0, [sp, #24]
	str	x22, [sp, #16]
	ldr	w0, [x21, #4]
	ldr	w2, [x25]
	add	x1, sp, #16
	mov	x3, #0
	bl	_hash_search
	cbz	x0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x22, x0
	tbnz	w27, #0, LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	bl	_heap_freetuple
	b	LBB0_8
LBB0_13:
	ldr	w0, [x21]
Lloh20:
	adrp	x8, _HASH_ENTER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HASH_ENTER@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	add	x1, sp, #16
	add	x3, sp, #12
	bl	_hash_search
	mov	x21, x0
	ldr	w8, [sp, #12]
	cmp	w8, #0
	cset	w0, eq
	bl	_Assert
	str	x23, [x21]
LBB0_14:
	tbnz	w27, #0, LBB0_16
LBB0_15:
	mov	x0, x20
	bl	_heap_freetuple
LBB0_16:
	mov	x0, x19
	bl	_MemoryContextSwitchTo
	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_17:
	ldr	w0, [x21, #4]
Lloh23:
	adrp	x8, _HASH_ENTER@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HASH_ENTER@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	add	x1, sp, #16
	add	x3, sp, #12
	bl	_hash_search
	mov	x21, x0
	ldr	w8, [sp, #12]
	cmp	w8, #0
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x23]
	str	x8, [x21]
	mov	x0, x20
	bl	_heap_copytuple
	str	x0, [x21, #8]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_HEAP_XACT_MASK,4,2             ; @HEAP_XACT_MASK
	.comm	_HEAP2_XACT_MASK,4,2            ; @HEAP2_XACT_MASK
	.comm	_HEAP_XMAX_INVALID,4,2          ; @HEAP_XMAX_INVALID
	.comm	_HASH_FIND,4,2                  ; @HASH_FIND
	.comm	_HASH_REMOVE,4,2                ; @HASH_REMOVE
	.comm	_HASH_ENTER,4,2                 ; @HASH_ENTER
	.comm	_HEAP_UPDATED,4,2               ; @HEAP_UPDATED
.subsections_via_symbols
