	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function discover_arenas
_discover_arenas:                       ## @discover_arenas
	.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, %r14
	movq	(%rdi), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.4:
	leaq	24(%r14), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	xorl	%ecx, %ecx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_alloc_arena
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rbx
	movq	%r13, (%rax)
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_btt_info_read
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	28(%r14), %edi
	movq	%r15, %rsi
	callq	_nd_btt_arena_is_valid
	testl	%eax, %eax
	je	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, 40(%rbx)
	movq	%rbx, %rdi
	movq	%r15, %r14
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_parse_arena_meta
	movq	%rbx, %rdi
	callq	_log_set_indices
	testl	%eax, %eax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_btt_freelist_init
	testl	%eax, %eax
	jne	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_btt_rtt_init
	testl	%eax, %eax
	jne	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_btt_maplocks_init
	testl	%eax, %eax
	movq	%r14, %r15
	jne	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	addq	$32, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add_tail
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	addq	16(%rbx), %r12
	cmpq	$0, 8(%rbx)
	je	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%rbx), %rax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	subq	%rax, %rbx
	addq	%rax, %r13
	testq	%rbx, %rbx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_5
	jmp	LBB0_23
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_27
LBB0_3:
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
LBB0_23:
	movl	%ecx, 8(%r14)
	movq	%r12, 16(%r14)
	movq	_INIT_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	%r15, %rdi
	callq	_kfree
	xorl	%r12d, %r12d
	jmp	LBB0_27
LBB0_15:
	movl	%eax, %r12d
	jmp	LBB0_16
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_26
LBB0_8:
	movl	%eax, %r12d
	jmp	LBB0_25
LBB0_10:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	(%r14), %rax
	jne	LBB0_24
## %bb.11:
	movq	_INIT_NOTFOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	%rbx, %rdi
	callq	_to_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_info
	xorl	%r12d, %r12d
	jmp	LBB0_25
LBB0_13:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_to_dev
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movl	%r15d, %r12d
LBB0_16:
	movq	%r14, %r15
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_19:
	movl	%eax, %r12d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_24:
	movq	%rbx, %rdi
	callq	_to_dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_25:
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r14, %rdi
	callq	_free_arenas
LBB0_26:
	movq	%r15, %rdi
	callq	_kfree
LBB0_27:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_INIT_NOTFOUND,4,2              ## @INIT_NOTFOUND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No existing arenas\n"

L_.str.1:                               ## @.str.1
	.asciz	"Found corrupted metadata!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"Unable to deduce log/padding indices\n"

	.comm	_INIT_READY,4,2                 ## @INIT_READY
	.no_dead_strip	_discover_arenas
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function discover_arenas
_discover_arenas:                       ; @discover_arenas
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
	ldr	x25, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.1:
	mov	x19, x0
	mov	x27, #0
	cbz	x25, LBB0_13
; %bb.2:
	mov	x22, #0
	mov	w26, #0
	add	x23, x20, #24
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	bl	_alloc_arena
	cbz	x0, LBB0_16
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, x0
	str	x22, [x0]
	mov	x1, x19
	bl	_btt_info_read
	cbnz	w0, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x20, #28]
	mov	x1, x19
	bl	_nd_btt_arena_is_valid
	cbz	w0, LBB0_17
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x27, [x21, #40]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_parse_arena_meta
	mov	x0, x21
	bl	_log_set_indices
	cbnz	w0, LBB0_19
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_btt_freelist_init
	cbnz	w0, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_btt_rtt_init
	cbnz	w0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_btt_maplocks_init
	cbnz	w0, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	add	x0, x21, #32
	mov	x1, x23
	bl	_list_add_tail
	ldp	x9, x8, [x21, #8]
	add	x27, x27, x8
	add	w26, w26, #1
	cbz	x9, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21, #24]
	add	x22, x8, x22
	sub	x25, x25, x8
	cbnz	x25, LBB0_3
	b	LBB0_14
LBB0_12:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_23
LBB0_13:
	mov	w26, #0
LBB0_14:
	str	x27, [x20, #16]
Lloh6:
	adrp	x8, _INIT_READY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INIT_READY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	w26, w8, [x20, #8]
	mov	x0, x19
	bl	_kfree
	mov	w24, #0
	b	LBB0_23
LBB0_15:
	mov	x24, x0
	b	LBB0_21
LBB0_16:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_22
LBB0_17:
	ldr	x8, [x20]
	cmp	x25, x8
	b.ne	LBB0_20
; %bb.18:
Lloh12:
	adrp	x8, _INIT_NOTFOUND@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INIT_NOTFOUND@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	mov	x0, x21
	bl	_to_dev
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	mov	w24, #0
	b	LBB0_21
LBB0_19:
	mov	x24, x0
	mov	x0, x21
	bl	_to_dev
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_21
LBB0_20:
	mov	x0, x21
	bl	_to_dev
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh21:
	adrp	x8, _ENODEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_21:
	mov	x0, x21
	bl	_kfree
	mov	x0, x20
	bl	_free_arenas
LBB0_22:
	mov	x0, x19
	bl	_kfree
LBB0_23:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_INIT_NOTFOUND,4,2              ; @INIT_NOTFOUND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No existing arenas\n"

l_.str.1:                               ; @.str.1
	.asciz	"Found corrupted metadata!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"Unable to deduce log/padding indices\n"

	.comm	_INIT_READY,4,2                 ; @INIT_READY
	.no_dead_strip	_discover_arenas
.subsections_via_symbols
