user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<bpflow>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %rdx,-0x30(%rbp)
  mov    %rcx,-0x38(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    %r9,-0x48(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L103
L63:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x18(%rbp)
L103:
  mov    -0x24(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x18(%rbp)
  jl     L63
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L7
L65:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x18(%rbp)
L7:
  mov    -0x24(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x18(%rbp)
  jl     L65
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L62
L81:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L74
L51:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L102
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  sub    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x18(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  sub    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
L102:
  addl   $0x1,-0x14(%rbp)
L74:
  mov    -0x18(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jge    L77
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L51
L77:
  addl   $0x1,-0x18(%rbp)
L62:
  mov    -0x24(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x18(%rbp)
  jl     L81
  mov    -0x24(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <smalloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L125
L13:
  movl   $0x1,-0x1c(%rbp)
  jmp    L35
L76:
  mov    0x18(%rbp),%rdi
  mov    -0x48(%rbp),%rcx
  mov    -0x38(%rbp),%rdx
  mov    -0x30(%rbp),%rsi
  mov    -0x18(%rbp),%eax
  sub    $0x8,%rsp
  push   -0x8(%rbp)
  mov    %rdi,%r9
  mov    0x10(%rbp),%r8
  mov    %eax,%edi
  call   <augment@plt>
  add    $0x10,%rsp
  mov    %eax,-0x1c(%rbp)
L35:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L142
  cmpl   $0x0,-0x1c(%rbp)
  jne    L76
L142:
  addl   $0x1,-0x18(%rbp)
L125:
  mov    -0x18(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L13
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <sfree@plt>
  nop
  leave
  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);
}
```