user: 请从给定的汇编指令推导出C源代码：

```asm
<sort_lines>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %esi,0xc(%rsp)
  mov    %edx,0x10(%rsp)
L138:
  mov    0xc(%rsp),%eax
  cmp    %eax,%edx
  jle    L71
L18:
  movslq %edx,%rax
  lea    -0x1(%rdx),%esi
  mov    0xc(%rsp),%ebx
  shl    $0x3,%rax
  mov    %esi,0x14(%rsp)
  mov    0x14(%rsp),%r12d
  lea    0x0(%rbp,%rax,1),%r14
  lea    -0x8(%rbp,%rax,1),%rax
  mov    %rax,0x18(%rsp)
  cmp    %r12d,%ebx
  jl     L76
  jmp    L7
  nopl   0x0(%rax)
L81:
  mov    (%r14),%rsi
  mov    (%r15),%rdi
  mov    %r13,%rdx
  mov    %rcx,(%rsp)
  call   <cmp@plt>
  test   %rax,%rax
  js     L121
  mov    (%rsp),%rcx
  sub    $0x1,%r12d
  lea    -0x8(%rbp,%rcx,1),%r15
L75:
  cmp    %ebx,%r12d
  jle    L108
L76:
  movslq %ebx,%rax
  mov    (%r14),%rsi
  mov    %r13,%rdx
  mov    0x0(%rbp,%rax,8),%rdi
  call   <cmp@plt>
  movslq %r12d,%rcx
  shl    $0x3,%rcx
  lea    0x0(%rbp,%rcx,1),%r15
  test   %rax,%rax
  jg     L81
  add    $0x1,%ebx
  cmp    %ebx,%r12d
  jg     L76
L108:
  mov    (%r14),%rsi
  mov    (%r15),%rdi
  mov    %r13,%rdx
  lea    0x1(%r12),%ebx
  call   <cmp@plt>
  test   %rax,%rax
  jg     L35
  mov    0xc(%rsp),%esi
  mov    %r13,%rcx
  mov    %r12d,%edx
  mov    %rbp,%rdi
  call   <sort_lines>
  cmp    %ebx,0x10(%rsp)
  jle    L71
L0:
  mov    0x14(%rsp),%r12d
  mov    %ebx,0xc(%rsp)
  cmp    %r12d,%ebx
  jl     L76
L7:
  mov    0x18(%rsp),%rax
  mov    (%r14),%rsi
  mov    %r13,%rdx
  mov    (%rax),%rdi
  call   <cmp@plt>
  test   %rax,%rax
  jg     L31
  mov    0x14(%rsp),%eax
  mov    %eax,0x10(%rsp)
  mov    %eax,%edx
  mov    0xc(%rsp),%eax
  cmp    %eax,%edx
  jg     L18
L71:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L121:
  mov    %r12d,%edx
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <swap@plt>
  jmp    L75
  nopw   0x0(%rax,%rax,1)
L35:
  mov    0x10(%rsp),%r15d
  mov    %r12d,%edx
  mov    %rbp,%rdi
  mov    %r15d,%esi
  call   <swap@plt>
  mov    0xc(%rsp),%esi
  mov    %r13,%rcx
  mov    %r12d,%edx
  mov    %rbp,%rdi
  call   <sort_lines>
  cmp    %ebx,%r15d
  jg     L0
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L31:
  mov    0x14(%rsp),%ebx
  mov    0x10(%rsp),%esi
  mov    %rbp,%rdi
  mov    %ebx,%edx
  call   <swap@plt>
  mov    %ebx,0x10(%rsp)
  mov    %ebx,%edx
  jmp    L138
```

assistant: ```c
void sort_lines(char *line_pointer_array[], int left, int right, int flags[]) {
  if (left >= right)
    return;
  int current_left = left, current_right = right - 1, pivot = right;
  while (current_left < current_right) {
    if (cmp(line_pointer_array[current_left], line_pointer_array[pivot], flags) <= 0) {
      ++current_left;
      continue;
    } else if (cmp(line_pointer_array[current_right], line_pointer_array[pivot], flags) >= 0) {
      --current_right;
      continue;
    } else
      swap(line_pointer_array, current_left, current_right);
  }
  if (cmp(line_pointer_array[current_right], line_pointer_array[pivot], flags) > 0)
    swap(line_pointer_array, pivot, current_right);
  sort_lines(line_pointer_array, left, current_right, flags);
  sort_lines(line_pointer_array, current_right + 1, right, flags);
}
```