user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<convert_standard_to_date>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0xd(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x1(%rax),%eax
  mov    %al,-0xc(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x2(%rax),%eax
  mov    %al,-0xb(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x3(%rax),%eax
  mov    %al,-0xa(%rbp)
  movb   $0x0,-0x9(%rbp)
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x5(%rax),%eax
  mov    %al,-0xd(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x6(%rax),%eax
  mov    %al,-0xc(%rbp)
  movb   $0x0,-0xb(%rbp)
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x8(%rax),%eax
  mov    %al,-0xd(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x9(%rax),%eax
  mov    %al,-0xc(%rbp)
  movb   $0x0,-0xb(%rbp)
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  lea    D27(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  movl   $0x0,-0x20(%rbp)
  jmp    L76
L17:
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x25,%al
  jne    L90
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x6d,%al
  jne    L113
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%eax
  mov    %eax,%edx
  lea    D17(%rip),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
L113:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x64,%al
  jne    L9
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x14(%rbp),%eax
  mov    %eax,%edx
  lea    D17(%rip),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
L9:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x59,%al
  jne    L90
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edx
  lea    D23(%rip),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
L90:
  addl   $0x1,-0x20(%rbp)
L76:
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cmp    %eax,-0x20(%rbp)
  jl     L17
  movl   $0x0,-0x20(%rbp)
  jmp    L5
L88:
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L23
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L23
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L48
L23:
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x38(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
L48:
  addl   $0x1,-0x20(%rbp)
L5:
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x20(%rbp)
  jl     L88
  mov    -0x38(%rbp),%rax
  add    $0xa,%rax
  movb   $0x0,(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L63
  call   <__stack_chk_fail@plt>
L63:
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D27
type_infered: string
name: read_data
arguments: tag: D17
type_infered: string
name: read_data
arguments: tag: D23
type_infered: string

tool: D27: %s

tool: D17: %02d

tool: D23: %04d

assistant: ```c
void convert_standard_to_date(char standard[], char date_format[], char date[]) {
  char str[5];
  int day, month, year, i;
  str[0] = standard[0];
  str[1] = standard[1];
  str[2] = standard[2];
  str[3] = standard[3];
  str[4] = 0;
  year = atoi((char *)str);
  str[0] = standard[5];
  str[1] = standard[6];
  str[2] = 0;
  month = atoi((char *)str);
  str[0] = standard[8];
  str[1] = standard[9];
  str[2] = 0;
  day = atoi((char *)str);
  sprintf(date, "%s", date_format);
  for (i = 0; i < strlen(date_format) - 1; i++) {
    if (date_format[i] == '%') {
      if (date_format[i + 1] == 'm')
        sprintf((char *)&date[i], "%02d", month);
      if (date_format[i + 1] == 'd')
        sprintf((char *)&date[i], "%02d", day);
      if (date_format[i + 1] == 'Y')
        sprintf((char *)&date[i], "%04d", year);
    }
  }
  for (i = 0; i < strlen(date_format); i++) {
    if ((date_format[i] == '/') || (date_format[i] == '-') || (date_format[i] == '.'))
      date[i] = date_format[i];
  }
  date[10] = 0;
}
```