user: Converte this assembly snippet into its equivalent C code:

```asm
<bitline_tag_delay>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0xb8,%rsp
  mov    %edi,-0x94(%rbp)
  mov    %esi,-0x98(%rbp)
  mov    %edx,-0x9c(%rbp)
  mov    %ecx,-0xa0(%rbp)
  mov    %r8d,-0xa4(%rbp)
  mov    %r9d,-0xa8(%rbp)
  movsd  %xmm0,-0xb0(%rbp)
  mov    D98(%rip),%rax
  mov    $0x1,%esi
  mov    $0x1,%edi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <draincap@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D117(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x9c(%rbp),%eax
  imul   -0x98(%rbp),%eax
  imul   -0xa4(%rbp),%eax
  imul   -0xa8(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x94(%rbp),%eax
  cltd
  idiv   %ecx
  mov    %eax,-0x88(%rbp)
  mov    -0x9c(%rbp),%eax
  imul   -0x98(%rbp),%eax
  imul   -0xa8(%rbp),%eax
  shl    $0x3,%eax
  cltd
  idivl  -0xa0(%rbp)
  mov    %eax,-0x84(%rbp)
  mov    -0xa4(%rbp),%eax
  imul   -0xa8(%rbp),%eax
  cmp    $0x1,%eax
  jne    L37
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x88(%rbp),%xmm1
  movsd  -0x60(%rbp),%xmm2
  movsd  D234(%rip),%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,-0xb8(%rbp)
  mov    D222(%rip),%rax
  mov    $0x1,%esi
  mov    $0x0,%edi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <draincap@plt>
  add    %eax,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  -0xb8(%rbp),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  D272(%rip),%xmm0
  mov    D247(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <gatecap@plt>
  add    %eax,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x88(%rbp),%xmm1
  movsd  D3(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D117(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x68(%rbp)
  jmp    L5
L37:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x88(%rbp),%xmm1
  movsd  -0x60(%rbp),%xmm2
  movsd  D234(%rip),%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,-0xb8(%rbp)
  mov    D222(%rip),%rax
  mov    $0x1,%esi
  mov    $0x0,%edi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <draincap@plt>
  add    %eax,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  -0xb8(%rbp),%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  mov    D272(%rip),%rax
  mov    $0x1,%esi
  mov    $0x1,%edi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <draincap@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  -0xb8(%rbp),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  mov    -0xa8(%rbp),%eax
  imul   -0xa4(%rbp),%eax
  mov    %eax,%ebx
  mov    D272(%rip),%rax
  mov    $0x1,%esi
  mov    $0x1,%edi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <draincap@plt>
  imul   %eax,%ebx
  movsd  D272(%rip),%xmm0
  mov    D247(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <gatecap@plt>
  add    %eax,%eax
  add    %ebx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x88(%rbp),%xmm1
  movsd  D3(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D117(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    D272(%rip),%rax
  mov    $0x1,%esi
  mov    $0x1,%edi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <transreson@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
L5:
  mov    D98(%rip),%rax
  mov    $0x1,%esi
  mov    $0x1,%edi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <transreson@plt>
  mov    %eax,%ebx
  mov    D12(%rip),%rax
  mov    $0x1,%esi
  mov    $0x1,%edi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <transreson@plt>
  add    %ebx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x70(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x40(%rbp),%xmm1
  movsd  -0x68(%rbp),%xmm0
  addsd  -0x50(%rbp),%xmm0
  mulsd  -0x48(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D17(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  D165(%rip),%xmm0
  divsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  D16(%rip),%xmm0
  divsd  -0x30(%rbp),%xmm0
  comisd -0x38(%rbp),%xmm0
  jb     L1
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  D108(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x38(%rbp),%xmm1
  movsd  D147(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D223(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D167(%rip),%xmm0
  movapd %xmm0,%xmm2
  divsd  -0x30(%rbp),%xmm2
  movsd  D4(%rip),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  D4(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  -0x28(%rbp),%xmm2
  movsd  D247(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  -0x18(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  subsd  -0x20(%rbp),%xmm1
  movsd  -0x28(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  jmp    L26
L1:
  movsd  -0x30(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  movsd  D314(%rip),%xmm0
  divsd  %xmm1,%xmm0
  addsd  -0x38(%rbp),%xmm0
  movsd  D193(%rip),%xmm1
  divsd  -0x30(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
L26:
  movsd  -0x80(%rbp),%xmm0
  movsd  D32(%rip),%xmm1
  divsd  %xmm1,%xmm0
  mov    0x10(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0x80(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D98
datatype: f64
name: retrieve_data
arguments: data_label: D117
datatype: f64
name: retrieve_data
arguments: data_label: D234
datatype: byte[8]
name: retrieve_data
arguments: data_label: D222
datatype: f64
name: retrieve_data
arguments: data_label: D272
datatype: f64
name: retrieve_data
arguments: data_label: D247
datatype: f64
name: retrieve_data
arguments: data_label: D3
datatype: f64
name: retrieve_data
arguments: data_label: D12
datatype: byte[8]
name: retrieve_data
arguments: data_label: D17
datatype: byte[8]
name: retrieve_data
arguments: data_label: D165
datatype: byte[8]
name: retrieve_data
arguments: data_label: D16
datatype: byte[8]
name: retrieve_data
arguments: data_label: D108
datatype: byte[8]
name: retrieve_data
arguments: data_label: D147
datatype: byte[8]
name: retrieve_data
arguments: data_label: D223
datatype: byte[8]
name: retrieve_data
arguments: data_label: D167
datatype: byte[8]
name: retrieve_data
arguments: data_label: D4
datatype: byte[8]
name: retrieve_data
arguments: data_label: D314
datatype: byte[8]
name: retrieve_data
arguments: data_label: D193
datatype: byte[8]
name: retrieve_data
arguments: data_label: D32
datatype: byte[8]

tool: D98: 2.4

tool: D117: 2

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

tool: D222: 80

tool: D272: 10

tool: D247: 4

tool: D3: 0.32

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

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

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

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

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

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

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

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

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

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

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

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

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);
}
```