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

```asm
<imcomp_test_overlap>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x190,%rsp
  mov    %edi,-0x154(%rbp)
  mov    %rsi,-0x160(%rbp)
  mov    %rdx,-0x168(%rbp)
  mov    %rcx,-0x170(%rbp)
  mov    %r8,-0x178(%rbp)
  mov    %r9,-0x180(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x188(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x188(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jle    L101
  mov    -0x188(%rbp),%rax
  mov    (%rax),%eax
  jmp    L43
L101:
  movl   $0x0,-0x144(%rbp)
  jmp    L205
L45:
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x168(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x170(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jl     L213
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x160(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x178(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jle    L176
L213:
  mov    $0x0,%eax
  jmp    L43
L176:
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x180(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    %rdx,-0x40(%rbp,%rax,8)
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x178(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x144(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x170(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  sub    %rdx,%rax
  mov    %rax,%rcx
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,8),%rax
  mov    %rax,%rdx
  neg    %rdx
  cmovns %rdx,%rax
  mov    %rax,%rdi
  mov    %rcx,%rax
  cqto
  idiv   %rdi
  lea    0x1(%rax),%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    %rdx,-0x130(%rbp,%rax,8)
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x130(%rbp,%rax,8),%rax
  test   %rax,%rax
  jg     L96
  mov    -0x188(%rbp),%rax
  movl   $0x143,(%rax)
  mov    $0x0,%eax
  jmp    L43
L96:
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x168(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x144(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x160(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  sub    %rdx,%rax
  lea    0x1(%rax),%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    %rdx,-0x100(%rbp,%rax,8)
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x100(%rbp,%rax,8),%rax
  test   %rax,%rax
  jg     L17
  mov    -0x188(%rbp),%rax
  movl   $0x143,(%rax)
  mov    $0x0,%eax
  jmp    L43
L17:
  cmpl   $0x0,-0x144(%rbp)
  jle    L165
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x100(%rbp,%rax,8),%rdx
  mov    -0x144(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x100(%rbp,%rax,8),%rax
  imul   %rax,%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    %rdx,-0x100(%rbp,%rax,8)
L165:
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x160(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  sub    $0x1,%rax
  mov    %rax,-0x140(%rbp)
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x168(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  sub    $0x1,%rax
  mov    %rax,-0x138(%rbp)
  jmp    L19
L166:
  addq   $0x1,-0x140(%rbp)
  mov    -0x140(%rbp),%rax
  cmp    -0x138(%rbp),%rax
  jle    L19
  mov    $0x0,%eax
  jmp    L43
L19:
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x170(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    -0x1(%rax),%rcx
  mov    -0x140(%rbp),%rax
  sub    %rcx,%rax
  mov    %rax,%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,8),%rax
  mov    %rax,%rcx
  neg    %rcx
  cmovs  %rax,%rcx
  mov    %rdx,%rax
  cqto
  idiv   %rcx
  mov    %rdx,%rax
  test   %rax,%rax
  jne    L166
  jmp    L231
L188:
  subq   $0x1,-0x138(%rbp)
  mov    -0x140(%rbp),%rax
  cmp    -0x138(%rbp),%rax
  jle    L231
  mov    $0x0,%eax
  jmp    L43
L231:
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x170(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    -0x1(%rax),%rcx
  mov    -0x138(%rbp),%rax
  sub    %rcx,%rax
  mov    %rax,%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,8),%rax
  mov    %rax,%rcx
  neg    %rcx
  cmovs  %rax,%rcx
  mov    %rdx,%rax
  cqto
  idiv   %rcx
  mov    %rdx,%rax
  test   %rax,%rax
  jne    L188
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x170(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x140(%rbp),%rax
  sub    %rdx,%rax
  lea    0x1(%rax),%rcx
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,8),%rax
  mov    %rax,%rdx
  neg    %rdx
  cmovns %rdx,%rax
  mov    %rax,%rsi
  mov    %rcx,%rax
  cqto
  idiv   %rsi
  mov    $0x0,%edx
  test   %rax,%rax
  cmovns %rax,%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    %rdx,-0xd0(%rbp,%rax,8)
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x130(%rbp,%rax,8),%rax
  lea    -0x1(%rax),%rcx
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x170(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%rax
  sub    %rdx,%rax
  lea    0x1(%rax),%rsi
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,8),%rax
  mov    %rax,%rdx
  neg    %rdx
  cmovns %rdx,%rax
  mov    %rax,%rdi
  mov    %rsi,%rax
  cqto
  idiv   %rdi
  cmp    %rax,%rcx
  cmovle %rcx,%rax
  mov    %rax,%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    %rdx,-0xa0(%rbp,%rax,8)
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x170(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x144(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x160(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  sub    %rdx,%rax
  mov    $0x0,%edx
  test   %rax,%rax
  cmovns %rax,%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    %rdx,-0x70(%rbp,%rax,8)
  jmp    L177
L238:
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,8),%rax
  lea    0x1(%rax),%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    %rdx,-0x70(%rbp,%rax,8)
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,8),%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x100(%rbp,%rax,8),%rax
  cmp    %rax,%rdx
  jl     L177
  mov    $0x0,%eax
  jmp    L43
L177:
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x160(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,8),%rax
  add    %rax,%rdx
  mov    -0x144(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x170(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  sub    %rax,%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,8),%rax
  mov    %rax,%rcx
  neg    %rcx
  cmovs  %rax,%rcx
  mov    %rdx,%rax
  cqto
  idiv   %rcx
  mov    %rdx,%rax
  test   %rax,%rax
  jne    L238
  cmpl   $0x0,-0x144(%rbp)
  jle    L164
  mov    -0x144(%rbp),%eax
  cltq
  mov    -0x130(%rbp,%rax,8),%rdx
  mov    -0x144(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x130(%rbp,%rax,8),%rax
  imul   %rax,%rdx
  mov    -0x144(%rbp),%eax
  cltq
  mov    %rdx,-0x130(%rbp,%rax,8)
L164:
  addl   $0x1,-0x144(%rbp)
L205:
  mov    -0x144(%rbp),%eax
  cmp    -0x154(%rbp),%eax
  jl     L45
  mov    $0x1,%eax
L43:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L216
  call   <__stack_chk_fail@plt>
L216:
  leave
  ret
```

assistant: ```c
int imcomp_test_overlap(int ndim, long *tfpixel, long *tlpixel, long *fpixel, long *lpixel, long *ininc, int *status) {
  long imgdim[6];
  long tiledim[6];
  long imgfpix[6];
  long imglpix[6];
  long tilefpix[6];
  long inc[6];
  int ii;
  long tf, tl;
  if (*status > 0)
    return (*status);
  for (ii = 0; ii < ndim; ii++) {
    if (tlpixel[ii] < fpixel[ii] || tfpixel[ii] > lpixel[ii])
      return (0);
    inc[ii] = ininc[ii];
    imgdim[ii] = (lpixel[ii] - fpixel[ii]) / labs(inc[ii]) + 1;
    if (imgdim[ii] < 1) {
      *status = 323;
      return (0);
    }
    tiledim[ii] = tlpixel[ii] - tfpixel[ii] + 1;
    if (tiledim[ii] < 1) {
      *status = 323;
      return (0);
    }
    if (ii > 0)
      tiledim[ii] *= tiledim[ii - 1];
    tf = tfpixel[ii] - 1;
    tl = tlpixel[ii] - 1;
    while ((tf - (fpixel[ii] - 1)) % labs(inc[ii])) {
      tf++;
      if (tf > tl)
        return (0);
    }
    while ((tl - (fpixel[ii] - 1)) % labs(inc[ii])) {
      tl--;
      if (tf > tl)
        return (0);
    }
    imgfpix[ii] = (((tf - fpixel[ii] + 1) / labs(inc[ii])) > (0) ? ((tf - fpixel[ii] + 1) / labs(inc[ii])) : (0));
    imglpix[ii] = (((tl - fpixel[ii] + 1) / labs(inc[ii])) < (imgdim[ii] - 1) ? ((tl - fpixel[ii] + 1) / labs(inc[ii])) : (imgdim[ii] - 1));
    tilefpix[ii] = ((fpixel[ii] - tfpixel[ii]) > (0) ? (fpixel[ii] - tfpixel[ii]) : (0));
    while ((tfpixel[ii] + tilefpix[ii] - fpixel[ii]) % labs(inc[ii])) {
      (tilefpix[ii])++;
      if (tilefpix[ii] >= tiledim[ii])
        return (0);
    }
    if (ii > 0)
      imgdim[ii] *= imgdim[ii - 1];
  }
  return (1);
}
```