	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btt_freelist_init
_btt_freelist_init:                     ## @btt_freelist_init
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	(%rdi), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	cmpq	$0, (%r13)
	je	LBB0_16
## %bb.2:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	addq	$24, %r15
	cmpq	(%r13), %rbx
	jae	LBB0_16
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_LOG_NEW_ENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	leaq	-56(%rbp), %rdx
	callq	_btt_log_read
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-48(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, %edi
	callq	_ent_lba
	movq	%rax, %r12
	movl	-56(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, %edi
	callq	_ent_lba
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	$1, %eax
	subl	%r14d, %eax
	movq	8(%r13), %rcx
	movl	%eax, (%rcx,%r15)
	movl	-44(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, %edi
	callq	_nd_inc_seq
	movq	8(%r13), %rcx
	movl	%eax, 20(%rcx,%r15)
	movq	%r12, 8(%rcx,%r15)
	movl	-48(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, %edi
	callq	_ent_e_flag
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-48(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, %edi
	callq	_ent_normal
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r13), %rax
	movl	$1, 16(%rax,%r15)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_arena_clear_freelist_error
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	callq	_to_dev
	movl	%eax, %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err_ratelimited
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	-64(%rbp), %r12                 ## 8-byte Folded Reload
	je	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-52(%rbp), %edi
	callq	_le32_to_cpu
	movq	%r13, %rdi
	movl	%eax, %esi
	leaq	-72(%rbp), %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_btt_map_read
	testl	%eax, %eax
	jne	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-72(%rbp), %rax
	cmpq	%rax, -64(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_3
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rax, %r12
	jne	LBB0_3
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-52(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, %r14d
	movl	-56(%rbp), %edi
	callq	_le32_to_cpu
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_btt_map_write
	testl	%eax, %eax
	je	LBB0_3
LBB0_18:
	movl	%eax, %r14d
	jmp	LBB0_17
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_17
LBB0_16:
	xorl	%r14d, %r14d
LBB0_17:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_LOG_NEW_ENT,4,2                ## @LOG_NEW_ENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to clear known errors\n"

	.no_dead_strip	_btt_freelist_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btt_freelist_init
_btt_freelist_init:                     ; @btt_freelist_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_15
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_16
; %bb.2:
	mov	x25, #0
	mov	x20, #0
Lloh3:
	adrp	x26, _LOG_NEW_ENT@GOTPAGE
Lloh4:
	ldr	x26, [x26, _LOG_NEW_ENT@GOTPAGEOFF]
	mov	w27, #1
Lloh5:
	adrp	x21, l_.str@PAGE
Lloh6:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	ldr	x8, [x19]
	add	x25, x25, #24
	cmp	x20, x8
	b.hs	LBB0_16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x26]
	add	x2, sp, #16
	mov	x0, x19
	mov	x1, x20
	bl	_btt_log_read
	mov	x24, x0
	tbnz	w0, #31, LBB0_17
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [sp, #24]
	bl	_le32_to_cpu
	bl	_ent_lba
	mov	x22, x0
	ldr	w0, [sp, #16]
	bl	_le32_to_cpu
	bl	_ent_lba
	mov	x23, x0
	sub	w8, w27, w24
	ldr	x9, [x19, #8]
	str	w8, [x9, x25]
	ldr	w0, [sp, #28]
	bl	_le32_to_cpu
	bl	_nd_inc_seq
	ldr	x8, [x19, #8]
	add	x8, x8, x25
	str	w0, [x8, #20]
	str	x22, [x8, #8]
	ldr	w0, [sp, #24]
	bl	_le32_to_cpu
	bl	_ent_e_flag
	cbz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [sp, #24]
	bl	_le32_to_cpu
	bl	_ent_normal
	cbnz	w0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x25
	str	w27, [x8, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_arena_clear_freelist_error
	cbz	w0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_to_dev
	mov	x1, x21
	bl	_dev_err_ratelimited
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	x22, x23
	b.eq	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [sp, #20]
	bl	_le32_to_cpu
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x19
	mov	x3, #0
	mov	x4, #0
	mov	w5, #0
	bl	_btt_map_read
	cbnz	w0, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #8]
	cmp	x23, x8
	b.eq	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	x22, x8
	b.ne	LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [sp, #20]
	bl	_le32_to_cpu
	mov	x22, x0
	ldr	w0, [sp, #16]
	bl	_le32_to_cpu
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_btt_map_write
	cbz	w0, LBB0_3
LBB0_14:
	mov	x24, x0
	b	LBB0_17
LBB0_15:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_17
LBB0_16:
	mov	w24, #0
LBB0_17:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_LOG_NEW_ENT,4,2                ; @LOG_NEW_ENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to clear known errors\n"

	.no_dead_strip	_btt_freelist_init
.subsections_via_symbols
