	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MappedMemoryLoadExec           ## -- Begin function MappedMemoryLoadExec
	.p2align	4, 0x90
_MappedMemoryLoadExec:                  ## @MappedMemoryLoadExec
	.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	%esi, %r14d
	movq	%rdi, %r15
	movl	$46, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, %rdi
	callq	_strdup
	movq	%rax, %r12
	movb	(%rax), %al
	testb	%al, %al
	je	LBB0_5
## %bb.2:
	movsbl	%al, %edi
	callq	_toupper
	movb	%al, (%r12)
	movq	%r12, %rdi
	callq	_strlen
	cmpq	$2, %rax
	jb	LBB0_5
## %bb.3:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	(%r12,%rbx), %edi
	callq	_toupper
	movb	%al, (%r12,%rbx)
	incq	%rbx
	movq	%r12, %rdi
	callq	_strlen
	cmpq	%rax, %rbx
	jb	LBB0_4
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%r12, %rdi
	callq	_free
LBB0_12:
	xorl	%eax, %eax
	callq	_YabauseResetNoLoad
	xorl	%eax, %eax
	callq	_YabauseSpeedySetup
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_MappedMemoryLoad
	movq	_MSH2@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	%rdi, %rsi
	callq	_SH2GetRegisters
	movq	(%rbx), %rdi
	movl	%r14d, (%rdi)
	movq	%rdi, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_SH2SetRegisters                ## TAILCALL
LBB0_7:
	movq	%r15, %rdi
	callq	_MappedMemoryLoadCoff
	jmp	LBB0_8
LBB0_10:
	movq	%r15, %rdi
	callq	_MappedMemoryLoadElf
LBB0_8:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".COF"

L_.str.1:                               ## @.str.1
	.asciz	".COFF"

L_.str.2:                               ## @.str.2
	.asciz	".ELF"

	.comm	_MSH2,8,3                       ## @MSH2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MappedMemoryLoadExec           ; -- Begin function MappedMemoryLoadExec
	.p2align	2
_MappedMemoryLoadExec:                  ; @MappedMemoryLoadExec
	.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	x19, x1
	mov	x20, x0
	mov	w1, #46
	bl	_strrchr
	cbz	x0, LBB0_9
; %bb.1:
	bl	_strdup
	mov	x21, x0
	ldrb	w8, [x0]
	cbz	w8, LBB0_5
; %bb.2:
	sxtb	w0, w8
	bl	_toupper
	strb	w0, [x21]
	mov	x0, x21
	bl	_strlen
	cmp	x0, #2
	b.lo	LBB0_5
; %bb.3:
	mov	w22, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x21, x22]
	bl	_toupper
	strb	w0, [x21, x22]
	add	x22, x22, #1
	mov	x0, x21
	bl	_strlen
	cmp	x22, x0
	b.lo	LBB0_4
LBB0_5:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.6:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.7:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbz	x0, LBB0_11
; %bb.8:
	mov	x0, x21
	bl	_free
LBB0_9:
	bl	_YabauseResetNoLoad
	bl	_YabauseSpeedySetup
	mov	x0, x20
	mov	x1, x19
	bl	_MappedMemoryLoad
Lloh6:
	adrp	x20, _MSH2@GOTPAGE
Lloh7:
	ldr	x20, [x20, _MSH2@GOTPAGEOFF]
	ldr	x0, [x20]
	mov	x1, x0
	bl	_SH2GetRegisters
	ldr	x0, [x20]
	str	w19, [x0]
	mov	x1, x0
	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	_SH2SetRegisters
LBB0_10:
	mov	x0, x20
	bl	_MappedMemoryLoadCoff
	b	LBB0_12
LBB0_11:
	mov	x0, x20
	bl	_MappedMemoryLoadElf
LBB0_12:
	mov	x0, x21
	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	_free
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".COF"

l_.str.1:                               ; @.str.1
	.asciz	".COFF"

l_.str.2:                               ; @.str.2
	.asciz	".ELF"

	.comm	_MSH2,8,3                       ; @MSH2
.subsections_via_symbols
