	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sram_init                      ## -- Begin function sram_init
	.p2align	4, 0x90
_sram_init:                             ## @sram_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_sram@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_cart@GOTPCREL(%rip), %r14
	cmpl	$8388608, (%r14)                ## imm = 0x800000
	jg	LBB0_19
## %bb.1:
	movl	$268435456, %edi                ## imm = 0x10000000
	addq	8(%r14), %rdi
	movq	%rdi, 16(%rbx)
	movl	$255, %esi
	movl	$65536, %edx                    ## imm = 0x10000
	callq	_memset
	movq	16(%rbx), %rsi
	xorl	%edi, %edi
	movl	$65536, %edx                    ## imm = 0x10000
	callq	_crc32
	movl	%eax, 24(%rbx)
	movq	8(%r14), %rdi
	movl	$432, %esi                      ## imm = 0x1B0
	callq	_READ_BYTE
	cmpl	$82, %eax
	jne	LBB0_5
## %bb.2:
	movq	8(%r14), %rdi
	movl	$433, %esi                      ## imm = 0x1B1
	callq	_READ_BYTE
	cmpl	$65, %eax
	jne	LBB0_5
## %bb.3:
	movl	$1, (%rbx)
	movq	8(%r14), %rdi
	movl	$436, %esi                      ## imm = 0x1B4
	callq	_READ_WORD_LONG
	movl	%eax, 4(%rbx)
	movq	8(%r14), %rdi
	movl	$440, %esi                      ## imm = 0x1B8
	callq	_READ_WORD_LONG
	movl	%eax, 8(%rbx)
	movq	_rominfo@GOTPCREL(%rip), %rax
	movl	12(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:
	movl	$2097153, 4(%rbx)               ## imm = 0x200001
	movl	$2113535, %eax                  ## imm = 0x203FFF
	jmp	LBB0_17
LBB0_5:
	movq	_rominfo@GOTPCREL(%rip), %r15
	movl	12(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movl	$1, 12(%rbx)
	movabsq	$9077563706048513, %rax         ## imm = 0x203FFF00200001
	movq	%rax, 4(%rbx)
	jmp	LBB0_19
LBB0_7:
	movl	12(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	$1, 12(%rbx)
	movabsq	$9024787147915265, %rax         ## imm = 0x200FFF00200001
	movq	%rax, 4(%rbx)
	jmp	LBB0_19
LBB0_9:
	movl	12(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	jne	LBB0_6
## %bb.10:
	movl	(%r15), %eax
	cmpl	$44714, %eax                    ## imm = 0xAEAA
	setne	%cl
	cmpl	$36282, %eax                    ## imm = 0x8DBA
	setne	%al
	testb	%al, %cl
	jne	LBB0_20
## %bb.11:
	cmpl	$33028, 4(%r15)                 ## imm = 0x8104
	jne	LBB0_20
## %bb.12:
	movl	$1, 12(%rbx)
LBB0_13:
	movabsq	$18295869195419649, %rax        ## imm = 0x40FFFF00400001
	movq	%rax, 4(%rbx)
	jmp	LBB0_19
LBB0_14:
	movl	4(%rbx), %eax
	movl	8(%rbx), %ecx
	subl	%eax, %ecx
	jl	LBB0_16
## %bb.15:
	cmpl	$65536, %ecx                    ## imm = 0x10000
	jl	LBB0_18
LBB0_16:
	addl	$65535, %eax                    ## imm = 0xFFFF
LBB0_17:
	movl	%eax, 8(%rbx)
LBB0_18:
	movl	$1, 12(%rbx)
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	16(%r15), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_24
## %bb.21:
	movl	12(%r15), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_24
## %bb.22:
	movl	$1, 12(%rbx)
	cmpl	$15880, 4(%r15)                 ## imm = 0x3E08
	jne	LBB0_13
## %bb.23:
	movabsq	$17169969288314881, %rax        ## imm = 0x3CFFFF003C0001
	movq	%rax, 4(%rbx)
	jmp	LBB0_19
LBB0_24:
	movl	16(%r15), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movl	12(%r15), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	jne	LBB0_6
LBB0_26:
	movl	8(%r15), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_28
## %bb.27:
	cmpl	$4194304, (%r14)                ## imm = 0x400000
	je	LBB0_6
	jmp	LBB0_19
LBB0_28:
	movl	12(%r15), %edi
	leaq	L_.str.8(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	jne	LBB0_29
## %bb.30:
	movl	8(%r15), %edi
	leaq	L_.str.9(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_32
LBB0_29:
	movl	$0, 12(%rbx)
	jmp	LBB0_19
LBB0_32:
	cmpl	$2097152, (%r14)                ## imm = 0x200000
	jg	LBB0_19
## %bb.33:
	movabsq	$9288669938581504, %rax         ## imm = 0x20FFFF00200000
	movq	%rax, 4(%rbx)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_sram,32,3                      ## @sram
	.comm	_cart,16,3                      ## @cart
	.comm	_rominfo,20,2                   ## @rominfo
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"T-26013"

L_.str.1:                               ## @.str.1
	.asciz	"T-50086"

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

L_.str.3:                               ## @.str.3
	.asciz	"T-50286"

L_.str.4:                               ## @.str.4
	.asciz	"SF"

L_.str.5:                               ## @.str.5
	.asciz	"001"

L_.str.6:                               ## @.str.6
	.asciz	"004"

L_.str.7:                               ## @.str.7
	.asciz	"SONIC & KNUCKLES"

L_.str.8:                               ## @.str.8
	.asciz	"T-113016"

L_.str.9:                               ## @.str.9
	.asciz	"SONIC THE HEDGEHOG 2"

.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 sram_init
lCPI0_0:
	.long	2097153                         ; 0x200001
	.long	2113535                         ; 0x203fff
lCPI0_1:
	.long	2097153                         ; 0x200001
	.long	2101247                         ; 0x200fff
lCPI0_2:
	.long	4194305                         ; 0x400001
	.long	4259839                         ; 0x40ffff
lCPI0_3:
	.long	3932161                         ; 0x3c0001
	.long	3997695                         ; 0x3cffff
lCPI0_4:
	.long	2097152                         ; 0x200000
	.long	2162687                         ; 0x20ffff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_sram_init
	.p2align	2
_sram_init:                             ; @sram_init
	.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
Lloh0:
	adrp	x19, _sram@GOTPAGE
Lloh1:
	ldr	x19, [x19, _sram@GOTPAGEOFF]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh2:
	adrp	x20, _cart@GOTPAGE
Lloh3:
	ldr	x20, [x20, _cart@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #2048, lsl #12              ; =8388608
	b.gt	LBB0_19
; %bb.1:
	ldr	x8, [x20, #8]
	mov	w9, #268435456
	add	x0, x8, x9
	str	x0, [x19, #16]
	mov	w1, #255
	mov	w2, #65536
	bl	_memset
	ldr	x1, [x19, #16]
	mov	w0, #0
	mov	w2, #65536
	bl	_crc32
	str	w0, [x19, #24]
	ldr	x0, [x20, #8]
	mov	w1, #432
	bl	_READ_BYTE
	cmp	w0, #82
	b.ne	LBB0_5
; %bb.2:
	ldr	x0, [x20, #8]
	mov	w1, #433
	bl	_READ_BYTE
	cmp	w0, #65
	b.ne	LBB0_5
; %bb.3:
	mov	w8, #1
	str	w8, [x19]
	ldr	x0, [x20, #8]
	mov	w1, #436
	bl	_READ_WORD_LONG
	str	w0, [x19, #4]
	ldr	x0, [x20, #8]
	mov	w1, #440
	bl	_READ_WORD_LONG
	str	w0, [x19, #8]
Lloh4:
	adrp	x8, _rominfo@GOTPAGE
Lloh5:
	ldr	x8, [x8, _rominfo@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8, #12]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_14
; %bb.4:
	mov	w8, #1
	movk	w8, #32, lsl #16
	str	w8, [x19, #4]
	mov	w8, #16383
	movk	w8, #32, lsl #16
	b	LBB0_17
LBB0_5:
Lloh9:
	adrp	x21, _rominfo@GOTPAGE
Lloh10:
	ldr	x21, [x21, _rominfo@GOTPAGEOFF]
	ldr	w0, [x21, #12]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_7
LBB0_6:
	mov	w8, #1
	str	w8, [x19, #12]
Lloh13:
	adrp	x8, lCPI0_0@PAGE
Lloh14:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #4]
	b	LBB0_19
LBB0_7:
	ldr	w0, [x21, #12]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_9
; %bb.8:
	mov	w8, #1
	str	w8, [x19, #12]
Lloh17:
	adrp	x8, lCPI0_1@PAGE
Lloh18:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	stur	d0, [x19, #4]
	b	LBB0_19
LBB0_9:
	ldr	w0, [x21, #12]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strstr
	cbnz	x0, LBB0_6
; %bb.10:
	ldr	w8, [x21]
	mov	w9, #36282
	cmp	w8, w9
	mov	w9, #44714
	ccmp	w8, w9, #4, ne
	b.ne	LBB0_20
; %bb.11:
	ldr	w8, [x21, #4]
	mov	w9, #33028
	cmp	w8, w9
	b.ne	LBB0_20
; %bb.12:
	mov	w8, #1
	str	w8, [x19, #12]
LBB0_13:
Lloh21:
	adrp	x8, lCPI0_2@PAGE
Lloh22:
	ldr	d0, [x8, lCPI0_2@PAGEOFF]
	stur	d0, [x19, #4]
	b	LBB0_19
LBB0_14:
	ldp	w8, w9, [x19, #4]
	subs	w9, w9, w8
	b.lt	LBB0_16
; %bb.15:
	cmp	w9, #16, lsl #12                ; =65536
	b.lt	LBB0_18
LBB0_16:
	mov	w9, #65535
	add	w8, w8, w9
LBB0_17:
	str	w8, [x19, #8]
LBB0_18:
	mov	w8, #1
	str	w8, [x19, #12]
LBB0_19:
	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
LBB0_20:
	ldr	w0, [x21, #16]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_24
; %bb.21:
	ldr	w0, [x21, #12]
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_24
; %bb.22:
	mov	w8, #1
	str	w8, [x19, #12]
	ldr	w8, [x21, #4]
	mov	w9, #15880
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.23:
Lloh27:
	adrp	x8, lCPI0_3@PAGE
Lloh28:
	ldr	d0, [x8, lCPI0_3@PAGEOFF]
	stur	d0, [x19, #4]
	b	LBB0_19
LBB0_24:
	ldr	w0, [x21, #16]
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_26
; %bb.25:
	ldr	w0, [x21, #12]
Lloh31:
	adrp	x1, l_.str.6@PAGE
Lloh32:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_strstr
	cbnz	x0, LBB0_6
LBB0_26:
	ldr	w0, [x21, #8]
Lloh33:
	adrp	x1, l_.str.7@PAGE
Lloh34:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_28
; %bb.27:
	ldr	w8, [x20]
	cmp	w8, #1024, lsl #12              ; =4194304
	b.eq	LBB0_6
	b	LBB0_19
LBB0_28:
	ldr	w0, [x21, #12]
Lloh35:
	adrp	x1, l_.str.8@PAGE
Lloh36:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_strstr
	cbnz	x0, LBB0_30
; %bb.29:
	ldr	w0, [x21, #8]
Lloh37:
	adrp	x1, l_.str.9@PAGE
Lloh38:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_31
LBB0_30:
	str	wzr, [x19, #12]
	b	LBB0_19
LBB0_31:
	ldr	w8, [x20]
	cmp	w8, #512, lsl #12               ; =2097152
	b.gt	LBB0_19
; %bb.32:
Lloh39:
	adrp	x8, lCPI0_4@PAGE
Lloh40:
	ldr	d0, [x8, lCPI0_4@PAGEOFF]
	stur	d0, [x19, #4]
	b	LBB0_18
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdr	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdr	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdr	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdr	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdr	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_sram,32,3                      ; @sram
	.comm	_cart,16,3                      ; @cart
	.comm	_rominfo,20,2                   ; @rominfo
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"T-26013"

l_.str.1:                               ; @.str.1
	.asciz	"T-50086"

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

l_.str.3:                               ; @.str.3
	.asciz	"T-50286"

l_.str.4:                               ; @.str.4
	.asciz	"SF"

l_.str.5:                               ; @.str.5
	.asciz	"001"

l_.str.6:                               ; @.str.6
	.asciz	"004"

l_.str.7:                               ; @.str.7
	.asciz	"SONIC & KNUCKLES"

l_.str.8:                               ; @.str.8
	.asciz	"T-113016"

l_.str.9:                               ; @.str.9
	.asciz	"SONIC THE HEDGEHOG 2"

.subsections_via_symbols
