user: What is the c source code of the assembly code below:

```asm
<refine>:
  endbr64
  push   %r15
  movd   %ecx,%xmm1
  movd   %edx,%xmm0
  movd   %r8d,%xmm2
  push   %r14
  punpckldq %xmm1,%xmm0
  movd   %edx,%xmm3
  push   %r13
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x98,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  movq   %xmm0,0x24(%rsp)
  movd   %ecx,%xmm0
  cmp    %ecx,%ebx
  punpckldq %xmm2,%xmm0
  sete   %al
  cmp    %r8d,%ebx
  mov    %ecx,0x4c(%rsp)
  movq   %xmm0,0x34(%rsp)
  movd   %r8d,%xmm0
  punpckldq %xmm3,%xmm0
  mov    %ecx,0x5c(%rsp)
  movq   %xmm0,0x44(%rsp)
  movd   %edx,%xmm0
  punpckldq %xmm2,%xmm0
  mov    %edx,0x3c(%rsp)
  movq   %xmm0,0x54(%rsp)
  movd   %r8d,%xmm0
  punpckldq %xmm1,%xmm0
  mov    %edx,0x6c(%rsp)
  movslq (%rsi),%rdx
  movq   %xmm0,0x64(%rsp)
  movd   %ecx,%xmm0
  sete   %cl
  punpckldq %xmm3,%xmm0
  or     %cl,%al
  mov    %r8d,0x2c(%rsp)
  mov    %r8d,0x7c(%rsp)
  movq   %xmm0,0x74(%rsp)
  jne    L76
  mov    %r8d,%ebp
  cmp    %r8d,%r12d
  je     L76
  test   %edx,%edx
  jle    L38
  lea    -0x1(%rdx),%eax
  mov    %rdi,%r15
  lea    0x20(%rsp),%r13
  shl    $0x4,%rax
  lea    0x30(%rsp),%r14
  lea    0x10(%rdi,%rax,1),%rax
  mov    %rax,0x8(%rsp)
  jmp    L106
  nopl   0x0(%rax)
L28:
  mov    $0x3,%edx
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <equal@plt>
  test   %rax,%rax
  jne    L76
  lea    0x40(%rsp),%rdi
  mov    $0x3,%edx
  mov    %r15,%rsi
  call   <equal@plt>
  test   %rax,%rax
  jne    L76
  lea    0x50(%rsp),%rdi
  mov    $0x3,%edx
  mov    %r15,%rsi
  call   <equal@plt>
  test   %rax,%rax
  jne    L76
  lea    0x60(%rsp),%rdi
  mov    $0x3,%edx
  mov    %r15,%rsi
  call   <equal@plt>
  test   %rax,%rax
  jne    L76
  lea    0x70(%rsp),%rdi
  mov    $0x3,%edx
  mov    %r15,%rsi
  call   <equal@plt>
  test   %rax,%rax
  jne    L76
  add    $0x10,%r15
  cmp    %r15,0x8(%rsp)
  je     L53
L106:
  mov    $0x3,%edx
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <equal@plt>
  test   %rax,%rax
  je     L28
  nopl   0x0(%rax)
L76:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L53:
  mov    0x10(%rsp),%rax
  movslq (%rax),%rdx
L38:
  mov    0x18(%rsp),%rcx
  shl    $0x4,%rdx
  mov    %ebx,0x4(%rcx,%rdx,1)
  mov    0x10(%rsp),%rbx
  movslq (%rbx),%rax
  shl    $0x4,%rax
  mov    %r12d,0x8(%rcx,%rax,1)
  movslq (%rbx),%rax
  shl    $0x4,%rax
  mov    %ebp,0xc(%rcx,%rax,1)
  addl   $0x1,(%rbx)
  jmp    L76
L17:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void refine(int triples[20000][4], int *len, int first, int second, int third) {
  register int i;
  int t1[4], t2[4], t3[4], t4[4], t5[4], t6[4];
  int check_len;
  int write = 1;
  t1[1] = first;
  t1[2] = second;
  t1[3] = third;
  t2[1] = second;
  t2[2] = third;
  t2[3] = first;
  t3[1] = third;
  t3[2] = first;
  t3[3] = second;
  t4[1] = first;
  t4[2] = third;
  t4[3] = second;
  t5[1] = third;
  t5[2] = second;
  t5[3] = first;
  t6[1] = second;
  t6[2] = first;
  t6[3] = third;
  check_len = *len;
  if ((first == second) || (second == third) || (first == third))
    return;
  for (i = 0; i < check_len; i++) {
    if ((equal(t1, triples[i], 3)) || (equal(t2, triples[i], 3)) || (equal(t3, triples[i], 3)) || (equal(t4, triples[i], 3)) || (equal(t5, triples[i], 3)) || (equal(t6, triples[i], 3)))
      return;
  }
  if (write == 1) {
    triples[(*len)][1] = first;
    triples[(*len)][2] = second;
    triples[(*len)][3] = third;
    (*len) = (*len) + 1;
  }
}
```