	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_perf_ramcfg            ## -- Begin function nouveau_perf_ramcfg
	.p2align	4, 0x90
_nouveau_perf_ramcfg:                   ## @nouveau_perf_ramcfg
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r13
	callq	_nouveau_dev
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_nouveau_drm
	movq	%rax, %r14
	movq	%rbx, %rdi
	movl	$1052672, %esi                  ## imm = 0x101000
	callq	_nv_rd32
	movl	%eax, %ebx
	shrl	$2, %ebx
	andl	$15, %ebx
	movslq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	8(%r14), %rcx
	addq	%rax, %rbx
	movq	(%rcx,%rbx,8), %rbx
LBB0_2:
	leaq	-64(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movq	%r13, %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %r9
	callq	_nouveau_perf_rammap
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.3:
	cmpq	-56(%rbp), %rbx
	jae	LBB0_5
## %bb.4:
	movq	-64(%rbp), %rax
	leaq	(%rcx,%rax,8), %rax
	imulq	(%r14), %rbx
	leaq	(%rax,%rbx,8), %rax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_perf_ramcfg            ; -- Begin function nouveau_perf_ramcfg
	.p2align	2
_nouveau_perf_ramcfg:                   ; @nouveau_perf_ramcfg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_nouveau_dev
	mov	x24, x0
	mov	x0, x22
	bl	_nouveau_drm
	mov	x23, x0
	mov	x0, x24
	mov	w1, #4096
	movk	w1, #16, lsl #16
	bl	_nv_rd32
	ubfx	w24, w0, #2, #4
	ldrsw	x8, [x23]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	x9, [x23, #8]
	add	x8, x24, x8
	ldr	x24, [x9, x8, lsl #3]
LBB0_2:
	add	x3, sp, #8
	mov	x4, sp
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x5, x19
	bl	_nouveau_perf_rammap
	mov	x8, x0
	mov	x0, #0
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x9, [sp]
	cmp	x24, x9
	b.hs	LBB0_5
; %bb.4:
	ldr	x9, [sp, #8]
	add	x8, x8, x9, lsl #3
	ldr	x9, [x19]
	mul	x9, x9, x24
	add	x0, x8, x9, lsl #3
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
