ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 下面的汇编指令对应的C源代码是什么：

```asm
<cross_product_of_vectors>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  lea    D1(%rip),%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    (%rsi),%eax
  mov    0x8(%rdi),%ebp
  mov    (%rdi),%r14d
  mov    0x4(%rdi),%r12d
  lea    D21(%rip),%rdi
  mov    0x8(%rsi),%r15d
  mov    0x4(%rsi),%ebx
  mov    %eax,0xc(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x5b,%edi
  call   <putchar@plt>
  mov    %r12d,%esi
  mov    %ebp,%eax
  mov    %r13,%rdi
  imul   %ebx,%eax
  imul   %r15d,%esi
  imul   %r14d,%r15d
  imul   %r14d,%ebx
  sub    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D38(%rip),%r9
  xor    %eax,%eax
  mov    %r9,%rdi
  call   <printf@plt>
  mov    %ebp,%esi
  mov    0xc(%rsp),%ebp
  mov    %r13,%rdi
  xor    %eax,%eax
  imul   %ebp,%esi
  imul   %ebp,%r12d
  sub    %r15d,%esi
  call   <printf@plt>
  lea    D38(%rip),%r9
  xor    %eax,%eax
  mov    %r9,%rdi
  call   <printf@plt>
  mov    %ebx,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  sub    %r12d,%esi
  call   <printf@plt>
  add    $0x18,%rsp
  mov    $0x5d,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <putchar@plt>
```

tool_calls: name: parse_data
arguments: data_label: D1
data_type: string
name: parse_data
arguments: data_label: D21
data_type: string
name: parse_data
arguments: data_label: D38
data_type: string

tool: D1: %d

tool: D21: Printing result:

tool: D38: , 

assistant: ```c
void cross_product_of_vectors(int str_a[], int str_b[]) {
  int result[3];
  int i = 3 - 3, f = 3 - 2, g = 3 - 1;
  result[0] = (str_a[f] * str_b[g]) - (str_a[g] * str_b[f]);
  result[1] = (str_a[g] * str_b[i]) - (str_a[i] * str_b[g]);
  result[2] = (str_a[i] * str_b[f]) - (str_a[f] * str_b[i]);
  printf("Printing result:");
  printf("[");
  int k;
  for (k = 0; k < 3; k++) {
    printf("%d", result[k]);
    if (k < 3 - 1) {
      printf(", ");
    }
  }
  printf("]");
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<cross_product_of_vectors>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  lea    D15(%rip),%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    (%rsi),%eax
  mov    0x8(%rdi),%ebp
  mov    (%rdi),%r14d
  mov    0x4(%rdi),%r12d
  lea    D35(%rip),%rdi
  mov    0x8(%rsi),%r15d
  mov    0x4(%rsi),%ebx
  mov    %eax,0xc(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x5b,%edi
  call   <putchar@plt>
  mov    %r12d,%esi
  mov    %ebp,%eax
  mov    %r13,%rdi
  imul   %ebx,%eax
  imul   %r15d,%esi
  imul   %r14d,%r15d
  imul   %r14d,%ebx
  sub    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D9(%rip),%r9
  xor    %eax,%eax
  mov    %r9,%rdi
  call   <printf@plt>
  mov    %ebp,%esi
  mov    0xc(%rsp),%ebp
  mov    %r13,%rdi
  xor    %eax,%eax
  imul   %ebp,%esi
  imul   %ebp,%r12d
  sub    %r15d,%esi
  call   <printf@plt>
  lea    D9(%rip),%r9
  xor    %eax,%eax
  mov    %r9,%rdi
  call   <printf@plt>
  mov    %ebx,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  sub    %r12d,%esi
  call   <printf@plt>
  add    $0x18,%rsp
  mov    $0x5d,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <putchar@plt>
```

tool_calls: name: parse_data
arguments: tag: D15
type: string
name: parse_data
arguments: tag: D35
type: string
name: parse_data
arguments: tag: D9
type: string

tool: D15: %d

tool: D35: Printing result:

tool: D9: , 

assistant: ```c
void cross_product_of_vectors(int str_a[], int str_b[]) {
  int result[3];
  int i = 3 - 3, f = 3 - 2, g = 3 - 1;
  result[0] = (str_a[f] * str_b[g]) - (str_a[g] * str_b[f]);
  result[1] = (str_a[g] * str_b[i]) - (str_a[i] * str_b[g]);
  result[2] = (str_a[i] * str_b[f]) - (str_a[f] * str_b[i]);
  printf("Printing result:");
  printf("[");
  int k;
  for (k = 0; k < 3; k++) {
    printf("%d", result[k]);
    if (k < 3 - 1) {
      printf(", ");
    }
  }
  printf("]");
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<rarch_sleep>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x14(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,%eax
  imul   $0x10624dd3,%rax,%rax
  shr    $0x20,%rax
  shr    $0x6,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x24(%rbp),%edx
  mov    %edx,%eax
  imul   $0x10624dd3,%rax,%rax
  shr    $0x20,%rax
  shr    $0x6,%eax
  imul   $0x3e8,%eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  imul   $0xf4240,%eax,%eax
  mov    %eax,-0x10(%rbp)
  lea    -0x14(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <nanosleep@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L1
  call   <__stack_chk_fail@plt>
L1:
  leave
  ret
```

assistant: ```c
void rarch_sleep(unsigned msec) {
  struct timespec tv = {0};
  tv.tv_sec = msec / 1000;
  tv.tv_nsec = (msec % 1000) * 1000000;
  nanosleep(&tv, NULL);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<rarch_sleep>:
  endbr64
  sub    $0x28,%rsp
  xor    %esi,%esi
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %edi,%eax
  movl   $0x0,0x14(%rsp)
  imul   $0x10624dd3,%rax,%rax
  shr    $0x26,%rax
  mov    %eax,0xc(%rsp)
  imul   $0x3e8,%eax,%eax
  sub    %eax,%edi
  imul   $0xf4240,%edi,%edi
  mov    %edi,0x10(%rsp)
  lea    0xc(%rsp),%rdi
  call   <nanosleep@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x28,%rsp
  ret
L4:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void rarch_sleep(unsigned msec) {
  struct timespec tv = {0};
  tv.tv_sec = msec / 1000;
  tv.tv_nsec = (msec % 1000) * 1000000;
  nanosleep(&tv, NULL);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<rarch_sleep>:
  endbr64
  sub    $0x28,%rsp
  xor    %esi,%esi
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %edi,%eax
  movl   $0x0,0x10(%rsp)
  imul   $0x10624dd3,%rax,%rax
  shr    $0x26,%rax
  imul   $0x3e8,%eax,%edx
  movd   %eax,%xmm0
  sub    %edx,%edi
  imul   $0xf4240,%edi,%edi
  movd   %edi,%xmm1
  lea    0x8(%rsp),%rdi
  punpckldq %xmm1,%xmm0
  movq   %xmm0,0x8(%rsp)
  call   <nanosleep@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x28,%rsp
  ret
L2:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void rarch_sleep(unsigned msec) {
  struct timespec tv = {0};
  tv.tv_sec = msec / 1000;
  tv.tv_nsec = (msec % 1000) * 1000000;
  nanosleep(&tv, NULL);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<appelerFonction>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x28(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    %r9d,-0x44(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L47
L63:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L23
  cmpl   $0x1,-0x24(%rbp)
  jne    L20
L23:
  mov    -0x28(%rbp),%r9d
  lea    -0x10(%rbp),%r8
  mov    -0x38(%rbp),%rcx
  lea    -0x14(%rbp),%rdx
  mov    -0x30(%rbp),%rsi
  mov    -0x24(%rbp),%eax
  sub    $0x8,%rsp
  mov    -0x44(%rbp),%edi
  push   %rdi
  lea    -0xc(%rbp),%rdi
  push   %rdi
  push   -0x40(%rbp)
  mov    %eax,%edi
  call   <listeTestOption@plt>
  add    $0x20,%rsp
L20:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L47:
  mov    -0x14(%rbp),%eax
  cmp    %eax,-0x24(%rbp)
  jg     L63
  mov    -0x30(%rbp),%rdx
  mov    -0x24(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <derniereOption@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L30
L60:
  mov    -0x28(%rbp),%r9d
  lea    -0x10(%rbp),%r8
  mov    -0x38(%rbp),%rcx
  lea    -0x14(%rbp),%rdx
  mov    -0x30(%rbp),%rsi
  mov    -0x24(%rbp),%eax
  sub    $0x8,%rsp
  mov    -0x44(%rbp),%edi
  push   %rdi
  lea    -0xc(%rbp),%rdi
  push   %rdi
  push   -0x40(%rbp)
  mov    %eax,%edi
  call   <listeTestOption@plt>
  add    $0x20,%rsp
L30:
  mov    -0x10(%rbp),%eax
  cmp    %eax,-0x28(%rbp)
  jg     L60
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L35
  call   <__stack_chk_fail@plt>
L35:
  leave
  ret
```

assistant: ```c
void appelerFonction(int argc, char **argv, char **input, int nombreInput, char **output, int nombreOutput) {
  int i;
  int idInput;
  int idOutput;
  for (i = 0, idInput = 0, idOutput = 0; i < argc; i += 1) {
    if (argv[i][0] == '-' || argc == 1) {
      listeTestOption(argc, argv, &i, input, &idInput, nombreInput, output, &idOutput, nombreOutput);
    }
  }
  i = derniereOption(argc, argv);
  while (idInput < nombreInput) {
    listeTestOption(argc, argv, &i, input, &idInput, nombreInput, output, &idOutput, nombreOutput);
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<appelerFonction>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,%ebx
  mov    %rsi,%rbp
  mov    %rdx,%r13
  mov    %ecx,%r12d
  mov    %r8,%r14
  mov    %r9d,%r15d
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x1c(%rsp)
  movl   $0x0,0x20(%rsp)
  movl   $0x0,0x24(%rsp)
  test   %edi,%edi
  jle    L89
  lea    0x20(%rsp),%rcx
  mov    %rcx,0x8(%rsp)
  jmp    L84
L81:
  lea    0x1c(%rsp),%rdx
  sub    $0x8,%rsp
  push   %r15
  lea    0x34(%rsp),%rax
  push   %rax
  push   %r14
  mov    %r12d,%r9d
  mov    0x28(%rsp),%r8
  mov    %r13,%rcx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <listeTestOption@plt>
  add    $0x20,%rsp
L55:
  mov    0x1c(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x1c(%rsp)
  cmp    %ebx,%eax
  jge    L89
L84:
  cltq
  mov    0x0(%rbp,%rax,8),%rax
  cmpb   $0x2d,(%rax)
  je     L81
  cmp    $0x1,%ebx
  jne    L55
  jmp    L81
L89:
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <derniereOption@plt>
  mov    %eax,0x1c(%rsp)
  cmp    0x20(%rsp),%r12d
  jle    L13
  lea    0x20(%rsp),%rax
  mov    %rax,0x8(%rsp)
L2:
  lea    0x1c(%rsp),%rdx
  sub    $0x8,%rsp
  push   %r15
  lea    0x34(%rsp),%rax
  push   %rax
  push   %r14
  mov    %r12d,%r9d
  mov    0x28(%rsp),%r8
  mov    %r13,%rcx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <listeTestOption@plt>
  add    $0x20,%rsp
  cmp    %r12d,0x20(%rsp)
  jl     L2
L13:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L14:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void appelerFonction(int argc, char **argv, char **input, int nombreInput, char **output, int nombreOutput) {
  int i;
  int idInput;
  int idOutput;
  for (i = 0, idInput = 0, idOutput = 0; i < argc; i += 1) {
    if (argv[i][0] == '-' || argc == 1) {
      listeTestOption(argc, argv, &i, input, &idInput, nombreInput, output, &idOutput, nombreOutput);
    }
  }
  i = derniereOption(argc, argv);
  while (idInput < nombreInput) {
    listeTestOption(argc, argv, &i, input, &idInput, nombreInput, output, &idOutput, nombreOutput);
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<appelerFonction>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x48,%rsp
  mov    %r8,0x10(%rsp)
  lea    0x30(%rsp),%r8
  mov    %r9d,0x1c(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  movl   $0x0,0x2c(%rsp)
  movl   $0x0,0x30(%rsp)
  sete   %r15b
  movl   $0x0,0x34(%rsp)
  test   %edi,%edi
  jg     L25
  jmp    L32
  nopl   0x0(%rax)
L33:
  test   %r15b,%r15b
  jne    L80
  mov    0x2c(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x2c(%rsp)
  cmp    %ebx,%eax
  jge    L32
L25:
  cltq
  mov    0x0(%rbp,%rax,8),%rax
  cmpb   $0x2d,(%rax)
  jne    L33
L80:
  lea    0x2c(%rsp),%rdx
  sub    $0x8,%rsp
  mov    %r13d,%r9d
  mov    %r12,%rcx
  mov    0x24(%rsp),%eax
  mov    %rbp,%rsi
  mov    %ebx,%edi
  push   %rax
  lea    0x44(%rsp),%r14
  push   %r14
  push   0x28(%rsp)
  mov    %r8,0x28(%rsp)
  call   <listeTestOption@plt>
  mov    0x4c(%rsp),%eax
  add    $0x20,%rsp
  mov    0x8(%rsp),%r8
  add    $0x1,%eax
  mov    %eax,0x2c(%rsp)
  cmp    %ebx,%eax
  jl     L25
L32:
  mov    %rbp,%rsi
  lea    0x30(%rsp),%r15
  lea    0x34(%rsp),%r14
  mov    %ebx,%edi
  call   <derniereOption@plt>
  lea    0x2c(%rsp),%rdx
  mov    %eax,0x2c(%rsp)
  cmp    0x30(%rsp),%r13d
  jle    L4
  nopw   0x0(%rax,%rax,1)
L84:
  sub    $0x8,%rsp
  mov    %r13d,%r9d
  mov    %r15,%r8
  mov    %r12,%rcx
  mov    0x24(%rsp),%eax
  mov    %rbp,%rsi
  mov    %ebx,%edi
  push   %rax
  push   %r14
  push   0x28(%rsp)
  mov    %rdx,0x28(%rsp)
  call   <listeTestOption@plt>
  add    $0x20,%rsp
  mov    0x8(%rsp),%rdx
  cmp    %r13d,0x30(%rsp)
  jl     L84
L4:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L82
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L82:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void appelerFonction(int argc, char **argv, char **input, int nombreInput, char **output, int nombreOutput) {
  int i;
  int idInput;
  int idOutput;
  for (i = 0, idInput = 0, idOutput = 0; i < argc; i += 1) {
    if (argv[i][0] == '-' || argc == 1) {
      listeTestOption(argc, argv, &i, input, &idInput, nombreInput, output, &idOutput, nombreOutput);
    }
  }
  i = derniereOption(argc, argv);
  while (idInput < nombreInput) {
    listeTestOption(argc, argv, &i, input, &idInput, nombreInput, output, &idOutput, nombreOutput);
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<appelerFonction>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x48,%rsp
  mov    %r8,0x10(%rsp)
  lea    0x30(%rsp),%r8
  mov    %r9d,0x1c(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  movl   $0x0,0x2c(%rsp)
  movl   $0x0,0x30(%rsp)
  sete   %r15b
  movl   $0x0,0x34(%rsp)
  test   %edi,%edi
  jle    L54
  nop
L22:
  movslq %eax,%rdx
  mov    0x0(%rbp,%rdx,8),%rdx
  cmpb   $0x2d,(%rdx)
  je     L52
  test   %r15b,%r15b
  jne    L52
  add    $0x1,%eax
  mov    %eax,0x2c(%rsp)
  cmp    %ebx,%eax
  jl     L22
L54:
  mov    %rbp,%rsi
  lea    0x30(%rsp),%r15
  lea    0x34(%rsp),%r14
  mov    %ebx,%edi
  call   <derniereOption@plt>
  lea    0x2c(%rsp),%rdx
  mov    %eax,0x2c(%rsp)
  cmp    0x30(%rsp),%r13d
  jle    L59
  nopl   0x0(%rax)
L50:
  sub    $0x8,%rsp
  mov    %r13d,%r9d
  mov    %r15,%r8
  mov    %r12,%rcx
  mov    0x24(%rsp),%eax
  mov    %rbp,%rsi
  mov    %ebx,%edi
  push   %rax
  push   %r14
  push   0x28(%rsp)
  mov    %rdx,0x28(%rsp)
  call   <listeTestOption@plt>
  add    $0x20,%rsp
  mov    0x8(%rsp),%rdx
  cmp    %r13d,0x30(%rsp)
  jl     L50
L59:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L23
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L52:
  lea    0x2c(%rsp),%rdx
  sub    $0x8,%rsp
  mov    %r13d,%r9d
  mov    %r12,%rcx
  mov    0x24(%rsp),%eax
  mov    %rbp,%rsi
  mov    %ebx,%edi
  push   %rax
  lea    0x44(%rsp),%r14
  push   %r14
  push   0x28(%rsp)
  mov    %r8,0x28(%rsp)
  call   <listeTestOption@plt>
  mov    0x4c(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x4c(%rsp)
  add    $0x20,%rsp
  cmp    %eax,%ebx
  mov    0x8(%rsp),%r8
  jg     L22
  jmp    L54
L23:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void appelerFonction(int argc, char **argv, char **input, int nombreInput, char **output, int nombreOutput) {
  int i;
  int idInput;
  int idOutput;
  for (i = 0, idInput = 0, idOutput = 0; i < argc; i += 1) {
    if (argv[i][0] == '-' || argc == 1) {
      listeTestOption(argc, argv, &i, input, &idInput, nombreInput, output, &idOutput, nombreOutput);
    }
  }
  i = derniereOption(argc, argv);
  while (idInput < nombreInput) {
    listeTestOption(argc, argv, &i, input, &idInput, nombreInput, output, &idOutput, nombreOutput);
  }
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<file_read_int>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %edx,-0x84(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x50(%rbp),%rcx
  mov    -0x78(%rbp),%rax
  mov    $0x3f,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <file_read_buf@plt>
  mov    %eax,-0x64(%rbp)
  cmpl   $0x0,-0x64(%rbp)
  jns    L54
  mov    -0x64(%rbp),%eax
  jmp    L42
L54:
  mov    -0x64(%rbp),%eax
  cltq
  movb   $0x0,-0x50(%rbp,%rax,1)
  mov    D6(%rip),%rax
  movq   $0x0,(%rax)
  mov    -0x84(%rbp),%edx
  lea    -0x60(%rbp),%rcx
  lea    -0x50(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strtol@plt>
  mov    %rax,-0x58(%rbp)
  mov    D6(%rip),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L56
  mov    -0x60(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L58
  mov    -0x60(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L58
L56:
  mov    D11(%rip),%rax
  mov    (%rax),%eax
  neg    %eax
  jmp    L42
L58:
  mov    -0x58(%rbp),%rax
  mov    %eax,%edx
  mov    -0x80(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
L42:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L52
  call   <__stack_chk_fail@plt>
L52:
  leave
  ret
```

assistant: ```c
int file_read_int(struct fileaccess *fa, int *value, int base) {
  char buf[64];
  int count;
  long val;
  char *tail;
  count = file_read_buf(fa, buf, sizeof(buf) - 1);
  if (count < 0)
    return count;
  buf[count] = '\0';
  errno = 0;
  val = strtol(buf, &tail, base);
  if (errno || (*tail != '\0' && *tail != '\n'))
    return -ETXTBSY;
  *value = val;
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<file_read_int>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x60,%rsp
  mov    %rsi,%rbp
  mov    %edx,%ebx
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rsi
  mov    $0x3f,%edx
  call   <file_read_buf@plt>
  test   %eax,%eax
  js     L19
  cltq
  movb   $0x0,0x10(%rsp,%rax,1)
  mov    D12(%rip),%r12
  movq   $0x0,(%r12)
  lea    0x8(%rsp),%rsi
  lea    0x10(%rsp),%rdi
  mov    %ebx,%edx
  call   <strtol@plt>
  cmpq   $0x0,(%r12)
  jne    L29
  mov    0x8(%rsp),%rdx
  movzbl (%rdx),%edx
  test   %dl,%dl
  je     L15
  cmp    $0xa,%dl
  je     L15
L29:
  mov    D17(%rip),%rax
  mov    (%rax),%eax
  neg    %eax
L19:
  mov    0x58(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L40
  add    $0x60,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L15:
  mov    %eax,0x0(%rbp)
  mov    $0x0,%eax
  jmp    L19
L40:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int file_read_int(struct fileaccess *fa, int *value, int base) {
  char buf[64];
  int count;
  long val;
  char *tail;
  count = file_read_buf(fa, buf, sizeof(buf) - 1);
  if (count < 0)
    return count;
  buf[count] = '\0';
  errno = 0;
  val = strtol(buf, &tail, base);
  if (errno || (*tail != '\0' && *tail != '\n'))
    return -ETXTBSY;
  *value = val;
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<file_read_int>:
  endbr64
  push   %r13
  push   %r12
  mov    %edx,%r12d
  mov    $0x3f,%edx
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x68,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  mov    %rbp,%rsi
  call   <file_read_buf@plt>
  test   %eax,%eax
  js     L37
  mov    D1(%rip),%r13
  cltq
  mov    %r12d,%edx
  mov    %rbp,%rdi
  lea    0x8(%rsp),%rsi
  movb   $0x0,0x10(%rsp,%rax,1)
  movq   $0x0,0x0(%r13)
  call   <strtol@plt>
  cmpq   $0x0,0x0(%r13)
  jne    L28
  mov    0x8(%rsp),%rdx
  movzbl (%rdx),%edx
  test   %dl,%dl
  je     L52
  cmp    $0xa,%dl
  je     L52
L28:
  mov    D19(%rip),%rax
  mov    (%rax),%eax
  neg    %eax
L37:
  mov    0x58(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L39
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  xchg   %ax,%ax
L52:
  mov    %eax,(%rbx)
  xor    %eax,%eax
  jmp    L37
L39:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int file_read_int(struct fileaccess *fa, int *value, int base) {
  char buf[64];
  int count;
  long val;
  char *tail;
  count = file_read_buf(fa, buf, sizeof(buf) - 1);
  if (count < 0)
    return count;
  buf[count] = '\0';
  errno = 0;
  val = strtol(buf, &tail, base);
  if (errno || (*tail != '\0' && *tail != '\n'))
    return -ETXTBSY;
  *value = val;
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<file_read_int>:
  endbr64
  push   %r13
  push   %r12
  mov    %edx,%r12d
  mov    $0x3f,%edx
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x68,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  mov    %rbp,%rsi
  call   <file_read_buf@plt>
  test   %eax,%eax
  js     L17
  mov    D5(%rip),%r13
  cltq
  mov    %r12d,%edx
  mov    %rbp,%rdi
  lea    0x8(%rsp),%rsi
  movb   $0x0,0x10(%rsp,%rax,1)
  movq   $0x0,0x0(%r13)
  call   <strtol@plt>
  cmpq   $0x0,0x0(%r13)
  jne    L28
  mov    0x8(%rsp),%rdx
  movzbl (%rdx),%edx
  test   %dl,%dl
  je     L9
  cmp    $0xa,%dl
  je     L9
L28:
  mov    D11(%rip),%rax
  mov    (%rax),%eax
  neg    %eax
L17:
  mov    0x58(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L56
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  xchg   %ax,%ax
L9:
  mov    %eax,(%rbx)
  xor    %eax,%eax
  jmp    L17
L56:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int file_read_int(struct fileaccess *fa, int *value, int base) {
  char buf[64];
  int count;
  long val;
  char *tail;
  count = file_read_buf(fa, buf, sizeof(buf) - 1);
  if (count < 0)
    return count;
  buf[count] = '\0';
  errno = 0;
  val = strtol(buf, &tail, base);
  if (errno || (*tail != '\0' && *tail != '\n'))
    return -ETXTBSY;
  *value = val;
  return 0;
}
```