int BSIM4RdseffGeo(nf, geo, rgeo, minSD, Weffcj, Rsh, DMCG, DMCI, DMDG, Type,
                   Rtot)
int geo, rgeo, minSD, Type;
double nf, Weffcj, Rsh, DMCG, DMCI, DMDG;
double *Rtot;
{
  double Rint, Rend = 0.0;
  double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0;
  if (geo < 9) {
    BSIM4NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS);
    if (Type == 1) {
      if (nuIntS == 0.0)
        Rint = 0.0;
      else
        Rint = Rsh * DMCG / (Weffcj * nuIntS);
    } else {
      if (nuIntD == 0.0)
        Rint = 0.0;
      else
        Rint = Rsh * DMCG / (Weffcj * nuIntD);
    }
  }
  switch (geo) {
  case 0:
    if (Type == 1)
      BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend);
    else
      BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend);
    break;
  case 1:
    if (Type == 1)
      BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend);
    else
      BSIM4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend);
    break;
  case 2:
    if (Type == 1)
      BSIM4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend);
    else
      BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend);
    break;
  case 3:
    if (Type == 1)
      BSIM4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend);
    else
      BSIM4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend);
    break;
  case 4:
    if (Type == 1)
      BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend);
    else
      Rend = Rsh * DMDG / Weffcj;
    break;
  case 5:
    if (Type == 1)
      BSIM4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend);
    else
      Rend = Rsh * DMDG / (Weffcj * nuEndD);
    break;
  case 6:
    if (Type == 1)
      Rend = Rsh * DMDG / Weffcj;
    else
      BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend);
    break;
  case 7:
    if (Type == 1)
      Rend = Rsh * DMDG / (Weffcj * nuEndS);
    else
      BSIM4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend);
    break;
  case 8:
    Rend = Rsh * DMDG / Weffcj;
    break;
  case 9:
    if (Type == 1) {
      Rend = 0.5 * Rsh * DMCG / Weffcj;
      if (nf == 2.0)
        Rint = 0.0;
      else
        Rint = Rsh * DMCG / (Weffcj * (nf - 2.0));
    } else {
      Rend = 0.0;
      Rint = Rsh * DMCG / (Weffcj * nf);
    }
    break;
  case 10:
    if (Type == 1) {
      Rend = 0.0;
      Rint = Rsh * DMCG / (Weffcj * nf);
    } else {
      Rend = 0.5 * Rsh * DMCG / Weffcj;
      ;
      if (nf == 2.0)
        Rint = 0.0;
      else
        Rint = Rsh * DMCG / (Weffcj * (nf - 2.0));
    }
    break;
  default:
    printf("Warning: Specified GEO = %d not matched\n", geo);
  }
  if (Rint <= 0.0)
    *Rtot = Rend;
  else if (Rend <= 0.0)
    *Rtot = Rint;
  else
    *Rtot = Rint * Rend / (Rint + Rend);
  if (*Rtot == 0.0)
    printf("Warning: Zero resistance returned from RdseffGeo\n");
  return 0;
}


x86 assembly (clang, -O0):
<BSIM4RdseffGeo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  %xmm4,-0x38(%rbp)
movsd  %xmm5,-0x40(%rbp)
mov    %ecx,-0x44(%rbp)
mov    %r8,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
cmpl   $0x9,-0xc(%rbp)
jge    1267 <BSIM4RdseffGeo+0x127>
movsd  -0x8(%rbp),%xmm0
mov    -0x14(%rbp),%edi
lea    -0x68(%rbp),%rsi
lea    -0x70(%rbp),%rdx
lea    -0x78(%rbp),%rcx
lea    -0x80(%rbp),%r8
mov    $0x1,%al
call   1030 <BSIM4NumFingerDiff@plt>
cmpl   $0x1,-0x44(%rbp)
jne    121b <BSIM4RdseffGeo+0xdb>
movsd  -0x78(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11f9 <BSIM4RdseffGeo+0xb9>
jp     11f9 <BSIM4RdseffGeo+0xb9>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1216 <BSIM4RdseffGeo+0xd6>
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1262 <BSIM4RdseffGeo+0x122>
movsd  -0x68(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1240 <BSIM4RdseffGeo+0x100>
jp     1240 <BSIM4RdseffGeo+0x100>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    125d <BSIM4RdseffGeo+0x11d>
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1262 <BSIM4RdseffGeo+0x122>
jmp    1267 <BSIM4RdseffGeo+0x127>
mov    -0xc(%rbp),%eax
mov    %rax,-0x88(%rbp)
sub    $0xa,%rax
ja     1744 <BSIM4RdseffGeo+0x604>
mov    -0x88(%rbp),%rax
lea    0xd87(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpl   $0x1,-0x44(%rbp)
jne    12d2 <BSIM4RdseffGeo+0x192>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x80(%rbp),%xmm5
mov    -0x10(%rbp),%edi
mov    $0x1,%esi
lea    -0x60(%rbp),%rdx
mov    $0x6,%al
call   1060 <BSIM4RdsEndIso@plt>
jmp    1300 <BSIM4RdseffGeo+0x1c0>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x70(%rbp),%xmm5
mov    -0x10(%rbp),%edi
xor    %esi,%esi
lea    -0x60(%rbp),%rdx
mov    $0x6,%al
call   1060 <BSIM4RdsEndIso@plt>
jmp    1755 <BSIM4RdseffGeo+0x615>
cmpl   $0x1,-0x44(%rbp)
jne    1345 <BSIM4RdseffGeo+0x205>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x80(%rbp),%xmm5
mov    -0x10(%rbp),%edi
mov    $0x1,%esi
lea    -0x60(%rbp),%rdx
mov    $0x6,%al
call   1060 <BSIM4RdsEndIso@plt>
jmp    1373 <BSIM4RdseffGeo+0x233>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x70(%rbp),%xmm5
mov    -0x10(%rbp),%edi
xor    %esi,%esi
lea    -0x60(%rbp),%rdx
mov    $0x6,%al
call   1050 <BSIM4RdsEndSha@plt>
jmp    1755 <BSIM4RdseffGeo+0x615>
cmpl   $0x1,-0x44(%rbp)
jne    13b8 <BSIM4RdseffGeo+0x278>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x80(%rbp),%xmm5
mov    -0x10(%rbp),%edi
mov    $0x1,%esi
lea    -0x60(%rbp),%rdx
mov    $0x6,%al
call   1050 <BSIM4RdsEndSha@plt>
jmp    13e6 <BSIM4RdseffGeo+0x2a6>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x70(%rbp),%xmm5
mov    -0x10(%rbp),%edi
xor    %esi,%esi
lea    -0x60(%rbp),%rdx
mov    $0x6,%al
call   1060 <BSIM4RdsEndIso@plt>
jmp    1755 <BSIM4RdseffGeo+0x615>
cmpl   $0x1,-0x44(%rbp)
jne    142b <BSIM4RdseffGeo+0x2eb>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x80(%rbp),%xmm5
mov    -0x10(%rbp),%edi
mov    $0x1,%esi
lea    -0x60(%rbp),%rdx
mov    $0x6,%al
call   1050 <BSIM4RdsEndSha@plt>
jmp    1459 <BSIM4RdseffGeo+0x319>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x70(%rbp),%xmm5
mov    -0x10(%rbp),%edi
xor    %esi,%esi
lea    -0x60(%rbp),%rdx
mov    $0x6,%al
call   1050 <BSIM4RdsEndSha@plt>
jmp    1755 <BSIM4RdseffGeo+0x615>
cmpl   $0x1,-0x44(%rbp)
jne    149e <BSIM4RdseffGeo+0x35e>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x80(%rbp),%xmm5
mov    -0x10(%rbp),%edi
mov    $0x1,%esi
lea    -0x60(%rbp),%rdx
mov    $0x6,%al
call   1060 <BSIM4RdsEndIso@plt>
jmp    14b2 <BSIM4RdseffGeo+0x372>
movsd  -0x28(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1755 <BSIM4RdseffGeo+0x615>
cmpl   $0x1,-0x44(%rbp)
jne    14f7 <BSIM4RdseffGeo+0x3b7>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x80(%rbp),%xmm5
mov    -0x10(%rbp),%edi
mov    $0x1,%esi
lea    -0x60(%rbp),%rdx
mov    $0x6,%al
call   1050 <BSIM4RdsEndSha@plt>
jmp    1514 <BSIM4RdseffGeo+0x3d4>
movsd  -0x28(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1755 <BSIM4RdseffGeo+0x615>
cmpl   $0x1,-0x44(%rbp)
jne    153c <BSIM4RdseffGeo+0x3fc>
movsd  -0x28(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    156a <BSIM4RdseffGeo+0x42a>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x70(%rbp),%xmm5
mov    -0x10(%rbp),%edi
xor    %esi,%esi
lea    -0x60(%rbp),%rdx
mov    $0x6,%al
call   1060 <BSIM4RdsEndIso@plt>
jmp    1755 <BSIM4RdseffGeo+0x615>
cmpl   $0x1,-0x44(%rbp)
jne    159b <BSIM4RdseffGeo+0x45b>
movsd  -0x28(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    15c9 <BSIM4RdseffGeo+0x489>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x70(%rbp),%xmm5
mov    -0x10(%rbp),%edi
xor    %esi,%esi
lea    -0x60(%rbp),%rdx
mov    $0x6,%al
call   1050 <BSIM4RdsEndSha@plt>
jmp    1755 <BSIM4RdseffGeo+0x615>
movsd  -0x28(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1755 <BSIM4RdseffGeo+0x615>
cmpl   $0x1,-0x44(%rbp)
jne    1669 <BSIM4RdseffGeo+0x529>
movsd  0xa0f(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0x9e6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1637 <BSIM4RdseffGeo+0x4f7>
jp     1637 <BSIM4RdseffGeo+0x4f7>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1664 <BSIM4RdseffGeo+0x524>
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  0x9ad(%rip),%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    168e <BSIM4RdseffGeo+0x54e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1755 <BSIM4RdseffGeo+0x615>
cmpl   $0x1,-0x44(%rbp)
jne    16c7 <BSIM4RdseffGeo+0x587>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    173f <BSIM4RdseffGeo+0x5ff>
movsd  0x939(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0x910(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    170d <BSIM4RdseffGeo+0x5cd>
jp     170d <BSIM4RdseffGeo+0x5cd>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    173a <BSIM4RdseffGeo+0x5fa>
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  0x8d7(%rip),%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    173f <BSIM4RdseffGeo+0x5ff>
jmp    1755 <BSIM4RdseffGeo+0x615>
mov    -0xc(%rbp),%esi
lea    0x8ee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xorps  %xmm0,%xmm0
ucomisd -0x58(%rbp),%xmm0
jb     1775 <BSIM4RdseffGeo+0x635>
movsd  -0x60(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    17ba <BSIM4RdseffGeo+0x67a>
xorps  %xmm0,%xmm0
ucomisd -0x60(%rbp),%xmm0
jb     1795 <BSIM4RdseffGeo+0x655>
movsd  -0x58(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    17b5 <BSIM4RdseffGeo+0x675>
movsd  -0x58(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
addsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    17ba <BSIM4RdseffGeo+0x67a>
mov    -0x50(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    17e3 <BSIM4RdseffGeo+0x6a3>
jp     17e3 <BSIM4RdseffGeo+0x6a3>
lea    0x889(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSIM4RdseffGeo>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %r8,%r14
mov    %ecx,%ebx
movapd %xmm5,%xmm6
mov    %esi,%r15d
mov    %edi,%ebp
movq   $0x0,0x8(%rsp)
movq   $0x0,0x50(%rsp)
movq   $0x0,0x18(%rsp)
movq   $0x0,0x48(%rsp)
movq   $0x0,0x10(%rsp)
cmp    $0x8,%edi
jg     1233 <BSIM4RdseffGeo+0xe3>
movsd  %xmm4,0x28(%rsp)
movsd  %xmm6,0x30(%rsp)
movsd  %xmm3,0x38(%rsp)
movsd  %xmm1,0x40(%rsp)
movsd  %xmm2,(%rsp)
lea    0x50(%rsp),%rsi
lea    0x18(%rsp),%rax
lea    0x48(%rsp),%rcx
lea    0x10(%rsp),%r8
movsd  %xmm0,0x20(%rsp)
mov    %edx,%edi
mov    %rax,%rdx
mov    $0x1,%al
call   1030 <BSIM4NumFingerDiff@plt>
cmp    $0x1,%ebx
jne    11ee <BSIM4RdseffGeo+0x9e>
movsd  0x48(%rsp),%xmm5
jmp    11f4 <BSIM4RdseffGeo+0xa4>
movsd  0x50(%rsp),%xmm5
xorpd  %xmm7,%xmm7
ucomisd %xmm7,%xmm5
movsd  (%rsp),%xmm2
movsd  0x40(%rsp),%xmm1
movsd  0x38(%rsp),%xmm3
movsd  0x30(%rsp),%xmm6
movsd  0x28(%rsp),%xmm4
movsd  0x20(%rsp),%xmm0
jne    1223 <BSIM4RdseffGeo+0xd3>
jnp    1233 <BSIM4RdseffGeo+0xe3>
movapd %xmm2,%xmm7
mulsd  %xmm3,%xmm7
mulsd  %xmm1,%xmm5
divsd  %xmm5,%xmm7
cmp    $0xa,%ebp
ja     1256 <BSIM4RdseffGeo+0x106>
mov    %ebp,%eax
lea    0xdd7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  %xmm7,(%rsp)
cmp    $0x1,%ebx
je     127e <BSIM4RdseffGeo+0x12e>
jmp    129d <BSIM4RdseffGeo+0x14d>
lea    0xde7(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
movsd  %xmm7,(%rsp)
call   1050 <printf@plt>
jmp    145f <BSIM4RdseffGeo+0x30f>
movsd  %xmm7,(%rsp)
cmp    $0x1,%ebx
jne    13d9 <BSIM4RdseffGeo+0x289>
movsd  0x10(%rsp),%xmm5
lea    0x8(%rsp),%rdx
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
jmp    12f5 <BSIM4RdseffGeo+0x1a5>
movsd  %xmm7,(%rsp)
cmp    $0x1,%ebx
je     12c3 <BSIM4RdseffGeo+0x173>
movsd  0x18(%rsp),%xmm5
lea    0x8(%rsp),%rdx
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
jmp    1415 <BSIM4RdseffGeo+0x2c5>
movsd  %xmm7,(%rsp)
cmp    $0x1,%ebx
jne    13d9 <BSIM4RdseffGeo+0x289>
movsd  0x10(%rsp),%xmm5
lea    0x8(%rsp),%rdx
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
jmp    132f <BSIM4RdseffGeo+0x1df>
cmp    $0x1,%ebx
jne    1351 <BSIM4RdseffGeo+0x201>
movsd  0x10(%rsp),%xmm5
lea    0x8(%rsp),%rdx
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
movsd  %xmm7,(%rsp)
movapd %xmm3,%xmm2
movapd %xmm4,%xmm3
movapd %xmm6,%xmm4
mov    %r15d,%edi
mov    $0x1,%esi
jmp    1426 <BSIM4RdseffGeo+0x2d6>
cmp    $0x1,%ebx
jne    13ee <BSIM4RdseffGeo+0x29e>
movsd  0x10(%rsp),%xmm5
lea    0x8(%rsp),%rdx
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
movsd  %xmm7,(%rsp)
movapd %xmm3,%xmm2
movapd %xmm4,%xmm3
movapd %xmm6,%xmm4
mov    %r15d,%edi
mov    $0x1,%esi
jmp    1458 <BSIM4RdseffGeo+0x308>
cmp    $0x1,%ebx
jne    13fd <BSIM4RdseffGeo+0x2ad>
mulsd  %xmm6,%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
jmp    1464 <BSIM4RdseffGeo+0x314>
cmp    $0x1,%ebx
jne    142f <BSIM4RdseffGeo+0x2df>
mulsd  %xmm6,%xmm2
mulsd  0x10(%rsp),%xmm1
jmp    1355 <BSIM4RdseffGeo+0x205>
cmp    $0x1,%ebx
jne    13bb <BSIM4RdseffGeo+0x26b>
movsd  0xc7a(%rip),%xmm4
mulsd  %xmm2,%xmm4
mulsd  %xmm3,%xmm4
divsd  %xmm1,%xmm4
movsd  %xmm4,0x8(%rsp)
ucomisd 0xc68(%rip),%xmm0
jne    13a8 <BSIM4RdseffGeo+0x258>
jnp    1494 <BSIM4RdseffGeo+0x344>
mulsd  %xmm3,%xmm2
addsd  0xc5c(%rip),%xmm0
jmp    13c8 <BSIM4RdseffGeo+0x278>
cmp    $0x1,%ebx
jne    137e <BSIM4RdseffGeo+0x22e>
movq   $0x0,0x8(%rsp)
mulsd  %xmm3,%xmm2
mulsd  %xmm1,%xmm0
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm7
jmp    1464 <BSIM4RdseffGeo+0x314>
movsd  0x18(%rsp),%xmm5
lea    0x8(%rsp),%rdx
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
jmp    1447 <BSIM4RdseffGeo+0x2f7>
mulsd  %xmm6,%xmm2
mulsd  0x18(%rsp),%xmm1
jmp    1355 <BSIM4RdseffGeo+0x205>
movsd  0x18(%rsp),%xmm5
lea    0x8(%rsp),%rdx
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
movsd  %xmm7,(%rsp)
movapd %xmm3,%xmm2
movapd %xmm4,%xmm3
movapd %xmm6,%xmm4
mov    %r15d,%edi
xor    %esi,%esi
mov    $0x6,%al
call   1070 <BSIM4RdsEndIso@plt>
jmp    145f <BSIM4RdseffGeo+0x30f>
movsd  0x18(%rsp),%xmm5
lea    0x8(%rsp),%rdx
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
movsd  %xmm7,(%rsp)
movapd %xmm3,%xmm2
movapd %xmm4,%xmm3
movapd %xmm6,%xmm4
mov    %r15d,%edi
xor    %esi,%esi
mov    $0x6,%al
call   1060 <BSIM4RdsEndSha@plt>
movsd  (%rsp),%xmm7
xorpd  %xmm1,%xmm1
ucomisd %xmm7,%xmm1
movsd  0x8(%rsp),%xmm4
jae    1494 <BSIM4RdseffGeo+0x344>
ucomisd %xmm4,%xmm1
jae    1490 <BSIM4RdseffGeo+0x340>
movapd %xmm7,%xmm1
mulsd  %xmm4,%xmm1
addsd  %xmm4,%xmm7
divsd  %xmm7,%xmm1
movapd %xmm1,%xmm4
jmp    1494 <BSIM4RdseffGeo+0x344>
movapd %xmm7,%xmm4
movsd  %xmm4,(%r14)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm4
jne    14b1 <BSIM4RdseffGeo+0x361>
jp     14b1 <BSIM4RdseffGeo+0x361>
lea    0xbc1(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Warning: Specified GEO = %d not matched\0A\00"
@.str.1 = [50 x i8] c"Warning: Zero resistance returned from RdseffGeo\0A\00"
define i32 @BSIM4RdseffGeo(double %0, i32 %1, i32 %2, i32 %3, double %4, double %5, double %6, double %7, double %8, i32 %9, double* %10) {
%12 = alloca double
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca i32
%22 = alloca double*
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
store double %0, double* %12
store i32 %1, i32* %13
store i32 %2, i32* %14
store i32 %3, i32* %15
store double %4, double* %16
store double %5, double* %17
store double %6, double* %18
store double %7, double* %19
store double %8, double* %20
store i32 %9, i32* %21
store double* %10, double** %22
store double 0.000000e+00, double* %24
store double 0.000000e+00, double* %25
store double 0.000000e+00, double* %26
store double 0.000000e+00, double* %27
store double 0.000000e+00, double* %28
%29 = load i32, i32* %13
%30 = icmp slt i32 %29, 9
br i1 %30, label %31, label %64
31: ; preds = %11
%32 = load double, double* %12
%33 = load i32, i32* %15
%34 = call i32 (double, i32, double*, double*, double*, double*, ...) bitcast (i32 (...)* @BSIM4NumFingerDiff to i32 (double, i32, double*, double*, double*, double*, ...)*)(double %32, i32 %33, double* %25, double* %26, double* %27, double* %28)
%35 = load i32, i32* %21
%36 = icmp eq i32 %35, 1
br i1 %36, label %37, label %50
37: ; preds = %31
%38 = load double, double* %27
%39 = fcmp oeq double %38, 0.000000e+00
br i1 %39, label %40, label %41
40: ; preds = %37
store double 0.000000e+00, double* %23
br label %49
41: ; preds = %37
%42 = load double, double* %17
%43 = load double, double* %18
%44 = fmul double %42, %43
%45 = load double, double* %16
%46 = load double, double* %27
%47 = fmul double %45, %46
%48 = fdiv double %44, %47
store double %48, double* %23
br label %49
49: ; preds = %41, %40
br label %63
50: ; preds = %31
%51 = load double, double* %25
%52 = fcmp oeq double %51, 0.000000e+00
br i1 %52, label %53, label %54
53: ; preds = %50
store double 0.000000e+00, double* %23
br label %62
54: ; preds = %50
%55 = load double, double* %17
%56 = load double, double* %18
%57 = fmul double %55, %56
%58 = load double, double* %16
%59 = load double, double* %25
%60 = fmul double %58, %59
%61 = fdiv double %57, %60
store double %61, double* %23
br label %62
62: ; preds = %54, %53
br label %63
63: ; preds = %62, %49
br label %64
64: ; preds = %63, %11
%65 = load i32, i32* %13
switch i32 %65, label %304 [
i32 0, label %66
i32 1, label %88
i32 2, label %110
i32 3, label %132
i32 4, label %154
i32 5, label %173
i32 6, label %194
i32 7, label %213
i32 8, label %234
i32 9, label %240
i32 10, label %272
]
66: ; preds = %64
%67 = load i32, i32* %21
%68 = icmp eq i32 %67, 1
br i1 %68, label %69, label %78
69: ; preds = %66
%70 = load double, double* %16
%71 = load double, double* %17
%72 = load double, double* %18
%73 = load double, double* %19
%74 = load double, double* %20
%75 = load double, double* %28
%76 = load i32, i32* %14
%77 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndIso to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %70, double %71, double %72, double %73, double %74, double %75, i32 %76, i32 1, double* %24)
br label %87
78: ; preds = %66
%79 = load double, double* %16
%80 = load double, double* %17
%81 = load double, double* %18
%82 = load double, double* %19
%83 = load double, double* %20
%84 = load double, double* %26
%85 = load i32, i32* %14
%86 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndIso to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %79, double %80, double %81, double %82, double %83, double %84, i32 %85, i32 0, double* %24)
br label %87
87: ; preds = %78, %69
br label %307
88: ; preds = %64
%89 = load i32, i32* %21
%90 = icmp eq i32 %89, 1
br i1 %90, label %91, label %100
91: ; preds = %88
%92 = load double, double* %16
%93 = load double, double* %17
%94 = load double, double* %18
%95 = load double, double* %19
%96 = load double, double* %20
%97 = load double, double* %28
%98 = load i32, i32* %14
%99 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndIso to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %92, double %93, double %94, double %95, double %96, double %97, i32 %98, i32 1, double* %24)
br label %109
100: ; preds = %88
%101 = load double, double* %16
%102 = load double, double* %17
%103 = load double, double* %18
%104 = load double, double* %19
%105 = load double, double* %20
%106 = load double, double* %26
%107 = load i32, i32* %14
%108 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndSha to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %101, double %102, double %103, double %104, double %105, double %106, i32 %107, i32 0, double* %24)
br label %109
109: ; preds = %100, %91
br label %307
110: ; preds = %64
%111 = load i32, i32* %21
%112 = icmp eq i32 %111, 1
br i1 %112, label %113, label %122
113: ; preds = %110
%114 = load double, double* %16
%115 = load double, double* %17
%116 = load double, double* %18
%117 = load double, double* %19
%118 = load double, double* %20
%119 = load double, double* %28
%120 = load i32, i32* %14
%121 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndSha to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %114, double %115, double %116, double %117, double %118, double %119, i32 %120, i32 1, double* %24)
br label %131
122: ; preds = %110
%123 = load double, double* %16
%124 = load double, double* %17
%125 = load double, double* %18
%126 = load double, double* %19
%127 = load double, double* %20
%128 = load double, double* %26
%129 = load i32, i32* %14
%130 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndIso to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %123, double %124, double %125, double %126, double %127, double %128, i32 %129, i32 0, double* %24)
br label %131
131: ; preds = %122, %113
br label %307
132: ; preds = %64
%133 = load i32, i32* %21
%134 = icmp eq i32 %133, 1
br i1 %134, label %135, label %144
135: ; preds = %132
%136 = load double, double* %16
%137 = load double, double* %17
%138 = load double, double* %18
%139 = load double, double* %19
%140 = load double, double* %20
%141 = load double, double* %28
%142 = load i32, i32* %14
%143 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndSha to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %136, double %137, double %138, double %139, double %140, double %141, i32 %142, i32 1, double* %24)
br label %153
144: ; preds = %132
%145 = load double, double* %16
%146 = load double, double* %17
%147 = load double, double* %18
%148 = load double, double* %19
%149 = load double, double* %20
%150 = load double, double* %26
%151 = load i32, i32* %14
%152 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndSha to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %145, double %146, double %147, double %148, double %149, double %150, i32 %151, i32 0, double* %24)
br label %153
153: ; preds = %144, %135
br label %307
154: ; preds = %64
%155 = load i32, i32* %21
%156 = icmp eq i32 %155, 1
br i1 %156, label %157, label %166
157: ; preds = %154
%158 = load double, double* %16
%159 = load double, double* %17
%160 = load double, double* %18
%161 = load double, double* %19
%162 = load double, double* %20
%163 = load double, double* %28
%164 = load i32, i32* %14
%165 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndIso to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %158, double %159, double %160, double %161, double %162, double %163, i32 %164, i32 1, double* %24)
br label %172
166: ; preds = %154
%167 = load double, double* %17
%168 = load double, double* %20
%169 = fmul double %167, %168
%170 = load double, double* %16
%171 = fdiv double %169, %170
store double %171, double* %24
br label %172
172: ; preds = %166, %157
br label %307
173: ; preds = %64
%174 = load i32, i32* %21
%175 = icmp eq i32 %174, 1
br i1 %175, label %176, label %185
176: ; preds = %173
%177 = load double, double* %16
%178 = load double, double* %17
%179 = load double, double* %18
%180 = load double, double* %19
%181 = load double, double* %20
%182 = load double, double* %28
%183 = load i32, i32* %14
%184 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndSha to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %177, double %178, double %179, double %180, double %181, double %182, i32 %183, i32 1, double* %24)
br label %193
185: ; preds = %173
%186 = load double, double* %17
%187 = load double, double* %20
%188 = fmul double %186, %187
%189 = load double, double* %16
%190 = load double, double* %26
%191 = fmul double %189, %190
%192 = fdiv double %188, %191
store double %192, double* %24
br label %193
193: ; preds = %185, %176
br label %307
194: ; preds = %64
%195 = load i32, i32* %21
%196 = icmp eq i32 %195, 1
br i1 %196, label %197, label %203
197: ; preds = %194
%198 = load double, double* %17
%199 = load double, double* %20
%200 = fmul double %198, %199
%201 = load double, double* %16
%202 = fdiv double %200, %201
store double %202, double* %24
br label %212
203: ; preds = %194
%204 = load double, double* %16
%205 = load double, double* %17
%206 = load double, double* %18
%207 = load double, double* %19
%208 = load double, double* %20
%209 = load double, double* %26
%210 = load i32, i32* %14
%211 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndIso to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %204, double %205, double %206, double %207, double %208, double %209, i32 %210, i32 0, double* %24)
br label %212
212: ; preds = %203, %197
br label %307
213: ; preds = %64
%214 = load i32, i32* %21
%215 = icmp eq i32 %214, 1
br i1 %215, label %216, label %224
216: ; preds = %213
%217 = load double, double* %17
%218 = load double, double* %20
%219 = fmul double %217, %218
%220 = load double, double* %16
%221 = load double, double* %28
%222 = fmul double %220, %221
%223 = fdiv double %219, %222
store double %223, double* %24
br label %233
224: ; preds = %213
%225 = load double, double* %16
%226 = load double, double* %17
%227 = load double, double* %18
%228 = load double, double* %19
%229 = load double, double* %20
%230 = load double, double* %26
%231 = load i32, i32* %14
%232 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndSha to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %225, double %226, double %227, double %228, double %229, double %230, i32 %231, i32 0, double* %24)
br label %233
233: ; preds = %224, %216
br label %307
234: ; preds = %64
%235 = load double, double* %17
%236 = load double, double* %20
%237 = fmul double %235, %236
%238 = load double, double* %16
%239 = fdiv double %237, %238
store double %239, double* %24
br label %307
240: ; preds = %64
%241 = load i32, i32* %21
%242 = icmp eq i32 %241, 1
br i1 %242, label %243, label %263
243: ; preds = %240
%244 = load double, double* %17
%245 = fmul double 5.000000e-01, %244
%246 = load double, double* %18
%247 = fmul double %245, %246
%248 = load double, double* %16
%249 = fdiv double %247, %248
store double %249, double* %24
%250 = load double, double* %12
%251 = fcmp oeq double %250, 2.000000e+00
br i1 %251, label %252, label %253
252: ; preds = %243
store double 0.000000e+00, double* %23
br label %262
253: ; preds = %243
%254 = load double, double* %17
%255 = load double, double* %18
%256 = fmul double %254, %255
%257 = load double, double* %16
%258 = load double, double* %12
%259 = fsub double %258, 2.000000e+00
%260 = fmul double %257, %259
%261 = fdiv double %256, %260
store double %261, double* %23
br label %262
262: ; preds = %253, %252
br label %271
263: ; preds = %240
store double 0.000000e+00, double* %24
%264 = load double, double* %17
%265 = load double, double* %18
%266 = fmul double %264, %265
%267 = load double, double* %16
%268 = load double, double* %12
%269 = fmul double %267, %268
%270 = fdiv double %266, %269
store double %270, double* %23
br label %271
271: ; preds = %263, %262
br label %307
272: ; preds = %64
%273 = load i32, i32* %21
%274 = icmp eq i32 %273, 1
br i1 %274, label %275, label %283
275: ; preds = %272
store double 0.000000e+00, double* %24
%276 = load double, double* %17
%277 = load double, double* %18
%278 = fmul double %276, %277
%279 = load double, double* %16
%280 = load double, double* %12
%281 = fmul double %279, %280
%282 = fdiv double %278, %281
store double %282, double* %23
br label %303
283: ; preds = %272
%284 = load double, double* %17
%285 = fmul double 5.000000e-01, %284
%286 = load double, double* %18
%287 = fmul double %285, %286
%288 = load double, double* %16
%289 = fdiv double %287, %288
store double %289, double* %24
%290 = load double, double* %12
%291 = fcmp oeq double %290, 2.000000e+00
br i1 %291, label %292, label %293
292: ; preds = %283
store double 0.000000e+00, double* %23
br label %302
293: ; preds = %283
%294 = load double, double* %17
%295 = load double, double* %18
%296 = fmul double %294, %295
%297 = load double, double* %16
%298 = load double, double* %12
%299 = fsub double %298, 2.000000e+00
%300 = fmul double %297, %299
%301 = fdiv double %296, %300
store double %301, double* %23
br label %302
302: ; preds = %293, %292
br label %303
303: ; preds = %302, %275
br label %307
304: ; preds = %64
%305 = load i32, i32* %13
%306 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %305)
br label %307
307: ; preds = %304, %303, %271, %234, %233, %212, %193, %172, %153, %131, %109, %87
%308 = load double, double* %23
%309 = fcmp ole double %308, 0.000000e+00
br i1 %309, label %310, label %313
310: ; preds = %307
%311 = load double, double* %24
%312 = load double*, double** %22
store double %311, double* %312
br label %329
313: ; preds = %307
%314 = load double, double* %24
%315 = fcmp ole double %314, 0.000000e+00
br i1 %315, label %316, label %319
316: ; preds = %313
%317 = load double, double* %23
%318 = load double*, double** %22
store double %317, double* %318
br label %328
319: ; preds = %313
%320 = load double, double* %23
%321 = load double, double* %24
%322 = fmul double %320, %321
%323 = load double, double* %23
%324 = load double, double* %24
%325 = fadd double %323, %324
%326 = fdiv double %322, %325
%327 = load double*, double** %22
store double %326, double* %327
br label %328
328: ; preds = %319, %316
br label %329
329: ; preds = %328, %310
%330 = load double*, double** %22
%331 = load double, double* %330
%332 = fcmp oeq double %331, 0.000000e+00
br i1 %332, label %333, label %335
333: ; preds = %329
%334 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
br label %335
335: ; preds = %333, %329
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"Warning: Specified GEO = %d not matched\0A\00"
@str = [49 x i8] c"Warning: Zero resistance returned from RdseffGeo\00"
define i32 @BSIM4RdseffGeo(double %0, i32 %1, i32 %2, i32 %3, double %4, double %5, double %6, double %7, double %8, i32 %9, double* nocapture %10) {
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = bitcast double* %12 to i8*
store double 0.000000e+00, double* %12
%18 = bitcast double* %13 to i8*
store double 0.000000e+00, double* %13
%19 = bitcast double* %14 to i8*
store double 0.000000e+00, double* %14
%20 = bitcast double* %15 to i8*
store double 0.000000e+00, double* %15
%21 = bitcast double* %16 to i8*
store double 0.000000e+00, double* %16
%22 = icmp slt i32 %1, 9
br i1 %22, label %23, label %40
23: ; preds = %11
%24 = call i32 (double, i32, double*, double*, double*, double*, ...) bitcast (i32 (...)* @BSIM4NumFingerDiff to i32 (double, i32, double*, double*, double*, double*, ...)*)(double %0, i32 %3, double* %13, double* %14, double* %15, double* %16)
%25 = icmp eq i32 %9, 1
br i1 %25, label %26, label %33
26: ; preds = %23
%27 = load double, double* %15
%28 = fcmp oeq double %27, 0.000000e+00
br i1 %28, label %40, label %29
29: ; preds = %26
%30 = fmul double %5, %6
%31 = fmul double %27, %4
%32 = fdiv double %30, %31
br label %40
33: ; preds = %23
%34 = load double, double* %13
%35 = fcmp oeq double %34, 0.000000e+00
br i1 %35, label %40, label %36
36: ; preds = %33
%37 = fmul double %5, %6
%38 = fmul double %34, %4
%39 = fdiv double %37, %38
br label %40
40: ; preds = %33, %26, %29, %36, %11
%41 = phi double [ %32, %29 ], [ %39, %36 ], [ undef, %11 ], [ 0.000000e+00, %26 ], [ 0.000000e+00, %33 ]
switch i32 %1, label %145 [
i32 0, label %42
i32 1, label %50
i32 2, label %58
i32 3, label %66
i32 4, label %74
i32 5, label %82
i32 6, label %92
i32 7, label %100
i32 8, label %110
i32 9, label %113
i32 10, label %129
]
42: ; preds = %40
%43 = icmp eq i32 %9, 1
br i1 %43, label %44, label %47
44: ; preds = %42
%45 = load double, double* %16
%46 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndIso to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %4, double %5, double %6, double %7, double %8, double %45, i32 %2, i32 1, double* %12)
br label %147
47: ; preds = %42
%48 = load double, double* %14
%49 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndIso to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %4, double %5, double %6, double %7, double %8, double %48, i32 %2, i32 0, double* %12)
br label %147
50: ; preds = %40
%51 = icmp eq i32 %9, 1
br i1 %51, label %52, label %55
52: ; preds = %50
%53 = load double, double* %16
%54 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndIso to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %4, double %5, double %6, double %7, double %8, double %53, i32 %2, i32 1, double* %12)
br label %147
55: ; preds = %50
%56 = load double, double* %14
%57 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndSha to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %4, double %5, double %6, double %7, double %8, double %56, i32 %2, i32 0, double* %12)
br label %147
58: ; preds = %40
%59 = icmp eq i32 %9, 1
br i1 %59, label %60, label %63
60: ; preds = %58
%61 = load double, double* %16
%62 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndSha to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %4, double %5, double %6, double %7, double %8, double %61, i32 %2, i32 1, double* %12)
br label %147
63: ; preds = %58
%64 = load double, double* %14
%65 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndIso to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %4, double %5, double %6, double %7, double %8, double %64, i32 %2, i32 0, double* %12)
br label %147
66: ; preds = %40
%67 = icmp eq i32 %9, 1
br i1 %67, label %68, label %71
68: ; preds = %66
%69 = load double, double* %16
%70 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndSha to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %4, double %5, double %6, double %7, double %8, double %69, i32 %2, i32 1, double* %12)
br label %147
71: ; preds = %66
%72 = load double, double* %14
%73 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndSha to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %4, double %5, double %6, double %7, double %8, double %72, i32 %2, i32 0, double* %12)
br label %147
74: ; preds = %40
%75 = icmp eq i32 %9, 1
br i1 %75, label %76, label %79
76: ; preds = %74
%77 = load double, double* %16
%78 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndIso to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %4, double %5, double %6, double %7, double %8, double %77, i32 %2, i32 1, double* %12)
br label %147
79: ; preds = %74
%80 = fmul double %5, %8
%81 = fdiv double %80, %4
store double %81, double* %12
br label %147
82: ; preds = %40
%83 = icmp eq i32 %9, 1
br i1 %83, label %84, label %87
84: ; preds = %82
%85 = load double, double* %16
%86 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndSha to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %4, double %5, double %6, double %7, double %8, double %85, i32 %2, i32 1, double* %12)
br label %147
87: ; preds = %82
%88 = fmul double %5, %8
%89 = load double, double* %14
%90 = fmul double %89, %4
%91 = fdiv double %88, %90
store double %91, double* %12
br label %147
92: ; preds = %40
%93 = icmp eq i32 %9, 1
br i1 %93, label %94, label %97
94: ; preds = %92
%95 = fmul double %5, %8
%96 = fdiv double %95, %4
store double %96, double* %12
br label %147
97: ; preds = %92
%98 = load double, double* %14
%99 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndIso to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %4, double %5, double %6, double %7, double %8, double %98, i32 %2, i32 0, double* %12)
br label %147
100: ; preds = %40
%101 = icmp eq i32 %9, 1
br i1 %101, label %102, label %107
102: ; preds = %100
%103 = fmul double %5, %8
%104 = load double, double* %16
%105 = fmul double %104, %4
%106 = fdiv double %103, %105
store double %106, double* %12
br label %147
107: ; preds = %100
%108 = load double, double* %14
%109 = call i32 (double, double, double, double, double, double, i32, i32, double*, ...) bitcast (i32 (...)* @BSIM4RdsEndSha to i32 (double, double, double, double, double, double, i32, i32, double*, ...)*)(double %4, double %5, double %6, double %7, double %8, double %108, i32 %2, i32 0, double* %12)
br label %147
110: ; preds = %40
%111 = fmul double %5, %8
%112 = fdiv double %111, %4
store double %112, double* %12
br label %147
113: ; preds = %40
%114 = icmp eq i32 %9, 1
br i1 %114, label %115, label %125
115: ; preds = %113
%116 = fmul double %5, 5.000000e-01
%117 = fmul double %116, %6
%118 = fdiv double %117, %4
store double %118, double* %12
%119 = fcmp oeq double %0, 2.000000e+00
br i1 %119, label %157, label %120
120: ; preds = %115
%121 = fmul double %5, %6
%122 = fadd double %0, -2.000000e+00
%123 = fmul double %122, %4
%124 = fdiv double %121, %123
br label %147
125: ; preds = %113
store double 0.000000e+00, double* %12
%126 = fmul double %5, %6
%127 = fmul double %0, %4
%128 = fdiv double %126, %127
br label %147
129: ; preds = %40
%130 = icmp eq i32 %9, 1
br i1 %130, label %131, label %135
131: ; preds = %129
store double 0.000000e+00, double* %12
%132 = fmul double %5, %6
%133 = fmul double %0, %4
%134 = fdiv double %132, %133
br label %147
135: ; preds = %129
%136 = fmul double %5, 5.000000e-01
%137 = fmul double %136, %6
%138 = fdiv double %137, %4
store double %138, double* %12
%139 = fcmp oeq double %0, 2.000000e+00
br i1 %139, label %157, label %140
140: ; preds = %135
%141 = fmul double %5, %6
%142 = fadd double %0, -2.000000e+00
%143 = fmul double %142, %4
%144 = fdiv double %141, %143
br label %147
145: ; preds = %40
%146 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %147
147: ; preds = %131, %140, %125, %120, %102, %107, %94, %97, %84, %87, %76, %79, %68, %71, %60, %63, %52, %55, %44, %47, %145, %110
%148 = phi double [ %41, %145 ], [ %134, %131 ], [ %144, %140 ], [ %124, %120 ], [ %128, %125 ], [ %41, %110 ], [ %41, %102 ], [ %41, %107 ], [ %41, %94 ], [ %41, %97 ], [ %41, %84 ], [ %41, %87 ], [ %41, %76 ], [ %41, %79 ], [ %41, %68 ], [ %41, %71 ], [ %41, %60 ], [ %41, %63 ], [ %41, %52 ], [ %41, %55 ], [ %41, %44 ], [ %41, %47 ]
%149 = fcmp ugt double %148, 0.000000e+00
%150 = load double, double* %12
br i1 %149, label %151, label %157
151: ; preds = %147
%152 = fcmp ugt double %150, 0.000000e+00
br i1 %152, label %153, label %157
153: ; preds = %151
%154 = fmul double %148, %150
%155 = fadd double %148, %150
%156 = fdiv double %154, %155
br label %157
157: ; preds = %151, %115, %135, %147, %153
%158 = phi double [ %156, %153 ], [ %138, %135 ], [ %118, %115 ], [ %150, %147 ], [ %148, %151 ]
store double %158, double* %10
%159 = fcmp oeq double %158, 0.000000e+00
br i1 %159, label %160, label %162
160: ; preds = %157
%161 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
br label %162
162: ; preds = %160, %157
ret i32 0
}