	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_mem_gddr3_mr
_nouveau_mem_gddr3_mr:                  ## @nouveau_mem_gddr3_mr
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%r8, %r15
	movl	%ecx, %ebx
	movq	%rdx, %r13
	callq	_nouveau_drm
	movq	%rax, %r14
	cmpl	$14, %ebx
	jg	LBB0_2
## %bb.1:
	movl	(%r15), %eax
	movl	4(%r15), %esi
	jmp	LBB0_3
LBB0_2:
	movl	(%r13), %esi
	movl	%esi, %eax
	shrl	$4, %eax
	andl	$3, %eax
	andl	$7, %esi
LBB0_3:
	movl	%eax, (%r12)
	movl	%esi, 4(%r12)
	movq	8(%r13), %rax
	movq	_NV_MEM_CL_GDDR3_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_4
## %bb.5:
	movq	16(%r13), %rcx
	movq	_NV_MEM_WR_GDDR3_MAX@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jae	LBB0_6
## %bb.8:
	cmpl	$4, %esi
	jl	LBB0_10
## %bb.9:
	movl	16(%r12), %edx
	movl	%esi, %ecx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_NV_WARN
	movl	$0, 4(%r12)
	movq	8(%r13), %rax
	movq	16(%r13), %rcx
LBB0_10:
	movq	8(%r15), %rdx
	movl	$3595, %esi                     ## imm = 0xE0B
	andl	(%rdx), %esi
	movq	_nv_mem_cl_lut_gddr3@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movl	(%rdi,%rax,4), %eax
	movl	%eax, %edi
	shll	$4, %edi
	andl	$112, %edi
	orl	%esi, %edi
	shrl	$2, %eax
	andl	$2, %eax
	orl	%edi, %eax
	movq	8(%r12), %rsi
	movl	%eax, (%rsi)
	movl	$1052480, %edi                  ## imm = 0x100F40
	andl	4(%rdx), %edi
	orl	(%r12), %edi
	movl	4(%r12), %ebx
	shll	$2, %ebx
	orl	%edi, %ebx
	movq	_nv_mem_wr_lut_gddr3@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movl	(%rdi,%rcx,4), %ecx
	shll	$4, %ecx
	movzbl	%cl, %r8d
	orl	%ebx, %r8d
	movl	%r8d, 4(%rsi)
	movl	8(%rdx), %r9d
	movl	%r9d, 8(%rsi)
	movl	16(%r12), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_NV_DEBUG
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_4:
	movl	16(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rax, %rcx
	jmp	LBB0_7
LBB0_6:
	movl	16(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
LBB0_7:
	callq	_NV_WARN
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_MEM_CL_GDDR3_MAX,8,3        ## @NV_MEM_CL_GDDR3_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%u) Invalid tCL: %u"

	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_NV_MEM_WR_GDDR3_MAX,8,3        ## @NV_MEM_WR_GDDR3_MAX
L_.str.1:                               ## @.str.1
	.asciz	"(%u) Invalid tWR: %u"

L_.str.2:                               ## @.str.2
	.asciz	"(%u) Invalid odt value, assuming autocal: %x"

	.comm	_nv_mem_cl_lut_gddr3,8,3        ## @nv_mem_cl_lut_gddr3
	.comm	_nv_mem_wr_lut_gddr3,8,3        ## @nv_mem_wr_lut_gddr3
L_.str.3:                               ## @.str.3
	.asciz	"(%u) MR: %08x %08x %08x"

	.no_dead_strip	_nouveau_mem_gddr3_mr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_mem_gddr3_mr
_nouveau_mem_gddr3_mr:                  ; @nouveau_mem_gddr3_mr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x5
	mov	x21, x4
	mov	x23, x3
	mov	x22, x2
	bl	_nouveau_drm
	mov	x19, x0
	cmp	w23, #14
	b.gt	LBB0_2
; %bb.1:
	ldp	w8, w9, [x21]
	b	LBB0_3
LBB0_2:
	ldr	w9, [x22]
	ubfx	w8, w9, #4, #2
	and	w9, w9, #0x7
LBB0_3:
	stp	w8, w9, [x20]
	ldr	x8, [x22, #8]
Lloh0:
	adrp	x10, _NV_MEM_CL_GDDR3_MAX@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NV_MEM_CL_GDDR3_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x8, x10
	b.hs	LBB0_8
; %bb.4:
	ldr	x3, [x22, #16]
Lloh3:
	adrp	x10, _NV_MEM_WR_GDDR3_MAX@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NV_MEM_WR_GDDR3_MAX@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x3, x10
	b.hs	LBB0_9
; %bb.5:
	cmp	w9, #4
	b.lt	LBB0_7
; %bb.6:
	ldr	w2, [x20, #16]
	mov	w3, w9
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_NV_WARN
	str	wzr, [x20, #4]
	ldp	x8, x3, [x22, #8]
LBB0_7:
	ldr	x9, [x21, #8]
	ldr	w10, [x9]
	mov	w11, #3595
	and	w10, w10, w11
Lloh8:
	adrp	x11, _nv_mem_cl_lut_gddr3@GOTPAGE
Lloh9:
	ldr	x11, [x11, _nv_mem_cl_lut_gddr3@GOTPAGEOFF]
Lloh10:
	ldr	x11, [x11]
	ldr	w8, [x11, x8, lsl #2]
	bfi	w10, w8, #4, #3
	lsr	w8, w8, #2
	and	w8, w8, #0x2
	orr	w8, w10, w8
	ldr	x10, [x20, #8]
	str	w8, [x10]
	ldr	w11, [x9, #4]
	mov	w12, #3904
	movk	w12, #16, lsl #16
	and	w11, w11, w12
	ldp	w12, w13, [x20]
	orr	w11, w11, w12
	orr	w11, w11, w13, lsl #2
Lloh11:
	adrp	x12, _nv_mem_wr_lut_gddr3@GOTPAGE
Lloh12:
	ldr	x12, [x12, _nv_mem_wr_lut_gddr3@GOTPAGEOFF]
Lloh13:
	ldr	x12, [x12]
	ldr	w12, [x12, x3, lsl #2]
	ubfiz	w12, w12, #4, #4
	orr	w4, w11, w12
	str	w4, [x10, #4]
	ldr	w5, [x9, #8]
	str	w5, [x10, #8]
	ldr	w2, [x20, #16]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x3, x8
	bl	_NV_DEBUG
	mov	w0, #0
	b	LBB0_11
LBB0_8:
	ldr	w2, [x20, #16]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x8
	b	LBB0_10
LBB0_9:
	ldr	w2, [x20, #16]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
LBB0_10:
	bl	_NV_WARN
Lloh20:
	adrp	x8, _ERANGE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_MEM_CL_GDDR3_MAX,8,3        ; @NV_MEM_CL_GDDR3_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%u) Invalid tCL: %u"

	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_NV_MEM_WR_GDDR3_MAX,8,3        ; @NV_MEM_WR_GDDR3_MAX
l_.str.1:                               ; @.str.1
	.asciz	"(%u) Invalid tWR: %u"

l_.str.2:                               ; @.str.2
	.asciz	"(%u) Invalid odt value, assuming autocal: %x"

	.comm	_nv_mem_cl_lut_gddr3,8,3        ; @nv_mem_cl_lut_gddr3
	.comm	_nv_mem_wr_lut_gddr3,8,3        ; @nv_mem_wr_lut_gddr3
l_.str.3:                               ; @.str.3
	.asciz	"(%u) MR: %08x %08x %08x"

	.no_dead_strip	_nouveau_mem_gddr3_mr
.subsections_via_symbols
