	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function XLogWrite
_XLogWrite:                             ## @XLogWrite
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -84(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rax
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	shrq	$32, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_CritSectionCount@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	setg	%dil
	callq	_Assert
	movq	_XLogCtl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	40(%rax), %rdi
	movq	_LogwrtResult@GOTPCREL(%rip), %r15
	movq	%rdi, (%r15)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_XLogRecPtrToBufIdx
	movl	%eax, %ebx
	movq	_openLogFile@GOTPCREL(%rip), %r13
	xorl	%r12d, %r12d
	movl	$0, -68(%rbp)                   ## 4-byte Folded Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movslq	(%r15), %rcx
	cmpl	-64(%rbp), %ecx                 ## 4-byte Folded Reload
	jge	LBB0_38
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_XLogCtl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rdx
	movl	(%rax,%rdx,4), %edi
	cmpl	%edi, %ecx
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	jl	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	%edi, %r9
	movq	_PANIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
	movl	-44(%rbp), %edi                 ## 4-byte Reload
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%edi, (%r15)
	movq	_openLogSegNo@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_wal_segment_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	callq	_XLByteInPrevSeg
	testl	%eax, %eax
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_26
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rax
	testq	%rax, %rax
	js	LBB0_29
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%r14d, %r14d
	je	LBB0_30
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movslq	%r14d, %r14
	incq	%r14
	movl	(%r15), %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	-64(%rbp), %ecx                 ## 4-byte Folded Reload
	jle	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_XLOG_BLCKSZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	imulq	%r14, %rcx
	addq	%r12, %rcx
	movq	_wal_segment_size@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	setge	%cl
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_XLogCtl@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	8(%rcx), %ebx
	sete	%al
	orb	-52(%rbp), %al                  ## 1-byte Folded Reload
	cmpb	$1, %al
	jne	LBB0_33
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_XLOG_BLCKSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	%eax, %r14d
	imull	-68(%rbp), %eax                 ## 4-byte Folded Reload
	movslq	%eax, %r15
	addq	16(%rcx), %r15
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_15 Depth=2
	subl	%ebx, %r14d
	movslq	%ebx, %rax
	addq	%rax, %r15
	addq	%rax, %r12
LBB0_14:                                ##   in Loop: Header=BB0_15 Depth=2
	testl	%r14d, %r14d
	jle	LBB0_18
LBB0_15:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_WAIT_EVENT_WAL_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pgstat_report_wait_start
	movq	(%r13), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	movq	%r12, %rcx
	callq	_pg_pwrite
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_pgstat_report_wait_end
	testl	%ebx, %ebx
	jg	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	_PANIC@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	movq	_ThisTimeLineID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_openLogSegNo@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XLogFileNameP
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	movl	%r14d, %ecx
	callq	_errmsg
	movl	%r13d, %edi
	movq	_openLogFile@GOTPCREL(%rip), %r13
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r14d, %r14d
	cmpb	$0, -52(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_31
## %bb.19:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rdi
	movq	_openLogSegNo@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_issue_xlog_fsync
	xorl	%eax, %eax
	callq	_WalSndWakeupRequest
	movq	_LogwrtResult@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, 4(%r15)
	xorl	%eax, %eax
	callq	_XLogArchivingActive
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %edi
	callq	_XLogArchiveNotifySeg
LBB0_21:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_time
	movq	_XLogCtl@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	%rax, 48(%rcx)
	movl	4(%r15), %eax
	movl	%eax, 24(%rcx)
	movq	_IsUnderPostmaster@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_32
## %bb.22:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_openLogSegNo@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_XLogCheckpointNeeded
	testq	%rax, %rax
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_GetRedoRecPtr
	movl	(%r13), %edi
	callq	_XLogCheckpointNeeded
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_CHECKPOINT_CAUSE_XLOG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RequestCheckpoint
LBB0_25:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_openLogFile@GOTPCREL(%rip), %r13
	jmp	LBB0_33
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edi, %edi
	testl	%r14d, %r14d
	sete	%dil
	callq	_Assert
	cmpq	$0, (%r13)
	js	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_XLogFileClose
LBB0_28:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %edi
	movq	_openLogSegNo@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_wal_segment_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	callq	_XLByteToPrevSeg
	movl	$1, -88(%rbp)
	movl	(%rbx), %edi
	leaq	-88(%rbp), %rsi
	movl	$1, %edx
	callq	_XLogFileInit
	movq	%rax, (%r13)
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	testq	%rax, %rax
	jns	LBB0_6
LBB0_29:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %edi
	movq	_openLogSegNo@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_wal_segment_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	callq	_XLByteToPrevSeg
	movq	_openLogSegNo@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_XLogFileOpen
	movq	%rax, (%r13)
	testl	%r14d, %r14d
	jne	LBB0_7
LBB0_30:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %edi
	movq	_XLOG_BLCKSZ@GOTPCREL(%rip), %rax
	subl	(%rax), %edi
	movq	_wal_segment_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_XLogSegmentOffset
	movq	%rax, %r12
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_LogwrtResult@GOTPCREL(%rip), %r15
LBB0_32:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
LBB0_33:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	jg	LBB0_37
## %bb.34:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %edi
	callq	_NextBufIdx
	movl	%eax, %ebx
	cmpl	$0, -84(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_1
## %bb.35:                              ##   in Loop: Header=BB0_1 Depth=1
	testl	%r14d, %r14d
	jne	LBB0_1
## %bb.36:
	xorl	%r14d, %r14d
	jmp	LBB0_38
LBB0_37:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, (%r15)
LBB0_38:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	xorl	%edi, %edi
	testl	%r14d, %r14d
	sete	%dil
	callq	_Assert
	movl	4(%r15), %eax
	cmpl	%ebx, %eax
	jge	LBB0_51
## %bb.39:
	movl	(%r15), %edi
	cmpl	%edi, %eax
	jge	LBB0_51
## %bb.40:
	movq	_sync_method@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_SYNC_METHOD_OPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_50
## %bb.41:
	movq	_SYNC_METHOD_OPEN_DSYNC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_50
## %bb.42:
	cmpq	$0, (%r13)
	js	LBB0_47
## %bb.43:
	movq	_openLogSegNo@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_wal_segment_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	callq	_XLByteInPrevSeg
	testl	%eax, %eax
	jne	LBB0_45
## %bb.44:
	xorl	%eax, %eax
	callq	_XLogFileClose
LBB0_45:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	jns	LBB0_49
## %bb.46:
	movl	(%r15), %edi
	jmp	LBB0_48
LBB0_47:
	movq	_openLogSegNo@GOTPCREL(%rip), %r14
LBB0_48:
	movl	(%r14), %esi
	movq	_wal_segment_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	callq	_XLByteToPrevSeg
	movl	(%r14), %edi
	callq	_XLogFileOpen
	movq	%rax, %rdi
	movq	%rax, (%r13)
LBB0_49:
	movl	(%r14), %esi
	callq	_issue_xlog_fsync
LBB0_50:
	xorl	%eax, %eax
	callq	_WalSndWakeupRequest
	movl	(%r15), %eax
	movl	%eax, 4(%r15)
LBB0_51:
	movq	_XLogCtl@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	$28, %rdi
	callq	_SpinLockAcquire
	movq	(%rbx), %rdi
	movq	(%r15), %rcx
	movq	%rcx, 40(%rdi)
	movq	%rcx, %rax
	shrq	$32, %rax
	cmpl	%ecx, 32(%rdi)
	jge	LBB0_53
## %bb.52:
	movl	%ecx, 32(%rdi)
LBB0_53:
	cmpl	%eax, 36(%rdi)
	jge	LBB0_55
## %bb.54:
	movl	%eax, 36(%rdi)
LBB0_55:
	addq	$28, %rdi
	callq	_SpinLockRelease
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CritSectionCount,8,3           ## @CritSectionCount
	.comm	_LogwrtResult,8,2               ## @LogwrtResult
	.comm	_XLogCtl,8,3                    ## @XLogCtl
	.comm	_PANIC,4,2                      ## @PANIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"xlog write request %X/%X is past end of log %X/%X"

	.comm	_openLogSegNo,4,2               ## @openLogSegNo
	.comm	_wal_segment_size,8,3           ## @wal_segment_size
	.comm	_openLogFile,8,3                ## @openLogFile
	.comm	_XLOG_BLCKSZ,4,2                ## @XLOG_BLCKSZ
	.comm	_errno,8,3                      ## @errno
	.comm	_WAIT_EVENT_WAL_WRITE,4,2       ## @WAIT_EVENT_WAL_WRITE
	.comm	_EINTR,8,3                      ## @EINTR
L_.str.1:                               ## @.str.1
	.asciz	"could not write to log file %s at offset %u, length %zu: %m"

	.comm	_ThisTimeLineID,4,2             ## @ThisTimeLineID
	.comm	_IsUnderPostmaster,8,3          ## @IsUnderPostmaster
	.comm	_CHECKPOINT_CAUSE_XLOG,4,2      ## @CHECKPOINT_CAUSE_XLOG
	.comm	_sync_method,8,3                ## @sync_method
	.comm	_SYNC_METHOD_OPEN,8,3           ## @SYNC_METHOD_OPEN
	.comm	_SYNC_METHOD_OPEN_DSYNC,8,3     ## @SYNC_METHOD_OPEN_DSYNC
	.no_dead_strip	_XLogWrite
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function XLogWrite
_XLogWrite:                             ; @XLogWrite
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	w1, [sp, #20]                   ; 4-byte Folded Spill
	str	x0, [sp, #32]                   ; 8-byte Folded Spill
	lsr	x8, x0, #32
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _CritSectionCount@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CritSectionCount@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, gt
	bl	_Assert
Lloh3:
	adrp	x26, _XLogCtl@GOTPAGE
Lloh4:
	ldr	x26, [x26, _XLogCtl@GOTPAGEOFF]
	ldr	x8, [x26]
	ldr	x0, [x8, #40]
Lloh5:
	adrp	x27, _LogwrtResult@GOTPAGE
Lloh6:
	ldr	x27, [x27, _LogwrtResult@GOTPAGEOFF]
	str	x0, [x27]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_XLogRecPtrToBufIdx
	mov	x22, #0
	str	wzr, [sp, #24]                  ; 4-byte Folded Spill
	mov	w24, #0
Lloh7:
	adrp	x19, _openLogSegNo@GOTPAGE
Lloh8:
	ldr	x19, [x19, _openLogSegNo@GOTPAGEOFF]
Lloh9:
	adrp	x28, _wal_segment_size@GOTPAGE
Lloh10:
	ldr	x28, [x28, _wal_segment_size@GOTPAGEOFF]
Lloh11:
	adrp	x23, _openLogFile@GOTPAGE
Lloh12:
	ldr	x23, [x23, _openLogFile@GOTPAGEOFF]
Lloh13:
	adrp	x20, _errno@GOTPAGE
Lloh14:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
Lloh15:
	adrp	x21, _WAIT_EVENT_WAL_WRITE@GOTPAGE
Lloh16:
	ldr	x21, [x21, _WAIT_EVENT_WAL_WRITE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	ldrsw	x3, [x27]
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	cmp	w3, w8
	b.ge	LBB0_36
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x26]
	ldr	x8, [x8]
	str	w0, [sp, #28]                   ; 4-byte Folded Spill
	ldr	w25, [x8, w0, sxtw #2]
	cmp	w3, w25
	b.lt	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	sxtw	x5, w25
Lloh17:
	adrp	x8, _PANIC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PANIC@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	str	w25, [x27]
	ldr	w1, [x19]
	ldr	x2, [x28]
	mov	x0, x25
	bl	_XLByteInPrevSeg
	cbz	w0, LBB0_26
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x23]
	tbnz	x0, #63, LBB0_29
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	cbz	w24, LBB0_30
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	sxtw	x8, w24
	add	x24, x8, #1
	ldr	w8, [x27]
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	cmp	w25, w9
	b.le	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w19, #0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
Lloh22:
	adrp	x9, _XLOG_BLCKSZ@GOTPAGE
Lloh23:
	ldr	x9, [x9, _XLOG_BLCKSZ@GOTPAGEOFF]
Lloh24:
	ldrsw	x9, [x9]
	madd	x9, x9, x24, x22
	ldr	x10, [x28]
	cmp	x9, x10
	cset	w19, ge
LBB0_10:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x9, [x26]
	ldr	x10, [sp, #32]                  ; 8-byte Folded Reload
	cmp	w8, w10
	b.ge	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x9, #8]
	ldr	w10, [sp, #28]                  ; 4-byte Folded Reload
	cmp	w10, w8
	cset	w8, eq
	orr	w8, w8, w19
	cmp	w8, #1
	b.ne	LBB0_32
LBB0_12:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x9, #16]
Lloh25:
	adrp	x9, _XLOG_BLCKSZ@GOTPAGE
Lloh26:
	ldr	x9, [x9, _XLOG_BLCKSZ@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	ldr	w10, [sp, #24]                  ; 4-byte Folded Reload
	mul	w10, w9, w10
	add	x26, x8, w10, sxtw
	mul	w27, w9, w24
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=2
	sub	w27, w27, w28
	sxtw	x8, w28
	add	x26, x26, x8
	add	x22, x22, x8
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=2
	cmp	w27, #0
	b.le	LBB0_18
LBB0_15:                                ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	xzr, [x20]
	ldr	w0, [x21]
	bl	_pgstat_report_wait_start
	ldr	x0, [x23]
	mov	x1, x26
	mov	x2, x27
	mov	x3, x22
	bl	_pg_pwrite
	mov	x28, x0
	bl	_pgstat_report_wait_end
	cmp	w28, #0
	b.gt	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	x8, [x20]
Lloh28:
	adrp	x9, _EINTR@GOTPAGE
Lloh29:
	ldr	x9, [x9, _EINTR@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=2
Lloh31:
	adrp	x8, _PANIC@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PANIC@GOTPAGEOFF]
Lloh33:
	ldr	w24, [x8]
	bl	_errcode_for_file_access
Lloh34:
	adrp	x8, _ThisTimeLineID@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ThisTimeLineID@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x8, _openLogSegNo@GOTPAGE
Lloh38:
	ldr	x8, [x8, _openLogSegNo@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	bl	_XLogFileNameP
	mov	x1, x0
Lloh40:
	adrp	x0, l_.str.1@PAGE
Lloh41:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x22
	mov	x3, x27
	bl	_errmsg
	mov	x1, x0
	mov	x0, x24
	bl	_ereport
	b	LBB0_13
LBB0_18:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w19, LBB0_31
; %bb.19:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x23]
Lloh42:
	adrp	x19, _openLogSegNo@GOTPAGE
Lloh43:
	ldr	x19, [x19, _openLogSegNo@GOTPAGEOFF]
	ldr	w1, [x19]
	bl	_issue_xlog_fsync
	bl	_WalSndWakeupRequest
Lloh44:
	adrp	x27, _LogwrtResult@GOTPAGE
Lloh45:
	ldr	x27, [x27, _LogwrtResult@GOTPAGEOFF]
	ldr	w8, [x27]
	str	w8, [x27, #4]
	bl	_XLogArchivingActive
	cbz	x0, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x19]
	bl	_XLogArchiveNotifySeg
LBB0_21:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, #0
	bl	_time
Lloh46:
	adrp	x26, _XLogCtl@GOTPAGE
Lloh47:
	ldr	x26, [x26, _XLogCtl@GOTPAGEOFF]
	ldr	x8, [x26]
	str	x0, [x8, #48]
	ldr	w9, [x27, #4]
	str	w9, [x8, #24]
Lloh48:
	adrp	x8, _IsUnderPostmaster@GOTPAGE
Lloh49:
	ldr	x8, [x8, _IsUnderPostmaster@GOTPAGEOFF]
Lloh50:
	ldr	x8, [x8]
Lloh51:
	adrp	x28, _wal_segment_size@GOTPAGE
Lloh52:
	ldr	x28, [x28, _wal_segment_size@GOTPAGEOFF]
	cbz	x8, LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x19]
	bl	_XLogCheckpointNeeded
	cbz	x0, LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_1 Depth=1
	bl	_GetRedoRecPtr
	ldr	w0, [x19]
	bl	_XLogCheckpointNeeded
	cbz	x0, LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_1 Depth=1
Lloh53:
	adrp	x8, _CHECKPOINT_CAUSE_XLOG@GOTPAGE
Lloh54:
	ldr	x8, [x8, _CHECKPOINT_CAUSE_XLOG@GOTPAGEOFF]
Lloh55:
	ldr	w0, [x8]
	bl	_RequestCheckpoint
LBB0_25:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w24, #0
	b	LBB0_32
LBB0_26:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w24, #0
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x23]
	tbnz	x8, #63, LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_1 Depth=1
	bl	_XLogFileClose
LBB0_28:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x27]
	ldr	w1, [x19]
	ldr	x2, [x28]
	bl	_XLByteToPrevSeg
	mov	w8, #1
	str	w8, [sp, #44]
	ldr	w0, [x19]
	add	x1, sp, #44
	mov	w2, #1
	bl	_XLogFileInit
	str	x0, [x23]
	tbz	x0, #63, LBB0_6
LBB0_29:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x27]
	ldr	w1, [x19]
	ldr	x2, [x28]
	bl	_XLByteToPrevSeg
	ldr	w0, [x19]
	bl	_XLogFileOpen
	str	x0, [x23]
	cbnz	w24, LBB0_7
LBB0_30:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x27]
Lloh56:
	adrp	x9, _XLOG_BLCKSZ@GOTPAGE
Lloh57:
	ldr	x9, [x9, _XLOG_BLCKSZ@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
	sub	w0, w8, w9
	ldr	x1, [x28]
	bl	_XLogSegmentOffset
	mov	x22, x0
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	str	w8, [sp, #24]                   ; 4-byte Folded Spill
	b	LBB0_7
LBB0_31:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w24, #0
Lloh59:
	adrp	x26, _XLogCtl@GOTPAGE
Lloh60:
	ldr	x26, [x26, _XLogCtl@GOTPAGEOFF]
Lloh61:
	adrp	x27, _LogwrtResult@GOTPAGE
Lloh62:
	ldr	x27, [x27, _LogwrtResult@GOTPAGEOFF]
Lloh63:
	adrp	x28, _wal_segment_size@GOTPAGE
Lloh64:
	ldr	x28, [x28, _wal_segment_size@GOTPAGEOFF]
LBB0_32:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	cmp	w25, w8
	b.gt	LBB0_35
; %bb.33:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [sp, #28]                   ; 4-byte Folded Reload
	bl	_NextBufIdx
Lloh65:
	adrp	x19, _openLogSegNo@GOTPAGE
Lloh66:
	ldr	x19, [x19, _openLogSegNo@GOTPAGEOFF]
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_1
; %bb.34:                               ;   in Loop: Header=BB0_1 Depth=1
	cbnz	w24, LBB0_1
	b	LBB0_36
LBB0_35:
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	str	w8, [x27]
Lloh67:
	adrp	x19, _openLogSegNo@GOTPAGE
Lloh68:
	ldr	x19, [x19, _openLogSegNo@GOTPAGEOFF]
LBB0_36:
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
	cmp	w24, #0
	cset	w0, eq
	bl	_Assert
	ldr	w8, [x27, #4]
	cmp	w8, w20
	b.ge	LBB0_47
; %bb.37:
	ldr	w0, [x27]
	cmp	w8, w0
	b.ge	LBB0_47
; %bb.38:
Lloh69:
	adrp	x8, _sync_method@GOTPAGE
Lloh70:
	ldr	x8, [x8, _sync_method@GOTPAGEOFF]
Lloh71:
	ldr	x8, [x8]
Lloh72:
	adrp	x9, _SYNC_METHOD_OPEN@GOTPAGE
Lloh73:
	ldr	x9, [x9, _SYNC_METHOD_OPEN@GOTPAGEOFF]
Lloh74:
	ldr	x9, [x9]
Lloh75:
	adrp	x10, _SYNC_METHOD_OPEN_DSYNC@GOTPAGE
Lloh76:
	ldr	x10, [x10, _SYNC_METHOD_OPEN_DSYNC@GOTPAGEOFF]
Lloh77:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_46
; %bb.39:
	ldr	x8, [x23]
	tbnz	x8, #63, LBB0_44
; %bb.40:
	ldr	w1, [x19]
	ldr	x2, [x28]
	bl	_XLByteInPrevSeg
	cbnz	w0, LBB0_42
; %bb.41:
	bl	_XLogFileClose
LBB0_42:
	ldr	x0, [x23]
	tbz	x0, #63, LBB0_45
; %bb.43:
	ldr	w0, [x27]
LBB0_44:
	ldr	w1, [x19]
	ldr	x2, [x28]
	bl	_XLByteToPrevSeg
	ldr	w0, [x19]
	bl	_XLogFileOpen
	str	x0, [x23]
LBB0_45:
	ldr	w1, [x19]
	bl	_issue_xlog_fsync
LBB0_46:
	bl	_WalSndWakeupRequest
	ldr	w8, [x27]
	str	w8, [x27, #4]
LBB0_47:
	ldr	x8, [x26]
	add	x0, x8, #28
	bl	_SpinLockAcquire
	ldr	x8, [x26]
	ldr	x10, [x27]
	str	x10, [x8, #40]
	ldr	w11, [x8, #32]
	lsr	x9, x10, #32
	cmp	w11, w10
	b.ge	LBB0_49
; %bb.48:
	str	w10, [x8, #32]
LBB0_49:
	ldr	w10, [x8, #36]
	cmp	w10, w9
	b.ge	LBB0_51
; %bb.50:
	str	w9, [x8, #36]
LBB0_51:
	add	x0, x8, #28
	bl	_SpinLockRelease
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpLdrGot	Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.cfi_endproc
                                        ; -- End function
	.comm	_CritSectionCount,8,3           ; @CritSectionCount
	.comm	_LogwrtResult,8,2               ; @LogwrtResult
	.comm	_XLogCtl,8,3                    ; @XLogCtl
	.comm	_PANIC,4,2                      ; @PANIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"xlog write request %X/%X is past end of log %X/%X"

	.comm	_openLogSegNo,4,2               ; @openLogSegNo
	.comm	_wal_segment_size,8,3           ; @wal_segment_size
	.comm	_openLogFile,8,3                ; @openLogFile
	.comm	_XLOG_BLCKSZ,4,2                ; @XLOG_BLCKSZ
	.comm	_errno,8,3                      ; @errno
	.comm	_WAIT_EVENT_WAL_WRITE,4,2       ; @WAIT_EVENT_WAL_WRITE
	.comm	_EINTR,8,3                      ; @EINTR
l_.str.1:                               ; @.str.1
	.asciz	"could not write to log file %s at offset %u, length %zu: %m"

	.comm	_ThisTimeLineID,4,2             ; @ThisTimeLineID
	.comm	_IsUnderPostmaster,8,3          ; @IsUnderPostmaster
	.comm	_CHECKPOINT_CAUSE_XLOG,4,2      ; @CHECKPOINT_CAUSE_XLOG
	.comm	_sync_method,8,3                ; @sync_method
	.comm	_SYNC_METHOD_OPEN,8,3           ; @SYNC_METHOD_OPEN
	.comm	_SYNC_METHOD_OPEN_DSYNC,8,3     ; @SYNC_METHOD_OPEN_DSYNC
	.no_dead_strip	_XLogWrite
.subsections_via_symbols
