	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EndPrepare                     ## -- Begin function EndPrepare
	.p2align	4, 0x90
_EndPrepare:                            ## @EndPrepare
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_TWOPHASE_RM_END_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_RegisterTwoPhaseRecord
	movq	_records@GOTPCREL(%rip), %r15
	movq	16(%r15), %rax
	movq	8(%rax), %rbx
	movq	(%rbx), %rax
	movq	_TWOPHASE_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movq	(%r15), %rax
	addq	$4, %rax
	movq	%rax, 8(%rbx)
	movq	_replorigin_session_origin@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_InvalidRepOriginId@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	setne	%dl
	movq	_DoNotReplicateId@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	setne	%r13b
	andb	%dl, %r13b
	cmpb	$1, %r13b
	jne	LBB0_1
## %bb.2:
	movq	_replorigin_session_origin_lsn@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_InvalidXLogRecPtr@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_Assert
	movq	_replorigin_session_origin_timestamp@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	8(%rbx), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_InvalidXLogRecPtr@GOTPCREL(%rip), %r15
LBB0_3:
	movq	(%r15), %rcx
	movq	%rcx, 24(%rbx)
	movq	%r14, 16(%rbx)
	movq	_MaxAllocSize@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_5
## %bb.4:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_5:
	movq	_records@GOTPCREL(%rip), %r15
	movq	8(%r15), %rsi
	xorl	%edi, %edi
	callq	_XLogEnsureRecordSpace
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	movq	_MyPgXact@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	$1, (%rax)
	xorl	%eax, %eax
	callq	_XLogBeginInsert
	movq	16(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rdi
	movl	(%rbx), %esi
	callq	_XLogRegisterData
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_6
LBB0_8:
	movq	_XLOG_INCLUDE_ORIGIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_XLogSetRecordFlags
	movq	_RM_XACT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XLOG_XACT_PREPARE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XLogInsert
	movl	%eax, (%r12)
	testb	%r13b, %r13b
	je	LBB0_10
## %bb.9:
	movq	_replorigin_session_origin_lsn@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	movl	%eax, %esi
	callq	_replorigin_session_advance
	movl	(%r12), %eax
LBB0_10:
	movl	%eax, %edi
	callq	_XLogFlush
	movq	_ProcLastRecPtr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_MarkAsPrepared
	movq	(%r14), %rax
	movl	$0, (%rax)
	movq	_MyLockedGxact@GOTPCREL(%rip), %rax
	movq	%r12, (%rax)
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	movl	(%r12), %edi
	xorl	%esi, %esi
	callq	_SyncRepWaitForLSN
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movl	$0, 24(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TWOPHASE_RM_END_ID,4,2         ## @TWOPHASE_RM_END_ID
	.comm	_records,32,3                   ## @records
	.comm	_TWOPHASE_MAGIC,8,3             ## @TWOPHASE_MAGIC
	.comm	_replorigin_session_origin,8,3  ## @replorigin_session_origin
	.comm	_InvalidRepOriginId,8,3         ## @InvalidRepOriginId
	.comm	_DoNotReplicateId,8,3           ## @DoNotReplicateId
	.comm	_replorigin_session_origin_lsn,8,3 ## @replorigin_session_origin_lsn
	.comm	_InvalidXLogRecPtr,8,3          ## @InvalidXLogRecPtr
	.comm	_replorigin_session_origin_timestamp,8,3 ## @replorigin_session_origin_timestamp
	.comm	_MaxAllocSize,8,3               ## @MaxAllocSize
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ## @ERRCODE_PROGRAM_LIMIT_EXCEEDED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"two-phase state file maximum length exceeded"

	.comm	_MyPgXact,8,3                   ## @MyPgXact
	.comm	_XLOG_INCLUDE_ORIGIN,4,2        ## @XLOG_INCLUDE_ORIGIN
	.comm	_RM_XACT_ID,4,2                 ## @RM_XACT_ID
	.comm	_XLOG_XACT_PREPARE,4,2          ## @XLOG_XACT_PREPARE
	.comm	_ProcLastRecPtr,4,2             ## @ProcLastRecPtr
	.comm	_MyLockedGxact,8,3              ## @MyLockedGxact
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EndPrepare                     ; -- Begin function EndPrepare
	.p2align	2
_EndPrepare:                            ; @EndPrepare
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _TWOPHASE_RM_END_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TWOPHASE_RM_END_ID@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	mov	x2, #0
	mov	w3, #0
	bl	_RegisterTwoPhaseRecord
Lloh3:
	adrp	x21, _records@GOTPAGE
Lloh4:
	ldr	x21, [x21, _records@GOTPAGEOFF]
	ldr	x8, [x21, #16]
	ldr	x20, [x8, #8]
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _TWOPHASE_MAGIC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TWOPHASE_MAGIC@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x21]
	add	x8, x8, #4
	str	x8, [x20, #8]
Lloh8:
	adrp	x9, _replorigin_session_origin@GOTPAGE
Lloh9:
	ldr	x9, [x9, _replorigin_session_origin@GOTPAGEOFF]
Lloh10:
	adrp	x10, _InvalidRepOriginId@GOTPAGE
Lloh11:
	ldr	x10, [x10, _InvalidRepOriginId@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
Lloh13:
	ldr	x10, [x10]
	cmp	x9, x10
Lloh14:
	adrp	x10, _DoNotReplicateId@GOTPAGE
Lloh15:
	ldr	x10, [x10, _DoNotReplicateId@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	ccmp	x9, x10, #4, ne
	cset	w22, ne
Lloh17:
	adrp	x9, _InvalidXLogRecPtr@GOTPAGE
Lloh18:
	ldr	x9, [x9, _InvalidXLogRecPtr@GOTPAGEOFF]
Lloh19:
	adrp	x23, _replorigin_session_origin_lsn@GOTPAGE
Lloh20:
	ldr	x23, [x23, _replorigin_session_origin_lsn@GOTPAGEOFF]
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x23]
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_Assert
Lloh21:
	adrp	x8, _replorigin_session_origin_timestamp@GOTPAGE
Lloh22:
	ldr	x8, [x8, _replorigin_session_origin_timestamp@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x8]
	ldr	x8, [x20, #8]
	mov	x9, x23
	b	LBB0_3
LBB0_2:
	mov	x10, #0
LBB0_3:
	ldr	x9, [x9]
	stp	x10, x9, [x20, #16]
Lloh24:
	adrp	x9, _MaxAllocSize@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MaxAllocSize@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_5
; %bb.4:
Lloh27:
	adrp	x8, _ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w20, [x8]
Lloh30:
	adrp	x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_errcode
Lloh33:
	adrp	x0, l_.str@PAGE
Lloh34:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_5:
	ldr	x1, [x21, #8]
	mov	w0, #0
	bl	_XLogEnsureRecordSpace
	bl	_START_CRIT_SECTION
Lloh35:
	adrp	x20, _MyPgXact@GOTPAGE
Lloh36:
	ldr	x20, [x20, _MyPgXact@GOTPAGEOFF]
	ldr	x8, [x20]
	mov	w9, #1
	str	w9, [x8]
	bl	_XLogBeginInsert
	ldr	x24, [x21, #16]
	cbz	x24, LBB0_7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24, #8]
	ldr	w1, [x24]
	bl	_XLogRegisterData
	ldr	x24, [x24, #16]
	cbnz	x24, LBB0_6
LBB0_7:
Lloh37:
	adrp	x8, _XLOG_INCLUDE_ORIGIN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _XLOG_INCLUDE_ORIGIN@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	bl	_XLogSetRecordFlags
Lloh40:
	adrp	x8, _RM_XACT_ID@GOTPAGE
Lloh41:
	ldr	x8, [x8, _RM_XACT_ID@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
Lloh43:
	adrp	x8, _XLOG_XACT_PREPARE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _XLOG_XACT_PREPARE@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	bl	_XLogInsert
	mov	x1, x0
	str	w0, [x19]
	cbz	w22, LBB0_9
; %bb.8:
	ldr	x0, [x23]
	bl	_replorigin_session_advance
	ldr	w1, [x19]
LBB0_9:
	mov	x0, x1
	bl	_XLogFlush
Lloh46:
	adrp	x8, _ProcLastRecPtr@GOTPAGE
Lloh47:
	ldr	x8, [x8, _ProcLastRecPtr@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	mov	x0, x19
	mov	w1, #0
	bl	_MarkAsPrepared
	ldr	x8, [x20]
	str	wzr, [x8]
Lloh49:
	adrp	x8, _MyLockedGxact@GOTPAGE
Lloh50:
	ldr	x8, [x8, _MyLockedGxact@GOTPAGEOFF]
Lloh51:
	str	x19, [x8]
	bl	_END_CRIT_SECTION
	ldr	w0, [x19]
	mov	w1, #0
	bl	_SyncRepWaitForLSN
	stp	xzr, xzr, [x21, #8]
	str	wzr, [x21, #24]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotStr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_TWOPHASE_RM_END_ID,4,2         ; @TWOPHASE_RM_END_ID
	.comm	_records,32,3                   ; @records
	.comm	_TWOPHASE_MAGIC,8,3             ; @TWOPHASE_MAGIC
	.comm	_replorigin_session_origin,8,3  ; @replorigin_session_origin
	.comm	_InvalidRepOriginId,8,3         ; @InvalidRepOriginId
	.comm	_DoNotReplicateId,8,3           ; @DoNotReplicateId
	.comm	_replorigin_session_origin_lsn,8,3 ; @replorigin_session_origin_lsn
	.comm	_InvalidXLogRecPtr,8,3          ; @InvalidXLogRecPtr
	.comm	_replorigin_session_origin_timestamp,8,3 ; @replorigin_session_origin_timestamp
	.comm	_MaxAllocSize,8,3               ; @MaxAllocSize
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ; @ERRCODE_PROGRAM_LIMIT_EXCEEDED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"two-phase state file maximum length exceeded"

	.comm	_MyPgXact,8,3                   ; @MyPgXact
	.comm	_XLOG_INCLUDE_ORIGIN,4,2        ; @XLOG_INCLUDE_ORIGIN
	.comm	_RM_XACT_ID,4,2                 ; @RM_XACT_ID
	.comm	_XLOG_XACT_PREPARE,4,2          ; @XLOG_XACT_PREPARE
	.comm	_ProcLastRecPtr,4,2             ; @ProcLastRecPtr
	.comm	_MyLockedGxact,8,3              ; @MyLockedGxact
.subsections_via_symbols
