	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function legacy_perf_init
_legacy_perf_init:                      ## @legacy_perf_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_nouveau_dev
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_nouveau_drm
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_nouveau_pm
	movq	%rax, %r14
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	cmpb	$5, 5(%rax,%rcx)
	jl	LBB0_2
## %bb.1:
	cmpb	$19, 6(%rax,%rcx)
	jg	LBB0_4
LBB0_2:
	leaq	L_.str(%rip), %rsi
LBB0_3:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_NV_DEBUG                       ## TAILCALL
LBB0_4:
	movsbl	115(%rax,%rcx), %esi
	movq	%rbx, %rdi
	callq	_ROMPTR
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movsbl	(%rax), %ecx
	leal	-1(%rcx), %edx
	cmpl	$23, %edx
	ja	LBB0_8
## %bb.7:
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rdx,4), %rdx
	addq	%rsi, %rdx
	jmpq	*%rdx
LBB0_9:
	incq	%rax
	movq	%rax, %rbx
LBB0_12:
	movq	8(%r14), %rax
	movl	4(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_sprintf
	movsbl	(%rbx), %edi
	callq	_ROM16
                                        ## kill: def $eax killed $eax def $rax
	shll	$2, %eax
	leal	(%rax,%rax,4), %eax
	movq	8(%r14), %rcx
	movl	%eax, (%rcx)
	movl	$1, (%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_10:
	leaq	8(%rax), %rcx
	movq	%rax, %rbx
	addq	$2, %rbx
	testb	$1, 1(%rax)
	cmovneq	%rcx, %rbx
	je	LBB0_12
## %bb.11:
	movq	_NV_PEXTDEV_BOOT_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_nv_rd32
                                        ## kill: def $eax killed $eax def $rax
	shrl	%eax
	andl	$30, %eax
	addq	%rax, %rbx
	jmp	LBB0_12
LBB0_8:
	movsbl	%cl, %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_NV_WARN                        ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BMP version too old for perf\n"

L_.str.1:                               ## @.str.1
	.asciz	"No memclock table pointer found.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unknown memclock table version %x.\n"

	.comm	_NV_PEXTDEV_BOOT_0,4,2          ## @NV_PEXTDEV_BOOT_0
L_.str.3:                               ## @.str.3
	.asciz	"performance_level_0"

	.no_dead_strip	_legacy_perf_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function legacy_perf_init
_legacy_perf_init:                      ; @legacy_perf_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	x22, x0
	bl	_nouveau_dev
	mov	x20, x0
	mov	x0, x22
	bl	_nouveau_drm
	mov	x21, x0
	mov	x0, x22
	bl	_nouveau_pm
	ldp	x8, x9, [x21]
	add	x8, x8, x9
	ldrsb	w9, [x8, #5]
	cmp	w9, #5
	b.lt	LBB0_2
; %bb.1:
	ldrsb	w9, [x8, #6]
	cmp	w9, #19
	b.gt	LBB0_4
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	mov	x0, x21
	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
	b	_NV_DEBUG
LBB0_4:
	mov	x19, x0
	ldrsb	w1, [x8, #115]
	mov	x0, x22
	bl	_ROMPTR
	cbz	x0, LBB0_9
; %bb.5:
	ldrsb	w8, [x0]
	sub	w9, w8, #1
	cmp	w9, #23
	b.hi	LBB0_12
; %bb.6:
Lloh2:
	adrp	x10, lJTI0_0@PAGE
Lloh3:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_7
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_7:
	add	x21, x0, #1
LBB0_8:
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_sprintf
	ldrsb	w0, [x21]
	bl	_ROM16
	add	w8, w0, w0, lsl #2
	lsl	w8, w8, #2
	ldr	x9, [x19, #8]
	str	w8, [x9]
	mov	w8, #1
	str	w8, [x19]
	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
LBB0_9:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_10:
	ldrb	w8, [x0, #1]
	tst	w8, #0x1
	mov	w9, #8
	mov	w10, #2
	csel	x9, x10, x9, eq
	add	x21, x0, x9
	tbz	w8, #0, LBB0_8
; %bb.11:
Lloh8:
	adrp	x8, _NV_PEXTDEV_BOOT_0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NV_PEXTDEV_BOOT_0@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nv_rd32
	lsr	w8, w0, #1
	and	w8, w8, #0x1e
	add	x21, x21, x8
	b	LBB0_8
LBB0_12:
	and	w8, w8, #0xff
	sxtb	w2, w8
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	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
	b	_NV_WARN
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BMP version too old for perf\n"

l_.str.1:                               ; @.str.1
	.asciz	"No memclock table pointer found.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unknown memclock table version %x.\n"

	.comm	_NV_PEXTDEV_BOOT_0,4,2          ; @NV_PEXTDEV_BOOT_0
l_.str.3:                               ; @.str.3
	.asciz	"performance_level_0"

	.no_dead_strip	_legacy_perf_init
.subsections_via_symbols
