	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CheckPointTwoPhase             ## -- Begin function CheckPointTwoPhase
	.p2align	4, 0x90
_CheckPointTwoPhase:                    ## @CheckPointTwoPhase
	.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	_max_prepared_xacts@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_12
## %bb.1:
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_START
	movq	_TwoPhaseStateLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LW_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	_TwoPhaseState@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	cmpl	$0, (%rax)
	jle	LBB0_9
## %bb.2:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movslq	(%rax), %rcx
	cmpq	%rcx, %r15
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rcx
	movq	(%rcx,%r15,8), %r12
	cmpq	$0, 40(%r12)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 32(%r12)
	je	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, (%r12)
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r14, 8(%r12)
	jg	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r12), %rdi
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_XlogReadTwoPhaseData
	movl	24(%r12), %edi
	movq	-56(%rbp), %rsi
	movl	-44(%rbp), %edx
	callq	_RecreateTwoPhaseFile
	movl	$1, (%r12)
	movq	_InvalidXLogRecPtr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r12)
	movq	%rax, 8(%r12)
	movq	-56(%rbp), %rdi
	callq	_pfree
	incl	%ebx
	movq	(%r13), %rax
	jmp	LBB0_8
LBB0_9:
	movq	_TwoPhaseStateLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWLockRelease
	movq	_TWOPHASE_DIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_fsync_fname
	xorl	%eax, %eax
	callq	_TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_DONE
	movq	_log_checkpoints@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.10:
	testl	%ebx, %ebx
	jle	LBB0_12
## %bb.11:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	movl	%ebx, %ecx
	callq	_errmsg_plural
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_max_prepared_xacts,8,3         ## @max_prepared_xacts
	.comm	_TwoPhaseStateLock,4,2          ## @TwoPhaseStateLock
	.comm	_LW_SHARED,4,2                  ## @LW_SHARED
	.comm	_TwoPhaseState,8,3              ## @TwoPhaseState
	.comm	_InvalidXLogRecPtr,8,3          ## @InvalidXLogRecPtr
	.comm	_TWOPHASE_DIR,4,2               ## @TWOPHASE_DIR
	.comm	_log_checkpoints,8,3            ## @log_checkpoints
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%u two-phase state file was written for a long-running prepared transaction"

L_.str.1:                               ## @.str.1
	.asciz	"%u two-phase state files were written for long-running prepared transactions"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CheckPointTwoPhase             ; -- Begin function CheckPointTwoPhase
	.p2align	2
_CheckPointTwoPhase:                    ; @CheckPointTwoPhase
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _max_prepared_xacts@GOTPAGE
Lloh1:
	ldr	x8, [x8, _max_prepared_xacts@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x20, x0
	bl	_TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_START
Lloh3:
	adrp	x21, _TwoPhaseStateLock@GOTPAGE
Lloh4:
	ldr	x21, [x21, _TwoPhaseStateLock@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh5:
	adrp	x8, _LW_SHARED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LW_SHARED@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_LWLockAcquire
Lloh8:
	adrp	x22, _TwoPhaseState@GOTPAGE
Lloh9:
	ldr	x22, [x22, _TwoPhaseState@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_9
; %bb.2:
	mov	x23, #0
	mov	w19, #0
	mov	w24, #1
Lloh10:
	adrp	x25, _InvalidXLogRecPtr@GOTPAGE
Lloh11:
	ldr	x25, [x25, _InvalidXLogRecPtr@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	ldrsw	x9, [x8]
	cmp	x23, x9
	b.ge	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, #8]
	ldr	x26, [x9, x23, lsl #3]
	ldr	x9, [x26, #40]
	cbnz	x9, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x26, #32]
	cbz	x9, LBB0_3
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x26]
	cbnz	w9, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x26, #8]
	cmp	x9, x20
	b.gt	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x26, #16]
	add	x1, sp, #8
	add	x2, sp, #4
	bl	_XlogReadTwoPhaseData
	ldr	w0, [x26, #24]
	ldr	x1, [sp, #8]
	ldr	w2, [sp, #4]
	bl	_RecreateTwoPhaseFile
	str	w24, [x26]
	ldr	x8, [x25]
	stp	x8, x8, [x26, #8]
	ldr	x0, [sp, #8]
	bl	_pfree
	add	w19, w19, #1
	ldr	x8, [x22]
	b	LBB0_3
LBB0_9:
	mov	w19, #0
LBB0_10:
	ldr	w0, [x21]
	bl	_LWLockRelease
Lloh12:
	adrp	x8, _TWOPHASE_DIR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TWOPHASE_DIR@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_fsync_fname
	bl	_TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_DONE
Lloh15:
	adrp	x8, _log_checkpoints@GOTPAGE
Lloh16:
	ldr	x8, [x8, _log_checkpoints@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x8, #0
	ccmp	w19, #1, #8, ne
	b.lt	LBB0_12
; %bb.11:
Lloh18:
	adrp	x8, _LOG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	mov	x3, x19
	bl	_errmsg_plural
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_max_prepared_xacts,8,3         ; @max_prepared_xacts
	.comm	_TwoPhaseStateLock,4,2          ; @TwoPhaseStateLock
	.comm	_LW_SHARED,4,2                  ; @LW_SHARED
	.comm	_TwoPhaseState,8,3              ; @TwoPhaseState
	.comm	_InvalidXLogRecPtr,8,3          ; @InvalidXLogRecPtr
	.comm	_TWOPHASE_DIR,4,2               ; @TWOPHASE_DIR
	.comm	_log_checkpoints,8,3            ; @log_checkpoints
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%u two-phase state file was written for a long-running prepared transaction"

l_.str.1:                               ; @.str.1
	.asciz	"%u two-phase state files were written for long-running prepared transactions"

.subsections_via_symbols
