	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CustomizableNextWALFileReady
_CustomizableNextWALFileReady:          ## @CustomizableNextWALFileReady
	.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
	movq	_WALFilePath@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_stat_buf@GOTPCREL(%rip), %r14
	movq	%r14, %rsi
	callq	_stat
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_11
## %bb.1:
	movq	_WalSegSz@GOTPCREL(%rip), %r12
	cmpl	$-1, (%r12)
	je	LBB0_2
LBB0_8:
	movl	(%r12), %eax
	movl	(%r14), %ecx
	testl	%eax, %eax
	jle	LBB0_12
## %bb.9:
	cmpl	%eax, %ecx
	jne	LBB0_12
## %bb.10:
	movq	_XLOG_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_nextWALFileType@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$1, %ebx
	jmp	LBB0_11
LBB0_12:
	testl	%eax, %eax
	jle	LBB0_11
## %bb.13:
	cmpl	%eax, %ecx
	jg	LBB0_14
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_nextWALFileName@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IsXLogFileName
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	xorl	%eax, %eax
	callq	_SetWALSegSize
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	xorl	%eax, %eax
	callq	_SetWALFileNameForCleanup
	movq	_need_cleanup@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %r13
	movl	(%r13), %r15d
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	(%r12), %edx
	movl	%r15d, %edi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	_need_cleanup@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	(%r13), %edi
	je	LBB0_7
## %bb.6:
	movq	_exclusiveCleanupFileName@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_8
LBB0_14:
	movq	_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_16
## %bb.15:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	callq	_fflush
LBB0_16:
	movl	$3, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_WALFilePath,4,2                ## @WALFilePath
	.comm	_stat_buf,4,2                   ## @stat_buf
	.comm	_WalSegSz,4,2                   ## @WalSegSz
	.comm	_nextWALFileName,4,2            ## @nextWALFileName
	.comm	_need_cleanup,8,3               ## @need_cleanup
	.comm	_debug,8,3                      ## @debug
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WAL segment size:     %d \n"

L_.str.1:                               ## @.str.1
	.asciz	"Keep archive history: "

L_.str.2:                               ## @.str.2
	.asciz	"%s and later\n"

	.comm	_exclusiveCleanupFileName,8,3   ## @exclusiveCleanupFileName
L_.str.3:                               ## @.str.3
	.asciz	"no cleanup required\n"

	.comm	_XLOG_DATA,4,2                  ## @XLOG_DATA
	.comm	_nextWALFileType,4,2            ## @nextWALFileType
L_.str.4:                               ## @.str.4
	.asciz	"file size greater than expected\n"

	.comm	_sleeptime,8,3                  ## @sleeptime
	.no_dead_strip	_CustomizableNextWALFileReady
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CustomizableNextWALFileReady
_CustomizableNextWALFileReady:          ; @CustomizableNextWALFileReady
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
Lloh0:
	adrp	x8, _WALFilePath@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WALFilePath@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x19, _stat_buf@GOTPAGE
Lloh4:
	ldr	x19, [x19, _stat_buf@GOTPAGEOFF]
	mov	x1, x19
	bl	_stat
	cbnz	x0, LBB0_4
; %bb.1:
Lloh5:
	adrp	x21, _WalSegSz@GOTPAGE
Lloh6:
	ldr	x21, [x21, _WalSegSz@GOTPAGEOFF]
	ldr	w8, [x21]
	cmn	w8, #1
	b.eq	LBB0_7
LBB0_2:
	ldr	w8, [x21]
	ldr	w9, [x19]
	cmp	w8, #1
	ccmp	w9, w8, #0, ge
	b.eq	LBB0_6
; %bb.3:
	cmp	w8, #1
	ccmp	w9, w8, #4, ge
	b.gt	LBB0_14
LBB0_4:
	mov	w0, #0
LBB0_5:
	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
	add	sp, sp, #80
	ret
LBB0_6:
Lloh7:
	adrp	x8, _XLOG_DATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _XLOG_DATA@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _nextWALFileType@GOTPAGE
Lloh11:
	ldr	x9, [x9, _nextWALFileType@GOTPAGEOFF]
Lloh12:
	str	w8, [x9]
	mov	w0, #1
	b	LBB0_5
LBB0_7:
Lloh13:
	adrp	x8, _nextWALFileName@GOTPAGE
Lloh14:
	ldr	x8, [x8, _nextWALFileName@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_IsXLogFileName
	cbz	x0, LBB0_2
; %bb.8:
	bl	_SetWALSegSize
	cbz	x0, LBB0_2
; %bb.9:
	bl	_SetWALFileNameForCleanup
Lloh16:
	adrp	x22, _need_cleanup@GOTPAGE
Lloh17:
	ldr	x22, [x22, _need_cleanup@GOTPAGEOFF]
	str	x0, [x22]
Lloh18:
	adrp	x8, _debug@GOTPAGE
Lloh19:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.10:
Lloh21:
	adrp	x23, _stderr@GOTPAGE
Lloh22:
	ldr	x23, [x23, _stderr@GOTPAGEOFF]
	ldr	w20, [x23]
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	mov	x1, x0
	ldr	w8, [x21]
	str	x8, [sp]
	mov	x0, x20
	bl	_fprintf
	ldr	w0, [x23]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	x8, [x22]
	ldr	w0, [x23]
	cbz	x8, LBB0_12
; %bb.11:
Lloh27:
	adrp	x8, _exclusiveCleanupFileName@GOTPAGE
Lloh28:
	ldr	x8, [x8, _exclusiveCleanupFileName@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	str	x8, [sp]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh32:
	adrp	x1, l_.str.3@PAGE
Lloh33:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_13:
	bl	_fprintf
	b	LBB0_2
LBB0_14:
Lloh34:
	adrp	x8, _debug@GOTPAGE
Lloh35:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.15:
Lloh37:
	adrp	x19, _stderr@GOTPAGE
Lloh38:
	ldr	x19, [x19, _stderr@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh39:
	adrp	x1, l_.str.4@PAGE
Lloh40:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
	ldr	w0, [x19]
	bl	_fflush
LBB0_16:
	mov	w0, #3
	bl	_exit
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_WALFilePath,4,2                ; @WALFilePath
	.comm	_stat_buf,4,2                   ; @stat_buf
	.comm	_WalSegSz,4,2                   ; @WalSegSz
	.comm	_nextWALFileName,4,2            ; @nextWALFileName
	.comm	_need_cleanup,8,3               ; @need_cleanup
	.comm	_debug,8,3                      ; @debug
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WAL segment size:     %d \n"

l_.str.1:                               ; @.str.1
	.asciz	"Keep archive history: "

l_.str.2:                               ; @.str.2
	.asciz	"%s and later\n"

	.comm	_exclusiveCleanupFileName,8,3   ; @exclusiveCleanupFileName
l_.str.3:                               ; @.str.3
	.asciz	"no cleanup required\n"

	.comm	_XLOG_DATA,4,2                  ; @XLOG_DATA
	.comm	_nextWALFileType,4,2            ; @nextWALFileType
l_.str.4:                               ; @.str.4
	.asciz	"file size greater than expected\n"

	.comm	_sleeptime,8,3                  ; @sleeptime
	.no_dead_strip	_CustomizableNextWALFileReady
.subsections_via_symbols
