	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function current_link_speed_show
_current_link_speed_show:               ## @current_link_speed_show
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	callq	_to_pci_dev
	movq	_PCI_EXP_LNKSTA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-12(%rbp), %rdx
	movq	%rax, %rdi
	callq	_pcie_capability_read_word
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	movq	_PCI_EXP_LNKSTA_CLS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-12(%rbp), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_3
## %bb.4:
	cltq
	leaq	l_reltable.current_link_speed_show(%rip), %rcx
	movslq	(%rcx,%rax,4), %rdx
	addq	%rcx, %rdx
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str.5(%rip), %rdx
LBB0_5:
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	callq	_sprintf
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_EXP_LNKSTA,4,2             ## @PCI_EXP_LNKSTA
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PCI_EXP_LNKSTA_CLS,4,2         ## @PCI_EXP_LNKSTA_CLS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"32 GT/s"

L_.str.1:                               ## @.str.1
	.asciz	"16 GT/s"

L_.str.2:                               ## @.str.2
	.asciz	"8 GT/s"

L_.str.3:                               ## @.str.3
	.asciz	"5 GT/s"

L_.str.4:                               ## @.str.4
	.asciz	"2.5 GT/s"

L_.str.5:                               ## @.str.5
	.asciz	"Unknown speed"

L_.str.6:                               ## @.str.6
	.asciz	"%s\n"

	.no_dead_strip	_current_link_speed_show
	.section	__TEXT,__const
	.p2align	2                               ## @reltable.current_link_speed_show
l_reltable.current_link_speed_show:
	.long	L_.str.2-l_reltable.current_link_speed_show
	.long	L_.str.3-l_reltable.current_link_speed_show
	.long	L_.str-l_reltable.current_link_speed_show
	.long	L_.str.4-l_reltable.current_link_speed_show
	.long	L_.str.1-l_reltable.current_link_speed_show

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function current_link_speed_show
_current_link_speed_show:               ; @current_link_speed_show
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	bl	_to_pci_dev
Lloh0:
	adrp	x8, _PCI_EXP_LNKSTA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_EXP_LNKSTA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pcie_capability_read_word
	cbz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	ldr	w8, [sp, #12]
Lloh6:
	adrp	x9, _PCI_EXP_LNKSTA_CLS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PCI_EXP_LNKSTA_CLS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w9, w8
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_4
; %bb.3:
Lloh9:
	adrp	x9, l_switch.table.current_link_speed_show@PAGE
Lloh10:
	add	x9, x9, l_switch.table.current_link_speed_show@PAGEOFF
	ldr	x2, [x9, w8, sxtw #3]
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x2, l_.str.5@PAGE
Lloh12:
	add	x2, x2, l_.str.5@PAGEOFF
LBB0_5:
Lloh13:
	adrp	x1, l_.str.6@PAGE
Lloh14:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_sprintf
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_EXP_LNKSTA,4,2             ; @PCI_EXP_LNKSTA
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PCI_EXP_LNKSTA_CLS,4,2         ; @PCI_EXP_LNKSTA_CLS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"32 GT/s"

l_.str.1:                               ; @.str.1
	.asciz	"16 GT/s"

l_.str.2:                               ; @.str.2
	.asciz	"8 GT/s"

l_.str.3:                               ; @.str.3
	.asciz	"5 GT/s"

l_.str.4:                               ; @.str.4
	.asciz	"2.5 GT/s"

l_.str.5:                               ; @.str.5
	.asciz	"Unknown speed"

l_.str.6:                               ; @.str.6
	.asciz	"%s\n"

	.no_dead_strip	_current_link_speed_show
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.current_link_speed_show
l_switch.table.current_link_speed_show:
	.quad	l_.str.2
	.quad	l_.str.3
	.quad	l_.str
	.quad	l_.str.4
	.quad	l_.str.1

.subsections_via_symbols
