	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Atari800_LoadImage             ## -- Begin function Atari800_LoadImage
	.p2align	4, 0x90
_Atari800_LoadImage:                    ## @Atari800_LoadImage
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r15, %rdi
	movl	$1, %esi
	movl	%r12d, %edx
	movq	%rax, %rcx
	callq	_fread
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_fclose
	cmpl	%r12d, %r15d
	jne	LBB0_3
## %bb.6:
	movq	_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
LBB0_4:
	movq	%r14, %rsi
	callq	_Log_print
	movq	_FALSE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

L_.str.1:                               ## @.str.1
	.asciz	"Error loading ROM image: %s"

	.comm	_FALSE,4,2                      ## @FALSE
L_.str.2:                               ## @.str.2
	.asciz	"Error reading %s"

	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Atari800_LoadImage             ; -- Begin function Atari800_LoadImage
	.p2align	2
_Atari800_LoadImage:                    ; @Atari800_LoadImage
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	mov	x0, x21
	mov	w1, #1
	mov	x2, x20
	mov	x3, x22
	bl	_fread
	mov	x21, x0
	mov	x0, x22
	bl	_fclose
	cmp	w21, w20
	b.ne	LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _TRUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_5:
	mov	x1, x19
	bl	_Log_print
Lloh8:
	adrp	x8, _FALSE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

l_.str.1:                               ; @.str.1
	.asciz	"Error loading ROM image: %s"

	.comm	_FALSE,4,2                      ; @FALSE
l_.str.2:                               ; @.str.2
	.asciz	"Error reading %s"

	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
