	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ForwardSyncRequest             ## -- Begin function ForwardSyncRequest
	.p2align	4, 0x90
_ForwardSyncRequest:                    ## @ForwardSyncRequest
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_IsUnderPostmaster@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_AmCheckpointerProcess
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_4:
	movq	_CheckpointerCommLock@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	xorl	%eax, %eax
	callq	_AmBackgroundWriterProcess
	movq	_CheckpointerShmem@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	cmpq	$0, (%rcx)
	jne	LBB0_7
	jmp	LBB0_13
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_16
LBB0_5:
	incl	28(%rcx)
	cmpq	$0, (%rcx)
	je	LBB0_13
LBB0_7:
	movl	8(%rcx), %edx
	movl	12(%rcx), %eax
	cmpl	%eax, %edx
	jl	LBB0_10
## %bb.8:
	xorl	%eax, %eax
	callq	_CompactCheckpointerRequestQueue
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	movq	(%r12), %rcx
	movl	8(%rcx), %edx
	movl	12(%rcx), %eax
LBB0_10:
	movq	16(%rcx), %rsi
	leal	1(%rdx), %r12d
	movl	%r12d, 8(%rcx)
	movslq	%edx, %rcx
	movl	(%rbx), %edx
	movl	%edx, 4(%rsi,%rcx,8)
	movl	%r14d, (%rsi,%rcx,8)
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	movl	(%r15), %edi
	callq	_LWLockRelease
	movl	$1, %r14d
	cmpl	%ebx, %r12d
	jl	LBB0_16
## %bb.11:
	movq	_ProcGlobal@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.12:
	callq	_SetLatch
	jmp	LBB0_16
LBB0_13:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_AmBackgroundWriterProcess
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:
	movq	(%r12), %rax
	incl	24(%rax)
LBB0_15:
	movl	(%r15), %edi
	callq	_LWLockRelease
LBB0_16:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IsUnderPostmaster,4,2          ## @IsUnderPostmaster
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ForwardSyncRequest must not be called in checkpointer"

	.comm	_CheckpointerCommLock,4,2       ## @CheckpointerCommLock
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_CheckpointerShmem,8,3          ## @CheckpointerShmem
	.comm	_ProcGlobal,8,3                 ## @ProcGlobal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ForwardSyncRequest             ; -- Begin function ForwardSyncRequest
	.p2align	2
_ForwardSyncRequest:                    ; @ForwardSyncRequest
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _IsUnderPostmaster@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IsUnderPostmaster@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_16
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	bl	_AmCheckpointerProcess
	cbz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_3:
Lloh8:
	adrp	x21, _CheckpointerCommLock@GOTPAGE
Lloh9:
	ldr	x21, [x21, _CheckpointerCommLock@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh10:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_LWLockAcquire
	bl	_AmBackgroundWriterProcess
Lloh13:
	adrp	x22, _CheckpointerShmem@GOTPAGE
Lloh14:
	ldr	x22, [x22, _CheckpointerShmem@GOTPAGEOFF]
	ldr	x8, [x22]
	cbz	w0, LBB0_5
; %bb.4:
	ldr	x9, [x8]
	cbnz	x9, LBB0_6
	b	LBB0_13
LBB0_5:
	ldr	w9, [x8, #28]
	add	w9, w9, #1
	str	w9, [x8, #28]
	ldr	x9, [x8]
	cbz	x9, LBB0_13
LBB0_6:
	ldp	w10, w9, [x8, #8]
	cmp	w10, w9
	b.lt	LBB0_9
; %bb.7:
	bl	_CompactCheckpointerRequestQueue
	cbz	w0, LBB0_13
; %bb.8:
	ldr	x8, [x22]
	ldp	w10, w9, [x8, #8]
LBB0_9:
	ldr	x11, [x8, #16]
	add	w22, w10, #1
	str	w22, [x8, #8]
	ldr	w8, [x20]
	add	x10, x11, w10, sxtw #3
	stp	w19, w8, [x10]
	cmp	w9, #0
	cinc	w19, w9, lt
	ldr	w0, [x21]
	bl	_LWLockRelease
	cmp	w22, w19, asr #1
	b.lt	LBB0_12
; %bb.10:
Lloh15:
	adrp	x8, _ProcGlobal@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ProcGlobal@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	x0, [x8]
	cbz	x0, LBB0_12
; %bb.11:
	bl	_SetLatch
LBB0_12:
	mov	w0, #1
	b	LBB0_17
LBB0_13:
	bl	_AmBackgroundWriterProcess
	cbnz	w0, LBB0_15
; %bb.14:
	ldr	x8, [x22]
	ldr	w9, [x8, #24]
	add	w9, w9, #1
	str	w9, [x8, #24]
LBB0_15:
	ldr	w0, [x21]
	bl	_LWLockRelease
LBB0_16:
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IsUnderPostmaster,4,2          ; @IsUnderPostmaster
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ForwardSyncRequest must not be called in checkpointer"

	.comm	_CheckpointerCommLock,4,2       ; @CheckpointerCommLock
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_CheckpointerShmem,8,3          ; @CheckpointerShmem
	.comm	_ProcGlobal,8,3                 ; @ProcGlobal
.subsections_via_symbols
