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

```asm
<Sort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  movl   $0x40,-0x10(%rbp)
  jmp    L72
L76:
  mov    -0x10(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L91
L34:
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L85
L92:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  sub    %eax,-0x8(%rbp)
L85:
  cmpl   $0x0,-0x8(%rbp)
  js     L31
  cmpl   $0x0,-0x24(%rbp)
  je     L0
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%ecx
  mov    -0x10(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L92
  jmp    L31
L0:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%ecx
  mov    -0x10(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jl     L92
L31:
  addl   $0x1,-0xc(%rbp)
L91:
  cmpl   $0x7f,-0xc(%rbp)
  jle    L34
  mov    -0x10(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x10(%rbp)
L72:
  cmpl   $0x0,-0x10(%rbp)
  jg     L76
  nop
  pop    %rbp
  ret
```

assistant: ```c
Sort(rgKey, rgw, fAscending) int rgKey[], rgw[], fAscending;
{
  int gap, i, j, temp;
  for (gap = 128 / 2; gap > 0; gap /= 2)
    for (i = gap; i < 128; i++)
      for (j = i - gap; j >= 0 && (fAscending ? (rgKey[j] > rgKey[j + gap]) : (rgKey[j] < rgKey[j + gap])); j -= gap) {
        temp = rgKey[j];
        rgKey[j] = rgKey[j + gap];
        rgKey[j + gap] = temp;
        temp = rgw[j];
        rgw[j] = rgw[j + gap];
        rgw[j + gap] = temp;
      }
}
```