	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XLogReadRecord                 ## -- Begin function XLogReadRecord
	.p2align	4, 0x90
_XLogReadRecord:                        ## @XLogReadRecord
	.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
	movq	%rdx, %r12
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	$0, (%rdx)
	movq	(%rdi), %rax
	movb	$0, (%rax)
	callq	_ResetDecoder
	movq	_InvalidXLogRecPtr@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_2
## %bb.1:
	xorl	%ecx, %ecx
	cmpl	%ebx, 12(%r13)
	movl	8(%r13), %ebx
	sete	%cl
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
LBB0_2:
	movl	%ebx, %edi
	callq	_XRecOffIsValid
	movl	%eax, %edi
	callq	_Assert
	movl	$1, -56(%rbp)                   ## 4-byte Folded Spill
LBB0_3:
	movl	%ebx, 16(%r13)
	movq	_XLOG_BLCKSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %eax
	cltd
	idivl	%esi
	movl	%edx, %r14d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	subl	%edx, %ebx
	movq	_SizeOfXLogRecord@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	addl	%edx, %edi
	callq	_Min
	movq	%r13, %rdi
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_ReadPageInternal
	testl	%eax, %eax
	js	LBB0_47
## %bb.4:
	movl	%eax, %ebx
	movq	24(%r13), %rdi
	callq	_XLogPageHeaderSize
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.9:
	cmpl	%eax, %r14d
	jge	LBB0_6
## %bb.10:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_11
LBB0_5:
	addl	%eax, -44(%rbp)                 ## 4-byte Folded Spill
	movl	%eax, %r14d
LBB0_6:
	movq	24(%r13), %rcx
	movq	_XLP_FIRST_IS_CONTRECORD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	je	LBB0_12
## %bb.7:
	cmpl	%eax, %r14d
	jne	LBB0_12
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
LBB0_11:
	movq	%r13, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_report_invalid_record
LBB0_47:
	movq	%r13, %rdi
	callq	_XLogReaderInvalReadState
	movq	(%r13), %rax
	cmpb	$0, (%rax)
	je	LBB0_49
## %bb.48:
	movq	%rax, (%r12)
LBB0_49:
	xorl	%ebx, %ebx
LBB0_50:
	movq	%rbx, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%edi, %edi
	cmpl	%ebx, %eax
	setle	%dil
	callq	_Assert
	movq	24(%r13), %rdi
	movq	_XLOG_BLCKSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %eax
	cltd
	idivl	%esi
	movslq	%edx, %rax
	leaq	(%rdi,%rax), %rcx
	movl	(%rdi,%rax), %r9d
	movl	(%r15), %r8d
	movl	%esi, %eax
	subl	%r8d, %eax
	cmpl	%eax, %r14d
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	jle	LBB0_13
## %bb.15:
	cmpl	%r8d, %r9d
	jge	LBB0_16
## %bb.46:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_report_invalid_record
	jmp	LBB0_47
LBB0_13:
	movl	12(%r13), %edx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	%rcx, %r15
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	callq	_ValidXLogRecordHeader
	testl	%eax, %eax
	je	LBB0_47
## %bb.14:
	movq	_XLOG_BLCKSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %eax
	cltd
	idivl	%esi
	movl	$1, %eax
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	movq	%r15, %rcx
	jmp	LBB0_17
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	movl	%esi, %r15d
	subl	%edx, %r15d
	cmpl	%r15d, %r9d
	jle	LBB0_39
## %bb.18:
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	cmpl	32(%r13), %r9d
	jle	LBB0_21
## %bb.19:
	movq	%r13, %rdi
	movl	%r9d, %esi
	movl	%r9d, %r14d
	callq	_allocate_recordbuf
	testl	%eax, %eax
	je	LBB0_25
## %bb.20:
	movl	%ebx, %eax
	cltd
	movq	_XLOG_BLCKSZ@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
LBB0_21:
	movq	40(%r13), %rdi
	movslq	%edx, %rsi
	addq	24(%r13), %rsi
	movq	%r15, %r14
	movl	%r14d, %edx
	callq	_memcpy
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movslq	%r14d, %rax
	addq	40(%r13), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_34:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_35
LBB0_36:                                ##   in Loop: Header=BB0_22 Depth=1
	movslq	%r15d, %rax
	addq	%rax, -80(%rbp)                 ## 8-byte Folded Spill
	addl	%r15d, %r14d
	movl	$1, -60(%rbp)                   ## 4-byte Folded Spill
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	cmpl	%edi, %r14d
	jge	LBB0_37
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	_XLOG_BLCKSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	addl	%esi, %ebx
	subl	%r14d, %edi
	movq	_SizeOfXLogShortPHD@GOTPCREL(%rip), %rax
	addl	(%rax), %edi
	callq	_Min
	movq	%r13, %rdi
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_ReadPageInternal
	testl	%eax, %eax
	js	LBB0_47
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	movl	%eax, %ebx
	xorl	%edi, %edi
	movq	_SizeOfXLogShortPHD@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	setle	%dil
	callq	_Assert
	movq	24(%r13), %rdi
	movq	_XLP_FIRST_IS_CONTRECORD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_24
## %bb.27:                              ##   in Loop: Header=BB0_22 Depth=1
	movl	4(%rdi), %edx
	testl	%edx, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_22 Depth=1
	leal	(%rdx,%r14), %eax
	cmpl	%eax, %ecx
	jne	LBB0_29
## %bb.30:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_XLogPageHeaderSize
	movl	%eax, %r14d
	cmpl	%eax, %ebx
	jge	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	callq	_ReadPageInternal
	movl	%eax, %ebx
LBB0_32:                                ##   in Loop: Header=BB0_22 Depth=1
	xorl	%edi, %edi
	cmpl	%ebx, %r14d
	setle	%dil
	callq	_Assert
	movslq	%r14d, %r12
	addq	24(%r13), %r12
	movq	_XLOG_BLCKSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	subl	%r14d, %r15d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %eax
	cmpl	%r15d, %eax
	cmovll	%eax, %r15d
	addl	%r15d, %r14d
	cmpl	%r14d, %ebx
	jge	LBB0_34
## %bb.33:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	callq	_ReadPageInternal
	jmp	LBB0_34
LBB0_35:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	40(%r13), %rcx
	movl	12(%r13), %edx
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	callq	_ValidXLogRecordHeader
	testl	%eax, %eax
	jne	LBB0_36
	jmp	LBB0_47
LBB0_39:
	movq	%rcx, %rbx
	addl	%r9d, %r14d
	movl	%r14d, %edi
	callq	_Min
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_ReadPageInternal
	testl	%eax, %eax
	js	LBB0_47
## %bb.40:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_ValidXLogRecord
	testl	%eax, %eax
	je	LBB0_47
## %bb.41:
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_MAXALIGN
                                        ## kill: def $eax killed $eax def $rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addl	%ecx, %eax
	movl	%eax, 8(%r13)
	movl	%ecx, 12(%r13)
	jmp	LBB0_42
LBB0_25:
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	movl	%ebx, %r8d
	jmp	LBB0_26
LBB0_24:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_11
LBB0_29:
	leaq	L_.str.5(%rip), %rsi
	movq	%r13, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
LBB0_26:
	xorl	%eax, %eax
	callq	_report_invalid_record
	jmp	LBB0_47
LBB0_37:
	movl	$1, %edi
	callq	_Assert
	movq	40(%r13), %rsi
	movq	%r13, %rdi
	movq	%rsi, %rbx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_ValidXLogRecord
	testl	%eax, %eax
	je	LBB0_47
## %bb.38:
	movq	24(%r13), %rdi
	callq	_XLogPageHeaderSize
	movl	%eax, %r14d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 12(%r13)
	addl	-48(%rbp), %r14d                ## 4-byte Folded Reload
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	callq	_MAXALIGN
                                        ## kill: def $eax killed $eax def $rax
	addl	%r14d, %eax
	movl	%eax, 8(%r13)
LBB0_42:
	movq	%rbx, %rsi
	movq	8(%rbx), %rcx
	movq	_RM_XLOG_ID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_45
## %bb.43:
	movq	_XLR_INFO_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	16(%rsi), %ecx
	movq	_XLOG_SWITCH@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_45
## %bb.44:
	movl	48(%r13), %esi
	leal	(%rsi,%rax), %edi
	decl	%edi
	movl	%edi, 8(%r13)
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_XLogSegmentOffset
	movq	%rbx, %rsi
	subl	%eax, 8(%r13)
LBB0_45:
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_DecodeXLogRecord
	testq	%rax, %rax
	cmoveq	%rax, %rbx
	jmp	LBB0_50
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidXLogRecPtr,4,2          ## @InvalidXLogRecPtr
	.comm	_XLOG_BLCKSZ,4,2                ## @XLOG_BLCKSZ
	.comm	_SizeOfXLogRecord,4,2           ## @SizeOfXLogRecord
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid record offset at %X/%X"

	.comm	_XLP_FIRST_IS_CONTRECORD,4,2    ## @XLP_FIRST_IS_CONTRECORD
L_.str.1:                               ## @.str.1
	.asciz	"contrecord is requested by %X/%X"

L_.str.2:                               ## @.str.2
	.asciz	"invalid record length at %X/%X: wanted %u, got %u"

L_.str.3:                               ## @.str.3
	.asciz	"record length %u at %X/%X too long"

	.comm	_SizeOfXLogShortPHD,4,2         ## @SizeOfXLogShortPHD
L_.str.4:                               ## @.str.4
	.asciz	"there is no contrecord flag at %X/%X"

L_.str.5:                               ## @.str.5
	.asciz	"invalid contrecord length %u at %X/%X"

	.comm	_RM_XLOG_ID,8,3                 ## @RM_XLOG_ID
	.comm	_XLR_INFO_MASK,4,2              ## @XLR_INFO_MASK
	.comm	_XLOG_SWITCH,4,2                ## @XLOG_SWITCH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XLogReadRecord                 ; -- Begin function XLogReadRecord
	.p2align	2
_XLogReadRecord:                        ; @XLogReadRecord
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	str	xzr, [x2]
	ldr	x8, [x0]
	strb	wzr, [x8]
	bl	_ResetDecoder
Lloh0:
	adrp	x8, _InvalidXLogRecPtr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _InvalidXLogRecPtr@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	str	x19, [sp, #40]                  ; 8-byte Folded Spill
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x20, #12]
	cmp	w8, w21
	ldr	w8, [x20, #8]
	cset	w9, eq
	str	w9, [sp, #36]                   ; 4-byte Folded Spill
	mov	x21, x8
	b	LBB0_3
LBB0_2:
	mov	x0, x21
	bl	_XRecOffIsValid
	bl	_Assert
	mov	w8, #1
	str	w8, [sp, #36]                   ; 4-byte Folded Spill
LBB0_3:
	str	w21, [x20, #16]
Lloh3:
	adrp	x8, _XLOG_BLCKSZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XLOG_BLCKSZ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	sdiv	w8, w21, w1
	mul	w22, w8, w1
Lloh6:
	adrp	x24, _SizeOfXLogRecord@GOTPAGE
Lloh7:
	ldr	x24, [x24, _SizeOfXLogRecord@GOTPAGEOFF]
	ldr	w8, [x24]
	sub	w23, w21, w22
	add	w0, w8, w23
	bl	_Min
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_ReadPageInternal
	tbnz	w0, #31, LBB0_16
; %bb.4:
	mov	x19, x0
	ldr	x0, [x20, #24]
	bl	_XLogPageHeaderSize
	cbz	w23, LBB0_7
; %bb.5:
	cmp	w23, w0
	b.ge	LBB0_8
; %bb.6:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_14
LBB0_7:
	add	w21, w0, w21
	mov	x23, x0
LBB0_8:
	ldr	x8, [x20, #24]
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _XLP_FIRST_IS_CONTRECORD@GOTPAGE
Lloh11:
	ldr	x9, [x9, _XLP_FIRST_IS_CONTRECORD@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
	cmp	w23, w0
	b.ne	LBB0_11
; %bb.10:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_11:
	cmp	w0, w19
	cset	w0, le
	bl	_Assert
	ldr	x9, [x20, #24]
Lloh15:
	adrp	x8, _XLOG_BLCKSZ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _XLOG_BLCKSZ@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	sdiv	w8, w21, w1
	msub	w8, w8, w1, w21
	add	x26, x9, w8, sxtw
	ldr	w19, [x26]
	ldr	w9, [x24]
	sub	w10, w1, w9
	cmp	w23, w10
	b.le	LBB0_20
; %bb.12:
	cmp	w19, w9
	b.ge	LBB0_22
; %bb.13:
	stp	x9, x19, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_14:
	mov	x0, x20
	mov	x3, x21
                                        ; implicit-def: $w2
LBB0_15:
	bl	_report_invalid_record
LBB0_16:
	mov	x0, x20
	bl	_XLogReaderInvalReadState
	ldr	x8, [x20]
	ldrb	w9, [x8]
	cbz	w9, LBB0_18
; %bb.17:
	mov	x0, #0
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	str	x8, [x9]
	b	LBB0_19
LBB0_18:
	mov	x0, #0
LBB0_19:
	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
LBB0_20:
	ldr	w2, [x20, #12]
	mov	x0, x20
	mov	x1, x21
	mov	x3, x26
	ldr	w4, [sp, #36]                   ; 4-byte Folded Reload
	bl	_ValidXLogRecordHeader
	cbz	w0, LBB0_16
; %bb.21:
Lloh20:
	adrp	x8, _XLOG_BLCKSZ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _XLOG_BLCKSZ@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	sdiv	w8, w21, w1
	msub	w8, w8, w1, w21
	mov	w24, #1
	b	LBB0_23
LBB0_22:
	mov	w24, #0
LBB0_23:
	sub	w25, w1, w8
	cmp	w19, w25
	b.le	LBB0_38
; %bb.24:
	ldr	w9, [x20, #32]
	cmp	w19, w9
	b.le	LBB0_27
; %bb.25:
	mov	x0, x20
	mov	x1, x19
	bl	_allocate_recordbuf
	cbz	w0, LBB0_41
; %bb.26:
Lloh23:
	adrp	x8, _XLOG_BLCKSZ@GOTPAGE
Lloh24:
	ldr	x8, [x8, _XLOG_BLCKSZ@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	sdiv	w9, w21, w8
	msub	w8, w9, w8, w21
LBB0_27:
	ldr	x0, [x20, #40]
	ldr	x9, [x20, #24]
	add	x1, x9, w8, sxtw
	mov	x2, x25
	bl	_memcpy
	ldr	x8, [x20, #40]
	add	x26, x8, w25, sxtw
	str	x19, [sp, #24]                  ; 8-byte Folded Spill
	b	LBB0_30
LBB0_28:                                ;   in Loop: Header=BB0_30 Depth=1
	add	x1, x24, w19, sxtw
	mov	x0, x26
	mov	x2, x23
	bl	_memcpy
	ldr	x19, [sp, #24]                  ; 8-byte Folded Reload
	ldr	w8, [sp, #32]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_37
LBB0_29:                                ;   in Loop: Header=BB0_30 Depth=1
	mov	w24, #1
	add	w25, w23, w25
	cmp	w25, w19
	add	x26, x26, w23, sxtw
	b.ge	LBB0_45
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
Lloh26:
	adrp	x8, _XLOG_BLCKSZ@GOTPAGE
Lloh27:
	ldr	x8, [x8, _XLOG_BLCKSZ@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	add	w22, w1, w22
Lloh29:
	adrp	x8, _SizeOfXLogShortPHD@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SizeOfXLogShortPHD@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	sub	w9, w19, w25
	add	w0, w9, w8
	bl	_Min
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_ReadPageInternal
	tbnz	w0, #31, LBB0_16
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=1
	mov	x28, x0
Lloh32:
	adrp	x8, _SizeOfXLogShortPHD@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SizeOfXLogShortPHD@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmp	w8, w0
	cset	w0, le
	bl	_Assert
	ldr	x27, [x20, #24]
	ldr	w8, [x27]
Lloh35:
	adrp	x9, _XLP_FIRST_IS_CONTRECORD@GOTPAGE
Lloh36:
	ldr	x9, [x9, _XLP_FIRST_IS_CONTRECORD@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_42
; %bb.32:                               ;   in Loop: Header=BB0_30 Depth=1
	ldr	w2, [x27, #4]
	add	w8, w2, w25
	cmp	w2, #0
	ccmp	w19, w8, #0, ne
	b.ne	LBB0_43
; %bb.33:                               ;   in Loop: Header=BB0_30 Depth=1
	str	w24, [sp, #32]                  ; 4-byte Folded Spill
	mov	x0, x27
	bl	_XLogPageHeaderSize
	mov	x19, x0
	cmp	w28, w0
	b.ge	LBB0_35
; %bb.34:                               ;   in Loop: Header=BB0_30 Depth=1
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	bl	_ReadPageInternal
	mov	x28, x0
LBB0_35:                                ;   in Loop: Header=BB0_30 Depth=1
	cmp	w19, w28
	cset	w0, le
	bl	_Assert
	ldr	x24, [x20, #24]
Lloh38:
	adrp	x8, _XLOG_BLCKSZ@GOTPAGE
Lloh39:
	ldr	x8, [x8, _XLOG_BLCKSZ@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	ldr	w9, [x27, #4]
	sub	w8, w8, w19
	cmp	w9, w8
	csel	w23, w9, w8, lt
	add	w2, w23, w19
	cmp	w28, w2
	b.ge	LBB0_28
; %bb.36:                               ;   in Loop: Header=BB0_30 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_ReadPageInternal
	b	LBB0_28
LBB0_37:                                ;   in Loop: Header=BB0_30 Depth=1
	ldr	x3, [x20, #40]
	ldr	w2, [x20, #12]
	mov	x0, x20
	mov	x1, x21
	ldr	w4, [sp, #36]                   ; 4-byte Folded Reload
	bl	_ValidXLogRecordHeader
	cbnz	w0, LBB0_29
	b	LBB0_16
LBB0_38:
	add	w0, w19, w23
	bl	_Min
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_ReadPageInternal
	tbnz	w0, #31, LBB0_16
; %bb.39:
	mov	x0, x20
	mov	x1, x26
	mov	x2, x21
	bl	_ValidXLogRecord
	cbz	w0, LBB0_16
; %bb.40:
	mov	x0, x19
	bl	_MAXALIGN
	add	w8, w0, w21
	stp	w8, w21, [x20, #8]
	b	LBB0_47
LBB0_41:
	str	x21, [sp]
Lloh41:
	adrp	x1, l_.str.3@PAGE
Lloh42:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	b	LBB0_44
LBB0_42:
Lloh43:
	adrp	x1, l_.str.4@PAGE
Lloh44:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_43:
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh45:
	adrp	x1, l_.str.5@PAGE
Lloh46:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
LBB0_44:
                                        ; implicit-def: $w3
	b	LBB0_15
LBB0_45:
	mov	w0, #1
	bl	_Assert
	ldr	x26, [x20, #40]
	mov	x0, x20
	mov	x1, x26
	mov	x2, x21
	bl	_ValidXLogRecord
	cbz	w0, LBB0_16
; %bb.46:
	ldr	x0, [x20, #24]
	bl	_XLogPageHeaderSize
	str	w21, [x20, #12]
	add	w19, w0, w22
	ldr	w0, [x27, #4]
	bl	_MAXALIGN
	add	w8, w19, w0
	str	w8, [x20, #8]
LBB0_47:
	ldr	x9, [x26, #8]
Lloh47:
	adrp	x10, _RM_XLOG_ID@GOTPAGE
Lloh48:
	ldr	x10, [x10, _RM_XLOG_ID@GOTPAGEOFF]
Lloh49:
	ldr	x10, [x10]
	cmp	x9, x10
	ldr	x19, [sp, #40]                  ; 8-byte Folded Reload
	b.ne	LBB0_50
; %bb.48:
	ldr	w9, [x26, #16]
Lloh50:
	adrp	x10, _XLR_INFO_MASK@GOTPAGE
Lloh51:
	ldr	x10, [x10, _XLR_INFO_MASK@GOTPAGEOFF]
Lloh52:
	ldr	w10, [x10]
	bic	w9, w9, w10
Lloh53:
	adrp	x10, _XLOG_SWITCH@GOTPAGE
Lloh54:
	ldr	x10, [x10, _XLOG_SWITCH@GOTPAGEOFF]
Lloh55:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_50
; %bb.49:
	ldr	w1, [x20, #48]
	add	w8, w1, w8
	sub	w0, w8, #1
	str	w0, [x20, #8]
	bl	_XLogSegmentOffset
	ldr	w8, [x20, #8]
	sub	w8, w8, w0
	str	w8, [x20, #8]
LBB0_50:
	mov	x0, x20
	mov	x1, x26
	mov	x2, x19
	bl	_DecodeXLogRecord
	cmp	x0, #0
	csel	x0, xzr, x26, eq
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidXLogRecPtr,4,2          ; @InvalidXLogRecPtr
	.comm	_XLOG_BLCKSZ,4,2                ; @XLOG_BLCKSZ
	.comm	_SizeOfXLogRecord,4,2           ; @SizeOfXLogRecord
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid record offset at %X/%X"

	.comm	_XLP_FIRST_IS_CONTRECORD,4,2    ; @XLP_FIRST_IS_CONTRECORD
l_.str.1:                               ; @.str.1
	.asciz	"contrecord is requested by %X/%X"

l_.str.2:                               ; @.str.2
	.asciz	"invalid record length at %X/%X: wanted %u, got %u"

l_.str.3:                               ; @.str.3
	.asciz	"record length %u at %X/%X too long"

	.comm	_SizeOfXLogShortPHD,4,2         ; @SizeOfXLogShortPHD
l_.str.4:                               ; @.str.4
	.asciz	"there is no contrecord flag at %X/%X"

l_.str.5:                               ; @.str.5
	.asciz	"invalid contrecord length %u at %X/%X"

	.comm	_RM_XLOG_ID,8,3                 ; @RM_XLOG_ID
	.comm	_XLR_INFO_MASK,4,2              ; @XLR_INFO_MASK
	.comm	_XLOG_SWITCH,4,2                ; @XLOG_SWITCH
.subsections_via_symbols
