	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_setup_io_queues
_nvme_setup_io_queues:                  ## @nvme_setup_io_queues
	.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	%rdi, %rbx
	movq	48(%rdi), %r14
	movl	40(%rdi), %edi
	callq	_to_pci_dev
	movq	%rax, %r15
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_max_io_queues
	leaq	28(%rbx), %rdi
	movq	_NVME_QUIRK_SHARED_TAGS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	28(%rbx), %ecx
	movl	$1, %ecx
	cmovel	%eax, %ecx
	movl	%ecx, -44(%rbp)
	leaq	-44(%rbp), %rsi
	callq	_nvme_set_queue_count
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	cmpl	$0, -44(%rbp)
	je	LBB0_20
## %bb.2:
	movq	_NVMEQ_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	cmpl	$0, (%rbx)
	je	LBB0_7
## %bb.3:
	movl	-44(%rbp), %esi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_nvme_cmb_qdepth
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	movl	%eax, 4(%rbx)
	jmp	LBB0_7
LBB0_6:
	movl	$0, (%rbx)
LBB0_7:
	movl	-44(%rbp), %esi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_db_bar_size
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_nvme_remap_bar
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	-44(%rbp), %esi
	decl	%esi
	movl	%esi, -44(%rbp)
	jne	LBB0_8
## %bb.10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_11:
	movl	36(%rbx), %eax
	movl	%eax, 4(%r14)
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_pci_free_irq
	movq	%r15, %rdi
	callq	_pci_free_irq_vectors
	movl	-44(%rbp), %esi
	movq	%rbx, %rdi
	callq	_nvme_setup_irqs
	testl	%eax, %eax
	jle	LBB0_18
## %bb.12:
	movq	_HCTX_TYPE_POLL@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	%eax, 8(%rbx)
	decl	%eax
	movl	%eax, %edi
	movl	$1, %esi
	callq	_max
	movq	16(%rbx), %rcx
	movq	(%r13), %rdx
	addl	(%rcx,%rdx,4), %eax
	movl	%eax, 12(%rbx)
	movq	%r14, %rdi
	callq	_queue_request_irq
	testl	%eax, %eax
	jne	LBB0_5
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_NVMEQ_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movq	%rbx, %rdi
	callq	_nvme_create_io_queues
	testl	%eax, %eax
	jne	LBB0_5
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	24(%rbx), %eax
	xorl	%r12d, %r12d
	cmpl	$2, %eax
	jl	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	12(%rbx), %eax
	jg	LBB0_23
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	decl	%eax
	movl	%eax, -44(%rbp)
	movq	%rbx, %rdi
	callq	_nvme_disable_io_queues
	movq	%rbx, %rdi
	callq	_nvme_suspend_io_queues
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_pci_free_irq
	movq	%r15, %rdi
	callq	_pci_free_irq_vectors
	movl	-44(%rbp), %esi
	movq	%rbx, %rdi
	callq	_nvme_setup_irqs
	testl	%eax, %eax
	jg	LBB0_13
LBB0_18:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_19:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_20
LBB0_5:
	movl	%eax, %r12d
LBB0_20:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movl	32(%rbx), %edi
	movq	16(%rbx), %rax
	movq	_HCTX_TYPE_DEFAULT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edx
	movq	_HCTX_TYPE_READ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %ecx
	movq	(%r13), %rsi
	movl	(%rax,%rsi,4), %r8d
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_NVME_QUIRK_SHARED_TAGS,4,2     ## @NVME_QUIRK_SHARED_TAGS
	.comm	_NVMEQ_ENABLED,4,2              ## @NVMEQ_ENABLED
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EIO,4,2                        ## @EIO
	.comm	_HCTX_TYPE_POLL,8,3             ## @HCTX_TYPE_POLL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d/%d/%d default/read/poll queues\n"

	.comm	_HCTX_TYPE_DEFAULT,8,3          ## @HCTX_TYPE_DEFAULT
	.comm	_HCTX_TYPE_READ,8,3             ## @HCTX_TYPE_READ
	.no_dead_strip	_nvme_setup_io_queues
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_setup_io_queues
_nvme_setup_io_queues:                  ; @nvme_setup_io_queues
	.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	x19, x0
	ldr	x20, [x0, #48]
	ldr	w0, [x0, #40]
	bl	_to_pci_dev
	mov	x21, x0
	bl	_max_io_queues
	mov	x8, x19
	ldr	w9, [x8, #28]!
Lloh0:
	adrp	x10, _NVME_QUIRK_SHARED_TAGS@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NVME_QUIRK_SHARED_TAGS@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	csinc	w9, w0, wzr, eq
	str	w9, [sp, #12]
	add	x1, sp, #12
	mov	x0, x8
	bl	_nvme_set_queue_count
	tbnz	w0, #31, LBB0_21
; %bb.1:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_20
; %bb.2:
Lloh3:
	adrp	x22, _NVMEQ_ENABLED@GOTPAGE
Lloh4:
	ldr	x22, [x22, _NVMEQ_ENABLED@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x20
	bl	_clear_bit
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.3:
	ldr	w1, [sp, #12]
	mov	x0, x19
	mov	w2, #4
	bl	_nvme_cmb_qdepth
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.4:
	str	w0, [x19, #4]
	b	LBB0_6
LBB0_5:
	str	wzr, [x19]
LBB0_6:
	ldr	w1, [sp, #12]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_db_bar_size
	mov	x1, x0
	mov	x0, x19
	bl	_nvme_remap_bar
	cbz	w0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [sp, #12]
	subs	w1, w8, #1
	str	w1, [sp, #12]
	b.ne	LBB0_7
; %bb.9:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_18
LBB0_10:
	ldr	w8, [x19, #36]
	str	w8, [x20, #4]
	mov	x0, x21
	mov	w1, #0
	mov	x2, x20
	bl	_pci_free_irq
	mov	x0, x21
	bl	_pci_free_irq_vectors
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_nvme_setup_irqs
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.11:
Lloh7:
	adrp	x23, _HCTX_TYPE_POLL@GOTPAGE
Lloh8:
	ldr	x23, [x23, _HCTX_TYPE_POLL@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	str	w0, [x19, #8]
	sub	w0, w0, #1
	mov	w1, #1
	bl	_max
	ldr	x8, [x19, #16]
	ldr	x9, [x23]
	ldr	w8, [x8, x9, lsl #2]
	add	w8, w8, w0
	str	w8, [x19, #12]
	mov	x0, x20
	bl	_queue_request_irq
	cbnz	w0, LBB0_21
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x22]
	mov	x1, x20
	bl	_set_bit
	mov	x0, x19
	bl	_nvme_create_io_queues
	cbnz	w0, LBB0_21
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x19, #24]
	cmp	w8, #2
	b.lt	LBB0_20
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w9, [x19, #12]
	cmp	w8, w9
	b.gt	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	sub	w8, w8, #1
	str	w8, [sp, #12]
	mov	x0, x19
	bl	_nvme_disable_io_queues
	mov	x0, x19
	bl	_nvme_suspend_io_queues
	mov	x0, x21
	mov	w1, #0
	mov	x2, x20
	bl	_pci_free_irq
	mov	x0, x21
	bl	_pci_free_irq_vectors
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_nvme_setup_irqs
	cmp	w0, #1
	b.ge	LBB0_12
LBB0_17:
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_21
LBB0_19:
	ldr	w0, [x19, #32]
Lloh11:
	adrp	x8, _HCTX_TYPE_DEFAULT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HCTX_TYPE_DEFAULT@GOTPAGEOFF]
	ldr	x9, [x19, #16]
Lloh13:
	ldr	x8, [x8]
	ldr	w2, [x9, x8, lsl #2]
Lloh14:
	adrp	x8, _HCTX_TYPE_READ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HCTX_TYPE_READ@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	w3, [x9, x8, lsl #2]
	ldr	x8, [x23]
	ldr	w4, [x9, x8, lsl #2]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
LBB0_20:
	mov	w0, #0
LBB0_21:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_NVME_QUIRK_SHARED_TAGS,4,2     ; @NVME_QUIRK_SHARED_TAGS
	.comm	_NVMEQ_ENABLED,4,2              ; @NVMEQ_ENABLED
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EIO,4,2                        ; @EIO
	.comm	_HCTX_TYPE_POLL,8,3             ; @HCTX_TYPE_POLL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d/%d/%d default/read/poll queues\n"

	.comm	_HCTX_TYPE_DEFAULT,8,3          ; @HCTX_TYPE_DEFAULT
	.comm	_HCTX_TYPE_READ,8,3             ; @HCTX_TYPE_READ
	.no_dead_strip	_nvme_setup_io_queues
.subsections_via_symbols
