user: Converte this assembly snippet into its equivalent C code:

```asm
<is_desargue_quick>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdx,0x58(%rsp)
  test   %edi,%edi
  jle    L146
  mov    %edi,%r13d
  mov    %rsi,%r15
  movl   $0x0,0x30(%rsp)
  movl   $0x0,0x2c(%rsp)
  movl   $0x0,0x48(%rsp)
  movl   $0x0,0x50(%rsp)
  movl   $0x0,0x54(%rsp)
  movl   $0x0,0x4c(%rsp)
  movl   $0x0,0x10(%rsp)
  movl   $0x0,0xc(%rsp)
  mov    $0x0,%r12d
  mov    $0x0,%ebx
  mov    $0x0,%eax
  movl   $0x0,0x8(%rsp)
  mov    $0x0,%r14d
L274:
  mov    %r14d,(%rsp)
  add    $0x1,%eax
  mov    %eax,0x34(%rsp)
  mov    %r12d,%ebp
  mov    %r15,%r12
  jmp    L298
L62:
  addl   $0x1,0x30(%rsp)
  mov    %r12,%r9
  mov    %ebp,%r8d
  mov    0x10(%rsp),%ecx
  mov    0x4(%rsp),%edx
  mov    (%rsp),%esi
  mov    0x8(%rsp),%edi
  call   <inter_line@plt>
  mov    %eax,0x24(%rsp)
  mov    %r12,%r9
  mov    %ebp,%r8d
  mov    %ebx,%ecx
  mov    0x4(%rsp),%edx
  mov    %r13d,%esi
  mov    0x8(%rsp),%edi
  call   <inter_line@plt>
  mov    %eax,0x28(%rsp)
  mov    %r12,%r9
  mov    %ebp,%r8d
  mov    %ebx,%ecx
  mov    0x10(%rsp),%edx
  mov    %r13d,%esi
  mov    (%rsp),%edi
  call   <inter_line@plt>
  mov    %eax,%edx
  mov    %r12,%r8
  mov    %ebp,%ecx
  mov    0x28(%rsp),%esi
  mov    0x24(%rsp),%edi
  call   <colinear@plt>
  test   %rax,%rax
  je     L22
L82:
  add    $0x1,%ebx
  cmp    %ebx,%ebp
  je     L101
L222:
  mov    0xc(%rsp),%eax
  lea    (%rax,%rbx,1),%r15d
  mov    %r12,%r8
  mov    %ebp,%ecx
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %r14d,%edi
  call   <colinear@plt>
  test   %rax,%rax
  je     L82
  mov    %r12,%r8
  mov    %ebp,%ecx
  mov    %ebx,%edx
  mov    0x10(%rsp),%esi
  mov    0x4(%rsp),%edi
  call   <colinear@plt>
  test   %rax,%rax
  jne    L82
  addl   $0x1,0x2c(%rsp)
  cmp    %ebx,%r13d
  setne  %dl
  mov    0x8(%rsp),%edi
  cmp    %edi,0x4(%rsp)
  sete   %cl
  mov    0x10(%rsp),%eax
  cmp    %eax,(%rsp)
  sete   %al
  cmp    %al,%cl
  je     L112
  test   %dl,%dl
  jne    L62
L112:
  mov    0x8(%rsp),%esi
  cmp    %esi,0x4(%rsp)
  setne  %al
  mov    0x10(%rsp),%edi
  cmp    %edi,(%rsp)
  setne  %cl
  and    %ecx,%eax
  cmp    %ebx,%r13d
  jne    L151
  test   %al,%al
  jne    L62
L151:
  test   %al,%al
  je     L82
  test   %dl,%dl
  jne    L62
  jmp    L82
L101:
  mov    0x10(%rsp),%r13d
L168:
  add    $0x1,%r13d
  cmp    %r13d,%ebp
  je     L38
L105:
  mov    0x1c(%rsp),%eax
  add    %r13d,%eax
  mov    %eax,0x20(%rsp)
  mov    %r12,%r8
  mov    %ebp,%ecx
  mov    %r13d,%edx
  mov    (%rsp),%esi
  mov    %r14d,%edi
  call   <colinear@plt>
  test   %rax,%rax
  je     L168
  addl   $0x1,0x48(%rsp)
  mov    $0x0,%ebx
  lea    0x1(%r15),%eax
  mov    %eax,0xc(%rsp)
  mov    %r13d,0x10(%rsp)
  mov    0x44(%rsp),%r13d
  jmp    L222
L38:
  mov    %r12,%rax
  mov    %r15d,%r12d
  mov    %rax,%r15
  addl   $0x1,0x50(%rsp)
  mov    0x20(%rsp),%ebx
L96:
  addl   $0x1,0x4(%rsp)
  mov    0x4(%rsp),%eax
  cmp    %eax,%ebp
  je     L162
L27:
  mov    0x3c(%rsp),%eax
  mov    0x4(%rsp),%edx
  add    %edx,%eax
  mov    %eax,0x40(%rsp)
  mov    %r15,%r8
  mov    %ebp,%ecx
  mov    0x8(%rsp),%esi
  mov    %r14d,%edi
  call   <colinear@plt>
  test   %rax,%rax
  je     L96
  mov    $0x0,%r13d
  lea    0x1(%rbx),%eax
  mov    %eax,0x1c(%rsp)
  mov    %r15,%rax
  mov    %r12d,%r15d
  mov    %rax,%r12
  jmp    L105
L162:
  mov    %ebx,0xc(%rsp)
  mov    %r12d,0x10(%rsp)
  mov    %ebp,%r12d
  mov    %r15,%r13
  mov    0x44(%rsp),%r15d
  addl   $0x1,0x54(%rsp)
  mov    0x40(%rsp),%ebp
L45:
  add    $0x1,%r15d
  cmp    %r15d,%r12d
  je     L287
L13:
  mov    0x14(%rsp),%eax
  add    %r15d,%eax
  mov    %eax,0x18(%rsp)
  mov    %r13,%r8
  mov    %r12d,%ecx
  mov    %r15d,%edx
  mov    0x8(%rsp),%esi
  mov    %r14d,%edi
  call   <colinear@plt>
  test   %rax,%rax
  jne    L45
  mov    %r13,%r8
  mov    %r12d,%ecx
  mov    %r15d,%edx
  mov    (%rsp),%esi
  mov    %r14d,%edi
  call   <colinear@plt>
  test   %rax,%rax
  jne    L45
  mov    %r13,%r8
  mov    %r12d,%ecx
  mov    %r15d,%edx
  mov    (%rsp),%esi
  mov    0x8(%rsp),%edi
  call   <colinear@plt>
  test   %rax,%rax
  jne    L45
  movl   $0x0,0x4(%rsp)
  lea    0x1(%rbp),%eax
  mov    %eax,0x3c(%rsp)
  mov    0xc(%rsp),%ebx
  mov    %r15d,0x44(%rsp)
  mov    %r12d,%ebp
  mov    0x10(%rsp),%r12d
  mov    %r13,%r15
  jmp    L27
L287:
  mov    %r13,%rax
  mov    %r12d,%r13d
  mov    %rax,%r12
  addl   $0x1,0x4c(%rsp)
  mov    0x18(%rsp),%ebx
L211:
  mov    (%rsp),%eax
  lea    0x1(%rax),%edx
  cmp    %edx,%r13d
  je     L178
  mov    %edx,(%rsp)
L298:
  mov    0x34(%rsp),%eax
  mov    (%rsp),%edx
  add    %edx,%eax
  mov    %eax,0x38(%rsp)
  mov    %r12,%r8
  mov    %r13d,%ecx
  mov    0x8(%rsp),%esi
  mov    %r14d,%edi
  call   <colinear@plt>
  test   %rax,%rax
  jne    L211
  mov    $0x0,%r15d
  lea    0x1(%rbx),%eax
  mov    %eax,0x14(%rsp)
  mov    %r12,%rax
  mov    %r13d,%r12d
  mov    %rax,%r13
  jmp    L13
L178:
  mov    %r12,%r15
  mov    %ebp,%r12d
  mov    0x8(%rsp),%eax
  lea    0x1(%rax),%ecx
  cmp    %eax,(%rsp)
  je     L238
  mov    0x38(%rsp),%eax
  mov    %ecx,0x8(%rsp)
  jmp    L274
L146:
  movl   $0x0,0x30(%rsp)
  movl   $0x0,0x2c(%rsp)
  movl   $0x0,0x48(%rsp)
  movl   $0x0,0x50(%rsp)
  movl   $0x0,0x54(%rsp)
  movl   $0x0,0x4c(%rsp)
  movl   $0x0,0x10(%rsp)
  movl   $0x0,0xc(%rsp)
  mov    $0x0,%r12d
  mov    $0x0,%ebx
  movl   $0x0,0x38(%rsp)
  mov    $0x0,%edx
L238:
  mov    0x30(%rsp),%eax
  push   %rax
  mov    0x34(%rsp),%eax
  push   %rax
  mov    0x20(%rsp),%eax
  push   %rax
  mov    0x60(%rsp),%eax
  push   %rax
  mov    0x2c(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  push   %r12
  mov    0x8c(%rsp),%eax
  push   %rax
  mov    %ebx,%r9d
  mov    0x8c(%rsp),%r8d
  mov    0x78(%rsp),%ecx
  lea    D8(%rip),%rsi
  mov    0x98(%rsp),%rdi
  call   <fprintf@plt>
  add    $0x40,%rsp
  mov    $0x1,%eax
  jmp    L237
L22:
  mov    $0x0,%eax
L237:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D8
type: string

tool: D8: passage p:%d
 
passage q:%d
 
if(!col(o,p,q)):%d
 
passage r:%d
 
if( !col(o,p,r) && !col(o,q,r) && !col(p,q,r) ):%d
 
passage P:%d
 
if( col(o,p,P) ):%d
 
passage Q:%d
 
if( col(o,q,Q) ):%d
 
passage R:%d
 
if( col(o,r,R) && !col(P,Q,R) ):%d
 
deux distinction min:%d


assistant: ```c
int is_desargue_quick(int n, int **inc_tab, FILE *fichier) {
  int o = 0, p, q, r, P, Q, R, a, b, g;
  int countp = 0, countq = 0, countr = 0, countP = 0, countQ = 0, countR = 0, count1 = 0, count2 = 0, count3 = 0, count4 = 0, count5 = 0, count6 = 0;
  for (p = 0; p < n; p++) {
    countp++;
    for (q = 0; q < n; q++) {
      countq++;
      if (!colinear(o, p, q, n, inc_tab)) {
        count1++;
        for (r = 0; r < n; r++) {
          countr++;
          if (!colinear(o, p, r, n, inc_tab) && !colinear(o, q, r, n, inc_tab) && !colinear(p, q, r, n, inc_tab)) {
            count2++;
            for (P = 0; P < n; P++) {
              countP++;
              if (colinear(o, p, P, n, inc_tab)) {
                count3++;
                for (Q = 0; Q < n; Q++) {
                  countQ++;
                  if (colinear(o, q, Q, n, inc_tab)) {
                    count4++;
                    for (R = 0; R < n; R++) {
                      countR++;
                      if (colinear(o, r, R, n, inc_tab) && !colinear(P, Q, R, n, inc_tab)) {
                        count5++;
                        if ((p == P && q != Q && r != R) || (p != P && q == Q && r != R) || (p != P && q != Q && r == R) || (p != P && q != Q && r != R)) {
                          count6++;
                          a = inter_line(p, q, P, Q, n, inc_tab);
                          b = inter_line(p, r, P, R, n, inc_tab);
                          g = inter_line(q, r, Q, R, n, inc_tab);
                          if (!colinear(a, b, g, n, inc_tab)) {
                            return 0;
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  fprintf(fichier, "passage p:%d\n \npassage q:%d\n \nif(!col(o,p,q)):%d\n \npassage r:%d\n \nif( !col(o,p,r) && !col(o,q,r) && !col(p,q,r) ):%d\n \npassage P:%d\n \nif( col(o,p,P) ):%d\n \npassage Q:%d\n \nif( col(o,q,Q) ):%d\n \npassage R:%d\n \nif( col(o,r,R) && !col(P,Q,R) ):%d\n \ndeux distinction min:%d\n", countp, countq, count1, countr, count2, countP, count3, countQ, count4, countR, count5, count6);
  return 1;
}
```