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

```asm
<coplanar_tri_tri3d>:
  endbr64
  sub    $0x48,%rsp
  mov    %rcx,%rax
  pxor   %xmm3,%xmm3
  mov    %fs:0x28,%r10
  mov    %r10,0x38(%rsp)
  xor    %r10d,%r10d
  mov    0x50(%rsp),%rcx
  movss  (%rcx),%xmm0
  comiss %xmm0,%xmm3
  jbe    L16
  xorps  D27(%rip),%xmm0
L16:
  movss  0x4(%rcx),%xmm2
  comiss %xmm2,%xmm3
  jbe    L0
  xorps  D27(%rip),%xmm2
L0:
  movss  0x8(%rcx),%xmm1
  comiss %xmm1,%xmm3
  jbe    L7
  xorps  D27(%rip),%xmm1
L7:
  comiss %xmm1,%xmm0
  jbe    L91
  comiss %xmm2,%xmm0
  jb     L91
  movq   0x4(%rsi),%xmm0
  shufps $0xe1,%xmm0,%xmm0
  movlps %xmm0,0x8(%rsp)
  movq   0x4(%rdi),%xmm0
  shufps $0xe1,%xmm0,%xmm0
  movlps %xmm0,0x10(%rsp)
  movq   0x4(%rdx),%xmm0
  shufps $0xe1,%xmm0,%xmm0
  movlps %xmm0,0x18(%rsp)
  movq   0x4(%r8),%xmm0
  shufps $0xe1,%xmm0,%xmm0
  movlps %xmm0,0x20(%rsp)
  movq   0x4(%rax),%xmm0
  shufps $0xe1,%xmm0,%xmm0
  movlps %xmm0,0x28(%rsp)
  movss  0x8(%r9),%xmm0
  movss  %xmm0,0x30(%rsp)
  movss  0x4(%r9),%xmm0
  jmp    L60
  nopl   0x0(%rax)
L91:
  comiss %xmm1,%xmm2
  movss  (%rdi),%xmm7
  movss  (%rsi),%xmm6
  movss  (%rdx),%xmm5
  movss  (%rax),%xmm4
  movss  (%r8),%xmm3
  movss  (%r9),%xmm8
  ja     L47
L76:
  movss  0x4(%rdi),%xmm0
  movss  %xmm8,0x30(%rsp)
  unpcklps %xmm0,%xmm7
  movss  0x4(%rsi),%xmm0
  movlps %xmm7,0x8(%rsp)
  unpcklps %xmm0,%xmm6
  movss  0x4(%rdx),%xmm0
  movlps %xmm6,0x10(%rsp)
  unpcklps %xmm0,%xmm5
  movss  0x4(%rax),%xmm0
  movlps %xmm5,0x18(%rsp)
  unpcklps %xmm0,%xmm4
  movss  0x4(%r8),%xmm0
  movlps %xmm4,0x20(%rsp)
  unpcklps %xmm0,%xmm3
  movss  0x4(%r9),%xmm0
  movlps %xmm3,0x28(%rsp)
L60:
  lea    0x18(%rsp),%rdx
  lea    0x20(%rsp),%rcx
  movss  %xmm0,0x34(%rsp)
  lea    0x10(%rsp),%rsi
  lea    0x8(%rsp),%rdi
  lea    0x30(%rsp),%r9
  lea    0x28(%rsp),%r8
  call   <tri_tri_overlap_test_2d@plt>
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L92
  add    $0x48,%rsp
  ret
L47:
  comiss %xmm0,%xmm2
  jb     L76
  movss  0x8(%rsi),%xmm0
  movss  %xmm8,0x30(%rsp)
  unpcklps %xmm0,%xmm6
  movss  0x8(%rdi),%xmm0
  movlps %xmm6,0x8(%rsp)
  unpcklps %xmm0,%xmm7
  movss  0x8(%rdx),%xmm0
  movlps %xmm7,0x10(%rsp)
  unpcklps %xmm0,%xmm5
  movss  0x8(%r8),%xmm0
  movlps %xmm5,0x18(%rsp)
  unpcklps %xmm0,%xmm3
  movss  0x8(%rax),%xmm0
  movlps %xmm3,0x20(%rsp)
  unpcklps %xmm0,%xmm4
  movss  0x8(%r9),%xmm0
  movlps %xmm4,0x28(%rsp)
  jmp    L60
L92:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D27
type_infered: byte[16]

tool: {"D27": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
int coplanar_tri_tri3d(float p1[3], float q1[3], float r1[3], float p2[3], float q2[3], float r2[3], float normal_1[3], float normal_2[3]) {
  float P1[2], Q1[2], R1[2];
  float P2[2], Q2[2], R2[2];
  float n_x, n_y, n_z;
  n_x = ((normal_1[0] < 0) ? -normal_1[0] : normal_1[0]);
  n_y = ((normal_1[1] < 0) ? -normal_1[1] : normal_1[1]);
  n_z = ((normal_1[2] < 0) ? -normal_1[2] : normal_1[2]);
  if ((n_x > n_z) && (n_x >= n_y)) {
    P1[0] = q1[2];
    P1[1] = q1[1];
    Q1[0] = p1[2];
    Q1[1] = p1[1];
    R1[0] = r1[2];
    R1[1] = r1[1];
    P2[0] = q2[2];
    P2[1] = q2[1];
    Q2[0] = p2[2];
    Q2[1] = p2[1];
    R2[0] = r2[2];
    R2[1] = r2[1];
  } else if ((n_y > n_z) && (n_y >= n_x)) {
    P1[0] = q1[0];
    P1[1] = q1[2];
    Q1[0] = p1[0];
    Q1[1] = p1[2];
    R1[0] = r1[0];
    R1[1] = r1[2];
    P2[0] = q2[0];
    P2[1] = q2[2];
    Q2[0] = p2[0];
    Q2[1] = p2[2];
    R2[0] = r2[0];
    R2[1] = r2[2];
  } else {
    P1[0] = p1[0];
    P1[1] = p1[1];
    Q1[0] = q1[0];
    Q1[1] = q1[1];
    R1[0] = r1[0];
    R1[1] = r1[1];
    P2[0] = p2[0];
    P2[1] = p2[1];
    Q2[0] = q2[0];
    Q2[1] = q2[1];
    R2[0] = r2[0];
    R2[1] = r2[1];
  }
  return tri_tri_overlap_test_2d(P1, Q1, R1, P2, Q2, R2);
}
```