	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function idt_ntb_peer_link_is_up
_idt_ntb_peer_link_is_up:               ## @idt_ntb_peer_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	%rdi, %r13
	movq	8(%rdi), %rax
	movslq	%esi, %r15
	movzbl	(%rax,%r15,8), %eax
	movq	_portdata_tbl@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	leaq	(%rax,%rax,2), %rbx
	movl	8(%rcx,%rbx,4), %esi
	callq	_idt_sw_read
	movq	_IDT_SWPORTxSTS_LINKUP@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.1:
	movq	(%r12), %rax
	movl	4(%rax,%rbx,4), %esi
	movq	%r13, %rdi
	callq	_idt_sw_read
	movq	_IDT_PCICMDSTS_BME@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.2:
	movq	(%r12), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r13, %rdi
	callq	_idt_sw_read
	movq	_IDT_NTCTL_CPEN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	_IDT_NT_NTMTBLADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r13), %rax
	movl	4(%rax,%r15,8), %edx
	movq	%r13, %rdi
	callq	_idt_nt_write
	movq	_IDT_NT_NTMTBLDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_idt_nt_read
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movq	_IDT_NTMTBLDATA_VALID@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	testl	%r15d, (%rax)
	setne	%r14b
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_portdata_tbl,8,3               ## @portdata_tbl
	.comm	_IDT_SWPORTxSTS_LINKUP,4,2      ## @IDT_SWPORTxSTS_LINKUP
	.comm	_IDT_PCICMDSTS_BME,4,2          ## @IDT_PCICMDSTS_BME
	.comm	_IDT_NTCTL_CPEN,4,2             ## @IDT_NTCTL_CPEN
	.comm	_IDT_NT_NTMTBLADDR,4,2          ## @IDT_NT_NTMTBLADDR
	.comm	_IDT_NT_NTMTBLDATA,4,2          ## @IDT_NT_NTMTBLDATA
	.comm	_IDT_NTMTBLDATA_VALID,4,2       ## @IDT_NTMTBLDATA_VALID
	.no_dead_strip	_idt_ntb_peer_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_peer_link_is_up
_idt_ntb_peer_link_is_up:               ; @idt_ntb_peer_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, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	sbfiz	x9, x20, #3, #32
	ldrb	w21, [x8, x9]
Lloh0:
	adrp	x22, _portdata_tbl@GOTPAGE
Lloh1:
	ldr	x22, [x22, _portdata_tbl@GOTPAGEOFF]
	ldr	x8, [x22]
	mov	w9, #12
	madd	x8, x21, x9, x8
	ldr	w1, [x8, #8]
	bl	_idt_sw_read
Lloh2:
	adrp	x8, _IDT_SWPORTxSTS_LINKUP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IDT_SWPORTxSTS_LINKUP@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x22]
	mov	w9, #12
	madd	x8, x21, x9, x8
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_idt_sw_read
Lloh5:
	adrp	x8, _IDT_PCICMDSTS_BME@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IDT_PCICMDSTS_BME@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:
	ldr	x8, [x22]
	mov	w9, #12
	mul	x9, x21, x9
	ldr	w1, [x8, x9]
	mov	x0, x19
	bl	_idt_sw_read
Lloh8:
	adrp	x8, _IDT_NTCTL_CPEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IDT_NTCTL_CPEN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
	sxtw	x20, w20
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh11:
	adrp	x8, _IDT_NT_NTMTBLADDR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IDT_NT_NTMTBLADDR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	x8, [x19, #8]
	add	x8, x8, x20, lsl #3
	ldr	w2, [x8, #4]
	mov	x0, x19
	bl	_idt_nt_write
Lloh14:
	adrp	x8, _IDT_NT_NTMTBLDATA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IDT_NT_NTMTBLDATA@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_idt_nt_read
	mov	x20, x0
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh17:
	adrp	x8, _IDT_NTMTBLDATA_VALID@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IDT_NTMTBLDATA_VALID@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w20
	cset	w0, ne
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_portdata_tbl,8,3               ; @portdata_tbl
	.comm	_IDT_SWPORTxSTS_LINKUP,4,2      ; @IDT_SWPORTxSTS_LINKUP
	.comm	_IDT_PCICMDSTS_BME,4,2          ; @IDT_PCICMDSTS_BME
	.comm	_IDT_NTCTL_CPEN,4,2             ; @IDT_NTCTL_CPEN
	.comm	_IDT_NT_NTMTBLADDR,4,2          ; @IDT_NT_NTMTBLADDR
	.comm	_IDT_NT_NTMTBLDATA,4,2          ; @IDT_NT_NTMTBLDATA
	.comm	_IDT_NTMTBLDATA_VALID,4,2       ; @IDT_NTMTBLDATA_VALID
	.no_dead_strip	_idt_ntb_peer_link_is_up
.subsections_via_symbols
