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

ADDR_B2FCAB:
	BEQ.b ADDR_B2FCB3
	LDA.w #$0878
	STA.w $005E,y
ADDR_B2FCB3:
	LDA.w $04D0
	BIT.w #$2000
	BEQ.b $21
ADDR_B2FCBB:
	LDA.w $005E,y
	SEC
	SBC.w #$006E
	CMP.w #$080A
	BNE.b ADDR_B2FCCA
	LDA.w #$1480
ADDR_B2FCCA:
	STA.w $005E,y
ADDR_B2FCCD:
	TAX
	LDA.b $00,x
	BEQ.b ADDR_B2FCBB
	LDA.b $12,x
	STA.w $0012,y
	LDA.b $16,x
	STA.w $0016,y
	RTS

UNK_B2FCDD:
	db $5E,$00

ADDR_B2FCDF:
	TAX
	LDA.b $00,x
	BEQ.b ADDR_B2FCCD
	LDA.b $12,x
	STA.w $0012,y
	LDA.b $16,x
	STA.w $0016,y
	RTS

UNK_B2FCEF:
	db $54,$0E

ADDR_B2FCF1:
	LDY.w #$FB8C
	LDA.w $0AF6
	SEC
	SBC.w $0F7A,x
	BMI.b ADDR_B2FD00
	LDY.w #$FC0E
ADDR_B2FD00:
	PLX
	RTL

ADDR_B2FD02:
	LDX.w $0E54
	LDY.w #$FB64
	LDA.w $0FB4,x
	BIT.w #$0001
	BEQ.b ADDR_B2FD13
	LDY.w #$FBE6
ADDR_B2FD13:
	TYA
	STA.w $0F92,x
	LDA.w #$804B
	STA.w $0FA8,x
	LDA.w $0F7A,x
	CLC
	ADC.w $0FB6,x
	STA.w $0FB2,x
	LDA.w $0F7A,x
	SEC
	SBC.w $0FB6,x
	STA.w $0FB0,x
	RTL

ADDR_B2FD32:
	LDX.w $0E54
	JSR.w ($0FA8,x)
	LDA.w $0FB4,x
	BIT.w #$8000
	BEQ.b ADDR_B2FD43
	JSR.w ADDR_B2FE4B
ADDR_B2FD43:
	RTL

ADDR_B2FD44:
	LDX.w $0E54
	LDA.w #$0010
	JSL.l $A0AEED
	BEQ.b ADDR_B2FD6A
	LDY.w #$FB8C
	LDA.w $0AF6
	SEC
	SBC.w $0F7A,x
	BMI.b ADDR_B2FD5F
	LDY.w #$FC0E
ADDR_B2FD5F:
	TYA
	STA.w $0F92,x
	LDA.w #$0001
	STA.w $0F94,x
	RTS

ADDR_B2FD6A:
	LDA.w #$0001
	STA.b $14
	STZ.b $12
	JSL.l $A0C786
	BCC.b ADDR_B2FDCD
	LDA.w $0F7A,x
	STA.l $7E7800,x
	CLC
	ADC.w #$FFEF
	STA.w $0F7A,x
	LDA.w #$0001
	STA.b $14
	STZ.b $12
	JSL.l $A0C786
	PHP
	LDA.l $7E7800,x
	STA.w $0F7A,x
	PLP
	BCC.b ADDR_B2FDC1
	LDA.w #$0000
	STA.b $12
	LDA.w #$FFF7
	STA.b $14
	JSL.l $A0BBBF
	LDA.w #$C7FF
	STA.b $12
	LDA.w #$FFFF
	STA.b $14
	JSL.l $A0C6AB
	BCS.b ADDR_B2FDC1
	LDA.w $0F7A,x
	CMP.w $0FB0,x
	BPL.b ADDR_B2FDCD
ADDR_B2FDC1:
	LDA.w #$FBC6
	STA.w $0F92,x
	LDA.w #$0001
	STA.w $0F94,x
ADDR_B2FDCD:
	RTS

ADDR_B2FDCE:
	LDX.w $0E54
	LDA.w #$0010
	JSL.l $A0AEED
	BEQ.b ADDR_B2FDF4
	LDY.w #$FB8C
	LDA.w $0AF6
	SEC
	SBC.w $0F7A,x
	BMI.b ADDR_B2FDE9
	LDY.w #$FC0E
ADDR_B2FDE9:
	TYA
	STA.w $0F92,x
	LDA.w #$0001
	STA.w $0F94,x
	RTS

ADDR_B2FDF4:
	LDA.w #$0001
	STA.b $14
	STZ.b $12
	JSL.l $A0C786
	BCC.b ADDR_B2FE49
	LDA.w $0F7A,x
	STA.l $7E7800,x
	CLC
	ADC.w #$0010
	STA.w $0F7A,x
	LDA.w #$0001
	STA.b $14
	STZ.b $12
	JSL.l $A0C786
	PHP
	LDA.l $7E7800,x
	STA.w $0F7A,x
	PLP
	BCC.b ADDR_B2FE3D
	LDA.w #$3800
	STA.b $12
	LDA.w #$0000
	STA.b $14
	JSL.l $A0C6AB
	BCS.b ADDR_B2FE3D
	LDA.w $0F7A,x
	CMP.w $0FB2,x
	BMI.b ADDR_B2FE49
ADDR_B2FE3D:
	LDA.w #$FC48
	STA.w $0F92,x
	LDA.w #$0001
	STA.w $0F94,x
ADDR_B2FE49:
	RTS

ADDR_B2FE4A:
	RTS

ADDR_B2FE4B:
	PHX
	LDX.w $0E54
	LDY.w #$0008
ADDR_B2FE52:
	LDA.w $0C18,y
	BNE.b ADDR_B2FE5D
	DEY
	DEY
	BPL.b ADDR_B2FE52
	BRA.b ADDR_B2FEA5

ADDR_B2FE5D:
	LDA.w $0B64,y
	SEC
	SBC.w $0F7A,x
	BPL.b ADDR_B2FE6A
	EOR.w #$FFFF
	INC
ADDR_B2FE6A:
	SEC
	SBC.w #$0020
	BPL.b ADDR_B2FEA5
	LDA.w $0B78,y
	SEC
	SBC.w $0F7E,x
	BPL.b ADDR_B2FE7D
	EOR.w #$FFFF
	INC
ADDR_B2FE7D:
	SEC
	SBC.w #$0020
	BPL.b ADDR_B2FEA5
	LDA.w $0F7A,x
	SEC
	SBC.w $0AF6
	STA.b $12
	LDY.w #$FB4C
	LDA.b $12
	BPL.b ADDR_B2FE96
	LDY.w #$FB58
ADDR_B2FE96:
	TYA
	STA.w $0F92,x
	LDA.w #$0001
	STA.w $0F94,x
	PLX
	LDA.w #$0001
	RTS

ADDR_B2FEA5:
	PLX
	LDA.w #$0000
	RTS
