Example #1
0
N_NIMCALL(NI, Rawparseint_22945)(NimStringDesc* S_22947, NI64* B_22949, NI Start_22950) {
    NI Result_22951;
    NI64 Sign_22952;
    NI I_22953;
    NI64 TMP195650;
    NI TMP195651;
    NI64 TMP195652;
    NI64 TMP195653;
    NI TMP195654;
    Result_22951 = 0;
    Sign_22952 = 0;
    Sign_22952 = -1;
    I_22953 = 0;
    I_22953 = Start_22950;
    if (!((NU8)(S_22947->data[I_22953]) == (NU8)(43))) goto LA2;
    I_22953 = addInt(I_22953, 1);
    goto LA1;
LA2:
    ;
    if (!((NU8)(S_22947->data[I_22953]) == (NU8)(45))) goto LA4;
    I_22953 = addInt(I_22953, 1);
    Sign_22952 = 1;
    goto LA1;
LA4:
    ;
LA1:
    ;
    if (!(((NU8)(S_22947->data[I_22953])) >= ((NU8)(48)) && ((NU8)(S_22947->data[I_22953])) <= ((NU8)(57)))) goto LA7;
    (*B_22949) = 0;
    while (1) {
        if (!(((NU8)(S_22947->data[I_22953])) >= ((NU8)(48)) && ((NU8)(S_22947->data[I_22953])) <= ((NU8)(57)))) goto LA9;
        TMP195650 = mulInt64((*B_22949), 10);
        TMP195651 = subInt(((NU8)(S_22947->data[I_22953])), 48);
        TMP195652 = subInt64((NI64)(TMP195650), ((NI64) ((NI64)(TMP195651))));
        (*B_22949) = (NI64)(TMP195652);
        I_22953 = addInt(I_22953, 1);
        while (1) {
            if (!((NU8)(S_22947->data[I_22953]) == (NU8)(95))) goto LA10;
            I_22953 = addInt(I_22953, 1);
        }
LA10:
        ;
    }
LA9:
    ;
    TMP195653 = mulInt64((*B_22949), Sign_22952);
    (*B_22949) = (NI64)(TMP195653);
    TMP195654 = subInt(I_22953, Start_22950);
    Result_22951 = (NI64)(TMP195654);
LA7:
    ;
    return Result_22951;
}
N_NIMCALL(NI, rawparseint_88611)(NimStringDesc* s, NI64* b, NI start) {
	NI result;
	NI64 sign;
	NI i;
	result = 0;
	sign = -1;
	i = start;
	{
		if (!((NU8)(s->data[i]) == (NU8)(43))) goto LA3;
		i = addInt(i, 1);
	}
	goto LA1;
	LA3: ;
	{
		if (!((NU8)(s->data[i]) == (NU8)(45))) goto LA6;
		i = addInt(i, 1);
		sign = 1;
	}
	goto LA1;
	LA6: ;
	LA1: ;
	{
		NI64 TMP173;
		NI TMP174;
		if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA10;
		(*b) = 0;
		{
			while (1) {
				NI64 TMP170;
				NI TMP171;
				NI64 TMP172;
				if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA13;
				TMP170 = mulInt64((*b), 10);
				TMP171 = subInt(((NI) (((NU8)(s->data[i])))), 48);
				TMP172 = subInt64((NI64)(TMP170), ((NI64) ((NI64)(TMP171))));
				(*b) = (NI64)(TMP172);
				i = addInt(i, 1);
				{
					while (1) {
						if (!((NU8)(s->data[i]) == (NU8)(95))) goto LA15;
						i = addInt(i, 1);
					} LA15: ;
				}
			} LA13: ;
		}
		TMP173 = mulInt64((*b), sign);
		(*b) = (NI64)(TMP173);
		TMP174 = subInt(i, start);
		result = (NI64)(TMP174);
	}
	LA10: ;
	return result;
}
Example #3
0
N_NIMCALL(NI, rawparseint_93914)(NimStringDesc* s, NI64* b, NI start) {
	NI result;
	NI64 sign;
	NI i;
	nimfr("rawParseInt", "parseutils.nim")
	result = 0;
	nimln(194, "parseutils.nim");
	sign = IL64(-1);
	nimln(195, "parseutils.nim");
	i = start;
	nimln(196, "parseutils.nim");
	{
		NI TMP274;
		if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
		if (!((NU8)(s->data[i]) == (NU8)(43))) goto LA3;
		TMP274 = addInt(i, ((NI) 1));
		i = (NI)(TMP274);
	}
	goto LA1;
	LA3: ;
	{
		NI TMP275;
		nimln(197, "parseutils.nim");
		if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
		if (!((NU8)(s->data[i]) == (NU8)(45))) goto LA6;
		nimln(198, "parseutils.nim");
		TMP275 = addInt(i, ((NI) 1));
		i = (NI)(TMP275);
		nimln(199, "parseutils.nim");
		sign = IL64(1);
	}
	goto LA1;
	LA6: ;
	LA1: ;
	nimln(200, "parseutils.nim");
	{
		NI64 TMP281;
		NI TMP282;
		if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
		if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA10;
		nimln(201, "parseutils.nim");
		(*b) = IL64(0);
		{
			nimln(202, "parseutils.nim");
			while (1) {
				NI64 TMP276;
				NI TMP277;
				NI64 TMP278;
				NI TMP279;
				if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
				if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA13;
				nimln(203, "parseutils.nim");
				TMP276 = mulInt64((*b), IL64(10));
				if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
				TMP277 = subInt(((NI) (((NU8)(s->data[i])))), ((NI) 48));
				TMP278 = subInt64((NI64)(TMP276), ((NI64) ((NI)(TMP277))));
				(*b) = (NI64)(TMP278);
				nimln(204, "parseutils.nim");
				TMP279 = addInt(i, ((NI) 1));
				i = (NI)(TMP279);
				{
					nimln(205, "parseutils.nim");
					while (1) {
						NI TMP280;
						if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
						if (!((NU8)(s->data[i]) == (NU8)(95))) goto LA15;
						TMP280 = addInt(i, ((NI) 1));
						i = (NI)(TMP280);
					} LA15: ;
				}
			} LA13: ;
		}
		nimln(206, "parseutils.nim");
		TMP281 = mulInt64((*b), sign);
		(*b) = (NI64)(TMP281);
		nimln(207, "parseutils.nim");
		TMP282 = subInt(i, start);
		result = (NI)(TMP282);
	}
	LA10: ;
	popFrame();
	return result;
}
Example #4
0
N_NIMCALL(NI64, decodevbiggestint_178495)(NCSTRING s, NI* pos) {
	NI64 result;
	NI i_178502;
	NI sign_178504;
	NI64 TMP2119;
	nimfr("decodeVBiggestInt", "rodutils.nim")
	result = 0;
	nimln(101, "rodutils.nim");
	i_178502 = (*pos);
	nimln(102, "rodutils.nim");
	sign_178504 = -1;
	nimln(103, "rodutils.nim");
	{
		nimln(103, "rodutils.nim");
		nimln(103, "rodutils.nim");
		if (!!((((NU8)(s[i_178502])) >= ((NU8)(97)) && ((NU8)(s[i_178502])) <= ((NU8)(122)) || ((NU8)(s[i_178502])) >= ((NU8)(65)) && ((NU8)(s[i_178502])) <= ((NU8)(90)) || ((NU8)(s[i_178502])) >= ((NU8)(48)) && ((NU8)(s[i_178502])) <= ((NU8)(57)) || ((NU8)(s[i_178502])) == ((NU8)(45)) || ((NU8)(s[i_178502])) >= ((NU8)(128)) && ((NU8)(s[i_178502])) <= ((NU8)(255))))) goto LA3;
		nimln(103, "rodutils.nim");
		hiddenraiseassert_76217(((NimStringDesc*) &TMP2087));	}	LA3: ;
	nimln(104, "rodutils.nim");
	{
		nimln(104, "rodutils.nim");
		if (!((NU8)(s[i_178502]) == (NU8)(45))) goto LA7;
		nimln(105, "rodutils.nim");
		i_178502 = addInt(i_178502, 1);
		nimln(106, "rodutils.nim");
		sign_178504 = 1;
	}	LA7: ;
	nimln(107, "rodutils.nim");
	result = 0;
	nimln(108, "rodutils.nim");
	while (1) {
		nimln(109, "rodutils.nim");
		switch (((NU8)(s[i_178502]))) {
		case 48 ... 57:
		{
			NI64 TMP2104;
			NI TMP2105;
			NI64 TMP2106;
			nimln(110, "rodutils.nim");
			nimln(110, "rodutils.nim");
			nimln(110, "rodutils.nim");
			TMP2104 = mulInt64(result, 190);
			nimln(110, "rodutils.nim");
			nimln(110, "rodutils.nim");
			TMP2105 = subInt(((NI) (((NU8)(s[i_178502])))), 48);
			TMP2106 = subInt64((NI64)(TMP2104), ((NI64) ((NI32)(TMP2105))));
			result = (NI64)(TMP2106);
		}		break;
		case 97 ... 122:
		{
			NI64 TMP2107;
			NI TMP2108;
			NI TMP2109;
			NI64 TMP2110;
			nimln(111, "rodutils.nim");
			nimln(111, "rodutils.nim");
			nimln(111, "rodutils.nim");
			TMP2107 = mulInt64(result, 190);
			nimln(111, "rodutils.nim");
			nimln(111, "rodutils.nim");
			nimln(111, "rodutils.nim");
			TMP2108 = subInt(((NI) (((NU8)(s[i_178502])))), 97);
			TMP2109 = addInt(((NI) ((NI32)(TMP2108))), 10);
			TMP2110 = subInt64((NI64)(TMP2107), ((NI64) ((NI32)(TMP2109))));
			result = (NI64)(TMP2110);
		}		break;
		case 65 ... 90:
		{
			NI64 TMP2111;
			NI TMP2112;
			NI TMP2113;
			NI64 TMP2114;
			nimln(112, "rodutils.nim");
			nimln(112, "rodutils.nim");
			nimln(112, "rodutils.nim");
			TMP2111 = mulInt64(result, 190);
			nimln(112, "rodutils.nim");
			nimln(112, "rodutils.nim");
			nimln(112, "rodutils.nim");
			TMP2112 = subInt(((NI) (((NU8)(s[i_178502])))), 65);
			TMP2113 = addInt(((NI) ((NI32)(TMP2112))), 36);
			TMP2114 = subInt64((NI64)(TMP2111), ((NI64) ((NI32)(TMP2113))));
			result = (NI64)(TMP2114);
		}		break;
		case 128 ... 255:
		{
			NI64 TMP2115;
			NI TMP2116;
			NI TMP2117;
			NI64 TMP2118;
			nimln(113, "rodutils.nim");
			nimln(113, "rodutils.nim");
			nimln(113, "rodutils.nim");
			TMP2115 = mulInt64(result, 190);
			nimln(113, "rodutils.nim");
			nimln(113, "rodutils.nim");
			nimln(113, "rodutils.nim");
			TMP2116 = subInt(((NI) (((NU8)(s[i_178502])))), 128);
			TMP2117 = addInt(((NI) ((NI32)(TMP2116))), 62);
			TMP2118 = subInt64((NI64)(TMP2115), ((NI64) ((NI32)(TMP2117))));
			result = (NI64)(TMP2118);
		}		break;
		default:
		{
			nimln(114, "rodutils.nim");
			goto LA9;
		}		break;
		}
		nimln(115, "rodutils.nim");
		i_178502 = addInt(i_178502, 1);
	} LA9: ;
	nimln(116, "rodutils.nim");
	nimln(116, "rodutils.nim");
	nimln(116, "rodutils.nim");
	TMP2119 = mulInt64(result, ((NI64) (sign_178504)));
	result = (NI64)((NU64)((NI64)(TMP2119)) - (NU64)(5));
	nimln(117, "rodutils.nim");
	(*pos) = i_178502;
	popFrame();
	return result;
}N_NOINLINE(void, compilerrodutilsInit)(void) {
Example #5
0
N_NIMCALL(tnode172659*, totreeset_219562)(tbitset218010* s, ttype172693* settype, tlineinfo137509 info) {
	tnode172659* result;
	NI64 a;
	NI64 b;
	NI64 e;
	NI64 first;
	ttype172693* elemtype;
	tnode172659* n;
	nimfr("ToTreeSet", "nimsets.nim")
	result = 0;
	a = 0;
	b = 0;
	e = 0;
	first = 0;
	elemtype = 0;
	n = 0;
	nimln(95, "nimsets.nim");
	if ((NU)(0) >= (NU)((*settype).Sons->Sup.len)) raiseIndexError();
	elemtype = (*settype).Sons->data[0];
	nimln(96, "nimsets.nim");
	first = firstord_201002(elemtype);
	nimln(97, "nimsets.nim");
	result = newnodei_172940(((NU8) 39), info);
	nimln(98, "nimsets.nim");
	asgnRefNoCycle((void**) &(*result).Typ, settype);
	nimln(99, "nimsets.nim");
	(*result).Info = info;
	nimln(100, "nimsets.nim");
	e = 0;
	nimln(101, "nimsets.nim");
	while (1) {
		NI TMP3070;
		nimln(101, "nimsets.nim");
		nimln(101, "nimsets.nim");
		nimln(101, "nimsets.nim");
		TMP3070 = mulInt(s->Sup.len, 8);
		if (!(e < ((NI64) ((NI32)(TMP3070))))) goto LA1;
		nimln(102, "nimsets.nim");
		{
			NIM_BOOL LOC4;
			nimln(102, "nimsets.nim");
			LOC4 = 0;
			LOC4 = bitsetin_218057(s, e);
			if (!LOC4) goto LA5;
			nimln(103, "nimsets.nim");
			a = e;
			nimln(104, "nimsets.nim");
			b = e;
			nimln(105, "nimsets.nim");
			while (1) {
				nimln(106, "nimsets.nim");
				b = addInt64(b, 1);
				nimln(107, "nimsets.nim");
				{
					NIM_BOOL LOC10;
					NI TMP3071;
					NIM_BOOL LOC12;
					nimln(107, "nimsets.nim");
					LOC10 = 0;
					nimln(702, "system.nim");
					nimln(107, "nimsets.nim");
					nimln(107, "nimsets.nim");
					TMP3071 = mulInt(s->Sup.len, 8);
					LOC10 = (((NI64) ((NI32)(TMP3071))) <= b);
					if (LOC10) goto LA11;
					nimln(107, "nimsets.nim");
					nimln(107, "nimsets.nim");
					LOC12 = 0;
					LOC12 = bitsetin_218057(s, b);
					LOC10 = !(LOC12);
					LA11: ;
					if (!LOC10) goto LA13;
					nimln(107, "nimsets.nim");
					goto LA7;
				}				LA13: ;
			} LA7: ;
			nimln(108, "nimsets.nim");
			b = subInt64(b, 1);
			nimln(109, "nimsets.nim");
			{
				NI64 TMP3072;
				tnode172659* LOC19;
				nimln(109, "nimsets.nim");
				if (!(a == b)) goto LA17;
				nimln(110, "nimsets.nim");
				nimln(110, "nimsets.nim");
				nimln(110, "nimsets.nim");
				TMP3072 = addInt64(a, first);
				LOC19 = 0;
				LOC19 = newinttypenode_172915(((NU8) 6), (NI64)(TMP3072), elemtype);
				addson_173048(result, LOC19);			}			goto LA15;
			LA17: ;
			{
				NI64 TMP3073;
				tnode172659* LOC21;
				NI64 TMP3074;
				tnode172659* LOC22;
				nimln(112, "nimsets.nim");
				n = newnodei_172940(((NU8) 44), info);
				nimln(113, "nimsets.nim");
				asgnRefNoCycle((void**) &(*n).Typ, elemtype);
				nimln(114, "nimsets.nim");
				nimln(114, "nimsets.nim");
				nimln(114, "nimsets.nim");
				TMP3073 = addInt64(a, first);
				LOC21 = 0;
				LOC21 = newinttypenode_172915(((NU8) 6), (NI64)(TMP3073), elemtype);
				addson_173048(n, LOC21);				nimln(115, "nimsets.nim");
				nimln(115, "nimsets.nim");
				nimln(115, "nimsets.nim");
				TMP3074 = addInt64(b, first);
				LOC22 = 0;
				LOC22 = newinttypenode_172915(((NU8) 6), (NI64)(TMP3074), elemtype);
				addson_173048(n, LOC22);				nimln(116, "nimsets.nim");
				addson_173048(result, n);			}			LA15: ;
			nimln(117, "nimsets.nim");
			e = b;
		}		LA5: ;
		nimln(118, "nimsets.nim");
		e = addInt64(e, 1);
	} LA1: ;
	popFrame();
	return result;
}
Example #6
0
N_NIMCALL(void, tobitset_219002)(tnode172659* s, tbitset218010** b) {
	NI64 first;
	NI64 j;
	NI64 LOC1;
	NI i_219467;
	NI HEX3Atmp_219554;
	NI LOC2;
	NI TMP3067;
	NI res_219556;
	nimfr("toBitSet", "nimsets.nim")
	first = 0;
	j = 0;
	nimln(79, "nimsets.nim");
	if ((NU)(0) >= (NU)((*(*s).Typ).Sons->Sup.len)) raiseIndexError();
	first = firstord_201002((*(*s).Typ).Sons->data[0]);
	nimln(80, "nimsets.nim");
	nimln(80, "nimsets.nim");
	LOC1 = 0;
	LOC1 = getsize_201153((*s).Typ);
	bitsetinit_218015(b, ((NI)chckRange64(LOC1, (-2147483647 -1), 2147483647)));	i_219467 = 0;
	HEX3Atmp_219554 = 0;
	nimln(81, "nimsets.nim");
	nimln(81, "nimsets.nim");
	nimln(81, "nimsets.nim");
	LOC2 = 0;
	LOC2 = sonslen_173022(s);
	TMP3067 = subInt(LOC2, 1);
	HEX3Atmp_219554 = (NI32)(TMP3067);
	nimln(1301, "system.nim");
	res_219556 = 0;
	nimln(1302, "system.nim");
	while (1) {
		nimln(1302, "system.nim");
		if (!(res_219556 <= HEX3Atmp_219554)) goto LA3;
		nimln(1301, "system.nim");
		i_219467 = res_219556;
		nimln(82, "nimsets.nim");
		{
			nimln(82, "nimsets.nim");
			if (((TMP3062[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3063));
			if ((NU)(i_219467) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (!((*(*s).kindU.S6.Sons->data[i_219467]).Kind == ((NU8) 44))) goto LA6;
			nimln(83, "nimsets.nim");
			if (((TMP3062[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3063));
			if ((NU)(i_219467) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (((TMP3062[(*(*s).kindU.S6.Sons->data[i_219467]).Kind/8] &(1<<((*(*s).kindU.S6.Sons->data[i_219467]).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3063));
			if ((NU)(0) >= (NU)((*(*s).kindU.S6.Sons->data[i_219467]).kindU.S6.Sons->Sup.len)) raiseIndexError();
			j = getordvalue_201145((*(*s).kindU.S6.Sons->data[i_219467]).kindU.S6.Sons->data[0]);
			nimln(84, "nimsets.nim");
			while (1) {
				NI64 LOC9;
				NI64 TMP3068;
				nimln(84, "nimsets.nim");
				nimln(84, "nimsets.nim");
				if (((TMP3062[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3063));
				if ((NU)(i_219467) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
				if (((TMP3062[(*(*s).kindU.S6.Sons->data[i_219467]).Kind/8] &(1<<((*(*s).kindU.S6.Sons->data[i_219467]).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3063));
				if ((NU)(1) >= (NU)((*(*s).kindU.S6.Sons->data[i_219467]).kindU.S6.Sons->Sup.len)) raiseIndexError();
				LOC9 = 0;
				LOC9 = getordvalue_201145((*(*s).kindU.S6.Sons->data[i_219467]).kindU.S6.Sons->data[1]);
				if (!(j <= LOC9)) goto LA8;
				nimln(85, "nimsets.nim");
				nimln(85, "nimsets.nim");
				TMP3068 = subInt64(j, first);
				bitsetincl_218045(b, (NI64)(TMP3068));				nimln(86, "nimsets.nim");
				j = addInt64(j, 1);
			} LA8: ;
		}		goto LA4;
		LA6: ;
		{
			NI64 LOC11;
			NI64 TMP3069;
			nimln(88, "nimsets.nim");
			nimln(88, "nimsets.nim");
			nimln(88, "nimsets.nim");
			if (((TMP3062[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3063));
			if ((NU)(i_219467) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
			LOC11 = 0;
			LOC11 = getordvalue_201145((*s).kindU.S6.Sons->data[i_219467]);
			TMP3069 = subInt64(LOC11, first);
			bitsetincl_218045(b, (NI64)(TMP3069));		}		LA4: ;
		nimln(1304, "system.nim");
		res_219556 = addInt(res_219556, 1);
	} LA3: ;
	popFrame();
}
Example #7
0
N_NIMCALL(NI64, cardset_219063)(tnode172659* s) {
	NI64 result;
	NI i_219757;
	NI HEX3Atmp_219831;
	NI LOC1;
	NI TMP3075;
	NI res_219833;
	nimfr("cardSet", "nimsets.nim")
	result = 0;
	nimln(153, "nimsets.nim");
	result = 0;
	i_219757 = 0;
	HEX3Atmp_219831 = 0;
	nimln(154, "nimsets.nim");
	nimln(154, "nimsets.nim");
	nimln(154, "nimsets.nim");
	LOC1 = 0;
	LOC1 = sonslen_173022(s);
	TMP3075 = subInt(LOC1, 1);
	HEX3Atmp_219831 = (NI32)(TMP3075);
	nimln(1301, "system.nim");
	res_219833 = 0;
	nimln(1302, "system.nim");
	while (1) {
		nimln(1302, "system.nim");
		if (!(res_219833 <= HEX3Atmp_219831)) goto LA2;
		nimln(1301, "system.nim");
		i_219757 = res_219833;
		nimln(155, "nimsets.nim");
		{
			NI64 LOC7;
			NI64 TMP3076;
			NI64 LOC8;
			NI64 TMP3077;
			NI64 TMP3078;
			nimln(155, "nimsets.nim");
			if (((TMP3062[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3063));
			if ((NU)(i_219757) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (!((*(*s).kindU.S6.Sons->data[i_219757]).Kind == ((NU8) 44))) goto LA5;
			nimln(156, "nimsets.nim");
			nimln(157, "nimsets.nim");
			nimln(156, "nimsets.nim");
			nimln(156, "nimsets.nim");
			nimln(156, "nimsets.nim");
			if (((TMP3062[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3063));
			if ((NU)(i_219757) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (((TMP3062[(*(*s).kindU.S6.Sons->data[i_219757]).Kind/8] &(1<<((*(*s).kindU.S6.Sons->data[i_219757]).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3063));
			if ((NU)(1) >= (NU)((*(*s).kindU.S6.Sons->data[i_219757]).kindU.S6.Sons->Sup.len)) raiseIndexError();
			LOC7 = 0;
			LOC7 = getordvalue_201145((*(*s).kindU.S6.Sons->data[i_219757]).kindU.S6.Sons->data[1]);
			TMP3076 = addInt64(result, LOC7);
			nimln(157, "nimsets.nim");
			if (((TMP3062[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3063));
			if ((NU)(i_219757) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (((TMP3062[(*(*s).kindU.S6.Sons->data[i_219757]).Kind/8] &(1<<((*(*s).kindU.S6.Sons->data[i_219757]).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3063));
			if ((NU)(0) >= (NU)((*(*s).kindU.S6.Sons->data[i_219757]).kindU.S6.Sons->Sup.len)) raiseIndexError();
			LOC8 = 0;
			LOC8 = getordvalue_201145((*(*s).kindU.S6.Sons->data[i_219757]).kindU.S6.Sons->data[0]);
			TMP3077 = subInt64((NI64)(TMP3076), LOC8);
			TMP3078 = addInt64((NI64)(TMP3077), 1);
			result = (NI64)(TMP3078);
		}		goto LA3;
		LA5: ;
		{
			nimln(159, "nimsets.nim");
			result = addInt64(result, 1);
		}		LA3: ;
		nimln(1304, "system.nim");
		res_219833 = addInt(res_219833, 1);
	} LA2: ;
	popFrame();
	return result;
}
Example #8
0
N_NIMCALL(NI64, decodevbiggestint_199530)(NCSTRING s, NI* pos) {
	NI64 result;
	NI i_199537;
	NI sign_199539;
	NI64 TMP2153;
	nimfr("decodeVBiggestInt", "rodutils.nim")
	result = 0;
	nimln(101, "rodutils.nim");
	i_199537 = (*pos);
	nimln(102, "rodutils.nim");
	sign_199539 = -1;
	nimln(103, "rodutils.nim");
	{
		nimln(103, "rodutils.nim");
		nimln(103, "rodutils.nim");
		if (!!((((NU8)(s[i_199537])) >= ((NU8)(97)) && ((NU8)(s[i_199537])) <= ((NU8)(122)) || ((NU8)(s[i_199537])) >= ((NU8)(65)) && ((NU8)(s[i_199537])) <= ((NU8)(90)) || ((NU8)(s[i_199537])) >= ((NU8)(48)) && ((NU8)(s[i_199537])) <= ((NU8)(57)) || ((NU8)(s[i_199537])) == ((NU8)(45)) || ((NU8)(s[i_199537])) >= ((NU8)(128)) && ((NU8)(s[i_199537])) <= ((NU8)(255))))) goto LA3;
		nimln(103, "rodutils.nim");
		failedassertimpl_80421(((NimStringDesc*) &TMP2121));
	}
	LA3: ;
	nimln(104, "rodutils.nim");
	{
		nimln(104, "rodutils.nim");
		if (!((NU8)(s[i_199537]) == (NU8)(45))) goto LA7;
		nimln(105, "rodutils.nim");
		i_199537 = addInt(i_199537, 1);
		nimln(106, "rodutils.nim");
		sign_199539 = 1;
	}
	LA7: ;
	nimln(107, "rodutils.nim");
	result = 0;
	nimln(108, "rodutils.nim");
	while (1) {
		nimln(109, "rodutils.nim");
		switch (((NU8)(s[i_199537]))) {
		case 48 ... 57:
		{
			NI64 TMP2138;
			NI TMP2139;
			NI64 TMP2140;
			nimln(110, "rodutils.nim");
			nimln(110, "rodutils.nim");
			nimln(110, "rodutils.nim");
			TMP2138 = mulInt64(result, 190);
			nimln(110, "rodutils.nim");
			nimln(110, "rodutils.nim");
			TMP2139 = subInt(((NI) (((NU8)(s[i_199537])))), 48);
			TMP2140 = subInt64((NI64)(TMP2138), ((NI64) ((NI32)(TMP2139))));
			result = (NI64)(TMP2140);
		}
		break;
		case 97 ... 122:
		{
			NI64 TMP2141;
			NI TMP2142;
			NI TMP2143;
			NI64 TMP2144;
			nimln(111, "rodutils.nim");
			nimln(111, "rodutils.nim");
			nimln(111, "rodutils.nim");
			TMP2141 = mulInt64(result, 190);
			nimln(111, "rodutils.nim");
			nimln(111, "rodutils.nim");
			nimln(111, "rodutils.nim");
			TMP2142 = subInt(((NI) (((NU8)(s[i_199537])))), 97);
			TMP2143 = addInt(((NI) ((NI32)(TMP2142))), 10);
			TMP2144 = subInt64((NI64)(TMP2141), ((NI64) ((NI32)(TMP2143))));
			result = (NI64)(TMP2144);
		}
		break;
		case 65 ... 90:
		{
			NI64 TMP2145;
			NI TMP2146;
			NI TMP2147;
			NI64 TMP2148;
			nimln(112, "rodutils.nim");
			nimln(112, "rodutils.nim");
			nimln(112, "rodutils.nim");
			TMP2145 = mulInt64(result, 190);
			nimln(112, "rodutils.nim");
			nimln(112, "rodutils.nim");
			nimln(112, "rodutils.nim");
			TMP2146 = subInt(((NI) (((NU8)(s[i_199537])))), 65);
			TMP2147 = addInt(((NI) ((NI32)(TMP2146))), 36);
			TMP2148 = subInt64((NI64)(TMP2145), ((NI64) ((NI32)(TMP2147))));
			result = (NI64)(TMP2148);
		}
		break;
		case 128 ... 255:
		{
			NI64 TMP2149;
			NI TMP2150;
			NI TMP2151;
			NI64 TMP2152;
			nimln(113, "rodutils.nim");
			nimln(113, "rodutils.nim");
			nimln(113, "rodutils.nim");
			TMP2149 = mulInt64(result, 190);
			nimln(113, "rodutils.nim");
			nimln(113, "rodutils.nim");
			nimln(113, "rodutils.nim");
			TMP2150 = subInt(((NI) (((NU8)(s[i_199537])))), 128);
			TMP2151 = addInt(((NI) ((NI32)(TMP2150))), 62);
			TMP2152 = subInt64((NI64)(TMP2149), ((NI64) ((NI32)(TMP2151))));
			result = (NI64)(TMP2152);
		}
		break;
		default:
		{
			nimln(114, "rodutils.nim");
			goto LA9;
		}
		break;
		}
		nimln(115, "rodutils.nim");
		i_199537 = addInt(i_199537, 1);
	} LA9: ;
	nimln(116, "rodutils.nim");
	nimln(116, "rodutils.nim");
	nimln(116, "rodutils.nim");
	TMP2153 = mulInt64(result, ((NI64) (sign_199539)));
	result = (NI64)((NU64)((NI64)(TMP2153)) - (NU64)(5));
	nimln(117, "rodutils.nim");
	(*pos) = i_199537;
	popFrame();
	return result;
}
Example #9
0
N_NIMCALL(NI, rawparseint_80973)(NimStringDesc* s, NI64* b, NI start) {
	NI result;
	NI64 sign;
	NI i;
	nimfr("rawParseInt", "parseutils.nim")
	result = 0;
	nimln(194, "parseutils.nim");
	sign = -1;
	nimln(195, "parseutils.nim");
	i = start;
	nimln(196, "parseutils.nim");
	{
		nimln(196, "parseutils.nim");
		if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
		if (!((NU8)(s->data[i]) == (NU8)(43))) goto LA3;
		nimln(196, "parseutils.nim");
		i = addInt(i, 1);
	}	goto LA1;
	LA3: ;
	{
		nimln(197, "parseutils.nim");
		if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
		if (!((NU8)(s->data[i]) == (NU8)(45))) goto LA6;
		nimln(198, "parseutils.nim");
		i = addInt(i, 1);
		nimln(199, "parseutils.nim");
		sign = 1;
	}	goto LA1;
	LA6: ;
	LA1: ;
	nimln(200, "parseutils.nim");
	{
		NI64 TMP1112;
		NI TMP1113;
		nimln(730, "system.nim");
		if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
		if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA10;
		nimln(201, "parseutils.nim");
		(*b) = 0;
		nimln(202, "parseutils.nim");
		while (1) {
			NI64 TMP1109;
			NI TMP1110;
			NI64 TMP1111;
			nimln(730, "system.nim");
			if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
			if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA12;
			nimln(203, "parseutils.nim");
			nimln(203, "parseutils.nim");
			nimln(203, "parseutils.nim");
			TMP1109 = mulInt64((*b), 10);
			nimln(203, "parseutils.nim");
			nimln(203, "parseutils.nim");
			if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
			TMP1110 = subInt(((NI) (((NU8)(s->data[i])))), 48);
			TMP1111 = subInt64((NI64)(TMP1109), ((NI64) ((NI64)(TMP1110))));
			(*b) = (NI64)(TMP1111);
			nimln(204, "parseutils.nim");
			i = addInt(i, 1);
			nimln(205, "parseutils.nim");
			while (1) {
				nimln(205, "parseutils.nim");
				if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
				if (!((NU8)(s->data[i]) == (NU8)(95))) goto LA13;
				nimln(205, "parseutils.nim");
				i = addInt(i, 1);
			} LA13: ;
		} LA12: ;
		nimln(206, "parseutils.nim");
		nimln(206, "parseutils.nim");
		TMP1112 = mulInt64((*b), sign);
		(*b) = (NI64)(TMP1112);
		nimln(207, "parseutils.nim");
		nimln(207, "parseutils.nim");
		TMP1113 = subInt(i, start);
		result = (NI64)(TMP1113);
	}	LA10: ;
	popFrame();
	return result;
}
Example #10
0
N_NIMCALL(NI, rawparseint_96114)(NimStringDesc* s, NI64* b, NI start) {
	NI result;
	NI64 sign;
	NI i;
	nimfr("rawParseInt", "parseutils.nim")
	result = 0;
	nimln(194, "parseutils.nim");
	sign = IL64(-1);
	nimln(195, "parseutils.nim");
	i = start;
	nimln(196, "parseutils.nim");
	{
		NI TMP285;
		if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
		if (!((NU8)(s->data[i]) == (NU8)(43))) goto LA3;
		TMP285 = addInt(i, ((NI) 1));
		i = (NI)(TMP285);
	}
	goto LA1;
	LA3: ;
	{
		NI TMP286;
		nimln(197, "parseutils.nim");
		if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
		if (!((NU8)(s->data[i]) == (NU8)(45))) goto LA6;
		nimln(198, "parseutils.nim");
		TMP286 = addInt(i, ((NI) 1));
		i = (NI)(TMP286);
		nimln(199, "parseutils.nim");
		sign = IL64(1);
	}
	goto LA1;
	LA6: ;
	LA1: ;
	nimln(200, "parseutils.nim");
	{
		NI64 TMP292;
		NI TMP293;
		if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
		if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA10;
		nimln(201, "parseutils.nim");
		(*b) = IL64(0);
		{
			nimln(202, "parseutils.nim");
			while (1) {
				NI64 TMP287;
				NI TMP288;
				NI64 TMP289;
				NI TMP290;
				if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
				if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA13;
				nimln(203, "parseutils.nim");
				TMP287 = mulInt64((*b), IL64(10));
				if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
				TMP288 = subInt(((NI) (((NU8)(s->data[i])))), ((NI) 48));
				TMP289 = subInt64((NI64)(TMP287), ((NI64) ((NI)(TMP288))));
				(*b) = (NI64)(TMP289);
				nimln(204, "parseutils.nim");
				TMP290 = addInt(i, ((NI) 1));
				i = (NI)(TMP290);
				{
					nimln(205, "parseutils.nim");
					while (1) {
						NI TMP291;
						if ((NU)(i) > (NU)(s->Sup.len)) raiseIndexError();
						if (!((NU8)(s->data[i]) == (NU8)(95))) goto LA15;
						TMP291 = addInt(i, ((NI) 1));
						i = (NI)(TMP291);
					} LA15: ;
				}
			} LA13: ;
		}
		nimln(206, "parseutils.nim");
		TMP292 = mulInt64((*b), sign);
		(*b) = (NI64)(TMP292);
		nimln(207, "parseutils.nim");
		TMP293 = subInt(i, start);
		result = (NI)(TMP293);
	}
	LA10: ;
	popFrame();
	return result;
}
Example #11
0
N_NIMCALL(NI, rawparseint_92914)(NimStringDesc* s, NI64* b, NI start) {
	NI result;
	NI64 sign;
	NI i;
	result = 0;
	sign = IL64(-1);
	i = start;
	{
		NI TMP1131;
		if (!((NU8)(s->data[i]) == (NU8)(43))) goto LA3;
		TMP1131 = addInt(i, ((NI) 1));
		i = (NI)(TMP1131);
	}
	goto LA1;
	LA3: ;
	{
		NI TMP1132;
		if (!((NU8)(s->data[i]) == (NU8)(45))) goto LA6;
		TMP1132 = addInt(i, ((NI) 1));
		i = (NI)(TMP1132);
		sign = IL64(1);
	}
	goto LA1;
	LA6: ;
	LA1: ;
	{
		NI64 TMP1138;
		NI TMP1139;
		if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA10;
		(*b) = IL64(0);
		{
			while (1) {
				NI64 TMP1133;
				NI TMP1134;
				NI64 TMP1135;
				NI TMP1136;
				if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA13;
				TMP1133 = mulInt64((*b), IL64(10));
				TMP1134 = subInt(((NI) (((NU8)(s->data[i])))), ((NI) 48));
				TMP1135 = subInt64((NI64)(TMP1133), ((NI64) ((NI)(TMP1134))));
				(*b) = (NI64)(TMP1135);
				TMP1136 = addInt(i, ((NI) 1));
				i = (NI)(TMP1136);
				{
					while (1) {
						NI TMP1137;
						if (!((NU8)(s->data[i]) == (NU8)(95))) goto LA15;
						TMP1137 = addInt(i, ((NI) 1));
						i = (NI)(TMP1137);
					} LA15: ;
				}
			} LA13: ;
		}
		TMP1138 = mulInt64((*b), sign);
		(*b) = (NI64)(TMP1138);
		TMP1139 = subInt(i, start);
		result = (NI)(TMP1139);
	}
	LA10: ;
	return result;
}
Example #12
0
N_NIMCALL(tnode186813*, totreeset_243679)(tbitset242012* s, ttype186847* settype, tlineinfo162527 info) {
	tnode186813* result;
	NI64 a;
	NI64 b;
	NI64 e;
	NI64 first;
	ttype186847* elemtype;
	tnode186813* n;
	nimfr("toTreeSet", "nimsets.nim")
	result = 0;
	a = 0;
	b = 0;
	e = 0;
	first = 0;
	elemtype = 0;
	n = 0;
	nimln(95, "nimsets.nim");
	if ((NU)(0) >= (NU)((*settype).Sons->Sup.len)) raiseIndexError();
	elemtype = (*settype).Sons->data[0];
	nimln(96, "nimsets.nim");
	first = firstord_222002(elemtype);
	nimln(97, "nimsets.nim");
	result = newnodei_187109(((NU8) 39), info);
	nimln(98, "nimsets.nim");
	asgnRefNoCycle((void**) &(*result).Typ, settype);
	nimln(99, "nimsets.nim");
	(*result).Info = info;
	nimln(100, "nimsets.nim");
	e = 0;
	nimln(101, "nimsets.nim");
	while (1) {
		NI TMP3158;
		nimln(101, "nimsets.nim");
		nimln(101, "nimsets.nim");
		nimln(101, "nimsets.nim");
		TMP3158 = mulInt(s->Sup.len, 8);
		if (!(e < ((NI64) ((NI64)(TMP3158))))) goto LA1;
		nimln(102, "nimsets.nim");
		{
			NIM_BOOL LOC4;
			nimln(102, "nimsets.nim");
			LOC4 = 0;
			LOC4 = bitsetin_242059(s, e);
			if (!LOC4) goto LA5;
			nimln(103, "nimsets.nim");
			a = e;
			nimln(104, "nimsets.nim");
			b = e;
			nimln(105, "nimsets.nim");
			while (1) {
				nimln(106, "nimsets.nim");
				b = addInt64(b, 1);
				nimln(107, "nimsets.nim");
				{
					NIM_BOOL LOC10;
					NI TMP3159;
					NIM_BOOL LOC12;
					nimln(107, "nimsets.nim");
					LOC10 = 0;
					nimln(107, "nimsets.nim");
					nimln(107, "nimsets.nim");
					nimln(107, "nimsets.nim");
					TMP3159 = mulInt(s->Sup.len, 8);
					LOC10 = (((NI64) ((NI64)(TMP3159))) <= b);
					if (LOC10) goto LA11;
					nimln(107, "nimsets.nim");
					nimln(107, "nimsets.nim");
					LOC12 = 0;
					LOC12 = bitsetin_242059(s, b);
					LOC10 = !(LOC12);
					LA11: ;
					if (!LOC10) goto LA13;
					nimln(107, "nimsets.nim");
					goto LA7;
				}
				LA13: ;
			} LA7: ;
			nimln(108, "nimsets.nim");
			b = subInt64(b, 1);
			nimln(109, "nimsets.nim");
			{
				NI64 TMP3160;
				tnode186813* LOC19;
				nimln(109, "nimsets.nim");
				if (!(a == b)) goto LA17;
				nimln(110, "nimsets.nim");
				nimln(110, "nimsets.nim");
				nimln(110, "nimsets.nim");
				TMP3160 = addInt64(a, first);
				LOC19 = 0;
				LOC19 = newinttypenode_187084(((NU8) 6), (NI64)(TMP3160), elemtype);
				addson_187217(result, LOC19);
			}
			goto LA15;
			LA17: ;
			{
				NI64 TMP3161;
				tnode186813* LOC21;
				NI64 TMP3162;
				tnode186813* LOC22;
				nimln(112, "nimsets.nim");
				n = newnodei_187109(((NU8) 44), info);
				nimln(113, "nimsets.nim");
				asgnRefNoCycle((void**) &(*n).Typ, elemtype);
				nimln(114, "nimsets.nim");
				nimln(114, "nimsets.nim");
				nimln(114, "nimsets.nim");
				TMP3161 = addInt64(a, first);
				LOC21 = 0;
				LOC21 = newinttypenode_187084(((NU8) 6), (NI64)(TMP3161), elemtype);
				addson_187217(n, LOC21);
				nimln(115, "nimsets.nim");
				nimln(115, "nimsets.nim");
				nimln(115, "nimsets.nim");
				TMP3162 = addInt64(b, first);
				LOC22 = 0;
				LOC22 = newinttypenode_187084(((NU8) 6), (NI64)(TMP3162), elemtype);
				addson_187217(n, LOC22);
				nimln(116, "nimsets.nim");
				addson_187217(result, n);
			}
			LA15: ;
			nimln(117, "nimsets.nim");
			e = b;
		}
		LA5: ;
		nimln(118, "nimsets.nim");
		e = addInt64(e, 1);
	} LA1: ;
	popFrame();
	return result;
}
Example #13
0
N_NIMCALL(void, tobitset_243002)(tnode186813* s, tbitset242012** b) {
	NI64 first;
	NI64 j;
	NI64 LOC1;
	NI i_243558;
	NI HEX3Atmp_243671;
	NI LOC2;
	NI TMP3155;
	NI res_243673;
	nimfr("toBitSet", "nimsets.nim")
	first = 0;
	j = 0;
	nimln(79, "nimsets.nim");
	if ((NU)(0) >= (NU)((*(*s).Typ).Sons->Sup.len)) raiseIndexError();
	first = firstord_222002((*(*s).Typ).Sons->data[0]);
	nimln(80, "nimsets.nim");
	nimln(80, "nimsets.nim");
	LOC1 = 0;
	LOC1 = getsize_222158((*s).Typ);
	bitsetinit_242017(b, ((NI) (LOC1)));
	i_243558 = 0;
	HEX3Atmp_243671 = 0;
	nimln(81, "nimsets.nim");
	nimln(81, "nimsets.nim");
	nimln(81, "nimsets.nim");
	LOC2 = 0;
	LOC2 = sonslen_187191(s);
	TMP3155 = subInt(LOC2, 1);
	HEX3Atmp_243671 = (NI64)(TMP3155);
	nimln(1450, "system.nim");
	res_243673 = 0;
	nimln(1451, "system.nim");
	while (1) {
		nimln(1451, "system.nim");
		if (!(res_243673 <= HEX3Atmp_243671)) goto LA3;
		nimln(1450, "system.nim");
		i_243558 = res_243673;
		nimln(82, "nimsets.nim");
		{
			nimln(82, "nimsets.nim");
			if (((TMP3150[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3151));
			if ((NU)(i_243558) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (!((*(*s).kindU.S6.Sons->data[i_243558]).Kind == ((NU8) 44))) goto LA6;
			nimln(83, "nimsets.nim");
			if (((TMP3150[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3151));
			if ((NU)(i_243558) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (((TMP3150[(*(*s).kindU.S6.Sons->data[i_243558]).Kind/8] &(1<<((*(*s).kindU.S6.Sons->data[i_243558]).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3151));
			if ((NU)(0) >= (NU)((*(*s).kindU.S6.Sons->data[i_243558]).kindU.S6.Sons->Sup.len)) raiseIndexError();
			j = getordvalue_222150((*(*s).kindU.S6.Sons->data[i_243558]).kindU.S6.Sons->data[0]);
			nimln(84, "nimsets.nim");
			while (1) {
				NI64 LOC9;
				NI64 TMP3156;
				nimln(84, "nimsets.nim");
				nimln(84, "nimsets.nim");
				if (((TMP3150[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3151));
				if ((NU)(i_243558) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
				if (((TMP3150[(*(*s).kindU.S6.Sons->data[i_243558]).Kind/8] &(1<<((*(*s).kindU.S6.Sons->data[i_243558]).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3151));
				if ((NU)(1) >= (NU)((*(*s).kindU.S6.Sons->data[i_243558]).kindU.S6.Sons->Sup.len)) raiseIndexError();
				LOC9 = 0;
				LOC9 = getordvalue_222150((*(*s).kindU.S6.Sons->data[i_243558]).kindU.S6.Sons->data[1]);
				if (!(j <= LOC9)) goto LA8;
				nimln(85, "nimsets.nim");
				nimln(85, "nimsets.nim");
				TMP3156 = subInt64(j, first);
				bitsetincl_242047(b, (NI64)(TMP3156));
				nimln(86, "nimsets.nim");
				j = addInt64(j, 1);
			} LA8: ;
		}
		goto LA4;
		LA6: ;
		{
			NI64 LOC11;
			NI64 TMP3157;
			nimln(88, "nimsets.nim");
			nimln(88, "nimsets.nim");
			nimln(88, "nimsets.nim");
			if (((TMP3150[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3151));
			if ((NU)(i_243558) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
			LOC11 = 0;
			LOC11 = getordvalue_222150((*s).kindU.S6.Sons->data[i_243558]);
			TMP3157 = subInt64(LOC11, first);
			bitsetincl_242047(b, (NI64)(TMP3157));
		}
		LA4: ;
		nimln(1453, "system.nim");
		res_243673 = addInt(res_243673, 1);
	} LA3: ;
	popFrame();
}
Example #14
0
N_NIMCALL(NI64, cardset_243063)(tnode186813* s) {
	NI64 result;
	NI i_243904;
	NI HEX3Atmp_244000;
	NI LOC1;
	NI TMP3163;
	NI res_244002;
	nimfr("cardSet", "nimsets.nim")
	result = 0;
	nimln(153, "nimsets.nim");
	result = 0;
	i_243904 = 0;
	HEX3Atmp_244000 = 0;
	nimln(154, "nimsets.nim");
	nimln(154, "nimsets.nim");
	nimln(154, "nimsets.nim");
	LOC1 = 0;
	LOC1 = sonslen_187191(s);
	TMP3163 = subInt(LOC1, 1);
	HEX3Atmp_244000 = (NI64)(TMP3163);
	nimln(1450, "system.nim");
	res_244002 = 0;
	nimln(1451, "system.nim");
	while (1) {
		nimln(1451, "system.nim");
		if (!(res_244002 <= HEX3Atmp_244000)) goto LA2;
		nimln(1450, "system.nim");
		i_243904 = res_244002;
		nimln(155, "nimsets.nim");
		{
			NI64 LOC7;
			NI64 TMP3164;
			NI64 LOC8;
			NI64 TMP3165;
			NI64 TMP3166;
			nimln(155, "nimsets.nim");
			if (((TMP3150[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3151));
			if ((NU)(i_243904) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (!((*(*s).kindU.S6.Sons->data[i_243904]).Kind == ((NU8) 44))) goto LA5;
			nimln(156, "nimsets.nim");
			nimln(157, "nimsets.nim");
			nimln(156, "nimsets.nim");
			nimln(156, "nimsets.nim");
			nimln(156, "nimsets.nim");
			if (((TMP3150[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3151));
			if ((NU)(i_243904) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (((TMP3150[(*(*s).kindU.S6.Sons->data[i_243904]).Kind/8] &(1<<((*(*s).kindU.S6.Sons->data[i_243904]).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3151));
			if ((NU)(1) >= (NU)((*(*s).kindU.S6.Sons->data[i_243904]).kindU.S6.Sons->Sup.len)) raiseIndexError();
			LOC7 = 0;
			LOC7 = getordvalue_222150((*(*s).kindU.S6.Sons->data[i_243904]).kindU.S6.Sons->data[1]);
			TMP3164 = addInt64(result, LOC7);
			nimln(157, "nimsets.nim");
			if (((TMP3150[(*s).Kind/8] &(1<<((*s).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3151));
			if ((NU)(i_243904) >= (NU)((*s).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (((TMP3150[(*(*s).kindU.S6.Sons->data[i_243904]).Kind/8] &(1<<((*(*s).kindU.S6.Sons->data[i_243904]).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3151));
			if ((NU)(0) >= (NU)((*(*s).kindU.S6.Sons->data[i_243904]).kindU.S6.Sons->Sup.len)) raiseIndexError();
			LOC8 = 0;
			LOC8 = getordvalue_222150((*(*s).kindU.S6.Sons->data[i_243904]).kindU.S6.Sons->data[0]);
			TMP3165 = subInt64((NI64)(TMP3164), LOC8);
			TMP3166 = addInt64((NI64)(TMP3165), 1);
			result = (NI64)(TMP3166);
		}
		goto LA3;
		LA5: ;
		{
			nimln(159, "nimsets.nim");
			result = addInt64(result, 1);
		}
		LA3: ;
		nimln(1453, "system.nim");
		res_244002 = addInt(res_244002, 1);
	} LA2: ;
	popFrame();
	return result;
}