	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ValidXLogRecordHeader
_ValidXLogRecordHeader:                 ## @ValidXLogRecordHeader
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rcx), %r9
	movq	_SizeOfXLogRecord@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %r9
	jge	LBB0_2
## %bb.1:
	movslq	%esi, %rcx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rax, %r8
LBB0_8:
	xorl	%eax, %eax
	callq	_report_invalid_record
	jmp	LBB0_9
LBB0_2:
	movq	8(%rcx), %rax
	movq	_RM_MAX_ID@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jle	LBB0_4
## %bb.3:
	movslq	%esi, %r8
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_report_invalid_record
	jmp	LBB0_9
LBB0_4:
	movslq	16(%rcx), %rcx
	movl	$1, %ebx
	testl	%r8d, %r8d
	je	LBB0_6
## %bb.5:
	cmpl	%esi, %ecx
	jge	LBB0_7
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	cmpl	%edx, %ecx
	je	LBB0_9
LBB0_7:
	movslq	%esi, %r9
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
                                        ## implicit-def: $r8
                                        ## implicit-def: $r8d
                                        ## implicit-def: $r8w
                                        ## implicit-def: $r8b
                                        ## implicit-def: $r8bh
                                        ## implicit-def: $r8wh
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_SizeOfXLogRecord,8,3           ## @SizeOfXLogRecord
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid record length at %X/%X: wanted %u, got %u"

	.comm	_RM_MAX_ID,8,3                  ## @RM_MAX_ID
L_.str.1:                               ## @.str.1
	.asciz	"invalid resource manager ID %u at %X/%X"

L_.str.2:                               ## @.str.2
	.asciz	"record with incorrect prev-link %X/%X at %X/%X"

	.no_dead_strip	_ValidXLogRecordHeader
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ValidXLogRecordHeader
_ValidXLogRecordHeader:                 ; @ValidXLogRecordHeader
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
                                        ; kill: def $w1 killed $w1 def $x1
	ldr	x9, [x3]
Lloh0:
	adrp	x8, _SizeOfXLogRecord@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SizeOfXLogRecord@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, x8
	b.ge	LBB0_2
; %bb.1:
	sxtw	x3, w1
	str	x9, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x4, x8
                                        ; implicit-def: $x2
	b	LBB0_9
LBB0_2:
	ldr	x8, [x3, #8]
Lloh5:
	adrp	x9, _RM_MAX_ID@GOTPAGE
Lloh6:
	ldr	x9, [x9, _RM_MAX_ID@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_4
; %bb.3:
                                        ; kill: def $w1 killed $w1 killed $x1 def $x1
	sxtw	x4, w1
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x8
                                        ; implicit-def: $x3
	b	LBB0_9
LBB0_4:
	ldrsw	x3, [x3, #16]
	cbz	w4, LBB0_7
; %bb.5:
	cmp	w3, w1
	b.ge	LBB0_8
LBB0_6:
	mov	w0, #1
	b	LBB0_10
LBB0_7:
	cmp	w3, w2
	b.eq	LBB0_6
LBB0_8:
                                        ; kill: def $w1 killed $w1 killed $x1 def $x1
	sxtw	x8, w1
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
                                        ; implicit-def: $x2
                                        ; implicit-def: $w2
                                        ; implicit-def: $x4
                                        ; implicit-def: $w4
LBB0_9:
	bl	_report_invalid_record
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SizeOfXLogRecord,8,3           ; @SizeOfXLogRecord
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid record length at %X/%X: wanted %u, got %u"

	.comm	_RM_MAX_ID,8,3                  ; @RM_MAX_ID
l_.str.1:                               ; @.str.1
	.asciz	"invalid resource manager ID %u at %X/%X"

l_.str.2:                               ; @.str.2
	.asciz	"record with incorrect prev-link %X/%X at %X/%X"

	.no_dead_strip	_ValidXLogRecordHeader
.subsections_via_symbols
