	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PrepareRedoAdd                 ## -- Begin function PrepareRedoAdd
	.p2align	4, 0x90
_PrepareRedoAdd:                        ## @PrepareRedoAdd
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	_TwoPhaseStateLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockHeldByMeInMode
	movl	%eax, %edi
	callq	_Assert
	xorl	%eax, %eax
	callq	_RecoveryInProgress
	movl	%eax, %edi
	callq	_Assert
	movl	$16, %edi
	callq	_MAXALIGN
	movslq	%eax, %r14
	addq	%r13, %r14
	movq	_TwoPhaseState@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	16(%rax), %rbx
	testq	%rbx, %rbx
	jne	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movq	_max_prepared_xacts@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_errhint
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	(%r15), %rax
	movq	16(%rax), %rbx
LBB0_2:
	movq	56(%rbx), %rcx
	movq	%rcx, 16(%rax)
	movl	12(%r13), %eax
	movl	%eax, 48(%rbx)
	movq	%r12, 40(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%rbx)
	movl	8(%r13), %eax
	movl	%eax, 8(%rbx)
	movl	4(%r13), %eax
	movl	%eax, 24(%rbx)
	movq	_InvalidBackendId@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movl	$0, (%rbx)
	movq	%r12, %rdi
	callq	_XLogRecPtrIsInvalid
	movl	%eax, 16(%rbx)
	movl	$1, 4(%rbx)
	movl	12(%rbx), %edi
	movq	%r14, %rsi
	callq	_strcpy
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	_max_prepared_xacts@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setl	%dil
	callq	_Assert
	movq	(%r15), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rdx
	leaq	1(%rcx), %rsi
	movq	%rsi, (%rax)
	movq	%rbx, (%rdx,%rcx,8)
	movq	_InvalidRepOriginId@GOTPCREL(%rip), %rax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	cmpq	%rdi, (%rax)
	je	LBB0_4
## %bb.3:
	movl	(%r13), %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_replorigin_advance
LBB0_4:
	movq	_DEBUG2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_elog                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TwoPhaseStateLock,4,2          ## @TwoPhaseStateLock
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_TwoPhaseState,8,3              ## @TwoPhaseState
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_OUT_OF_MEMORY,4,2      ## @ERRCODE_OUT_OF_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"maximum number of prepared transactions reached"

L_.str.1:                               ## @.str.1
	.asciz	"Increase max_prepared_transactions (currently %d)."

	.comm	_max_prepared_xacts,8,3         ## @max_prepared_xacts
	.comm	_InvalidBackendId,4,2           ## @InvalidBackendId
	.comm	_InvalidRepOriginId,8,3         ## @InvalidRepOriginId
	.comm	_DEBUG2,4,2                     ## @DEBUG2
L_.str.2:                               ## @.str.2
	.asciz	"added 2PC data in shared memory for transaction %u"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PrepareRedoAdd                 ; -- Begin function PrepareRedoAdd
	.p2align	2
_PrepareRedoAdd:                        ; @PrepareRedoAdd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _TwoPhaseStateLock@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TwoPhaseStateLock@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_LWLockHeldByMeInMode
	bl	_Assert
	bl	_RecoveryInProgress
	bl	_Assert
	mov	w0, #16
	bl	_MAXALIGN
	add	x23, x21, w0, sxtw
Lloh6:
	adrp	x25, _TwoPhaseState@GOTPAGE
Lloh7:
	ldr	x25, [x25, _TwoPhaseState@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	x24, [x8, #16]
Lloh8:
	adrp	x26, _max_prepared_xacts@GOTPAGE
Lloh9:
	ldr	x26, [x26, _max_prepared_xacts@GOTPAGEOFF]
	cbnz	x24, LBB0_2
; %bb.1:
Lloh10:
	adrp	x8, _ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w24, [x8]
Lloh13:
	adrp	x8, _ERRCODE_OUT_OF_MEMORY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERRCODE_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_errcode
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	ldr	x1, [x26]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errhint
	mov	x1, x0
	mov	x0, x24
	bl	_ereport
	ldr	x8, [x25]
	ldr	x24, [x8, #16]
LBB0_2:
	ldr	x9, [x24, #56]
	str	x9, [x8, #16]
	ldr	w8, [x21, #12]
	str	w8, [x24, #48]
	stp	x19, x22, [x24, #32]
	ldp	w9, w8, [x21, #4]
	str	w8, [x24, #8]
Lloh20:
	adrp	x8, _InvalidBackendId@GOTPAGE
Lloh21:
	ldr	x8, [x8, _InvalidBackendId@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	stp	w8, w9, [x24, #20]
	str	wzr, [x24]
	mov	x0, x22
	bl	_XLogRecPtrIsInvalid
	str	w0, [x24, #16]
	mov	w8, #1
	str	w8, [x24, #4]
	ldr	w0, [x24, #12]
	mov	x1, x23
	bl	_strcpy
	ldr	x8, [x25]
	ldr	x8, [x8]
	ldr	x9, [x26]
	cmp	x8, x9
	cset	w0, lt
	bl	_Assert
	ldr	x8, [x25]
	ldp	x10, x9, [x8]
	add	x11, x10, #1
	str	x11, [x8]
	str	x24, [x9, x10, lsl #3]
Lloh23:
	adrp	x8, _InvalidRepOriginId@GOTPAGE
Lloh24:
	ldr	x8, [x8, _InvalidRepOriginId@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cmp	x8, x20
	b.eq	LBB0_4
; %bb.3:
	ldr	w1, [x21]
	mov	x0, x20
	mov	x2, x19
	mov	w3, #0
	mov	w4, #0
	bl	_replorigin_advance
LBB0_4:
Lloh26:
	adrp	x8, _DEBUG2@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DEBUG2@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	ldr	w2, [x24, #8]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_elog
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_TwoPhaseStateLock,4,2          ; @TwoPhaseStateLock
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_TwoPhaseState,8,3              ; @TwoPhaseState
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_OUT_OF_MEMORY,4,2      ; @ERRCODE_OUT_OF_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"maximum number of prepared transactions reached"

l_.str.1:                               ; @.str.1
	.asciz	"Increase max_prepared_transactions (currently %d)."

	.comm	_max_prepared_xacts,8,3         ; @max_prepared_xacts
	.comm	_InvalidBackendId,4,2           ; @InvalidBackendId
	.comm	_InvalidRepOriginId,8,3         ; @InvalidRepOriginId
	.comm	_DEBUG2,4,2                     ; @DEBUG2
l_.str.2:                               ; @.str.2
	.asciz	"added 2PC data in shared memory for transaction %u"

.subsections_via_symbols
