	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gk104_pcie_max_speed
_gk104_pcie_max_speed:                  ## @gk104_pcie_max_speed
	.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), %edi
	movl	$573888, %esi                   ## imm = 0x8C1C0
	callq	_nvkm_rd32
	andl	$3145728, %eax                  ## imm = 0x300000
	je	LBB0_1
## %bb.2:
	cmpl	$2097152, %eax                  ## imm = 0x200000
	je	LBB0_5
## %bb.3:
	cmpl	$1048576, %eax                  ## imm = 0x100000
	jne	LBB0_5
## %bb.4:
	movq	_NVKM_PCIE_SPEED_5_0@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_NVKM_PCIE_SPEED_2_5@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	movq	_NVKM_PCIE_SPEED_8_0@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVKM_PCIE_SPEED_8_0,4,2        ## @NVKM_PCIE_SPEED_8_0
	.comm	_NVKM_PCIE_SPEED_5_0,4,2        ## @NVKM_PCIE_SPEED_5_0
	.comm	_NVKM_PCIE_SPEED_2_5,4,2        ## @NVKM_PCIE_SPEED_2_5
	.no_dead_strip	_gk104_pcie_max_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_max_speed
_gk104_pcie_max_speed:                  ; @gk104_pcie_max_speed
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w0, [x0]
	mov	w1, #49600
	movk	w1, #8, lsl #16
	bl	_nvkm_rd32
	ands	w8, w0, #0x300000
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _NVKM_PCIE_SPEED_2_5@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NVKM_PCIE_SPEED_2_5@GOTPAGEOFF]
Lloh2:
	adrp	x10, _NVKM_PCIE_SPEED_2_5@GOTPAGE
Lloh3:
	ldr	x10, [x10, _NVKM_PCIE_SPEED_2_5@GOTPAGEOFF]
	cmp	w8, #256, lsl #12               ; =1048576
Lloh4:
	adrp	x11, _NVKM_PCIE_SPEED_5_0@GOTPAGE
Lloh5:
	ldr	x11, [x11, _NVKM_PCIE_SPEED_5_0@GOTPAGEOFF]
	csel	x10, x10, x11, ne
	cmp	w8, #512, lsl #12               ; =2097152
	csel	x8, x9, x10, eq
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _NVKM_PCIE_SPEED_8_0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NVKM_PCIE_SPEED_8_0@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NVKM_PCIE_SPEED_8_0,4,2        ; @NVKM_PCIE_SPEED_8_0
	.comm	_NVKM_PCIE_SPEED_5_0,4,2        ; @NVKM_PCIE_SPEED_5_0
	.comm	_NVKM_PCIE_SPEED_2_5,4,2        ; @NVKM_PCIE_SPEED_2_5
	.no_dead_strip	_gk104_pcie_max_speed
.subsections_via_symbols
