rem: cnt = ((u8*)sram_base)[0x26];
add: cnt = ((u8*)sram_base)[0x26+chn];
context: static s32 __card_domount(s32 chn){		u8 status,kval;	s32 ret = CARD_ERROR_READY;	u32 sum;	u32 sram_base;	u32 id,idx,cnt;	card_block *card;	if(chn<EXI_CHANNEL_0 || chn>=EXI_CHANNEL_2) return CARD_ERROR_NOCARD;	card = &cardmap[chn];#ifdef _CARD_DEBUG	printf("__card_domount(%d,%d)\n",chn,card->mount_step);#endif	if(card->mount_step==0) {		ret = 0;		id = 0;		if(EXI_GetID(chn,EXI_DEVICE_0,&id)==0) ret = CARD_ERROR_NOCARD;		else if(!__card_iscard(id)) ret = CARD_ERROR_WRONGDEVICE;		if(ret<0) goto exit;		card->cid = id;		card->card_size = (id&0xfc);#ifdef _CARD_DEBUG		printf("__card_domount(card_type = %08x,%08x,%08x)\n",card->card_size,card->cid,id);#endif		if(card->card_size) {			idx = _ROTL(id,23)&0x1c;			card->sector_size = card_sector_size[idx>>2];			card->blocks = ((card->card_size<<20)>>3)/card->sector_size;			if(card->blocks>0x0008) {				idx = _ROTL(id,26)&0x1c;				card->latency = card_latency[idx>>2];				if((ret=__card_clearstatus(chn))<0) goto exit;				if((ret=__card_readstatus(chn,&status))<0) goto exit;								if(EXI_Probe(chn)==0) {					ret = CARD_ERROR_NOCARD;					goto exit;				}				if(!(status&CARD_STATUS_UNLOCKED)) {#ifdef _CARD_DEBUG					printf("__card_domount(card locked)\n");#endif					if((ret=__dounlock(chn,card->key))<0) goto exit;									cnt = 0;					sum = 0;					sram_base = __SYS_LockSramEx();					while(cnt<12) {						kval = ((u8*)card->key)[cnt];						((u8*)sram_base)[(0x0c*chn)+cnt] = kval;						sum += kval;						cnt++;					}					((u8*)sram_base)[0x26] = sum^-1;					__SYS_UnlockSramEx(1);					return ret;				}				card->mount_step = 1;				cnt = 0;				sum = 0;				sram_base = __SYS_LockSramEx();				while(cnt<12) {					sum += ((u8*)sram_base)[(0x0c*chn)+cnt];					cnt++;				}				__SYS_UnlockSramEx(0);								cnt = ((u8*)sram_base)[0x26];				sum = (sum^-1)&0xff;				if(cnt!=sum) {					ret = CARD_ERROR_IOERROR;					goto exit;				}			}		}	}	if(card->mount_step==1) {		card->mount_step = 2;		if(__card_enableinterrupt(chn,1)<0) goto exit;		EXI_RegisterEXICallback(chn,__card_exihandler);		EXI_Unlock(chn);		DCInvalidateRange(card->workarea,0xA000);	}	if(__card_read(chn,(card->sector_size*(card->mount_step-2)),card->sector_size,card->workarea+((card->mount_step-2)<<13),__card_mountcallback)<0) goto exit;	return ret;		exit:	EXI_Unlock(chn);	__card_dounmount(chn,ret);		return ret;}