	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btt_log_read
_btt_log_read:                          ## @btt_log_read
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r12
	leaq	-48(%rbp), %rdx
	callq	_btt_log_group_read
	testl	%eax, %eax
	jne	LBB0_1
## %bb.2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_btt_log_get_old
	movl	%eax, %r14d
	cmpl	$2, %eax
	jb	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_to_dev
	movq	-48(%rbp), %rcx
	movq	(%r12), %rdx
	movq	(%rdx), %rsi
	movq	8(%rdx), %rdx
	movl	(%rcx,%rsi,4), %r8d
	movl	(%rcx,%rdx,4), %r9d
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	callq	_dev_err
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	$1, %ebx
	subl	%r14d, %ebx
	testl	%r13d, %r13d
	cmovnel	%r14d, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	movq	(%r12), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %rsi
	shlq	$2, %rsi
	addq	-48(%rbp), %rsi
	movq	_LOG_ENT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"log corruption (%d): lane %d seq [%d, %d]\n"

	.comm	_LOG_ENT_SIZE,4,2               ## @LOG_ENT_SIZE
	.no_dead_strip	_btt_log_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btt_log_read
_btt_log_read:                          ; @btt_log_read
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	add	x2, sp, #8
	bl	_btt_log_group_read
	cbnz	w0, LBB0_3
; %bb.1:
	add	x1, sp, #8
	mov	x0, x20
	bl	_btt_log_get_old
	mov	x23, x0
	cmp	w0, #2
	b.lo	LBB0_5
; %bb.2:
	mov	x0, x20
	bl	_to_dev
	ldr	x8, [sp, #8]
	ldr	x9, [x20]
	ldp	x10, x9, [x9]
	ldr	w4, [x8, x10, lsl #2]
	ldr	w5, [x8, x9, lsl #2]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x3, x19
	bl	_dev_err
LBB0_3:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_4:
	mov	x0, x19
	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_5:
	mov	w8, #1
	sub	w8, w8, w23
	cmp	w22, #0
	csel	w19, w8, w23, eq
	cbz	x21, LBB0_4
; %bb.6:
	ldr	x8, [sp, #8]
	ldr	x9, [x20]
	ldr	x9, [x9, w19, uxtw #3]
	add	x1, x8, x9, lsl #2
Lloh5:
	adrp	x8, _LOG_ENT_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LOG_ENT_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_memcpy
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"log corruption (%d): lane %d seq [%d, %d]\n"

	.comm	_LOG_ENT_SIZE,4,2               ; @LOG_ENT_SIZE
	.no_dead_strip	_btt_log_read
.subsections_via_symbols
