	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_setup_irqs
_nvme_setup_irqs:                       ## @nvme_setup_irqs
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	12(%rdi), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	movl	$1, -48(%rbp)
	movq	%r15, -40(%rbp)
	movq	_nvme_calc_irq_sets@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	xorl	%eax, %eax
	callq	_num_possible_cpus
	movq	_poll_queues@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ebx, %ecx
	jae	LBB0_1
## %bb.2:
	subl	%ecx, %ebx
	cmpl	%ebx, %eax
	jae	LBB0_4
## %bb.3:
	incl	%eax
	jmp	LBB0_5
LBB0_1:
	decl	%ebx
	movl	$1, %eax
	movl	%ebx, %ecx
	jmp	LBB0_5
LBB0_4:
	incl	%ebx
	movl	%ebx, %eax
LBB0_5:
	movq	(%r15), %rdx
	movq	_HCTX_TYPE_POLL@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	%ecx, (%rdx,%rsi,4)
	movq	_HCTX_TYPE_DEFAULT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$1, (%rdx,%rcx,4)
	movq	_HCTX_TYPE_READ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$0, (%rdx,%rcx,4)
	movq	_NVME_QUIRK_SINGLE_VECTOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	8(%r15), %ecx
	movl	$1, %ecx
	cmovnel	%ecx, %eax
	movq	_PCI_IRQ_ALL_TYPES@GOTPCREL(%rip), %rdx
	movq	_PCI_IRQ_AFFINITY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	leaq	-48(%rbp), %r8
	movq	%r14, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	callq	_pci_alloc_irq_vectors_affinity
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nvme_calc_irq_sets,4,2         ## @nvme_calc_irq_sets
	.comm	_poll_queues,4,2                ## @poll_queues
	.comm	_HCTX_TYPE_POLL,8,3             ## @HCTX_TYPE_POLL
	.comm	_HCTX_TYPE_DEFAULT,8,3          ## @HCTX_TYPE_DEFAULT
	.comm	_HCTX_TYPE_READ,8,3             ## @HCTX_TYPE_READ
	.comm	_NVME_QUIRK_SINGLE_VECTOR,4,2   ## @NVME_QUIRK_SINGLE_VECTOR
	.comm	_PCI_IRQ_ALL_TYPES,4,2          ## @PCI_IRQ_ALL_TYPES
	.comm	_PCI_IRQ_AFFINITY,4,2           ## @PCI_IRQ_AFFINITY
	.no_dead_strip	_nvme_setup_irqs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_setup_irqs
_nvme_setup_irqs:                       ; @nvme_setup_irqs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x0, #12]
	bl	_to_pci_dev
	mov	x19, x0
	mov	w8, #1
	str	w8, [sp, #8]
	str	x20, [sp, #16]
Lloh0:
	adrp	x8, _nvme_calc_irq_sets@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nvme_calc_irq_sets@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	bl	_num_possible_cpus
Lloh3:
	adrp	x8, _poll_queues@GOTPAGE
Lloh4:
	ldr	x8, [x8, _poll_queues@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	cmp	w9, w21
	b.hs	LBB0_2
; %bb.1:
	sub	w8, w21, w9
	cmp	w0, w8
	add	w10, w0, #1
	csinc	w8, w10, w8, lo
	b	LBB0_3
LBB0_2:
	sub	w9, w21, #1
	mov	w8, #1
LBB0_3:
	ldr	x10, [x20]
Lloh6:
	adrp	x11, _HCTX_TYPE_POLL@GOTPAGE
Lloh7:
	ldr	x11, [x11, _HCTX_TYPE_POLL@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	str	w9, [x10, x11, lsl #2]
Lloh9:
	adrp	x9, _HCTX_TYPE_DEFAULT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HCTX_TYPE_DEFAULT@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	mov	w11, #1
	str	w11, [x10, x9, lsl #2]
Lloh12:
	adrp	x9, _HCTX_TYPE_READ@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HCTX_TYPE_READ@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	str	wzr, [x10, x9, lsl #2]
	ldr	w9, [x20, #8]
Lloh15:
	adrp	x10, _NVME_QUIRK_SINGLE_VECTOR@GOTPAGE
Lloh16:
	ldr	x10, [x10, _NVME_QUIRK_SINGLE_VECTOR@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	tst	w10, w9
Lloh18:
	adrp	x9, _PCI_IRQ_ALL_TYPES@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PCI_IRQ_ALL_TYPES@GOTPAGEOFF]
	csinc	w2, w8, wzr, eq
Lloh20:
	ldr	w8, [x9]
Lloh21:
	adrp	x9, _PCI_IRQ_AFFINITY@GOTPAGE
Lloh22:
	ldr	x9, [x9, _PCI_IRQ_AFFINITY@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w3, w9, w8
	add	x4, sp, #8
	mov	x0, x19
	mov	w1, #1
	bl	_pci_alloc_irq_vectors_affinity
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_nvme_calc_irq_sets,4,2         ; @nvme_calc_irq_sets
	.comm	_poll_queues,4,2                ; @poll_queues
	.comm	_HCTX_TYPE_POLL,8,3             ; @HCTX_TYPE_POLL
	.comm	_HCTX_TYPE_DEFAULT,8,3          ; @HCTX_TYPE_DEFAULT
	.comm	_HCTX_TYPE_READ,8,3             ; @HCTX_TYPE_READ
	.comm	_NVME_QUIRK_SINGLE_VECTOR,4,2   ; @NVME_QUIRK_SINGLE_VECTOR
	.comm	_PCI_IRQ_ALL_TYPES,4,2          ; @PCI_IRQ_ALL_TYPES
	.comm	_PCI_IRQ_AFFINITY,4,2           ; @PCI_IRQ_AFFINITY
	.no_dead_strip	_nvme_setup_irqs
.subsections_via_symbols
