	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function XLogRecPtrToBytePos
_XLogRecPtrToBytePos:                   ## @XLogRecPtrToBytePos
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	_wal_segment_size@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	callq	_XLByteToSeg
	movl	(%rbx), %esi
	movl	%r14d, %edi
	callq	_XLogSegmentOffset
	movq	_XLOG_BLCKSZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cltd
	idivl	%ecx
	movl	%eax, %ebx
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	movl	%edx, %r14d
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.4:
	movq	_SizeOfXLogLongPHD@GOTPCREL(%rip), %rax
	subl	(%rax), %ecx
	decl	%ebx
	movq	_UsableBytesInPage@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	addl	%ecx, %ebx
	testl	%r14d, %r14d
	jle	LBB0_6
## %bb.5:
	movq	_SizeOfXLogShortPHD@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpl	(%r15), %r14d
	setge	%dil
	callq	_Assert
	addl	%r14d, %ebx
	subl	(%r15), %ebx
	jmp	LBB0_6
LBB0_1:
	testl	%r14d, %r14d
	jle	LBB0_2
## %bb.3:
	movq	_SizeOfXLogLongPHD@GOTPCREL(%rip), %rbx
	xorl	%edi, %edi
	cmpl	(%rbx), %r14d
	setge	%dil
	callq	_Assert
	movl	(%rbx), %eax
	subl	%eax, %r14d
	movl	%r14d, %ebx
	jmp	LBB0_6
LBB0_2:
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wal_segment_size,4,2           ## @wal_segment_size
	.comm	_XLOG_BLCKSZ,4,2                ## @XLOG_BLCKSZ
	.comm	_UsableBytesInSegment,4,2       ## @UsableBytesInSegment
	.comm	_SizeOfXLogLongPHD,4,2          ## @SizeOfXLogLongPHD
	.comm	_UsableBytesInPage,4,2          ## @UsableBytesInPage
	.comm	_SizeOfXLogShortPHD,4,2         ## @SizeOfXLogShortPHD
	.no_dead_strip	_XLogRecPtrToBytePos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function XLogRecPtrToBytePos
_XLogRecPtrToBytePos:                   ; @XLogRecPtrToBytePos
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _wal_segment_size@GOTPAGE
Lloh1:
	ldr	x20, [x20, _wal_segment_size@GOTPAGEOFF]
	ldr	w2, [x20]
	bl	_XLByteToSeg
	ldr	w1, [x20]
	mov	x0, x19
	bl	_XLogSegmentOffset
Lloh2:
	adrp	x8, _XLOG_BLCKSZ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XLOG_BLCKSZ@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	sdiv	w9, w0, w8
	sdiv	w10, w19, w8
	msub	w20, w10, w8, w19
	cbz	w9, LBB0_3
; %bb.1:
Lloh5:
	adrp	x10, _SizeOfXLogLongPHD@GOTPAGE
Lloh6:
	ldr	x10, [x10, _SizeOfXLogLongPHD@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	sub	w8, w8, w10
	sub	w9, w9, #1
Lloh8:
	adrp	x10, _UsableBytesInPage@GOTPAGE
Lloh9:
	ldr	x10, [x10, _UsableBytesInPage@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	madd	w19, w10, w9, w8
	cmp	w20, #1
	b.lt	LBB0_6
; %bb.2:
Lloh11:
	adrp	x21, _SizeOfXLogShortPHD@GOTPAGE
Lloh12:
	ldr	x21, [x21, _SizeOfXLogShortPHD@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w20, w8
	cset	w0, ge
	bl	_Assert
	ldr	w8, [x21]
	add	w9, w19, w20
	sub	w19, w9, w8
	b	LBB0_6
LBB0_3:
	cmp	w20, #1
	b.lt	LBB0_5
; %bb.4:
Lloh13:
	adrp	x19, _SizeOfXLogLongPHD@GOTPAGE
Lloh14:
	ldr	x19, [x19, _SizeOfXLogLongPHD@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w20, w8
	cset	w0, ge
	bl	_Assert
	ldr	w8, [x19]
	sub	w19, w20, w8
	b	LBB0_6
LBB0_5:
	mov	w19, #0
LBB0_6:
	mov	x0, x19
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_wal_segment_size,4,2           ; @wal_segment_size
	.comm	_XLOG_BLCKSZ,4,2                ; @XLOG_BLCKSZ
	.comm	_UsableBytesInSegment,4,2       ; @UsableBytesInSegment
	.comm	_SizeOfXLogLongPHD,4,2          ; @SizeOfXLogLongPHD
	.comm	_UsableBytesInPage,4,2          ; @UsableBytesInPage
	.comm	_SizeOfXLogShortPHD,4,2         ; @SizeOfXLogShortPHD
	.no_dead_strip	_XLogRecPtrToBytePos
.subsections_via_symbols
