user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<consistency_test>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  sub    $0x458,%rsp
  mov    %rsi,(%rsp)
  lea    0x440(%rsp),%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x448(%rsp)
  xor    %eax,%eax
  lea    0x40(%rsp),%rax
  mov    %rax,%rsi
  mov    %rax,0x10(%rsp)
  call   <clock_gettime@plt>
  mov    0x40(%rsp),%rbx
  xor    %edi,%edi
  mov    %rbx,0x18(%rsp)
  call   <time@plt>
  mov    %eax,0x3c(%rsp)
  lea    0x3c(%rsp),%rax
  mov    %rax,%rdi
  mov    %rax,0x28(%rsp)
  call   <ctime@plt>
  mov    %rax,0x20(%rsp)
  mov    %rbx,%rax
  nopw   0x0(%rax,%rax,1)
L72:
  mov    (%rsp),%rcx
  cmp    $0xffffffffffffffff,%rcx
  je     L81
  sub    0x18(%rsp),%rax
  cmp    %rcx,%rax
  jae    L141
L81:
  mov    0x10(%rsp),%rbx
  mov    %rbx,0x8(%rsp)
  nopw   0x0(%rax,%rax,1)
L51:
  mov    %rbx,%rsi
  mov    %ebp,%edi
  add    $0x10,%rbx
  call   <clock_gettime@plt>
  cmp    %rbx,%r12
  jne    L51
  mov    $0xffffffff,%r13d
  xor    %r14d,%r14d
  jmp    L64
  cs nopw 0x0(%rax,%rax,1)
L171:
  cmp    $0x3f,%r15d
  je     L118
L2:
  mov    %r15d,%r14d
L64:
  lea    0x1(%r14),%r15d
  movslq %r15d,%rbx
  mov    %rbx,%rax
  shl    $0x4,%rax
  mov    0x40(%rsp,%rax,1),%rdx
  mov    0x48(%rsp,%rax,1),%rcx
  movslq %r14d,%rax
  shl    $0x4,%rax
  mov    0x40(%rsp,%rax,1),%rdi
  mov    0x48(%rsp,%rax,1),%rsi
  call   <in_order@plt>
  test   %eax,%eax
  jne    L171
  cmp    $0x3f,%r15d
  je     L119
  mov    %r14d,%r13d
  jmp    L2
  cs nopw 0x0(%rax,%rax,1)
L118:
  cmp    $0xffffffff,%r13d
  jne    L50
  mov    0x40(%rsp),%rax
  jmp    L72
L119:
  mov    $0x3e,%r13d
L14:
  mov    0x20(%rsp),%rdi
  xor    %r12d,%r12d
  lea    D26(%rip),%rbp
  lea    D7(%rip),%r14
  call   <puts@plt>
  mov    %rbx,(%rsp)
  mov    0x8(%rsp),%rbx
  jmp    L69
L107:
  mov    0x8(%rbx),%rdx
  mov    (%rbx),%rsi
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <printf@plt>
  cmp    %r15d,%r12d
  je     L89
  add    $0x1,%r12d
  add    $0x10,%rbx
  cmp    $0x40,%r12d
  je     L112
L69:
  cmp    %r12d,%r13d
  jne    L107
  mov    %r14,%rdi
  call   <puts@plt>
  jmp    L107
L89:
  mov    %r14,%rdi
  add    $0x1,%r12d
  add    $0x10,%rbx
  call   <puts@plt>
  cmp    $0x40,%r12d
  jne    L69
L112:
  mov    (%rsp),%rbx
  movslq %r13d,%rax
  lea    D31(%rip),%rdi
  shl    $0x4,%rax
  imul   $0x3b9aca00,0x40(%rsp,%rax,1),%rsi
  shl    $0x4,%rbx
  sub    0x48(%rsp,%rbx,1),%rsi
  add    0x48(%rsp,%rax,1),%rsi
  imul   $0x3b9aca00,0x40(%rsp,%rbx,1),%rax
  sub    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %edi,%edi
  call   <fflush@plt>
  xor    %edi,%edi
  call   <time@plt>
  mov    0x28(%rsp),%rdi
  mov    %eax,0x3c(%rsp)
  call   <ctime@plt>
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D3(%rip),%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
L168:
  mov    0x448(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L84
  add    $0x458,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L141:
  lea    D21(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L168
L84:
  call   <__stack_chk_fail@plt>
L50:
  lea    0x1(%r13),%r15d
  movslq %r15d,%rbx
  jmp    L14
```

tool_calls: name: parse_data
arguments: data_label: D26
type: string
name: parse_data
arguments: data_label: D7
type: string
name: parse_data
arguments: data_label: D31
type: string
name: parse_data
arguments: data_label: D3
type: string
name: parse_data
arguments: data_label: D21
type: string

tool: D26: %lu:%lu


tool: D7: --------------------

tool: D31: Delta: %llu ns


tool: D3: [FAILED]

tool: D21: [OK]

assistant: ```c
int consistency_test(int clock_type, unsigned long seconds) {
  struct timespec list[64];
  int i, inconsistent;
  long now, then;
  time_t t;
  char *start_str;
  clock_gettime(clock_type, &list[0]);
  now = then = list[0].tv_sec;
  t = time(0);
  start_str = ctime(&t);
  while (seconds == -1 || now - then < seconds) {
    inconsistent = -1;
    for (i = 0; i < 64; i++)
      clock_gettime(clock_type, &list[i]);
    for (i = 0; i < 64 - 1; i++)
      if (!in_order(list[i], list[i + 1]))
        inconsistent = i;
    if (inconsistent >= 0) {
      unsigned long long delta;
      printf("\%s\n", start_str);
      for (i = 0; i < 64; i++) {
        if (i == inconsistent)
          printf("--------------------\n");
        printf("%lu:%lu\n", list[i].tv_sec, list[i].tv_nsec);
        if (i == inconsistent + 1)
          printf("--------------------\n");
      }
      delta = list[inconsistent].tv_sec * 1000000000ULL;
      delta += list[inconsistent].tv_nsec;
      delta -= list[inconsistent + 1].tv_sec * 1000000000ULL;
      delta -= list[inconsistent + 1].tv_nsec;
      printf("Delta: %llu ns\n", delta);
      fflush(0);
      t = time(0);
      printf("%s\n", ctime(&t));
      printf("[FAILED]\n");
      return -1;
    }
    now = list[0].tv_sec;
  }
  printf("[OK]\n");
  return 0;
}
```