	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ast_get_vram_info
_ast_get_vram_info:                     ## @ast_get_vram_info
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_ast_open_key
	movq	_AST_IO_CRTC_PORT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$170, %edx
	movl	$255, %ecx
	callq	_ast_get_index_reg_mask
                                        ## kill: def $eax killed $eax def $rax
	andl	$3, %eax
	leaq	l_switch.table.ast_get_vram_info(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %r14d
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$153, %edx
	movl	$255, %ecx
	callq	_ast_get_index_reg_mask
	andl	$3, %eax
	cmpl	$3, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$2, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.3:
	addl	$-1048576, %r14d                ## imm = 0xFFF00000
	jmp	LBB0_6
LBB0_5:
	addl	$-4194304, %r14d                ## imm = 0xFFC00000
	jmp	LBB0_6
LBB0_4:
	addl	$-2097152, %r14d                ## imm = 0xFFE00000
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AST_VIDMEM_DEFAULT_SIZE,4,2    ## @AST_VIDMEM_DEFAULT_SIZE
	.comm	_AST_IO_CRTC_PORT,4,2           ## @AST_IO_CRTC_PORT
	.comm	_AST_VIDMEM_SIZE_8M,4,2         ## @AST_VIDMEM_SIZE_8M
	.comm	_AST_VIDMEM_SIZE_16M,4,2        ## @AST_VIDMEM_SIZE_16M
	.comm	_AST_VIDMEM_SIZE_32M,4,2        ## @AST_VIDMEM_SIZE_32M
	.comm	_AST_VIDMEM_SIZE_64M,4,2        ## @AST_VIDMEM_SIZE_64M
	.no_dead_strip	_ast_get_vram_info
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.ast_get_vram_info
l_switch.table.ast_get_vram_info:
	.quad	_AST_VIDMEM_SIZE_8M
	.quad	_AST_VIDMEM_SIZE_16M
	.quad	_AST_VIDMEM_SIZE_32M
	.quad	_AST_VIDMEM_SIZE_64M

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ast_get_vram_info
_ast_get_vram_info:                     ; @ast_get_vram_info
	.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
	ldr	x19, [x0]
	mov	x0, x19
	bl	_ast_open_key
Lloh0:
	adrp	x20, _AST_IO_CRTC_PORT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _AST_IO_CRTC_PORT@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #170
	mov	w3, #255
	bl	_ast_get_index_reg_mask
	and	w8, w0, #0x3
Lloh2:
	adrp	x9, l_switch.table.ast_get_vram_info@PAGE
Lloh3:
	add	x9, x9, l_switch.table.ast_get_vram_info@PAGEOFF
	ldr	x8, [x9, w8, uxtw #3]
	ldr	w21, [x8]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #153
	mov	w3, #255
	bl	_ast_get_index_reg_mask
	and	w8, w0, #0x3
	sub	w9, w21, #1024, lsl #12         ; =4194304
	sub	w10, w21, #512, lsl #12         ; =2097152
	sub	w11, w21, #256, lsl #12         ; =1048576
	cmp	w8, #1
	csel	w11, w21, w11, ne
	cmp	w8, #2
	csel	w10, w10, w11, eq
	cmp	w8, #3
	csel	w0, w9, w10, eq
	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
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AST_VIDMEM_DEFAULT_SIZE,4,2    ; @AST_VIDMEM_DEFAULT_SIZE
	.comm	_AST_IO_CRTC_PORT,4,2           ; @AST_IO_CRTC_PORT
	.comm	_AST_VIDMEM_SIZE_8M,4,2         ; @AST_VIDMEM_SIZE_8M
	.comm	_AST_VIDMEM_SIZE_16M,4,2        ; @AST_VIDMEM_SIZE_16M
	.comm	_AST_VIDMEM_SIZE_32M,4,2        ; @AST_VIDMEM_SIZE_32M
	.comm	_AST_VIDMEM_SIZE_64M,4,2        ; @AST_VIDMEM_SIZE_64M
	.no_dead_strip	_ast_get_vram_info
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.ast_get_vram_info
l_switch.table.ast_get_vram_info:
	.quad	_AST_VIDMEM_SIZE_8M
	.quad	_AST_VIDMEM_SIZE_16M
	.quad	_AST_VIDMEM_SIZE_32M
	.quad	_AST_VIDMEM_SIZE_64M

.subsections_via_symbols
