	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcie_get_speed_cap             ## -- Begin function pcie_get_speed_cap
	.p2align	4, 0x90
_pcie_get_speed_cap:                    ## @pcie_get_speed_cap
	.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	%rdi, %rbx
	movq	_PCI_EXP_LNKCAP2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	callq	_pcie_capability_read_dword
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	_PCI_EXP_LNKCAP2_SLS_32_0GB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.2:
	movq	_PCIE_SPEED_32_0GT@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_3:
	movq	_PCI_EXP_LNKCAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pcie_capability_read_dword
	movq	_PCI_EXP_LNKCAP_SLS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-12(%rbp), %eax
	movq	_PCI_EXP_LNKCAP_SLS_5_0GB@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
LBB0_13:
	movq	_PCIE_SPEED_5_0GT@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_5:
	movq	_PCI_EXP_LNKCAP2_SLS_16_0GB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.6:
	movq	_PCIE_SPEED_16_0GT@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_7:
	movq	_PCI_EXP_LNKCAP_SLS_2_5GB@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_15
LBB0_8:
	movq	_PCIE_SPEED_2_5GT@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_10:
	movq	_PCI_EXP_LNKCAP2_SLS_8_0GB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:
	movq	_PCIE_SPEED_8_0GT@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_12:
	movq	_PCI_EXP_LNKCAP2_SLS_5_0GB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_13
## %bb.14:
	movq	_PCI_EXP_LNKCAP2_SLS_2_5GB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_8
LBB0_15:
	movq	_PCI_SPEED_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_EXP_LNKCAP2,4,2            ## @PCI_EXP_LNKCAP2
	.comm	_PCI_EXP_LNKCAP2_SLS_32_0GB,4,2 ## @PCI_EXP_LNKCAP2_SLS_32_0GB
	.comm	_PCIE_SPEED_32_0GT,4,2          ## @PCIE_SPEED_32_0GT
	.comm	_PCI_EXP_LNKCAP2_SLS_16_0GB,4,2 ## @PCI_EXP_LNKCAP2_SLS_16_0GB
	.comm	_PCIE_SPEED_16_0GT,4,2          ## @PCIE_SPEED_16_0GT
	.comm	_PCI_EXP_LNKCAP2_SLS_8_0GB,4,2  ## @PCI_EXP_LNKCAP2_SLS_8_0GB
	.comm	_PCIE_SPEED_8_0GT,4,2           ## @PCIE_SPEED_8_0GT
	.comm	_PCI_EXP_LNKCAP2_SLS_5_0GB,4,2  ## @PCI_EXP_LNKCAP2_SLS_5_0GB
	.comm	_PCIE_SPEED_5_0GT,4,2           ## @PCIE_SPEED_5_0GT
	.comm	_PCI_EXP_LNKCAP2_SLS_2_5GB,4,2  ## @PCI_EXP_LNKCAP2_SLS_2_5GB
	.comm	_PCIE_SPEED_2_5GT,4,2           ## @PCIE_SPEED_2_5GT
	.comm	_PCI_SPEED_UNKNOWN,4,2          ## @PCI_SPEED_UNKNOWN
	.comm	_PCI_EXP_LNKCAP,4,2             ## @PCI_EXP_LNKCAP
	.comm	_PCI_EXP_LNKCAP_SLS,4,2         ## @PCI_EXP_LNKCAP_SLS
	.comm	_PCI_EXP_LNKCAP_SLS_5_0GB,4,2   ## @PCI_EXP_LNKCAP_SLS_5_0GB
	.comm	_PCI_EXP_LNKCAP_SLS_2_5GB,4,2   ## @PCI_EXP_LNKCAP_SLS_2_5GB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcie_get_speed_cap             ; -- Begin function pcie_get_speed_cap
	.p2align	2
_pcie_get_speed_cap:                    ; @pcie_get_speed_cap
	.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, x0
Lloh0:
	adrp	x8, _PCI_EXP_LNKCAP2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_EXP_LNKCAP2@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pcie_capability_read_dword
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, _PCI_EXP_LNKCAP2_SLS_32_0GB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCI_EXP_LNKCAP2_SLS_32_0GB@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %b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PAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _PCI_SPEED_UNKNOWN@GOTPAGE
Lloh28:
	ldr	x10, [x10, _PCI_SPEED_UNKNOWN@GOTPAGEOFF]
Lloh29:
	adrp	x11, _PCIE_SPEED_2_5GT@GOTPAGE
Lloh30:
	ldr	x11, [x11, _PCIE_SPEED_2_5GT@GOTPAGEOFF]
	cmp	w8, w9
LBB0_8:
	csel	x8, x11, x10, eq
	b	LBB0_11
LBB0_9:
Lloh31:
	adrp	x9, _PCI_EXP_LNKCAP2_SLS_8_0GB@GOTPAGE
Lloh32:
	ldr	x9, [x9, _PCI_EXP_LNKCAP2_SLS_8_0GB@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.10:
Lloh34:
	adrp	x8, _PCIE_SPEED_8_0GT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _PCIE_SPEED_8_0GT@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_12:
Lloh36:
	adrp	x9, _PCI_EXP_LNKCAP2_SLS_5_0GB@GOTPAGE
Lloh37:
	ldr	x9, [x9, _PCI_EXP_LNKCAP2_SLS_5_0GB@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.13:
Lloh39:
	adrp	x9, _PCI_EXP_LNKCAP2_SLS_2_5GB@GOTPAGE
Lloh40:
	ldr	x9, [x9, _PCI_EXP_LNKCAP2_SLS_2_5GB@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
Lloh42:
	adrp	x10, _PCIE_SPEED_2_5GT@GOTPAGE
Lloh43:
	ldr	x10, [x10, _PCIE_SPEED_2_5GT@GOTPAGEOFF]
Lloh44:
	adrp	x11, _PCI_SPEED_UNKNOWN@GOTPAGE
Lloh45:
	ldr	x11, [x11, _PCI_SPEED_UNKNOWN@GOTPAGEOFF]
	tst	w9, w8
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_EXP_LNKCAP2,4,2            ; @PCI_EXP_LNKCAP2
	.comm	_PCI_EXP_LNKCAP2_SLS_32_0GB,4,2 ; @PCI_EXP_LNKCAP2_SLS_32_0GB
	.comm	_PCIE_SPEED_32_0GT,4,2          ; @PCIE_SPEED_32_0GT
	.comm	_PCI_EXP_LNKCAP2_SLS_16_0GB,4,2 ; @PCI_EXP_LNKCAP2_SLS_16_0GB
	.comm	_PCIE_SPEED_16_0GT,4,2          ; @PCIE_SPEED_16_0GT
	.comm	_PCI_EXP_LNKCAP2_SLS_8_0GB,4,2  ; @PCI_EXP_LNKCAP2_SLS_8_0GB
	.comm	_PCIE_SPEED_8_0GT,4,2           ; @PCIE_SPEED_8_0GT
	.comm	_PCI_EXP_LNKCAP2_SLS_5_0GB,4,2  ; @PCI_EXP_LNKCAP2_SLS_5_0GB
	.comm	_PCIE_SPEED_5_0GT,4,2           ; @PCIE_SPEED_5_0GT
	.comm	_PCI_EXP_LNKCAP2_SLS_2_5GB,4,2  ; @PCI_EXP_LNKCAP2_SLS_2_5GB
	.comm	_PCIE_SPEED_2_5GT,4,2           ; @PCIE_SPEED_2_5GT
	.comm	_PCI_SPEED_UNKNOWN,4,2          ; @PCI_SPEED_UNKNOWN
	.comm	_PCI_EXP_LNKCAP,4,2             ; @PCI_EXP_LNKCAP
	.comm	_PCI_EXP_LNKCAP_SLS,4,2         ; @PCI_EXP_LNKCAP_SLS
	.comm	_PCI_EXP_LNKCAP_SLS_5_0GB,4,2   ; @PCI_EXP_LNKCAP_SLS_5_0GB
	.comm	_PCI_EXP_LNKCAP_SLS_2_5GB,4,2   ; @PCI_EXP_LNKCAP_SLS_2_5GB
.subsections_via_symbols
