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

```asm
<inc_date>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1b,%eax
  jg     L328
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    $0x6,%eax
  jg     L128
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L246
L128:
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  movl   $0x1,(%rax)
  jmp    L246
L328:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1c,%eax
  jne    L279
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    $0x2,%eax
  jne    L103
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%edx
  movslq %edx,%rax
  imul   $0x51eb851f,%rax,%rax
  shr    $0x20,%rax
  sar    $0x7,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  imul   $0x190,%eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  je     L327
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  and    $0x3,%eax
  test   %eax,%eax
  jne    L237
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%edx
  movslq %edx,%rax
  imul   $0x51eb851f,%rax,%rax
  shr    $0x20,%rax
  sar    $0x5,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  imul   $0x64,%eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  je     L237
L327:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    $0x6,%eax
  jg     L45
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L246
L45:
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  movl   $0x1,(%rax)
  jmp    L246
L237:
  mov    -0x8(%rbp),%rax
  movl   $0x1,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    $0x6,%eax
  jg     L81
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L78
L81:
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  movl   $0x1,(%rax)
L78:
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L246
L103:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    $0x6,%eax
  jg     L113
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L246
L113:
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  movl   $0x1,(%rax)
  jmp    L246
L279:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1d,%eax
  jne    L134
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    $0x2,%eax
  jne    L84
  mov    -0x8(%rbp),%rax
  movl   $0x1,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    $0x6,%eax
  jg     L357
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L156
L357:
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  movl   $0x1,(%rax)
L156:
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L246
L84:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    $0x6,%eax
  jg     L375
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L246
L375:
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  movl   $0x1,(%rax)
  jmp    L246
L134:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1e,%eax
  jne    L341
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    $0x4,%eax
  je     L287
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    $0x6,%eax
  je     L287
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    $0x9,%eax
  je     L287
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    $0xb,%eax
  jne    L53
L287:
  mov    -0x8(%rbp),%rax
  movl   $0x1,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    $0x6,%eax
  jg     L333
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L383
L333:
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  movl   $0x1,(%rax)
L383:
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L246
L53:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    $0x6,%eax
  jg     L43
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L246
L43:
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  movl   $0x1,(%rax)
  jmp    L246
L341:
  mov    -0x8(%rbp),%rax
  movl   $0x1,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    $0x6,%eax
  jg     L169
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L336
L169:
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  movl   $0x1,(%rax)
L336:
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    $0xb,%eax
  jg     L258
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L246
L258:
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  movl   $0x1,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L246
L246:
  nop
  pop    %rbp
  ret
```

assistant: ```c
void inc_date(int *a) {
  if (a[0] < 28) {
    a[0] += 1;
    if (a[3] < 7)
      a[3] += 1;
    else
      a[3] = 1;
  } else {
    if (a[0] == 28) {
      if (a[1] == 2) {
        if ((!(a[2] % 400)) || ((!(a[2] % 4)) && ((a[2] % 100)))) {
          a[0] += 1;
          if (a[3] < 7)
            a[3] += 1;
          else
            a[3] = 1;
        } else {
          a[0] = 1;
          if (a[3] < 7)
            a[3] += 1;
          else
            a[3] = 1;
          a[1] += 1;
        }
      } else {
        a[0] += 1;
        if (a[3] < 7)
          a[3] += 1;
        else
          a[3] = 1;
      }
    } else {
      if (a[0] == 29) {
        if (a[1] == 2) {
          a[0] = 1;
          if (a[3] < 7)
            a[3] += 1;
          else
            a[3] = 1;
          a[1] += 1;
        } else {
          a[0] += 1;
          if (a[3] < 7)
            a[3] += 1;
          else
            a[3] = 1;
        }
      } else {
        if (a[0] == 30) {
          if ((a[1] == 4) || (a[1] == 6) || (a[1] == 9) || (a[1] == 11)) {
            a[0] = 1;
            if (a[3] < 7)
              a[3] += 1;
            else
              a[3] = 1;
            a[1] += 1;
          } else {
            a[0] += 1;
            if (a[3] < 7)
              a[3] += 1;
            else
              a[3] = 1;
          }
        } else {
          a[0] = 1;
          if (a[3] < 7)
            a[3] += 1;
          else
            a[3] = 1;
          if (a[1] < 12)
            a[1] += 1;
          else {
            a[1] = 1;
            a[2] += 1;
          }
        }
      }
    }
  }
}
```