	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function idt_ntb_link_is_up
_idt_ntb_link_is_up:                    ## @idt_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	%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	%rdx, %r14
	movq	%rsi, %r15
	callq	_to_ndev_ntb
	movq	%rax, %r13
	movq	%r15, %rax
	orq	%r14, %rax
	je	LBB0_5
## %bb.1:
	movq	_IDT_NT_PCIELCTLSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_idt_nt_read
	movl	%eax, %r12d
	testq	%r15, %r15
	je	LBB0_3
## %bb.2:
	movq	_PCIELCTLSTS_CLS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_GET_FIELD
	movl	%eax, (%r15)
LBB0_3:
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	movq	_PCIELCTLSTS_NLW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_GET_FIELD
	movl	%eax, (%r14)
LBB0_5:
	movq	%r13, %rdi
	callq	_idt_ntb_local_link_is_up
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	xorl	%r15d, %r15d
	cmpb	$0, (%r13)
	je	LBB0_10
## %bb.7:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	%bl, %r14d
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_idt_ntb_peer_link_is_up
	movl	$1, %edx
	movl	%r14d, %ecx
	shll	%cl, %edx
	testq	%rax, %rax
	cmovel	%r15d, %edx
	orb	%dl, %r12b
	incl	%ebx
	movzbl	(%r13), %eax
	cmpl	%eax, %ebx
	jb	LBB0_8
	jmp	LBB0_11
LBB0_10:
	xorl	%r12d, %r12d
LBB0_11:
	movzbl	%r12b, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDT_NT_PCIELCTLSTS,4,2         ## @IDT_NT_PCIELCTLSTS
	.comm	_PCIELCTLSTS_CLS,4,2            ## @PCIELCTLSTS_CLS
	.comm	_PCIELCTLSTS_NLW,4,2            ## @PCIELCTLSTS_NLW
	.no_dead_strip	_idt_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 idt_ntb_link_is_up
_idt_ntb_link_is_up:                    ; @idt_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
	bl	_to_ndev_ntb
	mov	x19, x0
	orr	x8, x21, x20
	cbz	x8, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _IDT_NT_PCIELCTLSTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IDT_NT_PCIELCTLSTS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_idt_nt_read
	mov	x22, x0
	cbz	x21, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _PCIELCTLSTS_CLS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCIELCTLSTS_CLS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_GET_FIELD
	str	w0, [x21]
LBB0_3:
	cbz	x20, LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _PCIELCTLSTS_NLW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCIELCTLSTS_NLW@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_GET_FIELD
	str	w0, [x20]
LBB0_5:
	mov	x0, x19
	bl	_idt_ntb_local_link_is_up
	cbz	w0, LBB0_9
; %bb.6:
	ldrb	w8, [x19]
	cbz	w8, LBB0_9
; %bb.7:
	mov	w21, #0
	mov	w20, #0
	mov	w22, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	and	w1, w21, #0xff
	mov	x0, x19
	bl	_idt_ntb_peer_link_is_up
	lsl	w8, w22, w21
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w20, w8, w20
	add	w21, w21, #1
	ldrb	w8, [x19]
	cmp	w21, w8
	b.lo	LBB0_8
	b	LBB0_10
LBB0_9:
	mov	w20, #0
LBB0_10:
	and	w0, w20, #0xff
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IDT_NT_PCIELCTLSTS,4,2         ; @IDT_NT_PCIELCTLSTS
	.comm	_PCIELCTLSTS_CLS,4,2            ; @PCIELCTLSTS_CLS
	.comm	_PCIELCTLSTS_NLW,4,2            ; @PCIELCTLSTS_NLW
	.no_dead_strip	_idt_ntb_link_is_up
.subsections_via_symbols
