BJTnoise

decompiled_code:
__int64 __fastcall BJTnoise(int a1, int a2, __int64 a3, __int64 a4, __int64 a5, double *a6)
{
__int64 result; // rax
__int64 v9; // r13
__int64 v10; // r13
void **v11; // rbp
__int64 v12; // rax
void (__fastcall *v13)(__int64, __int64, _QWORD, char *, __int64, _QWORD); // r10
int v14; // edx
const char **v15; // r12
const char *v16; // r14
__int64 v17; // rax
void (__fastcall *v18)(__int64, __int64, _QWORD, char *, __int64, _QWORD); // r10
int v19; // edx
__int64 v20; // rax
void (__fastcall *v21)(__int64, __int64, _QWORD, char *, __int64, _QWORD); // r10
int v22; // edx
double v23; // xmm0_8
double v24; // xmm0_8
double v25; // xmm0_8
double v26; // xmm0_8
__int64 j; // rax
__int64 v28; // rbp
double v29; // r13
double v30; // r12
double *v31; // r12
double *v32; // r13
double *v33; // r14
_QWORD *v34; // rax
double v35; // xmm0_8
char *v36; // rdx
__int64 v37; // rcx
int v38; // eax
_QWORD *i; // r8
_QWORD *v40; // rax
__int64 v41; // rcx
int v42; // edx
__int64 v43; // rcx
int v44; // edx
double v45; // [rsp+0h] [rbp-118h]
__int64 v46; // [rsp+10h] [rbp-108h]
__int64 v48; // [rsp+20h] [rbp-F8h] BYREF
char v49[8]; // [rsp+28h] [rbp-F0h] BYREF
char v50[8]; // [rsp+30h] [rbp-E8h] BYREF
char v51[8]; // [rsp+38h] [rbp-E0h] BYREF
char v52[8]; // [rsp+40h] [rbp-D8h] BYREF
double v53; // [rsp+48h] [rbp-D0h]
double v54; // [rsp+50h] [rbp-C8h]
double v55; // [rsp+60h] [rbp-B8h] BYREF
double v56; // [rsp+68h] [rbp-B0h] BYREF
double v57; // [rsp+70h] [rbp-A8h] BYREF
double v58; // [rsp+78h] [rbp-A0h] BYREF
double v59; // [rsp+80h] [rbp-98h] BYREF
double v60; // [rsp+88h] [rbp-90h] BYREF
double v61; // [rsp+90h] [rbp-88h]
char v62; // [rsp+98h] [rbp-80h] BYREF
char s[120]; // [rsp+A0h] [rbp-78h] BYREF

v46 = a3;
if ( a2 != 1 )
{
result = 0LL;
if ( a2 != 2 )
return result;
if ( a1 != 1 )
{
result = 0LL;
if ( a1 == 2 )
{
result = *(unsigned int *)(*(_QWORD *)(a4 + 968) + 64LL);
if ( (_DWORD)result )
{
if ( a3 )
{
do
{
for ( i = *(_QWORD **)(v46 + 16); i; i = (_QWORD *)i[1] )
{
v40 = i + 134;
do
{
v41 = *(_QWORD *)(a5 + 96);
v42 = *(_DWORD *)(a5 + 80);
*(_DWORD *)(a5 + 80) = v42 + 1;
*(_QWORD *)(v41 + 8LL * v42) = *v40;
v43 = *(_QWORD *)(a5 + 96);
v44 = *(_DWORD *)(a5 + 80);
*(_DWORD *)(a5 + 80) = v44 + 1;
*(_QWORD *)(v43 + 8LL * v44) = v40[7];
++v40;
}
while ( v40 != i + 141 );
}
result = *(_QWORD *)(v46 + 8);
v46 = result;
}
while ( result );
}
else
{
result = 0LL;
}
}
}
return result;
}
if ( !a3 )
return 0LL;
while ( 1 )
{
v28 = *(_QWORD *)(v46 + 16);
if ( v28 )
break;
LABEL_59:
result = *(_QWORD *)(v46 + 8);
v46 = result;
if ( !result )
return result;
}
while ( 1 )
{
NevalSrc(
&v55,
&v48,
a4,
2LL,
*(unsigned int *)(v28 + 44),
*(unsigned int *)(v28 + 28),
*(double *)(v46 + 400) * *(double *)(v28 + 56));
NevalSrc(&v56, v49, a4, 2LL, *(unsigned int *)(v28 + 48), *(unsigned int *)(v28 + 32), *(double *)(v28 + 280));
NevalSrc(
&v57,
v50,
a4,
2LL,
*(unsigned int *)(v28 + 52),
*(unsigned int *)(v28 + 36),
*(double *)(v46 + 408) * *(double *)(v28 + 56));
NevalSrc(&v58, v51, a4, 1LL, *(unsigned int *)(v28 + 44), *(unsigned int *)(v28 + 52), *(double *)(v28 + 232));
NevalSrc(&v59, v52, a4, 1LL, *(unsigned int *)(v28 + 48), *(unsigned int *)(v28 + 52), *(double *)(v28 + 240));
NevalSrc(&v60, 0LL, a4, 3LL, *(unsigned int *)(v28 + 48), *(unsigned int *)(v28 + 52), 0.0);
v29 = *(double *)(v46 + 352);
v30 = *(double *)(v46 + 360);
v23 = *(double *)(v28 + 240);
if ( v23 < 0.0 )
{
if ( v23 < -1.0e-38 )
goto LABEL_47;
v23 = LC0;
}
else if ( v23 <= 1.0e-38 )
{
v23 = LC0;
}
else if ( v23 < 0.0 )
{
LABEL_47:
*(_QWORD *)&v23 ^= LC6;
goto LABEL_36;
}
LABEL_36:
v24 = log(v23);
v25 = exp(v30 * v24);
v26 = v29 * v25 / *(double *)a5 * v60;
v60 = v26;
if ( v26 <= 1.0e-38 )
v26 = LC0;
v53 = log(v26);
v61 = v55 + v56 + v57 + v58 + v59 + v60;
v54 = log(v61);
*a6 = *a6 + v61;
if ( *(double *)(a5 + 16) == 0.0 )
{
for ( j = 0LL; j != 56; j += 8LL )
*(_QWORD *)(v28 + j + 1016) = *(__int64 *)((char *)&v48 + j);
if ( *(double *)a5 == *(double *)(*(_QWORD *)(a4 + 968) + 96LL) )
{
v34 = (_QWORD *)(v28 + 1072);
do
{
*v34 = 0LL;
v34[7] = 0LL;
++v34;
}
while ( v34 != (_QWORD *)(v28 + 1128) );
}
}
else
{
v31 = (double *)(v28 + 1016);
v32 = (double *)&v48;
v33 = &v55;
do
{
v45 = Nintegrate(a5, *v33, *v32, *v31);
v35 = Nintegrate(a5, *v33 * *(double *)(a5 + 40), *(double *)(a5 + 48) + *v32, *(double *)(a5 + 48) + *v31);
*v31 = *v32;
*(double *)(a5 + 24) = v45 + *(double *)(a5 + 24);
*(double *)(a5 + 32) = v35 + *(double *)(a5 + 32);
if ( *(_DWORD *)(*(_QWORD *)(a4 + 968) + 64LL) )
{
v31[7] = v45 + v31[7];
*(double *)(v28 + 1120) = v45 + *(double *)(v28 + 1120);
v31[14] = v35 + v31[14];
*(double *)(v28 + 1176) = v35 + *(double *)(v28 + 1176);
}
++v31;
++v32;
++v33;
}
while ( v31 != (double *)(v28 + 1064) );
}
if ( *(_DWORD *)(a5 + 88) )
{
v36 = (char *)&v55;
do
{
v37 = *(_QWORD *)(a5 + 96);
v38 = *(_DWORD *)(a5 + 80);
*(_DWORD *)(a5 + 80) = v38 + 1;
*(_QWORD *)(v37 + 8LL * v38) = *(_QWORD *)v36;
v36 += 8;
}
while ( v36 != &v62 );
}
v28 = *(_QWORD *)(v28 + 8);
if ( !v28 )
goto LABEL_59;
}
}
result = *(unsigned int *)(*(_QWORD *)(a4 + 968) + 64LL);
if ( (_DWORD)result )
{
if ( a1 == 1 )
{
if ( a3 )
{
while ( 1 )
{
v10 = *(_QWORD *)(v46 + 16);
if ( v10 )
break;
LABEL_13:
result = *(_QWORD *)(v46 + 8);
v46 = result;
if ( !result )
return result;
}
LABEL_16:
v11 = (void **)BJTnNames;
while ( 1 )
{
sprintf(s, "onoise.%s%s", *(const char **)(v10 + 16), (const char *)*v11);
v12 = trealloc(*(_QWORD *)(a5 + 112), 8LL * (*(_DWORD *)(a5 + 84) + 1));
*(_QWORD *)(a5 + 112) = v12;
if ( !v12 )
break;
v13 = (void (__fastcall *)(__int64, __int64, _QWORD, char *, __int64, _QWORD))*SPfrontEnd;
v14 = *(_DWORD *)(a5 + 84);
*(_DWORD *)(a5 + 84) = v14 + 1;
v13(a4, v12 + 8LL * v14, 0LL, s, 32LL, 0LL);
if ( ++v11 == &off_830 + 1 )
{
v10 = *(_QWORD *)(v10 + 8);
if ( !v10 )
goto LABEL_13;
goto LABEL_16;
}
}
result = 8LL;
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
if ( a1 == 2 )
{
if ( a3 )
{
while ( 1 )
{
v9 = *(_QWORD *)(v46 + 16);
if ( v9 )
break;
LABEL_9:
result = *(_QWORD *)(v46 + 8);
v46 = result;
if ( !result )
return result;
}
LABEL_21:
v15 = (const char **)BJTnNames;
while ( 1 )
{
v16 = *v15;
sprintf(s, "onoise_total.%s%s", *(const char **)(v9 + 16), *v15);
v17 = trealloc(*(_QWORD *)(a5 + 112), 8LL * (*(_DWORD *)(a5 + 84) + 1));
*(_QWORD *)(a5 + 112) = v17;
if ( !v17 )
return 8LL;
v18 = (void (__fastcall *)(__int64, __int64, _QWORD, char *, __int64, _QWORD))*SPfrontEnd;
v19 = *(_DWORD *)(a5 + 84);
*(_DWORD *)(a5 + 84) = v19 + 1;
v18(a4, v17 + 8LL * v19, 0LL, s, 32LL, 0LL);
sprintf(s, "inoise_total.%s%s", *(const char **)(v9 + 16), v16);
v20 = trealloc(*(_QWORD *)(a5 + 112), 8LL * (*(_DWORD *)(a5 + 84) + 1));
*(_QWORD *)(a5 + 112) = v20;
if ( !v20 )
break;
v21 = (void (__fastcall *)(__int64, __int64, _QWORD, char *, __int64, _QWORD))*SPfrontEnd;
v22 = *(_DWORD *)(a5 + 84);
*(_DWORD *)(a5 + 84) = v22 + 1;
v21(a4, v20 + 8LL * v22, 0LL, s, 32LL, 0LL);
if ( &off_830 + 1 == (void **)++v15 )
{
v9 = *(_QWORD *)(v9 + 8);
if ( !v9 )
goto LABEL_9;
goto LABEL_21;
}
}
result = 8LL;
}
else
{
result = 0LL;
}
}
}
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(int a1, int a2, __int64 a3, __int64 a4, __int64 a5, double *a6)
{
__int64 result; // rax
__int64 v9; // r13
__int64 v10; // r13
void **v11; // rbp
__int64 v12; // rax
void (__fastcall *v13)(__int64, __int64, _QWORD, char *, __int64, _QWORD); // r10
int v14; // edx
const char **v15; // r12
const char *v16; // r14
__int64 v17; // rax
void (__fastcall *v18)(__int64, __int64, _QWORD, char *, __int64, _QWORD); // r10
int v19; // edx
__int64 v20; // rax
void (__fastcall *v21)(__int64, __int64, _QWORD, char *, __int64, _QWORD); // r10
int v22; // edx
double v23; // xmm0_8
double v24; // xmm0_8
double v25; // xmm0_8
double v26; // xmm0_8
__int64 j; // rax
__int64 v28; // rbp
double v29; // r13
double v30; // r12
double *v31; // r12
double *v32; // r13
double *v33; // r14
_QWORD *v34; // rax
double v35; // xmm0_8
char *v36; // rdx
__int64 v37; // rcx
int v38; // eax
_QWORD *i; // r8
_QWORD *v40; // rax
__int64 v41; // rcx
int v42; // edx
__int64 v43; // rcx
int v44; // edx
double v45; // [rsp+0h] [rbp-118h]
__int64 v46; // [rsp+10h] [rbp-108h]
__int64 v48; // [rsp+20h] [rbp-F8h] BYREF
char v49[8]; // [rsp+28h] [rbp-F0h] BYREF
char v50[8]; // [rsp+30h] [rbp-E8h] BYREF
char v51[8]; // [rsp+38h] [rbp-E0h] BYREF
char v52[8]; // [rsp+40h] [rbp-D8h] BYREF
double v53; // [rsp+48h] [rbp-D0h]
double v54; // [rsp+50h] [rbp-C8h]
double v55; // [rsp+60h] [rbp-B8h] BYREF
double v56; // [rsp+68h] [rbp-B0h] BYREF
double v57; // [rsp+70h] [rbp-A8h] BYREF
double v58; // [rsp+78h] [rbp-A0h] BYREF
double v59; // [rsp+80h] [rbp-98h] BYREF
double v60; // [rsp+88h] [rbp-90h] BYREF
double v61; // [rsp+90h] [rbp-88h]
char v62; // [rsp+98h] [rbp-80h] BYREF
char s[120]; // [rsp+A0h] [rbp-78h] BYREF

v46 = a3;
if ( a2 != 1 )
{
result = 0LL;
if ( a2 != 2 )
return result;
if ( a1 != 1 )
{
result = 0LL;
if ( a1 == 2 )
{
result = *(unsigned int *)(*(_QWORD *)(a4 + 968) + 64LL);
if ( (_DWORD)result )
{
if ( a3 )
{
do
{
for ( i = *(_QWORD **)(v46 + 16); i; i = (_QWORD *)i[1] )
{
v40 = i + 134;
do
{
v41 = *(_QWORD *)(a5 + 96);
v42 = *(_DWORD *)(a5 + 80);
*(_DWORD *)(a5 + 80) = v42 + 1;
*(_QWORD *)(v41 + 8LL * v42) = *v40;
v43 = *(_QWORD *)(a5 + 96);
v44 = *(_DWORD *)(a5 + 80);
*(_DWORD *)(a5 + 80) = v44 + 1;
*(_QWORD *)(v43 + 8LL * v44) = v40[7];
++v40;
}
while ( v40 != i + 141 );
}
result = *(_QWORD *)(v46 + 8);
v46 = result;
}
while ( result );
}
else
{
result = 0LL;
}
}
}
return result;
}
if ( !a3 )
return 0LL;
while ( 1 )
{
v28 = *(_QWORD *)(v46 + 16);
if ( v28 )
break;
LABEL_59:
result = *(_QWORD *)(v46 + 8);
v46 = result;
if ( !result )
return result;
}
while ( 1 )
{
NevalSrc(
&v55,
&v48,
a4,
2LL,
*(unsigned int *)(v28 + 44),
*(unsigned int *)(v28 + 28),
*(double *)(v46 + 400) * *(double *)(v28 + 56));
NevalSrc(&v56, v49, a4, 2LL, *(unsigned int *)(v28 + 48), *(unsigned int *)(v28 + 32), *(double *)(v28 + 280));
NevalSrc(
&v57,
v50,
a4,
2LL,
*(unsigned int *)(v28 + 52),
*(unsigned int *)(v28 + 36),
*(double *)(v46 + 408) * *(double *)(v28 + 56));
NevalSrc(&v58, v51, a4, 1LL, *(unsigned int *)(v28 + 44), *(unsigned int *)(v28 + 52), *(double *)(v28 + 232));
NevalSrc(&v59, v52, a4, 1LL, *(unsigned int *)(v28 + 48), *(unsigned int *)(v28 + 52), *(double *)(v28 + 240));
NevalSrc(&v60, 0LL, a4, 3LL, *(unsigned int *)(v28 + 48), *(unsigned int *)(v28 + 52), 0.0);
v29 = *(double *)(v46 + 352);
v30 = *(double *)(v46 + 360);
v23 = *(double *)(v28 + 240);
if ( v23 < 0.0 )
{
if ( v23 < -1.0e-38 )
goto LABEL_47;
v23 = LC0;
}
else if ( v23 <= 1.0e-38 )
{
v23 = LC0;
}
else if ( v23 < 0.0 )
{
LABEL_47:
*(_QWORD *)&v23 ^= LC6;
goto LABEL_36;
}
LABEL_36:
v24 = log(v23);
v25 = exp(v30 * v24);
v26 = v29 * v25 / *(double *)a5 * v60;
v60 = v26;
if ( v26 <= 1.0e-38 )
v26 = LC0;
v53 = log(v26);
v61 = v55 + v56 + v57 + v58 + v59 + v60;
v54 = log(v61);
*a6 = *a6 + v61;
if ( *(double *)(a5 + 16) == 0.0 )
{
for ( j = 0LL; j != 56; j += 8LL )
*(_QWORD *)(v28 + j + 1016) = *(__int64 *)((char *)&v48 + j);
if ( *(double *)a5 == *(double *)(*(_QWORD *)(a4 + 968) + 96LL) )
{
v34 = (_QWORD *)(v28 + 1072);
do
{
*v34 = 0LL;
v34[7] = 0LL;
++v34;
}
while ( v34 != (_QWORD *)(v28 + 1128) );
}
}
else
{
v31 = (double *)(v28 + 1016);
v32 = (double *)&v48;
v33 = &v55;
do
{
v45 = Nintegrate(a5, *v33, *v32, *v31);
v35 = Nintegrate(a5, *v33 * *(double *)(a5 + 40), *(double *)(a5 + 48) + *v32, *(double *)(a5 + 48) + *v31);
*v31 = *v32;
*(double *)(a5 + 24) = v45 + *(double *)(a5 + 24);
*(double *)(a5 + 32) = v35 + *(double *)(a5 + 32);
if ( *(_DWORD *)(*(_QWORD *)(a4 + 968) + 64LL) )
{
v31[7] = v45 + v31[7];
*(double *)(v28 + 1120) = v45 + *(double *)(v28 + 1120);
v31[14] = v35 + v31[14];
*(double *)(v28 + 1176) = v35 + *(double *)(v28 + 1176);
}
++v31;
++v32;
++v33;
}
while ( v31 != (double *)(v28 + 1064) );
}
if ( *(_DWORD *)(a5 + 88) )
{
v36 = (char *)&v55;
do
{
v37 = *(_QWORD *)(a5 + 96);
v38 = *(_DWORD *)(a5 + 80);
*(_DWORD *)(a5 + 80) = v38 + 1;
*(_QWORD *)(v37 + 8LL * v38) = *(_QWORD *)v36;
v36 += 8;
}
while ( v36 != &v62 );
}
v28 = *(_QWORD *)(v28 + 8);
if ( !v28 )
goto LABEL_59;
}
}
result = *(unsigned int *)(*(_QWORD *)(a4 + 968) + 64LL);
if ( (_DWORD)result )
{
if ( a1 == 1 )
{
if ( a3 )
{
while ( 1 )
{
v10 = *(_QWORD *)(v46 + 16);
if ( v10 )
break;
LABEL_13:
result = *(_QWORD *)(v46 + 8);
v46 = result;
if ( !result )
return result;
}
LABEL_16:
v11 = (void **)BJTnNames;
while ( 1 )
{
sprintf(s, "onoise.%s%s", *(const char **)(v10 + 16), (const char *)*v11);
v12 = trealloc(*(_QWORD *)(a5 + 112), 8LL * (*(_DWORD *)(a5 + 84) + 1));
*(_QWORD *)(a5 + 112) = v12;
if ( !v12 )
break;
v13 = (void (__fastcall *)(__int64, __int64, _QWORD, char *, __int64, _QWORD))*SPfrontEnd;
v14 = *(_DWORD *)(a5 + 84);
*(_DWORD *)(a5 + 84) = v14 + 1;
v13(a4, v12 + 8LL * v14, 0LL, s, 32LL, 0LL);
if ( ++v11 == &off_830 + 1 )
{
v10 = *(_QWORD *)(v10 + 8);
if ( !v10 )
goto LABEL_13;
goto LABEL_16;
}
}
result = 8LL;
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
if ( a1 == 2 )
{
if ( a3 )
{
while ( 1 )
{
v9 = *(_QWORD *)(v46 + 16);
if ( v9 )
break;
LABEL_9:
result = *(_QWORD *)(v46 + 8);
v46 = result;
if ( !result )
return result;
}
LABEL_21:
v15 = (const char **)BJTnNames;
while ( 1 )
{
v16 = *v15;
sprintf(s, "onoise_total.%s%s", *(const char **)(v9 + 16), *v15);
v17 = trealloc(*(_QWORD *)(a5 + 112), 8LL * (*(_DWORD *)(a5 + 84) + 1));
*(_QWORD *)(a5 + 112) = v17;
if ( !v17 )
return 8LL;
v18 = (void (__fastcall *)(__int64, __int64, _QWORD, char *, __int64, _QWORD))*SPfrontEnd;
v19 = *(_DWORD *)(a5 + 84);
*(_DWORD *)(a5 + 84) = v19 + 1;
v18(a4, v17 + 8LL * v19, 0LL, s, 32LL, 0LL);
sprintf(s, "inoise_total.%s%s", *(const char **)(v9 + 16), v16);
v20 = trealloc(*(_QWORD *)(a5 + 112), 8LL * (*(_DWORD *)(a5 + 84) + 1));
*(_QWORD *)(a5 + 112) = v20;
if ( !v20 )
break;
v21 = (void (__fastcall *)(__int64, __int64, _QWORD, char *, __int64, _QWORD))*SPfrontEnd;
v22 = *(_DWORD *)(a5 + 84);
*(_DWORD *)(a5 + 84) = v22 + 1;
v21(a4, v20 + 8LL * v22, 0LL, s, 32LL, 0LL);
if ( &off_830 + 1 == (void **)++v15 )
{
v9 = *(_QWORD *)(v9 + 8);
if ( !v9 )
goto LABEL_9;
goto LABEL_21;
}
}
result = 8LL;
}
else
{
result = 0LL;
}
}
}
}
return result;
}

original_code:
int
BJTnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
          Ndata *data, double *OnDens)
{
    BJTmodel *firstModel = (BJTmodel *) genmodel;
    BJTmodel *model;
    BJTinstance *inst;
    char name[64];
    double tempOnoise;
    double tempInoise;
    double noizDens[7];
    double lnNdens[7];
    int i;
    static char *BJTnNames[7] = {
 "_rc",
 "_rb",
 "_re",
 "_ic",
 "_ib",
 "_1overf",
 ""
    };
    for (model=firstModel; model != ((void *)0); model=model->BJTnextModel) {
 for (inst=model->BJTinstances; inst != ((void *)0);
  inst=inst->BJTnextInstance) {
     if (inst->BJTowner != ARCHme) continue;
     switch (operation) {
     case 1:
  if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) {
      switch (mode) {
      case 1:
   for (i=0; i < 7; i++) {
       (void)sprintf(name,"onoise_%s%s",
    inst->BJTname,BJTnNames[i]);
   data->namelist = (IFuid *)
    trealloc((char *)data->namelist,
    (data->numPlots + 1)*sizeof(IFuid));
   if (!data->namelist) return(8);
   (*(SPfrontEnd->IFnewUid))(ckt,
       &(data->namelist[data->numPlots++]),
       (IFuid)((void *)0),name,0x20,(void **)((void *)0));
   }
   break;
      case 2:
   for (i=0; i < 7; i++) {
       (void)sprintf(name,"onoise_total_%s%s",
    inst->BJTname,BJTnNames[i]);
   data->namelist = (IFuid *)
    trealloc((char *)data->namelist,
    (data->numPlots + 1)*sizeof(IFuid));
   if (!data->namelist) return(8);
   (*(SPfrontEnd->IFnewUid))(ckt,
       &(data->namelist[data->numPlots++]),
       (IFuid)((void *)0),name,0x20,(void **)((void *)0));
       (void)sprintf(name,"inoise_total_%s%s",
    inst->BJTname,BJTnNames[i]);
data->namelist = (IFuid *)trealloc((char *)data->namelist,(data->numPlots + 1)*sizeof(IFuid));
if (!data->namelist) return(8);
  (*(SPfrontEnd->IFnewUid))(ckt,
   &(data->namelist[data->numPlots++]),
   (IFuid)((void *)0),name,0x20,(void **)((void *)0));
   }
   break;
      }
  }
  break;
     case 2:
  switch (mode) {
  case 1:
      NevalSrc(&noizDens[0],&lnNdens[0],
     ckt,2,inst->BJTcolPrimeNode,inst->BJTcolNode,
     model->BJTcollectorConduct * inst->BJTarea * inst->BJTm);
      NevalSrc(&noizDens[1],&lnNdens[1],
     ckt,2,inst->BJTbasePrimeNode,inst->BJTbaseNode,
     *(ckt->CKTstates[0] + inst->BJTstate+16) * inst->BJTm);
      NevalSrc(&noizDens[2],&lnNdens[2],
     ckt,2,inst->BJTemitPrimeNode,inst->BJTemitNode,
     model->BJTemitterConduct * inst->BJTarea * inst-> BJTm);
      NevalSrc(&noizDens[3],&lnNdens[3],
            ckt,1,inst->BJTcolPrimeNode, inst->BJTemitPrimeNode,
     *(ckt->CKTstates[0] + inst->BJTstate+2) * inst->BJTm);
      NevalSrc(&noizDens[4],&lnNdens[4],
     ckt,1,inst->BJTbasePrimeNode, inst->BJTemitPrimeNode,
     *(ckt->CKTstates[0] + inst->BJTstate+3) * inst->BJTm);
      NevalSrc(&noizDens[5],(double*)((void *)0),ckt,
     3,inst->BJTbasePrimeNode, inst->BJTemitPrimeNode,
     (double)0.0);
      noizDens[5] *= inst->BJTm * model->BJTfNcoef *
     exp(model->BJTfNexp *
     log(((fabs(*(ckt->CKTstates[0] + inst->BJTstate+3))) > (1E-38) ? (fabs(*(ckt->CKTstates[0] + inst->BJTstate+3))) : (1E-38)))) /
     data->freq;
      lnNdens[5] =
     log(((noizDens[5]) > (1E-38) ? (noizDens[5]) : (1E-38)));
      noizDens[6] = noizDens[0] +
          noizDens[1] +
          noizDens[2] +
          noizDens[3] +
          noizDens[4] +
          noizDens[5];
      lnNdens[6] =
     log(noizDens[6]);
      *OnDens += noizDens[6];
      if (data->delFreq == 0.0) {
   for (i=0; i < 7; i++) {
       inst->BJTnVar[0][i] = lnNdens[i];
   }
   if (data->freq == ((NOISEAN*)ckt->CKTcurJob)->NstartFreq) {
       for (i=0; i < 7; i++) {
    inst->BJTnVar[1][i] = 0.0;
    inst->BJTnVar[2][i] = 0.0;
       }
   }
      } else {
   for (i=0; i < 7; i++) {
       if (i != 6) {
    tempOnoise = Nintegrate(noizDens[i], lnNdens[i],
          inst->BJTnVar[0][i], data);
    tempInoise = Nintegrate(noizDens[i] * data->GainSqInv ,
          lnNdens[i] + data->lnGainInv,
          inst->BJTnVar[0][i] + data->lnGainInv,
          data);
    inst->BJTnVar[0][i] = lnNdens[i];
    data->outNoiz += tempOnoise;
    data->inNoise += tempInoise;
    if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) {
        inst->BJTnVar[1][i] += tempOnoise;
        inst->BJTnVar[1][6] += tempOnoise;
        inst->BJTnVar[2][i] += tempInoise;
        inst->BJTnVar[2][6] += tempInoise;
                                }
       }
   }
      }
      if (data->prtSummary) {
   for (i=0; i < 7; i++) {
       data->outpVector[data->outNumber++] = noizDens[i];
   }
      }
      break;
  case 2:
      if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) {
   for (i=0; i < 7; i++) {
       data->outpVector[data->outNumber++] = inst->BJTnVar[1][i];
       data->outpVector[data->outNumber++] = inst->BJTnVar[2][i];
   }
      }
      break;
  }
  break;
     case 3:
  return (0);
  break;
     }
 }
    }
return(0);
}

canonical_original_code:
int BJTnoise(int mode, int operation, struct sGENmodel *genmodel, struct CKTcircuit *ckt, struct Ndata *data, double *OnDens)
{
    struct sBJTmodel *firstModel = (BJTmodel *) genmodel;
    struct sBJTmodel *model;
    struct sBJTinstance *inst;
    char name[64];
    double tempOnoise;
    double tempInoise;
    double noizDens[7];
    double lnNdens[7];
    int i;
    static char *BJTnNames[7] = {
 "_rc",
 "_rb",
 "_re",
 "_ic",
 "_ib",
 "_1overf",
 ""
    };
    for (model=firstModel; model != ((void *)0); model=model->BJTnextModel) {
 for (inst=model->BJTinstances; inst != ((void *)0);
  inst=inst->BJTnextInstance) {
     if (inst->BJTowner != ARCHme) continue;
     switch (operation) {
     case 1:
  if (((struct NOISEAN *)ckt->CKTcurJob)->NStpsSm != 0) {
      switch (mode) {
      case 1:
   for (i=0; i < 7; i++) {
       (void)sprintf(name,"onoise_%s%s",
    inst->BJTname,BJTnNames[i]);
   data->namelist = (char **)
    trealloc((char *)data->namelist,
    (data->numPlots + 1)*sizeof(IFuid));
   if (!data->namelist) return(8);
   (*(SPfrontEnd->IFnewUid))(ckt,
       &(data->namelist[data->numPlots++]),
       (IFuid)((void *)0),name,0x20,(void **)((void *)0));
   }
   break;
      case 2:
   for (i=0; i < 7; i++) {
       (void)sprintf(name,"onoise_total_%s%s",
    inst->BJTname,BJTnNames[i]);
   data->namelist = (char **)
    trealloc((char *)data->namelist,
    (data->numPlots + 1)*sizeof(IFuid));
   if (!data->namelist) return(8);
   (*(SPfrontEnd->IFnewUid))(ckt,
       &(data->namelist[data->numPlots++]),
       (IFuid)((void *)0),name,0x20,(void **)((void *)0));
       (void)sprintf(name,"inoise_total_%s%s",
    inst->BJTname,BJTnNames[i]);
data->namelist = (char **)trealloc((char *)data->namelist,(data->numPlots + 1)*sizeof(IFuid));
if (!data->namelist) return(8);
  (*(SPfrontEnd->IFnewUid))(ckt,
   &(data->namelist[data->numPlots++]),
   (IFuid)((void *)0),name,0x20,(void **)((void *)0));
   }
   break;
      }
  }
  break;
     case 2:
  switch (mode) {
  case 1:
      NevalSrc(&noizDens[0],&lnNdens[0],
     ckt,2,inst->BJTcolPrimeNode,inst->BJTcolNode,
     model->BJTcollectorConduct * inst->BJTarea * inst->BJTm);
      NevalSrc(&noizDens[1],&lnNdens[1],
     ckt,2,inst->BJTbasePrimeNode,inst->BJTbaseNode,
     *(ckt->CKTstates[0] + inst->BJTstate+16) * inst->BJTm);
      NevalSrc(&noizDens[2],&lnNdens[2],
     ckt,2,inst->BJTemitPrimeNode,inst->BJTemitNode,
     model->BJTemitterConduct * inst->BJTarea * inst-> BJTm);
      NevalSrc(&noizDens[3],&lnNdens[3],
            ckt,1,inst->BJTcolPrimeNode, inst->BJTemitPrimeNode,
     *(ckt->CKTstates[0] + inst->BJTstate+2) * inst->BJTm);
      NevalSrc(&noizDens[4],&lnNdens[4],
     ckt,1,inst->BJTbasePrimeNode, inst->BJTemitPrimeNode,
     *(ckt->CKTstates[0] + inst->BJTstate+3) * inst->BJTm);
      NevalSrc(&noizDens[5],(double *)((void *)0),ckt,
     3,inst->BJTbasePrimeNode, inst->BJTemitPrimeNode,
     (double)0.0);
      noizDens[5] *= inst->BJTm * model->BJTfNcoef *
     exp(model->BJTfNexp *
     log(((fabs(*(ckt->CKTstates[0] + inst->BJTstate+3))) > (1E-38) ? (fabs(*(ckt->CKTstates[0] + inst->BJTstate+3))) : (1E-38)))) /
     data->freq;
      lnNdens[5] =
     log(((noizDens[5]) > (1E-38) ? (noizDens[5]) : (1E-38)));
      noizDens[6] = noizDens[0] +
          noizDens[1] +
          noizDens[2] +
          noizDens[3] +
          noizDens[4] +
          noizDens[5];
      lnNdens[6] =
     log(noizDens[6]);
      *OnDens += noizDens[6];
      if (data->delFreq == 0.0) {
   for (i=0; i < 7; i++) {
       inst->BJTnVar[0][i] = lnNdens[i];
   }
   if (data->freq == ((struct NOISEAN *)ckt->CKTcurJob)->NstartFreq) {
       for (i=0; i < 7; i++) {
    inst->BJTnVar[1][i] = 0.0;
    inst->BJTnVar[2][i] = 0.0;
       }
   }
      } else {
   for (i=0; i < 7; i++) {
       if (i != 6) {
    tempOnoise = Nintegrate(noizDens[i], lnNdens[i],
          inst->BJTnVar[0][i], data);
    tempInoise = Nintegrate(noizDens[i] * data->GainSqInv ,
          lnNdens[i] + data->lnGainInv,
          inst->BJTnVar[0][i] + data->lnGainInv,
          data);
    inst->BJTnVar[0][i] = lnNdens[i];
    data->outNoiz += tempOnoise;
    data->inNoise += tempInoise;
    if (((struct NOISEAN *)ckt->CKTcurJob)->NStpsSm != 0) {
        inst->BJTnVar[1][i] += tempOnoise;
        inst->BJTnVar[1][6] += tempOnoise;
        inst->BJTnVar[2][i] += tempInoise;
        inst->BJTnVar[2][6] += tempInoise;
                                }
       }
   }
      }
      if (data->prtSummary) {
   for (i=0; i < 7; i++) {
       data->outpVector[data->outNumber++] = noizDens[i];
   }
      }
      break;
  case 2:
      if (((struct NOISEAN *)ckt->CKTcurJob)->NStpsSm != 0) {
   for (i=0; i < 7; i++) {
       data->outpVector[data->outNumber++] = inst->BJTnVar[1][i];
       data->outpVector[data->outNumber++] = inst->BJTnVar[2][i];
   }
      }
      break;
  }
  break;
     case 3:
  return (0);
  break;
     }
 }
    }
return(0);
}

variable_types: mode int

variable_types: operation int

variable_types: struct sGENmodel { int GENmodType; struct sGENmodel *GENnextModel; struct sGENinstance { struct sGENmodel *GENmodPtr; struct sGENinstance *GENnextInstance; char *GENname; int GENowner; int GENstate; int GENnode1; int GENnode2; int GENnode3; int GENnode4; int GENnode5; int GENnode6; int GENnode7; } *GENinstances; char *GENmodName; } *

variable_types: struct CKTcircuit { struct sGENmodel **CKThead; struct STATistics { int STATnumIter; int STATtranIter; int STAToldIter; int STATtimePts; int STATaccepted; int STATrejected; double STATtotAnalTime; double STATloadTime; double STATdecompTime; double STATsolveTime; double STATreorderTime; double STATcombineTime; double STATsyncTime; double STATtranTime; double STATtranDecompTime; double STATtranSolveTime; double STATtranLoadTime; double STATtranTruncTime; double STATtranCombTime; double STATtranSyncTime; double STATacTime; double STATacDecompTime; double STATacSolveTime; double STATacLoadTime; double STATacCombTime; double STATacSyncTime; } *CKTstat; double *CKTstates[8]; double CKTtime; double CKTdelta; double CKTdeltaOld[7]; double CKTtemp; double CKTnomTemp; double CKTvt; double CKTag[7]; double CKTagp[7]; int CKTorder; int CKTmaxOrder; int CKTintegrateMethod; void *CKTmatrix; int CKTniState; double *CKTrhs; double *CKTrhsOld; double *CKTrhsSpare; double *CKTirhs; double *CKTirhsOld; double *CKTirhsSpare; double *CKTpred; double *CKTsols[8]; double *CKTrhsOp; double *CKTsenRhs; double *CKTseniRhs; int CKTmaxEqNum; int CKTcurrentAnalysis; struct sCKTnode { char *name; int type; int number; double ic; double nodeset; double *ptr; struct sCKTnode *next; unsigned int icGiven; unsigned int nsGiven; } *CKTnodes; struct sCKTnode *CKTlastNode; int CKTnumStates; long CKTmode; int CKTbypass; int CKTdcMaxIter; int CKTdcTrcvMaxIter; int CKTtranMaxIter; int CKTbreakSize; int CKTbreak; double CKTsaveDelta; double CKTminBreak; double *CKTbreaks; double CKTabstol; double CKTpivotAbsTol; double CKTpivotRelTol; double CKTreltol; double CKTchgtol; double CKTvoltTol; double CKTgmin; double CKTgshunt; double CKTdelmin; double CKTtrtol; double CKTfinalTime; double CKTstep; double CKTmaxStep; double CKTinitTime; double CKTomega; double CKTsrcFact; double CKTdiagGmin; int CKTnumSrcSteps; int CKTnumGminSteps; double CKTgminFactor; int CKTnoncon; double CKTdefaultMosM; double CKTdefaultMosL; double CKTdefaultMosW; double CKTdefaultMosAD; double CKTdefaultMosAS; unsigned int CKThadNodeset; unsigned int CKTfixLimit; unsigned int CKTnoOpIter; unsigned int CKTisSetup; struct sJOB { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; } *CKTcurJob; struct SENstruct { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; int SENnumVal; char **SENdevices; char **SENparmNames; unsigned int SENinitflag; unsigned int SENicflag; unsigned int SENstatus; unsigned int SENacpertflag; int SENmode; int SENparms; double SENpertfac; double **SEN_Sap; double **SEN_RHS; double **SEN_iRHS; int SENsize; void *SEN_Jacmat; double *SEN_parmVal; char **SEN_parmName; } *CKTsenInfo; double *CKTtimePoints; double *CKTdeltaList; int CKTtimeListSize; int CKTtimeIndex; int CKTsizeIncr; unsigned int CKTtryToCompact; unsigned int CKTbadMos3; unsigned int CKTkeepOpInfo; unsigned int CKTcopyNodesets; unsigned int CKTnodeDamping; double CKTabsDv; double CKTrelDv; int CKTtroubleNode; struct sGENinstance *CKTtroubleElt; } *

variable_types: struct Ndata { double freq; double lstFreq; double delFreq; double outNoiz; double inNoise; double GainSqInv; double lnGainInv; double lnFreq; double lnLastFreq; double delLnFreq; int outNumber; int numPlots; unsigned int prtSummary; double *outpVector; void *NplotPtr; char **namelist; } *

variable_types:
OnDens
double *

variable_types: struct sBJTmodel { int BJTmodType; struct sBJTmodel *BJTnextModel; struct sBJTinstance { struct sBJTmodel *BJTmodPtr; struct sBJTinstance *BJTnextInstance; char *BJTname; int BJTowner; int BJTstate; int BJTcolNode; int BJTbaseNode; int BJTemitNode; int BJTsubstNode; int BJTcolPrimeNode; int BJTbasePrimeNode; int BJTemitPrimeNode; double BJTarea; double BJTareab; double BJTareac; double BJTm; double BJTicVBE; double BJTicVCE; double BJTtemp; double BJTdtemp; double BJTtSatCur; double BJTtBetaF; double BJTtBetaR; double BJTtBEleakCur; double BJTtBCleakCur; double BJTtBEcap; double BJTtBEpot; double BJTtBCcap; double BJTtBCpot; double BJTtDepCap; double BJTtf1; double BJTtf4; double BJTtf5; double BJTtVcrit; double *BJTcolColPrimePtr; double *BJTbaseBasePrimePtr; double *BJTemitEmitPrimePtr; double *BJTcolPrimeColPtr; double *BJTcolPrimeBasePrimePtr; double *BJTcolPrimeEmitPrimePtr; double *BJTbasePrimeBasePtr; double *BJTbasePrimeColPrimePtr; double *BJTbasePrimeEmitPrimePtr; double *BJTemitPrimeEmitPtr; double *BJTemitPrimeColPrimePtr; double *BJTemitPrimeBasePrimePtr; double *BJTcolColPtr; double *BJTbaseBasePtr; double *BJTemitEmitPtr; double *BJTcolPrimeColPrimePtr; double *BJTbasePrimeBasePrimePtr; double *BJTemitPrimeEmitPrimePtr; double *BJTsubstSubstPtr; double *BJTcolPrimeSubstPtr; double *BJTsubstColPrimePtr; double *BJTbaseColPrimePtr; double *BJTcolPrimeBasePtr; unsigned int BJToff; unsigned int BJTtempGiven; unsigned int BJTdtempGiven; unsigned int BJTareaGiven; unsigned int BJTareabGiven; unsigned int BJTareacGiven; unsigned int BJTmGiven; unsigned int BJTicVBEGiven; unsigned int BJTicVCEGiven; unsigned int BJTsenPertFlag; int BJTsenParmNo; double BJTcapbe; double BJTcapbc; double BJTcapcs; double BJTcapbx; double *BJTsens; double BJTdCoeffs[65]; double BJTnVar[3][7]; } *BJTinstances; char *BJTmodName; int BJTtype; double BJTtnom; double BJTsatCur; double BJTbetaF; double BJTemissionCoeffF; double BJTearlyVoltF; double BJTrollOffF; double BJTleakBEcurrent; double BJTc2; double BJTleakBEemissionCoeff; double BJTbetaR; double BJTemissionCoeffR; double BJTearlyVoltR; double BJTrollOffR; double BJTleakBCcurrent; double BJTc4; double BJTleakBCemissionCoeff; double BJTbaseResist; double BJTbaseCurrentHalfResist; double BJTminBaseResist; double BJTemitterResist; double BJTcollectorResist; double BJTdepletionCapBE; double BJTpotentialBE; double BJTjunctionExpBE; double BJTtransitTimeF; double BJTtransitTimeBiasCoeffF; double BJTtransitTimeFVBC; double BJTtransitTimeHighCurrentF; double BJTexcessPhase; double BJTdepletionCapBC; double BJTpotentialBC; double BJTjunctionExpBC; double BJTbaseFractionBCcap; double BJTtransitTimeR; double BJTcapCS; double BJTpotentialSubstrate; double BJTexponentialSubstrate; double BJTbetaExp; double BJTenergyGap; double BJTtempExpIS; double BJTdepletionCapCoeff; double BJTfNcoef; double BJTfNexp; double BJTinvEarlyVoltF; double BJTinvEarlyVoltR; double BJTinvRollOffF; double BJTinvRollOffR; double BJTcollectorConduct; double BJTemitterConduct; double BJTtransitTimeVBCFactor; double BJTexcessPhaseFactor; double BJTf2; double BJTf3; double BJTf6; double BJTf7; unsigned int BJTtnomGiven; unsigned int BJTsatCurGiven; unsigned int BJTbetaFGiven; unsigned int BJTemissionCoeffFGiven; unsigned int BJTearlyVoltFGiven; unsigned int BJTrollOffFGiven; unsigned int BJTleakBEcurrentGiven; unsigned int BJTc2Given; unsigned int BJTleakBEemissionCoeffGiven; unsigned int BJTbetaRGiven; unsigned int BJTemissionCoeffRGiven; unsigned int BJTearlyVoltRGiven; unsigned int BJTrollOffRGiven; unsigned int BJTleakBCcurrentGiven; unsigned int BJTc4Given; unsigned int BJTleakBCemissionCoeffGiven; unsigned int BJTbaseResistGiven; unsigned int BJTbaseCurrentHalfResistGiven; unsigned int BJTminBaseResistGiven; unsigned int BJTemitterResistGiven; unsigned int BJTcollectorResistGiven; unsigned int BJTdepletionCapBEGiven; unsigned int BJTpotentialBEGiven; unsigned int BJTjunctionExpBEGiven; unsigned int BJTtransitTimeFGiven; unsigned int BJTtransitTimeBiasCoeffFGiven; unsigned int BJTtransitTimeFVBCGiven; unsigned int BJTtransitTimeHighCurrentFGiven; unsigned int BJTexcessPhaseGiven; unsigned int BJTdepletionCapBCGiven; unsigned int BJTpotentialBCGiven; unsigned int BJTjunctionExpBCGiven; unsigned int BJTbaseFractionBCcapGiven; unsigned int BJTtransitTimeRGiven; unsigned int BJTcapCSGiven; unsigned int BJTpotentialSubstrateGiven; unsigned int BJTexponentialSubstrateGiven; unsigned int BJTbetaExpGiven; unsigned int BJTenergyGapGiven; unsigned int BJTtempExpISGiven; unsigned int BJTdepletionCapCoeffGiven; unsigned int BJTfNcoefGiven; unsigned int BJTfNexpGiven; } *

variable_types: struct sBJTinstance { struct sBJTmodel { int BJTmodType; struct sBJTmodel *BJTnextModel; struct sBJTinstance *BJTinstances; char *BJTmodName; int BJTtype; double BJTtnom; double BJTsatCur; double BJTbetaF; double BJTemissionCoeffF; double BJTearlyVoltF; double BJTrollOffF; double BJTleakBEcurrent; double BJTc2; double BJTleakBEemissionCoeff; double BJTbetaR; double BJTemissionCoeffR; double BJTearlyVoltR; double BJTrollOffR; double BJTleakBCcurrent; double BJTc4; double BJTleakBCemissionCoeff; double BJTbaseResist; double BJTbaseCurrentHalfResist; double BJTminBaseResist; double BJTemitterResist; double BJTcollectorResist; double BJTdepletionCapBE; double BJTpotentialBE; double BJTjunctionExpBE; double BJTtransitTimeF; double BJTtransitTimeBiasCoeffF; double BJTtransitTimeFVBC; double BJTtransitTimeHighCurrentF; double BJTexcessPhase; double BJTdepletionCapBC; double BJTpotentialBC; double BJTjunctionExpBC; double BJTbaseFractionBCcap; double BJTtransitTimeR; double BJTcapCS; double BJTpotentialSubstrate; double BJTexponentialSubstrate; double BJTbetaExp; double BJTenergyGap; double BJTtempExpIS; double BJTdepletionCapCoeff; double BJTfNcoef; double BJTfNexp; double BJTinvEarlyVoltF; double BJTinvEarlyVoltR; double BJTinvRollOffF; double BJTinvRollOffR; double BJTcollectorConduct; double BJTemitterConduct; double BJTtransitTimeVBCFactor; double BJTexcessPhaseFactor; double BJTf2; double BJTf3; double BJTf6; double BJTf7; unsigned int BJTtnomGiven; unsigned int BJTsatCurGiven; unsigned int BJTbetaFGiven; unsigned int BJTemissionCoeffFGiven; unsigned int BJTearlyVoltFGiven; unsigned int BJTrollOffFGiven; unsigned int BJTleakBEcurrentGiven; unsigned int BJTc2Given; unsigned int BJTleakBEemissionCoeffGiven; unsigned int BJTbetaRGiven; unsigned int BJTemissionCoeffRGiven; unsigned int BJTearlyVoltRGiven; unsigned int BJTrollOffRGiven; unsigned int BJTleakBCcurrentGiven; unsigned int BJTc4Given; unsigned int BJTleakBCemissionCoeffGiven; unsigned int BJTbaseResistGiven; unsigned int BJTbaseCurrentHalfResistGiven; unsigned int BJTminBaseResistGiven; unsigned int BJTemitterResistGiven; unsigned int BJTcollectorResistGiven; unsigned int BJTdepletionCapBEGiven; unsigned int BJTpotentialBEGiven; unsigned int BJTjunctionExpBEGiven; unsigned int BJTtransitTimeFGiven; unsigned int BJTtransitTimeBiasCoeffFGiven; unsigned int BJTtransitTimeFVBCGiven; unsigned int BJTtransitTimeHighCurrentFGiven; unsigned int BJTexcessPhaseGiven; unsigned int BJTdepletionCapBCGiven; unsigned int BJTpotentialBCGiven; unsigned int BJTjunctionExpBCGiven; unsigned int BJTbaseFractionBCcapGiven; unsigned int BJTtransitTimeRGiven; unsigned int BJTcapCSGiven; unsigned int BJTpotentialSubstrateGiven; unsigned int BJTexponentialSubstrateGiven; unsigned int BJTbetaExpGiven; unsigned int BJTenergyGapGiven; unsigned int BJTtempExpISGiven; unsigned int BJTdepletionCapCoeffGiven; unsigned int BJTfNcoefGiven; unsigned int BJTfNexpGiven; } *BJTmodPtr; struct sBJTinstance *BJTnextInstance; char *BJTname; int BJTowner; int BJTstate; int BJTcolNode; int BJTbaseNode; int BJTemitNode; int BJTsubstNode; int BJTcolPrimeNode; int BJTbasePrimeNode; int BJTemitPrimeNode; double BJTarea; double BJTareab; double BJTareac; double BJTm; double BJTicVBE; double BJTicVCE; double BJTtemp; double BJTdtemp; double BJTtSatCur; double BJTtBetaF; double BJTtBetaR; double BJTtBEleakCur; double BJTtBCleakCur; double BJTtBEcap; double BJTtBEpot; double BJTtBCcap; double BJTtBCpot; double BJTtDepCap; double BJTtf1; double BJTtf4; double BJTtf5; double BJTtVcrit; double *BJTcolColPrimePtr; double *BJTbaseBasePrimePtr; double *BJTemitEmitPrimePtr; double *BJTcolPrimeColPtr; double *BJTcolPrimeBasePrimePtr; double *BJTcolPrimeEmitPrimePtr; double *BJTbasePrimeBasePtr; double *BJTbasePrimeColPrimePtr; double *BJTbasePrimeEmitPrimePtr; double *BJTemitPrimeEmitPtr; double *BJTemitPrimeColPrimePtr; double *BJTemitPrimeBasePrimePtr; double *BJTcolColPtr; double *BJTbaseBasePtr; double *BJTemitEmitPtr; double *BJTcolPrimeColPrimePtr; double *BJTbasePrimeBasePrimePtr; double *BJTemitPrimeEmitPrimePtr; double *BJTsubstSubstPtr; double *BJTcolPrimeSubstPtr; double *BJTsubstColPrimePtr; double *BJTbaseColPrimePtr; double *BJTcolPrimeBasePtr; unsigned int BJToff; unsigned int BJTtempGiven; unsigned int BJTdtempGiven; unsigned int BJTareaGiven; unsigned int BJTareabGiven; unsigned int BJTareacGiven; unsigned int BJTmGiven; unsigned int BJTicVBEGiven; unsigned int BJTicVCEGiven; unsigned int BJTsenPertFlag; int BJTsenParmNo; double BJTcapbe; double BJTcapbc; double BJTcapcs; double BJTcapbx; double *BJTsens; double BJTdCoeffs[65]; double BJTnVar[3][7]; } *

variable_types:
name
char [64]

variable_types: tempOnoise double

variable_types: tempInoise double

variable_types:
noizDens
double [7]

variable_types:
lnNdens
double [7]

variable_types: i int

variable_types:
BJTnNames
char *[7]

return_type: int

user_defined_types: struct CKTcircuit { struct sGENmodel **CKThead; struct STATistics *CKTstat; double *CKTstates[8]; double CKTtime; double CKTdelta; double CKTdeltaOld[7]; double CKTtemp; double CKTnomTemp; double CKTvt; double CKTag[7]; double CKTagp[7]; int CKTorder; int CKTmaxOrder; int CKTintegrateMethod; void *CKTmatrix; int CKTniState; double *CKTrhs; double *CKTrhsOld; double *CKTrhsSpare; double *CKTirhs; double *CKTirhsOld; double *CKTirhsSpare; double *CKTpred; double *CKTsols[8]; double *CKTrhsOp; double *CKTsenRhs; double *CKTseniRhs; int CKTmaxEqNum; int CKTcurrentAnalysis; struct sCKTnode *CKTnodes; struct sCKTnode *CKTlastNode; int CKTnumStates; long CKTmode; int CKTbypass; int CKTdcMaxIter; int CKTdcTrcvMaxIter; int CKTtranMaxIter; int CKTbreakSize; int CKTbreak; double CKTsaveDelta; double CKTminBreak; double *CKTbreaks; double CKTabstol; double CKTpivotAbsTol; double CKTpivotRelTol; double CKTreltol; double CKTchgtol; double CKTvoltTol; double CKTgmin; double CKTgshunt; double CKTdelmin; double CKTtrtol; double CKTfinalTime; double CKTstep; double CKTmaxStep; double CKTinitTime; double CKTomega; double CKTsrcFact; double CKTdiagGmin; int CKTnumSrcSteps; int CKTnumGminSteps; double CKTgminFactor; int CKTnoncon; double CKTdefaultMosM; double CKTdefaultMosL; double CKTdefaultMosW; double CKTdefaultMosAD; double CKTdefaultMosAS; unsigned int CKThadNodeset; unsigned int CKTfixLimit; unsigned int CKTnoOpIter; unsigned int CKTisSetup; struct sJOB *CKTcurJob; struct SENstruct *CKTsenInfo; double *CKTtimePoints; double *CKTdeltaList; int CKTtimeListSize; int CKTtimeIndex; int CKTsizeIncr; unsigned int CKTtryToCompact; unsigned int CKTbadMos3; unsigned int CKTkeepOpInfo; unsigned int CKTcopyNodesets; unsigned int CKTnodeDamping; double CKTabsDv; double CKTrelDv; int CKTtroubleNode; struct sGENinstance *CKTtroubleElt; }

user_defined_types: struct NOISEAN { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; void *output; void *outputRef; char *input; double NstartFreq; double NstopFreq; double NfreqDelta; double NsavFstp; double NsavOnoise; double NsavInoise; int NstpType; int NnumSteps; int NStpsSm; }