user: 请将以下的汇编代码转换成C语言代码:

```asm
<LateByDays>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x38(%rbp),%rcx
  lea    -0xd(%rbp),%rax
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x9(%rbp)
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x28(%rbp)
  mov    -0x38(%rbp),%rax
  lea    0x4(%rax),%rcx
  lea    -0xd(%rbp),%rax
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0xb(%rbp)
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x24(%rbp)
  mov    -0x38(%rbp),%rax
  lea    0x6(%rax),%rcx
  lea    -0xd(%rbp),%rax
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0xb(%rbp)
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x20(%rbp)
  mov    -0x40(%rbp),%rcx
  lea    -0xd(%rbp),%rax
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x9(%rbp)
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x1c(%rbp)
  mov    -0x40(%rbp),%rax
  lea    0x4(%rax),%rcx
  lea    -0xd(%rbp),%rax
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0xb(%rbp)
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x40(%rbp),%rax
  lea    0x6(%rax),%rcx
  lea    -0xd(%rbp),%rax
  mov    $0x3,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0xb(%rbp)
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x18(%rbp),%r8d
  mov    -0x1c(%rbp),%edi
  mov    -0x20(%rbp),%ecx
  mov    -0x24(%rbp),%edx
  mov    -0x28(%rbp),%eax
  sub    $0x8,%rsp
  mov    -0x14(%rbp),%esi
  push   %rsi
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %eax,%esi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  add    $0x10,%rsp
  cmpl   $0x8,-0x24(%rbp)
  jne    L477
  cmpl   $0x0,-0x20(%rbp)
  jle    L317
  cmpl   $0x1f,-0x20(%rbp)
  jle    L360
L317:
  mov    $0xfffffffe,%eax
  jmp    L33
L360:
  mov    -0x20(%rbp),%eax
  add    $0xd5,%eax
  mov    %eax,-0x30(%rbp)
  jmp    L471
L477:
  cmpl   $0x9,-0x24(%rbp)
  jne    L474
  cmpl   $0x0,-0x20(%rbp)
  jle    L176
  cmpl   $0x1e,-0x20(%rbp)
  jle    L142
L176:
  mov    $0xffffffff,%eax
  jmp    L33
L142:
  mov    -0x20(%rbp),%eax
  add    $0xf4,%eax
  mov    %eax,-0x30(%rbp)
  jmp    L471
L474:
  cmpl   $0xa,-0x24(%rbp)
  jne    L263
  cmpl   $0x0,-0x20(%rbp)
  jle    L478
  cmpl   $0x1f,-0x20(%rbp)
  jle    L377
L478:
  mov    $0xffffffff,%eax
  jmp    L33
L377:
  mov    -0x20(%rbp),%eax
  add    $0x112,%eax
  mov    %eax,-0x30(%rbp)
  jmp    L471
L263:
  cmpl   $0xb,-0x24(%rbp)
  jne    L31
  cmpl   $0x0,-0x20(%rbp)
  jle    L16
  cmpl   $0x1e,-0x20(%rbp)
  jle    L120
L16:
  mov    $0xffffffff,%eax
  jmp    L33
L120:
  mov    -0x20(%rbp),%eax
  add    $0x131,%eax
  mov    %eax,-0x30(%rbp)
  jmp    L471
L31:
  cmpl   $0xc,-0x24(%rbp)
  jne    L471
  cmpl   $0x0,-0x20(%rbp)
  jle    L410
  cmpl   $0x1f,-0x20(%rbp)
  jle    L151
L410:
  mov    $0xffffffff,%eax
  jmp    L33
L151:
  mov    -0x20(%rbp),%eax
  add    $0x14f,%eax
  mov    %eax,-0x30(%rbp)
L471:
  cmpl   $0x8,-0x18(%rbp)
  jne    L446
  cmpl   $0x0,-0x14(%rbp)
  jle    L63
  cmpl   $0x1f,-0x14(%rbp)
  jle    L459
L63:
  mov    $0xffffffff,%eax
  jmp    L33
L459:
  mov    -0x14(%rbp),%eax
  add    $0xd5,%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L237
L446:
  cmpl   $0x9,-0x18(%rbp)
  jne    L350
  cmpl   $0x0,-0x14(%rbp)
  jle    L294
  cmpl   $0x1e,-0x14(%rbp)
  jle    L10
L294:
  mov    $0xffffffff,%eax
  jmp    L33
L10:
  mov    -0x14(%rbp),%eax
  add    $0xf4,%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L237
L350:
  cmpl   $0xa,-0x18(%rbp)
  jne    L302
  cmpl   $0x0,-0x14(%rbp)
  jle    L215
  cmpl   $0x1f,-0x14(%rbp)
  jle    L461
L215:
  mov    $0xffffffff,%eax
  jmp    L33
L461:
  mov    -0x14(%rbp),%eax
  add    $0x112,%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L237
L302:
  cmpl   $0xb,-0x18(%rbp)
  jne    L102
  cmpl   $0x0,-0x14(%rbp)
  jle    L509
  cmpl   $0x1e,-0x14(%rbp)
  jle    L172
L509:
  mov    $0xffffffff,%eax
  jmp    L33
L172:
  mov    -0x14(%rbp),%eax
  add    $0x131,%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L237
L102:
  cmpl   $0xc,-0x18(%rbp)
  jne    L237
  cmpl   $0x0,-0x14(%rbp)
  jle    L101
  cmpl   $0x1f,-0x14(%rbp)
  jle    L61
L101:
  mov    $0xffffffff,%eax
  jmp    L33
L61:
  mov    -0x14(%rbp),%eax
  add    $0x14f,%eax
  mov    %eax,-0x2c(%rbp)
L237:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L91
  mov    $0x0,%eax
  jmp    L33
L91:
  mov    -0x2c(%rbp),%eax
  sub    -0x30(%rbp),%eax
L33:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L189
  call   <__stack_chk_fail@plt>
L189:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D5
datatype: string

tool: D5: %i %i %i , %i %i %i


assistant: ```c
int LateByDays(char *duedt, char *subdt) {
  int d1, m1, y1;
  int d2, m2, y2;
  char tmp[5];
  int days1, days2;
  strncpy(tmp, &duedt[0], 4);
  tmp[4] = '\0';
  y1 = atoi(tmp);
  strncpy(tmp, &duedt[4], 2);
  tmp[2] = '\0';
  m1 = atoi(tmp);
  strncpy(tmp, &duedt[6], 2);
  tmp[2] = '\0';
  d1 = atoi(tmp);
  strncpy(tmp, &subdt[0], 4);
  tmp[4] = '\0';
  y2 = atoi(tmp);
  strncpy(tmp, &subdt[4], 2);
  tmp[2] = '\0';
  m2 = atoi(tmp);
  strncpy(tmp, &subdt[6], 3);
  tmp[2] = '\0';
  d2 = atoi(tmp);
  printf("%i %i %i , %i %i %i\n", y1, m1, d1, y2, m2, d2);
  if (m1 == 8) {
    if ((d1 < 1) || (d1 > 31))
      return (-2);
    days1 = 31 + 29 + 31 + 30 + 31 + 30 + 31 + d1;
  } else if (m1 == 9) {
    if ((d1 < 1) || (d1 > 30))
      return (-1);
    days1 = 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + d1;
  } else if (m1 == 10) {
    if ((d1 < 1) || (d1 > 31))
      return (-1);
    days1 = 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + d1;
  } else if (m1 == 11) {
    if ((d1 < 1) || (d1 > 30))
      return (-1);
    days1 = 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + d1;
  } else if (m1 == 12) {
    if ((d1 < 1) || (d1 > 31))
      return (-1);
    days1 = 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + d1;
  }
  if (m2 == 8) {
    if ((d2 < 1) || (d2 > 31))
      return (-1);
    days2 = 31 + 29 + 31 + 30 + 31 + 30 + 31 + d2;
  } else if (m2 == 9) {
    if ((d2 < 1) || (d2 > 30))
      return (-1);
    days2 = 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + d2;
  } else if (m2 == 10) {
    if ((d2 < 1) || (d2 > 31))
      return (-1);
    days2 = 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + d2;
  } else if (m2 == 11) {
    if ((d2 < 1) || (d2 > 30))
      return (-1);
    days2 = 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + d2;
  } else if (m2 == 12) {
    if ((d2 < 1) || (d2 > 31))
      return (-1);
    days2 = 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + d2;
  }
  if (days1 > days2)
    return 0;
  return (days2 - days1);
}
```