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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x14(%rbp)
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582ac,-0xc(%rbp)
  je     L313
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L313:
  movl   $0x1,-0x14(%rbp)
  jmp    L456
L114:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1,-0xc(%rbp)
  je     L408
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D202(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L408:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L456:
  mov    -0x14(%rbp),%eax
  cmp    $0x17,%eax
  jbe    L114
  movl   $0x18,-0x14(%rbp)
  jmp    L441
L139:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582ac,-0xc(%rbp)
  je     L38
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L38:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L441:
  mov    -0x14(%rbp),%eax
  cmp    $0x1f,%eax
  jbe    L139
  movl   $0x20,-0x14(%rbp)
  jmp    L400
L11:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x15829c,-0xc(%rbp)
  je     L326
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D75(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L326:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L400:
  mov    -0x14(%rbp),%eax
  cmp    $0x3f,%eax
  jbe    L11
  movl   $0x40,-0x14(%rbp)
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582ac,-0xc(%rbp)
  je     L327
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L327:
  movl   $0x0,-0x10(%rbp)
L76:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10e0 <lib$get_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1,-0xc(%rbp)
  jne    L344
  addl   $0x1,-0x10(%rbp)
L344:
  cmpl   $0x1,-0xc(%rbp)
  je     L76
  cmpl   $0x37,-0x10(%rbp)
  je     L57
  lea    D176(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L57:
  cmpl   $0x158294,-0xc(%rbp)
  jne    L265
  mov    -0x14(%rbp),%eax
  cmp    $0xffffffff,%eax
  je     L508
L265:
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D114(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L508:
  movl   $0x0,-0x14(%rbp)
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582ac,-0xc(%rbp)
  je     L550
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L550:
  movl   $0x1,-0x14(%rbp)
  jmp    L254
L543:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1,-0xc(%rbp)
  je     L293
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D202(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L293:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L254:
  mov    -0x14(%rbp),%eax
  cmp    $0x17,%eax
  jbe    L543
  movl   $0x18,-0x14(%rbp)
  jmp    L429
L369:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582ac,-0xc(%rbp)
  je     L226
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L226:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L429:
  mov    -0x14(%rbp),%eax
  cmp    $0x1f,%eax
  jbe    L369
  movl   $0x20,-0x14(%rbp)
  jmp    L422
L568:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1,-0xc(%rbp)
  je     L27
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D98(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L27:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L422:
  mov    -0x14(%rbp),%eax
  cmp    $0x3f,%eax
  jbe    L568
  movl   $0x40,-0x14(%rbp)
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582ac,-0xc(%rbp)
  je     L84
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L84:
  movl   $0x1,-0x14(%rbp)
  jmp    L447
L281:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x15829c,-0xc(%rbp)
  je     L150
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D190(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L150:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L447:
  mov    -0x14(%rbp),%eax
  cmp    $0x17,%eax
  jbe    L281
  movl   $0x18,-0x14(%rbp)
  jmp    L366
L509:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582ac,-0xc(%rbp)
  je     L407
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L407:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L366:
  mov    -0x14(%rbp),%eax
  cmp    $0x1f,%eax
  jbe    L509
  movl   $0x20,-0x14(%rbp)
  jmp    L498
L206:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10f0 <lib$free_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x15829c,-0xc(%rbp)
  je     L224
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D75(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L224:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L498:
  mov    -0x14(%rbp),%eax
  cmp    $0x3f,%eax
  jbe    L206
  movl   $0x0,-0x14(%rbp)
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10b0 <lib$reserve_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582ac,-0xc(%rbp)
  je     L558
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D94(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L558:
  movl   $0x1,-0x14(%rbp)
  jmp    L248
L492:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10b0 <lib$reserve_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1,-0xc(%rbp)
  je     L356
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L356:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L248:
  mov    -0x14(%rbp),%eax
  cmp    $0x17,%eax
  jbe    L492
  movl   $0x18,-0x14(%rbp)
  jmp    L263
L208:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10b0 <lib$reserve_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582ac,-0xc(%rbp)
  je     L514
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D94(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L514:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L263:
  mov    -0x14(%rbp),%eax
  cmp    $0x1f,%eax
  jbe    L208
  movl   $0x20,-0x14(%rbp)
  jmp    L298
L338:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10b0 <lib$reserve_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1,-0xc(%rbp)
  je     L442
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L442:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L298:
  mov    -0x14(%rbp),%eax
  cmp    $0x3f,%eax
  jbe    L338
  movl   $0x40,-0x14(%rbp)
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10b0 <lib$reserve_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582ac,-0xc(%rbp)
  je     L128
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D94(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L128:
  movl   $0x1,-0x14(%rbp)
  jmp    L305
L547:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10b0 <lib$reserve_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582a4,-0xc(%rbp)
  je     L504
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L504:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L305:
  mov    -0x14(%rbp),%eax
  cmp    $0x17,%eax
  jbe    L547
  movl   $0x18,-0x14(%rbp)
  jmp    L541
L186:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10b0 <lib$reserve_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582ac,-0xc(%rbp)
  je     L10
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D94(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L10:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L541:
  mov    -0x14(%rbp),%eax
  cmp    $0x1f,%eax
  jbe    L186
  movl   $0x20,-0x14(%rbp)
  jmp    L194
L37:
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   10b0 <lib$reserve_ef@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1582a4,-0xc(%rbp)
  je     L295
  mov    -0x14(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L295:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L194:
  mov    -0x14(%rbp),%eax
  cmp    $0x3f,%eax
  jbe    L37
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L545
  call   <__stack_chk_fail@plt>
L545:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D37
type_guessed: string
name: parse_data
arguments: label: D202
type_guessed: string
name: parse_data
arguments: label: D75
type_guessed: string
name: parse_data
arguments: label: D176
type_guessed: string
name: parse_data
arguments: label: D114
type_guessed: string
name: parse_data
arguments: label: D98
type_guessed: string
name: parse_data
arguments: label: D190
type_guessed: string
name: parse_data
arguments: label: D94
type_guessed: string
name: parse_data
arguments: label: D10
type_guessed: string
name: parse_data
arguments: label: D135
type_guessed: string

tool: D37: Broken: Can never free event flag %d, status %u


tool: D202: Broken: Should be able to free 1-13, efn %d, status %u


tool: D75: Broken: Should already be free 32-63, efn %d, status %u


tool: D176: Broken:  Couldn't reserve 55 event flags

tool: D114: Broken: wrong status returned from lib$get_ef, status = %u


tool: D98: Broken: Should be able to free 32-63, efn %d, status %u


tool: D190: Broken: Should already be free 1-23, efn %d, status %u


tool: D94: Broken: Can never reserve event flag %d, status %u


tool: D10: Broken: Should be able to reserve 1-23, efn %d, status %u


tool: D135: Broken: Should be able to reserve 32-63, efn %d, status %u


assistant: ```c
int main(void) {
  unsigned int efn = 0;
  unsigned int status = lib$free_ef(&efn);
  if (status != 0x001582AC)
    printf("Broken: Can never free event flag %d, status %u\n", efn, status);
  for (efn = 1; efn <= 23; efn++) {
    status = lib$free_ef(&efn);
    if (status != 1)
      printf("Broken: Should be able to free 1-13, efn %d, status %u\n", efn, status);
  }
  for (efn = 24; efn <= 31; efn++) {
    status = lib$free_ef(&efn);
    if (status != 0x001582AC)
      printf("Broken: Can never free event flag %d, status %u\n", efn, status);
  }
  for (efn = 32; efn <= 63; efn++) {
    status = lib$free_ef(&efn);
    if (status != 0x0015829C)
      printf("Broken: Should already be free 32-63, efn %d, status %u\n", efn, status);
  }
  efn = 64;
  status = lib$free_ef(&efn);
  if (status != 0x001582AC)
    printf("Broken: Can never free event flag %d, status %u\n", efn, status);
  int cnt = 0;
  do {
    status = lib$get_ef(&efn);
    if (status == 1)
      cnt++;
  } while (status == 1);
  if (cnt != 55)
    printf("Broken:  Couldn't reserve 55 event flags\n");
  if (status != 0x00158294 || efn != (unsigned int)-1)
    printf("Broken: wrong status returned from lib$get_ef, status = %u\n", status);
  efn = 0;
  status = lib$free_ef(&efn);
  if (status != 0x001582AC)
    printf("Broken: Can never free event flag %d, status %u\n", efn, status);
  for (efn = 1; efn <= 23; efn++) {
    status = lib$free_ef(&efn);
    if (status != 1)
      printf("Broken: Should be able to free 1-13, efn %d, status %u\n", efn, status);
  }
  for (efn = 24; efn <= 31; efn++) {
    status = lib$free_ef(&efn);
    if (status != 0x001582AC)
      printf("Broken: Can never free event flag %d, status %u\n", efn, status);
  }
  for (efn = 32; efn <= 63; efn++) {
    status = lib$free_ef(&efn);
    if (status != 1)
      printf("Broken: Should be able to free 32-63, efn %d, status %u\n", efn, status);
  }
  efn = 64;
  status = lib$free_ef(&efn);
  if (status != 0x001582AC)
    printf("Broken: Can never free event flag %d, status %u\n", efn, status);
  for (efn = 1; efn <= 23; efn++) {
    status = lib$free_ef(&efn);
    if (status != 0x0015829C)
      printf("Broken: Should already be free 1-23, efn %d, status %u\n", efn, status);
  }
  for (efn = 24; efn <= 31; efn++) {
    status = lib$free_ef(&efn);
    if (status != 0x001582AC)
      printf("Broken: Can never free event flag %d, status %u\n", efn, status);
  }
  for (efn = 32; efn <= 63; efn++) {
    status = lib$free_ef(&efn);
    if (status != 0x0015829C)
      printf("Broken: Should already be free 32-63, efn %d, status %u\n", efn, status);
  }
  efn = 0;
  status = lib$reserve_ef(&efn);
  if (status != 0x001582AC)
    printf("Broken: Can never reserve event flag %d, status %u\n", efn, status);
  for (efn = 1; efn <= 23; efn++) {
    status = lib$reserve_ef(&efn);
    if (status != 1)
      printf("Broken: Should be able to reserve 1-23, efn %d, status %u\n", efn, status);
  }
  for (efn = 24; efn <= 31; efn++) {
    status = lib$reserve_ef(&efn);
    if (status != 0x001582AC)
      printf("Broken: Can never reserve event flag %d, status %u\n", efn, status);
  }
  for (efn = 32; efn <= 63; efn++) {
    status = lib$reserve_ef(&efn);
    if (status != 1)
      printf("Broken: Should be able to reserve 32-63, efn %d, status %u\n", efn, status);
  }
  efn = 64;
  status = lib$reserve_ef(&efn);
  if (status != 0x001582AC)
    printf("Broken: Can never reserve event flag %d, status %u\n", efn, status);
  for (efn = 1; efn <= 23; efn++) {
    status = lib$reserve_ef(&efn);
    if (status != 0x001582A4)
      printf("Broken: Should be able to reserve 32-63, efn %d, status %u\n", efn, status);
  }
  for (efn = 24; efn <= 31; efn++) {
    status = lib$reserve_ef(&efn);
    if (status != 0x001582AC)
      printf("Broken: Can never reserve event flag %d, status %u\n", efn, status);
  }
  for (efn = 32; efn <= 63; efn++) {
    status = lib$reserve_ef(&efn);
    if (status != 0x001582A4)
      printf("Broken: Should be able to reserve 32-63, efn %d, status %u\n", efn, status);
  }
  return 0;
}
```