	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function XLogBytePosToEndRecPtr
_XLogBytePosToEndRecPtr:                ## @XLogBytePosToEndRecPtr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edi, %eax
	movq	_UsableBytesInSegment@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %r8d
	movq	_XLOG_BLCKSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SizeOfXLogLongPHD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%edi, %ecx
	subl	%esi, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jge	LBB0_2
## %bb.1:
	addl	%edx, %esi
	testl	%edx, %edx
	cmovel	%edx, %esi
	jmp	LBB0_5
LBB0_2:
	movq	_UsableBytesInPage@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %esi
	imull	%edi, %esi
	testl	%edx, %edx
	je	LBB0_3
## %bb.4:
	movq	_SizeOfXLogShortPHD@GOTPCREL(%rip), %rax
	addl	%edi, %edx
	addl	%esi, %edx
	addl	(%rax), %edx
	movl	%edx, %esi
	jmp	LBB0_5
LBB0_3:
	addl	%edi, %esi
LBB0_5:
	movq	_wal_segment_size@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r8d, %edi
	popq	%rbp
	jmp	_XLogSegNoOffsetToRecPtr        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_UsableBytesInSegment,4,2       ## @UsableBytesInSegment
	.comm	_XLOG_BLCKSZ,4,2                ## @XLOG_BLCKSZ
	.comm	_SizeOfXLogLongPHD,4,2          ## @SizeOfXLogLongPHD
	.comm	_UsableBytesInPage,4,2          ## @UsableBytesInPage
	.comm	_SizeOfXLogShortPHD,4,2         ## @SizeOfXLogShortPHD
	.comm	_wal_segment_size,4,2           ## @wal_segment_size
	.no_dead_strip	_XLogBytePosToEndRecPtr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function XLogBytePosToEndRecPtr
_XLogBytePosToEndRecPtr:                ; @XLogBytePosToEndRecPtr
	.cfi_startproc
; %bb.0:
	mov	x8, x0
Lloh0:
	adrp	x9, _UsableBytesInSegment@GOTPAGE
Lloh1:
	ldr	x9, [x9, _UsableBytesInSegment@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sdiv	w0, w0, w9
	msub	w9, w0, w9, w8
Lloh3:
	adrp	x8, _XLOG_BLCKSZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XLOG_BLCKSZ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x10, _SizeOfXLogLongPHD@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SizeOfXLogLongPHD@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x10]
	sub	w10, w8, w11
	subs	w10, w9, w10
	b.ge	LBB0_2
; %bb.1:
	add	w8, w11, w9
	cmp	w9, #0
	csel	w1, wzr, w8, eq
	b	LBB0_5
LBB0_2:
Lloh9:
	adrp	x9, _UsableBytesInPage@GOTPAGE
Lloh10:
	ldr	x9, [x9, _UsableBytesInPage@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	sdiv	w11, w10, w9
	msub	w10, w11, w9, w10
	mul	w9, w11, w8
	cbz	w10, LBB0_4
; %bb.3:
Lloh12:
	adrp	x11, _SizeOfXLogShortPHD@GOTPAGE
Lloh13:
	ldr	x11, [x11, _SizeOfXLogShortPHD@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	add	w8, w10, w8
	add	w8, w8, w9
	add	w1, w8, w11
	b	LBB0_5
LBB0_4:
	add	w1, w9, w8
LBB0_5:
Lloh15:
	adrp	x8, _wal_segment_size@GOTPAGE
Lloh16:
	ldr	x8, [x8, _wal_segment_size@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	b	_XLogSegNoOffsetToRecPtr
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_UsableBytesInSegment,4,2       ; @UsableBytesInSegment
	.comm	_XLOG_BLCKSZ,4,2                ; @XLOG_BLCKSZ
	.comm	_SizeOfXLogLongPHD,4,2          ; @SizeOfXLogLongPHD
	.comm	_UsableBytesInPage,4,2          ; @UsableBytesInPage
	.comm	_SizeOfXLogShortPHD,4,2         ; @SizeOfXLogShortPHD
	.comm	_wal_segment_size,4,2           ; @wal_segment_size
	.no_dead_strip	_XLogBytePosToEndRecPtr
.subsections_via_symbols
