	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_atom_get_memory_info    ## -- Begin function radeon_atom_get_memory_info
	.p2align	4, 0x90
_radeon_atom_get_memory_info:           ## @radeon_atom_get_memory_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	%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	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_VRAM_Info@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetIndexIntoMasterTable
	movl	%eax, %ebx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	(%r13), %rdi
	leaq	-64(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	leaq	-56(%rbp), %r9
	movl	%ebx, %esi
	callq	_atom_parse_data_header
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	(%r13), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx
	movl	-48(%rbp), %esi
	cmpl	$2, %esi
	je	LBB0_10
## %bb.2:
	cmpl	$1, %esi
	jne	LBB0_15
## %bb.3:
	movl	-44(%rbp), %edx
	cmpl	$4, %edx
	je	LBB0_17
## %bb.4:
	cmpl	$3, %edx
	jne	LBB0_22
## %bb.5:
	cmpl	%r12d, (%rax,%rcx)
	jle	LBB0_24
## %bb.6:
	movq	8(%rax,%rcx), %rbx
	testl	%r12d, %r12d
	jle	LBB0_21
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rbx), %edi
	callq	_le16_to_cpu
	testl	%eax, %eax
	je	LBB0_24
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	8(%rbx), %edi
	callq	_le16_to_cpu
	cltq
	leaq	(%rbx,%rax,4), %rbx
	decl	%r12d
	jne	LBB0_7
	jmp	LBB0_21
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_10:
	movl	-44(%rbp), %edx
	cmpl	$1, %edx
	jne	LBB0_16
## %bb.11:
	cmpl	%r12d, (%rax,%rcx)
	jle	LBB0_24
## %bb.12:
	movq	8(%rax,%rcx), %rbx
	testl	%r12d, %r12d
	jle	LBB0_21
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	8(%rbx), %edi
	callq	_le16_to_cpu
	testl	%eax, %eax
	je	LBB0_24
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	8(%rbx), %edi
	callq	_le16_to_cpu
	cltq
	leaq	(%rbx,%rax,4), %rbx
	decl	%r12d
	jne	LBB0_13
	jmp	LBB0_21
LBB0_15:
	movl	-44(%rbp), %edx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_23
LBB0_16:
	leaq	L_.str(%rip), %rdi
	movl	$2, %esi
	jmp	LBB0_23
LBB0_17:
	cmpl	%r12d, (%rax,%rcx)
	jle	LBB0_24
## %bb.18:
	movq	8(%rax,%rcx), %rbx
	testl	%r12d, %r12d
	jle	LBB0_21
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	8(%rbx), %edi
	callq	_le16_to_cpu
	testl	%eax, %eax
	je	LBB0_24
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	8(%rbx), %edi
	callq	_le16_to_cpu
	cltq
	leaq	(%rbx,%rax,4), %rbx
	decl	%r12d
	jne	LBB0_19
LBB0_21:
	movl	(%rbx), %eax
	andl	$15, %eax
	movl	%eax, (%r14)
	movl	$240, %eax
	andl	4(%rbx), %eax
	movl	%eax, 4(%r14)
	xorl	%r15d, %r15d
	jmp	LBB0_26
LBB0_22:
	leaq	L_.str(%rip), %rdi
	movl	$1, %esi
LBB0_23:
	callq	_DRM_ERROR
LBB0_24:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
LBB0_25:
	subl	(%rax), %r15d
LBB0_26:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DATA,4,2                       ## @DATA
	.comm	_VRAM_Info,4,2                  ## @VRAM_Info
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown table version %d, %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function radeon_atom_get_memory_info
lCPI0_0:
	.long	15                              ; 0xf
	.long	240                             ; 0xf0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_radeon_atom_get_memory_info
	.p2align	2
_radeon_atom_get_memory_info:           ; @radeon_atom_get_memory_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _VRAM_Info@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VRAM_Info@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_GetIndexIntoMasterTable
	mov	x22, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x0, [x21]
	add	x2, sp, #8
	add	x3, sp, #28
	add	x4, sp, #24
	add	x5, sp, #16
	mov	x1, x22
	bl	_atom_parse_data_header
	cbz	x0, LBB0_23
; %bb.1:
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	x9, [sp, #16]
	add	x8, x9, x8
	ldr	w1, [sp, #28]
	cmp	w1, #2
	b.eq	LBB0_9
; %bb.2:
	cmp	w1, #1
	b.ne	LBB0_14
; %bb.3:
	ldr	w2, [sp, #24]
	cmp	w2, #4
	b.eq	LBB0_16
; %bb.4:
	cmp	w2, #3
	b.ne	LBB0_21
; %bb.5:
	ldr	w9, [x8]
	cmp	w9, w20
	b.le	LBB0_23
; %bb.6:
	ldr	x21, [x8, #8]
	cmp	w20, #1
	b.lt	LBB0_20
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #8]
	bl	_le16_to_cpu
	cbz	w0, LBB0_23
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x21, #8]
	bl	_le16_to_cpu
	add	x21, x21, w0, sxtw #2
	subs	w20, w20, #1
	b.ne	LBB0_7
	b	LBB0_20
LBB0_9:
	ldr	w2, [sp, #24]
	cmp	w2, #1
	b.ne	LBB0_15
; %bb.10:
	ldr	w9, [x8]
	cmp	w9, w20
	b.le	LBB0_23
; %bb.11:
	ldr	x21, [x8, #8]
	cmp	w20, #1
	b.lt	LBB0_20
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #8]
	bl	_le16_to_cpu
	cbz	w0, LBB0_23
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x21, #8]
	bl	_le16_to_cpu
	add	x21, x21, w0, sxtw #2
	subs	w20, w20, #1
	b.ne	LBB0_12
	b	LBB0_20
LBB0_14:
	ldr	w2, [sp, #24]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_22
LBB0_15:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #2
	b	LBB0_22
LBB0_16:
	ldr	w9, [x8]
	cmp	w9, w20
	b.le	LBB0_23
; %bb.17:
	ldr	x21, [x8, #8]
	cmp	w20, #1
	b.lt	LBB0_20
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #8]
	bl	_le16_to_cpu
	cbz	w0, LBB0_23
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w0, [x21, #8]
	bl	_le16_to_cpu
	add	x21, x21, w0, sxtw #2
	subs	w20, w20, #1
	b.ne	LBB0_18
LBB0_20:
	mov	w0, #0
	ldr	d0, [x21]
Lloh10:
	adrp	x8, lCPI0_0@PAGE
Lloh11:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
	and.8b	v0, v0, v1
	str	d0, [x19]
	b	LBB0_24
LBB0_21:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #1
LBB0_22:
	bl	_DRM_ERROR
LBB0_23:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_24:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DATA,4,2                       ; @DATA
	.comm	_VRAM_Info,4,2                  ; @VRAM_Info
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown table version %d, %d\n"

.subsections_via_symbols
