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

```asm
<Partition>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %esi,-0x7c(%rbp)
  mov    %edx,-0x80(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  movl   $0x0,-0x60(%rbp)
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x5c(%rbp)
  mov    -0x80(%rbp),%eax
  sub    -0x7c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x58(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L161:
  cmp    %rdx,%rsp
  je     L153
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L161
L153:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L70
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L70:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x80(%rbp),%eax
  sub    -0x7c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L150:
  cmp    %rdx,%rsp
  je     L99
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L150
L99:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L174
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L174:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  movl   $0x0,-0x70(%rbp)
  movl   $0x0,-0x6c(%rbp)
  movl   $0x0,-0x68(%rbp)
  movl   $0x0,-0x64(%rbp)
  mov    -0x7c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x68(%rbp)
  jmp    L139
L45:
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x5c(%rbp)
  jge    L60
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x70(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x70(%rbp)
  mov    (%rcx),%ecx
  mov    -0x40(%rbp),%rdx
  cltq
  mov    %ecx,(%rdx,%rax,4)
  jmp    L42
L60:
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x5c(%rbp)
  jle    L42
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x6c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x6c(%rbp)
  mov    (%rcx),%ecx
  mov    -0x50(%rbp),%rdx
  cltq
  mov    %ecx,(%rdx,%rax,4)
L42:
  addl   $0x1,-0x68(%rbp)
L139:
  mov    -0x68(%rbp),%eax
  cmp    -0x80(%rbp),%eax
  jle    L45
  movl   $0x0,-0x68(%rbp)
  mov    -0x7c(%rbp),%eax
  mov    %eax,-0x64(%rbp)
  jmp    L113
L168:
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x50(%rbp),%rax
  mov    -0x68(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,(%rcx)
  addl   $0x1,-0x68(%rbp)
  addl   $0x1,-0x64(%rbp)
L113:
  mov    -0x68(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  jl     L168
  mov    -0x7c(%rbp),%edx
  mov    -0x6c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x60(%rbp)
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rax,%rdx
  mov    -0x5c(%rbp),%eax
  mov    %eax,(%rdx)
  movl   $0x0,-0x68(%rbp)
  mov    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x64(%rbp)
  jmp    L33
L68:
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x40(%rbp),%rax
  mov    -0x68(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,(%rcx)
  addl   $0x1,-0x68(%rbp)
  addl   $0x1,-0x64(%rbp)
L33:
  mov    -0x68(%rbp),%eax
  cmp    -0x70(%rbp),%eax
  jl     L68
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x7c(%rbp),%eax
  mov    %eax,-0x68(%rbp)
  jmp    L69
L112:
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x68(%rbp)
L69:
  mov    -0x68(%rbp),%eax
  cmp    -0x80(%rbp),%eax
  jle    L112
  mov    -0x60(%rbp),%eax
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L62
  call   <__stack_chk_fail@plt>
L62:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: data_label: D5
data_type: string

tool: D5: %d 

assistant: ```c
int Partition(int a[], int start, int end) {
  int pos = 0, val = a[start];
  int b[end - start], c[end - start], k = 0, l = 0, i = 0, m = 0;
  for (i = start + 1; i <= end; i++) {
    if (a[i] > val)
      c[k++] = a[i];
    else if (a[i] < val)
      b[l++] = a[i];
  }
  for (i = 0, m = start; i < l; i++, m++)
    a[m] = b[i];
  pos = start + l;
  a[pos] = val;
  for (i = 0, m = pos + 1; i < k; i++, m++)
    a[m] = c[i];
  printf("\n");
  for (i = start; i <= end; i++)
    printf("%d ", a[i]);
  return pos;
}
```