	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_mem_ddr3_mr
_nouveau_mem_ddr3_mr:                   ## @nouveau_mem_ddr3_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%r8, %r15
	movl	%ecx, %ebx
	movq	%rdx, %r14
	callq	_nouveau_drm
	movl	(%r14), %ecx
	movq	$0, 24(%r12)
	cmpl	$14, %ebx
	jg	LBB0_2
## %bb.1:
	movl	(%r15), %edx
	jmp	LBB0_3
LBB0_2:
	movl	4(%r14), %edx
	andl	$7, %edx
LBB0_3:
	movl	%edx, (%r12)
	cmpl	$4, %ecx
	jl	LBB0_5
## %bb.4:
	movq	_NV_MEM_CL_DDR3_MAX@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jge	LBB0_5
## %bb.7:
	movl	8(%r14), %r8d
	cmpl	$4, %r8d
	jl	LBB0_9
## %bb.8:
	movq	_NV_MEM_WR_DDR3_MAX@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r8d
	jge	LBB0_9
## %bb.10:
	movl	12(%r14), %r9d
	cmpl	$4, %r9d
	jg	LBB0_12
## %bb.11:
	movl	16(%r12), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rdi
	movl	%r9d, %ecx
	jmp	LBB0_6
LBB0_5:
	movl	16(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	jmp	LBB0_6
LBB0_9:
	movl	16(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	movl	%r8d, %ecx
LBB0_6:
	callq	_NV_WARN
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	addl	$-4, %ecx
	movq	8(%r15), %r9
	movl	$6155, %esi                     ## imm = 0x180B
	andl	(%r9), %esi
	movl	%ecx, %edi
	shll	$4, %edi
	andl	$112, %edi
	shrl	%ecx
	andl	$4, %ecx
	orl	%edi, %ecx
	orl	%esi, %ecx
	movq	_nv_mem_wr_lut_ddr3@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rsi,%r8,4), %ebx
	shll	$9, %ebx
	orl	%ecx, %ebx
	movq	8(%r12), %rcx
	movl	%ebx, (%rcx)
	movl	$1056187, %esi                  ## imm = 0x101DBB
	andl	4(%r9), %esi
	movl	(%r12), %edi
	movl	%edi, %edx
	andl	$1, %edx
	leal	(%rsi,%rdx,4), %edx
	movl	%edi, %esi
	shll	$5, %esi
	andl	$64, %esi
	orl	%edx, %esi
	andl	$4, %edi
	shll	$7, %edi
	orl	%esi, %edi
	movl	%edi, 4(%rcx)
	movl	$2162615, %edx                  ## imm = 0x20FFB7
	andl	8(%r9), %edx
	movl	12(%r14), %esi
	leal	-40(,%rsi,8), %r8d
	orl	%edx, %r8d
	movl	%r8d, 8(%rcx)
	movl	16(%r12), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%rax, %rdi
	movl	%ebx, %ecx
	callq	_NV_DEBUG
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_MEM_CL_DDR3_MAX,4,2         ## @NV_MEM_CL_DDR3_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%u) Invalid tCL: %u"

	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_NV_MEM_WR_DDR3_MAX,4,2         ## @NV_MEM_WR_DDR3_MAX
L_.str.1:                               ## @.str.1
	.asciz	"(%u) Invalid tWR: %u"

L_.str.2:                               ## @.str.2
	.asciz	"(%u) Invalid tCWL: %u"

	.comm	_nv_mem_wr_lut_ddr3,8,3         ## @nv_mem_wr_lut_ddr3
L_.str.3:                               ## @.str.3
	.asciz	"(%u) MR: %08x %08x"

	.no_dead_strip	_nouveau_mem_ddr3_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_ddr3_mr
_nouveau_mem_ddr3_mr:                   ; @nouveau_mem_ddr3_mr
	.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, x5
	mov	x21, x4
	mov	x22, x3
	mov	x20, x2
	bl	_nouveau_drm
	ldr	w3, [x20]
	str	xzr, [x19, #24]
	cmp	w22, #14
	b.gt	LBB0_2
; %bb.1:
	ldr	w8, [x21]
	b	LBB0_3
LBB0_2:
	ldr	w8, [x20, #4]
	and	w8, w8, #0x7
LBB0_3:
	str	w8, [x19]
Lloh0:
	adrp	x8, _NV_MEM_CL_DDR3_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NV_MEM_CL_DDR3_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w3, #4
	ccmp	w3, w8, #0, ge
	b.lt	LBB0_5
; %bb.4:
	ldr	w2, [x19, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_5:
	ldr	w8, [x20, #8]
Lloh5:
	adrp	x9, _NV_MEM_WR_DDR3_MAX@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NV_MEM_WR_DDR3_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, #4
	ccmp	w8, w9, #0, ge
	b.lt	LBB0_7
; %bb.6:
	ldr	w2, [x19, #16]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x8
	b	LBB0_9
LBB0_7:
	ldr	w9, [x20, #12]
	cmp	w9, #4
	b.gt	LBB0_11
; %bb.8:
	ldr	w2, [x19, #16]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x3, x9
LBB0_9:
	bl	_NV_WARN
Lloh12:
	adrp	x8, _ERANGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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_11:
	sub	w9, w3, #4
	ldr	x10, [x21, #8]
	ldr	w11, [x10]
	mov	w12, #6155
	and	w11, w11, w12
	lsr	w12, w9, #1
	and	w12, w12, #0x4
Lloh15:
	adrp	x13, _nv_mem_wr_lut_ddr3@GOTPAGE
Lloh16:
	ldr	x13, [x13, _nv_mem_wr_lut_ddr3@GOTPAGEOFF]
Lloh17:
	ldr	x13, [x13]
	ldr	w8, [x13, x8, lsl #2]
	bfi	w12, w9, #4, #3
	orr	w9, w12, w11
	orr	w3, w9, w8, lsl #9
	ldr	x8, [x19, #8]
	str	w3, [x8]
	ldr	w9, [x10, #4]
	mov	w11, #7611
	movk	w11, #16, lsl #16
	and	w9, w9, w11
	ldr	w11, [x19]
	lsr	w12, w11, #2
	lsr	w13, w11, #1
	bfi	w9, w11, #2, #1
	bfi	w9, w13, #6, #1
	bfi	w9, w12, #9, #1
	str	w9, [x8, #4]
	ldr	w9, [x10, #8]
	mov	w10, #65463
	movk	w10, #32, lsl #16
	and	w9, w9, w10
	ldr	w10, [x20, #12]
	lsl	w10, w10, #3
	sub	w10, w10, #40
	orr	w4, w10, w9
	str	w4, [x8, #8]
	ldr	w2, [x19, #16]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_NV_DEBUG
	mov	w0, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_MEM_CL_DDR3_MAX,4,2         ; @NV_MEM_CL_DDR3_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%u) Invalid tCL: %u"

	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_NV_MEM_WR_DDR3_MAX,4,2         ; @NV_MEM_WR_DDR3_MAX
l_.str.1:                               ; @.str.1
	.asciz	"(%u) Invalid tWR: %u"

l_.str.2:                               ; @.str.2
	.asciz	"(%u) Invalid tCWL: %u"

	.comm	_nv_mem_wr_lut_ddr3,8,3         ; @nv_mem_wr_lut_ddr3
l_.str.3:                               ; @.str.3
	.asciz	"(%u) MR: %08x %08x"

	.no_dead_strip	_nouveau_mem_ddr3_mr
.subsections_via_symbols
