user: 请从给定的汇编指令推导出C源代码:

```asm
<floquetsort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x3d0,%rsp
  mov    %rdi,-0x398(%rbp)
  mov    %rsi,-0x3a0(%rbp)
  mov    %rdx,-0x3a8(%rbp)
  mov    %rcx,-0x3b0(%rbp)
  mov    %r8,-0x3b8(%rbp)
  mov    %r9,-0x3c0(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x3c8(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x3d0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x384(%rbp)
  jmp    L64
L56:
  mov    0x20(%rbp),%ecx
  lea    -0x370(%rbp),%rdx
  mov    -0x384(%rbp),%esi
  mov    -0x3c8(%rbp),%rax
  mov    %rax,%rdi
  call   <select_vec@plt>
  mov    %eax,-0x37c(%rbp)
  mov    0x20(%rbp),%ecx
  lea    -0x340(%rbp),%rdx
  mov    -0x384(%rbp),%esi
  mov    -0x3d0(%rbp),%rax
  mov    %rax,%rdi
  call   <select_vec@plt>
  mov    %eax,-0x37c(%rbp)
  movl   $0x0,-0x380(%rbp)
  jmp    L47
L2:
  mov    0x20(%rbp),%ecx
  lea    -0x310(%rbp),%rdx
  mov    -0x380(%rbp),%esi
  mov    -0x3a8(%rbp),%rax
  mov    %rax,%rdi
  call   <select_vec@plt>
  mov    %eax,-0x37c(%rbp)
  mov    0x20(%rbp),%ecx
  lea    -0x2e0(%rbp),%rdx
  mov    -0x380(%rbp),%esi
  mov    -0x3b0(%rbp),%rax
  mov    %rax,%rdi
  call   <select_vec@plt>
  mov    %eax,-0x37c(%rbp)
  mov    0x20(%rbp),%edi
  lea    -0x2e0(%rbp),%rcx
  lea    -0x310(%rbp),%rdx
  lea    -0x340(%rbp),%rsi
  lea    -0x370(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <direct_prod@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x378(%rbp)
  movsd  -0x378(%rbp),%xmm0
  comisd D6(%rip),%xmm0
  jb     L41
  mov    0x20(%rbp),%ecx
  lea    -0x250(%rbp),%rdx
  mov    -0x384(%rbp),%esi
  lea    -0x310(%rbp),%rax
  mov    %rax,%rdi
  call   <write_vec@plt>
  mov    %eax,-0x37c(%rbp)
  mov    0x20(%rbp),%ecx
  lea    -0x130(%rbp),%rdx
  mov    -0x384(%rbp),%esi
  lea    -0x2e0(%rbp),%rax
  mov    %rax,%rdi
  call   <write_vec@plt>
  mov    %eax,-0x37c(%rbp)
  mov    -0x380(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x398(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x384(%rbp),%eax
  cltq
  movsd  %xmm0,-0x2b0(%rbp,%rax,8)
  mov    -0x380(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x3a0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x384(%rbp),%eax
  cltq
  movsd  %xmm0,-0x280(%rbp,%rax,8)
  jmp    L67
L41:
  addl   $0x1,-0x380(%rbp)
L47:
  mov    -0x380(%rbp),%eax
  cmp    0x20(%rbp),%eax
  jl     L2
L67:
  addl   $0x1,-0x384(%rbp)
L64:
  mov    -0x384(%rbp),%eax
  cmp    0x20(%rbp),%eax
  jl     L56
  mov    0x20(%rbp),%edx
  mov    -0x398(%rbp),%rcx
  lea    -0x2b0(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <arrcopy@plt>
  mov    %eax,-0x37c(%rbp)
  mov    0x20(%rbp),%edx
  mov    -0x3a0(%rbp),%rcx
  lea    -0x280(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <arrcopy@plt>
  mov    %eax,-0x37c(%rbp)
  mov    0x20(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edx
  mov    -0x3a8(%rbp),%rcx
  lea    -0x250(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <arrcopy@plt>
  mov    %eax,-0x37c(%rbp)
  mov    0x20(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edx
  mov    -0x3b0(%rbp),%rcx
  lea    -0x130(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <arrcopy@plt>
  mov    %eax,-0x37c(%rbp)
  mov    -0x37c(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D6
type_guessed: f64

tool: D6: 0.5

assistant: ```c
int floquetsort(double evals_real[], double evals_imag[], double evecs_real[], double evecs_imag[], double prev_real[], double prev_imag[], double vecs_prev_real[], double vecs_prev_imag[], int size) {
  int i, j, err;
  double dot;
  double vec_prev_real[((2 * 1 + 1) * ((2 * 1 + 1) + 1)) / 2], vec_prev_imag[((2 * 1 + 1) * ((2 * 1 + 1) + 1)) / 2];
  double vec_test_real[((2 * 1 + 1) * ((2 * 1 + 1) + 1)) / 2], vec_test_imag[((2 * 1 + 1) * ((2 * 1 + 1) + 1)) / 2];
  double evals_temp_real[((2 * 1 + 1) * ((2 * 1 + 1) + 1)) / 2], evals_temp_imag[((2 * 1 + 1) * ((2 * 1 + 1) + 1)) / 2];
  double evecs_temp_real[((2 * 1 + 1) * ((2 * 1 + 1) + 1)) / 2 * ((2 * 1 + 1) * ((2 * 1 + 1) + 1)) / 2], evecs_temp_imag[((2 * 1 + 1) * ((2 * 1 + 1) + 1)) / 2 * ((2 * 1 + 1) * ((2 * 1 + 1) + 1)) / 2];
  for (i = 0; i < size; i++) {
    err = select_vec(vecs_prev_real, i, vec_prev_real, size);
    err = select_vec(vecs_prev_imag, i, vec_prev_imag, size);
    for (j = 0; j < size; j++) {
      err = select_vec(evecs_real, j, vec_test_real, size);
      err = select_vec(evecs_imag, j, vec_test_imag, size);
      dot = direct_prod(vec_prev_real, vec_prev_imag, vec_test_real, vec_test_imag, size);
      if (dot >= 0.5) {
        err = write_vec(vec_test_real, i, evecs_temp_real, size);
        err = write_vec(vec_test_imag, i, evecs_temp_imag, size);
        evals_temp_real[i] = evals_real[j];
        evals_temp_imag[i] = evals_imag[j];
        break;
      }
    }
  }
  err = arrcopy(evals_temp_real, evals_real, size);
  err = arrcopy(evals_temp_imag, evals_imag, size);
  err = arrcopy(evecs_temp_real, evecs_real, size * size);
  err = arrcopy(evecs_temp_imag, evecs_imag, size * size);
  return (err);
}
```