	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_content_load_ram_file          ## -- Begin function content_load_ram_file
	.p2align	4, 0x90
_content_load_ram_file:                 ## @content_load_ram_file
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %edx
	movq	$0, -24(%rbp)
	leaq	-56(%rbp), %rdi
	leaq	-32(%rbp), %rsi
	callq	_content_get_memory
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movl	-32(%rbp), %edi
	leaq	-24(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	callq	_filestream_read_file
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	movq	-40(%rbp), %rbx
	testq	%rbx, %rbx
	jle	LBB0_6
## %bb.3:
	cmpq	-56(%rbp), %rbx
	jle	LBB0_5
## %bb.4:
	movq	_MSG_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movl	%eax, %r14d
	movq	_MSG_TO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movl	-56(%rbp), %r8d
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_RARCH_WARN
	movq	-56(%rbp), %rbx
	movq	%rbx, -40(%rbp)
LBB0_5:
	movl	-48(%rbp), %edi
	movq	-24(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_memcpy
LBB0_6:
	movq	-24(%rbp), %rdi
	movl	$1, %ebx
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_free
LBB0_8:
	movl	%ebx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SRAM is larger than implementation expects, doing partial load (truncating %u %s %s %u).\n"

	.comm	_MSG_BYTES,4,2                  ## @MSG_BYTES
	.comm	_MSG_TO,4,2                     ## @MSG_TO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_content_load_ram_file          ; -- Begin function content_load_ram_file
	.p2align	2
_content_load_ram_file:                 ; @content_load_ram_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x2, x0
	str	xzr, [sp, #8]
	add	x0, sp, #16
	add	x1, sp, #32
	bl	_content_get_memory
	cbz	w0, LBB0_9
; %bb.1:
	ldr	w0, [sp, #32]
	add	x1, sp, #8
	sub	x2, x29, #24
	bl	_filestream_read_file
	cbz	w0, LBB0_9
; %bb.2:
	ldur	x19, [x29, #-24]
	cmp	x19, #1
	b.lt	LBB0_6
; %bb.3:
	ldr	x8, [sp, #16]
	cmp	x19, x8
	b.le	LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _MSG_BYTES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_BYTES@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x20, x0
Lloh3:
	adrp	x8, _MSG_TO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_TO@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x3, x0
	ldr	w4, [sp, #16]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_RARCH_WARN
	ldr	x19, [sp, #16]
	stur	x19, [x29, #-24]
LBB0_5:
	ldr	w0, [sp, #24]
	ldr	x1, [sp, #8]
	mov	x2, x19
	bl	_memcpy
LBB0_6:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_free
LBB0_8:
	mov	w0, #1
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SRAM is larger than implementation expects, doing partial load (truncating %u %s %s %u).\n"

	.comm	_MSG_BYTES,4,2                  ; @MSG_BYTES
	.comm	_MSG_TO,4,2                     ; @MSG_TO
.subsections_via_symbols
