user: What would the C source look like for the assembly code provided here:

```asm
<KeyGen>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,0x10(%rsp)
  mov    %rsi,0x18(%rsp)
  mov    %edx,%r14d
  mov    %ecx,0x2c(%rsp)
  mov    %r8d,0xc(%rsp)
  mov    %r9d,0x28(%rsp)
  mov    0xb0(%rsp),%ebp
  mov    0xb8(%rsp),%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  mov    $0x0,%edi
  call   <mpz_init@plt>
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  lea    0x50(%rsp),%rbx
  mov    %rbx,0x30(%rsp)
  lea    0x60(%rsp),%r13
  mov    %r13,0x38(%rsp)
L39:
  mov    (%rbx),%edi
  call   <mpz_init@plt>
  add    $0x4,%rbx
  cmp    %r13,%rbx
  jne    L39
  test   %ebp,%ebp
  jle    L25
  mov    %ebp,%eax
  mov    %rax,0x20(%rsp)
  mov    $0x0,%r13d
  lea    D2(%rip),%r15
  jmp    L71
L95:
  mov    $0x0,%ebp
  mov    %ebp,%edx
  mov    0x2c(%rsp),%esi
  mov    %ebp,%edi
  call   <mpz_mul@plt>
  mov    %r14d,%edx
  mov    %ebp,%esi
  mov    %ebp,%edi
  call   <mpz_mod@plt>
L127:
  lea    0x50(%rsp),%rdi
  mov    %r12,%r9
  mov    %r14d,%r8d
  mov    0x28(%rsp),%ecx
  mov    0xc(%rsp),%edx
  mov    $0x0,%ebp
  mov    %ebp,%esi
  call   <GetSquareRootsModulo@plt>
  mov    %r15,%rsi
  mov    (%r12),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L93
  movslq %ebx,%rbx
  mov    0x50(%rsp,%rbx,4),%esi
  mov    0x18(%rsp),%rax
  mov    (%rax,%r13,4),%edi
  call   <mpz_set@plt>
  mov    0x40(%rsp),%rdi
  call   <free@plt>
  mov    0x48(%rsp),%rdi
  call   <free@plt>
  add    $0x1,%r13
  cmp    0x20(%rsp),%r13
  je     L103
L71:
  lea    0x40(%rsp),%rsi
  mov    %r12,%rcx
  mov    %r13d,%edx
  mov    0x10(%rsp),%rdi
  call   <GetHash@plt>
  mov    %r15,%rsi
  mov    (%r12),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L93
  lea    0x48(%rsp),%rsi
  mov    %r12,%rdx
  mov    0x40(%rsp),%rdi
  call   <GetHexHash@plt>
  mov    %r15,%rsi
  mov    (%r12),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L93
  mov    $0x10,%edx
  mov    0x48(%rsp),%rsi
  mov    $0x0,%ebp
  mov    %ebp,%edi
  call   <mpz_set_str@plt>
  mov    %r14d,%edx
  mov    %ebp,%esi
  mov    %ebp,%edi
  call   <mpz_mod@plt>
  mov    %ebp,%esi
  mov    %r14d,%edi
  call   <GetJnHash@plt>
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  shr    $0x1e,%edx
  lea    (%rax,%rdx,1),%ebx
  and    $0x3,%ebx
  sub    %edx,%ebx
  mov    0xc(%rsp),%esi
  mov    %ebp,%edi
  call   <mpz_legendre@plt>
  cmp    $0xffffffff,%eax
  je     L95
  mov    0x28(%rsp),%esi
  mov    %ebp,%edi
  call   <mpz_legendre@plt>
  cmp    $0xffffffff,%eax
  jne    L127
  jmp    L95
L103:
  mov    0x30(%rsp),%rbx
  mov    0x38(%rsp),%rbp
L116:
  mov    (%rbx),%edi
  call   <mpz_clear@plt>
  add    $0x4,%rbx
  cmp    %rbp,%rbx
  jne    L116
  mov    $0x0,%edi
  call   <mpz_clear@plt>
L93:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L25:
  mov    0x30(%rsp),%rbx
  mov    0x38(%rsp),%rbp
  jmp    L116
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D2
type_guessed: string

tool: D2: success

assistant: ```c
void KeyGen(unsigned char *identity, mpz_t *rj, mpz_t n, mpz_t u, mpz_t p, mpz_t q, int l, char **error) {
  int i, w;
  mpz_t uRj, z[4];
  unsigned char *hash, *hex_hash;
  mpz_init(uRj);
  srand(time(NULL));
  for (i = 0; i < 4; i++)
    mpz_init(z[i]);
  for (i = 0; i < l; i++) {
    GetHash(identity, &hash, i, error);
    if (strcmp(*error, "success") != 0)
      return;
    GetHexHash(hash, &hex_hash, error);
    if (strcmp(*error, "success") != 0)
      return;
    mpz_set_str(uRj, hex_hash, 16);
    mpz_mod(uRj, uRj, n);
    GetJnHash(n, uRj);
    w = rand() % 4;
    if (mpz_legendre(uRj, p) == -1 || mpz_legendre(uRj, q) == -1) {
      mpz_mul(uRj, u, uRj);
      mpz_mod(uRj, uRj, n);
    }
    GetSquareRootsModulo(z, uRj, p, q, n, error);
    if (strcmp(*error, "success") != 0)
      return;
    mpz_set(rj[i], z[w]);
    free(hash);
    free(hex_hash);
  }
  for (i = 0; i < 4; i++)
    mpz_clear(z[i]);
  mpz_clear(uRj);
}
```