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

```asm
<coplanar_tri_tri3d>:
  endbr64
  sub    $0x48,%rsp
  mov    %rdx,%rax
  mov    0x50(%rsp),%rdx
  mov    %fs:0x28,%r10
  mov    %r10,0x38(%rsp)
  xor    %r10d,%r10d
  movss  (%rdx),%xmm0
  pxor   %xmm1,%xmm1
  comiss %xmm0,%xmm1
  ja     L8
L9:
  movss  0x4(%rdx),%xmm2
  pxor   %xmm1,%xmm1
  comiss %xmm2,%xmm1
  ja     L75
L113:
  movss  0x8(%rdx),%xmm1
  pxor   %xmm3,%xmm3
  comiss %xmm1,%xmm3
  ja     L1
L69:
  comiss %xmm1,%xmm0
  jbe    L22
  comiss %xmm2,%xmm0
  jb     L22
  movss  0x8(%rsi),%xmm0
  movss  %xmm0,0x8(%rsp)
  movss  0x4(%rsi),%xmm0
  movss  %xmm0,0xc(%rsp)
  movss  0x8(%rdi),%xmm0
  movss  %xmm0,0x10(%rsp)
  movss  0x4(%rdi),%xmm0
  movss  %xmm0,0x14(%rsp)
  movss  0x8(%rax),%xmm0
  movss  %xmm0,0x18(%rsp)
  movss  0x4(%rax),%xmm0
  movss  %xmm0,0x1c(%rsp)
  movss  0x8(%r8),%xmm0
  movss  %xmm0,0x20(%rsp)
  movss  0x4(%r8),%xmm0
  movss  %xmm0,0x24(%rsp)
  movss  0x8(%rcx),%xmm0
  movss  %xmm0,0x28(%rsp)
  movss  0x4(%rcx),%xmm0
  movss  %xmm0,0x2c(%rsp)
  movss  0x8(%r9),%xmm0
  movss  %xmm0,0x30(%rsp)
  movss  0x4(%r9),%xmm0
  jmp    L29
L8:
  xorps  D13(%rip),%xmm0
  jmp    L9
L75:
  xorps  D13(%rip),%xmm2
  jmp    L113
L1:
  xorps  D13(%rip),%xmm1
  jmp    L69
L22:
  comiss %xmm1,%xmm2
  jbe    L38
  comiss %xmm0,%xmm2
  jb     L38
  movss  (%rsi),%xmm0
  movss  %xmm0,0x8(%rsp)
  movss  0x8(%rsi),%xmm0
  movss  %xmm0,0xc(%rsp)
  movss  (%rdi),%xmm0
  movss  %xmm0,0x10(%rsp)
  movss  0x8(%rdi),%xmm0
  movss  %xmm0,0x14(%rsp)
  movss  (%rax),%xmm0
  movss  %xmm0,0x18(%rsp)
  movss  0x8(%rax),%xmm0
  movss  %xmm0,0x1c(%rsp)
  movss  (%r8),%xmm0
  movss  %xmm0,0x20(%rsp)
  movss  0x8(%r8),%xmm0
  movss  %xmm0,0x24(%rsp)
  movss  (%rcx),%xmm0
  movss  %xmm0,0x28(%rsp)
  movss  0x8(%rcx),%xmm0
  movss  %xmm0,0x2c(%rsp)
  movss  (%r9),%xmm0
  movss  %xmm0,0x30(%rsp)
  movss  0x8(%r9),%xmm0
  jmp    L29
L38:
  movss  (%rdi),%xmm0
  movss  %xmm0,0x8(%rsp)
  movss  0x4(%rdi),%xmm0
  movss  %xmm0,0xc(%rsp)
  movss  (%rsi),%xmm0
  movss  %xmm0,0x10(%rsp)
  movss  0x4(%rsi),%xmm0
  movss  %xmm0,0x14(%rsp)
  movss  (%rax),%xmm0
  movss  %xmm0,0x18(%rsp)
  movss  0x4(%rax),%xmm0
  movss  %xmm0,0x1c(%rsp)
  movss  (%rcx),%xmm0
  movss  %xmm0,0x20(%rsp)
  movss  0x4(%rcx),%xmm0
  movss  %xmm0,0x24(%rsp)
  movss  (%r8),%xmm0
  movss  %xmm0,0x28(%rsp)
  movss  0x4(%r8),%xmm0
  movss  %xmm0,0x2c(%rsp)
  movss  (%r9),%xmm0
  movss  %xmm0,0x30(%rsp)
  movss  0x4(%r9),%xmm0
L29:
  movss  %xmm0,0x34(%rsp)
  lea    0x20(%rsp),%rcx
  lea    0x18(%rsp),%rdx
  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    L54
  add    $0x48,%rsp
  ret
L54:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D13
type: byte[16]

tool: {"D13": [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);
}
```