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

```asm
<main>:
  endbr64
  push   %r15
  movabs $0x2020202020202020,%r15
  push   %r14
  movabs $0x2020202020202020,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rax
  movq   $0xfffffffffffffff3,0x28(%rsp)
  mov    %rax,0x10(%rsp)
  lea    0x24(%rsp),%rax
  mov    %rax,0x18(%rsp)
L41:
  mov    0x10(%rsp),%rdi
  mov    $0xa,%ecx
  xor    %eax,%eax
  mov    0x18(%rsp),%rbx
  rep stos %rax,%es:(%rdi)
  movl   $0x0,(%rdi)
  nopl   0x0(%rax,%rax,1)
L44:
  mov    $0x14,%esi
  lea    D97(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D45(%rip),%rdi
  mov    %rbx,%rsi
  call   <scanf@plt>
  mov    0x24(%rsp),%edi
  cmp    $0x14,%edi
  jg     L44
  test   %edi,%edi
  js     L109
  mov    $0x2710,%ebx
  lea    0x28(%rsp),%rbp
  nopl   (%rax)
L26:
  mov    %rbp,%rsi
  call   <gamdev@plt>
  cmp    $0x14,%eax
  ja     L17
  cltq
  mov    0x24(%rsp),%edi
  addl   $0x1,0x30(%rsp,%rax,4)
  sub    $0x1,%ebx
  jne    L26
L19:
  mov    %edi,%esi
  mov    $0x2710,%edx
  lea    D74(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D0(%rip),%rcx
  xor    %eax,%eax
  lea    D30(%rip),%rdx
  lea    D48(%rip),%rsi
  lea    D11(%rip),%rdi
  call   <printf@plt>
  movq   $0x0,(%rsp)
  lea    0x91(%rsp),%r13
  nopl   0x0(%rax)
L116:
  mov    (%rsp),%rax
  mov    0x10(%rsp),%rcx
  pxor   %xmm0,%xmm0
  mov    $0x32,%ebx
  movss  D1(%rip),%xmm1
  mov    %r14,0x0(%r13)
  cvtsi2ssl (%rcx,%rax,4),%xmm0
  divss  D24(%rip),%xmm0
  mov    %eax,%ebp
  mov    %r15,0x8(%r13)
  mulss  %xmm0,%xmm1
  mov    $0x2020,%eax
  mov    %r14,0x10(%r13)
  cvtss2sd %xmm0,%xmm0
  mov    %ax,0x30(%r13)
  mov    %r15,0x18(%r13)
  mov    %r14,0x20(%r13)
  mov    %r15,0x28(%r13)
  cvttss2si %xmm1,%eax
  cmp    %ebx,%eax
  cmovle %eax,%ebx
  test   %eax,%eax
  jle    L16
  lea    -0x1(%rbx),%edx
  mov    $0x2a,%esi
  mov    %r13,%rdi
  movsd  %xmm0,0x8(%rsp)
  add    $0x1,%rdx
  mov    $0x1,%r12d
  call   <memset@plt>
  movsd  0x8(%rsp),%xmm0
  mov    %ebp,%esi
  lea    D17(%rip),%rdi
  mov    $0x1,%eax
  lea    0x90(%rsp),%rbp
  call   <printf@plt>
  nopl   (%rax)
L62:
  movsbl 0x0(%rbp,%r12,1),%edi
  add    $0x1,%r12
  call   <putchar@plt>
  cmp    %r12d,%ebx
  jge    L62
L61:
  mov    $0xa,%edi
  call   <putchar@plt>
  addq   $0x1,(%rsp)
  mov    (%rsp),%rax
  cmp    $0x14,%rax
  jne    L116
  jmp    L41
  cs nopw 0x0(%rax,%rax,1)
L17:
  mov    0x24(%rsp),%edi
  sub    $0x1,%ebx
  jne    L26
  jmp    L19
L16:
  mov    %ebp,%esi
  lea    D17(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L61
L109:
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L65
  add    $0xd8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L65:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D97
datatype: string
name: extract_symbolic_data
arguments: data_tag: D45
datatype: string
name: extract_symbolic_data
arguments: data_tag: D74
datatype: string
name: extract_symbolic_data
arguments: data_tag: D0
datatype: string
name: extract_symbolic_data
arguments: data_tag: D30
datatype: string
name: extract_symbolic_data
arguments: data_tag: D48
datatype: string
name: extract_symbolic_data
arguments: data_tag: D11
datatype: string
name: extract_symbolic_data
arguments: data_tag: D1
datatype: byte[4]
name: extract_symbolic_data
arguments: data_tag: D24
datatype: byte[4]
name: extract_symbolic_data
arguments: data_tag: D17
datatype: string

tool: D97: Select order of Gamma distribution (n=1..%d), -1 to end


tool: D45: %d

tool: D74: 
gamma-distribution deviate, order %2d of %6d points


tool: D0: graph:

tool: D30: p(x)

tool: D48: x

tool: D11: %6s %7s %9s 


tool: {"D1": [0x00,0x00,0x48,0x43]}

tool: {"D24": [0x00,0x40,0x1c,0x46]}

tool: D17: %6d %8.4f  

assistant: ```c
int main(void) {
  char words[50 + 1];
  long idum = (-13);
  int i, ia, j, k, klim, dist[20 + 1];
  float dd;
  for (;;) {
    for (j = 0; j <= 20; j++)
      dist[j] = 0;
    do {
      printf("Select order of Gamma distribution (n=1..%d), -1 to end\n", 20);
      scanf("%d", &ia);
    } while (ia > 20);
    if (ia < 0)
      break;
    for (i = 1; i <= 10000; i++) {
      j = (int)gamdev(ia, &idum);
      if ((j >= 0) && (j <= 20))
        ++dist[j];
    }
    printf("\ngamma-distribution deviate, order %2d of %6d points\n", ia, 10000);
    printf("%6s %7s %9s \n", "x", "p(x)", "graph:");
    for (j = 0; j < 20; j++) {
      dd = (float)dist[j] / 10000;
      for (k = 1; k <= 50; k++)
        words[k] = ' ';
      klim = (int)(200 * dd);
      if (klim > 50)
        klim = 50;
      for (k = 1; k <= klim; k++)
        words[k] = '*';
      printf("%6d %8.4f  ", j, dd);
      for (k = 1; k <= klim; k++)
        printf("%c", words[k]);
      printf("\n");
    }
  }
  return 0;
}
```