	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ntb_send_link_down
_ntb_send_link_down:                    ## @ntb_send_link_down
	.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
	cmpl	$0, 12(%rdi)
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r15
	movq	16(%rdi), %rax
	movq	(%rax), %rdi
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_dev_info
	movq	_NTB_LINK_DOWN_TIMEOUT@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_5
## %bb.2:
	leaq	8(%r15), %r12
	leaq	4(%r15), %rbx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ntb_list_rm
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$100, %edi
	callq	_msleep
	incl	%r14d
	cmpl	(%r13), %r14d
	jl	LBB0_3
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movq	$0, 24(%rax)
	movq	_LINK_DOWN_FLAG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_ntb_process_tx
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
LBB0_8:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ntb_qp_link_down_reset         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"qp %d: Send Link Down\n"

	.comm	_NTB_LINK_DOWN_TIMEOUT,4,2      ## @NTB_LINK_DOWN_TIMEOUT
	.comm	_LINK_DOWN_FLAG,4,2             ## @LINK_DOWN_FLAG
L_.str.1:                               ## @.str.1
	.asciz	"ntb: QP%d unable to send linkdown msg\n"

	.no_dead_strip	_ntb_send_link_down
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ntb_send_link_down
_ntb_send_link_down:                    ; @ntb_send_link_down
	.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
	ldr	w8, [x0, #12]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x20, [x8]
	ldr	w2, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_info
Lloh2:
	adrp	x23, _NTB_LINK_DOWN_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _NTB_LINK_DOWN_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w24, #0
	add	x21, x19, #8
	add	x22, x19, #4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_ntb_list_rm
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #100
	bl	_msleep
	add	w24, w24, #1
	ldr	w8, [x23]
	cmp	w24, w8
	b.lt	LBB0_3
LBB0_5:
	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
LBB0_6:
	mov	x1, x0
	stp	xzr, xzr, [x0, #8]
	str	xzr, [x0, #24]
Lloh4:
	adrp	x8, _LINK_DOWN_FLAG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _LINK_DOWN_FLAG@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x0]
	mov	x0, x19
	bl	_ntb_process_tx
	cbz	w0, LBB0_8
; %bb.7:
	ldr	w2, [x19]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_8:
	mov	x0, x19
	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
	b	_ntb_qp_link_down_reset
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"qp %d: Send Link Down\n"

	.comm	_NTB_LINK_DOWN_TIMEOUT,4,2      ; @NTB_LINK_DOWN_TIMEOUT
	.comm	_LINK_DOWN_FLAG,4,2             ; @LINK_DOWN_FLAG
l_.str.1:                               ; @.str.1
	.asciz	"ntb: QP%d unable to send linkdown msg\n"

	.no_dead_strip	_ntb_send_link_down
.subsections_via_symbols
