user: What is the c source code of the assembly code below:

```asm
<solve_congruence>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,0xc(%rsp)
  mov    %rsi,0x10(%rsp)
  mov    %rdx,%rbx
  mov    %rdx,%rdi
  mov    $0x0,%eax
  call   <prime_factors@plt>
  mov    %eax,0x18(%rsp)
  cltq
  mov    %rax,0x28(%rsp)
  mov    (%rax),%r14
  mov    $0x8,%esi
  mov    %r14,%rdi
  call   <calloc@plt>
  mov    %rax,%r13
  mov    $0x8,%esi
  mov    %r14,%rdi
  call   <calloc@plt>
  mov    %rax,%rbp
  mov    %rax,0x20(%rsp)
  mov    $0x8,%esi
  mov    %r14,%rdi
  call   <calloc@plt>
  mov    %rax,%r15
  test   %r14,%r14
  jle    L54
  mov    %rbp,%rdi
  mov    %rbp,%r12
  mov    $0x0,%ebp
  movslq 0x18(%rsp),%rax
  add    $0x8,%rax
  sub    %rdi,%rax
  mov    %rax,0x18(%rsp)
L66:
  mov    0x18(%rsp),%rax
  lea    (%rax,%r12,1),%r8
  mov    (%r8),%rcx
  mov    %r12,%r9
  mov    %rcx,(%r12)
  mov    (%r8),%rsi
  imul   %rsi,%rcx
  mov    %rbx,%rax
  cqto
  idiv   %rcx
  test   %rdx,%rdx
  jne    L30
  mov    $0x1,%edi
L62:
  mov    %rcx,(%r9)
  add    $0x1,%edi
  mov    (%r8),%rsi
  imul   %rsi,%rcx
  mov    %rbx,%rax
  cqto
  idiv   %rcx
  test   %rdx,%rdx
  je     L62
L13:
  mov    %edi,%ecx
  mov    %rsi,%rdx
  mov    0x10(%rsp),%rsi
  mov    0xc(%rsp),%edi
  mov    $0x0,%eax
  call   <solve_prime_power_congruence@plt>
  cltq
  lea    0x8(%rax),%rdx
  mov    %rdx,0x0(%r13,%rbp,8)
  mov    (%rax),%rax
  mov    %eax,(%r15,%rbp,4)
  add    $0x1,%rbp
  add    $0x8,%r12
  cmp    %rbp,%r14
  jne    L66
  mov    0x20(%rsp),%rcx
  mov    %r13,%rdx
  mov    %r15,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <solve_system_of_order_1_congruence_sets@plt>
  movslq %eax,%r12
  mov    %r13,%rbx
  lea    0x0(%r13,%rbp,8),%rbp
L27:
  mov    (%rbx),%rax
  lea    -0x8(%rax),%rdi
  call   <free@plt>
  add    $0x8,%rbx
  cmp    %rbp,%rbx
  jne    L27
L4:
  mov    %r15,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    %r12,%rax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L30:
  mov    $0x1,%edi
  jmp    L13
L54:
  mov    0x20(%rsp),%rcx
  mov    %r13,%rdx
  mov    %rax,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <solve_system_of_order_1_congruence_sets@plt>
  movslq %eax,%r12
  jmp    L4
```

assistant: ```c
long *solve_congruence(int funcDegree, long funcCoeffs[], long mod) {
  long *solutionList;
  long *modFactorList = prime_factors(mod);
  long numOfModFactors = *modFactorList;
  long *modFactors = modFactorList + 1;
  long **primePowerSolutions = calloc(numOfModFactors, sizeof(long *));
  long *primePowers = calloc(numOfModFactors, sizeof(long));
  int *primePowerSolutionLengths = calloc(numOfModFactors, sizeof(int *));
  int power;
  int i, j, k;
  for (i = 0; i < numOfModFactors; i++) {
    primePowers[i] = modFactors[i];
    power = 1;
    while (mod % (primePowers[i] * modFactors[i]) == 0) {
      primePowers[i] *= modFactors[i];
      power++;
    }
    primePowerSolutions[i] = solve_prime_power_congruence(funcDegree, funcCoeffs, modFactors[i], power);
    primePowerSolutionLengths[i] = *(primePowerSolutions[i]++);
  }
  solutionList = solve_system_of_order_1_congruence_sets(numOfModFactors, primePowerSolutionLengths, primePowerSolutions, primePowers);
  for (i = 0; i < numOfModFactors; i++) {
    free(primePowerSolutions[i] - 1);
  }
  free(primePowerSolutionLengths);
  free(primePowerSolutions);
  free(primePowers);
  free(modFactorList);
  return solutionList;
}
```