	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amd_ntb_link_is_up
_amd_ntb_link_is_up:                    ## @amd_ntb_link_is_up
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_ntb_ndev
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_amd_link_is_up
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	testq	%r12, %r12
	je	LBB0_3
## %bb.2:
	movl	(%rbx), %edi
	callq	_NTB_LNK_STA_SPEED
	movl	%eax, (%r12)
LBB0_3:
	testq	%r15, %r15
	je	LBB0_4
## %bb.5:
	movl	(%rbx), %edi
	callq	_NTB_LNK_STA_WIDTH
	movl	$1, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_11
LBB0_6:
	testq	%r12, %r12
	je	LBB0_8
## %bb.7:
	movq	_NTB_SPEED_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
LBB0_8:
	testq	%r15, %r15
	je	LBB0_9
## %bb.10:
	movq	_NTB_WIDTH_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_11:
	movl	%eax, (%r15)
	jmp	LBB0_12
LBB0_4:
	movl	$1, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_12
LBB0_9:
	xorl	%ebx, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_12:
	movq	(%r14), %rdi
	callq	_dev_dbg
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"link is up.\n"

	.comm	_NTB_SPEED_NONE,4,2             ## @NTB_SPEED_NONE
	.comm	_NTB_WIDTH_NONE,4,2             ## @NTB_WIDTH_NONE
L_.str.1:                               ## @.str.1
	.asciz	"link is down.\n"

	.no_dead_strip	_amd_ntb_link_is_up
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amd_ntb_link_is_up
_amd_ntb_link_is_up:                    ; @amd_ntb_link_is_up
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_ntb_ndev
	mov	x22, x0
	bl	_amd_link_is_up
	cbz	x0, LBB0_5
; %bb.1:
	cbz	x21, LBB0_3
; %bb.2:
	ldr	w0, [x22]
	bl	_NTB_LNK_STA_SPEED
	str	w0, [x21]
LBB0_3:
	cbz	x20, LBB0_10
; %bb.4:
	ldr	w0, [x22]
	bl	_NTB_LNK_STA_WIDTH
	mov	w21, #1
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_5:
	cbz	x21, LBB0_7
; %bb.6:
Lloh2:
	adrp	x8, _NTB_SPEED_NONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NTB_SPEED_NONE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x21]
LBB0_7:
	mov	w21, #0
	cbz	x20, LBB0_11
; %bb.8:
Lloh5:
	adrp	x8, _NTB_WIDTH_NONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NTB_WIDTH_NONE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	str	w0, [x20]
	b	LBB0_12
LBB0_10:
	mov	w21, #1
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_12:
	ldr	x0, [x19]
	bl	_dev_dbg
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"link is up.\n"

	.comm	_NTB_SPEED_NONE,4,2             ; @NTB_SPEED_NONE
	.comm	_NTB_WIDTH_NONE,4,2             ; @NTB_WIDTH_NONE
l_.str.1:                               ; @.str.1
	.asciz	"link is down.\n"

	.no_dead_strip	_amd_ntb_link_is_up
.subsections_via_symbols
