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

```asm
<test_compare_timespec>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  movabs $0x3b9ac9ff00000005,%rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r12
  lea    0x8(%rsp),%rbp
  movq   $0xa,0x8(%rsp)
  movq   $0x5,0x10(%rsp)
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <timespec_compare@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movq   $0xa,0x8(%rsp)
  movq   $0x32,0x10(%rsp)
  call   <timespec_compare@plt>
  xor    %edi,%edi
  cmp    $0xffffffff,%eax
  sete   %dil
  call   <assert@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movq   $0x2c,0x8(%rsp)
  movq   $0x2c,0x10(%rsp)
  call   <timespec_compare@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movabs $0x1e00000005,%rax
  mov    %rax,0x8(%rsp)
  movabs $0x1d00000005,%rax
  mov    %rax,0x10(%rsp)
  call   <timespec_compare@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movabs $0x1000000005,%rax
  mov    %rax,0x8(%rsp)
  movabs $0x3d00000005,%rax
  mov    %rax,0x10(%rsp)
  call   <timespec_compare@plt>
  xor    %edi,%edi
  cmp    $0xffffffff,%eax
  sete   %dil
  call   <assert@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movabs $0x30900000005,%rax
  mov    %rax,0x8(%rsp)
  mov    %rax,0x10(%rsp)
  call   <timespec_compare@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    %rbx,0x10(%rsp)
  movq   $0x6,0x8(%rsp)
  call   <timespec_compare@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    %rbx,0x8(%rsp)
  movq   $0x6,0x10(%rsp)
  call   <timespec_compare@plt>
  xor    %edi,%edi
  cmp    $0xffffffff,%eax
  sete   %dil
  call   <assert@plt>
  mov    %rbp,%rdi
  mov    %r12,%rsi
  movabs $0x3b9ac9ff0000002c,%rax
  mov    %rax,0x8(%rsp)
  mov    %rax,0x10(%rsp)
  call   <timespec_compare@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L4:
  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);
}
```