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

```asm
<convert_human_date_format>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  call   <strlen@plt>
  lea    0x1(%rax,%rax,1),%edi
  mov    $0x1,%esi
  call   <xcalloc@plt>
  mov    %rax,0x8(%rsp)
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L174
  mov    %rax,%r12
  mov    $0x0,%ebp
  mov    $0x0,%r13d
  movabs $0x100000001,%r14
  movabs $0x20000000200,%r15
  jmp    L84
L150:
  lea    D29(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  add    $0x2,%r12
  jmp    L42
L45:
  mov    $0x1,%edi
  cmp    $0x4d,%r13b
  je     L88
  lea    D8(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  add    $0x2,%r12
  mov    $0x1,%edi
  mov    $0x4d,%r13d
  jmp    L88
L75:
  mov    $0x1,%edi
  cmp    $0x44,%r13b
  je     L88
  lea    D4(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  add    $0x2,%r12
  mov    $0x1,%edi
  mov    $0x44,%r13d
  jmp    L88
L65:
  movsbl (%rbx),%edi
  call   <ispunct@plt>
  mov    $0x0,%edi
  test   %rax,%rax
  je     L88
  movzbl (%rbx),%eax
  mov    %al,(%r12)
  lea    0x1(%r12),%r12
  mov    $0x1,%edi
  mov    $0x0,%r13d
L88:
  movsbl (%rbx),%edx
  xor    $0x1,%edi
  movzbl %dil,%edi
  lea    D5(%rip),%rsi
  call   <is_fatal@plt>
  add    $0x1,%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L174
L84:
  movsbl %dil,%edi
  call   <toupper@plt>
  cmp    $0x59,%al
  mov    $0x0,%eax
  cmovne %eax,%ebp
  movsbl (%rbx),%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L65
  movzbl (%rbx),%eax
  lea    -0x44(%rax),%ecx
  cmp    $0x35,%cl
  ja     L182
  mov    $0x1,%eax
  shl    %cl,%rax
  test   %r14,%rax
  jne    L75
  test   %r15,%rax
  jne    L45
  mov    $0x0,%edi
  movabs $0x20000000200000,%rdx
  test   %rdx,%rax
  je     L88
  cmp    $0x59,%r13b
  jne    L150
L42:
  add    $0x1,%ebp
  cmp    $0x2,%ebp
  jle    L107
  movb   $0x59,-0x1(%r12)
  mov    $0x1,%edi
  mov    $0x59,%r13d
  jmp    L88
L182:
  mov    $0x0,%edi
  jmp    L88
L107:
  mov    $0x1,%edi
  mov    $0x59,%r13d
  jmp    L88
L174:
  mov    0x8(%rsp),%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D29
datatype: string
name: unpack_data
arguments: data_label: D8
datatype: string
name: unpack_data
arguments: data_label: D4
datatype: string
name: unpack_data
arguments: data_label: D5
datatype: string

tool: D29: %y

tool: D8: %m

tool: D4: %d

tool: D5: Invalid character "%c" in date format!

assistant: ```c
char *convert_human_date_format(const char *human_datef) {
  char *result, *cin, *cout;
  char prev;
  int ylen;
  result = (char *)xcalloc((2 * strlen(human_datef)) + 1, 1);
  cout = result;
  prev = '\0';
  ylen = 0;
  for (cin = (char *)human_datef; *cin; cin++) {
    char okay = 1;
    if (toupper(*cin) != 'Y')
      ylen = 0;
    if (isalpha(*cin)) {
      switch (*cin) {
      case 'y':
      case 'Y':
        if (prev != 'Y') {
          strcat(cout, "%y");
          cout += 2;
          prev = 'Y';
        }
        ylen++;
        if (ylen > 2)
          *(cout - 1) = 'Y';
        break;
      case 'm':
      case 'M':
        if (prev != 'M') {
          strcat(cout, "%m");
          cout += 2;
          prev = 'M';
        }
        break;
      case 'd':
      case 'D':
        if (prev != 'D') {
          strcat(cout, "%d");
          cout += 2;
          prev = 'D';
        }
        break;
      default:
        okay = 0;
      }
    } else if (ispunct(*cin)) {
      *cout++ = *cin;
      prev = '\0';
    } else
      okay = 0;
    is_fatal(okay == 0, "Invalid character \"%c\" in date format!", *cin);
  }
  return result;
}
```