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

```asm
<shellsort>:
  endbr64
  push   %r15
  mov    %esi,%eax
  push   %r14
  shr    $0x1f,%eax
  push   %r13
  add    %esi,%eax
  push   %r12
  sar    %eax
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,(%rsp)
  mov    %eax,0x38(%rsp)
  cmp    $0x1,%esi
  jle    L75
  lea    -0x1(%rsi),%eax
  mov    %esi,%r15d
  mov    $0x1,%esi
  mov    %eax,0x3c(%rsp)
  lea    0x4(%rdi,%rax,4),%rax
  mov    %r15d,%r14d
  mov    %rax,0x20(%rsp)
L72:
  cmp    0x38(%rsp),%r14d
  jle    L94
  mov    0x38(%rsp),%ecx
  mov    0x3c(%rsp),%eax
  movq   $0x0,0x28(%rsp)
  mov    (%rsp),%rdx
  sub    %ecx,%eax
  mov    %rax,0x30(%rsp)
  movslq %ecx,%rax
  lea    (%rdx,%rax,4),%rax
  mov    %rax,0x8(%rsp)
  mov    %ecx,%eax
  neg    %eax
  cltq
  mov    %rax,0x18(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L8:
  mov    0x38(%rsp),%ebp
  mov    0x28(%rsp),%rbx
  lea    D19(%rip),%r12
  add    %ebx,%ebp
  nopw   0x0(%rax,%rax,1)
L1:
  mov    (%rsp),%rax
  mov    (%rax,%rbx,4),%edx
  mov    0x8(%rsp),%rax
  mov    (%rax,%rbx,4),%eax
  cmp    %eax,%edx
  jle    L76
  mov    (%rsp),%r15
  lea    D9(%rip),%rdi
  mov    %eax,(%r15,%rbx,4)
  mov    0x8(%rsp),%rax
  mov    %edx,(%rax,%rbx,4)
  lea    0x1(%rsi),%eax
  mov    %eax,0x14(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x20(%rsp),%r13
  nopl   0x0(%rax)
L4:
  mov    (%r15),%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x4,%r15
  call   <printf@plt>
  cmp    %r15,%r13
  jne    L4
  lea    D37(%rip),%rdi
  xor    %eax,%eax
  xor    %r13d,%r13d
  call   <printf@plt>
  lea    D11(%rip),%r15
  jmp    L31
L36:
  cmp    %ebx,%r13d
  je     L18
  mov    %r15,%rdi
  xor    %eax,%eax
  add    $0x1,%r13d
  call   <printf@plt>
  cmp    %r13d,%r14d
  je     L10
L31:
  cmp    %r13d,%ebp
  jne    L36
L18:
  lea    D21(%rip),%rdi
  xor    %eax,%eax
  add    $0x1,%r13d
  call   <printf@plt>
  cmp    %r13d,%r14d
  jne    L31
L10:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    0x18(%rsp),%rbx
  mov    0x14(%rsp),%esi
  sub    0x38(%rsp),%ebp
  test   %ebx,%ebx
  jns    L1
L76:
  mov    0x28(%rsp),%rcx
  lea    0x1(%rcx),%rax
  cmp    0x30(%rsp),%rcx
  je     L94
  mov    %rax,0x28(%rsp)
  jmp    L8
L94:
  sarl   0x38(%rsp)
  jne    L72
L75:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: label: D19
type_guessed: string
name: parse_data
arguments: label: D9
type_guessed: string
name: parse_data
arguments: label: D37
type_guessed: string
name: parse_data
arguments: label: D11
type_guessed: string
name: parse_data
arguments: label: D21
type_guessed: string

tool: D19: %02d 

tool: D9: %d)	

tool: D37: 
	

tool: D11:    

tool: D21:  ^ 

assistant: ```c
void shellsort(int v[], int n) {
  int gap, temp;
  int e, ee, eee, lncnt = 1;
  for (gap = n / 2; gap > 0; gap /= 2) {
    for (e = gap; e < n; e++) {
      for (ee = e - gap; ee >= 0 && v[ee] > v[ee + gap]; ee -= gap) {
        temp = v[ee];
        v[ee] = v[ee + gap];
        v[ee + gap] = temp;
        printf("%d)\t", lncnt++);
        for (eee = 0; eee < n; ++eee) {
          printf("%02d ", v[eee]);
        }
        printf("\n\t");
        for (eee = 0; eee < n; ++eee) {
          if (eee == ee || eee == ee + gap) {
            printf(" ^ ");
          } else {
            printf("   ");
          }
        }
        printf("\n");
      }
    }
  }
}
```