	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_init_ns_head
_nvme_init_ns_head:                     ## @nvme_init_ns_head
	.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	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r12
	movq	(%r12), %rdi
	movb	(%rdx), %bl
	callq	_mutex_lock
	testb	$1, %bl
	je	LBB0_2
## %bb.1:
	movq	(%r12), %rdi
	movl	%r15d, %esi
	callq	___nvme_find_ns_head
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:
	movq	%rax, %r13
	leaq	-48(%rbp), %rcx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r14, %rdx
	callq	_nvme_report_ns_ids
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.7:
	leaq	4(%r13), %rdi
	leaq	-48(%rbp), %rsi
	callq	_nvme_ns_ids_equal
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movl	8(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_2:
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r14, %rdx
	callq	_nvme_alloc_ns_head
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
LBB0_4:
	movq	(%r12), %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jle	LBB0_10
## %bb.5:
	movl	%ebx, %edi
	callq	_nvme_error_status
	movl	%eax, %edi
	callq	_blk_status_to_errno
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_9:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	8(%rbx), %rdi
	movq	%r13, %rsi
	callq	_list_add_tail
	movq	%r13, (%rbx)
	movq	(%r12), %rdi
	callq	_mutex_unlock
	xorl	%ebx, %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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IDs don't match for shared namespace %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nvme_init_ns_head
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_init_ns_head
_nvme_init_ns_head:                     ; @nvme_init_ns_head
	.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	x23, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #16]
	ldr	w22, [x2]
	ldr	x0, [x19]
	bl	_mutex_lock
	tbz	w22, #0, LBB0_5
; %bb.1:
	ldr	x0, [x19]
	mov	x1, x21
	bl	___nvme_find_ns_head
	cbz	x0, LBB0_5
; %bb.2:
	mov	x22, x0
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_nvme_report_ns_ids
	mov	x23, x0
	cbnz	w0, LBB0_7
; %bb.3:
	add	x0, x22, #4
	add	x1, sp, #8
	bl	_nvme_ns_ids_equal
	cbnz	w0, LBB0_9
; %bb.4:
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_nvme_alloc_ns_head
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.6:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x23, x0
LBB0_7:
	ldr	x0, [x19]
	bl	_mutex_unlock
	cmp	w23, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x0, x23
	bl	_nvme_error_status
	bl	_blk_status_to_errno
	mov	x23, x0
	b	LBB0_10
LBB0_9:
	add	x0, x20, #8
	mov	x1, x22
	bl	_list_add_tail
	str	x22, [x20]
	ldr	x0, [x19]
	bl	_mutex_unlock
	mov	w23, #0
LBB0_10:
	mov	x0, x23
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IDs don't match for shared namespace %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nvme_init_ns_head
.subsections_via_symbols
