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

```asm
<test_compare_timespec>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movl   $0xa,0x8(%rsp)
  movl   $0x0,0xc(%rsp)
  movl   $0x5,0x10(%rsp)
  movl   $0x0,0x14(%rsp)
  lea    0x10(%rsp),%rbp
  lea    0x8(%rsp),%rbx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <timespec_compare@plt>
  cmp    $0x1,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0xa,0x8(%rsp)
  movl   $0x0,0xc(%rsp)
  movl   $0x32,0x10(%rsp)
  movl   $0x0,0x14(%rsp)
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <timespec_compare@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x2c,0x8(%rsp)
  movl   $0x0,0xc(%rsp)
  movl   $0x2c,0x10(%rsp)
  movl   $0x0,0x14(%rsp)
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <timespec_compare@plt>
  test   %eax,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x5,0x8(%rsp)
  movl   $0x1e,0xc(%rsp)
  movl   $0x5,0x10(%rsp)
  movl   $0x1d,0x14(%rsp)
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <timespec_compare@plt>
  cmp    $0x1,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x5,0x8(%rsp)
  movl   $0x10,0xc(%rsp)
  movl   $0x5,0x10(%rsp)
  movl   $0x3d,0x14(%rsp)
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <timespec_compare@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x5,0x8(%rsp)
  movl   $0x309,0xc(%rsp)
  movl   $0x5,0x10(%rsp)
  movl   $0x309,0x14(%rsp)
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <timespec_compare@plt>
  test   %eax,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x6,0x8(%rsp)
  movl   $0x0,0xc(%rsp)
  movl   $0x5,0x10(%rsp)
  movl   $0x3b9ac9ff,0x14(%rsp)
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <timespec_compare@plt>
  cmp    $0x1,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x5,0x8(%rsp)
  movl   $0x3b9ac9ff,0xc(%rsp)
  movl   $0x6,0x10(%rsp)
  movl   $0x0,0x14(%rsp)
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <timespec_compare@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x2c,0x8(%rsp)
  movl   $0x3b9ac9ff,0xc(%rsp)
  movl   $0x2c,0x10(%rsp)
  movl   $0x3b9ac9ff,0x14(%rsp)
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <timespec_compare@plt>
  test   %eax,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
L8:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void test_compare_timespec(void) {
  struct timespec a;
  struct timespec b;
  int rc;
  a.tv_sec = 10;
  a.tv_nsec = 0;
  ;
  b.tv_sec = 5;
  b.tv_nsec = 0;
  ;
  rc = timespec_compare(&a, &b);
  assert(rc == 1);
  a.tv_sec = 10;
  a.tv_nsec = 0;
  ;
  b.tv_sec = 50;
  b.tv_nsec = 0;
  ;
  rc = timespec_compare(&a, &b);
  assert(rc == -1);
  a.tv_sec = 44;
  a.tv_nsec = 0;
  ;
  b.tv_sec = 44;
  b.tv_nsec = 0;
  ;
  rc = timespec_compare(&a, &b);
  assert(rc == 0);
  a.tv_sec = 5;
  a.tv_nsec = 30;
  ;
  b.tv_sec = 5;
  b.tv_nsec = 29;
  ;
  rc = timespec_compare(&a, &b);
  assert(rc == 1);
  a.tv_sec = 5;
  a.tv_nsec = 16;
  ;
  b.tv_sec = 5;
  b.tv_nsec = 61;
  ;
  rc = timespec_compare(&a, &b);
  assert(rc == -1);
  a.tv_sec = 5;
  a.tv_nsec = 777;
  ;
  b.tv_sec = 5;
  b.tv_nsec = 777;
  ;
  rc = timespec_compare(&a, &b);
  assert(rc == 0);
  a.tv_sec = 6;
  a.tv_nsec = 0;
  ;
  b.tv_sec = 5;
  b.tv_nsec = 999999999;
  ;
  rc = timespec_compare(&a, &b);
  assert(rc == 1);
  a.tv_sec = 5;
  a.tv_nsec = 999999999;
  ;
  b.tv_sec = 6;
  b.tv_nsec = 0;
  ;
  rc = timespec_compare(&a, &b);
  assert(rc == -1);
  a.tv_sec = 44;
  a.tv_nsec = 999999999;
  ;
  b.tv_sec = 44;
  b.tv_nsec = 999999999;
  ;
  rc = timespec_compare(&a, &b);
  assert(rc == 0);
}
```