	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ntb_msi_init                   ## -- Begin function ntb_msi_init
	.p2align	4, 0x90
_ntb_msi_init:                          ## @ntb_msi_init
	.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	%rsi, %r14
	movq	%rdi, %r15
	callq	_ntb_peer_port_count
	testl	%eax, %eax
	jle	LBB0_1
## %bb.3:
	movl	%eax, %r12d
	leaq	16(,%r12,8), %rsi
	leaq	8(%r15), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_devm_kzalloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_4
## %bb.7:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, (%rax)
	movl	$-1, %r13d
	xorl	%r14d, %r14d
	leaq	-48(%rbp), %rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_ntb_peer_mw_count
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r13), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	leaq	-44(%rbp), %rcx
	callq	_ntb_peer_mw_get_addr
	testl	%eax, %eax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_devm_ioremap
	movq	(%r15), %rcx
	movq	8(%rcx), %rcx
	movq	%rax, (%rcx,%r14,8)
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%r14
	decl	%r13d
	cmpq	%r14, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_8
## %bb.6:
	xorl	%r12d, %r12d
	jmp	LBB0_17
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_17
LBB0_9:
	movl	%eax, %r12d
	jmp	LBB0_12
LBB0_11:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_12:
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rbx
	cmpq	%rbx, %r13
	je	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	8(%rax), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r14, %rdi
	callq	_devm_iounmap
	jmp	LBB0_15
LBB0_16:
	movq	(%r15), %rsi
	movq	%r14, %rdi
	callq	_devm_kfree
	movq	$0, (%r15)
LBB0_17:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ntb_msi_init                   ; -- Begin function ntb_msi_init
	.p2align	2
_ntb_msi_init:                          ; @ntb_msi_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_ntb_peer_port_count
	cmp	w0, #0
	b.le	LBB0_7
; %bb.1:
	mov	w22, w0
	lsl	x23, x22, #3
	add	x1, x23, #16
	add	x20, x19, #8
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_devm_kzalloc
	str	x0, [x19]
	cbz	x0, LBB0_8
; %bb.2:
	mov	x24, #0
	str	x21, [x0]
	mov	w25, #-1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_ntb_peer_mw_count
	add	w1, w0, w25
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x19
	bl	_ntb_peer_mw_get_addr
	cbnz	w0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	w2, w1, [sp, #8]
	mov	x0, x20
	bl	_devm_ioremap
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	str	x0, [x8, x24]
	cbz	x0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w25, w25, #1
	add	x24, x24, #8
	cmp	x23, x24
	b.ne	LBB0_3
; %bb.6:
	mov	w21, #0
	b	LBB0_17
LBB0_7:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_17
LBB0_10:
	mov	x21, x0
	b	LBB0_12
LBB0_11:
Lloh7:
	adrp	x8, _EFAULT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	mov	x23, #0
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x23, x23, #1
	cmp	x22, x23
	b.eq	LBB0_16
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	ldr	x1, [x8, x23, lsl #3]
	cbz	x1, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x20
	bl	_devm_iounmap
	b	LBB0_13
LBB0_16:
	ldr	x1, [x19]
	mov	x0, x20
	bl	_devm_kfree
	str	xzr, [x19]
LBB0_17:
	mov	x0, 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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
