	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gk104_pcie_cap_speed
_gk104_pcie_cap_speed:                  ## @gk104_pcie_cap_speed
	.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
	callq	_gf100_pcie_cap_speed
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	jle	LBB0_4
## %bb.2:
	movl	(%rbx), %edi
	movl	$573888, %esi                   ## imm = 0x8C1C0
	callq	_nvkm_rd32
	shrl	$16, %eax
	andl	$3, %eax
	cmpl	$2, %eax
	jae	LBB0_5
LBB0_3:
	movq	_NVKM_PCIE_SPEED_2_5@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	jne	LBB0_7
## %bb.6:
	movq	_NVKM_PCIE_SPEED_5_0@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_NVKM_PCIE_SPEED_8_0@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_NVKM_PCIE_SPEED_2_5,4,2        ## @NVKM_PCIE_SPEED_2_5
	.comm	_NVKM_PCIE_SPEED_5_0,4,2        ## @NVKM_PCIE_SPEED_5_0
	.comm	_NVKM_PCIE_SPEED_8_0,4,2        ## @NVKM_PCIE_SPEED_8_0
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_gk104_pcie_cap_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gk104_pcie_cap_speed
_gk104_pcie_cap_speed:                  ; @gk104_pcie_cap_speed
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_gf100_pcie_cap_speed
	cbz	w0, LBB0_3
; %bb.1:
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	w0, [x19]
	mov	w1, #49600
	movk	w1, #8, lsl #16
	bl	_nvkm_rd32
	ubfx	w8, w0, #16, #2
	cmp	w8, #2
	b.hs	LBB0_7
LBB0_3:
Lloh0:
	adrp	x8, _NVKM_PCIE_SPEED_2_5@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVKM_PCIE_SPEED_2_5@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_5:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	b.ne	LBB0_9
; %bb.8:
Lloh5:
	adrp	x8, _NVKM_PCIE_SPEED_5_0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NVKM_PCIE_SPEED_5_0@GOTPAGEOFF]
	b	LBB0_4
LBB0_9:
Lloh7:
	adrp	x8, _NVKM_PCIE_SPEED_8_0@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NVKM_PCIE_SPEED_8_0@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NVKM_PCIE_SPEED_2_5,4,2        ; @NVKM_PCIE_SPEED_2_5
	.comm	_NVKM_PCIE_SPEED_5_0,4,2        ; @NVKM_PCIE_SPEED_5_0
	.comm	_NVKM_PCIE_SPEED_8_0,4,2        ; @NVKM_PCIE_SPEED_8_0
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_gk104_pcie_cap_speed
.subsections_via_symbols
