ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Converte this assembly snippet into its equivalent C code:

```asm
<EspDrv_timedRead>:
  endbr64
  push   %rbx
  mov    $0x0,%eax
  call   <millis@plt>
  mov    %rax,%rbx
L8:
  mov    $0x0,%eax
  call   <UART_read@plt>
  test   %eax,%eax
  jns    L1
  mov    $0x0,%eax
  call   <millis@plt>
  sub    %rbx,%rax
  cmp    $0x270f,%rax
  jle    L8
  mov    $0xffffffff,%eax
L1:
  pop    %rbx
  ret
```

assistant: ```c
int EspDrv_timedRead() {
  int c;
  long _timeout = 10000;
  long _startMillis = millis();
  do {
    c = UART_read();
    if (c >= 0)
      return c;
  } while (millis() - _startMillis < _timeout);
  return -1;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<EspDrv_timedRead>:
  endbr64
  push   %rbx
  xor    %eax,%eax
  call   <millis@plt>
  mov    %rax,%rbx
  jmp    L10
  nopl   0x0(%rax)
L11:
  xor    %eax,%eax
  call   <millis@plt>
  sub    %rbx,%rax
  cmp    $0x270f,%rax
  jg     L8
L10:
  xor    %eax,%eax
  call   <UART_read@plt>
  test   %eax,%eax
  js     L11
  pop    %rbx
  ret
  nopw   0x0(%rax,%rax,1)
L8:
  mov    $0xffffffff,%eax
  pop    %rbx
  ret
```

assistant: ```c
int EspDrv_timedRead() {
  int c;
  long _timeout = 10000;
  long _startMillis = millis();
  do {
    c = UART_read();
    if (c >= 0)
      return c;
  } while (millis() - _startMillis < _timeout);
  return -1;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<EspDrv_timedRead>:
  endbr64
  push   %rbx
  xor    %eax,%eax
  call   <millis@plt>
  mov    %rax,%rbx
  jmp    L12
  nopl   0x0(%rax)
L29:
  xor    %eax,%eax
  call   <millis@plt>
  sub    %rbx,%rax
  cmp    $0x270f,%rax
  jg     L19
L12:
  xor    %eax,%eax
  call   <UART_read@plt>
  test   %eax,%eax
  js     L29
  pop    %rbx
  ret
  nopw   0x0(%rax,%rax,1)
L19:
  mov    $0xffffffff,%eax
  pop    %rbx
  ret
```

assistant: ```c
int EspDrv_timedRead() {
  int c;
  long _timeout = 10000;
  long _startMillis = millis();
  do {
    c = UART_read();
    if (c >= 0)
      return c;
  } while (millis() - _startMillis < _timeout);
  return -1;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<ft_nbrlen>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L3
L13:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x14(%rbp)
  addl   $0x1,-0x4(%rbp)
L3:
  cmpl   $0x0,-0x14(%rbp)
  jne    L13
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int ft_nbrlen(int nb) {
  int ret;
  ret = 0;
  while (nb) {
    nb /= 10;
    ++ret;
  }
  return (ret);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<ft_nbrlen>:
  endbr64
  test   %edi,%edi
  je     L26
  mov    $0x0,%edx
L3:
  movslq %edi,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  sar    $0x1f,%edi
  sub    %edi,%eax
  mov    %eax,%edi
  add    $0x1,%edx
  test   %eax,%eax
  jne    L3
L28:
  mov    %edx,%eax
  ret
L26:
  mov    %edi,%edx
  jmp    L28
```

assistant: ```c
int ft_nbrlen(int nb) {
  int ret;
  ret = 0;
  while (nb) {
    nb /= 10;
    ++ret;
  }
  return (ret);
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<ft_nbrlen>:
  endbr64
  xor    %r8d,%r8d
  test   %edi,%edi
  je     L6
  nopl   0x0(%rax,%rax,1)
L4:
  movslq %edi,%rax
  mov    %edi,%edx
  add    $0x1,%r8d
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  mov    %eax,%edi
  jne    L4
L6:
  mov    %r8d,%eax
  ret
```

assistant: ```c
int ft_nbrlen(int nb) {
  int ret;
  ret = 0;
  while (nb) {
    nb /= 10;
    ++ret;
  }
  return (ret);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<ft_nbrlen>:
  endbr64
  xor    %r8d,%r8d
  test   %edi,%edi
  je     L3
  nopl   0x0(%rax,%rax,1)
L1:
  movslq %edi,%rax
  mov    %edi,%edx
  add    $0x1,%r8d
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%edx
  sar    $0x22,%rax
  sub    %edx,%eax
  mov    %eax,%edi
  jne    L1
L3:
  mov    %r8d,%eax
  ret
```

assistant: ```c
int ft_nbrlen(int nb) {
  int ret;
  ret = 0;
  while (nb) {
    nb /= 10;
    ++ret;
  }
  return (ret);
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x1a,%esi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x10(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x10(%rbp),%eax
  shl    $0x3,%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x10(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L3
L12:
  nop
L3:
  mov    $0x0,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L12
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L18
  call   <__stack_chk_fail@plt>
L18:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D18
type_guessed: string
name: retrieve_data
arguments: data_label: D23
type_guessed: string
name: retrieve_data
arguments: data_label: D17
type_guessed: string

tool: D18: Enter a value to be multiplied by 10 %c 

tool: D23: %d

tool: D17: %d multiplied by 10 is %d.


assistant: ```c
int main(void) {
  int v, r;
  printf("Enter a value to be multiplied by 10 %c ", 26);
  scanf("%d", &v);
  r = (v << 1) + (v << 3);
  putchar('\n');
  printf("%d multiplied by 10 is %d.\n", v, r);
  while (getchar() != '\n')
    continue;
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    $0x1a,%esi
  lea    D7(%rip),%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D2(%rip),%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  lea    (%rax,%rax,4),%ebx
  add    %ebx,%ebx
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %ebx,%edx
  mov    0x4(%rsp),%esi
  lea    D18(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L13:
  mov    $0x0,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L13
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  mov    $0x0,%eax
  add    $0x10,%rsp
  pop    %rbx
  ret
L15:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D7
datatype: string
name: extract_symbolic_data
arguments: label: D2
datatype: string
name: extract_symbolic_data
arguments: label: D18
datatype: string

tool: D7: Enter a value to be multiplied by 10 %c 

tool: D2: %d

tool: D18: %d multiplied by 10 is %d.


assistant: ```c
int main(void) {
  int v, r;
  printf("Enter a value to be multiplied by 10 %c ", 26);
  scanf("%d", &v);
  r = (v << 1) + (v << 3);
  putchar('\n');
  printf("%d multiplied by 10 is %d.\n", v, r);
  while (getchar() != '\n')
    continue;
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %r12
  mov    $0x1a,%esi
  lea    D9(%rip),%rdi
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D5(%rip),%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  mov    $0xa,%edi
  lea    (%rax,%rax,4),%r12d
  call   <putchar@plt>
  add    %r12d,%r12d
  mov    0x4(%rsp),%esi
  xor    %eax,%eax
  mov    %r12d,%edx
  lea    D19(%rip),%rdi
  call   <printf@plt>
L15:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L15
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %r12
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D9
type: string
name: disassemble_data
arguments: tag: D5
type: string
name: disassemble_data
arguments: tag: D19
type: string

tool: D9: Enter a value to be multiplied by 10 %c 

tool: D5: %d

tool: D19: %d multiplied by 10 is %d.


assistant: ```c
int main(void) {
  int v, r;
  printf("Enter a value to be multiplied by 10 %c ", 26);
  scanf("%d", &v);
  r = (v << 1) + (v << 3);
  putchar('\n');
  printf("%d multiplied by 10 is %d.\n", v, r);
  while (getchar() != '\n')
    continue;
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<main>:
  endbr64
  push   %r12
  mov    $0x1a,%esi
  lea    D19(%rip),%rdi
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D20(%rip),%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  mov    $0xa,%edi
  lea    (%rax,%rax,4),%r12d
  call   <putchar@plt>
  add    %r12d,%r12d
  mov    0x4(%rsp),%esi
  xor    %eax,%eax
  mov    %r12d,%edx
  lea    D6(%rip),%rdi
  call   <printf@plt>
L8:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L8
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %r12
  ret
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D19
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D20
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D6
type_guessed: string

tool: D19: Enter a value to be multiplied by 10 %c 

tool: D20: %d

tool: D6: %d multiplied by 10 is %d.


assistant: ```c
int main(void) {
  int v, r;
  printf("Enter a value to be multiplied by 10 %c ", 26);
  scanf("%d", &v);
  r = (v << 1) + (v << 3);
  putchar('\n');
  printf("%d multiplied by 10 is %d.\n", v, r);
  while (getchar() != '\n')
    continue;
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  movl   $0x0,-0x10(%rbp)
  movl   $0x3e7,-0x18(%rbp)
  jmp    L52
L13:
  movl   $0x3e7,-0x14(%rbp)
  jmp    L77
L48:
  mov    -0x18(%rbp),%eax
  imul   -0x14(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L6
L53:
  mov    -0xc(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x8(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  add    %edx,-0xc(%rbp)
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jne    L6
  mov    -0x4(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jle    L6
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x10(%rbp)
L6:
  cmpl   $0x0,-0x8(%rbp)
  jne    L53
  subl   $0x1,-0x14(%rbp)
L77:
  cmpl   $0x63,-0x14(%rbp)
  jg     L48
  subl   $0x1,-0x18(%rbp)
L52:
  cmpl   $0x63,-0x18(%rbp)
  jg     L13
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  leave
  ret
```

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

tool: D5: The correct answer is: %d


assistant: ```c
int main() {
  int a, b, answer = 0;
  for (a = 999; a > 99; a--) {
    for (b = 999; b > 99; b--) {
      int c = a * b;
      int reverse = 0, n;
      n = c;
      while (n != 0) {
        reverse = reverse * 10;
        reverse = reverse + n % 10;
        n = n / 10;
        if (c == reverse) {
          if (c > answer) {
            answer = c;
          }
        }
      }
    }
  }
  printf("The correct answer is: %d\n", answer);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    $0xf3a71,%ebx
  mov    $0xfffffc19,%r10d
  mov    $0x0,%esi
  mov    $0x0,%r11d
  jmp    L20
L9:
  add    %r10d,%r8d
  sub    $0x1,%r9d
  je     L52
L44:
  mov    %r8d,%edi
  test   %r8d,%r8d
  je     L9
  mov    %r8d,%ecx
  mov    %r11d,%edx
L61:
  lea    (%rdx,%rdx,4),%ebp
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %ecx,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%edx
  add    %edx,%edx
  sub    %edx,%ecx
  lea    (%rcx,%rbp,2),%edx
  mov    %eax,%ecx
  cmp    %edx,%esi
  mov    %edx,%ebp
  cmovge %esi,%ebp
  cmp    %edx,%edi
  cmove  %ebp,%esi
  test   %eax,%eax
  jne    L61
  jmp    L9
L52:
  add    $0x1,%r10d
  sub    $0x3e7,%ebx
  cmp    $0x18255,%ebx
  je     L64
L20:
  mov    %ebx,%r8d
  mov    $0x384,%r9d
  jmp    L44
L64:
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: data_tag: D9
type_guessed: string

tool: D9: The correct answer is: %d


assistant: ```c
int main() {
  int a, b, answer = 0;
  for (a = 999; a > 99; a--) {
    for (b = 999; b > 99; b--) {
      int c = a * b;
      int reverse = 0, n;
      n = c;
      while (n != 0) {
        reverse = reverse * 10;
        reverse = reverse + n % 10;
        n = n / 10;
        if (c == reverse) {
          if (c > answer) {
            answer = c;
          }
        }
      }
    }
  }
  printf("The correct answer is: %d\n", answer);
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %rbx
  mov    $0xf3a71,%r11d
  mov    $0xfffffc19,%r9d
  xor    %esi,%esi
  mov    $0xcccccccd,%r10d
L9:
  mov    %r11d,%edi
  mov    $0x384,%r8d
  nopw   0x0(%rax,%rax,1)
L8:
  mov    %edi,%ecx
  imul   %r10,%rcx
  shr    $0x23,%rcx
  lea    (%rcx,%rcx,4),%eax
  mov    %ecx,%edx
  mov    %edi,%ecx
  add    %eax,%eax
  sub    %eax,%ecx
  nopl   (%rax)
L12:
  movslq %edx,%rax
  lea    (%rcx,%rcx,4),%ebx
  mov    %edx,%ecx
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%ecx
  sar    $0x22,%rax
  sub    %ecx,%eax
  lea    (%rax,%rax,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%edx
  cmp    %edi,%esi
  lea    (%rdx,%rbx,2),%ecx
  mov    %eax,%edx
  mov    %edi,%eax
  cmovge %esi,%eax
  cmp    %ecx,%edi
  cmove  %eax,%esi
  test   %edx,%edx
  jne    L12
  add    %r9d,%edi
  sub    $0x1,%r8d
  jne    L8
  sub    $0x3e7,%r11d
  add    $0x1,%r9d
  cmp    $0x18255,%r11d
  jne    L9
  lea    D4(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  pop    %rbx
  ret
```

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

tool: D4: The correct answer is: %d


assistant: ```c
int main() {
  int a, b, answer = 0;
  for (a = 999; a > 99; a--) {
    for (b = 999; b > 99; b--) {
      int c = a * b;
      int reverse = 0, n;
      n = c;
      while (n != 0) {
        reverse = reverse * 10;
        reverse = reverse + n % 10;
        n = n / 10;
        if (c == reverse) {
          if (c > answer) {
            answer = c;
          }
        }
      }
    }
  }
  printf("The correct answer is: %d\n", answer);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %rbx
  mov    $0xf3a71,%r11d
  mov    $0xfffffc19,%r9d
  xor    %esi,%esi
  mov    $0xcccccccd,%r10d
L21:
  mov    %r11d,%edi
  mov    $0x384,%r8d
  nopw   0x0(%rax,%rax,1)
L29:
  mov    %edi,%ecx
  imul   %r10,%rcx
  shr    $0x23,%rcx
  lea    (%rcx,%rcx,4),%eax
  mov    %ecx,%edx
  mov    %edi,%ecx
  add    %eax,%eax
  sub    %eax,%ecx
  nopl   (%rax)
L9:
  movslq %edx,%rax
  lea    (%rcx,%rcx,4),%ebx
  mov    %edx,%ecx
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%ecx
  sar    $0x22,%rax
  sub    %ecx,%eax
  lea    (%rax,%rax,4),%ecx
  add    %ecx,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rbx,2),%ecx
  mov    %eax,%edx
  cmp    %ecx,%esi
  mov    %ecx,%eax
  cmovge %esi,%eax
  cmp    %edi,%ecx
  cmove  %eax,%esi
  test   %edx,%edx
  jne    L9
  add    %r9d,%edi
  sub    $0x1,%r8d
  jne    L29
  sub    $0x3e7,%r11d
  add    $0x1,%r9d
  cmp    $0x18255,%r11d
  jne    L21
  lea    D1(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  pop    %rbx
  ret
```

tool_calls: name: read_data
arguments: data_tag: D1
type: string

tool: D1: The correct answer is: %d


assistant: ```c
int main() {
  int a, b, answer = 0;
  for (a = 999; a > 99; a--) {
    for (b = 999; b > 99; b--) {
      int c = a * b;
      int reverse = 0, n;
      n = c;
      while (n != 0) {
        reverse = reverse * 10;
        reverse = reverse + n % 10;
        n = n / 10;
        if (c == reverse) {
          if (c > answer) {
            answer = c;
          }
        }
      }
    }
  }
  printf("The correct answer is: %d\n", answer);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<iWar_Log>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x530,%rsp
  mov    %edi,-0x524(%rbp)
  mov    %rsi,-0x530(%rbp)
  mov    %rdx,-0xa0(%rbp)
  mov    %rcx,-0x98(%rbp)
  mov    %r8,-0x90(%rbp)
  mov    %r9,-0x88(%rbp)
  test   %al,%al
  je     L44
  movaps %xmm0,-0x80(%rbp)
  movaps %xmm1,-0x70(%rbp)
  movaps %xmm2,-0x60(%rbp)
  movaps %xmm3,-0x50(%rbp)
  movaps %xmm4,-0x40(%rbp)
  movaps %xmm5,-0x30(%rbp)
  movaps %xmm6,-0x20(%rbp)
  movaps %xmm7,-0x10(%rbp)
L44:
  mov    %fs:0x28,%rax
  mov    %rax,-0xb8(%rbp)
  xor    %eax,%eax
  mov    -0x530(%rbp),%rdx
  mov    -0x514(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <va_start@plt>
  lea    D46(%rip),%rax
  mov    %rax,-0x510(%rbp)
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,-0x518(%rbp)
  lea    -0x518(%rbp),%rax
  mov    %rax,%rdi
  call   <localtime@plt>
  mov    %rax,-0x508(%rbp)
  mov    -0x508(%rbp),%rdx
  lea    -0x500(%rbp),%rax
  mov    %rdx,%rcx
  lea    D12(%rip),%rdx
  mov    $0x40,%esi
  mov    %rax,%rdi
  call   <strftime@plt>
  cmpl   $0x1,-0x524(%rbp)
  jne    L31
  lea    D24(%rip),%rax
  mov    %rax,-0x510(%rbp)
L31:
  cmpl   $0x2,-0x524(%rbp)
  jne    L15
  lea    D44(%rip),%rax
  mov    %rax,-0x510(%rbp)
L15:
  mov    -0x514(%rbp),%ecx
  mov    -0x530(%rbp),%rdx
  lea    -0x4c0(%rbp),%rax
  mov    $0x400,%esi
  mov    %rax,%rdi
  call   <vsnprintf@plt>
  lea    -0x4c0(%rbp),%rdx
  mov    -0x510(%rbp),%rax
  mov    %rax,%rsi
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  cmpl   $0x1,-0x524(%rbp)
  jne    L46
  mov    $0x1,%edi
  call   <exit@plt>
L46:
  nop
  mov    -0xb8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D46
type_guessed: string
name: disassemble_data
arguments: data_tag: D12
type_guessed: string
name: disassemble_data
arguments: data_tag: D24
type_guessed: string
name: disassemble_data
arguments: data_tag: D44
type_guessed: string
name: disassemble_data
arguments: data_tag: D20
type_guessed: string

tool: D46: *

tool: D12: %m/%d/%Y %H:%M:%S

tool: D24: E

tool: D44: W

tool: D20: [%s] %s


assistant: ```c
void iWar_Log(int type, const char *format, ...) {
  char buf[1024];
  va_list ap;
  va_start(ap, format);
  char *chr = "*";
  char curtime[64];
  time_t t;
  struct tm *now;
  t = time(NULL);
  now = localtime(&t);
  strftime(curtime, sizeof(curtime), "%m/%d/%Y %H:%M:%S", now);
  if (type == 1)
    chr = "E";
  if (type == 2)
    chr = "W";
  vsnprintf(buf, sizeof(buf), format, ap);
  printf("[%s] %s\n", chr, buf);
  if (type == 1)
    exit(1);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<iWar_Log>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x468,%rsp
  mov    %edi,%ebp
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x458(%rsp)
  xor    %eax,%eax
  mov    $0x0,%edi
  call   <va_start@plt>
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,0xc(%rsp)
  lea    0xc(%rsp),%rdi
  call   <localtime@plt>
  mov    %rax,%rcx
  lea    0x10(%rsp),%rdi
  lea    D38(%rip),%rdx
  mov    $0x40,%esi
  call   <strftime@plt>
  cmp    $0x1,%ebp
  je     L40
  cmp    $0x2,%ebp
  jne    L39
  lea    0x50(%rsp),%rbp
  mov    $0x0,%edi
  mov    %edi,%ecx
  mov    %rbx,%rdx
  mov    $0x400,%esi
  mov    %rbp,%rdi
  call   <vsnprintf@plt>
  mov    %rbp,%rdx
  lea    D25(%rip),%rsi
  lea    D18(%rip),%rdi
  call   <printf@plt>
L18:
  mov    0x458(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x468,%rsp
  pop    %rbx
  pop    %rbp
  ret
L40:
  lea    0x50(%rsp),%rbp
  mov    $0x0,%edi
  mov    %edi,%ecx
  mov    %rbx,%rdx
  mov    $0x400,%esi
  mov    %rbp,%rdi
  call   <vsnprintf@plt>
  mov    %rbp,%rdx
  lea    D36(%rip),%rsi
  lea    D18(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L18
L39:
  lea    0x50(%rsp),%rbp
  mov    $0x0,%edi
  mov    %edi,%ecx
  mov    %rbx,%rdx
  mov    $0x400,%esi
  mov    %rbp,%rdi
  call   <vsnprintf@plt>
  mov    %rbp,%rdx
  lea    D48(%rip),%rsi
  lea    D18(%rip),%rdi
  call   <printf@plt>
  jmp    L18
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D38
type: string
name: extract_symbolic_data
arguments: data_tag: D25
type: string
name: extract_symbolic_data
arguments: data_tag: D18
type: string
name: extract_symbolic_data
arguments: data_tag: D36
type: string
name: extract_symbolic_data
arguments: data_tag: D48
type: string

tool: D38: %m/%d/%Y %H:%M:%S

tool: D25: W

tool: D18: [%s] %s


tool: D36: E

tool: D48: *

assistant: ```c
void iWar_Log(int type, const char *format, ...) {
  char buf[1024];
  va_list ap;
  va_start(ap, format);
  char *chr = "*";
  char curtime[64];
  time_t t;
  struct tm *now;
  t = time(NULL);
  now = localtime(&t);
  strftime(curtime, sizeof(curtime), "%m/%d/%Y %H:%M:%S", now);
  if (type == 1)
    chr = "E";
  if (type == 2)
    chr = "W";
  vsnprintf(buf, sizeof(buf), format, ap);
  printf("[%s] %s\n", chr, buf);
  if (type == 1)
    exit(1);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<iWar_Log>:
  endbr64
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbx
  mov    %edi,%ebx
  xor    %edi,%edi
  sub    $0x460,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x458(%rsp)
  xor    %eax,%eax
  lea    0x50(%rsp),%r13
  call   <va_start@plt>
  xor    %edi,%edi
  call   <time@plt>
  lea    0xc(%rsp),%rdi
  mov    %eax,0xc(%rsp)
  call   <localtime@plt>
  lea    0x10(%rsp),%rdi
  mov    $0x40,%esi
  lea    D24(%rip),%rdx
  mov    %rax,%rcx
  call   <strftime@plt>
  xor    %ecx,%ecx
  mov    %r12,%rdx
  mov    $0x400,%esi
  mov    %r13,%rdi
  cmp    $0x1,%ebx
  je     L0
  cmp    $0x2,%ebx
  jne    L10
  call   <vsnprintf@plt>
  mov    %r13,%rdx
  lea    D63(%rip),%rsi
  lea    D45(%rip),%rdi
  call   <printf@plt>
L4:
  mov    0x458(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L24
  add    $0x460,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L10:
  call   <vsnprintf@plt>
  mov    %r13,%rdx
  lea    D25(%rip),%rsi
  lea    D45(%rip),%rdi
  call   <printf@plt>
  jmp    L4
  nopl   (%rax)
L0:
  call   <vsnprintf@plt>
  mov    %r13,%rdx
  lea    D48(%rip),%rsi
  lea    D45(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L4
L24:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D24
data_type: string
name: disassemble_data
arguments: data_label: D63
data_type: string
name: disassemble_data
arguments: data_label: D45
data_type: string
name: disassemble_data
arguments: data_label: D25
data_type: string
name: disassemble_data
arguments: data_label: D48
data_type: string

tool: D24: %m/%d/%Y %H:%M:%S

tool: D63: W

tool: D45: [%s] %s


tool: D25: *

tool: D48: E

assistant: ```c
void iWar_Log(int type, const char *format, ...) {
  char buf[1024];
  va_list ap;
  va_start(ap, format);
  char *chr = "*";
  char curtime[64];
  time_t t;
  struct tm *now;
  t = time(NULL);
  now = localtime(&t);
  strftime(curtime, sizeof(curtime), "%m/%d/%Y %H:%M:%S", now);
  if (type == 1)
    chr = "E";
  if (type == 2)
    chr = "W";
  vsnprintf(buf, sizeof(buf), format, ap);
  printf("[%s] %s\n", chr, buf);
  if (type == 1)
    exit(1);
}
```