	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_mem_timing_read        ## -- Begin function nouveau_mem_timing_read
	.p2align	4, 0x90
_nouveau_mem_timing_read:               ## @nouveau_mem_timing_read
	.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	%rsi, %r14
	callq	_nouveau_dev
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_nouveau_fb
	movl	(%r13), %ecx
	cmpl	$192, %ecx
	movl	$1110672, %edx                  ## imm = 0x10F290
	movl	$1049120, %ebx                  ## imm = 0x100220
	cmovgeq	%rdx, %rbx
	movl	$1110784, %edx                  ## imm = 0x10F300
	movl	$1049280, %esi                  ## imm = 0x1002C0
	cmovgel	%edx, %esi
	movl	$-1, (%r14)
	addl	$-132, %ecx
	cmpl	$4, %ecx
	ja	LBB0_13
## %bb.1:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movslq	%ecx, %rax
	leaq	l_switch.table.nouveau_mem_timing_read(%rip), %rcx
	movq	(%rcx,%rax,8), %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_nv_rd32
	movq	8(%r14), %rcx
	movl	%eax, (%rcx,%r12,4)
	incq	%r12
	addl	$4, %ebx
	cmpq	%r12, %r15
	jne	LBB0_2
## %bb.3:
	movl	$0, 16(%r14)
	cmpl	$132, (%r13)
	jg	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	movl	$1049128, %esi                  ## imm = 0x100228
	callq	_nv_rd32
	shrl	$24, %eax
	andl	$15, %eax
	incl	%eax
	movl	%eax, 16(%r14)
LBB0_5:
	movq	%r13, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_nv_rd32
	movq	24(%r14), %rcx
	movl	%eax, (%rcx)
	movl	%ebx, %esi
	orl	$4, %esi
	movq	%r13, %rdi
	callq	_nv_rd32
	movq	24(%r14), %rcx
	movl	%eax, 4(%rcx)
	movl	%ebx, %esi
	orl	$32, %esi
	movq	%r13, %rdi
	callq	_nv_rd32
	movq	24(%r14), %rcx
	movl	%eax, 8(%rcx)
	orl	$36, %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_nv_rd32
	movq	24(%r14), %rcx
	movl	%eax, 12(%rcx)
	movq	$0, 32(%r14)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	leal	-128(%rax), %edx
	cmpl	$2, %edx
	jb	LBB0_11
## %bb.6:
	cmpl	$131, %eax
	je	LBB0_7
## %bb.8:
	cmpl	$130, %eax
	jne	LBB0_13
## %bb.9:
	movl	4(%rcx), %edx
	shrl	$7, %edx
	andl	$4, %edx
	movl	%edx, 32(%r14)
	jmp	LBB0_10
LBB0_11:
	movl	4(%rcx), %eax
	andl	$3, %eax
	movl	%eax, 36(%r14)
	movl	4(%rcx), %eax
	shrl	$2, %eax
	andl	$3, %eax
	jmp	LBB0_12
LBB0_7:
	xorl	%edx, %edx
LBB0_10:
	movl	4(%rcx), %eax
	movl	%eax, %ecx
	shrl	$2, %ecx
	andl	$1, %ecx
	shrl	$5, %eax
	andl	$2, %eax
	orl	%edx, %eax
	orl	%ecx, %eax
LBB0_12:
	movl	%eax, 32(%r14)
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	3                               ## @switch.table.nouveau_mem_timing_read
l_switch.table.nouveau_mem_timing_read:
	.quad	5                               ## 0x5
	.quad	5                               ## 0x5
	.quad	9                               ## 0x9
	.quad	3                               ## 0x3
	.quad	3                               ## 0x3

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_mem_timing_read        ; -- Begin function nouveau_mem_timing_read
	.p2align	2
_nouveau_mem_timing_read:               ; @nouveau_mem_timing_read
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	w22, #552
	movk	w22, #16, lsl #16
	bl	_nouveau_dev
	mov	x21, x0
	bl	_nouveau_fb
	mov	w8, #544
	movk	w8, #16, lsl #16
	ldr	w9, [x21]
	mov	w10, #62096
	movk	w10, #16, lsl #16
	add	w11, w22, #152
	mov	w12, #62208
	movk	w12, #16, lsl #16
	cmp	w9, #191
	csel	w22, w12, w11, gt
	csel	x23, x10, x8, gt
	mov	w8, #-1
	str	w8, [x19]
	sub	w8, w9, #132
	cmp	w8, #4
	b.hi	LBB0_13
; %bb.1:
	mov	x20, x0
	mov	x24, #0
Lloh0:
	adrp	x9, l_switch.table.nouveau_mem_timing_read@PAGE
Lloh1:
	add	x9, x9, l_switch.table.nouveau_mem_timing_read@PAGEOFF
	ldr	x25, [x9, w8, sxtw #3]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x23
	bl	_nv_rd32
	ldr	x8, [x19, #8]
	str	w0, [x8, x24, lsl #2]
	add	x24, x24, #1
	add	w23, w23, #4
	cmp	x25, x24
	b.ne	LBB0_2
; %bb.3:
	str	wzr, [x19, #16]
	ldr	w8, [x21]
	cmp	w8, #132
	b.gt	LBB0_5
; %bb.4:
	mov	x0, x21
	mov	w1, #552
	movk	w1, #16, lsl #16
	bl	_nv_rd32
	ubfx	w8, w0, #24, #4
	add	w8, w8, #1
	str	w8, [x19, #16]
LBB0_5:
	mov	x0, x21
	mov	x1, x22
	bl	_nv_rd32
	ldr	x8, [x19, #24]
	str	w0, [x8]
	orr	w1, w22, #0x4
	mov	x0, x21
	bl	_nv_rd32
	ldr	x8, [x19, #24]
	str	w0, [x8, #4]
	orr	w1, w22, #0x20
	mov	x0, x21
	bl	_nv_rd32
	ldr	x8, [x19, #24]
	str	w0, [x8, #8]
	mov	w8, #36
	orr	w1, w22, w8
	mov	x0, x21
	bl	_nv_rd32
	ldr	x8, [x19, #24]
	str	w0, [x8, #12]
	str	xzr, [x19, #32]
	ldr	w9, [x20]
	sub	w10, w9, #128
	cmp	w10, #2
	b.lo	LBB0_9
; %bb.6:
	cmp	w9, #131
	b.eq	LBB0_10
; %bb.7:
	cmp	w9, #130
	b.ne	LBB0_13
; %bb.8:
	ldr	w9, [x8, #4]
	lsr	w9, w9, #7
	and	w9, w9, #0x4
	str	w9, [x19, #32]
	b	LBB0_11
LBB0_9:
	ldr	w9, [x8, #4]
	and	w9, w9, #0x3
	str	w9, [x19, #36]
	ldr	w8, [x8, #4]
	ubfx	w8, w8, #2, #2
	b	LBB0_12
LBB0_10:
	mov	w9, #0
LBB0_11:
	ldr	w8, [x8, #4]
	ubfx	w10, w8, #2, #1
	lsr	w8, w8, #5
	and	w8, w8, #0x2
	orr	w8, w8, w9
	orr	w8, w8, w10
LBB0_12:
	str	w8, [x19, #32]
LBB0_13:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	3                               ; @switch.table.nouveau_mem_timing_read
l_switch.table.nouveau_mem_timing_read:
	.quad	5                               ; 0x5
	.quad	5                               ; 0x5
	.quad	9                               ; 0x9
	.quad	3                               ; 0x3
	.quad	3                               ; 0x3

.subsections_via_symbols
