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

```asm
<func>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,(%rsp)
  mov    %rsi,%rbp
  mov    %rdx,%r12
  mov    %r8d,0xc(%rsp)
  mov    %r9d,0x18(%rsp)
  mov    0x60(%rsp),%r15d
  mov    0x68(%rsp),%ebx
  test   %ecx,%ecx
  je     L77
  mov    %ecx,%r13d
  cmp    %ebx,%r15d
  je     L46
  test   %ebx,%ebx
  je     L67
  js     L11
  movslq %ecx,%rax
  lea    (%rdx,%rax,8),%rax
  mov    %rax,0x10(%rsp)
  mov    $0x0,%r14d
  sub    $0x1,%r13d
L38:
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0x18(%rsp),%rdi
  mov    %r14,%rax
  imul   (%rdi),%rax
  add    0x78(%rsp),%rax
  push   %rax
  mov    %ebx,%eax
  sub    %r14d,%eax
  push   %rax
  push   %r15
  mov    0x38(%rsp),%r9d
  mov    0x2c(%rsp),%r8d
  mov    %r13d,%ecx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    0x20(%rsp),%rdi
  call   <func>
  add    $0x1,%r14
  add    $0x20,%rsp
  cmp    %r14d,%ebx
  jge    L38
  jmp    L11
L77:
  movslq %ebx,%rdx
  mov    %rdx,%rbx
  imul   (%r12),%rbx
  add    0x70(%rsp),%rbx
  mov    %rbx,%rdx
  mov    %r8d,%ecx
  call   <mark@plt>
L11:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L46:
  test   %r15d,%r15d
  jle    L105
  movslq %ecx,%rax
  lea    (%rdx,%rax,8),%rax
  mov    $0x1,%r14d
  lea    -0x1(%rcx),%esi
  mov    %esi,0x10(%rsp)
  mov    %ecx,0x1c(%rsp)
  mov    %rax,%r13
L25:
  mov    0x78(%rsp),%eax
  push   %rax
  mov    %r14,%rax
  imul   0x0(%r13),%rax
  add    0x78(%rsp),%rax
  push   %rax
  mov    %ebx,%eax
  sub    %r14d,%eax
  push   %rax
  push   %r15
  mov    0x38(%rsp),%r9d
  mov    0x2c(%rsp),%r8d
  mov    0x30(%rsp),%ecx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    0x20(%rsp),%rdi
  call   <func>
  add    $0x1,%r14
  add    $0x20,%rsp
  cmp    %r14d,%r15d
  jge    L25
  mov    0x1c(%rsp),%r13d
L105:
  mov    0x78(%rsp),%eax
  add    $0x1,%eax
  cltq
L30:
  mov    %eax,%ecx
  mov    %rax,%rdx
  add    $0x1,%rax
  cmpb   $0x0,-0x1(%rbp,%rax,1)
  jne    L30
  add    $0x1,%r13d
  movslq %r13d,%rsi
  lea    -0x1(%r15),%eax
  cltq
  imul   (%r12),%rax
  mov    (%rsp),%rdi
  mov    (%rdi,%rdx,8),%rdx
  sub    %rax,%rdx
  mov    %rdx,(%r12,%rsi,8)
  mov    0x18(%rsp),%eax
  sub    $0x1,%eax
  cmp    %r13d,%eax
  jle    L11
  push   %rcx
  push   $0x0
  push   %r15
  push   %r15
  mov    0x38(%rsp),%r9d
  mov    0x2c(%rsp),%r8d
  mov    %r13d,%ecx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    0x20(%rsp),%rdi
  call   <func>
  add    $0x20,%rsp
  jmp    L11
L67:
  mov    0xc(%rsp),%ecx
  mov    0x70(%rsp),%rdx
  mov    (%rsp),%rdi
  call   <mark@plt>
  jmp    L11
```

assistant: ```c
void func(unsigned long long *a, unsigned char *flag, unsigned long long *output, int io, int total, int N, int K, int k, unsigned long long sum, int last) {
  if (0 == io) {
    sum += output[io] * k;
    mark(a, flag, sum, total);
  } else {
    if (K == k) {
      for (int i = 1; i <= K; i++) {
        func(a, flag, output, io - 1, total, N, K, k - i, sum + output[io] * i, last);
      }
      while (flag[++last]) {
      }
      output[++io] = a[last] - output[0] * (K - 1);
      if (io < N - 1) {
        func(a, flag, output, io, total, N, K, K, 0, last);
      }
    } else {
      if (0 == k) {
        mark(a, flag, sum, total);
      } else {
        for (int i = 0; i <= k; i++) {
          func(a, flag, output, io - 1, total, N, K, k - i, sum + output[io] * i, last);
        }
      }
    }
  }
}
```