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

```asm
<makeTimevalStruct>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %rdi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movzbl (%rsi),%eax
  mov    %al,0x1d(%rsp)
  movzbl 0x1(%rsi),%eax
  mov    %al,0x1e(%rsp)
  movb   $0x2d,0x1f(%rsp)
  movzbl 0x2(%rsi),%eax
  mov    %al,0x20(%rsp)
  movzbl 0x3(%rsi),%eax
  mov    %al,0x21(%rsp)
  movb   $0x2d,0x22(%rsp)
  movzbl 0x4(%rsi),%eax
  cmp    $0x39,%al
  mov    $0x30,%edx
  cmove  %eax,%edx
  setne  %cl
  add    $0x31,%ecx
  mov    %cl,0x23(%rsp)
  mov    %dl,0x24(%rsp)
  mov    %al,0x25(%rsp)
  movzbl 0x5(%rsi),%eax
  mov    %al,0x26(%rsp)
  movb   $0x0,0x27(%rsp)
  call   <strlen@plt>
  cmp    $0x5,%eax
  jle    L50
  movzbl (%rbx),%eax
  mov    %al,0x11(%rsp)
  movzbl 0x1(%rbx),%eax
  mov    %al,0x12(%rsp)
  movzbl 0x2(%rbx),%eax
  mov    %al,0x13(%rsp)
  movzbl 0x3(%rbx),%eax
  mov    %al,0x14(%rsp)
  movzbl 0x4(%rbx),%eax
  mov    %al,0x15(%rsp)
  movzbl 0x5(%rbx),%eax
  mov    $0x7,%r12d
L64:
  mov    %al,0x16(%rsp)
  lea    0x11(%rsp),%rdi
  call   <atoi@plt>
  mov    %eax,%r14d
  lea    0x13(%rsp),%rdi
  call   <atoi@plt>
  mov    %eax,%r13d
  lea    0x15(%rsp),%rdi
  call   <atoi@plt>
  mov    %r14d,0x4(%rsp)
  mov    %r13d,0x8(%rsp)
  mov    %eax,0xc(%rsp)
  lea    0x4(%rsp),%rdx
  lea    0x1d(%rsp),%rdi
  lea    D3(%rip),%rsi
  call   <strptime@plt>
  test   %rax,%rax
  je     L13
  lea    0x4(%rsp),%rdi
  call   <mktime@plt>
  mov    %eax,%ebp
L13:
  movslq %r12d,%r12
  add    %r12,%rbx
  movzbl (%rbx),%edx
  test   %dl,%dl
  je     L12
  mov    $0x1,%eax
  lea    0x16(%rsp),%rcx
L7:
  mov    %dl,(%rcx,%rax,1)
  mov    %eax,%r12d
  add    $0x1,%rax
  movzbl -0x1(%rbx,%rax,1),%edx
  test   %dl,%dl
  jne    L7
L61:
  lea    0x17(%rsp),%rdi
  call   <atof@plt>
  mov    %eax,%ebx
  mov    $0x6,%esi
  sub    %r12d,%esi
  mov    $0xa,%edi
  call   <pow@plt>
  shl    $0x20,%rbp
  imul   %ebx,%eax
  or     %rbp,%rax
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L54
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L50:
  movzbl (%rbx),%eax
  mov    %al,0x11(%rsp)
  movzbl 0x1(%rbx),%eax
  mov    %al,0x13(%rsp)
  movzbl 0x2(%rbx),%eax
  mov    %al,0x14(%rsp)
  movzbl 0x3(%rbx),%eax
  mov    %al,0x15(%rsp)
  movzbl 0x4(%rbx),%eax
  mov    $0x6,%r12d
  jmp    L64
L12:
  mov    $0x0,%r12d
  jmp    L61
L54:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D3
data_type: string

tool: D3: %d-%m-%Y

assistant: ```c
struct timeval makeTimevalStruct(char *hhmmss, char *datestr) {
  struct tm tm;
  time_t t;
  struct timeval timeStruct;
  char buf[11];
  buf[0] = datestr[0];
  buf[1] = datestr[1];
  buf[2] = '-';
  buf[3] = datestr[2];
  buf[4] = datestr[3];
  buf[5] = '-';
  if (datestr[4] == '9') {
    buf[6] = '1';
    buf[7] = '9';
  } else {
    buf[6] = '2';
    buf[7] = '0';
  }
  buf[8] = datestr[4];
  buf[9] = datestr[5];
  buf[10] = 0;
  char hourString[2];
  char minString[2];
  char secString[2];
  char fracSecString[6];
  int hour;
  int min;
  int sec;
  int fracSec;
  int fracSecIndex;
  int fracSecCopyIndex;
  if (strlen(hhmmss) > 5) {
    hourString[0] = hhmmss[0];
    hourString[1] = hhmmss[1];
    minString[0] = hhmmss[2];
    minString[1] = hhmmss[3];
    secString[0] = hhmmss[4];
    secString[1] = hhmmss[5];
    fracSecCopyIndex = 7;
  } else {
    hourString[0] = hhmmss[0];
    minString[0] = hhmmss[1];
    minString[1] = hhmmss[2];
    secString[0] = hhmmss[3];
    secString[1] = hhmmss[4];
    fracSecCopyIndex = 6;
  }
  hour = atoi(hourString);
  min = atoi(minString);
  sec = atoi(secString);
  tm.tm_hour = hour;
  tm.tm_min = min;
  tm.tm_sec = sec;
  if (strptime(buf, "%d-%m-%Y", &tm) != NULL) {
    t = mktime(&tm);
  }
  fracSecIndex = 0;
  while (hhmmss[fracSecCopyIndex] != 0) {
    fracSecString[fracSecIndex] = hhmmss[fracSecCopyIndex];
    fracSecCopyIndex++;
    fracSecIndex++;
  }
  fracSec = atof(fracSecString);
  fracSec = fracSec * pow(10, 6 - fracSecIndex);
  timeStruct.tv_sec = t;
  timeStruct.tv_usec = fracSec;
  return timeStruct;
}
```