rem: static s32 __dounlock(u32 chn,u32 *key)
add: static s32 __dounlock(s32 chn,u32 *key)
context: static s32 __dounlock(u32 chn,u32 *key){	u8 buffer[64] ATTRIBUTE_ALIGN(32);		s32 ret;	u32 array_addr,len,val;	u32 a,b,c,d,e;	card_block *card = &cardmap[chn];	u32 *workarea = card->workarea;	u32 *cipher1 = (u32*)(((u32)card->workarea+47)&~31);	u32 *cipher2 = &cipher1[8];#ifdef _CARD_DEBUG	printf("__dounlock(%d,%p)\n",chn,key);#endif	array_addr = __card_initval();	len = __card_dummylen();		if(__card_readarrayunlock(chn,array_addr,buffer,len,0)<0) return CARD_ERROR_NOCARD;		ret = 0;	val = exnor_1st(array_addr,(len<<3)+1);	{		u32 a,b,c,r1,r2,r3;		a = (val>>23);		b = (val>>15);		c = (val>>7);		r1 = (val^c);		r2 = (b^r1);		r3 = eqv(a,r2);		//~(a^r2)		r1 = (val|(r3<<31));		card->cipher = r1;	}	card->cipher = bitrev(card->cipher);	array_addr = 0;	len = __card_dummylen();	if(__card_readarrayunlock(chn,array_addr,buffer,len+20,1)<0) return CARD_ERROR_NOCARD;	a = ((u32*)buffer)[0];	b = ((u32*)buffer)[1];	c = ((u32*)buffer)[2];	d = ((u32*)buffer)[3];	e = ((u32*)buffer)[4];		a = a^card->cipher;	val = exnor(card->cipher,32);	{		u32 a,b,c,r1,r2,r3;		a = (val<<23);		b = (val<<15);		c = (val<<7);		r1 = (val^c);		r2 = (b^r1);		r3 = eqv(a,r2);		//~(a^r2)		r1 = (val|(r3>>31));		card->cipher = r1;	}		b = b^card->cipher;	val = exnor(card->cipher,32);	{		u32 a,b,c,r1,r2,r3;		a = (val<<23);		b = (val<<15);		c = (val<<7);		r1 = (val^c);		r2 = (b^r1);		r3 = eqv(a,r2);		//~(a^r2)		r1 = (val|(r3>>31));		card->cipher = r1;	}		c = c^card->cipher;	val = exnor(card->cipher,32);	{		u32 a,b,c,r1,r2,r3;		a = (val<<23);		b = (val<<15);		c = (val<<7);		r1 = (val^c);		r2 = (b^r1);		r3 = eqv(a,r2);		//~(a^r2)		r1 = (val|(r3>>31));		card->cipher = r1;	}		d = d^card->cipher;	val = exnor(card->cipher,32);	{		u32 a,b,c,r1,r2,r3;		a = (val<<23);		b = (val<<15);		c = (val<<7);		r1 = (val^c);		r2 = (b^r1);		r3 = eqv(a,r2);		//~(a^r2)		r1 = (val|(r3>>31));		card->cipher = r1;	}		e = e^card->cipher;	val = exnor(card->cipher,(len<<3));	{		u32 a,b,c,r1,r2,r3;		a = (val<<23);		b = (val<<15);		c = (val<<7);		r1 = (val^c);		r2 = (b^r1);		r3 = eqv(a,r2);		//~(a^r2)		r1 = (val|(r3>>31));		card->cipher = r1;	}		val = exnor(card->cipher,33);	{		u32 a,b,c,r1,r2,r3;		a = (val<<23);		b = (val<<15);		c = (val<<7);		r1 = (val^c);		r2 = (b^r1);		r3 = eqv(a,r2);		//~(a^r2)		r1 = (val|(r3>>31));		card->cipher = r1;	}		cipher1[0] = d;	cipher1[1] = e;	workarea[0] = (u32)cipher1;	workarea[1] = 8;	workarea[2] = 0;	workarea[3] = (u32)cipher2;	DCFlushRange(cipher1,8);	DCInvalidateRange(cipher2,4);	DCFlushRange(workarea,16);	card->dsp_task.prio = 255;	card->dsp_task.iram_maddr = (u16*)MEM_K0_TO_PHYSICAL(_cardunlockdata);	card->dsp_task.iram_len = 352;	card->dsp_task.iram_addr = 0x0000;	card->dsp_task.init_vec = 16;	card->dsp_task.res_cb = NULL;	card->dsp_task.req_cb = NULL;	card->dsp_task.init_cb = __dsp_initcallback;	card->dsp_task.done_cb = __dsp_donecallback;	DSP_AddTask(&card->dsp_task);		key[0] = a;	key[1] = b;	key[2] = c;		return CARD_ERROR_READY;}