	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function eeprom_i2c_init
LCPI0_0:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_eeprom_i2c_init
	.p2align	4, 0x90
_eeprom_i2c_init:                       ## @eeprom_i2c_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	%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	_eeprom_i2c@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [1,1,1,1]
	movups	%xmm0, (%r12)
	movq	_STAND_BY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r12)
	movq	_sram@GOTPCREL(%rip), %rbx
	movl	$0, (%rbx)
	movq	_GAME_CNT@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_8
## %bb.1:
	xorl	%r15d, %r15d
	movq	_rominfo@GOTPCREL(%rip), %rbx
	movq	_database@GOTPCREL(%rip), %r14
	leaq	16(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_sram@GOTPCREL(%rip), %rcx
	movabsq	$4294967297, %rdx               ## imm = 0x100000001
	movq	%rdx, (%rcx)
	leaq	(%rax,%r12,4), %rsi
	addq	$4, %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$4, %edx
	callq	_memcpy
	movl	(%r13), %r15d
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	cmpl	(%r13), %r15d
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rbx), %edi
	movq	(%r14), %rax
	movslq	%r15d, %rcx
	leaq	(%rcx,%rcx,2), %r12
	movl	8(%rax,%r12,4), %esi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rax
	movl	(%rax,%r12,4), %ecx
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	(%rbx), %ecx
	jne	LBB0_6
	jmp	LBB0_5
LBB0_7:
	movq	_sram@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r14d
	movq	_eeprom_i2c@GOTPCREL(%rip), %r12
LBB0_8:
	testl	%r14d, %r14d
	jne	LBB0_14
## %bb.9:
	cmpq	$0, 16(%rbx)
	je	LBB0_14
## %bb.10:
	movq	_cart@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$434, %esi                      ## imm = 0x1B2
	callq	_READ_BYTE
	cmpl	$232, %eax
	je	LBB0_12
## %bb.11:
	movl	8(%rbx), %eax
	subl	12(%rbx), %eax
	cmpl	$1, %eax
	jg	LBB0_13
LBB0_12:
	movl	$1, (%rbx)
	movq	_database@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$112, %rsi
	leaq	16(%r12), %rdi
	movl	$4, %edx
	callq	_memcpy
LBB0_13:
	movl	(%rbx), %r14d
LBB0_14:
	testl	%r14d, %r14d
	je	LBB0_16
## %bb.15:
	movq	_eeprom_i2c_read_byte@GOTPCREL(%rip), %r8
	movq	(%r8), %rcx
	movq	_m68k@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movswq	18(%r12), %rsi
	movq	%rsi, %rdi
	shlq	$5, %rdi
	movq	%rcx, 24(%rdx,%rdi)
	movq	_eeprom_i2c_read_word@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	movq	%rbx, 16(%rdx,%rdi)
	movq	(%r8), %rdi
	movswq	22(%r12), %rax
	movq	%rax, %rbx
	shlq	$5, %rbx
	movq	%rdi, 24(%rdx,%rbx)
	movq	(%rcx), %rcx
	movq	%rcx, 16(%rdx,%rbx)
	movq	_eeprom_i2c_write_byte@GOTPCREL(%rip), %r9
	movq	(%r9), %rdi
	movswq	26(%r12), %rcx
	movq	%rcx, %rbx
	shlq	$5, %rbx
	movq	%rdi, 8(%rdx,%rbx)
	movq	_eeprom_i2c_write_word@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	movl	%edi, (%rdx,%rbx)
	movq	(%r8), %rdx
	movq	_zbank_memory_map@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rbx
	shlq	$4, %rsi
	movq	%rdx, 8(%rbx,%rsi)
	movq	(%r8), %rdx
	movq	(%rdi), %rsi
	shlq	$4, %rax
	movq	%rdx, 8(%rsi,%rax)
	movq	(%r9), %rax
	movq	(%rdi), %rdx
	shlq	$4, %rcx
	movq	%rax, (%rdx,%rcx)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_eeprom_i2c,32,2                ## @eeprom_i2c
	.comm	_STAND_BY,4,2                   ## @STAND_BY
	.comm	_sram,24,3                      ## @sram
	.comm	_GAME_CNT,4,2                   ## @GAME_CNT
	.comm	_rominfo,8,2                    ## @rominfo
	.comm	_database,8,3                   ## @database
	.comm	_cart,4,2                       ## @cart
	.comm	_eeprom_i2c_read_byte,8,3       ## @eeprom_i2c_read_byte
	.comm	_m68k,8,3                       ## @m68k
	.comm	_eeprom_i2c_read_word,8,3       ## @eeprom_i2c_read_word
	.comm	_eeprom_i2c_write_byte,8,3      ## @eeprom_i2c_write_byte
	.comm	_eeprom_i2c_write_word,4,2      ## @eeprom_i2c_write_word
	.comm	_zbank_memory_map,8,3           ## @zbank_memory_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eeprom_i2c_init                ; -- Begin function eeprom_i2c_init
	.p2align	2
_eeprom_i2c_init:                       ; @eeprom_i2c_init
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-96]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 b8, -88
	.cfi_offset b9, -96
Lloh0:
	adrp	x19, _eeprom_i2c@GOTPAGE
Lloh1:
	ldr	x19, [x19, _eeprom_i2c@GOTPAGEOFF]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	movi.4s	v0, #1
Lloh2:
	adrp	x8, _STAND_BY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STAND_BY@GOTPAGEOFF]
	str	q0, [x19]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #28]
Lloh5:
	adrp	x21, _sram@GOTPAGE
Lloh6:
	ldr	x21, [x21, _sram@GOTPAGEOFF]
	str	wzr, [x21]
Lloh7:
	adrp	x23, _GAME_CNT@GOTPAGE
Lloh8:
	ldr	x23, [x23, _GAME_CNT@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh9:
	adrp	x22, _database@GOTPAGE
Lloh10:
	ldr	x22, [x22, _database@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	w26, #0
Lloh11:
	adrp	x24, _rominfo@GOTPAGE
Lloh12:
	ldr	x24, [x24, _rominfo@GOTPAGEOFF]
	mov	w25, #12
	movi.2s	v8, #1
	add	x20, x19, #16
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w26, w26, #1
	ldr	w8, [x23]
	cmp	w26, w8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24, #4]
	ldr	x8, [x22]
	smaddl	x8, w26, w25, x8
	ldr	w1, [x8, #8]
	bl	_strstr
	cbz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x8, w26
	ldr	x9, [x22]
	mul	x10, x8, x25
	ldr	w10, [x9, x10]
	ldr	w11, [x24]
	cmp	w10, #0
	ccmp	w10, w11, #4, ne
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	str	d8, [x21]
	madd	x8, x8, x25, x9
	add	x1, x8, #4
	mov	x0, x20
	mov	w2, #4
	bl	_memcpy
	ldr	w26, [x23]
	b	LBB0_2
LBB0_6:
	ldr	w8, [x21]
	cbz	w8, LBB0_8
	b	LBB0_13
LBB0_7:
	mov	w8, #0
	cbnz	w8, LBB0_13
LBB0_8:
	ldr	x9, [x21, #16]
	cbz	x9, LBB0_13
; %bb.9:
Lloh13:
	adrp	x8, _cart@GOTPAGE
Lloh14:
	ldr	x8, [x8, _cart@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	w1, #434
	bl	_READ_BYTE
	cmp	w0, #232
	b.eq	LBB0_11
; %bb.10:
	ldp	w8, w9, [x21, #8]
	sub	w8, w8, w9
	cmp	w8, #1
	b.gt	LBB0_12
LBB0_11:
	mov	w8, #1
	str	w8, [x21]
	ldr	x8, [x22]
	add	x1, x8, #112
	add	x0, x19, #16
	mov	w2, #4
	bl	_memcpy
LBB0_12:
	ldr	w8, [x21]
LBB0_13:
	cbz	w8, LBB0_15
; %bb.14:
Lloh16:
	adrp	x8, _eeprom_i2c_read_byte@GOTPAGE
Lloh17:
	ldr	x8, [x8, _eeprom_i2c_read_byte@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh18:
	adrp	x10, _m68k@GOTPAGE
Lloh19:
	ldr	x10, [x10, _m68k@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	ldrsh	x11, [x19, #18]
	add	x12, x10, x11, lsl #5
	str	x9, [x12, #24]
Lloh21:
	adrp	x9, _eeprom_i2c_read_word@GOTPAGE
Lloh22:
	ldr	x9, [x9, _eeprom_i2c_read_word@GOTPAGEOFF]
	ldr	x13, [x9]
	str	x13, [x12, #16]
	ldr	x12, [x8]
	ldrsh	x13, [x19, #22]
	add	x14, x10, x13, lsl #5
	str	x12, [x14, #24]
	ldr	x9, [x9]
Lloh23:
	adrp	x12, _eeprom_i2c_write_byte@GOTPAGE
Lloh24:
	ldr	x12, [x12, _eeprom_i2c_write_byte@GOTPAGEOFF]
	str	x9, [x14, #16]
	ldr	x9, [x12]
	ldrsh	x14, [x19, #26]
	add	x10, x10, x14, lsl #5
Lloh25:
	adrp	x15, _eeprom_i2c_write_word@GOTPAGE
Lloh26:
	ldr	x15, [x15, _eeprom_i2c_write_word@GOTPAGEOFF]
	str	x9, [x10, #8]
Lloh27:
	ldr	w9, [x15]
	str	w9, [x10]
	ldr	x9, [x8]
Lloh28:
	adrp	x10, _zbank_memory_map@GOTPAGE
Lloh29:
	ldr	x10, [x10, _zbank_memory_map@GOTPAGEOFF]
	ldr	x15, [x10]
	add	x11, x15, x11, lsl #4
	str	x9, [x11, #8]
	ldr	x8, [x8]
	ldr	x9, [x10]
	add	x9, x9, x13, lsl #4
	str	x8, [x9, #8]
	ldr	x8, [x12]
	ldr	x9, [x10]
	lsl	x10, x14, #4
	str	x8, [x9, x10]
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_eeprom_i2c,32,2                ; @eeprom_i2c
	.comm	_STAND_BY,4,2                   ; @STAND_BY
	.comm	_sram,24,3                      ; @sram
	.comm	_GAME_CNT,4,2                   ; @GAME_CNT
	.comm	_rominfo,8,2                    ; @rominfo
	.comm	_database,8,3                   ; @database
	.comm	_cart,4,2                       ; @cart
	.comm	_eeprom_i2c_read_byte,8,3       ; @eeprom_i2c_read_byte
	.comm	_m68k,8,3                       ; @m68k
	.comm	_eeprom_i2c_read_word,8,3       ; @eeprom_i2c_read_word
	.comm	_eeprom_i2c_write_byte,8,3      ; @eeprom_i2c_write_byte
	.comm	_eeprom_i2c_write_word,4,2      ; @eeprom_i2c_write_word
	.comm	_zbank_memory_map,8,3           ; @zbank_memory_map
.subsections_via_symbols
