	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_alloc_queue
_nvme_alloc_queue:                      ## @nvme_alloc_queue
	.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
	xorl	%eax, %eax
	cmpl	%esi, 8(%rdi)
	jg	LBB0_9
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	32(%rdi), %r12
	movslq	%esi, %rax
	movq	%rax, %r14
	shlq	$6, %r14
	leaq	(%r12,%r14), %rcx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jne	LBB0_2
## %bb.3:
	movq	_NVME_ADM_SQES@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	leaq	24(%rbx), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, 56(%r12,%r14)
	movl	%edx, (%rcx)
	movl	4(%rbx), %r13d
	movq	%rcx, %rdi
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	callq	_CQ_SIZE
	leaq	(%r12,%r14), %rdx
	addq	$12, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r13d, %edi
	movq	%rdx, %r13
	movl	%eax, %esi
	callq	_dma_alloc_coherent
	movq	%rax, 16(%r12,%r14)
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_nvme_alloc_sq_cmds
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	addq	%r12, %r14
	addq	$16, %r14
	movl	4(%rbx), %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_CQ_SIZE
	movq	(%r14), %rdx
	movl	(%r13), %ecx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dma_free_coherent
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_6:
	movq	%rbx, 48(%r12,%r14)
	leaq	(%r12,%r14), %rdi
	addq	$44, %rdi
	callq	_spin_lock_init
	leaq	(%r12,%r14), %rdi
	addq	$40, %rdi
	callq	_spin_lock_init
	movq	$0, 32(%r12,%r14)
	movl	$1, 4(%r12,%r14)
	movslq	(%rbx), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	imulq	%rax, %rcx
	shlq	$3, %rcx
	addq	16(%rbx), %rcx
	movq	%rcx, 24(%r12,%r14)
	movl	%r15d, 8(%r12,%r14)
	incl	8(%rbx)
	xorl	%eax, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVME_ADM_SQES,4,2              ## @NVME_ADM_SQES
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_nvme_alloc_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_alloc_queue
_nvme_alloc_queue:                      ; @nvme_alloc_queue
	.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
	ldr	w8, [x0, #8]
	cmp	w8, w1
	b.le	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_7
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	ldr	x24, [x0, #32]
	sxtw	x25, w20
	add	x21, x24, x25, lsl #6
	add	x8, x0, #24
Lloh0:
	adrp	x9, _NVME_ADM_SQES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NVME_ADM_SQES@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x21, #56]
	str	w2, [x21]
	ldr	w23, [x0, #4]
	mov	x0, x21
	bl	_CQ_SIZE
	mov	x1, x0
	add	x22, x21, #12
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x23
	mov	x2, x22
	bl	_dma_alloc_coherent
	mov	x23, x21
	str	x0, [x23, #16]!
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_nvme_alloc_sq_cmds
	cbz	x0, LBB0_6
; %bb.4:
	ldr	w19, [x19, #4]
	mov	x0, x21
	bl	_CQ_SIZE
	mov	x1, x0
	ldr	x2, [x23]
	ldr	w3, [x22]
	mov	x0, x19
	bl	_dma_free_coherent
LBB0_5:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	add	x21, x24, x25, lsl #6
	str	x19, [x21, #48]
	add	x0, x21, #44
	bl	_spin_lock_init
	add	x0, x21, #40
	bl	_spin_lock_init
	mov	w0, #0
	mov	w8, #1
	ldr	x9, [x19, #16]
	ldr	w10, [x19]
	mul	w10, w20, w10
	lsl	w10, w10, #1
	add	x9, x9, w10, sxtw #2
	stp	x9, xzr, [x21, #24]
	stp	w8, w20, [x21, #4]
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
LBB0_7:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NVME_ADM_SQES,4,2              ; @NVME_ADM_SQES
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_nvme_alloc_queue
.subsections_via_symbols
