user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r12
  mov    $0x2,%edx
  mov    $0x4,%ecx
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  movdqa D19(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  movq   $0x2,0x20(%rsp)
  movaps %xmm0,(%rsp)
  movdqa D28(%rip),%xmm0
  mov    %rbx,%rax
  movaps %xmm0,0x10(%rsp)
  xchg   %ax,%ax
L154:
  movd   0x4(%rax),%xmm0
  movd   %ecx,%xmm1
  punpckldq %xmm1,%xmm0
  cmp    %ecx,0x4(%rax)
  jge    L188
  movq   %xmm0,(%rax)
L188:
  cmp    $0xa,%edx
  je     L97
  mov    (%rax),%ecx
  mov    0x8(%rax),%esi
  cmp    %esi,%ecx
  jle    L192
  mov    %esi,(%rax)
  mov    %ecx,0x8(%rax)
L192:
  cmp    $0x9,%edx
  je     L52
  mov    (%rax),%ecx
  mov    0xc(%rax),%esi
  cmp    %esi,%ecx
  jle    L63
  mov    %esi,(%rax)
  mov    %ecx,0xc(%rax)
L63:
  cmp    $0x8,%edx
  je     L52
  mov    (%rax),%ecx
  mov    0x10(%rax),%esi
  cmp    %esi,%ecx
  jle    L34
  mov    %esi,(%rax)
  mov    %ecx,0x10(%rax)
L34:
  cmp    $0x7,%edx
  je     L52
  mov    (%rax),%ecx
  mov    0x14(%rax),%esi
  cmp    %esi,%ecx
  jle    L110
  mov    %esi,(%rax)
  mov    %ecx,0x14(%rax)
L110:
  cmp    $0x6,%edx
  je     L52
  mov    (%rax),%ecx
  mov    0x18(%rax),%esi
  cmp    %esi,%ecx
  jle    L64
  mov    %esi,(%rax)
  mov    %ecx,0x18(%rax)
L64:
  cmp    $0x5,%edx
  je     L52
  mov    (%rax),%ecx
  mov    0x1c(%rax),%esi
  cmp    %esi,%ecx
  jle    L58
  mov    %esi,(%rax)
  mov    %ecx,0x1c(%rax)
L58:
  cmp    $0x4,%edx
  je     L52
  mov    (%rax),%ecx
  mov    0x20(%rax),%esi
  cmp    %esi,%ecx
  jle    L206
  mov    %esi,(%rax)
  mov    %ecx,0x20(%rax)
L206:
  cmp    $0x3,%edx
  je     L52
  mov    (%rax),%ecx
  mov    0x24(%rax),%esi
  cmp    %ecx,%esi
  jge    L190
  mov    %esi,(%rax)
  mov    %ecx,0x24(%rax)
L190:
  add    $0x1,%edx
  add    $0x4,%rax
  cmp    $0xb,%edx
  je     L97
  mov    (%rax),%ecx
  jmp    L154
  nopl   (%rax)
L52:
  add    $0x4,%rax
  add    $0x1,%edx
  mov    (%rax),%ecx
  jmp    L154
  xchg   %ax,%ax
L97:
  lea    0x28(%rbx),%r12
  lea    D2(%rip),%rbp
  nopl   0x0(%rax,%rax,1)
L168:
  mov    (%rbx),%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x4,%rbx
  call   <printf@plt>
  cmp    %rbx,%r12
  jne    L168
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L100
  add    $0x30,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L100:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D19
type_guessed: byte[16]
name: disassemble_data
arguments: data_label: D28
type_guessed: byte[16]
name: disassemble_data
arguments: data_label: D2
type_guessed: string

tool: {"D19": [0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x09,0x00,0x00,0x00]}

tool: {"D28": [0x09,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: D2: %3d

assistant: ```c
int main() {
  int a[10] = {4, 5, 3, 9, 9, 5, 2, 4, 2};
  int i, j, swap;
  for (i = 0; i <= 10 - 2; i++) {
    for (j = i + 1; j <= 10 - 1; j++) {
      if (a[i] > a[j]) {
        swap = a[i];
        a[i] = a[j];
        a[j] = swap;
      }
    }
  }
  for (i = 0; i < 10; i++) {
    printf("%3d", a[i]);
  }
  printf("\n");
  return 0;
}
```