	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PrescanPreparedTransactions    ## -- Begin function PrescanPreparedTransactions
	.p2align	4, 0x90
_PrescanPreparedTransactions:           ## @PrescanPreparedTransactions
	.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	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_ShmemVariableCache@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_XidFromFullTransactionId
	movl	%eax, %r13d
	movq	_TwoPhaseStateLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	_TwoPhaseState@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	jle	LBB0_1
## %bb.2:
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_3
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r15d, %rdx
	incl	%r15d
	movq	%rax, %rcx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, (%rax,%rdx,4)
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_pfree
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movq	_TwoPhaseState@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax), %rcx
	cmpq	%rcx, %r12
	jge	LBB0_13
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rax
	movq	(%rax,%r12,8), %rbx
	movl	12(%rbx), %edi
	callq	_Assert
	movl	8(%rbx), %r14d
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	_ProcessTwoPhaseBuffer
	testq	%rax, %rax
	je	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	movl	%r14d, %edi
	movl	%r13d, %esi
	callq	_TransactionIdPrecedes
	testq	%rax, %rax
	cmovnel	%r14d, %r13d
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%r15d, %r15d
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	(%r15,%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leal	(,%r15,8), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_repalloc
	jmp	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$40, %edi
	callq	_palloc
	movl	$10, -44(%rbp)                  ## 4-byte Folded Spill
	jmp	LBB0_10
LBB0_1:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_13:
	movq	_TwoPhaseStateLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWLockRelease
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
LBB0_15:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ShmemVariableCache,8,3         ## @ShmemVariableCache
	.comm	_TwoPhaseStateLock,4,2          ## @TwoPhaseStateLock
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_TwoPhaseState,8,3              ## @TwoPhaseState
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PrescanPreparedTransactions    ; -- Begin function PrescanPreparedTransactions
	.p2align	2
_PrescanPreparedTransactions:           ; @PrescanPreparedTransactions
	.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
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	mov	x20, x0
Lloh0:
	adrp	x8, _ShmemVariableCache@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ShmemVariableCache@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_XidFromFullTransactionId
	mov	x21, x0
Lloh3:
	adrp	x25, _TwoPhaseStateLock@GOTPAGE
Lloh4:
	ldr	x25, [x25, _TwoPhaseStateLock@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh5:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_LWLockAcquire
Lloh8:
	adrp	x26, _TwoPhaseState@GOTPAGE
Lloh9:
	ldr	x26, [x26, _TwoPhaseState@GOTPAGEOFF]
	ldr	x8, [x26]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x28, #0
	mov	x22, #0
	mov	w27, #0
	mov	w19, #0
	b	LBB0_6
LBB0_2:                                 ;   in Loop: Header=BB0_6 Depth=1
	lsl	w19, w27, #1
	lsl	w1, w27, #3
	mov	x0, x22
	bl	_repalloc
	mov	x22, x0
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	w24, [x22, w27, sxtw #2]
	add	w27, w27, #1
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	bl	_pfree
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x28, x28, #1
	ldr	x8, [x26]
	ldrsw	x9, [x8]
	cmp	x28, x9
	b.ge	LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #8]
	ldr	x23, [x8, x28, lsl #3]
	ldr	w0, [x23, #12]
	bl	_Assert
	ldp	w1, w24, [x23, #4]
	ldr	w2, [x23]
	mov	x0, x24
	mov	w3, #0
	mov	w4, #1
	bl	_ProcessTwoPhaseBuffer
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x23, x0
	mov	x0, x24
	mov	x1, x21
	bl	_TransactionIdPrecedes
	cmp	x0, #0
	csel	w21, w21, w24, eq
	cbz	x20, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w27, w19
	b.ne	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	cbnz	w27, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #40
	bl	_palloc
	mov	x22, x0
	mov	w19, #10
	b	LBB0_3
LBB0_11:
	mov	w27, #0
	mov	x22, #0
LBB0_12:
	ldr	w0, [x25]
	bl	_LWLockRelease
	cbz	x20, LBB0_14
; %bb.13:
	str	x22, [x20]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	w27, [x8]
LBB0_14:
	mov	x0, x21
	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 AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ShmemVariableCache,8,3         ; @ShmemVariableCache
	.comm	_TwoPhaseStateLock,4,2          ; @TwoPhaseStateLock
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_TwoPhaseState,8,3              ; @TwoPhaseState
.subsections_via_symbols
