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

```asm
<writeTimeStamp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    -0x28(%rbp),%rcx
  movabs $0x20c49ba5e353f7cf,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x7,%rax
  sar    $0x3f,%rcx
  mov    %rcx,%rdx
  sub    %rdx,%rax
  mov    %rax,%rdi
  call   <floor@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  imul   $0x3e8,%eax,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x8(%rbp)
  subl   $0x7c558180,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  sar    $0x18,%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1c(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1c(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1c(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1c(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x20,%rax
  mov    %rax,%rcx
  movabs $0x20c49ba5e353f7cf,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x7,%rax
  sar    $0x3f,%rcx
  mov    %rcx,%rdx
  sub    %rdx,%rax
  mov    %eax,%edi
  call   <round@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  sar    $0x18,%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1c(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1c(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1c(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    $0x0,%eax
  call   <random2@plt>
  movsd  D2(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1c(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  cvttsd2si %xmm0,%edx
  mov    %dl,(%rax)
  nop
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D2
type_infered: f64

tool: D2: 255

assistant: ```c
void writeTimeStamp(char *buffer, int offset, long long int time) {
  uint64_t seconds = floor(time / 1000);
  uint64_t milliseconds = time - (uint64_t)seconds * 1000;
  seconds += ((uint64_t)((365 * 70) + 17) * 24 * 60 * 60);
  buffer[offset++] = (char)(seconds >> 24);
  buffer[offset++] = (char)(seconds >> 16);
  buffer[offset++] = (char)(seconds >> 8);
  buffer[offset++] = (char)(seconds >> 0);
  uint64_t fraction = round((uint64_t)milliseconds * 0x100000000 / 1000);
  buffer[offset++] = (char)(fraction >> 24);
  buffer[offset++] = (char)(fraction >> 16);
  buffer[offset++] = (char)(fraction >> 8);
  buffer[offset++] = (char)(random2() * 255.0);
}
```