	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ntb_transport_setup_qp_msi
_ntb_transport_setup_qp_msi:            ## @ntb_transport_setup_qp_msi
	.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
	cmpl	$0, 16(%rdi)
	je	LBB0_7
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	24(%rdi), %r15
	movl	%esi, %eax
	leaq	(%rax,%rax,2), %r14
	leal	(%rbx,%rbx), %r13d
	addl	(%rdi), %r13d
	movq	8(%rdi), %rdi
	callq	_ntb_spad_count
	movq	16(%r15,%r14,8), %rdi
	cmpl	%eax, %r13d
	jge	LBB0_8
## %bb.2:
	movq	%r15, %rcx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	leaq	(%rcx,%r14,8), %r15
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_ntb_spad_write
	movq	16(%r15), %rdi
	leal	1(%r13), %esi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	xorl	%edx, %edx
	callq	_ntb_spad_write
	cmpq	$0, (%r15)
	jne	LBB0_4
## %bb.3:
	movq	16(%r15), %rdi
	movq	_ntb_transport_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KBUILD_MODNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	(%rbx,%r14,8), %r8
	addq	$8, %r8
	movq	%r15, %rcx
	callq	_ntbm_msi_request_irq
	movq	%rax, (%r15)
	testq	%rax, %rax
	js	LBB0_9
LBB0_4:
	movq	16(%r15), %rdi
	movl	12(%rbx,%r14,8), %edx
	movl	%r13d, %esi
	callq	_ntb_spad_write
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	16(%r15), %rdi
	movl	8(%rbx,%r14,8), %edx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_ntb_spad_write
	testl	%eax, %eax
	je	LBB0_10
LBB0_6:
	movq	8(%r12), %rdi
	movq	(%r15), %rsi
	movq	%r15, %rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_devm_free_irq                  ## TAILCALL
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	(%rdi), %rdi
	leaq	L_.str(%rip), %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn_once                  ## TAILCALL
LBB0_9:
	movq	16(%r15), %rax
	movq	(%rax), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
LBB0_10:
	leaq	(%rbx,%r14,8), %rax
	addq	$12, %rax
	movq	16(%r15), %rcx
	movq	(%rcx), %rdi
	movq	(%r15), %rcx
	movl	(%rax), %r8d
	movl	-4(%rax), %r9d
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not enough SPADS to use MSI interrupts\n"

	.comm	_ntb_transport_isr,4,2          ## @ntb_transport_isr
	.comm	_KBUILD_MODNAME,4,2             ## @KBUILD_MODNAME
L_.str.1:                               ## @.str.1
	.asciz	"Unable to allocate MSI interrupt for qp%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"QP%d MSI %d addr=%x data=%x\n"

	.no_dead_strip	_ntb_transport_setup_qp_msi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ntb_transport_setup_qp_msi
_ntb_transport_setup_qp_msi:            ; @ntb_transport_setup_qp_msi
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x25, [x0, #24]
	mov	w26, w1
	ldr	w8, [x0]
	add	w22, w8, w1, lsl #1
	ldr	x0, [x0, #8]
	bl	_ntb_spad_count
	mov	x8, x0
	mov	w9, #24
	madd	x24, x26, x9, x25
	ldr	x0, [x24, #16]!
	cmp	w22, w8
	b.ge	LBB0_8
; %bb.2:
	mov	w8, #24
	umaddl	x21, w19, w8, x25
	mov	x1, x22
	mov	w2, #0
	bl	_ntb_spad_write
	ldr	x0, [x24]
	add	w23, w22, #1
	mov	x1, x23
	mov	w2, #0
	bl	_ntb_spad_write
	ldr	x8, [x21]
	cbnz	x8, LBB0_4
; %bb.3:
	ldr	x0, [x24]
Lloh0:
	adrp	x8, _ntb_transport_isr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ntb_transport_isr@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _KBUILD_MODNAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KBUILD_MODNAME@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w8, #24
	madd	x8, x26, x8, x25
	add	x4, x8, #8
	mov	x3, x21
	bl	_ntbm_msi_request_irq
	str	x0, [x21]
	tbnz	x0, #63, LBB0_9
LBB0_4:
	ldr	x0, [x24]
	mov	w8, #24
	madd	x27, x26, x8, x25
	ldr	w2, [x27, #12]!
	mov	x1, x22
	bl	_ntb_spad_write
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	x0, [x24]
	mov	w8, #24
	madd	x22, x26, x8, x25
	ldr	w2, [x22, #8]!
	mov	x1, x23
	bl	_ntb_spad_write
	cbz	w0, LBB0_10
LBB0_6:
	ldr	x0, [x20, #8]
	ldr	x1, [x21]
	mov	x2, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_devm_free_irq
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	x0, [x0]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_dev_warn_once
LBB0_9:
	ldr	x8, [x24]
	ldr	x0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_dev_warn
LBB0_10:
	ldr	x8, [x24]
	ldr	x0, [x8]
	ldr	x3, [x21]
	ldr	w4, [x27]
	ldr	w5, [x22]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_dev_dbg
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not enough SPADS to use MSI interrupts\n"

	.comm	_ntb_transport_isr,4,2          ; @ntb_transport_isr
	.comm	_KBUILD_MODNAME,4,2             ; @KBUILD_MODNAME
l_.str.1:                               ; @.str.1
	.asciz	"Unable to allocate MSI interrupt for qp%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"QP%d MSI %d addr=%x data=%x\n"

	.no_dead_strip	_ntb_transport_setup_qp_msi
.subsections_via_symbols
