	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_fb_bios_memtype           ## -- Begin function nvkm_fb_bios_memtype
	.p2align	4, 0x90
_nvkm_fb_bios_memtype:                  ## @nvkm_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	movl	$1052672, %esi                  ## imm = 0x101000
	callq	_nvkm_rd32
	shrl	$2, %eax
	andl	$15, %eax
	leaq	-24(%rbp), %rdx
	leaq	-20(%rbp), %rcx
	leaq	-16(%rbp), %r8
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_nvbios_M0203Em
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	-16(%rbp), %edx
	leal	-128(%rdx), %eax
	cmpl	$7, %eax
	jae	LBB0_4
## %bb.2:
	cltq
	leaq	l_switch.table.nvkm_fb_bios_memtype(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_nvkm_warn
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_nvkm_warn
LBB0_5:
	movq	_NVKM_RAM_TYPE_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVKM_RAM_TYPE_DDR2,4,2         ## @NVKM_RAM_TYPE_DDR2
	.comm	_NVKM_RAM_TYPE_DDR3,4,2         ## @NVKM_RAM_TYPE_DDR3
	.comm	_NVKM_RAM_TYPE_GDDR3,4,2        ## @NVKM_RAM_TYPE_GDDR3
	.comm	_NVKM_RAM_TYPE_GDDR5,4,2        ## @NVKM_RAM_TYPE_GDDR5
	.comm	_NVKM_RAM_TYPE_GDDR5X,4,2       ## @NVKM_RAM_TYPE_GDDR5X
	.comm	_NVKM_RAM_TYPE_GDDR6,4,2        ## @NVKM_RAM_TYPE_GDDR6
	.comm	_NVKM_RAM_TYPE_HBM2,4,2         ## @NVKM_RAM_TYPE_HBM2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"M0203E type %02x\n"

	.comm	_NVKM_RAM_TYPE_UNKNOWN,4,2      ## @NVKM_RAM_TYPE_UNKNOWN
L_.str.1:                               ## @.str.1
	.asciz	"M0203E not matched!\n"

	.section	__DATA,__const
	.p2align	3                               ## @switch.table.nvkm_fb_bios_memtype
l_switch.table.nvkm_fb_bios_memtype:
	.quad	_NVKM_RAM_TYPE_HBM2
	.quad	_NVKM_RAM_TYPE_GDDR6
	.quad	_NVKM_RAM_TYPE_GDDR5X
	.quad	_NVKM_RAM_TYPE_GDDR5
	.quad	_NVKM_RAM_TYPE_GDDR3
	.quad	_NVKM_RAM_TYPE_DDR3
	.quad	_NVKM_RAM_TYPE_DDR2

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_fb_bios_memtype           ; -- Begin function nvkm_fb_bios_memtype
	.p2align	2
_nvkm_fb_bios_memtype:                  ; @nvkm_fb_bios_memtype
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	ldr	x0, [x0]
	mov	w1, #4096
	movk	w1, #16, lsl #16
	bl	_nvkm_rd32
	ubfx	w1, w0, #2, #4
	add	x2, sp, #20
	add	x3, sp, #16
	add	x4, sp, #24
	mov	x0, x19
	bl	_nvbios_M0203Em
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [sp, #24]
	sub	w9, w8, #128
	cmp	w9, #7
	b.hs	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, l_switch.table.nvkm_fb_bios_memtype@PAGE
Lloh1:
	add	x8, x8, l_switch.table.nvkm_fb_bios_memtype@PAGEOFF
	ldr	x8, [x8, w9, sxtw #3]
	b	LBB0_6
LBB0_3:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
	str	x8, [sp]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
LBB0_5:
	mov	x0, x19
	bl	_nvkm_warn
Lloh6:
	adrp	x8, _NVKM_RAM_TYPE_UNKNOWN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NVKM_RAM_TYPE_UNKNOWN@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NVKM_RAM_TYPE_DDR2,4,2         ; @NVKM_RAM_TYPE_DDR2
	.comm	_NVKM_RAM_TYPE_DDR3,4,2         ; @NVKM_RAM_TYPE_DDR3
	.comm	_NVKM_RAM_TYPE_GDDR3,4,2        ; @NVKM_RAM_TYPE_GDDR3
	.comm	_NVKM_RAM_TYPE_GDDR5,4,2        ; @NVKM_RAM_TYPE_GDDR5
	.comm	_NVKM_RAM_TYPE_GDDR5X,4,2       ; @NVKM_RAM_TYPE_GDDR5X
	.comm	_NVKM_RAM_TYPE_GDDR6,4,2        ; @NVKM_RAM_TYPE_GDDR6
	.comm	_NVKM_RAM_TYPE_HBM2,4,2         ; @NVKM_RAM_TYPE_HBM2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"M0203E type %02x\n"

	.comm	_NVKM_RAM_TYPE_UNKNOWN,4,2      ; @NVKM_RAM_TYPE_UNKNOWN
l_.str.1:                               ; @.str.1
	.asciz	"M0203E not matched!\n"

	.section	__DATA,__const
	.p2align	3                               ; @switch.table.nvkm_fb_bios_memtype
l_switch.table.nvkm_fb_bios_memtype:
	.quad	_NVKM_RAM_TYPE_HBM2
	.quad	_NVKM_RAM_TYPE_GDDR6
	.quad	_NVKM_RAM_TYPE_GDDR5X
	.quad	_NVKM_RAM_TYPE_GDDR5
	.quad	_NVKM_RAM_TYPE_GDDR3
	.quad	_NVKM_RAM_TYPE_DDR3
	.quad	_NVKM_RAM_TYPE_DDR2

.subsections_via_symbols
