	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amd_ntb_mw_get_align
_amd_ntb_mw_get_align:                  ## @amd_ntb_mw_get_align
	.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	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	%r8, %r15
	movq	%rcx, %r12
	movl	%edx, %ebx
	movl	%esi, %r14d
	callq	_ntb_ndev
	movq	%rax, %r13
	movq	_NTB_DEF_PEER_IDX@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_ndev_mw_to_bar
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	testq	%r12, %r12
	je	LBB0_6
## %bb.5:
	movq	_SZ_4K@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r12)
LBB0_6:
	testq	%r15, %r15
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	movl	$1, (%r15)
LBB0_8:
	xorl	%ebx, %ebx
	testq	%r14, %r14
	je	LBB0_10
## %bb.9:
	movl	(%r13), %edi
	movl	%eax, %esi
	callq	_pci_resource_len
	movl	%eax, (%r14)
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_3:
	movl	%eax, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NTB_DEF_PEER_IDX,4,2           ## @NTB_DEF_PEER_IDX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SZ_4K,4,2                      ## @SZ_4K
	.no_dead_strip	_amd_ntb_mw_get_align
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amd_ntb_mw_get_align
_amd_ntb_mw_get_align:                  ; @amd_ntb_mw_get_align
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x5
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	bl	_ntb_ndev
Lloh0:
	adrp	x8, _NTB_DEF_PEER_IDX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NTB_DEF_PEER_IDX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w24
	b.ne	LBB0_8
; %bb.1:
	mov	x21, x0
	mov	x1, x23
	bl	_ndev_mw_to_bar
	mov	x1, x0
	tbnz	w0, #31, LBB0_10
; %bb.2:
	cbz	x22, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _SZ_4K@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SZ_4K@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x22]
LBB0_4:
	cbz	x20, LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [x20]
LBB0_6:
	cbz	x19, LBB0_9
; %bb.7:
	ldr	w0, [x21]
	bl	_pci_resource_len
	mov	w1, #0
	str	w0, [x19]
	b	LBB0_10
LBB0_8:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w1, w8
	b	LBB0_10
LBB0_9:
	mov	w1, #0
LBB0_10:
	mov	x0, x1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NTB_DEF_PEER_IDX,4,2           ; @NTB_DEF_PEER_IDX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SZ_4K,4,2                      ; @SZ_4K
	.no_dead_strip	_amd_ntb_mw_get_align
.subsections_via_symbols
