double valid_driver_delay(C, A, Ntbl, Ntspd, inputtime)
int C, A, Ntbl, Ntspd;
double inputtime;
{
  double Ceq, Tst1, tf;
  Ceq = draincap(30.0, 1, 1) + draincap(50.0, 0, 1) + 0.5e-12;
  tf = Ceq * transreson(50.0, 0, 1);
  Tst1 = horowitz(inputtime, tf, 0.437, 0.5, 0);
  return (Tst1);
}


x86 assembly (clang, -O0):
<valid_driver_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  0xecf(%rip),%xmm0
mov    $0x1,%esi
mov    %esi,%edi
mov    $0x1,%al
call   1030 <draincap@plt>
mov    %eax,-0x3c(%rbp)
movsd  0xea6(%rip),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <draincap@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  0xe8d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe6a(%rip),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1040 <transreson@plt>
movsd  -0x38(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  0xe28(%rip),%xmm2
movsd  0xe28(%rip),%xmm3
xor    %edi,%edi
mov    $0x4,%al
call   1050 <horowitz@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_driver_delay>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
movsd  0xebd(%rip),%xmm0
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <draincap@plt>
mov    %eax,%ebx
movsd  0xeaa(%rip),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <draincap@plt>
add    %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xe93(%rip),%xmm0
movsd  %xmm0,(%rsp)
movsd  0xe7e(%rip),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%al
call   1040 <transreson@plt>
cvtsi2sd %eax,%xmm1
mulsd  (%rsp),%xmm1
movsd  0xe6f(%rip),%xmm2
movsd  0xe6f(%rip),%xmm3
movsd  0x8(%rsp),%xmm0
xor    %edi,%edi
mov    $0x4,%al
call   1050 <horowitz@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @valid_driver_delay(i32 %0, i32 %1, i32 %2, i32 %3, double %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store double %4, double* %10
%14 = call i32 (double, i32, i32, ...) bitcast (i32 (...)* @draincap to i32 (double, i32, i32, ...)*)(double 3.000000e+01, i32 1, i32 1)
%15 = call i32 (double, i32, i32, ...) bitcast (i32 (...)* @draincap to i32 (double, i32, i32, ...)*)(double 5.000000e+01, i32 0, i32 1)
%16 = add nsw i32 %14, %15
%17 = sitofp i32 %16 to double
%18 = fadd double %17, 5.000000e-13
store double %18, double* %11
%19 = load double, double* %11
%20 = call i32 (double, i32, i32, ...) bitcast (i32 (...)* @transreson to i32 (double, i32, i32, ...)*)(double 5.000000e+01, i32 0, i32 1)
%21 = sitofp i32 %20 to double
%22 = fmul double %19, %21
store double %22, double* %13
%23 = load double, double* %10
%24 = load double, double* %13
%25 = call i32 (double, double, double, double, i32, ...) bitcast (i32 (...)* @horowitz to i32 (double, double, double, double, i32, ...)*)(double %23, double %24, double 4.370000e-01, double 5.000000e-01, i32 0)
%26 = sitofp i32 %25 to double
store double %26, double* %12
%27 = load double, double* %12
ret double %27
}

LLVM IR (-O2):
define double @valid_driver_delay(i32 %0, i32 %1, i32 %2, i32 %3, double %4) {
%6 = tail call i32 (double, i32, i32, ...) bitcast (i32 (...)* @draincap to i32 (double, i32, i32, ...)*)(double 3.000000e+01, i32 1, i32 1)
%7 = tail call i32 (double, i32, i32, ...) bitcast (i32 (...)* @draincap to i32 (double, i32, i32, ...)*)(double 5.000000e+01, i32 0, i32 1)
%8 = add nsw i32 %7, %6
%9 = sitofp i32 %8 to double
%10 = fadd double %9, 5.000000e-13
%11 = tail call i32 (double, i32, i32, ...) bitcast (i32 (...)* @transreson to i32 (double, i32, i32, ...)*)(double 5.000000e+01, i32 0, i32 1)
%12 = sitofp i32 %11 to double
%13 = fmul double %10, %12
%14 = tail call i32 (double, double, double, double, i32, ...) bitcast (i32 (...)* @horowitz to i32 (double, double, double, double, i32, ...)*)(double %4, double %13, double 4.370000e-01, double 5.000000e-01, i32 0)
%15 = sitofp i32 %14 to double
ret double %15
}