user: Translate the below assembly code into C programming language:

```asm
<radix_sort>:
  endbr64
  push   %r15
  push   %r14
  mov    %esi,%r14d
  mov    %edx,%esi
  push   %r13
  push   %r12
  mov    %rdi,%r12
  mov    $0x2,%edi
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edx,0x10(%rsp)
  call   <pow@plt>
  mov    $0x4,%esi
  lea    0x1(%rax),%r15d
  mov    %eax,0xc(%rsp)
  mov    %rax,%rbp
  mov    %r15d,%edi
  call   <calloc@plt>
  mov    $0x4,%esi
  mov    %r14d,%edi
  mov    %rax,%rbx
  call   <calloc@plt>
  mov    0x10(%rsp),%edi
  mov    %rax,%r13
  call   <is_pow2@plt>
  mov    0xc(%rsp),%r11d
  test   %eax,%eax
  je     L55
  sub    $0x1,%ebp
  lea    D29(%rip),%rdi
  xor    %eax,%eax
  mov    %r11d,0xc(%rsp)
  mov    %ebp,%esi
  call   <printf@plt>
  lea    0x0(,%r15,4),%eax
  mov    0xc(%rsp),%r11d
  xor    %r15d,%r15d
  mov    %eax,0x14(%rsp)
  lea    -0x1(%r14),%eax
  add    $0x1,%rax
  mov    %rax,0x18(%rsp)
  nopw   0x0(%rax,%rax,1)
L18:
  mov    0x14(%rsp),%edx
  xor    %esi,%esi
  mov    %rbx,%rdi
  mov    %r11d,0xc(%rsp)
  call   <memset@plt>
  test   %r14d,%r14d
  mov    0xc(%rsp),%r11d
  jle    L0
  mov    0x18(%rsp),%rax
  mov    %r12,%rdx
  lea    (%r12,%rax,4),%rsi
  nopl   (%rax)
L9:
  mov    (%rdx),%eax
  mov    %r15d,%ecx
  add    $0x4,%rdx
  and    %ebp,%eax
  sar    %cl,%eax
  cltq
  addl   $0x1,0x4(%rbx,%rax,4)
  cmp    %rdx,%rsi
  jne    L9
  test   %r11d,%r11d
  jle    L4
L71:
  mov    $0x1,%eax
  nopl   0x0(%rax,%rax,1)
L99:
  mov    -0x4(%rbx,%rax,4),%edx
  add    %edx,(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r11d
  jge    L99
  test   %r14d,%r14d
  jle    L108
L4:
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L37:
  mov    (%r12,%rdx,4),%eax
  mov    %r15d,%ecx
  and    %ebp,%eax
  sar    %cl,%eax
  cltq
  lea    (%rbx,%rax,4),%rcx
  movslq (%rcx),%rax
  lea    0x1(%rax),%esi
  mov    %esi,(%rcx)
  mov    (%r12,%rdx,4),%ecx
  add    $0x1,%rdx
  mov    %ecx,0x0(%r13,%rax,4)
  cmp    %edx,%r14d
  jg     L37
L108:
  mov    %ebp,%esi
  xor    %eax,%eax
  lea    D22(%rip),%rdi
  mov    %r11d,0xc(%rsp)
  call   <printf@plt>
  mov    0x10(%rsp),%eax
  mov    0xc(%rsp),%r11d
  add    %eax,%r15d
  mov    %eax,%ecx
  mov    %r13,%rax
  mov    %r12,%r13
  shl    %cl,%ebp
  cmp    $0x1f,%r15d
  jg     L81
  mov    %rax,%r12
  jmp    L18
  nopl   0x0(%rax)
L81:
  add    $0x28,%rsp
  lea    D37(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10a0 <puts@plt>
  nopw   0x0(%rax,%rax,1)
L0:
  test   %r11d,%r11d
  jg     L71
  jmp    L108
L55:
  mov    0x10(%rsp),%esi
  add    $0x28,%rsp
  lea    D15(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <printf@plt>
```

tool_calls: name: read_data
arguments: data_label: D29
type_guessed: string
name: read_data
arguments: data_label: D22
type_guessed: string
name: read_data
arguments: data_label: D37
type_guessed: string
name: read_data
arguments: data_label: D15
type_guessed: string

tool: D29: initial keymask = %04X


tool: D22: keymask = %08X


tool: D37: radix_sort: exit

tool: D15: Size of subkey (%d) is not a power of 2. Exiting.


assistant: ```c
void radix_sort(uint32_t a[], uint32_t size_array, uint32_t size_subkey) {
  int range_value = (int)pow(2, size_subkey);
  uint32_t keymask = range_value - 1;
  int nr_bits = 32;
  uint32_t *count = calloc(range_value + 1, sizeof(uint32_t));
  uint32_t *interim = calloc(size_array, sizeof(uint32_t));
  uint32_t *p_inter_source = NULL;
  uint32_t *p_inter_dest = NULL;
  int i = 0;
  int key = 0;
  int fullkey = 0;
  int bit = 0;
  if (!is_pow2(size_subkey)) {
    printf("Size of subkey (%d) is not a power of 2. Exiting.\n", size_subkey);
    return;
  }
  printf("initial keymask = %04X\n", keymask);
  p_inter_source = &a[0];
  p_inter_dest = interim;
  for (bit = 0; bit < nr_bits; bit += size_subkey, keymask <<= size_subkey) {
    memset(count, 0, (range_value + 1) * sizeof(uint32_t));
    for (i = 0; i < size_array; i++) {
      fullkey = (p_inter_source[i] & keymask);
      key = fullkey >> bit;
      count[key + 1]++;
    }
    for (i = 1; i < (range_value + 1); i++) {
      count[i] += count[i - 1];
    }
    for (i = 0; i < size_array; i++) {
      fullkey = (p_inter_source[i] & keymask);
      key = fullkey >> bit;
      p_inter_dest[count[key]++] = p_inter_source[i];
    }
    {
      uint32_t *t = p_inter_dest;
      p_inter_dest = p_inter_source;
      p_inter_source = t;
    };
    printf("keymask = %08X\n", keymask);
  }
  if (nr_bits % 2) {
    for (i = 0; i < size_array; i++) {
      a[i] = interim[i];
    }
  }
  printf("radix_sort: exit\n");
}
```