user: Please show me the C implementation that matches the assembly code listed below:

```asm
<bitline_tag_delay>:
  endbr64
  push   %r14
  mov    %r9d,%r14d
  push   %r13
  mov    %esi,%r13d
  mov    $0x1,%esi
  push   %r12
  mov    %edi,%r12d
  mov    $0x1,%edi
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x20,%rsp
  mov    D275(%rip),%rax
  movsd  %xmm0,0x10(%rsp)
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <draincap@plt>
  mov    %ebx,%ecx
  pxor   %xmm0,%xmm0
  pxor   %xmm2,%xmm2
  imul   %r13d,%ecx
  mov    $0x1,%esi
  xor    %edi,%edi
  cvtsi2sd %eax,%xmm0
  mulsd  D116(%rip),%xmm0
  mov    %r12d,%eax
  cltd
  addsd  D146(%rip),%xmm0
  imul   %ebp,%ecx
  imul   %r14d,%ebp
  imul   %r14d,%ecx
  idiv   %ecx
  cvtsi2sd %eax,%xmm2
  mov    $0x1,%eax
  mulsd  %xmm2,%xmm0
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm0,(%rsp)
  movsd  D271(%rip),%xmm0
  cmp    $0x1,%ebp
  je     L43
  call   <draincap@plt>
  pxor   %xmm0,%xmm0
  movsd  (%rsp),%xmm4
  movsd  D112(%rip),%xmm1
  add    %eax,%eax
  mov    $0x1,%esi
  mov    $0x1,%edi
  cvtsi2sd %eax,%xmm0
  mov    $0x1,%eax
  addsd  %xmm0,%xmm4
  movapd %xmm1,%xmm0
  movsd  %xmm4,(%rsp)
  call   <draincap@plt>
  pxor   %xmm0,%xmm0
  mov    $0x1,%esi
  mov    $0x1,%edi
  cvtsi2sd %eax,%xmm0
  addsd  (%rsp),%xmm0
  mov    D112(%rip),%rax
  movsd  %xmm0,(%rsp)
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <draincap@plt>
  mov    D93(%rip),%r12
  imul   %eax,%ebp
  mov    D112(%rip),%rax
  movq   %r12,%xmm0
  movq   %rax,%xmm1
  mov    $0x2,%eax
  call   <gatecap@plt>
  pxor   %xmm7,%xmm7
  mov    $0x1,%esi
  mov    $0x1,%edi
  lea    0x0(%rbp,%rax,2),%eax
  cvtsi2sd %eax,%xmm7
  mov    D112(%rip),%rax
  movq   %rax,%xmm0
  mov    $0x1,%eax
  movsd  %xmm7,0x8(%rsp)
  call   <transreson@plt>
  movsd  0x18(%rsp),%xmm2
  pxor   %xmm0,%xmm0
  movsd  D116(%rip),%xmm1
  mulsd  D78(%rip),%xmm2
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm2,%xmm1
  addsd  %xmm0,%xmm1
L8:
  mov    $0x1,%esi
  mov    D275(%rip),%rax
  mov    $0x1,%edi
  movsd  %xmm1,0x18(%rsp)
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <transreson@plt>
  mov    $0x1,%esi
  mov    $0x1,%edi
  movsd  D156(%rip),%xmm0
  mov    %eax,%ebx
  mov    $0x1,%eax
  call   <transreson@plt>
  pxor   %xmm0,%xmm0
  movsd  0x18(%rsp),%xmm1
  movsd  D241(%rip),%xmm2
  add    %eax,%ebx
  divsd  0x10(%rsp),%xmm2
  cvtsi2sd %ebx,%xmm0
  addsd  %xmm0,%xmm1
  mulsd  (%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm1
  addsd  %xmm0,%xmm1
  movsd  D124(%rip),%xmm0
  mulsd  D199(%rip),%xmm1
  divsd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jae    L18
  movapd %xmm2,%xmm3
  movsd  D33(%rip),%xmm0
  addsd  %xmm2,%xmm3
  divsd  %xmm3,%xmm0
  addsd  %xmm1,%xmm0
  movsd  D238(%rip),%xmm1
  divsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
L5:
  mov    0x50(%rsp),%rax
  movapd %xmm0,%xmm1
  divsd  D100(%rip),%xmm1
  movsd  %xmm1,(%rax)
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L43:
  call   <draincap@plt>
  pxor   %xmm0,%xmm0
  movsd  (%rsp),%xmm6
  mov    D93(%rip),%r12
  add    %eax,%eax
  movsd  D112(%rip),%xmm1
  cvtsi2sd %eax,%xmm0
  mov    $0x2,%eax
  addsd  %xmm0,%xmm6
  movq   %r12,%xmm0
  movsd  %xmm6,(%rsp)
  call   <gatecap@plt>
  movsd  0x18(%rsp),%xmm2
  pxor   %xmm7,%xmm7
  movsd  D116(%rip),%xmm1
  mulsd  D78(%rip),%xmm2
  add    %eax,%eax
  cvtsi2sd %eax,%xmm7
  mulsd  %xmm2,%xmm1
  movsd  %xmm7,0x8(%rsp)
  jmp    L8
  nopw   0x0(%rax,%rax,1)
L18:
  movsd  D117(%rip),%xmm0
  movsd  D92(%rip),%xmm3
  mulsd  D41(%rip),%xmm1
  divsd  %xmm2,%xmm0
  mulsd  D102(%rip),%xmm1
  mulsd  %xmm3,%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm1
  movq   %r12,%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D135(%rip),%xmm0
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L30
  sqrtsd %xmm0,%xmm0
L49:
  subsd  D136(%rip),%xmm0
  addsd  %xmm2,%xmm2
  divsd  %xmm2,%xmm0
  jmp    L5
L30:
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  (%rsp),%xmm2
  jmp    L49
```

tool_calls: name: unpack_data
arguments: data_tag: D275
data_type: f64
name: unpack_data
arguments: data_tag: D116
data_type: f64
name: unpack_data
arguments: data_tag: D146
data_type: byte[8]
name: unpack_data
arguments: data_tag: D271
data_type: f64
name: unpack_data
arguments: data_tag: D112
data_type: f64
name: unpack_data
arguments: data_tag: D93
data_type: f64
name: unpack_data
arguments: data_tag: D78
data_type: f64
name: unpack_data
arguments: data_tag: D156
data_type: byte[8]
name: unpack_data
arguments: data_tag: D241
data_type: byte[8]
name: unpack_data
arguments: data_tag: D124
data_type: byte[8]
name: unpack_data
arguments: data_tag: D199
data_type: byte[8]
name: unpack_data
arguments: data_tag: D33
data_type: byte[8]
name: unpack_data
arguments: data_tag: D238
data_type: byte[8]
name: unpack_data
arguments: data_tag: D100
data_type: byte[8]
name: unpack_data
arguments: data_tag: D117
data_type: byte[8]
name: unpack_data
arguments: data_tag: D92
data_type: byte[8]
name: unpack_data
arguments: data_tag: D41
data_type: byte[8]
name: unpack_data
arguments: data_tag: D102
data_type: byte[8]
name: unpack_data
arguments: data_tag: D135
data_type: byte[8]
name: unpack_data
arguments: data_tag: D136
data_type: byte[8]

tool: D275: 2.4

tool: D116: 0.5

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

tool: D271: 80

tool: D112: 10

tool: D93: 4

tool: D78: 0.32

tool: {"D156": [0x33,0x33,0x33,0x33,0x33,0x33,0x13,0x40]}

tool: {"D241": [0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x40]}

tool: {"D124": [0x48,0xe1,0x7a,0x14,0xae,0x47,0xff,0x3f]}

tool: {"D199": [0x00,0x33,0x78,0x0e,0x9b,0x82,0x9f,0x3f]}

tool: {"D33": [0x5c,0x8f,0xc2,0xf5,0x28,0x5c,0x18,0x40]}

tool: {"D238": [0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x40]}

tool: {"D100": [0x24,0x9a,0x9a,0xc7,0xf7,0x8f,0xdc,0xbf]}

tool: {"D117": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D92": [0x8f,0xc2,0xf5,0x28,0x5c,0x8f,0xf6,0x3f]}

tool: {"D41": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0]}

tool: {"D102": [0x48,0xe1,0x7a,0x14,0xae,0x47,0x0f,0x40]}

tool: {"D135": [0x72,0xd7,0x12,0xf2,0x41,0xcf,0x1f,0x40]}

tool: {"D136": [0x8f,0xc2,0xf5,0x28,0x5c,0x8f,0x06,0x40]}

assistant: ```c
double bitline_tag_delay(C, A, B, Ntwl, Ntbl, Ntspd, inrisetime, outrisetime)
int C, A, B, Ntbl, Ntspd;
double inrisetime, *outrisetime;
{
  double Tbit, Cline, Ccolmux, Rlineb, r1, r2, c1, c2, a, b, c;
  double m, tstep;
  double Cbitrow;
  int rows, cols;
  Cbitrow = draincap(2.4, 1, 1) / 2.0;
  rows = C / (B * A * Ntbl * Ntspd);
  cols = 8 * B * A * Ntspd / Ntwl;
  if (Ntbl * Ntspd == 1) {
    Cline = rows * (Cbitrow + 4.4e-15) + 2 * draincap(80.0, 0, 1);
    Ccolmux = 2 * gatecap(4.0, 10.0);
    Rlineb = 0.320 * rows / 2.0;
    r1 = Rlineb;
  } else {
    Cline = rows * (Cbitrow + 4.4e-15) + 2 * draincap(80.0, 0, 1) + draincap(10.0, 1, 1);
    Ccolmux = Ntspd * Ntbl * (draincap(10.0, 1, 1)) + 2 * gatecap(4.0, 10.0);
    Rlineb = 0.320 * rows / 2.0;
    r1 = Rlineb + transreson(10.0, 1, 1);
  }
  r2 = transreson(2.4, 1, 1) + transreson(2.4 * 2, 1, 1);
  c1 = Ccolmux;
  c2 = Cline;
  tstep = (r2 * c2 + (r1 + r2) * c1) * log((3.3) / (3.3 - 0.10));
  m = 5 / inrisetime;
  if (tstep <= (0.5 * (5 - 1.09) / m)) {
    a = m;
    b = 2 * ((5 * 0.5) - 1.09);
    c = -2 * tstep * (5 - 1.09) + 1 / m * ((5 * 0.5) - 1.09) * ((5 * 0.5) - 1.09);
    Tbit = (-b + sqrt(b * b - 4 * a * c)) / (2 * a);
  } else {
    Tbit = tstep + (5 + 1.09) / (2 * m) - (5 * 0.5) / m;
  }
  *outrisetime = Tbit / (log((3.3 - 0.10) / 5));
  return (Tbit);
}
```