user: Translate the below assembly code into C programming language:

```asm
<parse_tarline>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  mov    %rdi,%rsi
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x268,%rsp
  mov    %rdx,(%rsp)
  lea    0x4c(%rsp),%r14
  lea    0x50(%rsp),%rbp
  mov    0x2a0(%rsp),%rax
  mov    %rcx,0x8(%rsp)
  mov    %r14,%rdx
  mov    %rbp,%rdi
  mov    0x2b0(%rsp),%r12
  mov    %rax,0x28(%rsp)
  mov    0x2a8(%rsp),%rax
  mov    %r8,0x18(%rsp)
  mov    %rax,0x30(%rsp)
  mov    0x2b8(%rsp),%rax
  mov    %r9,0x20(%rsp)
  mov    %rax,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x258(%rsp)
  xor    %eax,%eax
  movl   $0x0,(%r12)
  movl   $0x0,0x4c(%rsp)
  call   <nexttoken@plt>
  test   %eax,%eax
  jne    L146
L45:
  xor    %eax,%eax
L112:
  mov    0x258(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L5
  add    $0x268,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L146:
  movsbl 0x50(%rsp),%edi
  call   <tolower@plt>
  cmp    $0x6c,%al
  jne    L138
  orl    $0x20,(%r12)
L138:
  mov    %rbx,%r15
  jmp    L117
  nopl   0x0(%rax,%rax,1)
L212:
  add    $0x1,%r15
  cmpb   $0x0,-0x1(%r15)
  je     L276
L117:
  movsbl (%r15),%edi
  call   <tolower@plt>
  cmp    $0x77,%al
  jne    L212
  cmpb   $0x0,(%r15)
  je     L276
L12:
  movsbl 0x50(%rsp),%edi
  call   <tolower@plt>
  cmp    $0x64,%al
  jne    L132
  mov    0x2c0(%rsp),%eax
  test   %eax,%eax
  je     L45
  orl    $0x2,(%r12)
L132:
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <nexttoken@plt>
  test   %eax,%eax
  je     L45
  lea    D15(%rip),%rsi
  mov    %rbp,%rdi
  call   <stricmp@plt>
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    %eax,0x3c(%rsp)
  call   <nexttoken@plt>
  test   %eax,%eax
  je     L45
  mov    %rbp,%rdi
  call   <is_a_number@plt>
  test   %eax,%eax
  je     L45
  mov    %rbp,%rdi
  call   <atof@plt>
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  movsd  %xmm0,0x0(%r13)
  call   <nexttoken@plt>
  test   %eax,%eax
  je     L45
  mov    $0x1,%r13d
  lea    D10(%rip),%rsi
  lea    D23(%rip),%r15
  jmp    L321
  nopl   0x0(%rax)
L218:
  mov    (%r15,%r13,8),%rsi
  add    $0x1,%r13
L321:
  mov    %rbp,%rdi
  call   <stricmp@plt>
  test   %eax,%eax
  je     L271
  cmp    $0xc,%r13
  jne    L218
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    $0xa,%eax
  jne    L45
  cmpb   $0x2d,0x54(%rsp)
  jne    L45
  cmpb   $0x2d,0x57(%rsp)
  jne    L45
  lea    0x58(%rsp),%rdi
  movb   $0x0,0x54(%rsp)
  movb   $0x0,0x57(%rsp)
  call   <atoi@plt>
  mov    0x8(%rsp),%rcx
  lea    0x55(%rsp),%rdi
  mov    %eax,(%rcx)
  call   <atoi@plt>
  mov    (%rsp),%rcx
  mov    %rbp,%rdi
  mov    %eax,(%rcx)
  call   <atoi@plt>
  mov    0x18(%rsp),%rcx
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    %eax,(%rcx)
  call   <nexttoken@plt>
  test   %eax,%eax
  je     L45
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    $0x8,%eax
  jne    L45
  cmpb   $0x3a,0x52(%rsp)
  jne    L45
  cmpb   $0x3a,0x55(%rsp)
  jne    L45
  mov    %rbp,%rdi
  movb   $0x0,0x52(%rsp)
  movb   $0x0,0x55(%rsp)
  call   <atoi@plt>
  mov    0x20(%rsp),%rcx
  lea    0x53(%rsp),%rdi
  mov    %eax,(%rcx)
  call   <atoi@plt>
  mov    0x28(%rsp),%rcx
  lea    0x56(%rsp),%rdi
  mov    %eax,(%rcx)
  call   <atoi@plt>
  mov    0x30(%rsp),%rcx
  mov    %eax,(%rcx)
L322:
  movslq 0x4c(%rsp),%rdi
  add    %rbx,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L45
  movslq 0x4c(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  add    %rbx,%rsi
  call   <strcpy@plt>
  cmpl   $0x0,0x3c(%rsp)
  jne    L20
L81:
  mov    0x10(%rsp),%rdi
  xor    %esi,%esi
  call   <wfile_noslash@plt>
  or     $0xffffffff,%eax
  jmp    L112
  nopl   (%rax)
L276:
  orl    $0x10,(%r12)
  jmp    L12
L271:
  mov    (%rsp),%rax
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    %r13d,(%rax)
  call   <nexttoken@plt>
  test   %eax,%eax
  je     L45
  mov    %rbp,%rdi
  call   <atoi@plt>
  mov    0x8(%rsp),%rcx
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    %eax,(%rcx)
  call   <nexttoken@plt>
  test   %eax,%eax
  je     L45
  cmpb   $0x3a,0x52(%rsp)
  jne    L45
  mov    %rbp,%rdi
  movb   $0x0,0x52(%rsp)
  call   <atoi@plt>
  mov    0x20(%rsp),%rcx
  lea    0x53(%rsp),%rdi
  mov    %eax,(%rcx)
  call   <atoi@plt>
  mov    0x28(%rsp),%rcx
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    %eax,(%rcx)
  mov    0x30(%rsp),%rax
  movl   $0x0,(%rax)
  call   <nexttoken@plt>
  test   %eax,%eax
  je     L45
  mov    %rbp,%rdi
  call   <atoi@plt>
  mov    0x18(%rsp),%rcx
  mov    %eax,(%rcx)
  jmp    L322
L5:
  call   <__stack_chk_fail@plt>
L20:
  mov    (%r12),%esi
  mov    0x10(%rsp),%rdi
  call   <filelist_tar_filename_proc@plt>
  jmp    L81
```

tool_calls: name: retrieve_data
arguments: data_label: D15
type_infered: string
name: retrieve_data
arguments: data_label: D10
type_infered: string

tool: D15: 999/999

tool: D10: jan

assistant: ```c
int parse_tarline(char *buf, double *size, int *month, int *day, int *year, int *hour, int *minute, int *second, int *attr, char *filename, int dirstoo) {
  char tbuf[512];
  int i, j, created_by_filelist_function;
  static char *months[] = {"jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"};
  i = 0;
  (*attr) = 0;
  if (!nexttoken(tbuf, buf, &i))
    return (0);
  if (tolower(tbuf[0]) == 'l')
    (*attr) = (*attr) | 0x0020;
  for (j = 0; tolower(buf[j]) != 'w' && buf[j] != '\0'; j++)
    ;
  if (buf[j] == '\0')
    (*attr) = (*attr) | 0x0010;
  if (tolower(tbuf[0]) == 'd') {
    if (!dirstoo)
      return (0);
    (*attr) = (*attr) | 0x0002;
  }
  if (!nexttoken(tbuf, buf, &i))
    return (0);
  created_by_filelist_function = !stricmp(tbuf, "999/999");
  if (!nexttoken(tbuf, buf, &i))
    return (0);
  if (!is_a_number(tbuf))
    return (0);
  (*size) = atof(tbuf);
  if (!nexttoken(tbuf, buf, &i))
    return (0);
  for (j = 0; j < 12; j++)
    if (!stricmp(tbuf, months[j]))
      break;
  if (j < 12) {
    (*month) = j + 1;
    if (!nexttoken(tbuf, buf, &i))
      return (0);
    (*day) = atoi(tbuf);
    if (!nexttoken(tbuf, buf, &i))
      return (0);
    if (tbuf[2] != ':')
      return (0);
    tbuf[2] = '\0';
    (*hour) = atoi(tbuf);
    (*minute) = atoi(&tbuf[3]);
    (*second) = 0;
    if (!nexttoken(tbuf, buf, &i))
      return (0);
    (*year) = atoi(tbuf);
  } else {
    if (strlen(tbuf) != 10 || tbuf[4] != '-' || tbuf[7] != '-')
      return (0);
    tbuf[4] = '\0';
    tbuf[7] = '\0';
    (*day) = atoi(&tbuf[8]);
    (*month) = atoi(&tbuf[5]);
    (*year) = atoi(tbuf);
    if (!nexttoken(tbuf, buf, &i))
      return (0);
    if (strlen(tbuf) != 8 || tbuf[2] != ':' || tbuf[5] != ':')
      return (0);
    tbuf[2] = '\0';
    tbuf[5] = '\0';
    (*hour) = atoi(tbuf);
    (*minute) = atoi(&tbuf[3]);
    (*second) = atoi(&tbuf[6]);
  }
  if (strlen(&buf[i]) <= 0)
    return (0);
  strcpy(filename, &buf[i]);
  if (!created_by_filelist_function)
    filelist_tar_filename_proc(filename, (*attr));
  wfile_noslash(filename, NULL);
  return (-1);
}
```