	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_md_cart_context_load           ## -- Begin function md_cart_context_load
	.p2align	4, 0x90
_md_cart_context_load:                  ## @md_cart_context_load
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_m68k@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_sram@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_cart@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r9
	xorl	%ecx, %ecx
	movq	_sram_read_byte@GOTPCREL(%rip), %r11
	movq	_sram_read_word@GOTPCREL(%rip), %r10
	movq	_sram_write_byte@GOTPCREL(%rip), %r15
	movq	_sram_write_word@GOTPCREL(%rip), %r14
	movq	_zbank_memory_map@GOTPCREL(%rip), %r12
	xorps	%xmm0, %xmm0
	movq	_zbank_unused_w@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	shll	$16, %r8d
	movslq	%r8d, %rsi
	addq	%r9, %rsi
	movq	%rsi, (%rax)
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	addq	$4, %rcx
	addq	$40, %rax
	cmpq	$256, %rcx                      ## imm = 0x100
	je	LBB0_7
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%rcx), %r8d
	cmpl	$255, %r8d
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rdx, (%rax)
	movq	(%r11), %rsi
	movq	%rsi, 32(%rax)
	movq	(%r10), %rsi
	movq	%rsi, 24(%rax)
	movq	(%r15), %rsi
	movq	%rsi, 16(%rax)
	movl	(%r14), %esi
	movl	%esi, 8(%rax)
	movq	(%r11), %rsi
	movq	(%r12), %rbx
	movq	%rsi, 8(%rbx,%rcx,4)
	movq	(%r15), %rsi
	movq	(%r12), %rbx
	movq	%rsi, (%rbx,%rcx,4)
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%rdx, (%rax)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movups	%xmm0, 24(%rax)
	movq	_m68k_unused_8_w@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	%rsi, 16(%rax)
	movq	_m68k_unused_16_w@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, 8(%rax)
	movq	(%r12), %rsi
	movq	$0, 8(%rsi,%rcx,4)
	movq	(%r13), %rsi
	movq	(%r12), %rbx
	movq	%rsi, (%rbx,%rcx,4)
	jmp	LBB0_5
LBB0_7:
	movq	_cart@GOTPCREL(%rip), %rax
	movq	8(%rax), %rdi
	movl	$8, %esi
	callq	_load_param
	movq	_svp@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	16(%rax), %rdi
	movl	$2048, %esi                     ## imm = 0x800
	callq	_load_param
	movq	(%rbx), %rax
	movq	8(%rax), %rdi
	movl	$8, %esi
	callq	_load_param
	movq	(%rbx), %rdi
	movl	$4, %esi
	callq	_load_param
LBB0_9:
	movl	$64, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sram,8,3                       ## @sram
	.comm	_m68k,8,3                       ## @m68k
	.comm	_sram_read_byte,8,3             ## @sram_read_byte
	.comm	_sram_read_word,8,3             ## @sram_read_word
	.comm	_sram_write_byte,8,3            ## @sram_write_byte
	.comm	_sram_write_word,4,2            ## @sram_write_word
	.comm	_zbank_memory_map,8,3           ## @zbank_memory_map
	.comm	_m68k_unused_8_w,8,3            ## @m68k_unused_8_w
	.comm	_m68k_unused_16_w,4,2           ## @m68k_unused_16_w
	.comm	_zbank_unused_w,8,3             ## @zbank_unused_w
	.comm	_cart,16,3                      ## @cart
	.comm	_svp,8,3                        ## @svp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_md_cart_context_load           ; -- Begin function md_cart_context_load
	.p2align	2
_md_cart_context_load:                  ; @md_cart_context_load
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x8, #0
	mov	x9, #0
Lloh0:
	adrp	x10, _m68k@GOTPAGE
Lloh1:
	ldr	x10, [x10, _m68k@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
Lloh3:
	adrp	x12, _sram@GOTPAGE
Lloh4:
	ldr	x12, [x12, _sram@GOTPAGEOFF]
Lloh5:
	adrp	x11, _cart@GOTPAGE
Lloh6:
	ldr	x11, [x11, _cart@GOTPAGEOFF]
Lloh7:
	ldr	x12, [x12]
	ldr	x13, [x11]
Lloh8:
	adrp	x14, _sram_read_byte@GOTPAGE
Lloh9:
	ldr	x14, [x14, _sram_read_byte@GOTPAGEOFF]
Lloh10:
	adrp	x15, _sram_read_word@GOTPAGE
Lloh11:
	ldr	x15, [x15, _sram_read_word@GOTPAGEOFF]
Lloh12:
	adrp	x16, _sram_write_byte@GOTPAGE
Lloh13:
	ldr	x16, [x16, _sram_write_byte@GOTPAGEOFF]
Lloh14:
	adrp	x17, _sram_write_word@GOTPAGE
Lloh15:
	ldr	x17, [x17, _sram_write_word@GOTPAGEOFF]
Lloh16:
	adrp	x1, _zbank_memory_map@GOTPAGE
Lloh17:
	ldr	x1, [x1, _zbank_memory_map@GOTPAGEOFF]
Lloh18:
	adrp	x2, _m68k_unused_8_w@GOTPAGE
Lloh19:
	ldr	x2, [x2, _m68k_unused_8_w@GOTPAGEOFF]
Lloh20:
	adrp	x3, _m68k_unused_16_w@GOTPAGE
Lloh21:
	ldr	x3, [x3, _m68k_unused_16_w@GOTPAGEOFF]
Lloh22:
	adrp	x4, _zbank_unused_w@GOTPAGE
Lloh23:
	ldr	x4, [x4, _zbank_unused_w@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	lsl	w5, w5, #16
	add	x5, x13, w5, sxtw
	str	x5, [x10, x9]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x0, x0, #4
	add	x9, x9, #40
	add	x8, x8, #16
	cmp	x9, #2560
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w5, [x0]
	cmp	w5, #255
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x5, x10, x9
	str	x12, [x5]
	ldr	x6, [x14]
	str	x6, [x5, #32]
	ldr	x6, [x15]
	str	x6, [x5, #24]
	ldr	x6, [x16]
	str	x6, [x5, #16]
	ldr	w6, [x17]
	str	w6, [x5, #8]
	ldr	x5, [x14]
	ldr	x6, [x1]
	add	x6, x6, x8
	str	x5, [x6, #8]
	ldr	x5, [x16]
	ldr	x6, [x1]
	str	x5, [x6, x8]
	b	LBB0_2
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x6, [x10, x9]
	cmp	x6, x12
	b.ne	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x6, x10, x9
	stp	xzr, xzr, [x6, #24]
	ldr	x7, [x2]
	str	x7, [x6, #16]
	ldr	w7, [x3]
	str	w7, [x6, #8]
	ldr	x6, [x1]
	add	x6, x6, x8
	str	xzr, [x6, #8]
	ldr	x6, [x4]
	ldr	x7, [x1]
	str	x6, [x7, x8]
	b	LBB0_1
LBB0_7:
	ldr	x0, [x11, #8]
	mov	w1, #8
	bl	_load_param
Lloh24:
	adrp	x19, _svp@GOTPAGE
Lloh25:
	ldr	x19, [x19, _svp@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	x0, [x8, #16]
	mov	w1, #2048
	bl	_load_param
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
	mov	w1, #8
	bl	_load_param
	ldr	x0, [x19]
	mov	w1, #4
	bl	_load_param
LBB0_9:
	mov	w0, #64
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_sram,8,3                       ; @sram
	.comm	_m68k,8,3                       ; @m68k
	.comm	_sram_read_byte,8,3             ; @sram_read_byte
	.comm	_sram_read_word,8,3             ; @sram_read_word
	.comm	_sram_write_byte,8,3            ; @sram_write_byte
	.comm	_sram_write_word,4,2            ; @sram_write_word
	.comm	_zbank_memory_map,8,3           ; @zbank_memory_map
	.comm	_m68k_unused_8_w,8,3            ; @m68k_unused_8_w
	.comm	_m68k_unused_16_w,4,2           ; @m68k_unused_16_w
	.comm	_zbank_unused_w,8,3             ; @zbank_unused_w
	.comm	_cart,16,3                      ; @cart
	.comm	_svp,8,3                        ; @svp
.subsections_via_symbols
