	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btt_init
_btt_init:                              ## @btt_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r13
	addq	$8, %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	$64, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	movq	%r13, 56(%rax)
	movq	%r14, (%rax)
	movl	%r15d, 8(%rax)
	cmpl	$4096, %r15d                    ## imm = 0x1000
	movl	$512, %eax                      ## imm = 0x200
	movl	$4096, %ecx                     ## imm = 0x1000
	cmovll	%eax, %ecx
	movl	%ecx, 12(%rbx)
	leaq	52(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	%rbx, %rdi
	addq	$48, %rdi
	callq	_mutex_init
	movq	%r12, 40(%rbx)
	movq	(%r13), %rdi
	callq	_to_nd_namespace_io
	movq	%rax, 32(%rbx)
	movq	%rbx, %rdi
	callq	_discover_arenas
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	leaq	L_.str(%rip), %rsi
LBB0_3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_err
LBB0_4:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	16(%rbx), %rax
	movq	_INIT_READY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
LBB0_7:
	movq	%rbx, %rdi
	callq	_btt_blk_init
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_3
LBB0_9:
	cmpq	$0, 8(%r12)
	je	LBB0_12
## %bb.10:
	movq	%r12, %rdi
	callq	_dev_name
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_warn
	jmp	LBB0_4
LBB0_11:
	movq	%rbx, %rdi
	callq	_btt_debugfs_init
	jmp	LBB0_5
LBB0_12:
	movq	_ARENA_MAX_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r14, %rcx
	movq	%r14, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_14
## %bb.13:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rsi
	movq	%rdx, %rsi
	movq	%rax, %rdx
	jmp	LBB0_15
LBB0_14:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%edx, %esi
	movl	%eax, %edx
LBB0_15:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	cmpq	$1, %rsi
	sbbq	$-1, %rdx
	movq	%rdx, 24(%rbx)
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_create_arenas
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_info
	jmp	LBB0_4
LBB0_17:
	movq	%rbx, %rdi
	callq	_btt_meta_init
	testl	%eax, %eax
	je	LBB0_7
## %bb.18:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init: error in arena_discover: %d\n"

	.comm	_INIT_READY,8,3                 ## @INIT_READY
L_.str.1:                               ## @.str.1
	.asciz	"%s is read-only, unable to init btt metadata\n"

	.comm	_ARENA_MAX_SIZE,8,3             ## @ARENA_MAX_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"init: %d arenas for %llu rawsize\n"

L_.str.3:                               ## @.str.3
	.asciz	"init: create_arenas: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"init: error in meta_init: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"init: error in blk_init: %d\n"

	.no_dead_strip	_btt_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btt_init
_btt_init:                              ; @btt_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x4
	mov	x24, x2
	mov	x21, x1
	mov	x23, x0
	add	x19, x0, #8
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #64
	bl	_devm_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_5
; %bb.1:
	str	x23, [x20, #56]
	str	x21, [x20]
	mov	w8, #4096
	mov	w9, #512
	cmp	w24, #1, lsl #12                ; =4096
	csel	w8, w9, w8, lt
	stp	w24, w8, [x20, #8]
	add	x0, x20, #52
	bl	_INIT_LIST_HEAD
	add	x0, x20, #48
	bl	_mutex_init
	str	x22, [x20, #40]
	ldr	x0, [x23]
	bl	_to_nd_namespace_io
	str	x0, [x20, #32]
	mov	x0, x20
	bl	_discover_arenas
	cbz	w0, LBB0_6
; %bb.2:
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	mov	x0, x19
	bl	_dev_err
LBB0_4:
	mov	x20, #0
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x8, [x20, #16]
Lloh5:
	adrp	x9, _INIT_READY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _INIT_READY@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
LBB0_7:
	mov	x0, x20
	bl	_btt_blk_init
	cbz	w0, LBB0_11
; %bb.8:
	mov	x2, x0
Lloh8:
	adrp	x1, l_.str.5@PAGE
Lloh9:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_3
LBB0_9:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_12
; %bb.10:
	mov	x0, x22
	bl	_dev_name
	mov	x2, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	b	LBB0_4
LBB0_11:
	mov	x0, x20
	bl	_btt_debugfs_init
	b	LBB0_5
LBB0_12:
Lloh12:
	adrp	x8, _ARENA_MAX_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ARENA_MAX_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	udiv	x9, x21, x8
	msub	x8, x9, x8, x21
	cmp	x8, #0
	cinc	x2, x9, ne
	str	x2, [x20, #24]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_dev_dbg
	mov	x0, x20
	bl	_create_arenas
	cbz	w0, LBB0_14
; %bb.13:
	mov	x2, x0
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	b	LBB0_4
LBB0_14:
	mov	x0, x20
	bl	_btt_meta_init
	cbz	w0, LBB0_7
; %bb.15:
	mov	x2, x0
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init: error in arena_discover: %d\n"

	.comm	_INIT_READY,8,3                 ; @INIT_READY
l_.str.1:                               ; @.str.1
	.asciz	"%s is read-only, unable to init btt metadata\n"

	.comm	_ARENA_MAX_SIZE,8,3             ; @ARENA_MAX_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"init: %d arenas for %llu rawsize\n"

l_.str.3:                               ; @.str.3
	.asciz	"init: create_arenas: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"init: error in meta_init: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"init: error in blk_init: %d\n"

	.no_dead_strip	_btt_init
.subsections_via_symbols
