	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amd_link_is_up
_amd_link_is_up:                        ## @amd_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
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.1:
	movq	_AMD_LINK_UP_EVENT@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.2:
	movl	$0, (%rdi)
	movl	$1, %eax
	popq	%rbp
	retq
LBB0_8:
	movl	4(%rdi), %edi
	popq	%rbp
	jmp	_NTB_LNK_STA_ACTIVE             ## TAILCALL
LBB0_3:
	movq	_AMD_PEER_RESET_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %eax
	je	LBB0_5
## %bb.4:
	notl	%eax
	andl	%eax, %ecx
	movl	%ecx, (%rdi)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_5:
	movq	_AMD_PEER_D0_EVENT@GOTPCREL(%rip), %rax
	movq	_AMD_LINK_DOWN_EVENT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	xorl	%eax, %eax
	testl	%ecx, %edx
	je	LBB0_7
## %bb.6:
	movl	$0, (%rdi)
LBB0_7:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_LINK_UP_EVENT,4,2          ## @AMD_LINK_UP_EVENT
	.comm	_AMD_PEER_RESET_EVENT,4,2       ## @AMD_PEER_RESET_EVENT
	.comm	_AMD_PEER_D0_EVENT,4,2          ## @AMD_PEER_D0_EVENT
	.comm	_AMD_LINK_DOWN_EVENT,4,2        ## @AMD_LINK_DOWN_EVENT
	.no_dead_strip	_amd_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_link_is_up
_amd_link_is_up:                        ; @amd_link_is_up
	.cfi_startproc
; %bb.0:
	ldr	w9, [x0]
	cbz	w9, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _AMD_LINK_UP_EVENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMD_LINK_UP_EVENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_4
; %bb.2:
	str	wzr, [x0]
	mov	w0, #1
	ret
LBB0_3:
	ldr	w0, [x0, #4]
	b	_NTB_LNK_STA_ACTIVE
LBB0_4:
Lloh3:
	adrp	x8, _AMD_PEER_RESET_EVENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AMD_PEER_RESET_EVENT@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x8]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.5:
	bic	w9, w9, w10
	str	w9, [x0]
	mov	w0, #0
	ret
LBB0_6:
Lloh6:
	adrp	x8, _AMD_PEER_D0_EVENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AMD_PEER_D0_EVENT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x10, _AMD_LINK_DOWN_EVENT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _AMD_LINK_DOWN_EVENT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w8, w10, w8
	tst	w8, w9
	b.eq	LBB0_8
; %bb.7:
	str	wzr, [x0]
LBB0_8:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_LINK_UP_EVENT,4,2          ; @AMD_LINK_UP_EVENT
	.comm	_AMD_PEER_RESET_EVENT,4,2       ; @AMD_PEER_RESET_EVENT
	.comm	_AMD_PEER_D0_EVENT,4,2          ; @AMD_PEER_D0_EVENT
	.comm	_AMD_LINK_DOWN_EVENT,4,2        ; @AMD_LINK_DOWN_EVENT
	.no_dead_strip	_amd_link_is_up
.subsections_via_symbols
