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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  lea    -0xb000(%rsp),%r11
L76:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L76
  sub    $0xc38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  mov    %rsp,%rax
  cmp    %rax,%rsp
  je     L8
L12:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L12
L8:
  sub    $0x3f0,%rsp
  orq    $0x0,0x3e8(%rsp)
  xor    %ebx,%ebx
  lea    -0x9c80(%rbp),%rax
  mov    %rsp,-0xbc08(%rbp)
  lea    -0xbbc0(%rbp),%r13
  mov    %rax,-0xbbf8(%rbp)
  lea    -0x3ec0(%rbp),%rax
  lea    -0x7d40(%rbp),%r15
  mov    %rax,-0xbc00(%rbp)
  lea    -0x5e00(%rbp),%r14
  lea    -0x1f80(%rbp),%r12
  nopl   0x0(%rax)
L29:
  mov    $0x3e8,%edi
  call   <malloc@plt>
  mov    $0x3e8,%edi
  mov    %rax,0x0(%r13,%rbx,1)
  call   <malloc@plt>
  mov    -0xbbf8(%rbp),%rcx
  mov    $0x3e8,%edi
  mov    %rax,(%rcx,%rbx,1)
  call   <malloc@plt>
  mov    $0x3e8,%edi
  mov    %rax,(%r15,%rbx,1)
  call   <malloc@plt>
  mov    $0x3e8,%edi
  mov    %rax,(%r14,%rbx,1)
  call   <malloc@plt>
  mov    -0xbc00(%rbp),%rdx
  mov    $0x3e8,%edi
  mov    %rax,(%rdx,%rbx,1)
  call   <malloc@plt>
  mov    %rax,(%r12,%rbx,1)
  add    $0x8,%rbx
  cmp    $0x1f40,%rbx
  jne    L29
  lea    D123(%rip),%rbx
  lea    D110(%rip),%rdi
  xor    %eax,%eax
  mov    %rbx,%rsi
  call   <fopen@plt>
  mov    %rbx,%rsi
  lea    D61(%rip),%rdi
  xor    %ebx,%ebx
  mov    %rax,-0xbc10(%rbp)
  xor    %eax,%eax
  call   <fopen@plt>
  lea    D96(%rip),%rsi
  lea    D145(%rip),%rdi
  mov    %rax,-0xbc18(%rbp)
  xor    %eax,%eax
  call   <fopen@plt>
  mov    %r12,-0xbc48(%rbp)
  mov    %rbx,%r12
  mov    %rax,-0xbc50(%rbp)
  lea    -0xbbf0(%rbp),%rax
  mov    %rax,-0xbc28(%rbp)
  lea    -0xbbe4(%rbp),%rax
  mov    %rax,-0xbc40(%rbp)
  lea    -0xbbe8(%rbp),%rax
  mov    %rax,-0xbc38(%rbp)
  lea    -0xbbec(%rbp),%rax
  mov    %rax,-0xbc30(%rbp)
L97:
  mov    -0xbc10(%rbp),%rdx
  mov    -0xbc08(%rbp),%rdi
  mov    $0x3e8,%esi
  call   <fgets@plt>
  mov    -0xbbf8(%rbp),%rax
  mov    (%r15,%r12,1),%rbx
  lea    D149(%rip),%rsi
  mov    0x0(%r13,%r12,1),%r11
  mov    -0xbc28(%rbp),%r9
  mov    (%rax,%r12,1),%rcx
  mov    -0xbc48(%rbp),%rax
  push   -0xbc40(%rbp)
  mov    %rbx,%r8
  mov    -0xbc08(%rbp),%rdi
  mov    %r11,%rdx
  mov    %r11,-0xbc20(%rbp)
  push   (%rax,%r12,1)
  mov    -0xbc00(%rbp),%rax
  push   -0xbc38(%rbp)
  push   (%rax,%r12,1)
  xor    %eax,%eax
  push   -0xbc30(%rbp)
  push   (%r14,%r12,1)
  mov    %rcx,-0xbc58(%rbp)
  call   <sscanf@plt>
  add    $0x30,%rsp
  mov    $0x8,%edx
  mov    %rbx,%rdi
  lea    D154(%rip),%rsi
  call   <strncmp@plt>
  mov    -0xbc20(%rbp),%r11
  mov    -0xbc58(%rbp),%rcx
  test   %rax,%rax
  jne    L25
  mov    %rbx,-0xbc20(%rbp)
  mov    -0xbc48(%rbp),%r12
  mov    %r11,%r10
  mov    %rbx,%r8
  mov    %rcx,%r11
L46:
  mov    -0xbc08(%rbp),%rbx
  mov    %r11,%rcx
  mov    %r10,%rdx
  xor    %eax,%eax
  lea    -0xbbe0(%rbp),%r9
  lea    D12(%rip),%rsi
  mov    %r11,-0xbc58(%rbp)
  mov    %rbx,%rdi
  mov    %r10,-0xbc48(%rbp)
  call   <sscanf@plt>
  mov    -0xbc10(%rbp),%rdx
  mov    %rbx,%rdi
  mov    $0x3e8,%esi
  call   <fgets@plt>
  mov    -0xbc20(%rbp),%r8
  mov    %rbx,%rdi
  xor    %eax,%eax
  mov    -0xbc58(%rbp),%rcx
  mov    -0xbc48(%rbp),%rdx
  lea    -0xbbdc(%rbp),%r9
  lea    D12(%rip),%rsi
  call   <sscanf@plt>
  mov    -0xbc10(%rbp),%rdx
  mov    %rbx,%rdi
  mov    $0x3e8,%esi
  mov    %rbx,-0xbc08(%rbp)
  lea    -0xbbd8(%rbp),%rbx
  call   <fgets@plt>
  mov    -0xbc58(%rbp),%rcx
  mov    %rbx,%r8
  xor    %eax,%eax
  mov    -0xbc48(%rbp),%rdx
  mov    -0xbc08(%rbp),%rdi
  lea    D32(%rip),%rsi
  call   <sscanf@plt>
  mov    -0xbc10(%rbp),%rdx
  mov    $0x3e8,%esi
  mov    -0xbc08(%rbp),%rdi
  call   <fgets@plt>
  mov    -0xbc20(%rbp),%r9
  xor    %eax,%eax
  mov    -0xbc58(%rbp),%r8
  mov    -0xbc48(%rbp),%rcx
  mov    -0xbc08(%rbp),%rdi
  lea    -0xbbc8(%rbp),%rdx
  lea    D152(%rip),%rsi
  call   <sscanf@plt>
  mov    -0xbc10(%rbp),%rdx
  mov    $0x3e8,%esi
  mov    -0xbc08(%rbp),%rdi
  call   <fgets@plt>
  mov    -0xbc20(%rbp),%r9
  mov    %rbx,%rdx
  xor    %eax,%eax
  mov    -0xbc58(%rbp),%r8
  mov    -0xbc48(%rbp),%rcx
  lea    D152(%rip),%rsi
  xor    %ebx,%ebx
  mov    -0xbc08(%rbp),%rdi
  call   <sscanf@plt>
  mov    %r12,-0xbc48(%rbp)
  mov    %rbx,%r12
L48:
  mov    -0xbc18(%rbp),%rdx
  mov    -0xbc08(%rbp),%rdi
  mov    $0x3e8,%esi
  call   <fgets@plt>
  mov    -0xbbf8(%rbp),%rax
  mov    (%r15,%r12,1),%rbx
  lea    D149(%rip),%rsi
  mov    0x0(%r13,%r12,1),%r11
  mov    -0xbc28(%rbp),%r9
  mov    (%rax,%r12,1),%rcx
  mov    -0xbc48(%rbp),%rax
  push   -0xbc40(%rbp)
  mov    %rbx,%r8
  mov    -0xbc08(%rbp),%rdi
  mov    %r11,%rdx
  mov    %r11,-0xbc20(%rbp)
  push   (%rax,%r12,1)
  mov    -0xbc00(%rbp),%rax
  push   -0xbc38(%rbp)
  push   (%rax,%r12,1)
  xor    %eax,%eax
  push   -0xbc30(%rbp)
  push   (%r14,%r12,1)
  mov    %rcx,-0xbc58(%rbp)
  call   <sscanf@plt>
  add    $0x30,%rsp
  mov    $0x8,%edx
  mov    %rbx,%rdi
  lea    D154(%rip),%rsi
  call   <strncmp@plt>
  mov    -0xbc20(%rbp),%r11
  mov    -0xbc58(%rbp),%rcx
  test   %rax,%rax
  jne    L68
  mov    %rbx,-0xbc20(%rbp)
  mov    -0xbc48(%rbp),%r12
  mov    %r11,%r10
  mov    %rbx,%r8
  mov    %rcx,%r11
L82:
  mov    -0xbc08(%rbp),%rbx
  mov    %r11,%rcx
  mov    %r10,%rdx
  xor    %eax,%eax
  lea    -0xbbd4(%rbp),%r9
  lea    D12(%rip),%rsi
  mov    %r11,-0xbc30(%rbp)
  mov    %rbx,%rdi
  mov    %r10,-0xbc28(%rbp)
  call   <sscanf@plt>
  mov    -0xbc18(%rbp),%rdx
  mov    %rbx,%rdi
  mov    $0x3e8,%esi
  call   <fgets@plt>
  mov    -0xbc20(%rbp),%r8
  mov    %rbx,%rdi
  xor    %eax,%eax
  mov    -0xbc30(%rbp),%rcx
  mov    -0xbc28(%rbp),%rdx
  lea    -0xbbd0(%rbp),%r9
  lea    D12(%rip),%rsi
  call   <sscanf@plt>
  mov    -0xbc18(%rbp),%rdx
  mov    %rbx,%rdi
  mov    $0x3e8,%esi
  mov    %rbx,-0xbc08(%rbp)
  lea    -0xbbcc(%rbp),%rbx
  call   <fgets@plt>
  mov    -0xbc30(%rbp),%rcx
  mov    %rbx,%r8
  xor    %eax,%eax
  mov    -0xbc28(%rbp),%rdx
  mov    -0xbc08(%rbp),%rdi
  lea    D32(%rip),%rsi
  call   <sscanf@plt>
  mov    -0xbc18(%rbp),%rdx
  mov    $0x3e8,%esi
  mov    -0xbc08(%rbp),%rdi
  call   <fgets@plt>
  mov    -0xbc20(%rbp),%r9
  xor    %eax,%eax
  mov    -0xbc30(%rbp),%r8
  mov    -0xbc28(%rbp),%rcx
  mov    -0xbc08(%rbp),%rdi
  lea    -0xbbc4(%rbp),%rdx
  lea    D152(%rip),%rsi
  call   <sscanf@plt>
  mov    -0xbc18(%rbp),%rdx
  mov    $0x3e8,%esi
  mov    -0xbc08(%rbp),%rdi
  call   <fgets@plt>
  mov    -0xbc20(%rbp),%r9
  mov    %rbx,%rdx
  xor    %eax,%eax
  mov    -0xbc30(%rbp),%r8
  mov    -0xbc28(%rbp),%rcx
  lea    D152(%rip),%rsi
  xor    %ebx,%ebx
  mov    -0xbc08(%rbp),%rdi
  call   <sscanf@plt>
  movss  -0xbbcc(%rbp),%xmm1
  movss  -0xbbc4(%rbp),%xmm4
  lea    D83(%rip),%rsi
  movss  -0xbbd8(%rbp),%xmm0
  movss  -0xbbc8(%rbp),%xmm3
  movaps %xmm4,%xmm5
  movaps %xmm1,%xmm2
  mov    -0xbc50(%rbp),%rdi
  subss  %xmm3,%xmm5
  subss  %xmm0,%xmm2
  call   <fprintf@plt>
  mov    %r13,%rax
  mov    %r12,%r13
  mov    %rax,%r12
  nop
L89:
  mov    (%r12,%rbx,1),%rdi
  call   <free@plt>
  mov    -0xbbf8(%rbp),%rax
  mov    (%rax,%rbx,1),%rdi
  call   <free@plt>
  mov    (%r15,%rbx,1),%rdi
  call   <free@plt>
  mov    (%r14,%rbx,1),%rdi
  call   <free@plt>
  mov    -0xbc00(%rbp),%rax
  mov    (%rax,%rbx,1),%rdi
  call   <free@plt>
  mov    0x0(%r13,%rbx,1),%rdi
  add    $0x8,%rbx
  call   <free@plt>
  cmp    $0x1f40,%rbx
  jne    L89
  mov    -0xbc10(%rbp),%rdi
  call   <fclose@plt>
  mov    -0xbc18(%rbp),%rdi
  call   <fclose@plt>
  mov    -0xbc50(%rbp),%rdi
  call   <fclose@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L95
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L68:
  add    $0x8,%r12
  cmp    $0x1f40,%r12
  jne    L48
  mov    -0x5e00(%rbp),%rax
  mov    -0xbc48(%rbp),%r12
  mov    -0x7d40(%rbp),%r11
  mov    -0x9c80(%rbp),%r10
  mov    %rax,-0xbc20(%rbp)
  mov    %rax,%r8
  jmp    L82
L25:
  add    $0x8,%r12
  cmp    $0x1f40,%r12
  jne    L97
  mov    -0x5e00(%rbp),%rax
  mov    -0xbc48(%rbp),%r12
  mov    -0x7d40(%rbp),%r11
  mov    -0x9c80(%rbp),%r10
  mov    %rax,-0xbc20(%rbp)
  mov    %rax,%r8
  jmp    L46
L95:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D123
type_infered: string
name: unpack_data
arguments: tag: D110
type_infered: string
name: unpack_data
arguments: tag: D61
type_infered: string
name: unpack_data
arguments: tag: D96
type_infered: string
name: unpack_data
arguments: tag: D145
type_infered: string
name: unpack_data
arguments: tag: D149
type_infered: string
name: unpack_data
arguments: tag: D154
type_infered: string
name: unpack_data
arguments: tag: D12
type_infered: string
name: unpack_data
arguments: tag: D32
type_infered: string
name: unpack_data
arguments: tag: D152
type_infered: string
name: unpack_data
arguments: tag: D83
type_infered: string

tool: D123: r

tool: D110: before_opt.txt

tool: D61: after_opt.txt

tool: D96: w

tool: D145: energy.txt

tool: D149: %s %s %s %i %s %f %s %f %s %f

tool: D154: internal

tool: D12: %s %s %s %f

tool: D32: %s %s %f

tool: D152: %f %s %s %s

tool: D83:  %f : %f : %f : %f : %f : %f

assistant: ```c
main() {
  int i = 0, j = 0, k = 0, line_length = 1000, atom_numb;
  float numb_1, numb_2, numb_3, bef_int, bef_ext, bef_total, aft_int, aft_ext, aft_total, bef_nonbond, aft_nonbond, delta_energy;
  char buffer[line_length], *word_1[1000], *word_2[1000], *word_3[1000], *word_4[1000], *word_5[1000], *word_6[1000];
  for (i = 0; i < 1000; i++) {
    word_1[i] = (char *)malloc(line_length);
    word_2[i] = (char *)malloc(line_length);
    word_3[i] = (char *)malloc(line_length);
    word_4[i] = (char *)malloc(line_length);
    word_5[i] = (char *)malloc(line_length);
    word_6[i] = (char *)malloc(line_length);
  }
  FILE *before, *after, *final, *fopen();
  before = fopen("before_opt.txt", "r");
  after = fopen("after_opt.txt", "r");
  final = fopen("energy.txt", "w");
  for (j = 0; j < 1000; j++) {
    fgets(buffer, line_length, before);
    sscanf(buffer, "%s %s %s %i %s %f %s %f %s %f", word_1[j], word_2[j], word_3[j], &atom_numb, word_4[j], &numb_1, word_5[j], &numb_2, word_6[j], &numb_3);
    if (strncmp(word_3[j], "internal", 8) == 0)
      break;
    else
      continue;
  }
  sscanf(buffer, "%s %s %s %f", word_1[j], word_2[j], word_3[j], &bef_int);
  fgets(buffer, line_length, before);
  sscanf(buffer, "%s %s %s %f", word_1[j], word_2[j], word_3[j], &bef_ext);
  fgets(buffer, line_length, before);
  sscanf(buffer, "%s %s %f", word_1[j], word_2[j], &bef_total);
  fgets(buffer, line_length, before);
  sscanf(buffer, "%f %s %s %s", &bef_nonbond, word_1[j], word_2[j], word_3[j]);
  fgets(buffer, line_length, before);
  sscanf(buffer, "%f %s %s %s", &bef_total, word_1[j], word_2[j], word_3[j]);
  for (j = 0; j < 1000; j++) {
    fgets(buffer, line_length, after);
    sscanf(buffer, "%s %s %s %i %s %f %s %f %s %f", word_1[j], word_2[j], word_3[j], &atom_numb, word_4[j], &numb_1, word_5[j], &numb_2, word_6[j], &numb_3);
    if (strncmp(word_3[j], "internal", 8) == 0)
      break;
    else
      continue;
  }
  sscanf(buffer, "%s %s %s %f", word_1[j], word_2[j], word_3[j], &aft_int);
  fgets(buffer, line_length, after);
  sscanf(buffer, "%s %s %s %f", word_1[j], word_2[j], word_3[j], &aft_ext);
  fgets(buffer, line_length, after);
  sscanf(buffer, "%s %s %f", word_1[j], word_2[j], &aft_total);
  fgets(buffer, line_length, after);
  sscanf(buffer, "%f %s %s %s", &aft_nonbond, word_1[j], word_2[j], word_3[j]);
  fgets(buffer, line_length, after);
  sscanf(buffer, "%f %s %s %s", &aft_total, word_1[j], word_2[j], word_3[j]);
  delta_energy = aft_total - bef_total;
  fprintf(final, " %f : %f : %f : %f : %f : %f", bef_total, aft_total, delta_energy, bef_nonbond, aft_nonbond, aft_nonbond - bef_nonbond);
  for (i = 0; i < 1000; ++i) {
    free(word_1[i]);
    free(word_2[i]);
    free(word_3[i]);
    free(word_4[i]);
    free(word_5[i]);
    free(word_6[i]);
  }
  fclose(before);
  fclose(after);
  fclose(final);
}
```