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

```asm
<main>:
  endbr64
  push   %rbx
  xor    %edi,%edi
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  call   <time@plt>
  lea    0xc(%rsp),%rdi
  mov    %eax,0xc(%rsp)
  call   <localtime@plt>
  mov    %rax,%rbx
  lea    D88(%rip),%rax
  mov    0x10(%rbx),%edi
  mov    0x4(%rbx),%edx
  mov    %rax,0x30(%rsp)
  lea    D27(%rip),%rax
  mov    %rax,0x38(%rsp)
  lea    D3(%rip),%rax
  mov    %rax,0x40(%rsp)
  lea    D123(%rip),%rax
  lea    0x76c(%rdi),%r8d
  mov    %rax,0x48(%rsp)
  lea    D72(%rip),%rax
  lea    D25(%rip),%rdi
  mov    %rax,0x50(%rsp)
  lea    D138(%rip),%rax
  mov    %rax,0x58(%rsp)
  lea    D92(%rip),%rax
  mov    %rax,0x60(%rsp)
  lea    D14(%rip),%rax
  mov    %rax,0x10(%rsp)
  lea    D115(%rip),%rax
  mov    %rax,0x18(%rsp)
  lea    D22(%rip),%rax
  mov    %rax,0x20(%rsp)
  lea    D90(%rip),%rax
  mov    %rax,0x28(%rsp)
  mov    0x8(%rbx),%rax
  mov    0x10(%rsp,%rax,8),%rcx
  mov    (%rbx),%eax
  sub    $0x1,%eax
  cltq
  mov    0x30(%rsp,%rax,8),%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x14(%rbx),%esi
  mov    0x1c(%rbx),%ecx
  mov    0x18(%rbx),%edx
  cmp    $0xc,%esi
  jle    L16
  sub    $0xc,%esi
  lea    D44(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L3:
  xor    %eax,%eax
  call   <getchar@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L29
  add    $0x70,%rsp
  xor    %eax,%eax
  pop    %rbx
  ret
L16:
  lea    D128(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L3
L29:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D88
datatype: string
name: parse_data
arguments: label: D27
datatype: string
name: parse_data
arguments: label: D3
datatype: string
name: parse_data
arguments: label: D123
datatype: string
name: parse_data
arguments: label: D72
datatype: string
name: parse_data
arguments: label: D25
datatype: string
name: parse_data
arguments: label: D138
datatype: string
name: parse_data
arguments: label: D92
datatype: string
name: parse_data
arguments: label: D14
datatype: string
name: parse_data
arguments: label: D115
datatype: string
name: parse_data
arguments: label: D22
datatype: string
name: parse_data
arguments: label: D90
datatype: string
name: parse_data
arguments: label: D44
datatype: string
name: parse_data
arguments: label: D128
datatype: string

tool: D88: Luni

tool: D27: Marti

tool: D3: Miercuri

tool: D123: Joi

tool: D72: Vineri

tool: D25: Astazi este %s, %d %s %d.


tool: D138: Sambata

tool: D92: Duminica

tool: D14: Ian

tool: D115: Feb

tool: D22: Martie

tool: D90: Apr

tool: D44: Iar ceasul este %02d:%02d:%02d PM.


tool: D128: Iar ceasul este %d:%02d:%02d AM.


assistant: ```c
int main(void) {
  struct tm *t;
  time_t now;
  now = time(NULL);
  t = localtime(&now);
  char *zile[] = {"Luni", "Marti", "Miercuri", "Joi", "Vineri", "Sambata", "Duminica"};
  char *luni[] = {"Ian", "Feb", "Martie", "Apr"};
  printf("Astazi este %s, %d %s %d.\n", zile[t->tm_wday - 1], t->tm_mday, luni[t->tm_mon], t->tm_year + 1900);
  if (t->tm_hour > 12) {
    printf("Iar ceasul este %02d:%02d:%02d PM.\n", t->tm_hour - 12, t->tm_min, t->tm_sec);
  } else {
    printf("Iar ceasul este %d:%02d:%02d AM.\n", t->tm_hour, t->tm_min, t->tm_sec);
  }
  getchar();
  return 0;
}
```