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

```asm
<two_sum>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %ecx,-0x34(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    %r9,-0x48(%rbp)
  jmp    L91
L16:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jge    L11
  addl   $0x1,-0x2c(%rbp)
  jmp    L91
L11:
  mov    -0x14(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L13
  subl   $0x1,-0x30(%rbp)
  jmp    L91
L13:
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    $0xc,%edi
  call   <malloc@plt>
  mov    %rax,(%rbx)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x34(%rbp),%edx
  neg    %edx
  mov    %edx,(%rax)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x4(%rax),%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x8(%rax),%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,(%rax)
  nop
L32:
  addl   $0x1,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jge    L93
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L32
L93:
  nop
L66:
  subl   $0x1,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L91
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L66
L91:
  mov    -0x2c(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L16
  nop
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void two_sum(int *nums, int low, int high, int target, int **results, int *count) {
  while (low < high) {
    int sum = nums[low] + nums[high];
    if (sum < target) {
      low++;
    } else if (sum > target) {
      high--;
    } else {
      results[*count] = malloc(3 * sizeof(int));
      results[*count][0] = -target;
      results[*count][1] = nums[low];
      results[*count][2] = nums[high];
      (*count)++;
      while (++low < high && nums[low] == nums[low - 1]) {
      }
      while (--high > low && nums[high] == nums[high + 1]) {
      }
    }
  }
}
```