user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<slowprove>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   %rdi,%rdi
  je     L52
  mov    %rsi,%r13
  test   %rsi,%rsi
  je     L52
  mov    %edx,%ebx
  xor    %ecx,%ecx
  mov    %rsi,%rdx
  xor    %esi,%esi
  mov    %rdi,%r15
  mov    $0x1,%r14d
  call   <equiv@plt>
  test   %rax,%rax
  jne    L165
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <validinputs@plt>
  add    $0x1,%eax
  cmp    %ebx,%eax
  jl     L95
  nopl   0x0(%rax)
L52:
  xor    %r14d,%r14d
L165:
  add    $0x18,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L95:
  mov    %r15,%rdi
  call   <r_mix@plt>
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <length_l@plt>
  mov    %r13,%rdx
  mov    %rbp,%rdi
  mov    %eax,%esi
  mov    %eax,%r12d
  call   <find@plt>
  test   %rax,%rax
  jns    L122
  mov    %r15,%rdi
  call   <r_switch@plt>
  mov    %rax,%rdi
  mov    %rax,(%rsp)
  call   <length_l@plt>
  mov    (%rsp),%rdi
  mov    %r13,%rdx
  mov    %eax,%esi
  mov    %eax,0x8(%rsp)
  call   <find@plt>
  test   %rax,%rax
  jns    L166
  mov    %r15,%rdi
  call   <r_medial@plt>
  mov    %rax,%rdi
  mov    %rax,%r15
  call   <length_l@plt>
  mov    %r13,%rdx
  mov    %r15,%rdi
  mov    %eax,%esi
  mov    %eax,0xc(%rsp)
  call   <find@plt>
  test   %rax,%rax
  jns    L168
  test   %r12d,%r12d
  jle    L28
  lea    -0x1(%r12),%eax
  mov    %rbp,%r14
  lea    0x8(%rbp,%rax,8),%r12
L197:
  mov    (%r14),%rdi
  mov    %ebx,%edx
  mov    %r13,%rsi
  call   <slowprove>
  test   %eax,%eax
  jne    L11
  add    $0x8,%r14
  cmp    %r12,%r14
  jne    L197
L28:
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L25
  mov    (%rsp),%rcx
  sub    $0x1,%eax
  mov    %rcx,%r14
  lea    0x8(%rcx,%rax,8),%r12
L47:
  mov    (%r14),%rdi
  mov    %ebx,%edx
  mov    %r13,%rsi
  call   <slowprove>
  test   %eax,%eax
  jne    L11
  add    $0x8,%r14
  cmp    %r12,%r14
  jne    L47
L25:
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L183
  sub    $0x1,%eax
  mov    %r15,%r14
  lea    0x8(%r15,%rax,8),%r12
L174:
  mov    (%r14),%rdi
  mov    %ebx,%edx
  mov    %r13,%rsi
  call   <slowprove>
  test   %eax,%eax
  jne    L11
  add    $0x8,%r14
  cmp    %r14,%r12
  jne    L174
L183:
  mov    %rbp,%rdi
  call   <free_l@plt>
  mov    (%rsp),%rdi
  call   <free_l@plt>
  mov    %r15,%rdi
  call   <free_l@plt>
  jmp    L52
L166:
  mov    %rbp,%rdi
  call   <free_l@plt>
  mov    (%rsp),%rdi
  call   <free_l@plt>
  jmp    L165
  cs nopw 0x0(%rax,%rax,1)
L122:
  mov    %rbp,%rdi
  call   <free_l@plt>
  jmp    L165
  nopl   (%rax)
L11:
  mov    %rbp,%rdi
  mov    $0x1,%r14d
  call   <free_l@plt>
  mov    (%rsp),%rdi
  call   <free_l@plt>
  mov    %r15,%rdi
  call   <free_l@plt>
  jmp    L165
  nopl   0x0(%rax)
L168:
  mov    %rbp,%rdi
  call   <free_l@plt>
  mov    (%rsp),%rdi
  call   <free_l@plt>
  mov    %r15,%rdi
  call   <free_l@plt>
  jmp    L165
```

assistant: ```c
int slowprove(int *f1, int *f2, int f2vi) {
  if (f1 == NULL || f2 == NULL)
    return 0;
  if (equiv(f1, NULL, f2, NULL))
    return 1;
  if (validinputs(f1, NULL) + 2 > f2vi)
    return 0;
  int **next_mix = r_mix(f1);
  int n_next_mix = length_l((void **)next_mix);
  if (find(next_mix, n_next_mix, f2) >= 0) {
    free_l((void **)next_mix);
    return 1;
  }
  int **next_switch = r_switch(f1);
  int n_next_switch = length_l((void **)next_switch);
  if (find(next_switch, n_next_switch, f2) >= 0) {
    free_l((void **)next_mix);
    free_l((void **)next_switch);
    return 1;
  }
  int **next_medial = r_medial(f1);
  int n_next_medial = length_l((void **)next_medial);
  if (find(next_medial, n_next_medial, f2) >= 0) {
    free_l((void **)next_mix);
    free_l((void **)next_switch);
    free_l((void **)next_medial);
    return 1;
  }
  int i;
  for (i = 0; i < n_next_mix; i++) {
    if (slowprove(next_mix[i], f2, f2vi)) {
      free_l((void **)next_mix);
      free_l((void **)next_switch);
      free_l((void **)next_medial);
      return 1;
    }
  }
  for (i = 0; i < n_next_switch; i++) {
    if (slowprove(next_switch[i], f2, f2vi)) {
      free_l((void **)next_mix);
      free_l((void **)next_switch);
      free_l((void **)next_medial);
      return 1;
    }
  }
  for (i = 0; i < n_next_medial; i++) {
    if (slowprove(next_medial[i], f2, f2vi)) {
      free_l((void **)next_mix);
      free_l((void **)next_switch);
      free_l((void **)next_medial);
      return 1;
    }
  }
  free_l((void **)next_mix);
  free_l((void **)next_switch);
  free_l((void **)next_medial);
  return 0;
}
```