	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AllocXEMemory
_AllocXEMemory:                         ## @AllocXEMemory
	.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	_MEMORY_ram_size@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$65, %eax
	jl	LBB0_5
## %bb.1:
	shll	$10, %eax
	addl	$-49152, %eax                   ## imm = 0xFFFF4000
	andl	$-16384, %eax                   ## imm = 0xC000
	movslq	%eax, %rbx
	movq	_atarixe_memory_size@GOTPCREL(%rip), %r14
	cmpq	%rbx, (%r14)
	je	LBB0_7
## %bb.2:
	movq	_atarixe_memory@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_free
LBB0_4:
	movq	%rbx, %rdi
	callq	_Util_malloc
	movq	%rax, (%r15)
	movq	%rbx, (%r14)
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memset                         ## TAILCALL
LBB0_5:
	movq	_atarixe_memory@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_free
	movq	$0, (%rbx)
	movq	_atarixe_memory_size@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEMORY_ram_size,4,2            ## @MEMORY_ram_size
	.comm	_atarixe_memory_size,8,3        ## @atarixe_memory_size
	.comm	_atarixe_memory,8,3             ## @atarixe_memory
	.no_dead_strip	_AllocXEMemory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AllocXEMemory
_AllocXEMemory:                         ; @AllocXEMemory
	.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
Lloh0:
	adrp	x8, _MEMORY_ram_size@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEMORY_ram_size@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #65
	b.lt	LBB0_5
; %bb.1:
	lsl	w8, w8, #10
	sub	w8, w8, #12, lsl #12            ; =49152
	and	w8, w8, #0xffffc000
	sxtw	x19, w8
Lloh3:
	adrp	x20, _atarixe_memory_size@GOTPAGE
Lloh4:
	ldr	x20, [x20, _atarixe_memory_size@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x8, x19
	b.eq	LBB0_7
; %bb.2:
Lloh5:
	adrp	x21, _atarixe_memory@GOTPAGE
Lloh6:
	ldr	x21, [x21, _atarixe_memory@GOTPAGEOFF]
	ldr	x0, [x21]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_free
LBB0_4:
	mov	x0, x19
	bl	_Util_malloc
	str	x0, [x21]
	str	x19, [x20]
	mov	w1, #0
	mov	x2, x19
	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
	b	_memset
LBB0_5:
Lloh7:
	adrp	x19, _atarixe_memory@GOTPAGE
Lloh8:
	ldr	x19, [x19, _atarixe_memory@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_free
	str	xzr, [x19]
Lloh9:
	adrp	x8, _atarixe_memory_size@GOTPAGE
Lloh10:
	ldr	x8, [x8, _atarixe_memory_size@GOTPAGEOFF]
Lloh11:
	str	xzr, [x8]
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MEMORY_ram_size,4,2            ; @MEMORY_ram_size
	.comm	_atarixe_memory_size,8,3        ; @atarixe_memory_size
	.comm	_atarixe_memory,8,3             ; @atarixe_memory
	.no_dead_strip	_AllocXEMemory
.subsections_via_symbols
