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

ADDR_B9D000:
	TAX
	LDA.b $66
	PHA
	LDA.b $64
	PHA
	LDA.w $0599
	STA.b $66
	LDA.w $0597
	STA.b $64
	TXA
	JSL.l ADDR_B9D0B8
	PLA
	STA.b $64
	PLA
	STA.b $66
	RTL

ADDR_B9D01D:
	TAX
	LDA.b $66
	PHA
	LDA.b $64
	PHA
	LDA.w $0599
	STA.b $66
	LDA.w $0597
	STA.b $64
	TXA
	JSL.l ADDR_B9D0C6
	PLA
	STA.b $64
	PLA
	STA.b $66
	RTL

ADDR_B9D03A:
	STA.b $26
	LDX.b $64
	LDA.b $00,x
	SEC
	SBC.w #$01A4
	LSR
	LSR
	CLC
	ADC.b $26
	BRA.b ADDR_B9D0C6

ADDR_B9D04B:
	STA.b $32
	LDA.w $0595
	STA.b $66
	TAX
	LDA.b $00,x
	PHX
	PHA
	LDA.b $64
	PHA
	LDA.b $6C
	BEQ.b ADDR_B9D071
	STA.b $64
	LDX.b $64
	LDA.b $00,x
	SEC
	SBC.w #$0190
	LSR
	LSR
	CLC
	ADC.b $32
	JSL.l ADDR_B9D0B8
ADDR_B9D071:
	PLA
	STA.b $64
	PLA
	PLX
	STA.b $00,x
	LDX.b $64
	RTL

ADDR_B9D07B:
	STA.b $32
	LDX.b $64
	LDA.b $00,x
	SEC
	SBC.w #$0190
	LSR
	LSR
	CLC
	ADC.b $32
	BRA.b ADDR_B9D0C6

ADDR_B9D08C:
	STA.b $26
	LDA.b $6E
	SEC
	SBC.w #$0190
	LSR
	LSR
	CLC
	ADC.b $26
	BRA.b ADDR_B9D0B8

ADDR_B9D09B:
	TAX
	LDA.b $64
	PHA
	LDA.b $68
	PHA
	STA.b $64
	TXA
	JSL.l ADDR_B9D0C6
	PLA
	STA.b $68
	PLA
	STA.b $64
	RTL

ADDR_B9D0B0:
	LDY.b $66
	CMP.w $0000,y
	BNE.b ADDR_B9D0B8
	RTL

ADDR_B9D0B8:
	LDY.b $66
	STA.w $0000,y
	CPY.w #$16B2
	BEQ.b ADDR_B9D0C6
	CLC
	ADC.w #$00A3
ADDR_B9D0C6:
	PHB
	PEA.w $F900
	PLB
	PLB
	LDX.b $64
	STA.b $36,x
	TAY
	LDA.w #$0100
	STA.b $3A,x
	STZ.b $38,x
	STZ.b $3E,x
	TYA
	ASL
	ASL
	TXY
	TAX
	LDA.l $F90002,x
	STA.b $26
	LDA.l $F90000,x
	TYX
	STA.b $3C,x
	TAY
	LDA.b $26
	STA.b $40,x
	BRA.b ADDR_B9D115

ADDR_B9D0F3:
	LDX.b $64
	LDA.b $2E,x
	PHA
	JSL.l ADDR_B9D100
	PLA
	STA.b $2E,x
	RTL

ADDR_B9D100:
	LDX.b $64
	LDA.b $38,x
	SEC
	SBC.b $3A,x
	STA.b $38,x
	BEQ.b ADDR_B9D10D
	BPL.b ADDR_B9D13E
ADDR_B9D10D:
	PHB
	PEA.w $F900
	PLB
	PLB
	LDY.b $3C,x
ADDR_B9D115:
	DEY
	LDA.w $0000,y
	BMI.b ADDR_B9D152
	AND.w #$FF00
	CLC
	ADC.b $38,x
	STA.b $38,x
	BPL.b ADDR_B9D131
	INY
	INY
	INY
	INY
	BRA.b ADDR_B9D115

ADDR_B9D12B:
	LDX.b $64
	STZ.b $38,x
	BRA.b ADDR_B9D13D

ADDR_B9D131:
	INY
	INY
	LDA.w $0000,y
	STA.b $1A,x
	INY
	INY
	TYA
	STA.b $3C,x
ADDR_B9D13D:
	PLB
ADDR_B9D13E:
	LDA.b $3E,x
	BNE.b ADDR_B9D143
	RTL

ADDR_B9D143:
	STA.b $26
	PHB
	PHK
	PLB
	PHX
	PEA.w ADDR_B9D14F-$01
	JMP.w ($0026)
ADDR_B9D14F:
	PLX
	PLB
	RTL

ADDR_B9D152:
	AND.w #$FF00
	INY
	XBA
	SEC
	SBC.w #$0080
	ASL
	TAX
	JMP.w (UNK_B9D4C5,x)

ADDR_B9D160:
	LDX.b $64
	LDA.b $36,x
	ASL
	ASL
	TXY
	TAX
	LDA.l $F90000,x
	TYX
	STA.b $3C,x
	TAY
	BRA.b ADDR_B9D115

ADDR_B9D172:
	LDX.b $64
	INY
	LDA.w $0000,y
	STA.b $26
	INY
	INY
	TYA
	PHA
	STA.b $3C,x
	PHB
	PHK
	PLB
	PEA.w ADDR_B9D189-$01
	JMP.w ($0026)
ADDR_B9D189:
	PLB
	PLA
	STA.b $52
	LDX.b $64
	LDY.b $3C,x
	TYA
	CMP.b $52
	BNE.b ADDR_B9D199
	JMP.w ADDR_B9D115

ADDR_B9D199:
	PLB
	RTL

ADDR_B9D19B:
	LDX.b $64
	INY
	LDA.w $0000,y
	TAY
	JMP.w ADDR_B9D115

ADDR_B9D1A5:
	LDX.b $64
	TYA
	STA.b $3C,x
	INY
	LDA.w $0000,y
	STA.b $26
	INY
	INY
	JMP.w ($0026)

ADDR_B9D1B5:
	LDX.b $64
	INY
	LDA.w $0000,y
	STA.b $3E,x
	INY
	INY
	JMP.w ADDR_B9D115

ADDR_B9D1C2:
	LDX.b $64
	INY
	LDA.w $0000,y
	PHY
	JSL.l $B58003
	PLY
	INY
	INY
	LDX.b $64
	JMP.w ADDR_B9D115

ADDR_B9D1D5:
	LDX.b $64
	INY
	LDA.w $0000,y
	PEA.w $F980
	PLB
	PHY
	PHA
	JSL.l $BBBB46
	PLA
	BCS.b ADDR_B9D1EC
	JSL.l $B58003
ADDR_B9D1EC:
	PLY
	PLB
	INY
	INY
	LDX.b $64
	JMP.w ADDR_B9D115

ADDR_B9D1F5:
	LDX.b $64
	INY
	LDA.w $0000,y
	STA.b $26
	INY
	INY
	TYA
	STA.b $3C,x
	PHB
	PHK
	PLB
	PEA.w ADDR_B9D20B-$01
	JMP.w ($0026)
ADDR_B9D20B:
	PLB
	LDX.b $64
	LDY.b $3C,x
	LDA.w $0000,y
	BCS.b ADDR_B9D21A
	INY
	INY
	JMP.w ADDR_B9D115

ADDR_B9D21A:
	TAY
	JMP.w ADDR_B9D115

ADDR_B9D21E:
	LDX.b $64
	INY
	LDA.w $0000,y
	STA.b $26
	INY
	INY
	TYA
	STA.b $3C,x
	PHB
	PHK
	PLB
	PEA.w ADDR_B9D234-$01
	JMP.w ($0026)
ADDR_B9D234:
	PLB
	LDX.b $64
	LDY.b $3C,x
	LDA.w $0000,y
	PLB
	JMP.w ADDR_B9D0C6

ADDR_B9D240:
	INY
	LDA.w $0000,y
	AND.w #$00FF
	CLC
	ADC.b $64
	TAX
	INY
	LDA.w $0000,y
	INY
	INY
	STY.b $00,x
	TAY
	LDX.b $64
	JMP.w ADDR_B9D115

ADDR_B9D259:
	INY
	LDA.w $0000,y
	AND.w #$00FF
	CLC
	ADC.b $64
	TAX
	LDY.b $00,x
	LDX.b $64
	JMP.w ADDR_B9D115

ADDR_B9D26B:
	LDX.b $64
	LDA.w $0000,y
	AND.w #$FF00
	CLC
	ADC.b $38,x
	STA.b $38,x
	BPL.b ADDR_B9D283
	INY
	INY
	INY
	INY
	INY
	INY
	JMP.w ADDR_B9D115

ADDR_B9D283:
	LDA.w $0002,y
	STA.b $1A,x
	LDA.l $00006C
	BEQ.b ADDR_B9D29E
	TAX
	LDA.l $000593
	CMP.b $64
	BNE.b ADDR_B9D29E
	LDA.w $0004,y
	STA.b $1A,x
	STZ.b $3A,x
ADDR_B9D29E:
	LDX.b $64
	TYA
	CLC
	ADC.w #$0006
	STA.b $3C,x
	JMP.w ADDR_B9D13D

ADDR_B9D2AA:
	LDX.b $64
	LDA.w $0000,y
	AND.w #$FF00
	CLC
	ADC.b $38,x
	STA.b $38,x
	BPL.b ADDR_B9D2C6
	INY
	INY
	INY
	INY
	INY
	INY
	INY
	INY
	INY
	INY
	JMP.w ADDR_B9D115

ADDR_B9D2C6:
	LDA.w $0002,y
	STA.b $1A,x
	LDA.l $00006C
	BEQ.b ADDR_B9D2F9
	TAX
	LDA.l $000593
	CMP.b $64
	BNE.b ADDR_B9D2F9
	LDA.w $0006,y
	CLC
	ADC.l $000D72
	STA.l $000D76
	LDA.w $0008,y
	CLC
	ADC.l $000D74
	STA.l $000D78
	LDA.w $0004,y
	STA.b $1A,x
	STZ.b $3A,x
ADDR_B9D2F9:
	LDX.b $64
	TYA
	CLC
	ADC.w #$000A
	STA.b $3C,x
	JMP.w ADDR_B9D13D

ADDR_B9D305:
	LDX.b $64
	LDA.w $0000,y
	AND.w #$FF00
	CLC
	ADC.b $38,x
	STA.b $38,x
	BPL.b ADDR_B9D31F
	INY
	INY
	INY
	INY
	INY
	INY
	INY
	INY
	JMP.w ADDR_B9D115

ADDR_B9D31F:
	LDA.w $0002,y
	STA.b $1A,x
	LDA.l $00006C
	BEQ.b ADDR_B9D34A
	LDA.l $000593
	CMP.b $64
	BNE.b ADDR_B9D34A
	LDA.w $0004,y
	CLC
	ADC.l $000D72
	STA.l $000D76
	LDA.w $0006,y
	CLC
	ADC.l $000D74
	STA.l $000D78
ADDR_B9D34A:
	LDX.b $64
	TYA
	CLC
	ADC.w #$0008
	STA.b $3C,x
	JMP.w ADDR_B9D13D

ADDR_B9D356:
	LDA.l $00006C
	BEQ.b ADDR_B9D37C
	LDA.l $000593
	CMP.b $64
	BNE.b ADDR_B9D37C
	LDA.w $0001,y
	CLC
	ADC.l $000D72
	STA.l $000D76
	LDA.w $0003,y
	CLC
	ADC.l $000D74
	STA.l $000D78
ADDR_B9D37C:
	LDX.b $64
	TYA
	CLC
	ADC.w #$0005
	TAY
	JMP.w ADDR_B9D115

ADDR_B9D387:
	LDX.b $64
	LDA.w $0000,y
	AND.w #$FF00
	CLC
	ADC.b $38,x
	STA.b $38,x
	BPL.b ADDR_B9D39F
	INY
	INY
	INY
	INY
	INY
	INY
	JMP.w ADDR_B9D115

ADDR_B9D39F:
	LDA.w $0002,y
	STA.b $1A,x
	LDA.l $000D7A
	BEQ.b ADDR_B9D3BE
	LDA.l $000593
	CMP.b $64
	BNE.b ADDR_B9D3BE
	LDA.l $000D7A
	TAX
	LDA.w $0004,y
	STA.b $1A,x
	STZ.b $3A,x
ADDR_B9D3BE:
	LDX.b $64
	TYA
	CLC
	ADC.w #$0006
	STA.b $3C,x
	JMP.w ADDR_B9D13D

ADDR_B9D3CA:
	LDX.b $64
	LDA.w $0000,y
	AND.w #$FF00
	CLC
	ADC.b $38,x
	STA.b $38,x
	BPL.b ADDR_B9D3DF
	JSR.w ADDR_B9D3E7
	JMP.w ADDR_B9D115

ADDR_B9D3DF:
	JSR.w ADDR_B9D3E7
	STA.b $3C,x
	JMP.w ADDR_B9D13D

ADDR_B9D3E7:
	LDA.w $0002,y
	STA.b $1A,x
	LDA.l $000D7A
	BEQ.b ADDR_B9D414
	LDA.l $000593
	CMP.b $64
	BNE.b ADDR_B9D414
	LDA.l $000D7A
	TAX
	LDA.w $0004,y
	STA.b $1A,x
	STZ.b $3A,x
	LDA.w $0006,y
	STA.l $000D7C
	LDA.w $0008,y
	STA.l $000D7E
ADDR_B9D414:
	LDX.b $64
	TYA
	CLC
	ADC.w #$000A
	TAY
	RTS

ADDR_B9D41D:
	LDX.b $64
	LDA.w $0000,y
	AND.w #$FF00
	CLC
	ADC.b $38,x
	STA.b $38,x
	BPL.b ADDR_B9D437
	INY
	INY
	INY
	INY
	INY
	INY
	INY
	INY
	JMP.w ADDR_B9D115

ADDR_B9D437:
	LDA.w $0002,y
	STA.b $1A,x
	LDA.l $000D7A
	BEQ.b ADDR_B9D458
	LDA.l $000593
	CMP.b $64
	BNE.b ADDR_B9D458
	LDA.w $0004,y
	STA.l $000D7C
	LDA.w $0006,y
	STA.l $000D7E
ADDR_B9D458:
	LDX.b $64
	TYA
	CLC
	ADC.w #$0008
	STA.b $3C,x
	JMP.w ADDR_B9D13D

ADDR_B9D464:
	LDA.l $000D7A
	BEQ.b ADDR_B9D480
	LDA.l $000593
	CMP.b $64
	BNE.b ADDR_B9D480
	LDA.w $0001,y
	STA.l $000D7C
	LDA.w $0003,y
	STA.l $000D7E
ADDR_B9D480:
	LDX.b $64
	TYA
	CLC
	ADC.w #$0005
	TAY
	JMP.w ADDR_B9D115

ADDR_B9D48B:
	LDX.b $64
	LDA.w $0000,y
	AND.w #$FF00
	CLC
	ADC.b $38,x
	STA.b $38,x
	BPL.b ADDR_B9D4A5
	INY
	INY
	INY
	INY
	INY
	INY
	INY
	INY
	JMP.w ADDR_B9D115

ADDR_B9D4A5:
	LDA.w $0002,y
	STA.b $1A,x
	LDA.b $42,x
	BEQ.b ADDR_B9D4BB
	TAX
	LDA.w $0004,y
	STA.b $1A,x
	LDA.w $0006,y
	STA.b $44,x
	LDX.b $64
ADDR_B9D4BB:
	TYA
	CLC
	ADC.w #$0008
	STA.b $3C,x
	JMP.w ADDR_B9D13D

UNK_B9D4C5:
	dw ADDR_B9D160
	dw ADDR_B9D172
	dw ADDR_B9D19B
	dw ADDR_B9D1A5
	dw ADDR_B9D1B5
	dw ADDR_B9D26B
	dw ADDR_B9D2AA
	dw ADDR_B9D305
	dw ADDR_B9D356
	dw ADDR_B9D387
	dw ADDR_B9D3CA
	dw ADDR_B9D41D
	dw ADDR_B9D464
	dw ADDR_B9D48B
	dw ADDR_B9D1C2
	dw ADDR_B9D1F5
	dw ADDR_B9D21E
	dw ADDR_B9D240
	dw ADDR_B9D259
	dw ADDR_B9D1D5
	dw ADDR_B9D160

ADDR_B9D4EF:
	LDA.l $000515
	CMP.w #$0003
	BNE.b ADDR_B9D4FB
	JMP.w ADDR_B9D12B

ADDR_B9D4FB:
	JMP.w ADDR_B9D115

ADDR_B9D4FE:
	LDA.b $4E,x
	AND.w #$0003
	CMP.w #$0003
	BEQ.b ADDR_B9D50B
	JMP.w ADDR_B9D12B

ADDR_B9D50B:
	JMP.w ADDR_B9D115

ADDR_B9D50E:
	LDA.l $000593
	TAX
	LDA.b $24,x
	BPL.b ADDR_B9D51C
	LDX.b $64
	JMP.w ADDR_B9D12B

ADDR_B9D51C:
	LDX.b $64
	JMP.w ADDR_B9D115

ADDR_B9D521:
	LDA.b $2E,x
	CMP.w #$002C
	BNE.b ADDR_B9D52B
	JMP.w ADDR_B9D12B

ADDR_B9D52B:
	JMP.w ADDR_B9D115

ADDR_B9D52E:
	LDA.l $000593
	TAX
	LDA.b $24,x
	BMI.b ADDR_B9D53C
	LDX.b $64
	JMP.w ADDR_B9D12B

ADDR_B9D53C:
	LDX.b $64
	JMP.w ADDR_B9D115

ADDR_B9D541:
	LDA.b $1E,x
	AND.w #$0101
	BNE.b ADDR_B9D557
	LDA.b $0A,x
	SEC
	SBC.l $0017C0
	CMP.w #$00F0
	BPL.b ADDR_B9D557
	JMP.w ADDR_B9D12B

ADDR_B9D557:
	JMP.w ADDR_B9D115

ADDR_B9D55A:
	LDA.b $24,x
	BPL.b ADDR_B9D561
	JMP.w ADDR_B9D12B

ADDR_B9D561:
	JMP.w ADDR_B9D115

ADDR_B9D564:
	LDA.b $24,x
	BMI.b ADDR_B9D56B
	JMP.w ADDR_B9D12B

ADDR_B9D56B:
	JMP.w ADDR_B9D115

ADDR_B9D56E:
	LDA.b $1E,x
	AND.w #$1000
	BNE.b ADDR_B9D586
	LDA.b $0C,x
	BMI.b ADDR_B9D583
	SEC
	SBC.b $0A,x
	BMI.b ADDR_B9D586
	CMP.w #$0048
	BMI.b ADDR_B9D586
ADDR_B9D583:
	JMP.w ADDR_B9D12B

ADDR_B9D586:
	JMP.w ADDR_B9D115

ADDR_B9D589:
	LDA.b $1E,x
	AND.w #$1000
	BNE.b ADDR_B9D5A1
	LDA.b $0C,x
	BMI.b ADDR_B9D59E
	SEC
	SBC.b $0A,x
	BMI.b ADDR_B9D5A1
	CMP.w #$0010
	BMI.b ADDR_B9D5A1
ADDR_B9D59E:
	JMP.w ADDR_B9D12B

ADDR_B9D5A1:
	JMP.w ADDR_B9D115

ADDR_B9D5A4:
	LDA.b $1E,x
	AND.w #$0001
	BNE.b ADDR_B9D5AE
	JMP.w ADDR_B9D12B

ADDR_B9D5AE:
	JMP.w ADDR_B9D115

ADDR_B9D5B1:
	LDA.b $1E,x
	AND.w #$0001
	BEQ.b ADDR_B9D5C3
	LDA.b $10,x
	AND.w #$0007
	CMP.l $000088
	BNE.b ADDR_B9D5C6
ADDR_B9D5C3:
	JMP.w ADDR_B9D12B

ADDR_B9D5C6:
	JMP.w ADDR_B9D115

ADDR_B9D5C9:
	LDA.b $20,x
	BEQ.b ADDR_B9D5D0
	JMP.w ADDR_B9D12B

ADDR_B9D5D0:
	JMP.w ADDR_B9D115

ADDR_B9D5D3:
	LDA.l $000593
	TAX
	LDA.b $26,x
	BNE.b ADDR_B9D5E1
ADDR_B9D5DC:
	LDX.b $64
	JMP.w ADDR_B9D12B

ADDR_B9D5E1:
	LDA.b $20,x
	BPL.b ADDR_B9D5E9
	EOR.w #$FFFF
	INC
ADDR_B9D5E9:
	CMP.w #$0180
	BMI.b ADDR_B9D5DC
	LDX.b $64
	JMP.w ADDR_B9D115

ADDR_B9D5F3:
	LDA.l $000515
	CMP.w #$0003
	BNE.b ADDR_B9D5FE
	CLC
	RTS

ADDR_B9D5FE:
	SEC
	RTS

ADDR_B9D600:
	LDA.l $000515
	CMP.w #$0002
	BEQ.b ADDR_B9D614
	CMP.w #$0001
	BNE.b ADDR_B9D616
	LDA.l $00052D
	BEQ.b ADDR_B9D616
ADDR_B9D614:
	CLC
	RTS

ADDR_B9D616:
	SEC
	RTS

ADDR_B9D618:
	LDA.l $000B02
	AND.w #$0040
	BEQ.b ADDR_B9D623
	CLC
	RTS

ADDR_B9D623:
	SEC
	RTS

ADDR_B9D625:
	LDA.l $00006C
	BNE.b ADDR_B9D62D
	SEC
	RTS

ADDR_B9D62D:
	CLC
	RTS

ADDR_B9D62F:
	LDA.l $0008A4
	BNE.b ADDR_B9D637
	SEC
	RTS

ADDR_B9D637:
	CLC
	RTS

ADDR_B9D639:
	LDA.l $000593
	TAX
	LDA.b $26,x
	BNE.b ADDR_B9D644
	SEC
	RTS

ADDR_B9D644:
	CLC
	RTS

ADDR_B9D646:
	LDA.b $0C,x
	BMI.b ADDR_B9D656
	SEC
	SBC.b $0A,x
	BMI.b ADDR_B9D654
	CMP.w #$0030
	BPL.b ADDR_B9D656
ADDR_B9D654:
	CLC
	RTS

ADDR_B9D656:
	SEC
	RTS

ADDR_B9D658:
	PHY
	LDY.b $66
	LDA.w $0004,y
	AND.w #$4000
	BEQ.b ADDR_B9D671
	LDA.b $2A
	SEC
	SBC.w $001A,y
	CMP.w #$0015
	BMI.b ADDR_B9D671
	PLY
	SEC
	RTS

ADDR_B9D671:
	PLY
	CLC
	RTS

ADDR_B9D674:
	LDA.b $1E,x
	AND.w #$1001
	BNE.b ADDR_B9D67D
	CLC
	RTS

ADDR_B9D67D:
	SEC
	RTS

ADDR_B9D67F:
	LDA.l $0019C4
	TAX
	LDA.b $46,x
	BEQ.b ADDR_B9D68A
	CLC
	RTS

ADDR_B9D68A:
	SEC
	RTS

ADDR_B9D68C:
	LDA.b $1E,x
	AND.w #$1000
	BNE.b ADDR_B9D6A3
	LDA.b $0C,x
	BMI.b ADDR_B9D6A1
	SEC
	SBC.b $0A,x
	BMI.b ADDR_B9D6A3
	CMP.w #$0048
	BMI.b ADDR_B9D6A3
ADDR_B9D6A1:
	CLC
	RTS

ADDR_B9D6A3:
	SEC
	RTS

ADDR_B9D6A5:
	LDA.b $1E,x
	AND.w #$1001
	BNE.b ADDR_B9D6AE
	SEC
	RTS

ADDR_B9D6AE:
	CLC
	RTS

ADDR_B9D6B0:
	LDX.b $64
	LDA.b $24,x
	BMI.b ADDR_B9D6B8
	SEC
	RTS

ADDR_B9D6B8:
	CLC
	RTS

ADDR_B9D6BA:
	LDX.b $64
	LDA.b $26,x
	BEQ.b ADDR_B9D6C2
ADDR_B9D6C0:
	SEC
	RTS

ADDR_B9D6C2:
	LDA.b $20,x
	BPL.b ADDR_B9D6CA
	EOR.w #$FFFF
	INC
ADDR_B9D6CA:
	AND.w #$FFC0
	BNE.b ADDR_B9D6C0
	CLC
	RTS

ADDR_B9D6D1:
	LDY.b $66
	LDA.w $000C,y
	AND.w #$0001
	BNE.b ADDR_B9D6DD
	SEC
	RTS

ADDR_B9D6DD:
	CLC
	RTS

ADDR_B9D6DF:
	LDX.b $64
	LDA.b $20,x
	BPL.b ADDR_B9D6E9
	EOR.w #$FFFF
	INC
ADDR_B9D6E9:
	CMP.w #$0201
	BPL.b ADDR_B9D6F0
	CLC
	RTS

ADDR_B9D6F0:
	SEC
	RTS

ADDR_B9D6F2:
	LDX.b $64
	LDA.b $20,x
	BPL.b ADDR_B9D6FC
	EOR.w #$FFFF
	INC
ADDR_B9D6FC:
	CMP.w #$00C0
	BPL.b ADDR_B9D703
	CLC
	RTS

ADDR_B9D703:
	SEC
	RTS

ADDR_B9D705:
	LDX.b $64
	CPX.w $0597
	BEQ.b ADDR_B9D724
	LDA.w $0D7A
	BNE.b ADDR_B9D74E
	LDA.b $6E
	BNE.b ADDR_B9D72D
	LDA.w $08C2
	BMI.b ADDR_B9D726
	STZ.b $2E,x
ADDR_B9D71C:
	LDA.w #$0001
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9D724:
	BRA.b ADDR_B9D71C

ADDR_B9D726:
	LDA.w #$001D
	STA.b $2E,x
	BRA.b ADDR_B9D71C

ADDR_B9D72D:
	CMP.w #$0198
	BEQ.b ADDR_B9D744
	CMP.w #$01A0
	BEQ.b ADDR_B9D749
	LDA.w #$0009
ADDR_B9D73A:
	STA.b $2E,x
	LDA.w #$005E
	JSL.l ADDR_B9D08C
	RTS

ADDR_B9D744:
	LDA.w #$0010
	BRA.b ADDR_B9D73A

ADDR_B9D749:
	LDA.w #$0050
	BRA.b ADDR_B9D73A

ADDR_B9D74E:
	CMP.w $0597
	BEQ.b ADDR_B9D760
	LDA.w #$000C
	STA.b $2E,x
	LDA.w #$0010
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9D760:
	LDA.w #$0017
	STA.b $2E,x
	LDA.w #$001D
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9D76D:
	LDX.b $64
	CPX.w $0597
	BEQ.b ADDR_B9D78C
	LDA.w $0D7A
	BNE.b ADDR_B9D7C7
	LDA.b $6E
	BNE.b ADDR_B9D7A6
	LDA.w $08C2
	BMI.b ADDR_B9D79F
	STZ.b $2E,x
ADDR_B9D784:
	LDA.w #$0003
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9D78C:
	LDA.w $08C2
	BMI.b ADDR_B9D798
	LDA.w #$0022
	STA.b $2E,x
	BRA.b ADDR_B9D784

ADDR_B9D798:
	LDA.w #$001E
	STA.b $2E,x
	BRA.b ADDR_B9D784

ADDR_B9D79F:
	LDA.w #$001D
	STA.b $2E,x
	BRA.b ADDR_B9D784

ADDR_B9D7A6:
	CMP.w #$0198
	BEQ.b ADDR_B9D7BD
	CMP.w #$01A0
	BEQ.b ADDR_B9D7C2
	LDA.w #$0009
ADDR_B9D7B3:
	STA.b $2E,x
	LDA.w #$0068
	JSL.l ADDR_B9D08C
	RTS

ADDR_B9D7BD:
	LDA.w #$0010
	BRA.b ADDR_B9D7B3

ADDR_B9D7C2:
	LDA.w #$0050
	BRA.b ADDR_B9D7B3

ADDR_B9D7C7:
	CMP.w $0597
	BEQ.b ADDR_B9D7D9
	LDA.w #$000C
	STA.b $2E,x
	LDA.w #$0011
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9D7D9:
	LDA.w #$0017
	STA.b $2E,x
	LDA.w #$001F
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9D7E6:
	LDX.b $64
	CPX.w $0597
	BEQ.b ADDR_B9D80C
	LDA.w $0D7A
	BNE.b ADDR_B9D834
	LDA.b $6E
	BNE.b ADDR_B9D813
	LDA.w $08C2
	BMI.b ADDR_B9D805
	STZ.b $2E,x
ADDR_B9D7FD:
	LDA.w #$0004
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9D805:
	LDA.w #$001D
	STA.b $2E,x
	BRA.b ADDR_B9D7FD

ADDR_B9D80C:
	LDA.w #$0022
	STA.b $2E,x
	BRA.b ADDR_B9D7FD

ADDR_B9D813:
	CMP.w #$0198
	BEQ.b ADDR_B9D82A
	CMP.w #$01A0
	BEQ.b ADDR_B9D82F
	LDA.w #$0009
ADDR_B9D820:
	STA.b $2E,x
	LDA.w #$0068
	JSL.l ADDR_B9D08C
	RTS

ADDR_B9D82A:
	LDA.w #$0010
	BRA.b ADDR_B9D820

ADDR_B9D82F:
	LDA.w #$0050
	BRA.b ADDR_B9D820

ADDR_B9D834:
	CMP.w $0597
	BEQ.b ADDR_B9D846
	LDA.w #$000C
	STA.b $2E,x
	LDA.w #$0011
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9D846:
	LDA.w #$0017
	STA.b $2E,x
	LDA.w #$001F
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9D853:
	CPX.w $0597
	BEQ.b ADDR_B9D85C
	JSL.l $B8B9B8
ADDR_B9D85C:
	RTS

ADDR_B9D85D:
	LDA.w $0515
	CMP.w #$0003
	BNE.b ADDR_B9D86A
	JSL.l $B8A695
	RTS

ADDR_B9D86A:
	RTS

ADDR_B9D86B:
	LDA.w $0D7A
	BEQ.b ADDR_B9D871
	RTS

ADDR_B9D871:
	LDY.w #$0004
	JSL.l $BB842C
	BCS.b ADDR_B9D87F
	LDA.b $68
	STA.w $0D7A
ADDR_B9D87F:
	RTS

ADDR_B9D880:
	LDY.w #$001E
	JSL.l $BB842C
	RTS

ADDR_B9D888:
	LDA.w #$0001
	STA.b $42,x
	RTS

ADDR_B9D88E:
	STZ.b $42,x
	RTS

ADDR_B9D891:
	STZ.b $20,x
	STZ.b $26,x
	RTS

ADDR_B9D896:
	LDY.w $0D7A
	BEQ.b ADDR_B9D8A1
	LDA.w #$0001
	STA.w $0032,y
ADDR_B9D8A1:
	TYX
	JSL.l $B8D4B4
	STZ.w $0D7A
	RTS

ADDR_B9D8AA:
	LDX.w $0D7A
	BEQ.b ADDR_B9D8BB
	LDA.w #$0002
	STA.b $32,x
	LDX.b $64
	LDA.w #$000F
	STA.b $2E,x
ADDR_B9D8BB:
	RTS

ADDR_B9D8BC:
	LDY.w $0D7A
	BEQ.b ADDR_B9D91B
	LDX.b $66
	LDA.b $04,x
	AND.w #$0800
	BEQ.b ADDR_B9D91C
	LDX.b $64
	LDA.w #$002C
	STA.b $2E,x
	LDA.w #$0010
	ORA.w $0030,y
	STA.w $0030,y
	LDA.w #$002B
	STA.w $002E,y
	LDA.w #$0008
	ORA.w $0030,y
	STA.w $0030,y
	LDY.w #$0040
	LDA.b [$8E],y
	LDY.w $0D7A
	BIT.b $12,x
	BVC.b ADDR_B9D8F9
	EOR.w #$FFFF
	INC
ADDR_B9D8F9:
	STA.w $0020,y
	LDA.w #$0000
	STA.w $0026,y
	LDY.w #$0042
	LDA.b [$8E],y
	LDY.w $0D7A
	STA.w $0024,y
	LDA.w #$0000
	STA.w $001E,y
	TYX
	JSL.l $B8D4B4
	STZ.w $0D7A
ADDR_B9D91B:
	RTS

ADDR_B9D91C:
	LDX.b $64
	LDA.w #$0020
	STA.b $2E,x
	LDA.w #$001F
	STA.w $002E,y
	LDA.w #$0010
	ORA.w $0030,y
	STA.w $0030,y
	LDY.w #$003C
	LDA.b [$8E],y
	LDY.w $0D7A
	BIT.b $12,x
	BVC.b ADDR_B9D942
	EOR.w #$FFFF
	INC
ADDR_B9D942:
	STA.w $0020,y
	LDA.w #$0000
	STA.w $0026,y
	LDY.w #$003E
	LDA.b [$8E],y
	LDY.w $0D7A
	STA.w $0024,y
	LDA.w #$0000
	STA.w $001E,y
	TYX
	JSL.l $B8D4B4
	STZ.w $0D7A
	RTS

ADDR_B9D965:
	LDA.w #$003F
	STA.b $2E,x
	LDY.w $0D7A
	BEQ.b ADDR_B9D9AE
	LDX.b $66
	LDA.b $04,x
	AND.w #$0800
	BEQ.b ADDR_B9D9AF
	LDX.b $64
	LDA.w #$0006
	STA.w $0032,y
	LDY.w #$0038
	LDA.b [$8E],y
	LDY.w $0D7A
	BIT.b $12,x
	BVC.b ADDR_B9D990
	EOR.w #$FFFF
	INC
ADDR_B9D990:
	STA.w $0020,y
	STA.w $0026,y
	PHY
	LDY.w #$003A
	LDA.b [$8E],y
	PLY
	STA.w $0024,y
	LDA.w #$0000
	STA.w $001E,y
	TYX
	JSL.l $B8D4B4
	STZ.w $0D7A
ADDR_B9D9AE:
	RTS

ADDR_B9D9AF:
	LDX.b $64
	LDA.w #$0004
	STA.w $0032,y
	LDY.w #$0034
	LDA.b [$8E],y
	LDY.w $0D7A
	BIT.b $12,x
	BVC.b ADDR_B9D9C7
	EOR.w #$FFFF
	INC
ADDR_B9D9C7:
	STA.w $0020,y
	STA.w $0026,y
	PHY
	LDY.w #$0036
	LDA.b [$8E],y
	PLY
	STA.w $0024,y
	LDA.w #$0000
	STA.w $001E,y
	TYX
	JSL.l $B8D4B4
	STZ.w $0D7A
	RTS

ADDR_B9D9E6:
	STZ.b $26,x
	STZ.b $20,x
	STZ.b $4E,x
	RTS

ADDR_B9D9ED:
	LDA.w #$0400
ADDR_B9D9F0:
	BIT.b $12,x
	BVC.b ADDR_B9D9F8
	EOR.w #$FFFF
	INC
ADDR_B9D9F8:
	STA.b $26,x
	STA.b $4E,x
	RTS

ADDR_B9D9FD:
	NOP #2
	LDA.w $0515
	CMP.w #$0002
	BEQ.b ADDR_B9DA18
	CMP.w #$0001
ADDR_B9DA0A:
	BNE.b ADDR_B9DA11
	LDA.w $052D
	BEQ.b ADDR_B9DA18
ADDR_B9DA11:
	LDA.w #$0001
	JSL.l $B58018
ADDR_B9DA18:
	RTS

ADDR_B9DA19:
	STZ.b $20,x
	STZ.b $26,x
	STZ.b $24,x
	LDA.b $06,x
	STA.b $44,x
	LDA.w #$0025
	STA.b $2E,x
	LDA.w #$003D
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DA30:
	JSR.w $B9E06F
	LDX.b $64
	LDA.b $20,x
	BPL.b ADDR_B9DA3D
	EOR.w #$FFFF
	INC
ADDR_B9DA3D:
	LSR
	LSR
	STA.b $5E
	LSR
	CLC
	ADC.b $5E
	CMP.w #$0100
	BCS.b ADDR_B9DA4D
	LDA.w #$0100
ADDR_B9DA4D:
	STA.b $3A,x
	RTS

ADDR_B9DA50:
	LDA.w #$F900
	STA.b $24,x
	LDA.w #$0400
	STA.b $26,x
	RTS

ADDR_B9DA5B:
	RTS

ADDR_B9DA5C:
	JSL.l $B883D5
	RTS

ADDR_B9DA61:
	LDA.w #$810F
	JSL.l $808B97
	LDA.w #$0002
	TSB.w $08C2
	LDA.w #$FFFF
	STA.w $059D
	RTS

ADDR_B9DA75:
	LDA.w #$0003
	LDY.w #$0100
	JSL.l $B8D1EA
	RTS

ADDR_B9DA80:
	RTS

ADDR_B9DA81:
	LDA.b $D3
	STA.w $059D
	LDA.w $08A6
	STA.w $059F
	LDA.w #$002D
	JSL.l $B8D8C0
	RTS

ADDR_B9DA94:
	LDA.w #$050A
	JSL.l $B58003
	LDY.w #$0016
	JSL.l $BB842C
	RTS

ADDR_B9DAA3:
	LDX.b $6C
	BEQ.b ADDR_B9DAAE
	LDA.w #$0054
	JSL.l ADDR_B9D04B
ADDR_B9DAAE:
	RTS

ADDR_B9DAAF:
	LDA.w #$002C
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DAB7:
	CPX.w $0597
	BEQ.b ADDR_B9DADF
	LDA.b $24,x
	BPL.b ADDR_B9DACD
	EOR.w #$FFFF
	INC
	LSR
	STA.b $32
	LSR
	CLC
	ADC.b $32
	BRA.b ADDR_B9DAD5

ADDR_B9DACD:
	LSR
	LSR
	STA.b $32
	LSR
	CLC
	ADC.b $32
ADDR_B9DAD5:
	CMP.w #$0070
	BPL.b ADDR_B9DADD
	LDA.w #$0070
ADDR_B9DADD:
	STA.b $3A,x
ADDR_B9DADF:
	RTS

ADDR_B9DAE0:
	CPX.w $0597
	BEQ.b ADDR_B9DB00
	LDA.b $26,x
	BEQ.b ADDR_B9DAF3
	LDA.b $12,x
	ASL
	EOR.w #$FFFF
	EOR.b $26,x
	BMI.b ADDR_B9DB09
ADDR_B9DAF3:
	LDA.b $2A,x
	BEQ.b ADDR_B9DB00
	BMI.b ADDR_B9DB01
	LDA.w #$0031
	JSL.l ADDR_B9D0B8
ADDR_B9DB00:
	RTS

ADDR_B9DB01:
	LDA.w #$0030
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DB09:
	LDA.w #$0032
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DB11:
	LDA.w #$002F
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DB19:
	CPX.w $0597
	BEQ.b ADDR_B9DB35
	LDA.b $2A,x
	BNE.b ADDR_B9DB25
	JMP.w ADDR_B9DB11

ADDR_B9DB25:
	BMI.b ADDR_B9DB36
	LDY.b $66
	LDA.w #$0031
	CMP.w $0000,y
	BEQ.b ADDR_B9DB35
	JSL.l ADDR_B9D0B8
ADDR_B9DB35:
	RTS

ADDR_B9DB36:
	LDY.b $66
	LDA.w #$0030
	CMP.w $0000,y
	BEQ.b ADDR_B9DB35
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DB45:
	CPX.w $0597
	BEQ.b ADDR_B9DB5B
	JSR.w ADDR_B9DAB7
	LDA.b $26,x
	BEQ.b ADDR_B9DB5B
	LDA.b $12,x
	ASL
	EOR.w #$FFFF
	EOR.b $26,x
	BMI.b ADDR_B9DB5C
ADDR_B9DB5B:
	RTS

ADDR_B9DB5C:
	LDA.w #$0032
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DB64:
	LDA.w #$0043
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DB6C:
	CPX.w $0597
	BEQ.b ADDR_B9DB87
	JSR.w ADDR_B9DB88
	LDA.b $26,x
	BEQ.b ADDR_B9DB87
	LSR
	EOR.b $12,x
	AND.w #$4000
	BEQ.b ADDR_B9DB87
	LDA.w #$0044
	JSL.l ADDR_B9D0B8
ADDR_B9DB87:
	RTS

ADDR_B9DB88:
	LDX.b $64
	LDA.b $3A,x
	SEC
	SBC.w #$0010
	CMP.w #$0100
	BPL.b ADDR_B9DB98
	LDA.w #$0100
ADDR_B9DB98:
	STA.b $3A,x
	RTS

ADDR_B9DB9B:
	LDA.b $20,x
	BPL.b ADDR_B9DBA3
	EOR.w #$FFFF
	INC
ADDR_B9DBA3:
	CMP.w #$0140
	BCS.b ADDR_B9DBAB
	LDA.w #$0140
ADDR_B9DBAB:
	STA.b $3A,x
	JMP.w $B9E06C

ADDR_B9DBB0:
	LDA.b $0C,x
	BMI.b ADDR_B9DBBE
	SEC
	SBC.b $0A,x
	BMI.b ADDR_B9DBBE
	CMP.w #$0010
	BMI.b ADDR_B9DBBF
ADDR_B9DBBE:
	RTS

ADDR_B9DBBF:
	LDA.w #$0200
	STA.b $3A,x
	RTS

ADDR_B9DBC5:
	STZ.b $20,x
	RTS

ADDR_B9DBC8:
	LDY.b $66
	LDA.w $0006,y
	AND.w #$0004
	BNE.b ADDR_B9DBE3
	LDX.b $64
	LDA.w #$FB80
	STA.b $24,x
	LDY.w #$009C
	LDA.b [$8E],y
	LDX.b $66
	STA.b $08,x
	RTS

ADDR_B9DBE3:
	LDX.b $64
	LDA.w #$FB00
	STA.b $24,x
	LDY.w #$009C
	LDA.b [$8E],y
	LDX.b $66
	STA.b $08,x
	RTS

ADDR_B9DBF4:
	LDA.w #$FEC0
	STA.b $24,x
	LDA.w #$005E
	JSL.l ADDR_B9D08C
	RTS

ADDR_B9DC01:
	LDA.b $26,x
	BEQ.b ADDR_B9DC0F
	LSR
	EOR.b $12,x
	AND.w #$4000
	EOR.b $12,x
	STA.b $12,x
ADDR_B9DC0F:
	RTS

ADDR_B9DC10:
	LDA.w #$0001
	TRB.w $0B02
	RTS

ADDR_B9DC17:
	LDA.b $26,x
	BEQ.b ADDR_B9DC25
	LSR
	EOR.b $12,x
	AND.w #$4000
	EOR.b $12,x
	STA.b $12,x
ADDR_B9DC25:
	LDA.w #$0001
	TRB.w $0B02
	BNE.b ADDR_B9DC2E
	RTS

ADDR_B9DC2E:
	LDA.w #$008B
	JSL.l ADDR_B9D08C
	RTS

ADDR_B9DC36:
	LDY.w #$002A
	JSL.l $BB8412
	BCC.b ADDR_B9DC54
	RTS

ADDR_B9DC40:
	LDY.w #$0028
	JSL.l $BB8412
	BCC.b ADDR_B9DC54
	RTS

ADDR_B9DC4A:
	LDY.w #$002C
	JSL.l $BB8412
	BCC.b ADDR_B9DC54
	RTS

ADDR_B9DC54:
	LDX.b $68
	LDY.b $64
	LDA.w $0020,y
	CLC
	ADC.b $20,x
	STA.b $20,x
	LDA.w #$052F
	JSL.l $B58003
	RTS

ADDR_B9DC68:
	LDA.b $20,x
	BPL.b ADDR_B9DC70
	EOR.w #$FFFF
	INC
ADDR_B9DC70:
	CMP.w #$0600
	BMI.b ADDR_B9DC7C
	LDY.w #$0054
	JSL.l $BB8412
ADDR_B9DC7C:
	RTS

ADDR_B9DC7D:
	LDA.b $20,x
	BPL.b ADDR_B9DC85
	EOR.w #$FFFF
	INC
ADDR_B9DC85:
	CMP.w #$0140
	BCS.b ADDR_B9DC8D
	LDA.w #$0140
ADDR_B9DC8D:
	STA.b $3A,x
	JMP.w $B9E06C

ADDR_B9DC92:
	RTS

ADDR_B9DC93:
	RTS

ADDR_B9DC94:
	STZ.w $0D7A
	RTS

ADDR_B9DC98:
	LDA.w $0D7A
	BEQ.b ADDR_B9DC9E
	RTS

ADDR_B9DC9E:
	LDY.w #$0006
	JSL.l $BB842C
	BCS.b ADDR_B9DCAC
	LDA.b $68
	STA.w $0D7A
ADDR_B9DCAC:
	RTS

ADDR_B9DCAD:
	LDY.w #$0020
	JSL.l $BB842C
	RTS

ADDR_B9DCB5:
	LDA.b $20,x
	BPL.b ADDR_B9DCBD
	EOR.w #$FFFF
	INC
ADDR_B9DCBD:
	CMP.w #$00E0
	BCS.b ADDR_B9DCC5
	LDA.w #$00E0
ADDR_B9DCC5:
	STA.b $3A,x
	JMP.w $B9E101

ADDR_B9DCCA:
	JSR.w $B9E06F
	LDX.b $64
	LDA.b $20,x
	BPL.b ADDR_B9DCD7
	EOR.w #$FFFF
	INC
ADDR_B9DCD7:
	CMP.w #$0140
	BCS.b ADDR_B9DCDF
	LDA.w #$0140
ADDR_B9DCDF:
	STA.b $3A,x
	RTS

ADDR_B9DCE2:
	LDA.w #$0100
	STA.b $3A,x
	RTS

ADDR_B9DCE8:
	LDA.w #$0027
	JSL.l ADDR_B9D000
	RTS

ADDR_B9DCF0:
	LDA.w #$0001
	STA.w $0D80
	RTS

ADDR_B9DCF7:
	LDA.w #$FFFF
	STA.w $0D80
	RTS

ADDR_B9DCFE:
	LDA.b $20,x
	BPL.b ADDR_B9DD06
	EOR.w #$FFFF
	INC
ADDR_B9DD06:
	STA.b $32
	LSR
	CLC
	ADC.b $32
	CMP.w #$0140
	BPL.b ADDR_B9DD14
	LDA.w #$0140
ADDR_B9DD14:
	STA.b $3A,x
	JMP.w $B9E021

ADDR_B9DD19:
	RTS

ADDR_B9DD1A:
	LDA.w #$0001
	STA.w $0D80
	RTS

ADDR_B9DD21:
	LDY.w #$0028
	LDA.b [$8E],y
	STA.b $24,x
	STZ.b $26,x
	RTS

ADDR_B9DD2B:
	LDA.w #$0520
	JSL.l $B58003
	LDY.w #$0014
	JSL.l $BB842C
	RTS

ADDR_B9DD3A:
	LDA.b $1E,x
	AND.w #$1001
	BNE.b ADDR_B9DD5D
	LDY.b $66
	LDA.w $0004,y
	AND.w #$4000
	BEQ.b ADDR_B9DD4C
	RTS

ADDR_B9DD4C:
	LDA.w #$0001
	STA.b $2E,x
	JSL.l $B8CEBC
	LDA.w #$0007
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DD5D:
	JSR.w ADDR_B9DFE1
	RTS

ADDR_B9DD61:
	CPX.w $0597
	BEQ.b ADDR_B9DD75
	LDY.b $66
	LDA.w $0006,y
	AND.w #$0004
	BNE.b ADDR_B9DD76
	LDA.w #$0100
	STA.b $3A,x
ADDR_B9DD75:
	RTS

ADDR_B9DD76:
	LDA.w #$0200
	STA.b $3A,x
	RTS

ADDR_B9DD7C:
	CPX.w $0597
	BEQ.b ADDR_B9DD8D
	LDA.w #$0037
	STA.b $2E,x
	LDA.w #$0036
	JSL.l ADDR_B9D0B8
ADDR_B9DD8D:
	RTS

ADDR_B9DD8E:
	CPX.w $0597
	BEQ.b ADDR_B9DD9B
	LDA.w #$0035
	STA.b $2E,x
	JMP.w ADDR_B9DB11

ADDR_B9DD9B:
	RTS

ADDR_B9DD9C:
	CPX.w $0597
	BEQ.b ADDR_B9DDAE
	LDA.b $2A,x
	BEQ.b ADDR_B9DDAE
	BPL.b ADDR_B9DDAF
	LDA.w #$0037
	JSL.l ADDR_B9D0B8
ADDR_B9DDAE:
	RTS

ADDR_B9DDAF:
	LDA.w #$0038
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DDB7:
	CPX.w $0597
	BEQ.b ADDR_B9DDC0
	LDA.b $26,x
	BNE.b ADDR_B9DDC1
ADDR_B9DDC0:
	RTS

ADDR_B9DDC1:
	LDA.w #$003A
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DDC9:
	CPX.w $0597
	BEQ.b ADDR_B9DDD2
	LDA.b $26,x
	BEQ.b ADDR_B9DDD3
ADDR_B9DDD2:
	RTS

ADDR_B9DDD3:
	LDA.b $20,x
	BPL.b ADDR_B9DDDB
	EOR.w #$FFFF
	INC
ADDR_B9DDDB:
	CMP.w #$0080
	BPL.b ADDR_B9DDD2
	LDA.w #$0039
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DDE8:
	CPX.w $0597
	BEQ.b ADDR_B9DE0E
	LDA.b $26,x
	BEQ.b ADDR_B9DDFB
	LSR
	EOR.b $12,x
	AND.w #$4000
	EOR.b $12,x
	STA.b $12,x
ADDR_B9DDFB:
	LDA.b $20,x
	BPL.b ADDR_B9DE03
	EOR.w #$FFFF
	INC
ADDR_B9DE03:
	LSR
	CMP.w #$0070
	BPL.b ADDR_B9DE0C
	LDA.w #$0070
ADDR_B9DE0C:
	STA.b $3A,x
ADDR_B9DE0E:
	RTS

ADDR_B9DE0F:
	LDA.w #$0036
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DE17:
	CPX.w $0597
	BEQ.b ADDR_B9DE33
	LDA.b $2A,x
	BNE.b ADDR_B9DE23
	JMP.w ADDR_B9DE0F

ADDR_B9DE23:
	BPL.b ADDR_B9DE34
	LDY.b $66
	LDA.w #$0037
	CMP.w $0000,y
	BEQ.b ADDR_B9DE33
	JSL.l ADDR_B9D0B8
ADDR_B9DE33:
	RTS

ADDR_B9DE34:
	LDY.b $66
	LDA.w #$0038
	CMP.w $0000,y
	BEQ.b ADDR_B9DE33
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DE43:
	LDA.b $2E,x
	CMP.w #$0019
	BEQ.b ADDR_B9DE78
	CMP.w #$0002
	BNE.b ADDR_B9DE67
	LDY.b $66
	LDA.w $0004,y
	AND.w #$4000
	BEQ.b ADDR_B9DE67
	LDA.w $0010,y
	CMP.w $001A,y
	BNE.b ADDR_B9DE67
	LDX.b $64
	LDA.b $26,x
	BNE.b ADDR_B9DE78
ADDR_B9DE67:
	STZ.b $20,x
	STZ.b $26,x
	LDA.w #$0004
	STA.b $2E,x
	LDA.b $40,x
	AND.w #$B7FF
	STA.b $40,x
	RTS

ADDR_B9DE78:
	JSR.w ADDR_B9DFE5
	RTS

ADDR_B9DE7C:
	LDA.b $2E,x
	CMP.w #$0019
	BEQ.b ADDR_B9DEAA
	CMP.w #$0002
	BNE.b ADDR_B9DEA0
	LDY.b $66
	LDA.w $0004,y
	AND.w #$4000
	BEQ.b ADDR_B9DEA0
	LDA.w $0010,y
	CMP.w $001A,y
	BNE.b ADDR_B9DEA0
	LDX.b $64
	LDA.b $26,x
	BNE.b ADDR_B9DEAA
ADDR_B9DEA0:
	STZ.b $20,x
	STZ.b $26,x
	LDA.w #$0004
	STA.b $2E,x
	RTS

ADDR_B9DEAA:
	JSR.w ADDR_B9DFE5
	RTS

ADDR_B9DEAE:
	LDY.b $66
	LDA.w $000E,y
	BIT.b $12,x
	BVC.b ADDR_B9DEBB
	EOR.w #$FFFF
	INC
ADDR_B9DEBB:
	STA.b $26,x
	RTS

ADDR_B9DEBE:
	STZ.b $20,x
	RTS

ADDR_B9DEC1:
	LDA.b $24,x
	BPL.b ADDR_B9DEC6
	RTS

ADDR_B9DEC6:
	LDA.w #$0200
	STA.b $3A,x
	RTS

ADDR_B9DECC:
	LDA.b $0C,x
	BMI.b ADDR_B9DEDA
	SEC
	SBC.b $0A,x
	BMI.b ADDR_B9DEE1
	CMP.w #$0010
	BMI.b ADDR_B9DEDB
ADDR_B9DEDA:
	RTS

ADDR_B9DEDB:
	LDA.w #$0200
	STA.b $3A,x
	RTS

ADDR_B9DEE1:
	LDA.w #$0300
	STA.b $3A,x
	RTS

ADDR_B9DEE7:
	LDA.w #$000D
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DEEF:
	LDA.w $0D7A
	BNE.b ADDR_B9DF32
	LDA.b $6E
	BNE.b ADDR_B9DF13
	STZ.b $2E,x
	LDA.w #$0008
	JSL.l ADDR_B9D0B8
	LDY.b $66
	LDA.w $0006,y
	AND.w #$0004
	BEQ.b ADDR_B9DF12
	LDX.b $64
	LDA.w #$0200
	STA.b $3A,x
ADDR_B9DF12:
	RTS

ADDR_B9DF13:
	LDA.b $2E,x
	CMP.w #$004F
	BEQ.b ADDR_B9DF27
	LDA.w #$0009
	STA.b $2E,x
	LDA.w #$007C
	JSL.l ADDR_B9D08C
	RTS

ADDR_B9DF27:
	LDA.w #$0068
	JSL.l ADDR_B9D08C
	JSR.w ADDR_B9DAA3
	RTS

ADDR_B9DF32:
	CMP.w $0597
	BEQ.b ADDR_B9DF44
	LDA.w #$000C
	STA.b $2E,x
	LDA.w #$0018
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DF44:
	LDA.w #$0017
	STA.b $2E,x
	LDA.w #$0024
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DF51:
	LDA.w $0D7A
	BNE.b ADDR_B9DF7A
	LDA.b $6E
	BNE.b ADDR_B9DF6A
	JSR.w ADDR_B9DFB6
	LDA.w #$0006
	STA.b $2E,x
	LDA.w #$0006
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DF6A:
	JSR.w ADDR_B9DFB6
	LDA.w #$000B
	STA.b $2E,x
	LDA.w #$0072
	JSL.l ADDR_B9D08C
	RTS

ADDR_B9DF7A:
	CMP.w $0597
	BEQ.b ADDR_B9DF9E
	LDA.w $08A4
	BEQ.b ADDR_B9DF8A
	LDA.w #$0001
	STA.w $0D80
ADDR_B9DF8A:
	LDY.w #$0008
	LDA.b [$8E],y
	STA.b $24,x
	LDA.w #$000E
	STA.b $2E,x
	LDA.w #$0016
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DF9E:
	LDY.w #$0008
	LDA.b [$8E],y
	STA.b $24,x
	LDA.w #$001B
	STA.b $2E,x
	LDA.w #$0022
	JSL.l ADDR_B9D0B8
	RTS

ADDR_B9DFB2:
	JSR.w ADDR_B9DFB6
	RTL

ADDR_B9DFB6:
	LDX.b $64
	LDA.b $6E
	BNE.b ADDR_B9DFC4
	LDY.w #$0008
	LDA.b [$8E],y
	STA.b $24,x
	RTS

ADDR_B9DFC4:
	SEC
	SBC.w #$000C
	LSR
	TAY
	LDA.b [$8E],y
	STA.b $24,x
	RTS

ADDR_B9DFCF:
	JSR.w ADDR_B9DFD3
	RTL

ADDR_B9DFD3:
	LDX.b $64
	LDA.b $1E,x
	AND.w #$0001
	BNE.b ADDR_B9DFE5
	JSL.l $B8B9B4
	RTS

ADDR_B9DFE1:
	JSL.l $B8CEBC
ADDR_B9DFE5:
	LDX.b $64
	CPX.w $0597
	BEQ.b $14
	JSR.w $B9E128
	TXY
	TAX
	JMP.w (UNK_B9DFF4,x)

UNK_B9DFF4:
	dw $B9E000
	dw $B9E003
	dw $B9E003
	dw $B9E003
	dw $B9E003
	dw $B9E003
