	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_pcie_init                 ## -- Begin function nvkm_pcie_init
	.p2align	4, 0x90
_nvkm_pcie_init:                        ## @nvkm_pcie_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_nvkm_pcie_get_version
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_nvkm_pcie_get_max_version
	movl	%eax, %r15d
	testl	%eax, %eax
	jle	LBB0_4
## %bb.2:
	cmpl	%r14d, %r15d
	jle	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_nvkm_pcie_set_version
	movl	%eax, %r14d
LBB0_4:
	cmpl	%r15d, %r14d
	jge	LBB0_6
## %bb.5:
	leaq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_nvkm_error
LBB0_6:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_8:
	movl	(%rbx), %esi
	cmpl	$-1, %esi
	je	LBB0_10
## %bb.9:
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	callq	_nvkm_pcie_set_link
LBB0_10:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"couldn't raise version: %i\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_pcie_init                 ; -- Begin function nvkm_pcie_init
	.p2align	2
_nvkm_pcie_init:                        ; @nvkm_pcie_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	bl	_nvkm_pcie_get_version
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_nvkm_pcie_get_max_version
	mov	x21, x0
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.2:
	cmp	w21, w20
	b.le	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	bl	_nvkm_pcie_set_version
	mov	x20, x0
LBB0_4:
	cmp	w20, w21
	b.ge	LBB0_6
; %bb.5:
	add	x0, x19, #16
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_nvkm_error
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	blr	x8
LBB0_8:
	ldr	w1, [x19]
	cmn	w1, #1
	b.eq	LBB0_10
; %bb.9:
	ldr	w2, [x19, #4]
	mov	x0, x19
	bl	_nvkm_pcie_set_link
LBB0_10:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"couldn't raise version: %i\n"

.subsections_via_symbols
