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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0xfffffffffffffff3,-0xa8(%rbp)
L159:
  movl   $0x0,-0xb8(%rbp)
  jmp    L130
L110:
  mov    -0xb8(%rbp),%eax
  cltq
  movl   $0x0,-0xa0(%rbp,%rax,4)
  addl   $0x1,-0xb8(%rbp)
L130:
  cmpl   $0x14,-0xb8(%rbp)
  jle    L110
L153:
  mov    $0x14,%esi
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0xc0(%rbp),%rax
  mov    %rax,%rsi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0xc0(%rbp),%eax
  cmp    $0x14,%eax
  jg     L153
  mov    -0xc0(%rbp),%eax
  test   %eax,%eax
  js     L7
  movl   $0x1,-0xbc(%rbp)
  jmp    L18
L23:
  mov    -0xc0(%rbp),%eax
  lea    -0xa8(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <gamdev@plt>
  mov    %eax,-0xb8(%rbp)
  cmpl   $0x0,-0xb8(%rbp)
  js     L180
  cmpl   $0x14,-0xb8(%rbp)
  jg     L180
  mov    -0xb8(%rbp),%eax
  cltq
  mov    -0xa0(%rbp,%rax,4),%eax
  lea    0x1(%rax),%edx
  mov    -0xb8(%rbp),%eax
  cltq
  mov    %edx,-0xa0(%rbp,%rax,4)
L180:
  addl   $0x1,-0xbc(%rbp)
L18:
  cmpl   $0x2710,-0xbc(%rbp)
  jle    L23
  mov    -0xc0(%rbp),%eax
  mov    $0x2710,%edx
  mov    %eax,%esi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D36(%rip),%rax
  mov    %rax,%rcx
  lea    D43(%rip),%rax
  mov    %rax,%rdx
  lea    D89(%rip),%rax
  mov    %rax,%rsi
  lea    D77(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0xb8(%rbp)
  jmp    L150
L98:
  mov    -0xb8(%rbp),%eax
  cltq
  mov    -0xa0(%rbp,%rax,4),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  D73(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0xac(%rbp)
  movl   $0x1,-0xb4(%rbp)
  jmp    L77
L181:
  mov    -0xb4(%rbp),%eax
  cltq
  movb   $0x20,-0x40(%rbp,%rax,1)
  addl   $0x1,-0xb4(%rbp)
L77:
  cmpl   $0x32,-0xb4(%rbp)
  jle    L181
  movss  -0xac(%rbp),%xmm1
  movss  D32(%rip),%xmm0
  mulss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xb0(%rbp)
  cmpl   $0x32,-0xb0(%rbp)
  jle    L8
  movl   $0x32,-0xb0(%rbp)
L8:
  movl   $0x1,-0xb4(%rbp)
  jmp    L32
L6:
  mov    -0xb4(%rbp),%eax
  cltq
  movb   $0x2a,-0x40(%rbp,%rax,1)
  addl   $0x1,-0xb4(%rbp)
L32:
  mov    -0xb4(%rbp),%eax
  cmp    -0xb0(%rbp),%eax
  jle    L6
  pxor   %xmm2,%xmm2
  cvtss2sd -0xac(%rbp),%xmm2
  movq   %xmm2,%rdx
  mov    -0xb8(%rbp),%eax
  movq   %rdx,%xmm0
  mov    %eax,%esi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movl   $0x1,-0xb4(%rbp)
  jmp    L105
L140:
  mov    -0xb4(%rbp),%eax
  cltq
  movzbl -0x40(%rbp,%rax,1),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  addl   $0x1,-0xb4(%rbp)
L105:
  mov    -0xb4(%rbp),%eax
  cmp    -0xb0(%rbp),%eax
  jle    L140
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0xb8(%rbp)
L150:
  cmpl   $0x13,-0xb8(%rbp)
  jle    L98
  jmp    L159
L7:
  nop
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L184
  call   <__stack_chk_fail@plt>
L184:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D19
type_infered: string
name: read_data
arguments: data_label: D38
type_infered: string
name: read_data
arguments: data_label: D15
type_infered: string
name: read_data
arguments: data_label: D36
type_infered: string
name: read_data
arguments: data_label: D43
type_infered: string
name: read_data
arguments: data_label: D89
type_infered: string
name: read_data
arguments: data_label: D77
type_infered: string
name: read_data
arguments: data_label: D73
type_infered: byte[4]
name: read_data
arguments: data_label: D32
type_infered: byte[4]
name: read_data
arguments: data_label: D24
type_infered: string

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


tool: D38: %d

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


tool: D36: graph:

tool: D43: p(x)

tool: D89: x

tool: D77: %6s %7s %9s 


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

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

tool: D24: %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;
}
```