user: Please show me the C implementation that matches the assembly code listed below:

```asm
<MakePgr>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,(%rsp)
  mov    %esi,%r14d
  mov    %ecx,0x4(%rsp)
  mov    %r8,0x18(%rsp)
  lea    0x1(%rdi),%edx
  lea    -0x2(%rsi),%eax
  cmp    %eax,%edx
  jge    L67
  mov    %r9,%r15
  lea    0x1(%rcx),%eax
  imul   %ecx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,0x24(%rsp)
  lea    0x3(%rdi),%eax
  mov    %eax,0x28(%rsp)
  imul   %ecx,%eax
  mov    %eax,0x2c(%rsp)
  jmp    L18
L0:
  fstp   %st(0)
  jmp    L99
L119:
  fstp   %st(0)
L99:
  add    $0x1,%ebx
  cmp    %ebx,%r14d
  je     L85
L126:
  mov    0x4(%rsp),%r8d
  mov    %r14d,%ecx
  mov    %ebx,%edx
  mov    0x10(%rsp),%esi
  mov    (%rsp),%edi
  mov    $0x0,%eax
  call   <gap_index@plt>
  mov    0x14(%rsp),%edx
  add    %ebx,%edx
  cmp    %ebx,%ebp
  cmove  %r12d,%edx
  mov    0x8(%rsp),%rcx
  fldz
  fldt   (%rcx)
  fcomi  %st(1),%st
  fstp   %st(1)
  jbe    L0
  cltq
  shl    $0x4,%rax
  movslq %edx,%rdx
  shl    $0x4,%rdx
  fldt   (%r15,%rax,1)
  fmulp  %st,%st(1)
  mov    0x70(%rsp),%rcx
  fldt   (%rcx,%rdx,1)
  fmulp  %st,%st(1)
  fldt   0x0(%r13)
  fdivrp %st,%st(1)
  add    0x80(%rsp),%rax
  fldt   (%rax)
  fadd   %st(1),%st
  fstpt  (%rax)
  add    0x88(%rsp),%rdx
  fldt   (%rdx)
  fadd   %st(1),%st
  fstpt  (%rdx)
  fld1
  fxch   %st(1)
  fcomi  %st(1),%st
  fstp   %st(1)
  jbe    L119
  lea    -0x10(%rsp),%rsp
  fstpt  (%rsp)
  mov    %r14d,%edx
  mov    0x10(%rsp),%esi
  lea    D2(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x10,%rsp
  jmp    L99
L85:
  add    $0x1,%ebp
  mov    0x4(%rsp),%esi
  add    %esi,0x20(%rsp)
  cmp    %ebp,%r14d
  je     L128
L15:
  mov    0x4(%rsp),%r8d
  mov    %r14d,%ecx
  mov    %ebp,%edx
  mov    0x10(%rsp),%esi
  mov    (%rsp),%edi
  mov    $0x0,%eax
  call   <gap_index@plt>
  cmp    %ebp,%r14d
  jle    L85
  lea    0x1(%rbp),%ecx
  imul   %ebp,%ecx
  mov    %ecx,%edx
  shr    $0x1f,%edx
  add    %ecx,%edx
  sar    %edx
  mov    0x24(%rsp),%edi
  lea    (%rdi,%rbp,1),%r12d
  movslq %eax,%r13
  shl    $0x4,%r13
  mov    %r13,%rax
  add    0x78(%rsp),%rax
  mov    %rax,0x8(%rsp)
  add    0x18(%rsp),%r13
  mov    %ebp,%ebx
  mov    0x20(%rsp),%eax
  sub    $0x1,%eax
  sub    %edx,%eax
  mov    %eax,0x14(%rsp)
  jmp    L126
L128:
  addl   $0x1,0x28(%rsp)
  mov    0x28(%rsp),%eax
  mov    0x4(%rsp),%esi
  add    %esi,0x2c(%rsp)
  cmp    %r14d,%eax
  je     L67
L18:
  mov    0x28(%rsp),%eax
  lea    -0x2(%rax),%esi
  mov    %esi,0x10(%rsp)
  mov    %eax,%ebp
  cmp    %eax,%r14d
  jle    L128
  mov    0x2c(%rsp),%eax
  mov    %eax,0x20(%rsp)
  jmp    L15
L67:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D2
type_infered: string

tool: D2: j %d %d %Le


assistant: ```c
void MakePgr(int i, int j, int seq[], int seqlength, long double *Qgr, long double *Qgl, long double *Qz, long double *Pgr, long double *Pgl, long double *Pz) {
  int d, e, f;
  int gap_idej, gap_idfj, pf_ef1;
  long double prob;
  for (d = i + 1; d <= j - 3; d++) {
    for (e = d + 2; e <= j - 1; e++) {
      gap_idej = gap_index(i, d, e, j, seqlength);
      for (f = e; f <= j - 1; f++) {
        gap_idfj = gap_index(i, d, f, j, seqlength);
        pf_ef1 = ((f - 1) == (e)-1 ? (seqlength) * ((seqlength) + 1) / 2 + (e) : ((e) * (seqlength) + (f - 1) - (e) * (1 + (e)) / 2));
        if (Pgr[gap_idej] > 0) {
          prob = Pgr[gap_idej] * Qgl[gap_idfj] * Qz[pf_ef1] / Qgr[gap_idej];
          Pgl[gap_idfj] += prob;
          Pz[pf_ef1] += prob;
          if (prob > 1) {
            printf("j %d %d %Le\n", i, j, (long double)prob);
          }
        }
      }
    }
  }
}
```