DKC2_CODE_BEE9F5.asm
Yoshifanatic1_Donkey-Kong-Country-3-Disassembly/DKC3/GarbageData/DKC2_CODE_BEE9F5.asm

ADDR_BEE9F5:
	db $A9,$05

ADDR_BEE9F7:
	LDX.b $64
	LDA.w #$8000
	STA.b $1C,x
	SEP.b #$20
	LDA.w $0D5C
	STA.w $0D5D
	REP.b #$20
	JMP.w [$05A9]

ADDR_BEEA0B:
	LDA.w #$FD6574
	JSL.l $BB8A65
	DEC.w $0B74,x
	LDX.b $64
	EOR.b $12,x
	AND.w #$0E00
	EOR.b $12,x
	STA.b $12,x
	LDA.b $46,x
	ASL
	TAX
	LDA.l $FD5FEE,x
	LDX.b $64
	JSL.l $BB8AE4
	LDX.b $64
	LDA.w #$8000
	STA.b $1C,x
	INC.b $2F,x
	LDA.b $44,x
	STA.b $42,x
	JMP.w [$05A9]

ADDR_BEEA3E:
	TYX
	LDA.w #$C000
	STA.w $001C,y
	SEP.b #$20
	STZ.w $0D5D
	REP.b #$20
	LDY.w $0593
	LDA.b $0A,x
	CMP.w #$01FF
	BCS.b ADDR_BEEA5D
	LDA.w $0006,y
	CMP.b $4E,x
	BCS.b ADDR_BEEA6E
ADDR_BEEA5D:
	DEC.b $42,x
	BMI.b ADDR_BEEA6E
	LDA.b $42,x
	AND.w #$001F
	CMP.w #$0014
	BCC.b ADDR_BEE9F7
	JMP.w [$05A9]

ADDR_BEEA6E:
	LDA.b $13,x
	AND.w #$000E
	TAX
	INC.w $0B74,x
	LDA.w #$6574
	LDX.b $64
	JSL.l $BB8AE4
	JSL.l $BB82B8
	JMP.w [$05A9]

ADDR_BEEA87:
	INC.w $19AA
	JSR.w $BEB82A

DATA_BEEA8D:
	dw ADDR_BEEAA3
	dw ADDR_BEEAB2
	dw ADDR_BEEAE8
	dw ADDR_BEEB3C

ADDR_BEEA95:
	INC.w $19AA
	JSR.w $BEB82A

DATA_BEEA9B:
	dw ADDR_BEEAA3
	dw ADDR_BEEAB8
	dw ADDR_BEEAFF
	dw ADDR_BEEB3C

ADDR_BEEAA3:
	TYX
	LDA.b $12,x
	STA.b $22,x
	LDA.w #$0100
	STA.b $28,x
	INC.b $2E,x
	JMP.w [$05A9]

ADDR_BEEAB2:
	JSR.w ADDR_BEEAC7
	JMP.w $BEB849

ADDR_BEEAB8:
	JSR.w ADDR_BEEAC7
	BCS.b ADDR_BEEAC4
	LDA.w #$0005
	JSL.l $B58018
ADDR_BEEAC4:
	JMP.w [$05A9]

ADDR_BEEAC7:
	JSR.w ADDR_BEEB4A
	JSL.l $B9D100
	JSL.l ADDR_BEF05D
	LDA.b $5C,x
	LDY.b $50,x
	JSL.l $B3C6D4
	BCS.b ADDR_BEEAE7
	LDA.w #$004E
	JSR.w ADDR_BEEC5F
	LDX.b $64
	INC.b $2E,x
	CLC
ADDR_BEEAE7:
	RTS

ADDR_BEEAE8:
	JSR.w ADDR_BEEB24
	LDX.b $64
	LDA.b $06,x
	SEC
	SBC.w $17BA
	CLC
	ADC.w #$0010
	CMP.w #$0120
	BCC.b ADDR_BEEB21
	JMP.w $BEB849

ADDR_BEEAFF:
	JSR.w ADDR_BEEB24
	LDY.w $0593
	LDA.w $0006,y
	CMP.w #$0970
	BCC.b ADDR_BEEB21
	LDA.w $000A,y
	CMP.w #$0918
	BCS.b ADDR_BEEB21
	LDA.w $000A,y
	CMP.w #$0840
	BCC.b ADDR_BEEB21
	JSL.l $BB82B8
ADDR_BEEB21:
	JMP.w [$05A9]

ADDR_BEEB24:
	JSR.w ADDR_BEEB4A
	JSL.l $B9D100
	JSL.l ADDR_BEF05D
	LDA.b $52,x
	BNE.b ADDR_BEEB3B
	INC.b $2E,x
	LDA.w #$004E
	JSR.w ADDR_BEEC5F
ADDR_BEEB3B:
	RTS

ADDR_BEEB3C:
	JSR.w ADDR_BEEB4A
	JSL.l $B9D100
	JSL.l ADDR_BEF05D
	JMP.w $BEB849

ADDR_BEEB4A:
	JSL.l $BCFB58
	LDA.w #$0000
	JSL.l $BEBE8B
	RTS

ADDR_BEEB56:
	JSR.w $BEB82A

DATA_BEEB59:
	dw ADDR_BEEB6B
	dw ADDR_BEEB77
	dw ADDR_BEEB90
	dw ADDR_BEEBAC
	dw ADDR_BEEBCB
	dw ADDR_BEEBEF
	dw ADDR_BEEC0D
	dw ADDR_BEEC18
	dw ADDR_BEEC36

ADDR_BEEB6B:
	TYX
	LDA.b $12,x
	STA.b $22,x
	LDA.w #$0100
	STA.b $28,x
	INC.b $2E,x
ADDR_BEEB77:
	JSL.l $B9D100
	JSL.l ADDR_BEF05D
	LDA.b $5C,x
	LDY.b $50,x
	JSL.l $B3C6D4
	BCS.b ADDR_BEEB8D
	LDX.b $64
	INC.b $2E,x
ADDR_BEEB8D:
	JMP.w [$05A9]

ADDR_BEEB90:
	JSL.l $B9D100
	JSL.l ADDR_BEF05D
	LDY.w #$00F8
	JSL.l $BB842C
	BCS.b ADDR_BEEBA9
	LDX.b $64
	LDY.b $68
	STY.b $5C,x
	INC.b $2E,x
ADDR_BEEBA9:
	JMP.w [$05A9]

ADDR_BEEBAC:
	JSL.l $B9D100
	JSL.l ADDR_BEF05D
	LDX.b $64
	LDY.b $5C,x
	LDA.w $002E,y
	CMP.w #$0800
	BCC.b ADDR_BEEBC8
	INC.b $2E,x
	LDA.w #$004E
	JSR.w ADDR_BEEC5F
ADDR_BEEBC8:
	JMP.w [$05A9]

ADDR_BEEBCB:
	JSR.w ADDR_BEEC4D
	LDX.b $64
	LDA.w #$0005
	BCS.b ADDR_BEEBE4
	JSL.l $B9D100
	JSL.l ADDR_BEF05D
	LDA.b $52,x
	BNE.b ADDR_BEEBEC
	LDA.w #$0007
ADDR_BEEBE4:
	STA.b $2E,x
	LDA.w #$004E
	JSR.w ADDR_BEEC5F
ADDR_BEEBEC:
	JMP.w [$05A9]

ADDR_BEEBEF:
	LDY.w #$00FA
	JSL.l $BB842C
	BCS.b ADDR_BEEC02
	LDX.b $64
	INC.b $2E,x
	LDA.w #$0101
	STA.w $0D5C
ADDR_BEEC02:
	JSL.l $B9D100
	JSL.l ADDR_BEF05D
	JMP.w [$05A9]

ADDR_BEEC0D:
	JSL.l $B9D100
	JSL.l ADDR_BEF05D
	JMP.w $BEB849

ADDR_BEEC18:
	LDY.w #$00FA
	JSL.l $BB842C
	BCS.b ADDR_BEEC2B
	LDX.b $64
	INC.b $2E,x
	LDA.w #$0202
	STA.w $0D5C
ADDR_BEEC2B:
	JSL.l $B9D100
	JSL.l ADDR_BEF05D
	JMP.w [$05A9]

ADDR_BEEC36:
	JSR.w $BED936
	BCC.b ADDR_BEEC44
	LDA.w #$0022
	JSL.l $B8D8C0
	BCS.b ADDR_BEEC4B
ADDR_BEEC44:
	LDX.b $64
	LDA.w #$0006
	STA.b $2E,x
ADDR_BEEC4B:
	BRA.b ADDR_BEEC0D

ADDR_BEEC4D:
	LDY.w $0593
	LDA.w $0006,y
	CMP.w #$0AD8
	BCC.b ADDR_BEEC5E
	LDA.w #$01FF
	CMP.w $000A,y
ADDR_BEEC5E:
	RTS

ADDR_BEEC5F:
	CLC
	ADC.b $64
	TAX
	PHX
	LDA.b $00,x
	STA.b $5E
	LDA.b $90
	STA.b $60
	LDY.w #$0000
ADDR_BEEC6F:
	LDA.b [$5E],y
	BMI.b ADDR_BEEC81
	CLC
	ADC.b $64
	TAX
	INY
	INY
	LDA.b [$5E],y
	INY
	INY
	STA.b $00,x
	BRA.b ADDR_BEEC6F

ADDR_BEEC81:
	PLX
	INY
	SEC
	TYA
	ADC.b $5E
	STA.b $00,x
	RTS

ADDR_BEEC8A:
	LDY.b $64
	LDA.w $002E,y
	AND.w #$00FF
	ASL
	TAX
	LDA.w $002F,y
	AND.w #$00FF
	JMP.w (DATA_BEEC9D,x)

DATA_BEEC9D:
	dw ADDR_BEECA3
	dw ADDR_BEECE2
	dw ADDR_BEED46

ADDR_BEECA3:
	LDA.w $19B4
	ORA.w $19B6
	BNE.b ADDR_BEECC6
	TYX
	LDY.w #$0006
ADDR_BEECAF:
	LDA.w #$0002
	PHY
	JSL.l $BB8341
	PLY
	BCS.b ADDR_BEECD2
	LDA.b $12,x
	AND.w #$01E0
	STA.w $19B2,y
	DEY
	DEY
	BNE.b ADDR_BEECAF
ADDR_BEECC6:
	LDX.b $64
	LDA.b $2F,x
	AND.w #$00FF
	STA.b $2E,x
	JMP.w [$05A9]

ADDR_BEECD2:
	JSL.l ADDR_BEEE20
	STZ.w $19B8
	STZ.w $19B6
	STZ.w $19B4
	JMP.w [$05A9]

ADDR_BEECE2:
	TYX
	ASL
	BNE.b ADDR_BEECEC
	LDA.b $42,x
	STA.b $50,x
	INC.b $2F,x
ADDR_BEECEC:
	LDY.w $0593
	LDA.w $0006,y
	SEC
	SBC.b $06,x
	CLC
	ADC.b $4A,x
	EOR.b $26,x
	BPL.b ADDR_BEED00
	LDA.b $46,x
	STA.b $44,x
ADDR_BEED00:
	LDA.b $44,x
	DEC
	BMI.b ADDR_BEED09
	STA.b $44,x
	BRA.b ADDR_BEED37

ADDR_BEED09:
	LDA.b $42,x
	BEQ.b ADDR_BEED37
	LDY.b $48,x
	JSL.l $BB83F5
	BCS.b ADDR_BEED37
	LDX.b $64
	DEC.b $42,x
	LDA.b $46,x
	STA.b $44,x
	LDY.b $68
	STX.b $50,y
	LDA.b $20,x
	STA.w $0020,y
	LDA.b $26,x
	STA.w $0026,y
	LDA.b $24,x
	STA.w $0024,y
	LDA.w #$0562
	JSL.l $B58003
ADDR_BEED37:
	LDX.b $64
	LDA.b $42,x
	CMP.b $44,x
	BNE.b ADDR_BEED43
	JSL.l $BBBB76
ADDR_BEED43:
	JMP.w [$05A9]

ADDR_BEED46:
	LDA.w $0054,y
	STA.b $8E
	JSR.w ADDR_BEEDFA
	JSL.l ADDR_BEF05D
	JSL.l $BCFB58
	LDY.w #$0030
	JSL.l $BEBE8E
	JSR.w ADDR_BEED66
	JSR.w ADDR_BEEDA4
	JMP.w [$05A9]

ADDR_BEED66:
	JSL.l $B9D100
	LDX.b $64
	LDA.b $1A,x
	BEQ.b ADDR_BEEDA3
	CMP.b $18,x
	BEQ.b ADDR_BEEDA3
	SEC
	SBC.w #$2CAC
	LSR
	TAY
	LDA.w $19B4,y
	CMP.w #$8000
	EOR.b $12,x
	AND.w #$01E0
	EOR.b $12,x
	STA.b $12,x
	BCC.b ADDR_BEED92
	LDY.b $1A,x
	STY.b $18,x
	STY.b $16,x
	RTS

ADDR_BEED92:
	PHY
	JSL.l $B59C00
	PLY
	BCS.b ADDR_BEEDA3
	LDA.w $19B4,y
	ORA.w #$8000
	STA.w $19B4,y
ADDR_BEEDA3:
	RTS

ADDR_BEEDA4:
	LDX.b $64
	LDA.b $0A,x
	SEC
	SBC.w #$0220
	BCC.b ADDR_BEEDF9
	CMP.w $17C0
	BCS.b ADDR_BEEDC6
	LDA.b $06,x
	SEC
	SBC.w $17BA
	BIT.b $26,x
	BPL.b ADDR_BEEDC0
	BCC.b ADDR_BEEDC6
	RTS

ADDR_BEEDC0:
	SEC
	SBC.w #$0100
	BMI.b ADDR_BEEDF9
ADDR_BEEDC6:
	JSL.l $BBBB46
	BCC.b ADDR_BEEDF9
	LDY.b $64
	LDX.b $50,y
	BEQ.b ADDR_BEEDD9
	INC.b $42,x
	TYX
	STZ.b $00,x
	BRA.b ADDR_BEEDDF

ADDR_BEEDD9:
	JSL.l $BBBB76
	BCC.b ADDR_BEEDF9
ADDR_BEEDDF:
	LDX.b $64
	LDA.b $12,x
	JSL.l $BB8C02
	DEC.w $19B2
	LDA.w $19B2
	AND.w #$00FF
	BNE.b ADDR_BEEDF9
	LDA.w #$EE15
	JSL.l $B3D4A4
ADDR_BEEDF9:
	RTS

ADDR_BEEDFA:
	INC.w $19B2
	LDA.w $19B2
	BMI.b ADDR_BEEE14
	CMP.w #$0100
	BCC.b ADDR_BEEE14
	ORA.w #$8000
	STA.w $19B2
	LDA.w #$0463
	JSL.l $B38158
ADDR_BEEE14:
	RTS

ADDR_BEEE15:
	LDA.w $19B2
	AND.w #$00FF
	BNE.b ADDR_BEEE43
	LDY.w #$0006
ADDR_BEEE20:
	LDA.w $19B2,y
	AND.w #$01E0
	LSR
	LSR
	LSR
	LSR
	TAX
	STZ.w $0B04,x
	STZ.w $0B06,x
	LDA.w #$0000
	STA.w $19B2,y
	DEY
	DEY
	BNE.b ADDR_BEEE20
	CLC
	LDA.w #$0463
	JSL.l $B38158
ADDR_BEEE43:
	RTL

ADDR_BEEE44:
	LDX.b $64
	LDA.b $2E,x
	BNE.b ADDR_BEEEA9
	LDY.w $0593
	LDA.b $45,x
	AND.w #$00FF
	EOR.w #$FFFF
	SEC
	ADC.b $06,x
	CMP.w $0006,y
	BCS.b ADDR_BEEE97
	LDA.b $44,x
	AND.w #$00FF
	ADC.b $06,x
	CMP.w $0006,y
	BCC.b ADDR_BEEE97
	LDA.b $47,x
	AND.w #$00FF
	EOR.w #$FFFF
	SEC
	ADC.b $0A,x
	CMP.w $000A,y
	BCS.b ADDR_BEEE97
	LDA.b $46,x
	AND.w #$00FF
	ADC.b $0A,x
	CMP.w $000A,y
	BCC.b ADDR_BEEE97
	LDA.b $42,x
	ASL
	TAX
	LDA.l $7E9128,x
	AND.w #$FF7F
	STA.l $7E9128,x
	JMP.w [$05A9]

ADDR_BEEE97:
	LDA.b $42,x
	ASL
	TAX
	LDA.l $7E9128,x
	ORA.w #$0080
	STA.l $7E9128,x
	JMP.w $BEB849

ADDR_BEEEA9:
	TXY
	LDA.w $0042,y
	ASL
	STA.b $32
	LDA.w #$0500
	JSR.w ADDR_BEEF24
	BEQ.b ADDR_BEEF1D
	LDA.w #$0600
	JSR.w ADDR_BEEF24
	BEQ.b ADDR_BEEF1D
	LDA.w #$0700
	JSR.w ADDR_BEEF24
	BNE.b ADDR_BEEED5
	LDX.b $32
	LDA.l $7E9128,x
	DEC
	STA.l $7E9128,x
	BRA.b ADDR_BEEF1D

ADDR_BEEED5:
	LDX.b $32
	SEP.b #$20
	LDA.l $7E9129,x
	SEC
	SBC.w $0044,y
	BEQ.b ADDR_BEEEF1
	DEC
	BEQ.b ADDR_BEEEF1
	REP.b #$20
	LDA.w #$0013
	JSL.l $808B7D
	BRA.b ADDR_BEEF1D

ADDR_BEEEF1:
	LDA.l $7E9128,x
	SEC
	SBC.b #$04
	STA.l $7E9128,x
	AND.b #$0C
	BNE.b ADDR_BEEF08
	LDA.b #$00
	STA.l $7E9129,x
	BRA.b ADDR_BEEF1B

ADDR_BEEF08:
	LDA.w $0044,y
	SEC
	SBC.l $7E9129,x
	BNE.b ADDR_BEEF1B
	LDA.l $7E9128,x
	INC
	STA.l $7E9128,x
ADDR_BEEF1B:
	REP.b #$20
ADDR_BEEF1D:
	LDX.b $64
	STZ.b $00,x
	JMP.w [$05A9]

ADDR_BEEF24:
	CLC
	ADC.b $32
	TAX
	SEP.b #$20
	LDA.w $0044,y
	CMP.l $7E8D28,x
	BEQ.b ADDR_BEEF3A
	INX
	CMP.l $7E8D28,x
	BNE.b ADDR_BEEF40
ADDR_BEEF3A:
	LDA.b #$00
	STA.l $7E8D28,x
ADDR_BEEF40:
	REP.b #$20
	RTS

ADDR_BEEF43:
	LDX.b $64
	LDA.b $54,x
	STA.b $8E
	LDA.b $2E,x
	BNE.b ADDR_BEEF6B
	JSL.l $808DBB
	STA.w $4204
	LDX.b $64
	SEP.b #$20
	LDA.b $44,x
	STA.w $4206
	REP.b #$20
	INC.b $2E,x
	NOP #4
	LDA.w $4216
	INC
	STA.b $4A,x
ADDR_BEEF6B:
	LDY.b $42,x
	JSL.l $BB8432
	BCS.b ADDR_BEEFA2
	LDX.b $68
	LDA.b [$8E]
	STA.b $06,x
	LDY.w #$0002
	LDA.b [$8E],y
	STA.b $0A,x
	LDX.b $64
	LDY.b $46,x
	LDA.b $44,x
	CMP.b $4A,x
	BNE.b ADDR_BEEF8C
	LDY.b $48,x
ADDR_BEEF8C:
	TYA
	LDY.b $68
	STA.w $0042,y
	LDA.b $54,x
	CLC
	ADC.w #$0004
	STA.b $54,x
	STA.b $8E
	DEC.b $44,x
	BNE.b ADDR_BEEF6B
	STZ.b $00,x
ADDR_BEEFA2:
	JMP.w [$05A9]

ADDR_BEEFA5:
	LDA.w $08B8
	BNE.b ADDR_BEEFD1
	LDY.b $64
	LDA.w $002E,y
	ASL
	TAX
	JMP.w (DATA_BEEFB4,x)

DATA_BEEFB4:
	dw ADDR_BEEFC2
	dw ADDR_BEEFDB
	dw ADDR_BEEFF5
	dw ADDR_BEEFFD
	dw ADDR_BEF01C
	dw ADDR_BEEFFD
	dw ADDR_BEF036

ADDR_BEEFC2:
	LDA.w $08BB
	AND.w #$0007
	INC
	STA.w $002E,y
	ASL
	TAX
	JMP.w (DATA_BEEFB4,x)

ADDR_BEEFD1:
	LDX.b $64
	STZ.b $00,x
	STZ.w $08BA
	JMP.w [$05A9]

ADDR_BEEFDB:
	LDA.b $D3
	CMP.w #$001B
	BNE.b ADDR_BEEFD1
	LDA.w $08BC
	SEP.b #$20
	STA.w $08BA
	REP.b #$20
	TYX
	INC.b $2E,x
	INC.w $08BB
	INC.w $08BB
ADDR_BEEFF5:
	LDA.w $0971
	BNE.b ADDR_BEEFD1
	JMP.w [$05A9]

ADDR_BEEFFD:
	LDA.b $D3
	CMP.w #$0003
	BNE.b ADDR_BEEFD1
	LDA.w $08BA
	AND.w #$00FF
	SED
	SEC
	SBC.w $08BC
	CLD
	BEQ.b ADDR_BEF033
	AND.w #$00FF
	CMP.w #$0090
	BEQ.b ADDR_BEF049
	BRA.b ADDR_BEEFD1

ADDR_BEF01C:
	LDA.b $D3
	CMP.w #$001B
	BNE.b ADDR_BEEFD1
	LDA.w $08BA
	AND.w #$00FF
	CMP.w $08BC
	BNE.b ADDR_BEEFD1
	LDA.w $0971
	BNE.b ADDR_BEF049
ADDR_BEF033:
	JMP.w [$05A9]

ADDR_BEF036:
	LDA.w $08BA
	AND.w #$00FF
	CMP.w $08BC
	BNE.b ADDR_BEEFD1
	LDA.w #$0001
	TSB.w $0923
	BRA.b ADDR_BEEFD1

ADDR_BEF049:
	LDA.w $08BC
	SEP.b #$20
	STA.w $08BA
	REP.b #$20
	INC.w $08BB
	LDX.b $64
	STZ.b $00,x
	JMP.w [$05A9]

ADDR_BEF05D:
	LDX.b $64
	LDA.b $52,x
	TAY
	AND.w #$00FF
	ASL
	TAX
	TYA
	XBA
	AND.w #$00FF
	ASL
	LDY.b $64
	JSR.w (DATA_BEF075,x)
	LDX.b $64
	RTL

DATA_BEF075:
	dw ADDR_BEF0CB
	dw ADDR_BEF0CC
	dw ADDR_BEF0CF
	dw ADDR_BEF0EB
	dw ADDR_BEF107
	dw ADDR_BEF110
	dw ADDR_BEF167
	dw ADDR_BEF1BE
	dw ADDR_BEF1F0
	dw ADDR_BEF1F9
	dw ADDR_BEF3E7
	dw ADDR_BEF40A
	dw ADDR_BEF4C9
	dw ADDR_BEF4D2
	dw ADDR_BEF50C
	dw ADDR_BEF551
	dw ADDR_BEF55A
	dw ADDR_BEF58B
	dw ADDR_BEF5C8
	dw ADDR_BEF5D1
	dw ADDR_BEF5D5
	dw ADDR_BEF5E7
	dw ADDR_BEF60B
	dw ADDR_BEF627
	dw ADDR_BEF631
	dw ADDR_BEF648
	dw ADDR_BEF46D
	dw ADDR_BEF67F
	dw ADDR_BEF6E7
	dw ADDR_BEF7A4
	dw ADDR_BEF0CB
	dw ADDR_BEF0CB
	dw ADDR_BEF7CF
	dw ADDR_BEF7E0
	dw ADDR_BEF813
	dw ADDR_BEF82C
	dw ADDR_BEF912
	dw ADDR_BEFA39
	dw ADDR_BEFA5B
	dw ADDR_BEFA7C
	dw ADDR_BEFAAC
	dw ADDR_BEFB0A
	dw ADDR_BEFB46

ADDR_BEF0CB:
	RTS

ADDR_BEF0CC:
	JSR.w ADDR_BEF0EB
ADDR_BEF0CF:
	LDX.w #$0000
	LDA.w $0020,y
	BPL.b ADDR_BEF0D8
	DEX
ADDR_BEF0D8:
	CLC
	ADC.w $0005,y
	STA.w $0005,y
	SEP.b #$20
	TXA
	ADC.w $0007,y
	STA.w $0007,y
	REP.b #$20
	RTS

ADDR_BEF0EB:
	LDX.w #$0000
	LDA.w $0024,y
	BPL.b ADDR_BEF0F4
	DEX
ADDR_BEF0F4:
	CLC
	ADC.w $0009,y
	STA.w $0009,y
	SEP.b #$20
	TXA
	ADC.w $000B,y
	STA.w $000B,y
	REP.b #$20
	RTS

ADDR_BEF107:
	JSR.w ADDR_BEF0CC
	JSR.w ADDR_BEFB69
	JMP.w ADDR_BEFB73

ADDR_BEF110:
	LDA.w $0053,y
	AND.w #$00FF
	ASL
	TAX
	JSR.w (DATA_BEF121,x)
	JSR.w ADDR_BEF0CC
	JMP.w ADDR_BEFB69

DATA_BEF121:
	dw ADDR_BEF125
	dw ADDR_BEF131

ADDR_BEF125:
	TYX
	LDA.b $06,x
	STA.b $42,x
	LDA.b $26,x
	STA.b $48,x
	INC.b $53,x
	RTS

ADDR_BEF131:
	LDA.w $0026,y
	BPL.b ADDR_BEF157
	LDA.w $0046,y
	XBA
	AND.w #$00FF
	EOR.w #$FFFF
	SEC
	ADC.w $0042,y
	CMP.w $0006,y
	BCC.b ADDR_BEF166
ADDR_BEF149:
	LDA.w $0048,y
	EOR.w #$FFFF
	INC
	STA.w $0048,y
	STA.w $0026,y
	RTS

ADDR_BEF157:
	LDA.w $0046,y
	AND.w #$00FF
	CLC
	ADC.w $0042,y
	CMP.w $0006,y
	BCC.b ADDR_BEF149
ADDR_BEF166:
	RTS

ADDR_BEF167:
	LDA.w $0053,y
	AND.w #$00FF
	ASL
	TAX
	JSR.w (DATA_BEF178,x)
	JSR.w ADDR_BEF0CC
	JMP.w ADDR_BEFB5F

DATA_BEF178:
	dw ADDR_BEF17C
	dw ADDR_BEF188

ADDR_BEF17C:
	TYX
	LDA.b $0A,x
	STA.b $44,x
	LDA.b $2A,x
	STA.b $4C,x
	INC.b $53,x
	RTS

ADDR_BEF188:
	LDA.w $002A,y
	BPL.b ADDR_BEF1AE
	LDA.w $004A,y
	XBA
	AND.w #$00FF
	EOR.w #$FFFF
	SEC
	ADC.w $0044,y
	CMP.w $000A,y
	BCC.b ADDR_BEF1BD
ADDR_BEF1A0:
	LDA.w $004C,y
	EOR.w #$FFFF
	INC
	STA.w $004C,y
	STA.w $002A,y
	RTS

ADDR_BEF1AE:
	LDA.w $004A,y
	AND.w #$00FF
	CLC
	ADC.w $0044,y
	CMP.w $000A,y
	BCC.b ADDR_BEF1A0
ADDR_BEF1BD:
	RTS

ADDR_BEF1BE:
	LDA.w $0053,y
	AND.w #$00FF
	ASL
	TAX
	JSR.w (DATA_BEF1D2,x)
	JSR.w ADDR_BEF0CC
	JSR.w ADDR_BEFB69
	JMP.w ADDR_BEFB5F

DATA_BEF1D2:
	dw ADDR_BEF1D6
	dw ADDR_BEF1EA

ADDR_BEF1D6:
	TYX
	LDA.b $06,x
	STA.b $42,x
	LDA.b $0A,x
	STA.b $44,x
	LDA.b $26,x
	STA.b $48,x
	LDA.b $2A,x
	STA.b $4C,x
	INC.b $53,x
	RTS

ADDR_BEF1EA:
	JSR.w ADDR_BEF131
	JMP.w ADDR_BEF188

ADDR_BEF1F0:
	JSR.w ADDR_BEFB69
	JSR.w ADDR_BEF0CF
	JMP.w ADDR_BEF167

ADDR_BEF1F9:
	TAX
	JSR.w (DATA_BEF200,x)
	JMP.w ADDR_BEF0CC

DATA_BEF200:
	dw ADDR_BEF204
	dw ADDR_BEF212

ADDR_BEF204:
	TYX
	INC.b $53,x
	LDA.w #$1919
	STA.b $4A,x
	STZ.b $4C,x
	STZ.b $50,x
	BRA.b ADDR_BEF28A

ADDR_BEF212:
	TYX
	LDA.b $42,x
	BEQ.b ADDR_BEF233
	LDA.b $46,x
	BEQ.b ADDR_BEF226
	CMP.b $06,x
	BEQ.b ADDR_BEF28A
	ROR
	EOR.b $26,x
	BPL.b ADDR_BEF28A
	BRA.b ADDR_BEF233

ADDR_BEF226:
	LDA.b $48,x
	BEQ.b ADDR_BEF233
	CMP.b $0A,x
	BEQ.b ADDR_BEF28A
	ROR
	EOR.b $2A,x
	BPL.b ADDR_BEF28A
ADDR_BEF233:
	LDX.b $64
	LDA.b $4A,x
	LDY.b $46,x
	BEQ.b ADDR_BEF23C
	XBA
ADDR_BEF23C:
	PHA
	AND.w #$00FF
	JSL.l $B8D016
	PLA
	XBA
	AND.w #$00FF
	JSL.l $B8CFDA
	LDX.b $64
	LDA.b $4C,x
	BEQ.b ADDR_BEF27C
	SEC
	SBC.w #$0100
	STA.b $4C,x
	BCS.b ADDR_BEF269
	SEP.b #$20
	STA.b $4D,x
	REP.b #$20
	LDA.b $50,x
	EOR.w #$FFFF
	INC
	STA.b $50,x
ADDR_BEF269:
	LDA.b $46,x
	BEQ.b ADDR_BEF275
	LDA.b $2A,x
	CLC
	ADC.b $50,x
	STA.b $2A,x
	RTS

ADDR_BEF275:
	LDA.b $26,x
	CLC
	ADC.b $50,x
	STA.b $26,x
ADDR_BEF27C:
	RTS

ADDR_BEF27D:
	LDX.b $64
	SEP.b #$20
	LDA.b $4C,x
	LSR
	STA.b $4D,x
	REP.b #$20
	BRA.b ADDR_BEF233

ADDR_BEF28A:
	PHK
	PLB
	STZ.b $5E
	LDA.b $90
	STA.b $60
ADDR_BEF292:
	LDA.b $42,x
	TAY
	CLC
	ADC.w #$0004
	STA.b $42,x
	LDA.b [$5E],y
	INY
	INY
	CMP.w #$FFFA
	BCS.b ADDR_BEF307
	BIT.b $44,x
	BMI.b ADDR_BEF2BA
	STA.b $46,x
	SEC
	SBC.b $06,x
	STA.b $32
	LDA.b [$5E],y
	STA.b $48,x
	SEC
	SBC.b $0A,x
	STA.b $34
	BRA.b ADDR_BEF2CA

ADDR_BEF2BA:
	STA.b $32
	CLC
	ADC.b $06,x
	STA.b $46,x
	LDA.b [$5E],y
	STA.b $34
	CLC
	ADC.b $0A,x
	STA.b $48,x
ADDR_BEF2CA:
	LDA.b $34
	BPL.b ADDR_BEF2D2
	EOR.w #$FFFF
	INC
ADDR_BEF2D2:
	STA.b $38
	LDA.b $32
	BPL.b ADDR_BEF2DC
	EOR.w #$FFFF
	INC
ADDR_BEF2DC:
	STA.b $36
	CMP.b $38
	BCS.b ADDR_BEF360
	STZ.b $46,x
	LDA.b $44,x
	AND.w #$7FFF
	BIT.b $34
	BPL.b ADDR_BEF2F1
	EOR.w #$FFFF
	INC
ADDR_BEF2F1:
	STA.b $2A,x
	LDA.b $36
	LDY.b $38
	JSR.w ADDR_BEF385
	BIT.b $32
	BPL.b ADDR_BEF302
	EOR.w #$FFFF
	INC
ADDR_BEF302:
	STA.b $26,x
	BRL.w ADDR_BEF27D

ADDR_BEF307:
	ASL
	ADC.w #$000B
	PHX
	TAX
	JMP.w (DATA_BEF310,x)

DATA_BEF310:
	dw ADDR_BEF31C
	dw ADDR_BEF330
	dw ADDR_BEF342
	dw ADDR_BEF34A
	dw ADDR_BEF352
	dw ADDR_BEF35A

ADDR_BEF31C:
	PLA
	CLC
	ADC.b [$5E],y
	TAX
	INY
	INY
	LDA.b [$5E],y
	STA.b $00,x
	LDX.b $64
	INC.b $42,x
	INC.b $42,x
	BRL.w ADDR_BEF292

ADDR_BEF330:
	PLX
	LDA.b [$5E],y
	STA.b $4C,x
	INY
	INY
	LDA.b [$5E],y
	STA.b $50,x
	INC.b $42,x
	INC.b $42,x
	BRL.w ADDR_BEF292

ADDR_BEF342:
	PLX
	LDA.b [$5E],y
	STA.b $4A,x
	BRL.w ADDR_BEF292

ADDR_BEF34A:
	PLX
	LDA.b [$5E],y
	STA.b $42,x
	BRL.w ADDR_BEF292

ADDR_BEF352:
	PLX
	LDA.b [$5E],y
	STA.b $44,x
	BRL.w ADDR_BEF292

ADDR_BEF35A:
	PLX
	STZ.b $52,x
	BRL.w ADDR_BEF233

ADDR_BEF360:
	STZ.b $48,x
	LDA.b $44,x
	AND.w #$7FFF
	BIT.b $32
	BPL.b ADDR_BEF36F
	EOR.w #$FFFF
	INC
ADDR_BEF36F:
	STA.b $26,x
	LDA.b $38
	LDY.b $36
	JSR.w ADDR_BEF385
	BIT.b $34
	BPL.b ADDR_BEF380
	EOR.w #$FFFF
	INC
ADDR_BEF380:
	STA.b $2A,x
	BRL.w ADDR_BEF27D

ADDR_BEF385:
	PHY
	LDY.w #$0000
ADDR_BEF389:
	CMP.w #$0100
	BCC.b ADDR_BEF392
	LSR
	INY
	BRA.b ADDR_BEF389

ADDR_BEF392:
	SEP.b #$20
	STA.w $4202
	REP.b #$20
	LDA.b $44,x
	AND.w #$7FFF
ADDR_BEF39E:
	CMP.w #$0100
	BCC.b ADDR_BEF3A7
	LSR
	INY
	BRA.b ADDR_BEF39E

ADDR_BEF3A7:
	SEP.b #$20
	STA.w $4203
	REP.b #$20
	NOP #3
	LDA.w $4216
	STA.w $4204
	PLA
	BEQ.b ADDR_BEF3E6
ADDR_BEF3BA:
	CMP.w #$0100
	BCC.b ADDR_BEF3C3
	LSR
	DEY
	BRA.b ADDR_BEF3BA

ADDR_BEF3C3:
	SEP.b #$20
	STA.w $4206
	REP.b #$20
	NOP #4
	TYA
	BEQ.b ADDR_BEF3DB
	BPL.b ADDR_BEF3DF
	LDA.w $4214
ADDR_BEF3D6:
	LSR
	INY
	BNE.b ADDR_BEF3D6
	RTS

ADDR_BEF3DB:
	LDA.w $4214
	RTS

ADDR_BEF3DF:
	LDA.w $4214
ADDR_BEF3E2:
	ASL
	DEY
	BNE.b ADDR_BEF3E2
ADDR_BEF3E6:
	RTS

ADDR_BEF3E7:
	TAX
	JMP.w (DATA_BEF3EB,x)

DATA_BEF3EB:
	dw ADDR_BEF3EF
	dw ADDR_BEF3FE

ADDR_BEF3EF:
	TYX
	LDA.b $06,x
	STA.b $42,x
	LDA.b $0A,x
	STA.b $44,x
	LDA.b $26,x
	STA.b $20,x
	INC.b $53,x
ADDR_BEF3FE:
	LDX.b $64
	LDA.b $46,x
	CLC
	ADC.b $20,x
	STA.b $46,x
	JMP.w ADDR_BEF46D

ADDR_BEF40A:
	TAX
	JMP.w (DATA_BEF40E,x)

DATA_BEF40E:
	dw ADDR_BEF412
	dw ADDR_BEF428

ADDR_BEF412:
	TYX
	LDA.b $06,x
	STA.b $42,x
	LDA.b $0A,x
	STA.b $44,x
	LDA.b $26,x
	STA.b $20,x
	BPL.b ADDR_BEF426
	LDA.b $4A,x
	XBA
	STA.b $4A,x
ADDR_BEF426:
	INC.b $53,x
ADDR_BEF428:
	LDX.b $64
	LDA.b $4A,x
	BIT.b $26,x
	BMI.b ADDR_BEF431
	XBA
ADDR_BEF431:
	AND.w #$FF00
	STA.b $5E
	LDA.b $46,x
	STA.b $60
	CLC
	ADC.b $20,x
	STA.b $46,x
	BIT.b $20,x
	BPL.b ADDR_BEF44E
	LDA.b $5E
	SEC
	SBC.b $60
	CMP.b $20,x
	BCC.b ADDR_BEF460
	BRA.b ADDR_BEF458

ADDR_BEF44E:
	LDA.b $5E
	CLC
	SBC.b $60
	CLC
	ADC.b $20,x
	BCC.b ADDR_BEF460
ADDR_BEF458:
	LDA.b $26,x
	EOR.w #$FFFF
	INC
	STA.b $26,x
ADDR_BEF460:
	LDA.w #$000A
	JSL.l $B8D016
	LDX.b $64
	JSR.w ADDR_BEF46D
	RTS

ADDR_BEF46D:
	PHK
	PLB
	LDA.b $48,x
	AND.w #$FF00
	STA.b $5E
	LDA.b $47,x
	AND.w #$00FF
	STA.b $60
	JSL.l $B3F4EE
	JSR.w ADDR_BEF49F
	LDX.b $64
	CLC
	ADC.b $42,x
	STA.b $06,x
	LDA.b $60
	JSL.l $B3F4F2
	JSR.w ADDR_BEF49F
	LDX.b $64
	EOR.w #$FFFF
	SEC
	ADC.b $44,x
	STA.b $0A,x
	RTS

ADDR_BEF49F:
	BPL.b ADDR_BEF4B5
	EOR.w #$FFFF
	INC
	ORA.b $5E
	STA.w $4202
	LDA.w $4216
	LDA.w $4216
	XBA
	AND.w #$00FF
	RTS

ADDR_BEF4B5:
	ORA.b $5E
	STA.w $4202
	LDA.w $4216
	LDA.w $4216
	XBA
	AND.w #$00FF
	EOR.w #$FFFF
	INC
	RTS

ADDR_BEF4C9:
	TYX
	DEC.b $04,x
	BPL.b ADDR_BEF4D1
	LSR
	STA.b $52,x
ADDR_BEF4D1:
	RTS

ADDR_BEF4D2:
	LDY.w $0593
	LDA.b $04,x
	BEQ.b ADDR_BEF4EC
	CMP.w #$8000
	ROR
	ROR.b $5E
	CLC
	ADC.b $06,x
	CMP.w $0006,y
	BEQ.b ADDR_BEF4EC
	ROR
	EOR.b $5E
	BPL.b ADDR_BEF50B
ADDR_BEF4EC:
	LDA.b $08,x
	BEQ.b ADDR_BEF503
	CMP.w #$8000
	ROR
	ROR.b $5E
	CLC
	ADC.b $0A,x
	CMP.w $000A,y
	BEQ.b ADDR_BEF503
	ROR
	EOR.b $5E
	BPL.b ADDR_BEF50B
ADDR_BEF503:
	LDA.b $53,x
	AND.w #$00FF
	STA.b $52,x
	CLC
ADDR_BEF50B:
	RTS

ADDR_BEF50C:
	TYX
	LDY.w $0593
	LDA.b $05,x
	AND.w #$00FF
	STA.b $5E
	LDA.b $06,x
	SEC
	SBC.w $0006,y
	BCS.b ADDR_BEF525
	ADC.b $5E
	BCC.b ADDR_BEF550
	BRA.b ADDR_BEF529

ADDR_BEF525:
	CMP.b $5E
	BCS.b ADDR_BEF550
ADDR_BEF529:
	LDA.b $04,x
	AND.w #$00FF
	STA.b $5E
	LDA.b $0A,x
	SEC
	SBC.w $000A,y
	BCS.b ADDR_BEF53E
	ADC.b $5E
	BCC.b ADDR_BEF550
	BRA.b ADDR_BEF542

ADDR_BEF53E:
	CMP.b $5E
	BCS.b ADDR_BEF550
ADDR_BEF542:
	LDA.b $53,x
	AND.w #$00FF
	BEQ.b ADDR_BEF54E
	STA.b $04,x
	LDA.w #$000C
ADDR_BEF54E:
	STA.b $52,x
ADDR_BEF550:
	RTS

ADDR_BEF551:
	JSR.w ADDR_BEFB69
	JSR.w ADDR_BEFB5F
	JMP.w ADDR_BEF0CC

ADDR_BEF55A:
	TAX
	JMP.w (DATA_BEF55E,x)

DATA_BEF55E:
	dw ADDR_BEF0CB
	dw ADDR_BEF564
	dw ADDR_BEF573

ADDR_BEF564:
	TYX
	INC.b $53,x
	LDA.b $0A,x
	STA.b $0C,x
	STZ.b $08,x
	JSR.w ADDR_BEF0EB
	JMP.w ADDR_BEFB73

ADDR_BEF573:
	JSR.w ADDR_BEF0EB
	JSR.w ADDR_BEFB73
	LDX.b $64
	LDA.b $0C,x
	CMP.b $0A,x
	BCS.b ADDR_BEF58A
	STA.b $0A,x
	LDA.w #$0010
	STA.b $52,x
	STZ.b $24,x
ADDR_BEF58A:
	RTS

ADDR_BEF58B:
	TAX
	JMP.w (DATA_BEF58F,x)

DATA_BEF58F:
	dw ADDR_BEF0CB
	dw ADDR_BEF595
	dw ADDR_BEF5A4

ADDR_BEF595:
	TYX
	INC.b $53,x
	LDA.b $06,x
	STA.b $0C,x
	STZ.b $04,x
	JSR.w ADDR_BEFB69
	JMP.w ADDR_BEF0CF

ADDR_BEF5A4:
	JSR.w ADDR_BEFB69
	JSR.w ADDR_BEF0CF
	TYX
	LDA.b $0C,x
	CMP.b $06,x
	BEQ.b ADDR_BEF5BE
	ROR.b $5E
	LDA.b $12,x
	ASL
	EOR.b $5E
	ASL
	LDA.b $0C,x
	BCC.b ADDR_BEF5BE
	RTS

ADDR_BEF5BE:
	STA.b $06,x
	LDA.w #$0011
	STA.b $52,x
	STZ.b $20,x
	RTS

ADDR_BEF5C8:
	JSR.w ADDR_BEFB5F
	JSR.w ADDR_BEF0EB
	JMP.w ADDR_BEF110

ADDR_BEF5D1:
	JSR.w ADDR_BEFB73
	TXY
ADDR_BEF5D5:
	JSR.w ADDR_BEF0CC
	TYX
	DEC.b $1E,x
	BPL.b ADDR_BEF5E6
	STZ.b $1E,x
	LDA.b $53,x
	AND.w #$00FF
	STA.b $52,x
ADDR_BEF5E6:
	RTS

ADDR_BEF5E7:
	TYX
	DEC.b $1E,x
	BMI.b ADDR_BEF5F3
	JSR.w ADDR_BEFB73
	TXY
	JMP.w ADDR_BEF0CC

ADDR_BEF5F3:
	LDA.b $0A,x
	STA.b $1E,x
	LDA.b $20,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.b $20,x
	LDA.w #$FE80
	STA.b $24,x
	INC.b $52,x
	RTS

ADDR_BEF60B:
	JSR.w ADDR_BEFB73
	TXY
	JSR.w ADDR_BEF0CC
	TYX
	LDA.b $1E,x
	CMP.b $0A,x
	BCS.b ADDR_BEF626
	BIT.b $24,x
	BMI.b ADDR_BEF626
	STZ.b $1E,x
	LDA.b $53,x
	AND.w #$00FF
	STA.b $52,x
ADDR_BEF626:
	RTS

ADDR_BEF627:
	JSR.w ADDR_BEFB73
	TXY
	JSR.w ADDR_BEF0EB
	JMP.w ADDR_BEF110

ADDR_BEF631:
	TYX
	LDA.b $04,x
	BIT.b $12,x
	BVC.b ADDR_BEF63C
	EOR.w #$FFFF
	INC
ADDR_BEF63C:
	CMP.w #$8000
	ROR
	STA.b $04,x
	JSR.w ADDR_BEF656
	INC.b $52,x
	RTS

ADDR_BEF648:
	TYX
	JSR.w ADDR_BEF656
	BPL.b ADDR_BEF655
	LDA.b $53,x
	AND.w #$00FF
	STA.b $52,x
ADDR_BEF655:
	RTS

ADDR_BEF656:
	LDY.w $0593
	ASL.b $04,x
	BEQ.b ADDR_BEF66D
	PHP
	LDA.b $04,x
	CLC
	ADC.b $06,x
	CMP.w $0006,y
	ROR.b $04,x
	PLP
	ROR
	EOR.b $04,x
	RTS

ADDR_BEF66D:
	ASL.b $08,x
	PHP
	LDA.b $08,x
	CLC
	ADC.b $0A,x
	CMP.w $000A,y
	ROR.b $08,x
	PLP
	ROR
	EOR.b $04,x
	RTS

ADDR_BEF67F:
	LDA.w $0053,y
	AND.w #$00FF
	ASL
	TAX
	JSR.w (DATA_BEF693,x)
	JSR.w ADDR_BEF0CC
	JSR.w ADDR_BEFB69
	JMP.w ADDR_BEFB5F

DATA_BEF693:
	dw ADDR_BEF697
	dw ADDR_BEF6AB

ADDR_BEF697:
	TYX
	LDA.b $06,x
	STA.b $42,x
	LDA.b $0A,x
	STA.b $44,x
	LDA.b $26,x
	STA.b $48,x
	LDA.b $2A,x
	STA.b $4C,x
	INC.b $53,x
	RTS

ADDR_BEF6AB:
	JSR.w ADDR_BEF131
	LDA.w $002A,y
	BPL.b ADDR_BEF6D6
	LDA.w $004A,y
	XBA
	AND.w #$00FF
	ASL
	ASL
	EOR.w #$FFFF
	SEC
	ADC.w $0044,y
	CMP.w $000A,y
	BCC.b ADDR_BEF6E6
ADDR_BEF6C8:
	LDA.w $004C,y
	EOR.w #$FFFF
	INC
	STA.w $004C,y
	STA.w $002A,y
	RTS

ADDR_BEF6D6:
	LDA.w $004A,y
	AND.w #$00FF
	ASL
	ASL
	ADC.w $0044,y
	CMP.w $000A,y
	BCC.b ADDR_BEF6C8
ADDR_BEF6E6:
	RTS

ADDR_BEF6E7:
	TAX
	BNE.b ADDR_BEF758
	STZ.b $32
	LDX.w $0593
	LDA.b $0A,x
	SEC
	SBC.w $000A,y
	BPL.b ADDR_BEF6FD
	EOR.w #$FFFF
	INC
	DEC.b $32
ADDR_BEF6FD:
	XBA
	STA.w $4204
	SEP.b #$20
	LDA.w $0048,y
	STA.w $4206
	REP.b #$20
	LDA.b $0A,x
	STA.w $004A,y
	STZ.b $34
	LDA.w $4214
	BIT.b $32
	BPL.b ADDR_BEF71D
	EOR.w #$FFFF
	INC
ADDR_BEF71D:
	CLC
	ADC.w $0024,y
	STA.w $0024,y
	LDA.b $06,x
	SEC
	SBC.w $0006,y
	BPL.b ADDR_BEF732
	EOR.w #$FFFF
	INC
	DEC.b $34
ADDR_BEF732:
	XBA
	STA.w $4204
	SEP.b #$20
	LDA.w $0048,y
	STA.w $4206
	REP.b #$20
	LDA.b $06,x
	STA.w $0048,y
	TYX
	INC.b $53,x
	LDA.w $4214
	BIT.b $34
	BPL.b ADDR_BEF753
	EOR.w #$FFFF
	INC
ADDR_BEF753:
	STA.w $0020,y
	BRA.b ADDR_BEF77F

ADDR_BEF758:
	LDX.w $0593
	LDA.b $06,x
	SEC
	SBC.w $0048,y
	CLC
	ADC.w $0006,y
	STA.w $0006,y
	LDA.b $06,x
	STA.w $0048,y
	LDA.b $0A,x
	SEC
	SBC.w $004A,y
	CLC
	ADC.w $000A,y
	STA.w $000A,y
	LDA.b $0A,x
	STA.w $004A,y
ADDR_BEF77F:
	JSR.w ADDR_BEF0CC
	LDX.b $64
	LDA.b $4C,x
	CLC
	ADC.b $24,x
	BMI.b ADDR_BEF793
	CMP.w #$0800
	BCC.b ADDR_BEF793
	LDA.w #$0800
ADDR_BEF793:
	STA.b $24,x
	ASL
	BCS.b ADDR_BEF7A3
	LDA.b $12,x
	EOR.b $4E,x
	AND.w #$3000
	EOR.b $12,x
	STA.b $12,x
ADDR_BEF7A3:
	RTS

ADDR_BEF7A4:
	LDX.b $64
	LDA.w #$0108
	CMP.b $06,x
	BCS.b ADDR_BEF7B8
	LDA.w $0AFC
	ADC.w #$00F8
	CMP.b $06,x
	BCC.b ADDR_BEF7B8
	RTS

ADDR_BEF7B8:
	BEQ.b ADDR_BEF7CE
	STA.b $06,x
	LDA.b $26,x
	EOR.b $20,x
	ASL
	STZ.b $20,x
	BCS.b ADDR_BEF7CE
	STZ.b $26,x
	LDA.w #$0002
	ORA.b $1E,x
	STA.b $1E,x
ADDR_BEF7CE:
	RTS

ADDR_BEF7CF:
	JSR.w ADDR_BEF7E0
	JSR.w ADDR_BEF7A4
	JSR.w ADDR_BEFB69
	JSR.w ADDR_BEFB73
	JSL.l $B8D24C
	RTS

ADDR_BEF7E0:
	LDA.w $0D4E
	BPL.b ADDR_BEF7EA
ADDR_BEF7E5:
	JSL.l $B8D5E6
	RTS

ADDR_BEF7EA:
	LDX.b $64
	CLC
	ADC.w #$0010
	CMP.b $0A,x
	BCS.b ADDR_BEF7E5
	LDA.b $20,x
	ASL
	ROR.b $20,x
	ASL
	ROR.b $20,x
	LDA.b $24,x
	ASL
	ROR.b $24,x
	ASL
	ROR.b $24,x
	JSL.l $B8D5E6
	LDX.b $64
	ASL.b $20,x
	ASL.b $20,x
	ASL.b $24,x
	ASL.b $24,x
	RTS

ADDR_BEF813:
	LDA.w $0026,y
	PHA
	JSR.w ADDR_BEF7CF
	PLY
	LDX.b $64
	LDA.w #$0002
	AND.b $1E,x
	BEQ.b ADDR_BEF82B
	TYA
	EOR.w #$FFFF
	INC
	STA.b $26,x
ADDR_BEF82B:
	RTS

ADDR_BEF82C:
	TAX
	JSR.w (DATA_BEF833,x)
	JMP.w ADDR_BEF7CF

DATA_BEF833:
	dw ADDR_BEF839
	dw ADDR_BEF849
	dw ADDR_BEF8F4

ADDR_BEF839:
	TYX
	LDA.b $06,x
	STA.b $42,x
	LDA.b $0A,x
	STA.b $44,x
	LDA.b $26,x
	STA.b $48,x
	INC.b $53,x
	RTS

ADDR_BEF849:
	LDA.w $0010,y
	AND.w #$0007
	CMP.w #$0006
	BEQ.b ADDR_BEF892
	LDA.w $001E,y
	AND.w #$0002
	BNE.b ADDR_BEF8B6
	LDA.w $0026,y
	BPL.b ADDR_BEF882
	LDA.w $0046,y
	XBA
	AND.w #$00FF
	EOR.w #$FFFF
	SEC
	ADC.w $0042,y
	CMP.w $0006,y
	BCC.b ADDR_BEF891
ADDR_BEF874:
	LDA.w $0026,y
	EOR.w #$FFFF
	INC
	STA.w $0026,y
	STA.w $0048,y
	RTS

ADDR_BEF882:
	LDA.w $0046,y
	AND.w #$00FF
	CLC
	ADC.w $0042,y
	CMP.w $0006,y
	BCC.b ADDR_BEF874
ADDR_BEF891:
	RTS

ADDR_BEF892:
	TYX
	INC.b $53,x
	RTS

ADDR_BEF896:
	JSR.w ADDR_BEF7E0
	JSR.w ADDR_BEF7A4
	JSR.w ADDR_BEFB69
	JSR.w ADDR_BEFB73
	JSL.l $B8D24C
	JSR.w ADDR_BEF7E0
	JSR.w ADDR_BEF7A4
	JSR.w ADDR_BEFB69
	JSR.w ADDR_BEFB73
	JSL.l $B8D24C
ADDR_BEF8B6:
	TYX
	LDA.b $46,x
	BIT.b $48,x
	BPL.b ADDR_BEF8D7
	AND.w #$FF00
	XBA
	CLC
	ADC.w $0006,y
	CMP.w #$0100
	BCS.b ADDR_BEF8CD
	LDA.w #$0100
ADDR_BEF8CD:
	STA.w $0042,y
	LDA.w $0048,y
	BPL.b ADDR_BEF8ED
	BRA.b ADDR_BEF8E9

ADDR_BEF8D7:
	AND.w #$00FF
	EOR.w #$FFFF
	SEC
	ADC.w $0006,y
	STA.w $0042,y
	LDA.w $0048,y
	BMI.b ADDR_BEF8ED
ADDR_BEF8E9:
	EOR.w #$FFFF
	INC
ADDR_BEF8ED:
	STA.w $0026,y
	STA.w $0048,y
	RTS

ADDR_BEF8F4:
	LDA.w $0010,y
	AND.w #$0007
	CMP.w #$0006
	BEQ.b ADDR_BEF911
	TYX
	LDA.b $48,x
	EOR.w #$FFFF
	INC
	STA.b $48,x
	LDA.b $1E,x
	ORA.w #$0002
	STA.b $1E,x
	DEC.b $53,x
ADDR_BEF911:
	RTS

ADDR_BEF912:
	LDA.w $0053,y
	AND.w #$00FF
	ASL
	TAX
	JSR.w (DATA_BEF92B,x)
	LDY.b $64
	JSR.w ADDR_BEF0CC
	LDA.w $0006,y
	STA.w $0042,y
	JMP.w ADDR_BEFB5F

DATA_BEF92B:
	dw ADDR_BEF92F
	dw ADDR_BEF95B

ADDR_BEF92F:
	JSR.w ADDR_BEF17C
	LDA.b $0A,x
	STA.b $0C,x
	LDY.b $64
	LDX.w $0593
	LDA.b $42,x
	STA.w $0002,y
ADDR_BEF940:
	LDY.b $64
	LDX.b $02,y
	LDY.b $64
	LDA.w $0010,y
	STA.b $32
	CPX.b $64
	LDA.b $4A,x
	BCC.b ADDR_BEF953
	LDA.b $06,x
ADDR_BEF953:
	SEC
	SBC.w $005C,y
	STA.w $0010,y
	RTS

ADDR_BEF95B:
	STZ.w $0A92
	LDA.w #$0000
	LDX.w #$0000
	JSR.w ADDR_BEFA16
	BNE.b ADDR_BEF97D
	LDA.w #$FFC0
	LDX.w #$0000
	JSR.w ADDR_BEFA16
	BNE.b ADDR_BEF97D
	LDA.w #$0040
	LDX.w #$0000
	JSR.w ADDR_BEFA16
ADDR_BEF97D:
	STA.w $0A92
	LDA.b $AC
	STA.w $0A94
	STZ.w $0A96
	LDA.w #$0000
	LDX.w #$0040
	JSR.w ADDR_BEFA16
	BNE.b ADDR_BEF9A7
	LDA.w #$FFC0
	LDX.w #$0040
	JSR.w ADDR_BEFA16
	BNE.b ADDR_BEF9A7
	LDA.w #$0040
	LDX.w #$0040
	JSR.w ADDR_BEFA16
ADDR_BEF9A7:
	STA.w $0A96
	LDY.b $64
	LDA.w $0A92
	BNE.b ADDR_BEF9B9
	LDA.w $0A96
	BNE.b ADDR_BEF9B9
	LDA.w $000C,y
ADDR_BEF9B9:
	STA.w $000C,y
	SEC
	SBC.w $000E,y
	STA.w $0044,y
	SEC
	SBC.w $000A,y
	STA.b $32
	EOR.w $002A,y
	BMI.b ADDR_BEF9F7
	LDA.w $004A,y
	BIT.b $32
	BPL.b ADDR_BEF9E0
	XBA
	AND.w #$00FF
	CLC
	ADC.b $32
	BPL.b ADDR_BEF9F7
	BRA.b ADDR_BEF9EB

ADDR_BEF9E0:
	AND.w #$00FF
	EOR.w #$FFFF
	SEC
	ADC.b $32
	BMI.b ADDR_BEF9F7
ADDR_BEF9EB:
	ASL
	ASL
	ASL
	ASL
	ASL
	CLC
	ADC.w $004C,y
	STA.w $002A,y
ADDR_BEF9F7:
	JSR.w ADDR_BEF188
	JSR.w ADDR_BEF940
	SEC
	SBC.b $32
	CLC
	ADC.w $0006,y
	STA.w $0006,y
	SEC
	SBC.w $0010,y
	EOR.w #$FFFF
	INC
	ASL
	ASL
	ASL
	STA.w $0020,y
	RTS

ADDR_BEFA16:
	LDY.b $64
	CLC
	ADC.w $000C,y
	STA.b $34
	TXA
	CLC
	ADC.w $0006,y
	CLC
	ADC.w $005C,y
	JSL.l $B5C3E7
	EOR.w #$FFFF
	BPL.b ADDR_BEFA35
	SEC
	ADC.w #$6300
	RTS

ADDR_BEFA35:
	LDA.w #$0000
	RTS

ADDR_BEFA39:
	JSR.w ADDR_BEF7E0
	JSR.w ADDR_BEF7A4
	LDX.b $64
	LDA.b $22,x
	CLC
	ADC.b $24,x
	BMI.b ADDR_BEFA51
	LDY.w #$0002
	CMP.b [$8E],y
	BCC.b ADDR_BEFA51
	LDA.b [$8E],y
ADDR_BEFA51:
	STA.b $24,x
	JSR.w ADDR_BEFB69
	JSL.l $B8D24C
	RTS

ADDR_BEFA5B:
	JSR.w ADDR_BEF7E0
	JSR.w ADDR_BEF7A4
	JSR.w ADDR_BEFB73
	JSL.l $B8D24C
	LDX.b $64
	LDA.b $1E,x
	AND.w #$0101
	CMP.w #$0101
	BNE.b ADDR_BEFA7B
	LDA.b $53,x
	AND.w #$00FF
	STA.b $52,x
ADDR_BEFA7B:
	RTS

ADDR_BEFA7C:
	JSR.w ADDR_BEF7E0
	JSR.w ADDR_BEF7A4
	JSR.w ADDR_BEFB73
	JSL.l $B8D24C
	LDX.b $64
	LDA.b $1E,x
	AND.w #$0101
	CMP.w #$0101
	BNE.b ADDR_BEFAAB
	LDA.b $24,x
	EOR.w #$FFFF
	INC
	STA.b $24,x
	LDA.b $20,x
	CMP.w #$8000
	ROR
	CMP.w #$8000
	ROR
	STA.b $20,x
	DEC.b $52,x
ADDR_BEFAAB:
	RTS

ADDR_BEFAAC:
	LDA.w $0026,y
	PHA
	JSR.w ADDR_BEF7CF
	LDX.b $64
	LDA.w #$0002
	AND.b $1E,x
	BNE.b ADDR_BEFABE
	PLA
	RTS

ADDR_BEFABE:
	LDA.b $0A,x
	SEC
	SBC.b $42,x
	STA.b $34
	LDY.w #$000F
	LDA.b $01,S
	BPL.b ADDR_BEFACF
	LDY.w #$FFF1
ADDR_BEFACF:
	TYA
	CLC
	ADC.b $06,x
	JSL.l $B5C3E7
	EOR.w #$FFFF
	BPL.b ADDR_BEFAF7
	SEC
	ADC.w #$6300
	SEC
	SBC.b $0A,x
	BCS.b ADDR_BEFAE9
	ADC.b $42,x
	BCC.b ADDR_BEFAF7
ADDR_BEFAE9:
	PLA
	STA.b $26,x
	CMP.w #$8000
	ROR
	STA.b $20,x
	LDA.b $44,x
	STA.b $24,x
	RTS

ADDR_BEFAF7:
	PLA
	EOR.w #$FFFF
	INC
	STA.b $26,x
	STZ.b $20,x
	STZ.b $04,x
	LDA.w #$0561
	JSL.l $B3A429
	RTS

ADDR_BEFB0A:
	LDA.w $0026,y
	STA.w $0DAA
	LDA.w $002A,y
	STA.w $0DAE
	JSR.w ADDR_BEFB69
	JSR.w ADDR_BEFB5F
	JSL.l $B8D5E6
	LDX.b $64
	LDA.b $26,x
	BNE.b ADDR_BEFB2C
	SEC
	SBC.w $0DAA
	STA.b $26,x
ADDR_BEFB2C:
	LDA.b $2A,x
	BEQ.b ADDR_BEFB3A
	LDA.b $1E,x
	AND.w #$0101
	CMP.w #$0001
	BNE.b ADDR_BEFB45
ADDR_BEFB3A:
	LDA.w $0DAE
	EOR.w #$FFFF
	INC
	STA.b $2A,x
	STZ.b $24,x
ADDR_BEFB45:
	RTS

ADDR_BEFB46:
	TYX
	LDA.b $26,x
	PHA
	LDA.b $20,x
	PHA
	STZ.b $20,x
	JSR.w ADDR_BEFB5F
	JSL.l $B8D5E6
	LDX.b $64
	PLA
	STA.b $20,x
	PLA
	STA.b $26,x
	RTS

ADDR_BEFB5F:
	LDY.w #$0004
	LDA.b [$8E],y
	JSL.l $B8CFDA
	RTS

ADDR_BEFB69:
	LDY.w #$0004
	LDA.b [$8E],y
	JSL.l $B8D016
	RTS

ADDR_BEFB73:
	LDX.b $64
	LDY.w #$0000
	LDA.b [$8E],y
	LDY.w #$0002
	CLC
	ADC.b $24,x
	BMI.b ADDR_BEFB88
	CMP.b [$8E],y
	BCC.b ADDR_BEFB88
	LDA.b [$8E],y
ADDR_BEFB88:
	STA.b $24,x
	RTS
