	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nd_label_write_index
_nd_label_write_index:                  ## @nd_label_write_index
	.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
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r14
	callq	_to_namespace_index
	movq	%rax, %r13
	movq	_ND_NSINDEX_INIT@GOTPCREL(%rip), %rax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	testq	%rbx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_nvdimm_num_label_slots
	jmp	LBB0_3
LBB0_2:
	movq	48(%r13), %rdi
	callq	___le32_to_cpu
LBB0_3:
	movl	%eax, %ebx
	movl	92(%r13), %edi
	movq	_NSINDEX_SIGNATURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NSINDEX_SIG_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	leaq	88(%r13), %rdi
	xorl	%esi, %esi
	movl	$3, %edx
	callq	_memset
	movq	%r14, %rdi
	callq	_sizeof_namespace_label
	sarl	$8, %eax
	movl	%eax, (%r13)
	movl	%r15d, %edi
	callq	___cpu_to_le32
	movq	%rax, 80(%r13)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_to_namespace_index
	movq	%r13, %rdi
	subq	%rax, %rdi
	callq	___cpu_to_le64
	movq	%rax, 8(%r13)
	movq	%r14, %rdi
	callq	_sizeof_namespace_index
	movq	%rax, %rdi
	callq	___cpu_to_le64
	movq	%rax, 72(%r13)
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%r12d, %edi
	callq	_nd_label_next_nsindex
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_to_namespace_index
	movq	%rax, %r15
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_to_namespace_index
	subq	%rax, %r15
	movq	%r15, %rdi
	callq	___cpu_to_le64
	movq	%rax, 64(%r13)
	movq	%r14, %rdi
	callq	_nd_label_base
	movq	%rax, %r15
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_to_namespace_index
	subq	%rax, %r15
	movq	%r15, %rdi
	callq	___cpu_to_le64
	movq	%rax, 56(%r13)
	movl	%ebx, %edi
	callq	___cpu_to_le32
	movq	%rax, 48(%r13)
	movl	$1, %edi
	callq	___cpu_to_le16
	movq	%rax, 40(%r13)
	movq	%r14, %rdi
	callq	_sizeof_namespace_label
	xorl	%ecx, %ecx
	cmpl	$256, %eax                      ## imm = 0x100
	setl	%cl
	movl	$2, %edi
	subl	%ecx, %edi
	callq	___cpu_to_le16
	movq	%rax, 32(%r13)
	xorl	%edi, %edi
	callq	___cpu_to_le64
	movq	%rax, 16(%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	_ND_NSINDEX_INIT@GOTPCREL(%rip), %rcx
	testq	%rax, (%rcx)
	je	LBB0_6
## %bb.4:
	movq	24(%r13), %r15
	movq	_BITS_PER_LONG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_ALIGN
	movl	%eax, %r12d
	movq	24(%r13), %rdi
	leal	7(%r12), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$3, %edx
	movl	$255, %esi
	callq	_memset
	movl	%r12d, %eax
	subl	%ebx, %eax
	testl	%eax, %eax
	jle	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_clear_bit_le
	incl	%ebx
	cmpl	%ebx, %r12d
	jne	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	callq	_sizeof_namespace_index
	movq	%r13, %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_nd_fletcher64
	movq	%rax, %rdi
	callq	___cpu_to_le64
	movq	%rax, 16(%r13)
	movq	8(%r13), %rdi
	callq	___le64_to_cpu
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_sizeof_namespace_index
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r13, %rdx
	movq	%rax, %rcx
	callq	_nvdimm_set_config_data
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	xorl	%ebx, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	_ND_NSINDEX_INIT@GOTPCREL(%rip), %rcx
	testq	%rax, (%rcx)
	jne	LBB0_10
## %bb.9:
	xorl	%edi, %edi
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, (%r14)
	setne	%dil
	callq	_WARN_ON
	movq	%r14, %rdi
	callq	_to_current_namespace_index
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r13, %rdx
	callq	_nd_label_copy
	movl	4(%r14), %edi
	callq	_nd_label_next_nsindex
	movl	%eax, 4(%r14)
	movl	(%r14), %edi
	callq	_nd_label_next_nsindex
	movl	%eax, (%r14)
	xorl	%edi, %edi
	cmpl	%eax, 4(%r14)
	sete	%dil
	callq	_WARN_ON
	jmp	LBB0_10
LBB0_7:
	movl	%eax, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ND_NSINDEX_INIT,8,3            ## @ND_NSINDEX_INIT
	.comm	_NSINDEX_SIGNATURE,4,2          ## @NSINDEX_SIGNATURE
	.comm	_NSINDEX_SIG_LEN,4,2            ## @NSINDEX_SIG_LEN
	.comm	_BITS_PER_LONG,4,2              ## @BITS_PER_LONG
	.no_dead_strip	_nd_label_write_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nd_label_write_index
_nd_label_write_index:                  ; @nd_label_write_index
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x3
	mov	x24, x2
	mov	x21, x1
	mov	x19, x0
	bl	_to_namespace_index
	mov	x20, x0
Lloh0:
	adrp	x26, _ND_NSINDEX_INIT@GOTPAGE
Lloh1:
	ldr	x26, [x26, _ND_NSINDEX_INIT@GOTPAGEOFF]
	ldr	x8, [x26]
	tst	x8, x22
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_nvdimm_num_label_slots
	b	LBB0_3
LBB0_2:
	ldr	x0, [x20, #48]
	bl	___le32_to_cpu
LBB0_3:
	mov	x23, x0
	ldr	w0, [x20, #92]
Lloh2:
	adrp	x8, _NSINDEX_SIGNATURE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NSINDEX_SIGNATURE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _NSINDEX_SIG_LEN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NSINDEX_SIG_LEN@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_memcpy
	add	x0, x20, #88
	mov	w1, #0
	mov	w2, #3
	bl	_memset
	mov	x0, x19
	bl	_sizeof_namespace_label
	asr	w8, w0, #8
	str	w8, [x20]
	mov	x0, x24
	bl	___cpu_to_le32
	str	x0, [x20, #80]
	mov	x0, x19
	mov	w1, #0
	bl	_to_namespace_index
	sub	x0, x20, x0
	bl	___cpu_to_le64
	str	x0, [x20, #8]
	mov	x0, x19
	bl	_sizeof_namespace_index
	bl	___cpu_to_le64
	str	x0, [x20, #72]
	mov	x0, x21
	bl	_nd_label_next_nsindex
	mov	x1, x0
	mov	x0, x19
	bl	_to_namespace_index
	mov	x24, x0
	mov	x0, x19
	mov	w1, #0
	bl	_to_namespace_index
	sub	x0, x24, x0
	bl	___cpu_to_le64
	str	x0, [x20, #64]
	mov	x0, x19
	bl	_nd_label_base
	mov	x24, x0
	mov	x0, x19
	mov	w1, #0
	bl	_to_namespace_index
	sub	x0, x24, x0
	bl	___cpu_to_le64
	str	x0, [x20, #56]
	mov	x0, x23
	bl	___cpu_to_le32
	str	x0, [x20, #48]
	mov	w24, #1
	mov	w0, #1
	bl	___cpu_to_le16
	str	x0, [x20, #40]
	mov	x0, x19
	bl	_sizeof_namespace_label
	cmp	w0, #256
	cinc	w0, w24, ge
	bl	___cpu_to_le16
	str	x0, [x20, #32]
	mov	x0, #0
	bl	___cpu_to_le64
	str	x0, [x20, #16]
	ldr	x8, [x26]
	tst	x8, x22
	b.eq	LBB0_6
; %bb.4:
	ldr	x24, [x20, #24]
Lloh8:
	adrp	x8, _BITS_PER_LONG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BITS_PER_LONG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_ALIGN
	mov	x25, x0
	ldr	x0, [x20, #24]
	add	w8, w25, #7
	cmp	w25, #0
	csel	w8, w8, w25, lt
	asr	w2, w8, #3
	mov	w1, #255
	bl	_memset
	sub	w8, w25, w23
	cmp	w8, #1
	b.lt	LBB0_6
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x24
	bl	_clear_bit_le
	add	w23, w23, #1
	cmp	w25, w23
	b.ne	LBB0_5
LBB0_6:
	mov	x0, x19
	bl	_sizeof_namespace_index
	mov	x1, x0
	mov	x0, x20
	mov	w2, #1
	bl	_nd_fletcher64
	bl	___cpu_to_le64
	str	x0, [x20, #16]
	ldr	x0, [x20, #8]
	bl	___le64_to_cpu
	mov	x23, x0
	mov	x0, x19
	bl	_sizeof_namespace_index
	mov	x3, x0
	mov	x0, x19
	mov	x1, x23
	mov	x2, x20
	bl	_nvdimm_set_config_data
	tbnz	w0, #31, LBB0_10
; %bb.7:
	ldr	x8, [x26]
	tst	x8, x22
	b.ne	LBB0_9
; %bb.8:
	ldr	w8, [x19]
	cmp	w8, w21
	cset	w0, ne
	bl	_WARN_ON
	mov	x0, x19
	bl	_to_current_namespace_index
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_nd_label_copy
	ldr	w0, [x19, #4]
	bl	_nd_label_next_nsindex
	str	w0, [x19, #4]
	ldr	w0, [x19]
	bl	_nd_label_next_nsindex
	str	w0, [x19]
	ldr	w8, [x19, #4]
	cmp	w8, w0
	cset	w0, eq
	bl	_WARN_ON
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ND_NSINDEX_INIT,8,3            ; @ND_NSINDEX_INIT
	.comm	_NSINDEX_SIGNATURE,4,2          ; @NSINDEX_SIGNATURE
	.comm	_NSINDEX_SIG_LEN,4,2            ; @NSINDEX_SIG_LEN
	.comm	_BITS_PER_LONG,4,2              ; @BITS_PER_LONG
	.no_dead_strip	_nd_label_write_index
.subsections_via_symbols
