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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xb0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x346,-0x90(%rbp)
  movl   $0x1ca,-0x8c(%rbp)
  movl   $0x3d1,-0x88(%rbp)
  movl   $0x11e,-0x84(%rbp)
  movl   $0x34a,-0x80(%rbp)
  movl   $0x372,-0x7c(%rbp)
  movl   $0x331,-0x78(%rbp)
  movl   $0x1b2,-0x74(%rbp)
  movl   $0x22d,-0x70(%rbp)
  movl   $0x263,-0x6c(%rbp)
  movl   $0x3,-0xa4(%rbp)
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movq   $0x0,-0xa0(%rbp)
  jmp    L55
L8:
  mov    -0xa0(%rbp),%rax
  mov    -0x90(%rbp,%rax,4),%edx
  mov    -0xa0(%rbp),%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addq   $0x1,-0xa0(%rbp)
L55:
  cmpq   $0x9,-0xa0(%rbp)
  jbe    L8
  movq   $0x0,-0x98(%rbp)
  jmp    L85
L29:
  movq   $0x0,-0xa0(%rbp)
  jmp    L86
L53:
  mov    -0xa0(%rbp),%rax
  mov    -0x90(%rbp,%rax,4),%eax
  mov    -0x98(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <getVal@plt>
  mov    -0xa0(%rbp),%rdx
  mov    %eax,-0x60(%rbp,%rdx,4)
  addq   $0x1,-0xa0(%rbp)
L86:
  cmpq   $0x9,-0xa0(%rbp)
  jbe    L53
  mov    -0x98(%rbp),%rax
  mov    %rax,%rsi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x30(%rbp),%rdx
  lea    -0x60(%rbp),%rsi
  lea    -0x90(%rbp),%rax
  mov    $0xa,%ecx
  mov    %rax,%rdi
  call   <counting_sort@plt>
  movq   $0x0,-0xa0(%rbp)
  jmp    L59
L83:
  mov    -0xa0(%rbp),%rax
  mov    -0x30(%rbp,%rax,4),%edx
  mov    -0xa0(%rbp),%rax
  mov    %edx,-0x90(%rbp,%rax,4)
  mov    -0xa0(%rbp),%rax
  mov    -0x30(%rbp,%rax,4),%edx
  mov    -0xa0(%rbp),%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addq   $0x1,-0xa0(%rbp)
L59:
  cmpq   $0x9,-0xa0(%rbp)
  jbe    L83
  addq   $0x1,-0x98(%rbp)
L85:
  mov    -0xa4(%rbp),%eax
  cltq
  cmp    %rax,-0x98(%rbp)
  jb     L29
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movq   $0x0,-0xa0(%rbp)
  jmp    L6
L7:
  mov    -0xa0(%rbp),%rax
  mov    -0x90(%rbp,%rax,4),%edx
  mov    -0xa0(%rbp),%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addq   $0x1,-0xa0(%rbp)
L6:
  cmpq   $0x9,-0xa0(%rbp)
  jbe    L7
  mov    $0x3,%esi
  mov    $0xa,%edi
  call   <pow@plt>
  mov    %eax,%esi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L77
  call   <__stack_chk_fail@plt>
L77:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D31
type: string
name: extract_symbolic_data
arguments: label: D21
type: string
name: extract_symbolic_data
arguments: label: D13
type: string
name: extract_symbolic_data
arguments: label: D15
type: string
name: extract_symbolic_data
arguments: label: D24
type: string

tool: D31: The test data is:

tool: D21: %zu	,%d,


tool: D13: For the %zuth digit sorting:


tool: D15: For the final sorted data:

tool: D24: ....%d


assistant: ```c
int main(void) {
  int srcdata[10] = {838, 458, 977, 286, 842, 882, 817, 434, 557, 611};
  int testdata[10];
  int rtndata[10];
  int digit = 3;
  size_t idx, jdx;
  printf("The test data is:\n");
  for (idx = 0; idx < 10; idx++) {
    printf("%zu\t,%d,\n", idx, srcdata[idx]);
  }
  for (jdx = 0; jdx < digit; jdx++) {
    for (idx = 0; idx < 10; idx++) {
      testdata[idx] = getVal(srcdata[idx], jdx);
    }
    printf("For the %zuth digit sorting:\n", jdx);
    counting_sort(srcdata, testdata, rtndata, 10);
    for (idx = 0; idx < 10; idx++) {
      srcdata[idx] = rtndata[idx];
      printf("%zu\t,%d,\n", idx, rtndata[idx]);
    }
  }
  printf("For the final sorted data:\n");
  for (idx = 0; idx < 10; idx++) {
    printf("%zu\t,%d,\n", idx, srcdata[idx]);
  }
  printf("....%d\n", (int)pow(10, 3));
  return 0;
}
```