user: What is the c source code of the assembly code below:

```asm
<maxflow_setup_backedges>:
  endbr64
  test   %edi,%edi
  jle    L121
  push   %r15
  mov    %edi,%r9d
  mov    %rsi,%r15
  xor    %eax,%eax
  push   %r14
  mov    %rdx,%r14
  movslq %edi,%rdx
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  nopl   0x0(%rax)
L46:
  mov    %eax,(%r14,%rax,4)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L46
  xor    %r11d,%r11d
  nopl   0x0(%rax,%rax,1)
L302:
  mov    %r11d,%eax
  test   %r11d,%r11d
  je     L79
  nopl   0x0(%rax,%rax,1)
L67:
  movslq %eax,%rdx
  lea    -0x1(%rdx),%eax
  lea    (%r14,%rdx,4),%rsi
  sar    %eax
  mov    (%rsi),%r10d
  movslq %eax,%rcx
  lea    (%r14,%rcx,4),%r8
  lea    (%r10,%r10,1),%edx
  mov    (%r8),%edi
  movslq %edx,%rdx
  mov    0x4(%r15,%rdx,4),%ebx
  lea    (%rdi,%rdi,1),%ecx
  movslq %ecx,%rcx
  cmp    %ebx,0x4(%r15,%rcx,4)
  jl     L68
  jne    L79
  mov    (%r15,%rdx,4),%ebx
  cmp    %ebx,(%r15,%rcx,4)
  jge    L79
L68:
  mov    %r10d,(%r8)
  mov    %edi,(%rsi)
  test   %eax,%eax
  jne    L67
L79:
  add    $0x1,%r11d
  cmp    %r11d,%r9d
  jne    L302
  sub    $0x1,%r9d
  movslq %r9d,%rax
  mov    %rax,-0x8(%rsp)
  nopl   0x0(%rax)
L53:
  mov    -0x8(%rsp),%rdi
  mov    (%r14),%eax
  mov    (%r14,%rdi,4),%edx
  mov    %edi,-0xc(%rsp)
  mov    %edx,(%r14)
  mov    %eax,(%r14,%rdi,4)
  cmp    $0x1,%edi
  jle    L3
  cmp    $0x2,%edi
  je     L259
  mov    $0x2,%r13d
  mov    $0x1,%esi
  xor    %eax,%eax
  jmp    L88
  nopl   0x0(%rax,%rax,1)
L31:
  je     L200
L59:
  mov    %ebp,(%rdi)
  movslq %esi,%rax
  mov    %ecx,(%rbx)
L212:
  lea    (%rax,%rax,1),%r13d
  mov    -0xc(%rsp),%ebx
  lea    0x1(%r13),%esi
  add    $0x2,%r13d
  cmp    %ebx,%esi
  jge    L157
  cmp    %ebx,%r13d
  jge    L146
L88:
  movslq %esi,%rdx
  lea    (%r14,%rax,4),%rdi
  lea    (%r14,%rdx,4),%rbx
  mov    (%rdi),%ecx
  mov    (%rbx),%ebp
  lea    (%rcx,%rcx,1),%eax
  lea    0x0(%rbp,%rbp,1),%edx
  cltq
  movslq %edx,%rdx
  mov    0x4(%r15,%rax,4),%r11d
  mov    %rdx,-0x18(%rsp)
  mov    0x4(%r15,%rdx,4),%r8d
  movslq %r13d,%rdx
  lea    (%r14,%rdx,4),%r9
  mov    (%r9),%r10d
  lea    (%r10,%r10,1),%edx
  movslq %edx,%rdx
  mov    0x4(%r15,%rdx,4),%r12d
  mov    %r12d,-0x10(%rsp)
  cmp    %r8d,%r11d
  jl     L214
  je     L22
L220:
  cmp    -0x10(%rsp),%r11d
  jl     L247
  jne    L157
  mov    (%r15,%rdx,4),%r11d
  cmp    %r11d,(%r15,%rax,4)
  jge    L157
L214:
  cmp    -0x10(%rsp),%r8d
  jge    L31
L247:
  mov    %r10d,(%rdi)
  movslq %r13d,%rax
  mov    %ecx,(%r9)
  jmp    L212
  xchg   %ax,%ax
L22:
  mov    -0x18(%rsp),%r12
  mov    (%r15,%r12,4),%r12d
  cmp    %r12d,(%r15,%rax,4)
  jl     L214
  jmp    L220
  nopl   0x0(%rax)
L200:
  mov    (%r15,%rdx,4),%eax
  mov    -0x18(%rsp),%rdx
  cmp    %eax,(%r15,%rdx,4)
  jge    L59
  mov    %r10d,(%rdi)
  movslq %r13d,%rax
  mov    %ecx,(%r9)
  jmp    L212
  nopl   0x0(%rax)
L146:
  lea    (%r14,%rax,4),%rdi
  movslq %esi,%rax
  shl    $0x2,%rax
L217:
  add    %r14,%rax
  mov    (%rdi),%esi
  mov    (%rax),%r8d
  lea    (%rsi,%rsi,1),%ecx
  lea    (%r8,%r8,1),%edx
  movslq %ecx,%rcx
  movslq %edx,%rdx
  mov    0x4(%r15,%rdx,4),%ebx
  cmp    %ebx,0x4(%r15,%rcx,4)
  jl     L140
  jne    L157
  mov    (%r15,%rdx,4),%ebx
  cmp    %ebx,(%r15,%rcx,4)
  jge    L157
  nopl   0x0(%rax,%rax,1)
L140:
  mov    %r8d,(%rdi)
  mov    %esi,(%rax)
L157:
  subq   $0x1,-0x8(%rsp)
  jmp    L53
L3:
  mov    -0x8(%rsp),%eax
  test   %eax,%eax
  jne    L157
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L259:
  mov    %r14,%rdi
  mov    $0x4,%eax
  jmp    L217
L121:
  ret
```

assistant: ```c
void maxflow_setup_backedges(int ne, const int *edges, int *backedges) {
  int i, n;
  for (i = 0; i < ne; i++)
    backedges[i] = i;
  n = 0;
  while (n < ne) {
    n++;
    i = n - 1;
    while (i > 0) {
      int p = (((i)-1) / 2);
      if (((edges[2 * (backedges[p]) + 1] < edges[2 * (backedges[i]) + 1]) || (edges[2 * (backedges[p]) + 1] == edges[2 * (backedges[i]) + 1] && edges[2 * (backedges[p])] < edges[2 * (backedges[i])]))) {
        do {
          int swaptmp = (backedges[p]);
          (backedges[p]) = (backedges[i]);
          (backedges[i]) = swaptmp;
        } while (0);
        i = p;
      } else
        break;
    }
  }
  while (n > 0) {
    n--;
    do {
      int swaptmp = (backedges[0]);
      (backedges[0]) = (backedges[n]);
      (backedges[n]) = swaptmp;
    } while (0);
    i = 0;
    while (1) {
      int lc, rc;
      lc = (2 * (i) + 1);
      rc = (2 * (i) + 2);
      if (lc >= n)
        break;
      if (rc >= n) {
        if (((edges[2 * (backedges[i]) + 1] < edges[2 * (backedges[lc]) + 1]) || (edges[2 * (backedges[i]) + 1] == edges[2 * (backedges[lc]) + 1] && edges[2 * (backedges[i])] < edges[2 * (backedges[lc])])))
          do {
            int swaptmp = (backedges[i]);
            (backedges[i]) = (backedges[lc]);
            (backedges[lc]) = swaptmp;
          } while (0);
        break;
      } else {
        if (((edges[2 * (backedges[i]) + 1] < edges[2 * (backedges[lc]) + 1]) || (edges[2 * (backedges[i]) + 1] == edges[2 * (backedges[lc]) + 1] && edges[2 * (backedges[i])] < edges[2 * (backedges[lc])])) || ((edges[2 * (backedges[i]) + 1] < edges[2 * (backedges[rc]) + 1]) || (edges[2 * (backedges[i]) + 1] == edges[2 * (backedges[rc]) + 1] && edges[2 * (backedges[i])] < edges[2 * (backedges[rc])]))) {
          if (((edges[2 * (backedges[lc]) + 1] < edges[2 * (backedges[rc]) + 1]) || (edges[2 * (backedges[lc]) + 1] == edges[2 * (backedges[rc]) + 1] && edges[2 * (backedges[lc])] < edges[2 * (backedges[rc])]))) {
            do {
              int swaptmp = (backedges[i]);
              (backedges[i]) = (backedges[rc]);
              (backedges[rc]) = swaptmp;
            } while (0);
            i = rc;
          } else {
            do {
              int swaptmp = (backedges[i]);
              (backedges[i]) = (backedges[lc]);
              (backedges[lc]) = swaptmp;
            } while (0);
            i = lc;
          }
        } else {
          break;
        }
      }
    }
  }
}
```