double wordline_tag_delay(C, A, Ntspd, Ntwl, inrisetime, outrisetime)
int C, A, Ntspd, Ntwl;
double *outrisetime;
double inrisetime;
{
  double tf, m, a, b, c;
  double Cline, Rline, Ceq, nextinputtime;
  int tagbits;
  double Tworddrivedel, Twordchargedel;
  tagbits = 32 + 2 - (int)logtwo((double)C) + (int)logtwo((double)A);
  Ceq = draincap(5.0, 1, 1) + draincap(10.0, 0, 1) + gatecap(5.0 + 10.0, 20.0);
  tf = transreson(5.0, 1, 1) * Ceq;
  Tworddrivedel = horowitz(inrisetime, tf, 0.456, 0.456, 1);
  nextinputtime = Tworddrivedel / (1.0 - 0.456);
  Cline = (gatecappass(2.4, (8.0 - 2 * 2.4) / 2.0) +
           gatecappass(2.4, (8.0 - 2 * 2.4) / 2.0) + 1.8e-15) *
              tagbits * A * Ntspd / Ntwl +
          draincap(5.0, 1, 1) + draincap(10.0, 0, 1);
  Rline = 0.080 * tagbits * A * Ntspd / (2 * Ntwl);
  tf = (transreson(10.0, 0, 1) + Rline) * Cline;
  Twordchargedel = horowitz(nextinputtime, tf, 0.456, 0.456, 0);
  *outrisetime = Twordchargedel / 0.456;
  return (Tworddrivedel + Twordchargedel);
}


x86 assembly (clang, -O0):
<wordline_tag_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
mov    $0x1,%al
call   1060 <logtwo@plt>
mov    %eax,%ecx
mov    $0x22,%eax
sub    %ecx,%eax
mov    %eax,-0xa0(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1060 <logtwo@plt>
mov    %eax,%ecx
mov    -0xa0(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x6c(%rbp)
movsd  0xe5c(%rip),%xmm0
mov    $0x1,%esi
mov    %esi,%edi
mov    $0x1,%al
call   1030 <draincap@plt>
mov    %eax,-0x9c(%rbp)
movsd  0xe30(%rip),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <draincap@plt>
mov    %eax,%ecx
mov    -0x9c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x98(%rbp)
movsd  0xe42(%rip),%xmm0
movsd  0xe42(%rip),%xmm1
mov    $0x2,%al
call   1040 <gatecap@plt>
mov    %eax,%ecx
mov    -0x98(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xdf0(%rip),%xmm0
mov    $0x1,%esi
mov    %esi,%edi
mov    $0x1,%al
call   1050 <transreson@plt>
cvtsi2sd %eax,%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xdaa(%rip),%xmm3
mov    $0x1,%edi
movaps %xmm3,%xmm2
mov    $0x4,%al
call   1080 <horowitz@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  0xdbd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xd9c(%rip),%xmm0
movsd  0xd9c(%rip),%xmm1
mov    $0x2,%al
call   1070 <gatecappass@plt>
mov    %eax,-0x94(%rbp)
movsd  0xd7f(%rip),%xmm0
movsd  0xd7f(%rip),%xmm1
mov    $0x2,%al
call   1070 <gatecappass@plt>
mov    %eax,%ecx
mov    -0x94(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  0xd52(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x6c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xd12(%rip),%xmm0
mov    $0x1,%esi
mov    %esi,%edi
mov    $0x1,%al
call   1030 <draincap@plt>
movsd  -0x90(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xcd4(%rip),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <draincap@plt>
movsd  -0x88(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
cvtsi2sdl -0x6c(%rbp),%xmm1
movsd  0xcac(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xc73(%rip),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1050 <transreson@plt>
cvtsi2sd %eax,%xmm0
addsd  -0x58(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xc38(%rip),%xmm3
xor    %edi,%edi
movaps %xmm3,%xmm2
mov    $0x4,%al
call   1080 <horowitz@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  0xc16(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wordline_tag_delay>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r8,%r14
movsd  %xmm0,0x10(%rsp)
mov    %ecx,%r12d
mov    %edx,%r15d
mov    %esi,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
mov    $0x1,%al
call   1060 <logtwo@plt>
mov    %eax,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movapd %xmm0,0x50(%rsp)
mov    $0x1,%al
call   1060 <logtwo@plt>
mov    %eax,%r13d
sub    %ebp,%r13d
add    $0x22,%r13d
movsd  0xe4b(%rip),%xmm0
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <draincap@plt>
mov    %eax,%ebp
movsd  0xe38(%rip),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <draincap@plt>
mov    %eax,%ebx
add    %ebp,%ebx
movsd  0xe26(%rip),%xmm0
movsd  0xe26(%rip),%xmm1
mov    $0x2,%al
call   1040 <gatecap@plt>
add    %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xdf0(%rip),%xmm0
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1050 <transreson@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0x8(%rsp),%xmm1
movsd  0xdea(%rip),%xmm2
movsd  0x10(%rsp),%xmm0
movaps %xmm2,%xmm3
mov    $0x1,%edi
mov    $0x4,%al
call   1080 <horowitz@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
divsd  0xdc8(%rip),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0xdc2(%rip),%xmm0
movsd  0xdc2(%rip),%xmm1
mov    $0x2,%al
call   1070 <gatecappass@plt>
mov    %eax,%ebx
movsd  0xda9(%rip),%xmm0
movsd  0xda9(%rip),%xmm1
mov    $0x2,%al
call   1070 <gatecappass@plt>
add    %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xd99(%rip),%xmm0
movapd %xmm0,0x30(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r13d,%xmm0
movapd %xmm0,0x40(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0xd2f(%rip),%xmm0
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <draincap@plt>
mov    %eax,%ebx
movsd  0xd1c(%rip),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <draincap@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x20(%rsp)
movapd 0xd41(%rip),%xmm0
unpcklpd 0x30(%rsp),%xmm0
movapd 0x40(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
movapd 0x50(%rsp),%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm1,%xmm0
movapd 0x10(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm1,%xmm2
movd   %r12d,%xmm0
add    %r12d,%r12d
movd   %r12d,%xmm1
punpckldq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm0
divpd  %xmm0,%xmm2
movapd %xmm2,0x10(%rsp)
movsd  0xc9e(%rip),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1050 <transreson@plt>
movd   %eax,%xmm0
movd   %ebx,%xmm1
punpckldq %xmm1,%xmm0
cvtdq2pd %xmm0,%xmm0
addpd  0x10(%rsp),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  0x20(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x28(%rsp),%xmm0
movsd  0xc72(%rip),%xmm2
movaps %xmm2,%xmm3
xor    %edi,%edi
mov    $0x4,%al
call   1080 <horowitz@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm0
addsd  %xmm1,%xmm0
divsd  0xc4d(%rip),%xmm1
movsd  %xmm1,(%r14)
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @wordline_tag_delay(i32 %0, i32 %1, i32 %2, i32 %3, double %4, double* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double*
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca i32
%23 = alloca double
%24 = alloca double
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store double %4, double* %11
store double* %5, double** %12
%25 = load i32, i32* %7
%26 = sitofp i32 %25 to double
%27 = call i32 (double, ...) bitcast (i32 (...)* @logtwo to i32 (double, ...)*)(double %26)
%28 = sub nsw i32 34, %27
%29 = load i32, i32* %8
%30 = sitofp i32 %29 to double
%31 = call i32 (double, ...) bitcast (i32 (...)* @logtwo to i32 (double, ...)*)(double %30)
%32 = add nsw i32 %28, %31
store i32 %32, i32* %22
%33 = call i32 (double, i32, i32, ...) bitcast (i32 (...)* @draincap to i32 (double, i32, i32, ...)*)(double 5.000000e+00, i32 1, i32 1)
%34 = call i32 (double, i32, i32, ...) bitcast (i32 (...)* @draincap to i32 (double, i32, i32, ...)*)(double 1.000000e+01, i32 0, i32 1)
%35 = add nsw i32 %33, %34
%36 = call i32 (double, double, ...) bitcast (i32 (...)* @gatecap to i32 (double, double, ...)*)(double 1.500000e+01, double 2.000000e+01)
%37 = add nsw i32 %35, %36
%38 = sitofp i32 %37 to double
store double %38, double* %20
%39 = call i32 (double, i32, i32, ...) bitcast (i32 (...)* @transreson to i32 (double, i32, i32, ...)*)(double 5.000000e+00, i32 1, i32 1)
%40 = sitofp i32 %39 to double
%41 = load double, double* %20
%42 = fmul double %40, %41
store double %42, double* %13
%43 = load double, double* %11
%44 = load double, double* %13
%45 = call i32 (double, double, double, double, i32, ...) bitcast (i32 (...)* @horowitz to i32 (double, double, double, double, i32, ...)*)(double %43, double %44, double 4.560000e-01, double 4.560000e-01, i32 1)
%46 = sitofp i32 %45 to double
store double %46, double* %23
%47 = load double, double* %23
%48 = fdiv double %47, 5.440000e-01
store double %48, double* %21
%49 = call i32 (double, double, ...) bitcast (i32 (...)* @gatecappass to i32 (double, double, ...)*)(double 2.400000e+00, double 1.600000e+00)
%50 = call i32 (double, double, ...) bitcast (i32 (...)* @gatecappass to i32 (double, double, ...)*)(double 2.400000e+00, double 1.600000e+00)
%51 = add nsw i32 %49, %50
%52 = sitofp i32 %51 to double
%53 = fadd double %52, 1.800000e-15
%54 = load i32, i32* %22
%55 = sitofp i32 %54 to double
%56 = fmul double %53, %55
%57 = load i32, i32* %8
%58 = sitofp i32 %57 to double
%59 = fmul double %56, %58
%60 = load i32, i32* %9
%61 = sitofp i32 %60 to double
%62 = fmul double %59, %61
%63 = load i32, i32* %10
%64 = sitofp i32 %63 to double
%65 = fdiv double %62, %64
%66 = call i32 (double, i32, i32, ...) bitcast (i32 (...)* @draincap to i32 (double, i32, i32, ...)*)(double 5.000000e+00, i32 1, i32 1)
%67 = sitofp i32 %66 to double
%68 = fadd double %65, %67
%69 = call i32 (double, i32, i32, ...) bitcast (i32 (...)* @draincap to i32 (double, i32, i32, ...)*)(double 1.000000e+01, i32 0, i32 1)
%70 = sitofp i32 %69 to double
%71 = fadd double %68, %70
store double %71, double* %18
%72 = load i32, i32* %22
%73 = sitofp i32 %72 to double
%74 = fmul double 8.000000e-02, %73
%75 = load i32, i32* %8
%76 = sitofp i32 %75 to double
%77 = fmul double %74, %76
%78 = load i32, i32* %9
%79 = sitofp i32 %78 to double
%80 = fmul double %77, %79
%81 = load i32, i32* %10
%82 = mul nsw i32 2, %81
%83 = sitofp i32 %82 to double
%84 = fdiv double %80, %83
store double %84, double* %19
%85 = call i32 (double, i32, i32, ...) bitcast (i32 (...)* @transreson to i32 (double, i32, i32, ...)*)(double 1.000000e+01, i32 0, i32 1)
%86 = sitofp i32 %85 to double
%87 = load double, double* %19
%88 = fadd double %86, %87
%89 = load double, double* %18
%90 = fmul double %88, %89
store double %90, double* %13
%91 = load double, double* %21
%92 = load double, double* %13
%93 = call i32 (double, double, double, double, i32, ...) bitcast (i32 (...)* @horowitz to i32 (double, double, double, double, i32, ...)*)(double %91, double %92, double 4.560000e-01, double 4.560000e-01, i32 0)
%94 = sitofp i32 %93 to double
store double %94, double* %24
%95 = load double, double* %24
%96 = fdiv double %95, 4.560000e-01
%97 = load double*, double** %12
store double %96, double* %97
%98 = load double, double* %23
%99 = load double, double* %24
%100 = fadd double %98, %99
ret double %100
}

LLVM IR (-O2):
define double @wordline_tag_delay(i32 %0, i32 %1, i32 %2, i32 %3, double %4, double* nocapture writeonly %5) {
%7 = sitofp i32 %0 to double
%8 = tail call i32 (double, ...) bitcast (i32 (...)* @logtwo to i32 (double, ...)*)(double %7)
%9 = sub i32 34, %8
%10 = sitofp i32 %1 to double
%11 = tail call i32 (double, ...) bitcast (i32 (...)* @logtwo to i32 (double, ...)*)(double %10)
%12 = add nsw i32 %9, %11
%13 = tail call i32 (double, i32, i32, ...) bitcast (i32 (...)* @draincap to i32 (double, i32, i32, ...)*)(double 5.000000e+00, i32 1, i32 1)
%14 = tail call i32 (double, i32, i32, ...) bitcast (i32 (...)* @draincap to i32 (double, i32, i32, ...)*)(double 1.000000e+01, i32 0, i32 1)
%15 = add nsw i32 %14, %13
%16 = tail call i32 (double, double, ...) bitcast (i32 (...)* @gatecap to i32 (double, double, ...)*)(double 1.500000e+01, double 2.000000e+01)
%17 = add nsw i32 %15, %16
%18 = sitofp i32 %17 to double
%19 = tail call i32 (double, i32, i32, ...) bitcast (i32 (...)* @transreson to i32 (double, i32, i32, ...)*)(double 5.000000e+00, i32 1, i32 1)
%20 = sitofp i32 %19 to double
%21 = fmul double %20, %18
%22 = tail call i32 (double, double, double, double, i32, ...) bitcast (i32 (...)* @horowitz to i32 (double, double, double, double, i32, ...)*)(double %4, double %21, double 4.560000e-01, double 4.560000e-01, i32 1)
%23 = sitofp i32 %22 to double
%24 = fdiv double %23, 5.440000e-01
%25 = tail call i32 (double, double, ...) bitcast (i32 (...)* @gatecappass to i32 (double, double, ...)*)(double 2.400000e+00, double 1.600000e+00)
%26 = tail call i32 (double, double, ...) bitcast (i32 (...)* @gatecappass to i32 (double, double, ...)*)(double 2.400000e+00, double 1.600000e+00)
%27 = add nsw i32 %26, %25
%28 = sitofp i32 %27 to double
%29 = fadd double %28, 1.800000e-15
%30 = sitofp i32 %12 to double
%31 = sitofp i32 %2 to double
%32 = tail call i32 (double, i32, i32, ...) bitcast (i32 (...)* @draincap to i32 (double, i32, i32, ...)*)(double 5.000000e+00, i32 1, i32 1)
%33 = tail call i32 (double, i32, i32, ...) bitcast (i32 (...)* @draincap to i32 (double, i32, i32, ...)*)(double 1.000000e+01, i32 0, i32 1)
%34 = sitofp i32 %33 to double
%35 = insertelement <2 x double> <double 8.000000e-02, double poison>, double %29, i64 1
%36 = insertelement <2 x double> poison, double %30, i64 0
%37 = shufflevector <2 x double> %36, <2 x double> poison, <2 x i32> zeroinitializer
%38 = fmul <2 x double> %35, %37
%39 = insertelement <2 x double> poison, double %10, i64 0
%40 = shufflevector <2 x double> %39, <2 x double> poison, <2 x i32> zeroinitializer
%41 = fmul <2 x double> %38, %40
%42 = insertelement <2 x double> poison, double %31, i64 0
%43 = shufflevector <2 x double> %42, <2 x double> poison, <2 x i32> zeroinitializer
%44 = fmul <2 x double> %41, %43
%45 = shl nsw i32 %3, 1
%46 = insertelement <2 x i32> poison, i32 %3, i64 1
%47 = insertelement <2 x i32> %46, i32 %45, i64 0
%48 = sitofp <2 x i32> %47 to <2 x double>
%49 = fdiv <2 x double> %44, %48
%50 = tail call i32 (double, i32, i32, ...) bitcast (i32 (...)* @transreson to i32 (double, i32, i32, ...)*)(double 1.000000e+01, i32 0, i32 1)
%51 = insertelement <2 x i32> poison, i32 %50, i64 0
%52 = insertelement <2 x i32> %51, i32 %32, i64 1
%53 = sitofp <2 x i32> %52 to <2 x double>
%54 = fadd <2 x double> %49, %53
%55 = extractelement <2 x double> %54, i64 1
%56 = fadd double %55, %34
%57 = extractelement <2 x double> %54, i64 0
%58 = fmul double %57, %56
%59 = tail call i32 (double, double, double, double, i32, ...) bitcast (i32 (...)* @horowitz to i32 (double, double, double, double, i32, ...)*)(double %24, double %58, double 4.560000e-01, double 4.560000e-01, i32 0)
%60 = sitofp i32 %59 to double
%61 = fdiv double %60, 4.560000e-01
store double %61, double* %5
%62 = fadd double %23, %60
ret double %62
}