user: Translate the below assembly code into C programming language:

```asm
<decoder_delay>:
  endbr64
  push   %r15
  mov    $0x1,%eax
  push   %r14
  mov    %edx,%r14d
  push   %r13
  mov    %esi,%r13d
  mov    $0x1,%esi
  push   %r12
  mov    %edi,%r12d
  xor    %edi,%edi
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  sub    $0x38,%rsp
  mov    D109(%rip),%rdx
  mov    %r9d,0x10(%rsp)
  movq   %rdx,%xmm0
  mov    %ecx,0x18(%rsp)
  call   <draincap@plt>
  mov    $0x1,%esi
  mov    $0x1,%edi
  mov    D395(%rip),%rdx
  mov    %eax,%ebx
  mov    $0x1,%eax
  movq   %rdx,%xmm0
  call   <draincap@plt>
  movsd  D96(%rip),%xmm4
  pxor   %xmm1,%xmm1
  add    %eax,%ebx
  mov    $0x2,%eax
  movapd %xmm4,%xmm0
  call   <gatecap@plt>
  mov    $0x1,%esi
  mov    $0x1,%edi
  mov    D395(%rip),%rdx
  mov    %eax,%r15d
  mov    $0x1,%eax
  movq   %rdx,%xmm0
  add    %r15d,%ebx
  call   <transreson@plt>
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  xor    %edi,%edi
  cvtsi2sd %eax,%xmm0
  movsd  D15(%rip),%xmm2
  mov    $0x4,%eax
  cvtsi2sd %ebx,%xmm1
  movapd %xmm2,%xmm3
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  call   <horowitz@plt>
  mov    D109(%rip),%rcx
  xor    %edi,%edi
  mov    $0x1,%esi
  mov    %eax,%r15d
  mov    $0x1,%eax
  movq   %rcx,%xmm0
  call   <draincap@plt>
  mov    $0x1,%esi
  mov    $0x1,%edi
  mov    D395(%rip),%rdx
  mov    %eax,%ebx
  mov    $0x1,%eax
  movq   %rdx,%xmm0
  call   <draincap@plt>
  pxor   %xmm1,%xmm1
  lea    (%rbx,%rax,1),%ecx
  mov    $0x2,%eax
  mov    %ecx,0x8(%rsp)
  mov    D96(%rip),%rcx
  movq   %rcx,%xmm0
  call   <gatecap@plt>
  mov    $0x1,%esi
  mov    $0x1,%edi
  mov    D395(%rip),%rdx
  mov    %eax,%ebx
  mov    $0x1,%eax
  movq   %rdx,%xmm0
  call   <transreson@plt>
  pxor   %xmm0,%xmm0
  mov    D15(%rip),%rdx
  add    0x8(%rsp),%ebx
  cvtsi2sd %r15d,%xmm0
  pxor   %xmm4,%xmm4
  pxor   %xmm1,%xmm1
  mov    $0x1,%edi
  movq   %rdx,%xmm2
  cvtsi2sd %ebx,%xmm4
  movq   %rdx,%xmm3
  cvtsi2sd %eax,%xmm1
  mov    $0x4,%eax
  divsd  %xmm2,%xmm0
  mulsd  %xmm4,%xmm1
  call   <horowitz@plt>
  mov    %r13d,%r8d
  pxor   %xmm6,%xmm6
  xor    %edi,%edi
  imul   %r14d,%r8d
  mov    %eax,%ebx
  mov    %r12d,%eax
  mov    D109(%rip),%rcx
  cltd
  movq   %rcx,%xmm0
  imul   %ebp,%r8d
  imul   0x10(%rsp),%r8d
  lea    0x0(,%r8,8),%esi
  mov    %r8d,0x28(%rsp)
  idiv   %esi
  mov    $0x1,%esi
  cvtsi2sd %eax,%xmm6
  mov    $0x1,%eax
  movsd  %xmm6,0x8(%rsp)
  call   <draincap@plt>
  mov    $0x1,%esi
  mov    $0x1,%edi
  mov    D395(%rip),%rdx
  mov    %eax,%r15d
  mov    $0x1,%eax
  movq   %rdx,%xmm0
  call   <draincap@plt>
  movsd  D246(%rip),%xmm1
  movsd  D79(%rip),%xmm0
  add    %eax,%r15d
  mov    $0x2,%eax
  call   <gatecap@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm5,%xmm5
  xor    %edi,%edi
  pxor   %xmm4,%xmm4
  mov    0x18(%rsp),%ecx
  pxor   %xmm3,%xmm3
  pxor   %xmm6,%xmm6
  cvtsi2sd %r13d,%xmm0
  movsd  D387(%rip),%xmm1
  mov    $0x1,%esi
  cvtsi2sd %r14d,%xmm5
  cvtsi2sd %ebp,%xmm4
  imul   %ebp,%ecx
  mulsd  %xmm0,%xmm1
  cvtsi2sdl 0x10(%rsp),%xmm3
  mulsd  D21(%rip),%xmm0
  imul   %eax,%ecx
  mulsd  %xmm5,%xmm1
  lea    (%r15,%rcx,4),%eax
  mulsd  %xmm5,%xmm0
  cvtsi2sd %eax,%xmm6
  mov    D109(%rip),%rax
  mulsd  %xmm4,%xmm1
  mulsd  %xmm4,%xmm0
  mulsd  %xmm3,%xmm1
  mulsd  %xmm3,%xmm0
  addsd  %xmm1,%xmm6
  movsd  %xmm0,0x20(%rsp)
  movq   %rax,%xmm0
  mov    $0x1,%eax
  movsd  %xmm6,0x18(%rsp)
  call   <transreson@plt>
  pxor   %xmm1,%xmm1
  xor    %edi,%edi
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm1
  mov    D444(%rip),%rax
  addsd  0x20(%rsp),%xmm1
  mulsd  0x18(%rsp),%xmm1
  cvtsi2sd %ebx,%xmm0
  divsd  D426(%rip),%xmm0
  movq   %rax,%xmm3
  mov    D15(%rip),%rax
  movq   %rax,%xmm2
  mov    $0x4,%eax
  call   <horowitz@plt>
  pxor   %xmm0,%xmm0
  mov    0x28(%rsp),%r8d
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm0
  mov    0x88(%rsp),%rax
  cvtsi2sd %r8d,%xmm1
  movsd  %xmm0,(%rax)
  divsd  D444(%rip),%xmm0
  mov    $0x1,%eax
  movsd  %xmm0,0x20(%rsp)
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12d,%xmm0
  divsd  %xmm1,%xmm0
  call   <logtwo@plt>
  pxor   %xmm0,%xmm0
  movsd  D39(%rip),%xmm2
  movsd  D309(%rip),%xmm3
  cvtsi2sd %eax,%xmm0
  mulsd  D428(%rip),%xmm0
  movapd %xmm0,%xmm1
  andpd  %xmm2,%xmm1
  ucomisd %xmm1,%xmm3
  jbe    L3
  cvttsd2si %xmm0,%rax
  pxor   %xmm1,%xmm1
  movapd %xmm0,%xmm3
  movsd  D322(%rip),%xmm7
  andnpd %xmm0,%xmm2
  cvtsi2sd %rax,%xmm1
  cmpnlesd %xmm1,%xmm3
  andpd  %xmm7,%xmm3
  addsd  %xmm3,%xmm1
  orpd   %xmm2,%xmm1
  movapd %xmm1,%xmm0
L3:
  cvttsd2si %xmm0,%r10d
  test   %r10d,%r10d
  je     L42
  mov    $0x5,%eax
  cmp    %eax,%r10d
  cmovle %r10d,%eax
  mov    %eax,%r15d
  lea    -0x1(%rax),%ebx
  lea    (%rax,%rax,4),%eax
  shl    $0x3,%eax
  mov    %eax,0x28(%rsp)
L29:
  mov    D395(%rip),%rax
  mov    $0x1,%esi
  xor    %edi,%edi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <draincap@plt>
  mov    $0x3,%esi
  mov    $0x1,%edi
  movsd  D363(%rip),%xmm2
  mov    %eax,0x2c(%rsp)
  mov    $0x1,%eax
  movapd %xmm2,%xmm0
  call   <draincap@plt>
  pxor   %xmm1,%xmm1
  movsd  D371(%rip),%xmm0
  cvtsi2sdl 0x28(%rsp),%xmm1
  addsd  D288(%rip),%xmm1
  mov    %eax,0x18(%rsp)
  mov    $0x2,%eax
  call   <gatecap@plt>
  pxor   %xmm0,%xmm0
  movsd  0x8(%rsp),%xmm7
  mov    0x2c(%rsp),%edx
  mov    %eax,%r8d
  pxor   %xmm1,%xmm1
  mov    $0x3,%esi
  mov    $0x1,%edi
  cvtsi2sd %r8d,%xmm0
  lea    (%rdx,%rdx,2),%eax
  add    0x18(%rsp),%eax
  cvtsi2sd %eax,%xmm1
  mov    D363(%rip),%rax
  mulsd  %xmm7,%xmm0
  addsd  %xmm0,%xmm1
  movsd  D396(%rip),%xmm0
  mulsd  %xmm7,%xmm0
  mulsd  D215(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x1,%eax
  movsd  %xmm1,0x18(%rsp)
  call   <transreson@plt>
  movsd  0x8(%rsp),%xmm1
  pxor   %xmm0,%xmm0
  mulsd  D23(%rip),%xmm1
  cvtsi2sd %eax,%xmm0
  mulsd  D215(%rip),%xmm1
  mulsd  D52(%rip),%xmm1
  addsd  %xmm0,%xmm1
  mulsd  0x18(%rsp),%xmm1
  cmp    $0x4,%ebx
  ja     L1
  mov    %ebx,%ecx
  lea    D142(%rip),%rax
  movsd  (%rax,%rcx,8),%xmm4
L21:
  mov    D444(%rip),%rax
  movsd  0x20(%rsp),%xmm0
  movapd %xmm4,%xmm3
  mov    $0x1,%edi
  movsd  %xmm4,0x8(%rsp)
  movq   %rax,%xmm2
  mov    $0x4,%eax
  call   <horowitz@plt>
  movsd  0x8(%rsp),%xmm4
  mov    %r15d,%esi
  xor    %edi,%edi
  movsd  D322(%rip),%xmm1
  pxor   %xmm5,%xmm5
  movsd  D276(%rip),%xmm2
  cvtsi2sd %eax,%xmm5
  mov    0x90(%rsp),%rax
  movsd  %xmm4,0x10(%rsp)
  subsd  %xmm4,%xmm1
  movapd %xmm2,%xmm0
  movsd  %xmm5,(%rax)
  divsd  %xmm1,%xmm5
  mov    $0x1,%eax
  movsd  %xmm5,0x8(%rsp)
  call   <transreson@plt>
  movsd  D398(%rip),%xmm0
  mov    %eax,%r12d
  mov    D288(%rip),%rax
  movq   %rax,%xmm1
  mov    $0x2,%eax
  call   <gatecap@plt>
  mov    $0x1,%esi
  mov    $0x1,%edi
  movsd  D437(%rip),%xmm0
  mov    %eax,%ebx
  mov    $0x1,%eax
  call   <draincap@plt>
  mov    %r15d,%esi
  xor    %edi,%edi
  imul   %r15d,%eax
  add    %eax,%ebx
  mov    D276(%rip),%rax
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <draincap@plt>
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  xor    %edi,%edi
  add    %eax,%ebx
  cvtsi2sd %r12d,%xmm0
  mov    D405(%rip),%rax
  movsd  0x10(%rsp),%xmm4
  cvtsi2sd %ebx,%xmm1
  movsd  0x8(%rsp),%xmm5
  movq   %rax,%xmm3
  movapd %xmm4,%xmm2
  mov    $0x4,%eax
  mulsd  %xmm0,%xmm1
  movapd %xmm5,%xmm0
  call   <horowitz@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    0x98(%rsp),%rax
  movsd  %xmm0,(%rax)
  mov    0xa0(%rsp),%rax
  divsd  D405(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    0x88(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    0x90(%rsp),%rax
  addsd  (%rax),%xmm0
  mov    0x98(%rsp),%rax
  addsd  (%rax),%xmm0
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L42:
  movl   $0x28,0x28(%rsp)
  xor    %ebx,%ebx
  mov    $0x1,%r15d
  jmp    L29
  nopl   (%rax)
L1:
  movsd  %xmm1,0x8(%rsp)
  sub    $0x8,%rsp
  mov    %r12d,%edx
  mov    %ebp,%r9d
  mov    0x18(%rsp),%eax
  mov    %r14d,%r8d
  mov    %r13d,%ecx
  mov    %r15d,%esi
  lea    D68(%rip),%rdi
  push   %rax
  xor    %eax,%eax
  call   <printf@plt>
  pop    %rax
  pxor   %xmm4,%xmm4
  pop    %rdx
  movsd  0x8(%rsp),%xmm1
  jmp    L21
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D109
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D395
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D96
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_label: D15
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D246
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D79
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_label: D387
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D21
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D444
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D426
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D39
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D309
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_label: D428
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D322
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D363
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D371
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D288
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D396
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D215
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_label: D23
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D52
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_label: D142
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D276
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D398
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_label: D437
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D405
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D68
type_infered: string

tool: D109: 100

tool: D395: 60

tool: {"D96": [0.0,3.5625]}

tool: D15: 0.438

tool: D246: 10

tool: {"D79": [0.0,3.54296875]}

tool: {"D387": [0x7a,0xcd,0x69,0x75,0x84,0x36,0xf0,0x3c]}

tool: D21: 0.08

tool: D444: 0.561

tool: {"D426": [0x96,0x43,0x8b,0x6c,0xe7,0xfb,0xe1,0x3f]}

tool: {"D39": [0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f]}

tool: {"D309": [0.0,176.0]}

tool: {"D428": [0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0x3f]}

tool: D322: 1

tool: D363: 90

tool: {"D371": [0xcd,0xcc,0xcc,0xcc,0xcc,0xcc,0x2c,0x40]}

tool: D288: 20

tool: {"D396": [0xb1,0xde,0x64,0xc8,0xda,0xd0,0xf3,0x3c]}

tool: {"D215": [0.0,2.5]}

tool: D23: 0.32

tool: {"D52": [0.0,1.75]}

tool: D142: 0.503

tool: D276: 12

tool: {"D398": [0.0,2.71875]}

tool: D437: 2.4

tool: D405: 0.456

tool: D68: error:numstack=%d C[%d] B[%d] A[%d] ndbl[%d] nspd[%d]


assistant: ```c
double decoder_delay(C, B, A, Ndwl, Ndbl, Nspd, Ntwl, Ntbl, Ntspd, Tdecdrive, Tdecoder1, Tdecoder2, outrisetime)
int C, B, A, Ndwl, Ndbl, Nspd, Ntwl, Ntbl, Ntspd;
double *Tdecdrive, *Tdecoder1, *Tdecoder2, *outrisetime;
{
  double Ceq, Req, Rwire, rows, tf, nextinputtime, vth = 0.0, tstep, m, a, b, c;
  int numstack;
  Ceq = draincap(100.0, 0, 1) + draincap(60.0, 1, 1) + gatecap(100.0 + 60.0, 0.0);
  tf = Ceq * transreson(60.0, 1, 1);
  nextinputtime = horowitz(0.0, tf, 0.438, 0.438, 0) / (0.438);
  Ceq = draincap(100.0, 0, 1) + draincap(60.0, 1, 1) + gatecap(100.0 + 60.0, 0.0);
  tf = Ceq * transreson(60.0, 1, 1);
  nextinputtime = horowitz(nextinputtime, tf, 0.438, 0.438, 1) / (1.0 - 0.438);
  rows = C / (8 * B * A * Ndbl * Nspd);
  Ceq = draincap(100.0, 0, 1) + draincap(60.0, 1, 1) + 4 * gatecap(90.0 + 60.0, 10.0) * (Ndwl * Ndbl) + 1.8e-15 * 0.25 * 8 * B * A * Ndbl * Nspd;
  Rwire = 0.080 * 0.125 * 8 * B * A * Ndbl * Nspd;
  tf = (Rwire + transreson(100.0, 0, 1)) * Ceq;
  *Tdecdrive = horowitz(nextinputtime, tf, 0.438, 0.561, 0);
  nextinputtime = *Tdecdrive / 0.561;
  numstack = ceil((1.0 / 3.0) * logtwo((double)((double)C / (double)(B * A * Ndbl * Nspd))));
  if (numstack == 0)
    numstack = 1;
  if (numstack > 5)
    numstack = 5;
  Ceq = 3 * draincap(60.0, 0, 1) + draincap(90.0, 1, 3) + gatecap(2.4 + 12.0, ((numstack * 40) + 20.0)) * rows + 4.4e-15 * rows * 8;
  Rwire = 0.320 * rows * 8 / 2;
  tf = Ceq * (Rwire + transreson(90.0, 1, 3));
  switch (numstack) {
  case 1:
    vth = 0.503;
    break;
  case 2:
    vth = 0.452;
    break;
  case 3:
    vth = 0.417;
    break;
  case 4:
    vth = 0.390;
    break;
  case 5:
    vth = 0.390;
    break;
  default:
    printf("error:numstack=%d C[%d] B[%d] A[%d] ndbl[%d] nspd[%d]\n", numstack, C, B, A, Ndbl, Nspd);
  }
  *Tdecoder1 = horowitz(nextinputtime, tf, 0.561, vth, 1);
  nextinputtime = *Tdecoder1 / (1.0 - vth);
  Req = transreson(12.0, 0, numstack);
  Ceq = (gatecap(5.0 + 10.0, 20.0) + numstack * draincap(2.4, 1, 1) + draincap(12.0, 0, numstack));
  tf = Req * Ceq;
  *Tdecoder2 = horowitz(nextinputtime, tf, vth, 0.456, 0);
  *outrisetime = *Tdecoder2 / (0.456);
  return (*Tdecdrive + *Tdecoder1 + *Tdecoder2);
}
```