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

```asm
<dofun>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x20(%rbp)
  mov    %r8d,-0x2c(%rbp)
  mov    %r9,-0x38(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  jne    L38
  mov    0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  mov    $0x4,%edi
  call   <calloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    0x18(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rax,%rdx
  mov    0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    0x28(%rbp),%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    0x20(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    0x18(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    %rax,(%rdx)
  mov    0x18(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    0x18(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L5
L38:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L52
  mov    -0x20(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L2
L14:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L51
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movl   $0x1,(%rax)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    0x28(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%ecx
  mov    0x28(%rbp),%rdx
  mov    %ecx,(%rdx)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x20(%rbp),%rax
  add    %rax,%rdx
  mov    (%rsi),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x2c(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,%r8d
  mov    -0x38(%rbp),%rdi
  mov    -0xc(%rbp),%ecx
  mov    -0x28(%rbp),%rdx
  mov    -0x1c(%rbp),%esi
  mov    -0x18(%rbp),%rax
  push   0x28(%rbp)
  push   0x20(%rbp)
  push   0x18(%rbp)
  push   0x10(%rbp)
  mov    %rdi,%r9
  mov    %rax,%rdi
  call   <dofun>
  add    $0x20,%rsp
  mov    0x28(%rbp),%rax
  mov    (%rax),%eax
  lea    -0x1(%rax),%edx
  mov    0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  jmp    L86
L99:
  addl   $0x1,-0x10(%rbp)
L86:
  mov    -0x10(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L99
  jmp    L90
L51:
  nop
L90:
  addl   $0x1,-0x10(%rbp)
L2:
  mov    -0x10(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L14
  jmp    L5
L52:
  nop
L5:
  leave
  ret
```

assistant: ```c
void dofun(int *nlist, int nsize, int *nmark, int left, int target, int **ret, int *col, int *retsize, int *tmp, int *tmpsize) {
  int i;
  if (target == 0) {
    int *line = (int *)calloc(sizeof(int), *tmpsize);
    col[*retsize] = *tmpsize;
    memcpy(line, tmp, *tmpsize * sizeof(int));
    ret[*retsize] = line;
    (*retsize)++;
    return;
  }
  if (target < nlist[0])
    return;
  for (i = left + 1; i < nsize; i++) {
    if (nmark[i])
      continue;
    nmark[i] = 1;
    tmp[(*tmpsize)++] = nlist[i];
    int left = i;
    dofun(nlist, nsize, nmark, left, target - nlist[i], ret, col, retsize, tmp, tmpsize);
    (*tmpsize)--;
    nmark[i] = 0;
    while (nlist[i + 1] == nlist[i])
      i++;
  }
}
```