user: Please show me the C implementation that matches the assembly code listed below:

```asm
<bpflow>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,0x10(%rsp)
  mov    %rdx,0x8(%rsp)
  mov    %rcx,%rbp
  mov    %r9,%rbx
  mov    0x60(%rsp),%r13
  mov    0x68(%rsp),%r15
  lea    (%rdi,%rsi,1),%r12d
  test   %r12d,%r12d
  jle    L40
  mov    %r12d,%ecx
  mov    $0x0,%eax
L146:
  mov    (%r8,%rax,4),%edx
  mov    %edx,(%rbx,%rax,4)
  movl   $0x0,(%r15,%rax,4)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L146
L40:
  movslq 0x10(%rsp),%rcx
  lea    0x0(,%rcx,4),%rdi
  mov    0x8(%rsp),%r11
  lea    (%r11,%rdi,1),%r10
  mov    (%r10),%eax
  movslq %r12d,%rdx
  lea    (%r11,%rdx,4),%rdx
  cmp    (%rdx),%eax
  jge    L195
  cltq
L175:
  movl   $0x0,0x0(%r13,%rax,4)
  add    $0x1,%rax
  cmp    %eax,(%rdx)
  jg     L175
L195:
  cmp    %r12d,0x10(%rsp)
  jge    L87
  add    %rbx,%rdi
  lea    -0x1(%rsi),%eax
  add    %rcx,%rax
  lea    0x4(%rbx,%rax,4),%r11
  jmp    L89
L92:
  add    $0x1,%rdx
  cmp    %edx,0x4(%r8)
  jle    L0
L157:
  mov    (%rdi),%eax
  test   %eax,%eax
  je     L0
  movslq 0x0(%rbp,%rdx,4),%rcx
  lea    (%rbx,%rcx,4),%rsi
  mov    (%rsi),%ecx
  test   %ecx,%ecx
  je     L92
  cmp    %eax,%ecx
  cmovle %ecx,%eax
  sub    %eax,%ecx
  mov    %ecx,(%rsi)
  sub    %eax,(%r9)
  mov    %eax,0x0(%r13,%rdx,4)
  jmp    L92
L0:
  add    $0x4,%r10
  add    $0x4,%rdi
  cmp    %r11,%rdi
  je     L87
L89:
  mov    %r10,%r8
  mov    (%r10),%edx
  cmp    0x4(%r10),%edx
  jge    L0
  movslq %edx,%rdx
  mov    %rdi,%r9
  jmp    L157
L87:
  lea    0x0(,%r12,4),%edi
  call   <smalloc@plt>
  mov    %rax,%r14
  mov    0x10(%rsp),%eax
  test   %eax,%eax
  jle    L194
  mov    %eax,%eax
  mov    %rax,0x18(%rsp)
  mov    $0x0,%r12d
  mov    %rbp,0x10(%rsp)
  jmp    L83
L13:
  add    $0x1,%r12
  cmp    0x18(%rsp),%r12
  je     L194
L83:
  mov    %r12d,%ebp
  cmpl   $0x0,(%rbx,%r12,4)
  je     L13
L97:
  sub    $0x8,%rsp
  push   %r14
  mov    %r15,%r9
  mov    %r13,%r8
  mov    %rbx,%rcx
  mov    0x20(%rsp),%rdx
  mov    0x18(%rsp),%rsi
  mov    %ebp,%edi
  call   <augment@plt>
  add    $0x10,%rsp
  cmpl   $0x0,(%rbx,%r12,4)
  je     L13
  test   %eax,%eax
  jne    L97
  jmp    L13
L194:
  mov    %r14,%rdi
  call   <sfree@plt>
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void bpflow(int n_left, int n_right, int *pointers, int *indices, int *vweight, int *resid, int *flow, int *touched) {
  int *seen;
  int neighbor;
  int flow1;
  int modified;
  int i, j;
  for (i = 0; i < n_left + n_right; i++) {
    resid[i] = vweight[i];
    touched[i] = 0;
  }
  for (i = pointers[n_left]; i < pointers[n_left + n_right]; i++) {
    flow[i] = 0;
  }
  for (i = n_left; i < n_left + n_right; i++) {
    for (j = pointers[i]; j < pointers[i + 1] && resid[i]; j++) {
      neighbor = indices[j];
      if (resid[neighbor]) {
        flow1 = ((resid[i]) < (resid[neighbor]) ? (resid[i]) : (resid[neighbor]));
        resid[neighbor] -= flow1;
        resid[i] -= flow1;
        flow[j] = flow1;
      }
    }
  }
  seen = smalloc((n_left + n_right) * sizeof(int));
  for (i = 0; i < n_left; i++) {
    modified = 1;
    while (resid[i] && modified) {
      modified = augment(i, pointers, indices, resid, flow, touched, seen);
    }
  }
  sfree(seen);
}
```