user: Demonstrate the C code that generates the assembly output below:

```asm
<radix_sort>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbp
  mov    %esi,%r14d
  mov    %edx,0x10(%rsp)
  mov    %edx,%esi
  mov    $0x2,%edi
  call   <pow@plt>
  mov    %rax,%r12
  mov    %eax,0xc(%rsp)
  lea    0x1(%rax),%r13d
  mov    $0x4,%esi
  mov    %r13d,%edi
  call   <calloc@plt>
  mov    %rax,%rbx
  mov    $0x4,%esi
  mov    %r14d,%edi
  call   <calloc@plt>
  mov    %rax,%r15
  mov    0x10(%rsp),%edi
  call   <is_pow2@plt>
  test   %eax,%eax
  je     L31
  sub    $0x1,%r12d
  mov    %r12d,%esi
  lea    D16(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x0(,%r13,4),%eax
  mov    %eax,0x14(%rsp)
  lea    -0x1(%r14),%eax
  mov    $0x0,%r13d
  lea    0x4(,%rax,4),%rax
  mov    %rax,0x18(%rsp)
  jmp    L72
L31:
  mov    0x10(%rsp),%esi
  lea    D4(%rip),%rdi
  call   <printf@plt>
  jmp    L45
L16:
  lea    D35(%rip),%rdi
  call   <puts@plt>
L45:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L9:
  cmpl   $0x0,0xc(%rsp)
  jle    L107
L110:
  mov    $0x1,%eax
L46:
  mov    -0x4(%rbx,%rax,4),%edx
  add    %edx,(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,0xc(%rsp)
  jge    L46
  test   %r14d,%r14d
  jle    L107
L38:
  mov    $0x0,%edx
L88:
  mov    %r12d,%eax
  and    0x0(%rbp,%rdx,4),%eax
  mov    %r13d,%ecx
  sar    %cl,%eax
  cltq
  lea    (%rbx,%rax,4),%rcx
  mov    (%rcx),%eax
  lea    0x1(%rax),%esi
  mov    %esi,(%rcx)
  mov    0x0(%rbp,%rdx,4),%ecx
  cltq
  mov    %ecx,(%r15,%rax,4)
  add    $0x1,%rdx
  cmp    %edx,%r14d
  jg     L88
L107:
  mov    %r12d,%esi
  lea    D39(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x10(%rsp),%eax
  add    %eax,%r13d
  mov    %eax,%ecx
  shl    %cl,%r12d
  mov    %r15,%rax
  mov    %rbp,%r15
  cmp    $0x1f,%r13d
  jg     L16
  mov    %rax,%rbp
L72:
  mov    0x14(%rsp),%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  test   %r14d,%r14d
  jle    L9
  mov    %rbp,%rdx
  mov    0x18(%rsp),%rax
  lea    (%rax,%rbp,1),%rsi
L55:
  mov    %r12d,%eax
  and    (%rdx),%eax
  mov    %r13d,%ecx
  sar    %cl,%eax
  cltq
  addl   $0x1,0x4(%rbx,%rax,4)
  add    $0x4,%rdx
  cmp    %rdx,%rsi
  jne    L55
  cmpl   $0x0,0xc(%rsp)
  jg     L110
  jmp    L38
```

tool_calls: name: unpack_data
arguments: data_tag: D16
data_type: string
name: unpack_data
arguments: data_tag: D4
data_type: string
name: unpack_data
arguments: data_tag: D35
data_type: string
name: unpack_data
arguments: data_tag: D39
data_type: string

tool: D16: initial keymask = %04X


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


tool: D35: radix_sort: exit

tool: D39: keymask = %08X


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");
}
```