ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<copy_partial>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x30,%rsp
  mov    %edi,-0x1024(%rbp)
  mov    %esi,-0x1028(%rbp)
  mov    %edx,-0x102c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x1018(%rbp)
  jmp    L57
L17:
  lea    -0x1010(%rbp),%rcx
  mov    -0x1024(%rbp),%eax
  mov    $0x1000,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  cmp    $0x1000,%eax
  je     L32
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L32:
  lea    -0x1010(%rbp),%rcx
  mov    -0x1028(%rbp),%eax
  mov    $0x1000,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  test   %rax,%rax
  jns    L48
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L48:
  addl   $0x1000,-0x1018(%rbp)
L57:
  mov    -0x1018(%rbp),%eax
  add    $0x1000,%eax
  cmp    %eax,-0x102c(%rbp)
  ja     L17
  mov    -0x102c(%rbp),%eax
  sub    -0x1018(%rbp),%eax
  mov    %eax,%edx
  lea    -0x1010(%rbp),%rcx
  mov    -0x1024(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,-0x1014(%rbp)
  cmpl   $0x0,-0x1014(%rbp)
  jns    L64
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L64:
  mov    -0x1014(%rbp),%edx
  lea    -0x1010(%rbp),%rcx
  mov    -0x1028(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  test   %rax,%rax
  jns    L65
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L65:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L11
  call   <__stack_chk_fail@plt>
L11:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D8
type_infered: string
name: unpack_data
arguments: data_label: D27
type_infered: string

tool: D8: read

tool: D27: write

assistant: ```c
void copy_partial(int fd, int od, unsigned int len) {
  char idata[4096];
  unsigned int n = 0;
  int r;
  while (n + 4096 < len) {
    if (read(fd, idata, 4096) != 4096) {
      ;
      perror("read");
      exit(1);
    }
    if (write(od, idata, 4096) < 0) {
      perror("write");
      exit(1);
    }
    n += 4096;
  }
  r = read(fd, idata, len - n);
  if (r < 0) {
    perror("read");
    exit(1);
  }
  if (write(od, idata, r) < 0) {
    perror("write");
    exit(1);
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<copy_partial>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x18,%rsp
  mov    %edi,%r14d
  mov    %esi,%r13d
  mov    %edx,%r12d
  mov    %fs:0x28,%rax
  mov    %rax,0x1008(%rsp)
  xor    %eax,%eax
  cmp    $0x1000,%edx
  jbe    L3
  mov    $0x1000,%ebx
  mov    %rsp,%rbp
  lea    D21(%rip),%r15
  jmp    L23
L65:
  mov    $0x1000,%edx
  mov    %rbp,%rsi
  mov    %r13d,%edi
  call   <write@plt>
  test   %rax,%rax
  js     L40
L60:
  lea    0x1000(%rbx),%eax
  cmp    %r12d,%eax
  jae    L115
  mov    %eax,%ebx
L23:
  mov    $0x1000,%edx
  mov    %rbp,%rsi
  mov    %r14d,%edi
  call   <read@plt>
  cmp    $0x1000,%eax
  je     L65
  mov    %r15,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L65
L40:
  lea    D14(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L60
L3:
  mov    $0x0,%ebx
L115:
  mov    %r12d,%edx
  sub    %ebx,%edx
  mov    %rsp,%rsi
  mov    %r14d,%edi
  call   <read@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  js     L12
L72:
  mov    %rsp,%rsi
  mov    %ebx,%edx
  mov    %r13d,%edi
  call   <write@plt>
  test   %rax,%rax
  js     L6
L95:
  mov    0x1008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L20
  add    $0x1018,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L12:
  lea    D21(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L72
L6:
  lea    D14(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L95
L20:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D21
type: string
name: retrieve_data
arguments: label: D14
type: string

tool: D21: read

tool: D14: write

assistant: ```c
void copy_partial(int fd, int od, unsigned int len) {
  char idata[4096];
  unsigned int n = 0;
  int r;
  while (n + 4096 < len) {
    if (read(fd, idata, 4096) != 4096) {
      ;
      perror("read");
      exit(1);
    }
    if (write(od, idata, 4096) < 0) {
      perror("write");
      exit(1);
    }
    n += 4096;
  }
  r = read(fd, idata, len - n);
  if (r < 0) {
    perror("read");
    exit(1);
  }
  if (write(od, idata, r) < 0) {
    perror("write");
    exit(1);
  }
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<copy_partial>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1008(%rsp)
  xor    %eax,%eax
  mov    %edi,%r14d
  mov    %esi,%r13d
  mov    %edx,%r12d
  mov    %rsp,%rbp
  cmp    $0x1000,%edx
  jbe    L51
  mov    $0x1000,%ebx
  mov    %rsp,%rbp
  lea    D31(%rip),%r15
  jmp    L99
  nopw   0x0(%rax,%rax,1)
L58:
  lea    0x1000(%rbx),%eax
  cmp    %r12d,%eax
  jae    L101
L82:
  mov    %eax,%ebx
L99:
  mov    $0x1000,%edx
  mov    %rbp,%rsi
  mov    %r14d,%edi
  call   <read@plt>
  cmp    $0x1000,%eax
  je     L108
  mov    %r15,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L108:
  mov    $0x1000,%edx
  mov    %rbp,%rsi
  mov    %r13d,%edi
  call   <write@plt>
  test   %rax,%rax
  jns    L58
  lea    D7(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  lea    0x1000(%rbx),%eax
  cmp    %r12d,%eax
  jb     L82
L101:
  sub    %ebx,%r12d
L51:
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r14d,%edi
  call   <read@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  js     L84
L88:
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r13d,%edi
  call   <write@plt>
  test   %rax,%rax
  js     L7
L30:
  mov    0x1008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L104
  add    $0x1018,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L84:
  lea    D31(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L88
  nopl   0x0(%rax,%rax,1)
L7:
  lea    D7(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L30
L104:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D31
type: string
name: retrieve_data
arguments: tag: D7
type: string

tool: D31: read

tool: D7: write

assistant: ```c
void copy_partial(int fd, int od, unsigned int len) {
  char idata[4096];
  unsigned int n = 0;
  int r;
  while (n + 4096 < len) {
    if (read(fd, idata, 4096) != 4096) {
      ;
      perror("read");
      exit(1);
    }
    if (write(od, idata, 4096) < 0) {
      perror("write");
      exit(1);
    }
    n += 4096;
  }
  r = read(fd, idata, len - n);
  if (r < 0) {
    perror("read");
    exit(1);
  }
  if (write(od, idata, r) < 0) {
    perror("write");
    exit(1);
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<copy_partial>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1008(%rsp)
  xor    %eax,%eax
  mov    %edi,%r14d
  mov    %esi,%r13d
  mov    %edx,%r12d
  mov    %rsp,%rbp
  cmp    $0x1000,%edx
  jbe    L92
  mov    $0x1000,%ebx
  mov    %rsp,%rbp
  lea    D35(%rip),%r15
  jmp    L68
  nopw   0x0(%rax,%rax,1)
L77:
  lea    0x1000(%rbx),%eax
  cmp    %r12d,%eax
  jae    L18
L4:
  mov    %eax,%ebx
L68:
  mov    $0x1000,%edx
  mov    %rbp,%rsi
  mov    %r14d,%edi
  call   <read@plt>
  cmp    $0x1000,%eax
  je     L65
  mov    %r15,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L65:
  mov    $0x1000,%edx
  mov    %rbp,%rsi
  mov    %r13d,%edi
  call   <write@plt>
  test   %rax,%rax
  jns    L77
  lea    D29(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  lea    0x1000(%rbx),%eax
  cmp    %r12d,%eax
  jb     L4
L18:
  sub    %ebx,%r12d
L92:
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r14d,%edi
  call   <read@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  js     L89
L44:
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r13d,%edi
  call   <write@plt>
  test   %rax,%rax
  js     L1
L45:
  mov    0x1008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L40
  add    $0x1018,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L89:
  lea    D35(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L44
  nopl   0x0(%rax,%rax,1)
L1:
  lea    D29(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L45
L40:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D35
type: string
name: parse_data
arguments: tag: D29
type: string

tool: D35: read

tool: D29: write

assistant: ```c
void copy_partial(int fd, int od, unsigned int len) {
  char idata[4096];
  unsigned int n = 0;
  int r;
  while (n + 4096 < len) {
    if (read(fd, idata, 4096) != 4096) {
      ;
      perror("read");
      exit(1);
    }
    if (write(od, idata, 4096) < 0) {
      perror("write");
      exit(1);
    }
    n += 4096;
  }
  r = read(fd, idata, len - n);
  if (r < 0) {
    perror("read");
    exit(1);
  }
  if (write(od, idata, r) < 0) {
    perror("write");
    exit(1);
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<date_tm_to_current>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x45,%eax
  jg     L18
  mov    -0xc(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <date_tm_to_current_pre_1970@plt>
  jmp    L3
L18:
  mov    -0xc(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <date_mktime@plt>
L3:
  leave
  ret
```

assistant: ```c
time_t date_tm_to_current(struct tm *tm, int utc_offset) {
  if (tm->tm_year < 70) {
    return date_tm_to_current_pre_1970(tm, utc_offset);
  } else {
    return date_mktime(tm, utc_offset);
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<date_tm_to_current>:
  endbr64
  sub    $0x8,%rsp
  cmpl   $0x45,(%rdi)
  jg     L6
  call   <date_tm_to_current_pre_1970@plt>
L4:
  add    $0x8,%rsp
  ret
L6:
  call   <date_mktime@plt>
  jmp    L4
```

assistant: ```c
time_t date_tm_to_current(struct tm *tm, int utc_offset) {
  if (tm->tm_year < 70) {
    return date_tm_to_current_pre_1970(tm, utc_offset);
  } else {
    return date_mktime(tm, utc_offset);
  }
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<date_tm_to_current>:
  endbr64
  cmpl   $0x45,(%rdi)
  jg     L5
  jmp    1070 <date_tm_to_current_pre_1970@plt>
  xchg   %ax,%ax
L5:
  jmp    1060 <date_mktime@plt>
```

assistant: ```c
time_t date_tm_to_current(struct tm *tm, int utc_offset) {
  if (tm->tm_year < 70) {
    return date_tm_to_current_pre_1970(tm, utc_offset);
  } else {
    return date_mktime(tm, utc_offset);
  }
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<date_tm_to_current>:
  endbr64
  cmpl   $0x45,(%rdi)
  jg     L3
  jmp    1070 <date_tm_to_current_pre_1970@plt>
  xchg   %ax,%ax
L3:
  jmp    1060 <date_mktime@plt>
```

assistant: ```c
time_t date_tm_to_current(struct tm *tm, int utc_offset) {
  if (tm->tm_year < 70) {
    return date_tm_to_current_pre_1970(tm, utc_offset);
  } else {
    return date_mktime(tm, utc_offset);
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<wg_strf_iso_datetime>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %edx,-0x40(%rbp)
  mov    %rcx,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x40(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x5d34edef,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x11,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x20(%rbp),%eax
  mov    -0x1c(%rbp),%edx
  imul   $0x57e40,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x57619f1,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x7,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x20(%rbp),%eax
  mov    -0x18(%rbp),%edx
  imul   $0x1770,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x5,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x20(%rbp),%eax
  mov    -0x14(%rbp),%edx
  imul   $0x64,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  lea    -0x24(%rbp),%rcx
  lea    -0x28(%rbp),%rdx
  lea    -0x2c(%rbp),%rsi
  mov    -0x3c(%rbp),%eax
  mov    %eax,%edi
  call   <scalar_to_ymd@plt>
  mov    -0x24(%rbp),%edi
  mov    -0x28(%rbp),%esi
  mov    -0x2c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    -0x10(%rbp),%ecx
  push   %rcx
  mov    -0x14(%rbp),%ecx
  push   %rcx
  mov    -0x18(%rbp),%ecx
  push   %rcx
  mov    -0x1c(%rbp),%ecx
  push   %rcx
  mov    %edi,%r9d
  mov    %esi,%r8d
  mov    %edx,%ecx
  lea    D2(%rip),%rdx
  mov    $0x18,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  add    $0x20,%rsp
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L5
  call   <__stack_chk_fail@plt>
L5:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D2
type_guessed: string

tool: D2: %04d-%02d-%02dT%02d:%02d:%02d.%02d

assistant: ```c
int wg_strf_iso_datetime(void *db, int date, int time, char *buf) {
  unsigned yr, mo, day, hr, min, sec, spart;
  int t = time;
  int c;
  hr = t / (60 * 60 * 100);
  t = t - (hr * (60 * 60 * 100));
  min = t / (60 * 100);
  t = t - (min * (60 * 100));
  sec = t / 100;
  t = t - (sec * (100));
  spart = t;
  scalar_to_ymd(date, &yr, &mo, &day);
  c = snprintf(buf, 24, "%04d-%02d-%02dT%02d:%02d:%02d.%02d", yr, mo, day, hr, min, sec, spart);
  return (c);
}
```
user: What is the c source code of the assembly code below?

```asm
<wg_strf_iso_datetime>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %esi,%edi
  mov    %rcx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movslq %edx,%rbp
  imul   $0x5d34edef,%rbp,%rbp
  sar    $0x31,%rbp
  mov    %edx,%eax
  sar    $0x1f,%eax
  sub    %eax,%ebp
  imul   $0x57e40,%ebp,%eax
  sub    %eax,%edx
  movslq %edx,%r13
  imul   $0x57619f1,%r13,%r13
  sar    $0x27,%r13
  mov    %edx,%eax
  sar    $0x1f,%eax
  sub    %eax,%r13d
  imul   $0x1770,%r13d,%eax
  sub    %eax,%edx
  movslq %edx,%r14
  imul   $0x51eb851f,%r14,%r14
  sar    $0x25,%r14
  mov    %edx,%eax
  sar    $0x1f,%eax
  sub    %eax,%r14d
  imul   $0x64,%r14d,%eax
  mov    %edx,%ebx
  sub    %eax,%ebx
  lea    0x14(%rsp),%rcx
  lea    0x10(%rsp),%rdx
  lea    0xc(%rsp),%rsi
  call   <scalar_to_ymd@plt>
  push   %rbx
  push   %r14
  push   %r13
  push   %rbp
  mov    0x34(%rsp),%r9d
  mov    0x30(%rsp),%r8d
  mov    0x2c(%rsp),%ecx
  lea    D7(%rip),%rdx
  mov    $0x18,%esi
  mov    %r12,%rdi
  call   <snprintf@plt>
  add    $0x20,%rsp
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L4
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D7
datatype: string

tool: D7: %04d-%02d-%02dT%02d:%02d:%02d.%02d

assistant: ```c
int wg_strf_iso_datetime(void *db, int date, int time, char *buf) {
  unsigned yr, mo, day, hr, min, sec, spart;
  int t = time;
  int c;
  hr = t / (60 * 60 * 100);
  t = t - (hr * (60 * 60 * 100));
  min = t / (60 * 100);
  t = t - (min * (60 * 100));
  sec = t / 100;
  t = t - (sec * (100));
  spart = t;
  scalar_to_ymd(date, &yr, &mo, &day);
  c = snprintf(buf, 24, "%04d-%02d-%02dT%02d:%02d:%02d.%02d", yr, mo, day, hr, min, sec, spart);
  return (c);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<wg_strf_iso_datetime>:
  endbr64
  push   %r14
  mov    %esi,%edi
  mov    %rcx,%r14
  push   %r13
  push   %r12
  push   %rbp
  movslq %edx,%rbp
  push   %rbx
  imul   $0x5d34edef,%rbp,%rbp
  sub    $0x20,%rsp
  sar    $0x31,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %edx,%eax
  lea    0x14(%rsp),%rcx
  lea    0xc(%rsp),%rsi
  sar    $0x1f,%eax
  sub    %eax,%ebp
  imul   $0x57e40,%ebp,%eax
  sub    %eax,%edx
  movslq %edx,%r12
  mov    %edx,%eax
  imul   $0x57619f1,%r12,%r12
  sar    $0x1f,%eax
  sar    $0x27,%r12
  sub    %eax,%r12d
  imul   $0x1770,%r12d,%eax
  sub    %eax,%edx
  movslq %edx,%r13
  mov    %edx,%eax
  mov    %edx,%ebx
  imul   $0x51eb851f,%r13,%r13
  sar    $0x1f,%eax
  lea    0x10(%rsp),%rdx
  sar    $0x25,%r13
  sub    %eax,%r13d
  imul   $0x64,%r13d,%eax
  sub    %eax,%ebx
  call   <scalar_to_ymd@plt>
  push   %rbx
  lea    D4(%rip),%rdx
  mov    %r14,%rdi
  push   %r13
  mov    $0x18,%esi
  push   %r12
  push   %rbp
  mov    0x34(%rsp),%r9d
  mov    0x30(%rsp),%r8d
  mov    0x2c(%rsp),%ecx
  call   <snprintf@plt>
  add    $0x20,%rsp
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L0
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D4
type: string

tool: D4: %04d-%02d-%02dT%02d:%02d:%02d.%02d

assistant: ```c
int wg_strf_iso_datetime(void *db, int date, int time, char *buf) {
  unsigned yr, mo, day, hr, min, sec, spart;
  int t = time;
  int c;
  hr = t / (60 * 60 * 100);
  t = t - (hr * (60 * 60 * 100));
  min = t / (60 * 100);
  t = t - (min * (60 * 100));
  sec = t / 100;
  t = t - (sec * (100));
  spart = t;
  scalar_to_ymd(date, &yr, &mo, &day);
  c = snprintf(buf, 24, "%04d-%02d-%02dT%02d:%02d:%02d.%02d", yr, mo, day, hr, min, sec, spart);
  return (c);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<wg_strf_iso_datetime>:
  endbr64
  push   %r14
  mov    %esi,%edi
  mov    %rcx,%r14
  push   %r13
  push   %r12
  push   %rbp
  movslq %edx,%rbp
  push   %rbx
  imul   $0x5d34edef,%rbp,%rbp
  sub    $0x20,%rsp
  sar    $0x31,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %edx,%eax
  lea    0x14(%rsp),%rcx
  lea    0xc(%rsp),%rsi
  sar    $0x1f,%eax
  sub    %eax,%ebp
  imul   $0x57e40,%ebp,%eax
  sub    %eax,%edx
  movslq %edx,%r12
  mov    %edx,%eax
  imul   $0x57619f1,%r12,%r12
  sar    $0x1f,%eax
  sar    $0x27,%r12
  sub    %eax,%r12d
  imul   $0x1770,%r12d,%eax
  sub    %eax,%edx
  movslq %edx,%r13
  mov    %edx,%eax
  mov    %edx,%ebx
  imul   $0x51eb851f,%r13,%r13
  sar    $0x1f,%eax
  lea    0x10(%rsp),%rdx
  sar    $0x25,%r13
  sub    %eax,%r13d
  imul   $0x64,%r13d,%eax
  sub    %eax,%ebx
  call   <scalar_to_ymd@plt>
  push   %rbx
  lea    D5(%rip),%rdx
  mov    %r14,%rdi
  push   %r13
  mov    $0x18,%esi
  push   %r12
  push   %rbp
  mov    0x34(%rsp),%r9d
  mov    0x30(%rsp),%r8d
  mov    0x2c(%rsp),%ecx
  call   <snprintf@plt>
  add    $0x20,%rsp
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L3
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D5
type_guessed: string

tool: D5: %04d-%02d-%02dT%02d:%02d:%02d.%02d

assistant: ```c
int wg_strf_iso_datetime(void *db, int date, int time, char *buf) {
  unsigned yr, mo, day, hr, min, sec, spart;
  int t = time;
  int c;
  hr = t / (60 * 60 * 100);
  t = t - (hr * (60 * 60 * 100));
  min = t / (60 * 100);
  t = t - (min * (60 * 100));
  sec = t / 100;
  t = t - (sec * (100));
  spart = t;
  scalar_to_ymd(date, &yr, &mo, &day);
  c = snprintf(buf, 24, "%04d-%02d-%02dT%02d:%02d:%02d.%02d", yr, mo, day, hr, min, sec, spart);
  return (c);
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<OptimizedMatrix>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,-0x10(%rsp)
  mov    %ecx,-0x14(%rsp)
  test   %ecx,%ecx
  jle    L32
  mov    %rdi,%r11
  mov    %rsi,%rbp
  lea    0x1(%rcx),%ecx
  mov    $0x1,%eax
L87:
  mov    -0x8(%r11,%rax,8),%rdx
  movl   $0x0,(%rdx,%rax,4)
  mov    -0x8(%rbp,%rax,8),%rdx
  mov    %eax,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L87
  mov    -0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x18(%rsp)
  mov    $0x8,%r14d
  mov    -0x10(%rsp),%rax
  sub    %rax,%r14
  add    %rax,%rax
  mov    %rax,-0x8(%rsp)
  mov    $0x2,%r13d
  jmp    L75
L92:
  add    $0x1,%rdx
  cmp    %edx,%r9d
  jle    L80
L82:
  mov    (%r10),%rcx
  mov    (%r11,%rdx,8),%rax
  mov    (%rax,%rsi,1),%eax
  add    (%rcx,%rdx,4),%eax
  add    (%r8),%eax
  sub    (%rdi),%eax
  add    %rsi,%rcx
  cmp    %eax,(%rcx)
  jle    L92
  mov    %eax,(%rcx)
  mov    -0x8(%rbp,%rbx,8),%rax
  mov    %edx,(%rax,%rsi,1)
  jmp    L92
L80:
  add    $0x1,%rbx
  add    $0x8,%r12
  add    $0x1,%r9d
  add    $0x4,%r8
  add    $0x4,%rdi
  cmp    %r15,%rbx
  je     L5
L72:
  mov    %r12,%r10
  lea    (%rdi,%r14,1),%rsi
  mov    (%r12),%rax
  movl   $0xf4240,(%rax,%rsi,1)
  cmp    $0x1,%r13d
  jle    L80
  mov    %rbx,%rdx
  jmp    L82
L5:
  lea    0x1(%r13),%eax
  subl   $0x1,-0x18(%rsp)
  add    $0x4,%r14
  cmp    %r13d,-0x14(%rsp)
  jl     L32
  mov    %eax,%r13d
L75:
  cmpl   $0x0,-0x18(%rsp)
  js     L5
  mov    %r11,%r12
  mov    %r13d,%r9d
  mov    -0x8(%rsp),%rax
  lea    (%r14,%rax,1),%r8
  mov    -0x18(%rsp),%r15d
  add    $0x2,%r15
  mov    -0x10(%rsp),%rdi
  mov    $0x1,%ebx
  jmp    L72
L32:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void OptimizedMatrix(int **table, int **pi, int *p, int N) {
  int i, l, k, j, m;
  for (i = 1; i < N + 1; i++) {
    table[i - 1][i] = 0;
    pi[i - 1][i] = i;
  }
  for (l = 2; l <= N + 1; l++) {
    for (i = 0; i <= N - l + 1; i++) {
      j = l + i;
      table[i][j] = 1000000;
      for (k = i + 1; k < j; k++) {
        m = table[i][k] + table[k][j] + (p[j] - p[i]);
        if (m < table[i][j]) {
          table[i][j] = m;
          pi[i][j] = k;
        }
      }
    }
  }
}
```