	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XboxMemGetMemoryMap            ## -- Begin function XboxMemGetMemoryMap
	.p2align	4, 0x90
_XboxMemGetMemoryMap:                   ## @XboxMemGetMemoryMap
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	movq	_XboxMemoryMap@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_AvailableMemoryMb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$20, %edx
	movq	_LoaderFree@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%esi, %esi
	callq	_SetMemory
	movq	_FrameBufferSize@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	movq	_FrameBuffer@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LoaderFirmwarePermanent@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %r8
	callq	_ReserveMemory
LBB0_2:
	movl	(%rbx), %edi
	callq	_PcMemFinalizeMemoryMap
	movl	%eax, (%r14)
	movl	(%rbx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"XboxMemGetMemoryMap()\n"

	.comm	_XboxMemoryMap,4,2              ## @XboxMemoryMap
	.comm	_AvailableMemoryMb,4,2          ## @AvailableMemoryMb
	.comm	_LoaderFree,4,2                 ## @LoaderFree
	.comm	_FrameBufferSize,8,3            ## @FrameBufferSize
	.comm	_FrameBuffer,8,3                ## @FrameBuffer
	.comm	_LoaderFirmwarePermanent,4,2    ## @LoaderFirmwarePermanent
L_.str.1:                               ## @.str.1
	.asciz	"Video memory"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XboxMemGetMemoryMap            ; -- Begin function XboxMemGetMemoryMap
	.p2align	2
_XboxMemGetMemoryMap:                   ; @XboxMemGetMemoryMap
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
Lloh2:
	adrp	x20, _XboxMemoryMap@GOTPAGE
Lloh3:
	ldr	x20, [x20, _XboxMemoryMap@GOTPAGEOFF]
Lloh4:
	adrp	x8, _AvailableMemoryMb@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AvailableMemoryMb@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh6:
	ldr	w8, [x8]
	lsl	w2, w8, #20
Lloh7:
	adrp	x8, _LoaderFree@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LoaderFree@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	mov	w1, #0
	bl	_SetMemory
Lloh10:
	adrp	x8, _FrameBufferSize@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FrameBufferSize@GOTPAGEOFF]
Lloh12:
	ldr	x2, [x8]
	cbz	x2, LBB0_2
; %bb.1:
	ldr	w0, [x20]
Lloh13:
	adrp	x8, _FrameBuffer@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FrameBuffer@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _LoaderFirmwarePermanent@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LoaderFirmwarePermanent@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
Lloh19:
	adrp	x4, l_.str.1@PAGE
Lloh20:
	add	x4, x4, l_.str.1@PAGEOFF
	bl	_ReserveMemory
LBB0_2:
	ldr	w0, [x20]
	bl	_PcMemFinalizeMemoryMap
	str	w0, [x19]
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"XboxMemGetMemoryMap()\n"

	.comm	_XboxMemoryMap,4,2              ; @XboxMemoryMap
	.comm	_AvailableMemoryMb,4,2          ; @AvailableMemoryMb
	.comm	_LoaderFree,4,2                 ; @LoaderFree
	.comm	_FrameBufferSize,8,3            ; @FrameBufferSize
	.comm	_FrameBuffer,8,3                ; @FrameBuffer
	.comm	_LoaderFirmwarePermanent,4,2    ; @LoaderFirmwarePermanent
l_.str.1:                               ; @.str.1
	.asciz	"Video memory"

.subsections_via_symbols
