	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function switchtec_ntb_peer_db_addr
_switchtec_ntb_peer_db_addr:            ## @switchtec_ntb_peer_db_addr
	.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
	movl	%r8d, %r12d
	movq	%rcx, %rbx
	movq	%rdx, %r13
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	callq	_ntb_sndev
	movq	%rax, %r15
	movq	_BITS_PER_LONG_LONG@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%r12d, (%rax)
	setle	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_4
## %bb.3:
	movq	16(%r15), %rax
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	subq	(%rcx), %rax
	movl	(%r15), %ecx
	leal	7(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$3, %edx
	movslq	%edx, %rbx
	addq	%rax, %rbx
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_pci_resource_start
	addq	%rbx, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
LBB0_4:
	testq	%r13, %r13
	je	LBB0_6
## %bb.5:
	movl	$4, (%r13)
LBB0_6:
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movl	%r12d, %edi
	callq	_BIT_ULL
	movb	4(%r15), %cl
	shll	%cl, %eax
	movl	%eax, (%r14)
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BITS_PER_LONG_LONG,4,2         ## @BITS_PER_LONG_LONG
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_switchtec_ntb_peer_db_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function switchtec_ntb_peer_db_addr
_switchtec_ntb_peer_db_addr:            ; @switchtec_ntb_peer_db_addr
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x4
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	bl	_ntb_sndev
	mov	x21, x0
Lloh0:
	adrp	x8, _BITS_PER_LONG_LONG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BITS_PER_LONG_LONG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	cset	w0, le
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_2:
	cbz	x23, LBB0_4
; %bb.3:
	ldp	x9, x8, [x21, #8]
	ldr	x8, [x8]
	ldr	x9, [x9]
	sub	x8, x8, x9
	ldr	w9, [x21]
	add	w10, w9, #7
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #3
	add	x25, x8, w9, sxtw
	ldr	w0, [x24]
	mov	w1, #0
	bl	_pci_resource_start
	add	x8, x25, x0
	str	x8, [x23]
LBB0_4:
	cbz	x22, LBB0_6
; %bb.5:
	mov	w8, #4
	str	w8, [x22]
LBB0_6:
	cbz	x19, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_BIT_ULL
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x21, #4]
	lsl	w8, w8, w9
	str	w8, [x19]
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BITS_PER_LONG_LONG,4,2         ; @BITS_PER_LONG_LONG
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_switchtec_ntb_peer_db_addr
.subsections_via_symbols
