	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_fb_bios_memtype        ## -- Begin function nouveau_fb_bios_memtype
	.p2align	4, 0x90
_nouveau_fb_bios_memtype:               ## @nouveau_fb_bios_memtype
	.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	%rdi, %rbx
	movl	$1052672, %esi                  ## imm = 0x101000
	callq	_nv_rd32
	movl	%eax, %r14d
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$77, %esi
	callq	_bit_entry
	movq	_NV_MEM_TYPE_UNKNOWN@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	cmpl	$2, -64(%rbp)
	jne	LBB0_11
## %bb.2:
	cmpl	$5, -60(%rbp)
	jl	LBB0_11
## %bb.3:
	movq	-56(%rbp), %rsi
	addq	$3, %rsi
	movq	%rbx, %rdi
	callq	_nv_ro16
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_nv_ro08
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leal	1(%r15), %esi
	movq	%rbx, %rdi
	callq	_nv_ro08
	movl	%eax, %r12d
	leal	2(%r15), %esi
	movq	%rbx, %rdi
	callq	_nv_ro08
	movl	%eax, %r13d
	leal	3(%r15), %esi
	movq	%rbx, %rdi
	callq	_nv_ro08
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.4:
	cmpl	$16, -44(%rbp)                  ## 4-byte Folded Reload
	jne	LBB0_10
## %bb.5:
	shrl	$2, %r14d
	andl	$15, %r14d
	cmpl	%eax, %r14d
	jge	LBB0_10
## %bb.6:
	addl	%r15d, %r12d
	imull	%r14d, %r13d
	addl	%r12d, %r13d
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_nv_ro08
	andl	$15, %eax
	cmpl	$3, %eax
	movq	_NV_MEM_TYPE_UNKNOWN@GOTPCREL(%rip), %rcx
	ja	LBB0_11
## %bb.7:
	movl	%eax, %eax
	leaq	l_switch.table.nouveau_fb_bios_memtype(%rip), %rcx
	movq	(%rcx,%rax,8), %rcx
	jmp	LBB0_11
LBB0_10:
	movq	_NV_MEM_TYPE_UNKNOWN@GOTPCREL(%rip), %rcx
LBB0_11:
	movl	(%rcx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_MEM_TYPE_DDR2,4,2           ## @NV_MEM_TYPE_DDR2
	.comm	_NV_MEM_TYPE_DDR3,4,2           ## @NV_MEM_TYPE_DDR3
	.comm	_NV_MEM_TYPE_GDDR3,4,2          ## @NV_MEM_TYPE_GDDR3
	.comm	_NV_MEM_TYPE_GDDR5,4,2          ## @NV_MEM_TYPE_GDDR5
	.comm	_NV_MEM_TYPE_UNKNOWN,4,2        ## @NV_MEM_TYPE_UNKNOWN
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.nouveau_fb_bios_memtype
l_switch.table.nouveau_fb_bios_memtype:
	.quad	_NV_MEM_TYPE_DDR2
	.quad	_NV_MEM_TYPE_DDR3
	.quad	_NV_MEM_TYPE_GDDR3
	.quad	_NV_MEM_TYPE_GDDR5

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_fb_bios_memtype        ; -- Begin function nouveau_fb_bios_memtype
	.p2align	2
_nouveau_fb_bios_memtype:               ; @nouveau_fb_bios_memtype
	.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, x0
	mov	w1, #4096
	movk	w1, #16, lsl #16
	bl	_nv_rd32
	mov	x20, x0
	mov	x2, sp
	mov	x0, x19
	mov	w1, #77
	bl	_bit_entry
Lloh0:
	adrp	x8, _NV_MEM_TYPE_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NV_MEM_TYPE_UNKNOWN@GOTPAGEOFF]
	cbnz	w0, LBB0_8
; %bb.1:
	ldp	w9, w10, [sp]
	cmp	w9, #2
	ccmp	w10, #5, #8, eq
	b.lt	LBB0_8
; %bb.2:
	ldr	x8, [sp, #8]
	add	x1, x8, #3
	mov	x0, x19
	bl	_nv_ro16
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_nv_ro08
	mov	x23, x0
	add	w1, w21, #1
	mov	x0, x19
	bl	_nv_ro08
	mov	x22, x0
	add	w1, w21, #2
	mov	x0, x19
	bl	_nv_ro08
	mov	x24, x0
	add	w1, w21, #3
	mov	x0, x19
	bl	_nv_ro08
Lloh2:
	adrp	x8, _NV_MEM_TYPE_UNKNOWN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NV_MEM_TYPE_UNKNOWN@GOTPAGEOFF]
	cbz	w21, LBB0_8
; %bb.3:
	cmp	w23, #16
	b.ne	LBB0_8
; %bb.4:
	ubfx	w9, w20, #2, #4
	cmp	w9, w0
	b.ge	LBB0_8
; %bb.5:
	add	w8, w22, w21
	madd	w1, w24, w9, w8
	mov	x0, x19
	bl	_nv_ro08
	and	w8, w0, #0xf
	cmp	w8, #3
	b.hi	LBB0_7
; %bb.6:
Lloh4:
	adrp	x9, l_switch.table.nouveau_fb_bios_memtype@PAGE
Lloh5:
	add	x9, x9, l_switch.table.nouveau_fb_bios_memtype@PAGEOFF
	ldr	x8, [x9, w8, uxtw #3]
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x8, _NV_MEM_TYPE_UNKNOWN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NV_MEM_TYPE_UNKNOWN@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_MEM_TYPE_DDR2,4,2           ; @NV_MEM_TYPE_DDR2
	.comm	_NV_MEM_TYPE_DDR3,4,2           ; @NV_MEM_TYPE_DDR3
	.comm	_NV_MEM_TYPE_GDDR3,4,2          ; @NV_MEM_TYPE_GDDR3
	.comm	_NV_MEM_TYPE_GDDR5,4,2          ; @NV_MEM_TYPE_GDDR5
	.comm	_NV_MEM_TYPE_UNKNOWN,4,2        ; @NV_MEM_TYPE_UNKNOWN
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.nouveau_fb_bios_memtype
l_switch.table.nouveau_fb_bios_memtype:
	.quad	_NV_MEM_TYPE_DDR2
	.quad	_NV_MEM_TYPE_DDR3
	.quad	_NV_MEM_TYPE_GDDR3
	.quad	_NV_MEM_TYPE_GDDR5

.subsections_via_symbols
