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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xe0,%rsp
  mov    %edi,-0xd4(%rbp)
  mov    %rsi,-0xe0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D43(%rip),%rax
  mov    %rax,-0x70(%rbp)
  lea    D77(%rip),%rax
  mov    %rax,-0x68(%rbp)
  movsd  D14(%rip),%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  mov    -0xe0(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0xa0(%rbp)
  mov    -0xe0(%rbp),%rax
  mov    0x10(%rax),%rax
  mov    %rax,-0x98(%rbp)
  mov    -0xa0(%rbp),%rax
  lea    D142(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x90(%rbp)
  lea    -0x60(%rbp),%rcx
  lea    -0xc4(%rbp),%rdx
  mov    -0x90(%rbp),%rax
  lea    D127(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  lea    -0x60(%rbp),%rcx
  lea    -0xb0(%rbp),%rdx
  mov    -0x90(%rbp),%rax
  lea    D62(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  lea    -0x60(%rbp),%rcx
  lea    -0xb8(%rbp),%rdx
  mov    -0x90(%rbp),%rax
  lea    D62(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  lea    -0x60(%rbp),%rcx
  lea    -0xc0(%rbp),%rdx
  mov    -0x90(%rbp),%rax
  lea    D127(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  movl   $0x0,-0xbc(%rbp)
  jmp    L5
L15:
  lea    -0x88(%rbp),%rdx
  mov    -0xbc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%rsi
  lea    -0x60(%rbp),%rdx
  mov    -0x90(%rbp),%rax
  mov    %rdx,%rcx
  mov    %rsi,%rdx
  lea    D127(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  addl   $0x1,-0xbc(%rbp)
L5:
  mov    -0xc0(%rbp),%eax
  cmp    %eax,-0xbc(%rbp)
  jl     L15
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x88(%rbp),%eax
  cmp    $0x1,%eax
  jne    L41
  movsd  -0xa8(%rbp),%xmm1
  movsd  D23(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0xb8(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0xb8(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0xa8(%rbp),%xmm2
  movsd  D72(%rip),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  -0xb8(%rbp),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  -0xb0(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
L41:
  mov    -0x84(%rbp),%eax
  cmp    $0x1,%eax
  jne    L73
  movsd  -0xa8(%rbp),%xmm1
  movsd  D25(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0xb0(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0xb8(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0xb8(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D113(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
L73:
  mov    -0x98(%rbp),%rax
  lea    D41(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x90(%rbp)
  movl   $0x0,-0xbc(%rbp)
  jmp    L49
L40:
  mov    -0xbc(%rbp),%eax
  cltq
  mov    -0x88(%rbp,%rax,4),%eax
  test   %eax,%eax
  je     L13
  mov    -0xbc(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,8),%rdx
  mov    -0xbc(%rbp),%eax
  cltq
  mov    -0x80(%rbp,%rax,8),%rcx
  mov    -0x90(%rbp),%rax
  movq   %rcx,%xmm0
  lea    D44(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
L13:
  addl   $0x1,-0xbc(%rbp)
L49:
  mov    -0xc0(%rbp),%eax
  cmp    %eax,-0xbc(%rbp)
  jl     L40
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L76
  call   <__stack_chk_fail@plt>
L76:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D43
type_infered: string
name: unpack_data
arguments: data_tag: D77
type_infered: string
name: unpack_data
arguments: data_tag: D14
type_infered: f64
name: unpack_data
arguments: data_tag: D142
type_infered: string
name: unpack_data
arguments: data_tag: D127
type_infered: string
name: unpack_data
arguments: data_tag: D62
type_infered: string
name: unpack_data
arguments: data_tag: D23
type_infered: f64
name: unpack_data
arguments: data_tag: D72
type_infered: f64
name: unpack_data
arguments: data_tag: D25
type_infered: f64
name: unpack_data
arguments: data_tag: D113
type_infered: f64
name: unpack_data
arguments: data_tag: D41
type_infered: string
name: unpack_data
arguments: data_tag: D44
type_infered: string

tool: D43: area


tool: D77: volume_constraint


tool: D14: 3.14159265358979

tool: D142: r

tool: D127: %d %80s

tool: D62: %lf %80s

tool: D23: 0.644

tool: D72: 1.04

tool: D25: 0.25

tool: D113: 63.525

tool: D41: w

tool: D44: %23.15e %s

assistant: ```c
int main(int argc, char **argv) {
  FILE *fileptr;
  double fval[2], D, H;
  int i, num_vars, num_fns, req[2];
  char *infile, *outfile, in_str[81];
  char *valtag[] = {"area\n", "volume_constraint\n"};
  const double PI = 3.14159265358979;
  infile = argv[1];
  outfile = argv[2];
  fileptr = fopen(infile, "r");
  fscanf(fileptr, "%d %80s", &num_vars, in_str);
  fscanf(fileptr, "%lf %80s", &H, in_str);
  fscanf(fileptr, "%lf %80s", &D, in_str);
  fscanf(fileptr, "%d %80s", &num_fns, in_str);
  for (i = 0; i < num_fns; i++)
    fscanf(fileptr, "%d %80s", &req[i], in_str);
  fclose(fileptr);
  if (req[0] == 1)
    fval[0] = 0.644 * PI * D * D + 1.04 * PI * D * H;
  if (req[1] == 1)
    fval[1] = 0.25 * PI * H * D * D - 63.525;
  fileptr = fopen(outfile, "w");
  for (i = 0; i < num_fns; i++)
    if (req[i])
      fprintf(fileptr, "%23.15e %s", fval[i], valtag[i]);
  fclose(fileptr);
  return 0;
}
```