	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function md_cart_reset
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.space	4
	.space	4
LCPI0_1:
	.long	131072                          ## 0x20000
	.long	131072                          ## 0x20000
	.space	4
	.space	4
LCPI0_2:
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.space	4
	.space	4
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_md_cart_reset
	.p2align	4, 0x90
_md_cart_reset:                         ## @md_cart_reset
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	movq	_cart@GOTPCREL(%rip), %rbx
	cmpq	$0, 16(%rbx)
	je	LBB0_3
## %bb.1:
	movq	_m68k@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movdqu	(%rbx), %xmm0
	movdqu	8(%rbx), %xmm1
	pshufd	$80, %xmm0, %xmm0               ## xmm0 = xmm0[0,0,1,1]
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = <0,1,u,u>
	xorl	%ecx, %ecx
	movdqa	LCPI0_1(%rip), %xmm3            ## xmm3 = <131072,131072,u,u>
	movdqa	LCPI0_2(%rip), %xmm4            ## xmm4 = <4,4,u,u>
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm2, %xmm5
	pslld	$16, %xmm5
	movdqa	%xmm0, %xmm6
	pand	%xmm5, %xmm6
	pmovzxdq	%xmm6, %xmm6                    ## xmm6 = xmm6[0],zero,xmm6[1],zero
	paddq	%xmm1, %xmm6
	movdqu	%xmm6, (%rax,%rcx,8)
	paddd	%xmm3, %xmm5
	pand	%xmm0, %xmm5
	pmovzxdq	%xmm5, %xmm5                    ## xmm5 = xmm5[0],zero,xmm5[1],zero
	paddq	%xmm1, %xmm5
	movdqu	%xmm5, 16(%rax,%rcx,8)
	addq	$4, %rcx
	paddd	%xmm4, %xmm2
	cmpq	$64, %rcx
	jne	LBB0_2
LBB0_3:
	movq	_svp@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_svp_reset
LBB0_5:
	movq	_config@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_10
## %bb.6:
	cmpl	$130, %eax
	je	LBB0_9
## %bb.7:
	cmpl	$129, %eax
	jne	LBB0_12
## %bb.8:
	movl	%r14d, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ggenie_reset                   ## TAILCALL
LBB0_10:
	movq	_HW_LOCK_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_12
## %bb.11:
	movq	8(%rbx), %rax
	movl	(%rbx), %ecx
	movq	_m68k@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, %esi
	andl	$3145728, %esi                  ## imm = 0x300000
	addq	%rax, %rsi
	movq	%rsi, 384(%rdx)
	movl	%ecx, %esi
	andl	$3211264, %esi                  ## imm = 0x310000
	addq	%rax, %rsi
	movq	%rsi, 392(%rdx)
	movl	%ecx, %esi
	andl	$3276800, %esi                  ## imm = 0x320000
	addq	%rax, %rsi
	movq	%rsi, 400(%rdx)
	movl	%ecx, %esi
	andl	$3342336, %esi                  ## imm = 0x330000
	addq	%rax, %rsi
	movq	%rsi, 408(%rdx)
	movl	%ecx, %esi
	andl	$3407872, %esi                  ## imm = 0x340000
	addq	%rax, %rsi
	movq	%rsi, 416(%rdx)
	movl	%ecx, %esi
	andl	$3473408, %esi                  ## imm = 0x350000
	addq	%rax, %rsi
	movq	%rsi, 424(%rdx)
	movl	%ecx, %esi
	andl	$3538944, %esi                  ## imm = 0x360000
	addq	%rax, %rsi
	movq	%rsi, 432(%rdx)
	movl	%ecx, %esi
	andl	$3604480, %esi                  ## imm = 0x370000
	addq	%rax, %rsi
	movq	%rsi, 440(%rdx)
	movl	%ecx, %esi
	andl	$3670016, %esi                  ## imm = 0x380000
	addq	%rax, %rsi
	movq	%rsi, 448(%rdx)
	movl	%ecx, %esi
	andl	$3735552, %esi                  ## imm = 0x390000
	addq	%rax, %rsi
	movq	%rsi, 456(%rdx)
	movl	%ecx, %esi
	andl	$3801088, %esi                  ## imm = 0x3A0000
	addq	%rax, %rsi
	movq	%rsi, 464(%rdx)
	movl	%ecx, %esi
	andl	$3866624, %esi                  ## imm = 0x3B0000
	addq	%rax, %rsi
	movq	%rsi, 472(%rdx)
	movl	%ecx, %esi
	andl	$3932160, %esi                  ## imm = 0x3C0000
	addq	%rax, %rsi
	movq	%rsi, 480(%rdx)
	movl	%ecx, %esi
	andl	$3997696, %esi                  ## imm = 0x3D0000
	addq	%rax, %rsi
	movq	%rsi, 488(%rdx)
	movl	%ecx, %esi
	andl	$4063232, %esi                  ## imm = 0x3E0000
	addq	%rax, %rsi
	movq	%rsi, 496(%rdx)
	andl	$4128768, %ecx                  ## imm = 0x3F0000
	addq	%rax, %rcx
	movq	%rcx, 504(%rdx)
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	movl	%r14d, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_areplay_reset                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cart,24,3                      ## @cart
	.comm	_m68k,8,3                       ## @m68k
	.comm	_svp,8,3                        ## @svp
	.comm	_config,4,2                     ## @config
	.comm	_HW_LOCK_ON,4,2                 ## @HW_LOCK_ON
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function md_cart_reset
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
lCPI0_1:
	.long	3145728                         ; 0x300000
	.long	3211264                         ; 0x310000
lCPI0_2:
	.long	3276800                         ; 0x320000
	.long	3342336                         ; 0x330000
lCPI0_3:
	.long	3407872                         ; 0x340000
	.long	3473408                         ; 0x350000
lCPI0_4:
	.long	3538944                         ; 0x360000
	.long	3604480                         ; 0x370000
lCPI0_5:
	.long	3670016                         ; 0x380000
	.long	3735552                         ; 0x390000
lCPI0_6:
	.long	3801088                         ; 0x3a0000
	.long	3866624                         ; 0x3b0000
lCPI0_7:
	.long	3932160                         ; 0x3c0000
	.long	3997696                         ; 0x3d0000
lCPI0_8:
	.long	4063232                         ; 0x3e0000
	.long	4128768                         ; 0x3f0000
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_md_cart_reset
	.p2align	2
_md_cart_reset:                         ; @md_cart_reset
	.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	x19, x0
Lloh0:
	adrp	x20, _cart@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cart@GOTPAGEOFF]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x8, #0
Lloh2:
	adrp	x9, _m68k@GOTPAGE
Lloh3:
	ldr	x9, [x9, _m68k@GOTPAGEOFF]
	ldp	d0, d1, [x20]
	dup.2s	v0, v0[0]
Lloh4:
	ldr	x9, [x9]
	dup.2d	v1, v1[0]
Lloh5:
	adrp	x10, lCPI0_0@PAGE
Lloh6:
	ldr	d2, [x10, lCPI0_0@PAGEOFF]
	movi.2s	v3, #2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	shl.2s	v4, v2, #16
	and.8b	v4, v0, v4
	uaddw.2d	v4, v1, v4
	str	q4, [x9, x8]
	add.2s	v2, v2, v3
	add	x8, x8, #16
	cmp	x8, #512
	b.ne	LBB0_2
LBB0_3:
Lloh7:
	adrp	x8, _svp@GOTPAGE
Lloh8:
	ldr	x8, [x8, _svp@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	bl	_svp_reset
LBB0_5:
Lloh10:
	adrp	x8, _config@GOTPAGE
Lloh11:
	ldr	x8, [x8, _config@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #130
	b.eq	LBB0_12
; %bb.7:
	cmp	w8, #129
	b.ne	LBB0_11
; %bb.8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ggenie_reset
LBB0_9:
	ldr	w8, [x20, #4]
Lloh13:
	adrp	x9, _HW_LOCK_ON@GOTPAGE
Lloh14:
	ldr	x9, [x9, _HW_LOCK_ON@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	add	x8, x20, #8
Lloh16:
	adrp	x9, _m68k@GOTPAGE
Lloh17:
	ldr	x9, [x9, _m68k@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	ld1r.2s	{ v0 }, [x20]
Lloh19:
	adrp	x10, lCPI0_1@PAGE
Lloh20:
	ldr	d1, [x10, lCPI0_1@PAGEOFF]
	and.8b	v1, v0, v1
	ld1r.2d	{ v2 }, [x8]
	uaddw.2d	v1, v2, v1
Lloh21:
	adrp	x8, lCPI0_2@PAGE
Lloh22:
	ldr	d3, [x8, lCPI0_2@PAGEOFF]
	and.8b	v3, v0, v3
	uaddw.2d	v3, v2, v3
	stp	q1, q3, [x9, #384]
Lloh23:
	adrp	x8, lCPI0_3@PAGE
Lloh24:
	ldr	d1, [x8, lCPI0_3@PAGEOFF]
	and.8b	v1, v0, v1
	uaddw.2d	v1, v2, v1
Lloh25:
	adrp	x8, lCPI0_4@PAGE
Lloh26:
	ldr	d3, [x8, lCPI0_4@PAGEOFF]
	and.8b	v3, v0, v3
	uaddw.2d	v3, v2, v3
	stp	q1, q3, [x9, #416]
Lloh27:
	adrp	x8, lCPI0_5@PAGE
Lloh28:
	ldr	d1, [x8, lCPI0_5@PAGEOFF]
	and.8b	v1, v0, v1
	uaddw.2d	v1, v2, v1
Lloh29:
	adrp	x8, lCPI0_6@PAGE
Lloh30:
	ldr	d3, [x8, lCPI0_6@PAGEOFF]
	and.8b	v3, v0, v3
	uaddw.2d	v3, v2, v3
	stp	q1, q3, [x9, #448]
Lloh31:
	adrp	x8, lCPI0_7@PAGE
Lloh32:
	ldr	d1, [x8, lCPI0_7@PAGEOFF]
	and.8b	v1, v0, v1
Lloh33:
	adrp	x8, lCPI0_8@PAGE
Lloh34:
	ldr	d3, [x8, lCPI0_8@PAGEOFF]
	and.8b	v0, v0, v3
	uaddw.2d	v1, v2, v1
	uaddw.2d	v0, v2, v0
	stp	q1, q0, [x9, #480]
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_areplay_reset
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdr	Lloh33, Lloh34
	.loh AdrpAdrp	Lloh31, Lloh33
	.loh AdrpLdr	Lloh31, Lloh32
	.loh AdrpAdrp	Lloh29, Lloh31
	.loh AdrpLdr	Lloh29, Lloh30
	.loh AdrpAdrp	Lloh27, Lloh29
	.loh AdrpLdr	Lloh27, Lloh28
	.loh AdrpAdrp	Lloh25, Lloh27
	.loh AdrpLdr	Lloh25, Lloh26
	.loh AdrpAdrp	Lloh23, Lloh25
	.loh AdrpLdr	Lloh23, Lloh24
	.loh AdrpAdrp	Lloh21, Lloh23
	.loh AdrpLdr	Lloh21, Lloh22
	.loh AdrpLdr	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_cart,24,3                      ; @cart
	.comm	_m68k,8,3                       ; @m68k
	.comm	_svp,8,3                        ; @svp
	.comm	_config,4,2                     ; @config
	.comm	_HW_LOCK_ON,4,2                 ; @HW_LOCK_ON
.subsections_via_symbols
