	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MappedMemoryLoadCoff           ## -- Begin function MappedMemoryLoadCoff
	.p2align	4, 0x90
_MappedMemoryLoadCoff:                  ## @MappedMemoryLoadCoff
	.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	$216, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_22
## %bb.1:
	movq	%rax, %r13
	leaq	-128(%rbp), %rdi
	movl	$48, %esi
	movl	$1, %edx
	movq	%rax, %rcx
	callq	_fread
	movl	-128(%rbp), %r12d
	movl	%r12d, %edi
	callq	_WordSwap
	movq	-120(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_DoubleWordSwap
	movq	%rbx, %rdi
	callq	_DoubleWordSwap
	movq	-112(%rbp), %rdi
	callq	_DoubleWordSwap
	movq	-104(%rbp), %rdi
	callq	_DoubleWordSwap
	movl	-96(%rbp), %ebx
	movl	%ebx, %edi
	callq	_WordSwap
	movl	-92(%rbp), %edi
	callq	_WordSwap
	movq	-88(%rbp), %rax
	cmpl	$5, (%rax)
	jne	LBB0_4
## %bb.2:
	cmpl	$56, %ebx
	jne	LBB0_4
## %bb.3:
	cmpl	$0, 4(%rax)
	jne	LBB0_4
## %bb.5:
	leaq	-184(%rbp), %rdi
	movl	$56, %esi
	movl	$1, %edx
	movq	%r13, %rcx
	callq	_fread
	movl	-184(%rbp), %edi
	callq	_WordSwap
	movq	-176(%rbp), %rdi
	callq	_DoubleWordSwap
	movq	-168(%rbp), %rdi
	callq	_DoubleWordSwap
	movq	-160(%rbp), %rdi
	callq	_DoubleWordSwap
	movq	-152(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_DoubleWordSwap
	movq	-144(%rbp), %rdi
	callq	_DoubleWordSwap
	movq	-136(%rbp), %rdi
	callq	_DoubleWordSwap
	movl	%r12d, %edi
	shll	$6, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_23
## %bb.6:
	movq	%rax, %r15
	testl	%r12d, %r12d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_20
## %bb.7:
	movslq	%r12d, %r12
	movq	%r15, %rbx
	movq	%r12, %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	$64, %esi
	movl	$1, %edx
	movq	%r13, %rcx
	callq	_fread
	movq	(%rbx), %rdi
	callq	_DoubleWordSwap
	movq	8(%rbx), %rdi
	callq	_DoubleWordSwap
	movq	16(%rbx), %rdi
	callq	_DoubleWordSwap
	movq	24(%rbx), %rdi
	callq	_DoubleWordSwap
	movq	32(%rbx), %rdi
	callq	_DoubleWordSwap
	movq	40(%rbx), %rdi
	callq	_DoubleWordSwap
	movl	48(%rbx), %edi
	callq	_WordSwap
	movl	52(%rbx), %edi
	callq	_WordSwap
	movq	56(%rbx), %rdi
	callq	_DoubleWordSwap
	addq	$64, %rbx
	decq	%r14
	jne	LBB0_8
## %bb.9:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_YabauseResetNoLoad
	xorl	%eax, %eax
	callq	_YabauseSpeedySetup
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_10
LBB0_4:
	movq	%r13, %rdi
	callq	_fclose
LBB0_22:
	movl	%r14d, %eax
	addq	$216, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%esi, %esi
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r12), %rdi
	callq	_SH2WriteNotify
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_19:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%r14
	cmpq	%r12, %r14
	je	LBB0_21
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	movq	%r14, %rbx
	shlq	$6, %rbx
	movq	16(%r15,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	$0, 24(%r15,%rbx)
	je	LBB0_19
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, %r13
	leaq	(%r15,%rbx), %r12
	addq	%rbx, %r15
	addq	$16, %r15
	movq	8(%r15), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_fseek
	movl	(%r15), %edx
	movq	%r13, %rdi
	movl	$1, %esi
	movq	%rbx, %rcx
	callq	_fread
	cmpq	$0, (%r15)
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r13, %rbx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rdi
	addq	%r13, %rdi
	movups	(%rbx), %xmm0
	movups	16(%rbx), %xmm1
	movups	32(%rbx), %xmm2
	movups	48(%rbx), %xmm3
	movups	%xmm3, 48(%rsp)
	movups	%xmm2, 32(%rsp)
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_MappedMemoryWriteByte
	incq	%r13
	movq	(%r15), %rsi
	addq	$64, %rbx
	cmpq	%rsi, %r13
	jb	LBB0_17
	jmp	LBB0_18
LBB0_23:
	movq	%r13, %rdi
	callq	_fclose
	movl	$-2, %r14d
	jmp	LBB0_22
LBB0_20:
	xorl	%eax, %eax
	callq	_YabauseResetNoLoad
	xorl	%eax, %eax
	callq	_YabauseSpeedySetup
LBB0_21:
	movq	%r15, %rdi
	callq	_free
	movq	%r13, %rdi
	callq	_fclose
	movq	_MSH2@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	%rdi, %rsi
	callq	_SH2GetRegisters
	movq	(%rbx), %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rdi)
	movq	%rdi, %rsi
	callq	_SH2SetRegisters
	xorl	%r14d, %r14d
	jmp	LBB0_22
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_fclose
	movq	%r15, %rdi
	callq	_free
	movl	$-2, %r14d
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_MSH2,8,3                       ## @MSH2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MappedMemoryLoadCoff           ; -- Begin function MappedMemoryLoadCoff
	.p2align	2
_MappedMemoryLoadCoff:                  ; @MappedMemoryLoadCoff
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #288
	.cfi_def_cfa_offset 288
	stp	x28, x27, [sp, #192]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #208]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #224]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #240]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #256]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #272]            ; 16-byte Folded Spill
	add	x29, sp, #272
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
	add	x0, sp, #136
	mov	w1, #48
	mov	w2, #1
	mov	x3, x19
	bl	_fread
	ldr	w20, [sp, #136]
	mov	x0, x20
	bl	_WordSwap
	ldr	x21, [sp, #144]
	mov	x0, x21
	bl	_DoubleWordSwap
	mov	x0, x21
	bl	_DoubleWordSwap
	ldr	x0, [sp, #152]
	bl	_DoubleWordSwap
	ldr	x0, [sp, #160]
	bl	_DoubleWordSwap
	ldr	w21, [sp, #168]
	mov	x0, x21
	bl	_WordSwap
	ldr	w0, [sp, #172]
	bl	_WordSwap
	ldr	x8, [sp, #176]
	ldr	w9, [x8]
	cmp	w9, #5
	b.ne	LBB0_9
; %bb.2:
	cmp	w21, #56
	b.ne	LBB0_9
; %bb.3:
	ldr	w8, [x8, #4]
	cbnz	w8, LBB0_9
; %bb.4:
	sxtw	x23, w20
	add	x0, sp, #80
	mov	w1, #56
	mov	w2, #1
	mov	x3, x19
	bl	_fread
	ldr	w0, [sp, #80]
	bl	_WordSwap
	ldr	x0, [sp, #88]
	bl	_DoubleWordSwap
	ldr	x0, [sp, #96]
	bl	_DoubleWordSwap
	ldr	x0, [sp, #104]
	bl	_DoubleWordSwap
	ldr	x20, [sp, #112]
	mov	x0, x20
	bl	_DoubleWordSwap
	ldr	x0, [sp, #120]
	bl	_DoubleWordSwap
	ldr	x0, [sp, #128]
	bl	_DoubleWordSwap
	lsl	w0, w23, #6
	bl	_malloc
	cbz	x0, LBB0_21
; %bb.5:
	mov	x21, x0
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	cbz	w23, LBB0_22
; %bb.6:
	mov	x22, x21
	mov	x24, x23
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	w1, #64
	mov	w2, #1
	mov	x3, x19
	bl	_fread
	ldr	x0, [x22]
	bl	_DoubleWordSwap
	ldr	x0, [x22, #8]
	bl	_DoubleWordSwap
	ldr	x0, [x22, #16]
	bl	_DoubleWordSwap
	ldr	x0, [x22, #24]
	bl	_DoubleWordSwap
	ldr	x0, [x22, #32]
	bl	_DoubleWordSwap
	ldr	x0, [x22, #40]
	bl	_DoubleWordSwap
	ldr	w0, [x22, #48]
	bl	_WordSwap
	ldr	w0, [x22, #52]
	bl	_WordSwap
	ldr	x0, [x22, #56]
	bl	_DoubleWordSwap
	add	x22, x22, #64
	subs	x24, x24, #1
	b.ne	LBB0_7
; %bb.8:
	bl	_YabauseResetNoLoad
	bl	_YabauseSpeedySetup
Lloh2:
	adrp	x25, _SEEK_SET@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SEEK_SET@GOTPAGEOFF]
	b	LBB0_15
LBB0_9:
	mov	x0, x19
	bl	_fclose
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #272]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #256]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #240]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #224]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #208]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #192]            ; 16-byte Folded Reload
	add	sp, sp, #288
	ret
LBB0_12:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x1, #0
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	x0, [x26]
	bl	_SH2WriteNotify
	mov	x0, x20
	bl	_free
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x24, x24, #1
	cmp	x24, x23
	b.eq	LBB0_23
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
	add	x26, x21, x24, lsl #6
	mov	x27, x26
	ldr	x0, [x27, #16]!
	cbz	x0, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x22, x26
	ldr	x8, [x22, #24]!
	cbz	x8, LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_malloc
	cbz	x0, LBB0_24
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x20, x0
	ldr	x1, [x22]
	ldr	w2, [x25]
	mov	x0, x19
	bl	_fseek
	ldr	w2, [x27]
	mov	x0, x20
	mov	w1, #1
	mov	x3, x19
	bl	_fread
	ldr	x8, [x27]
	cbz	x8, LBB0_12
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x28, #0
	mov	x22, x20
LBB0_20:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26]
	add	x0, x28, x8
	ldp	q0, q1, [x22]
	ldp	q2, q3, [x22, #32]
	stp	q2, q3, [sp, #48]
	stp	q0, q1, [sp, #16]
	add	x1, sp, #16
	bl	_MappedMemoryWriteByte
	add	x28, x28, #1
	ldr	x1, [x27]
	add	x22, x22, #64
	cmp	x28, x1
	b.lo	LBB0_20
	b	LBB0_13
LBB0_21:
	mov	x0, x19
	bl	_fclose
	mov	w0, #-2
	b	LBB0_11
LBB0_22:
	bl	_YabauseResetNoLoad
	bl	_YabauseSpeedySetup
LBB0_23:
	mov	x0, x21
	bl	_free
	mov	x0, x19
	bl	_fclose
Lloh4:
	adrp	x19, _MSH2@GOTPAGE
Lloh5:
	ldr	x19, [x19, _MSH2@GOTPAGEOFF]
	ldr	x0, [x19]
	mov	x1, x0
	bl	_SH2GetRegisters
	ldr	x0, [x19]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x8, [x0]
	mov	x1, x0
	bl	_SH2SetRegisters
	mov	w0, #0
	b	LBB0_11
LBB0_24:
	mov	x0, x19
	bl	_fclose
	mov	x0, x21
	bl	_free
	mov	w0, #-2
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_MSH2,8,3                       ; @MSH2
.subsections_via_symbols
