	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XLogFlush                      ## -- Begin function XLogFlush
	.p2align	4, 0x90
_XLogFlush:                             ## @XLogFlush
	.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
	movl	%edi, %r12d
	xorl	%eax, %eax
	callq	_XLogInsertAllowed
	testl	%eax, %eax
	je	LBB0_14
## %bb.1:
	movq	_LogwrtResult@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jge	LBB0_13
## %bb.2:
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	movq	_XLogCtl@GOTPCREL(%rip), %r13
	movl	%r12d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	addq	$8, %rdi
	callq	_SpinLockAcquire
	movq	(%r13), %rdi
	movl	12(%rdi), %ebx
	movq	(%rdi), %rax
	movq	_LogwrtResult@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	addq	$8, %rdi
	callq	_SpinLockRelease
	cmpl	%r12d, (%r15)
	jge	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%ebx, %r14d
	cmovlel	%ebx, %r14d
	movl	%r14d, %edi
	callq	_WaitXLogInsertionsToFinish
	movl	%eax, %r15d
	movq	_WALWriteLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquireOrWait
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movq	(%r13), %rax
	movq	(%rax), %rax
	movq	_LogwrtResult@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	cmpl	%r12d, %eax
	jge	LBB0_11
## %bb.6:
	movq	_CommitDelay@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	jle	LBB0_10
## %bb.7:
	movq	_enableFsync@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.8:
	movq	_CommitSiblings@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MinimumActiveBackends
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	(%rbx), %rdi
	callq	_pg_usleep
	movl	%r15d, %edi
	callq	_WaitXLogInsertionsToFinish
	movl	%eax, %r15d
LBB0_10:
	movl	%r15d, %eax
	movq	%rax, %rdi
	shlq	$32, %rdi
	orq	%rax, %rdi
	xorl	%esi, %esi
	callq	_XLogWrite
LBB0_11:
	movq	_WALWriteLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWLockRelease
LBB0_12:
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	xorl	%eax, %eax
	callq	_WalSndWakeupProcessRequests
	movq	_LogwrtResult@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	cmpl	%r12d, %r9d
	jge	LBB0_13
## %bb.15:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %ecx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_elog                           ## TAILCALL
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	%r12d, %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_UpdateMinRecoveryPoint         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LogwrtResult,8,2               ## @LogwrtResult
	.comm	_XLogCtl,8,3                    ## @XLogCtl
	.comm	_WALWriteLock,4,2               ## @WALWriteLock
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_CommitDelay,8,3                ## @CommitDelay
	.comm	_enableFsync,8,3                ## @enableFsync
	.comm	_CommitSiblings,4,2             ## @CommitSiblings
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"xlog flush request %X/%X is not satisfied --- flushed only to %X/%X"

	.comm	_LOG,4,2                        ## @LOG
	.comm	_XLOG_DEBUG,8,3                 ## @XLOG_DEBUG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XLogFlush                      ; -- Begin function XLogFlush
	.p2align	2
_XLogFlush:                             ; @XLogFlush
	.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	x19, x0
	bl	_XLogInsertAllowed
	cbz	w0, LBB0_15
; %bb.1:
Lloh0:
	adrp	x22, _LogwrtResult@GOTPAGE
Lloh1:
	ldr	x22, [x22, _LogwrtResult@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w19
	b.ge	LBB0_14
; %bb.2:
	bl	_START_CRIT_SECTION
Lloh2:
	adrp	x24, _XLogCtl@GOTPAGE
Lloh3:
	ldr	x24, [x24, _XLogCtl@GOTPAGEOFF]
Lloh4:
	adrp	x23, _WALWriteLock@GOTPAGE
Lloh5:
	ldr	x23, [x23, _WALWriteLock@GOTPAGEOFF]
	mov	x21, x19
Lloh6:
	adrp	x25, _LW_EXCLUSIVE@GOTPAGE
Lloh7:
	ldr	x25, [x25, _LW_EXCLUSIVE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x0, x8, #8
	bl	_SpinLockAcquire
	ldr	x8, [x24]
	ldr	w20, [x8, #12]
	ldr	x9, [x8]
	str	x9, [x22]
	add	x0, x8, #8
	bl	_SpinLockRelease
	ldr	w8, [x22]
	cmp	w8, w19
	b.ge	LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w21, w20
	csel	w21, w21, w20, gt
	mov	x0, x21
	bl	_WaitXLogInsertionsToFinish
	mov	x20, x0
	ldr	w0, [x23]
	ldr	w1, [x25]
	bl	_LWLockAcquireOrWait
	cbz	w0, LBB0_3
; %bb.5:
	ldr	x8, [x24]
	ldr	x8, [x8]
	str	x8, [x22]
	cmp	w8, w19
	b.ge	LBB0_11
; %bb.6:
Lloh8:
	adrp	x21, _CommitDelay@GOTPAGE
Lloh9:
	ldr	x21, [x21, _CommitDelay@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_10
; %bb.7:
Lloh10:
	adrp	x8, _enableFsync@GOTPAGE
Lloh11:
	ldr	x8, [x8, _enableFsync@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.8:
Lloh13:
	adrp	x8, _CommitSiblings@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CommitSiblings@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_MinimumActiveBackends
	cbz	x0, LBB0_10
; %bb.9:
	ldr	x0, [x21]
	bl	_pg_usleep
	mov	x0, x20
	bl	_WaitXLogInsertionsToFinish
	mov	x20, x0
LBB0_10:
	mov	w0, w20
	bfi	x0, x0, #32, #32
	mov	w1, #0
	bl	_XLogWrite
LBB0_11:
	ldr	w0, [x23]
	bl	_LWLockRelease
LBB0_12:
	bl	_END_CRIT_SECTION
	bl	_WalSndWakeupProcessRequests
	ldr	w5, [x22]
	cmp	w5, w19
	b.ge	LBB0_14
; %bb.13:
Lloh16:
	adrp	x8, _ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x19
	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
LBB0_14:
	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
	ret
LBB0_15:
	mov	x0, x19
	mov	w1, #0
	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	_UpdateMinRecoveryPoint
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_LogwrtResult,8,2               ; @LogwrtResult
	.comm	_XLogCtl,8,3                    ; @XLogCtl
	.comm	_WALWriteLock,4,2               ; @WALWriteLock
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_CommitDelay,8,3                ; @CommitDelay
	.comm	_enableFsync,8,3                ; @enableFsync
	.comm	_CommitSiblings,4,2             ; @CommitSiblings
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"xlog flush request %X/%X is not satisfied --- flushed only to %X/%X"

	.comm	_LOG,4,2                        ; @LOG
	.comm	_XLOG_DEBUG,8,3                 ; @XLOG_DEBUG
.subsections_via_symbols
