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

```asm
<main>:
  endbr64
  push   %r14
  lea    D15(%rip),%r14
  push   %r13
  mov    %r14,%rdi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%r13
  lea    0x10(%rsp),%rbp
  mov    %r13,%rsi
  lea    0x14(%rsp),%r12
  call   <scanf@plt>
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  lea    0x8(%rsp),%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L16
  xor    %ebx,%ebx
  xchg   %ax,%ax
L21:
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  add    $0x1,%ebx
  call   <rotr@plt>
  cmp    %ebx,0x8(%rsp)
  jg     L21
L16:
  mov    0x14(%rsp),%ecx
  mov    0x10(%rsp),%edx
  lea    D2(%rip),%rdi
  mov    0xc(%rsp),%esi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L19
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L19:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D15
type: string
name: extract_symbolic_data
arguments: data_label: D2
type: string

tool: D15: %d

tool: D2: %d %d %d

assistant: ```c
int main() {
  int n, a, b, c, i;
  scanf("%d", &a);
  scanf("%d", &b);
  scanf("%d", &c);
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    rotr(&a, &b, &c);
  }
  printf("%d %d %d", a, b, c);
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %r14
  lea    D10(%rip),%r14
  push   %r13
  mov    %r14,%rdi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%r13
  lea    0x10(%rsp),%rbp
  mov    %r13,%rsi
  lea    0x14(%rsp),%r12
  call   <scanf@plt>
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  lea    0x8(%rsp),%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L18
  xor    %ebx,%ebx
  xchg   %ax,%ax
L11:
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  add    $0x1,%ebx
  call   <rotr@plt>
  cmp    %ebx,0x8(%rsp)
  jg     L11
L18:
  mov    0x14(%rsp),%ecx
  mov    0x10(%rsp),%edx
  lea    D7(%rip),%rdi
  mov    0xc(%rsp),%esi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L19
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L19:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D10
datatype: string
name: unpack_data
arguments: data_label: D7
datatype: string

tool: D10: %d

tool: D7: %d %d %d

assistant: ```c
int main() {
  int n, a, b, c, i;
  scanf("%d", &a);
  scanf("%d", &b);
  scanf("%d", &c);
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    rotr(&a, &b, &c);
  }
  printf("%d %d %d", a, b, c);
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<cnfRealloc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <starRealloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  je     L88
  cmpq   $0x0,-0x28(%rbp)
  je     L88
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <cnfUregp@plt>
L88:
  mov    -0x10(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  je     L34
  cmpq   $0x0,-0x10(%rbp)
  je     L34
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <cnfRegp@plt>
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jne    L67
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <cnfMalloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L41
  mov    -0x30(%rbp),%rdx
  mov    -0x10(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <starFree@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  jmp    L34
L41:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <starFree@plt>
  movq   $0x0,-0x10(%rbp)
  jmp    L34
L67:
  cmpl   $0x0,-0x14(%rbp)
  jns    L34
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <starFree@plt>
  movq   $0x0,-0x10(%rbp)
L34:
  mov    -0x10(%rbp),%rax
  leave
  ret
```

assistant: ```c
void *cnfRealloc(void *pntr, size_t size) {
  int reg;
  void *p;
  void *temp;
  temp = starRealloc(pntr, size);
  if ((temp != pntr) && (pntr != NULL))
    cnfUregp(pntr);
  if ((temp != pntr) && (temp != NULL)) {
    reg = cnfRegp(temp);
    if (!reg) {
      p = cnfMalloc(size);
      if (p) {
        memcpy(p, temp, size);
        starFree(temp);
        temp = p;
      } else {
        starFree(temp);
        temp = NULL;
      }
    } else if (reg < 0) {
      starFree(temp);
      temp = NULL;
    }
  }
  return temp;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<cnfRealloc>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r13
  call   <starRealloc@plt>
  mov    %rax,%rbx
  cmp    %rax,%rbp
  setne  %r12b
  test   %rbp,%rbp
  je     L72
  test   %r12b,%r12b
  jne    L8
L72:
  test   %rbx,%rbx
  je     L88
  test   %r12b,%r12b
  jne    L106
L88:
  mov    %rbx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L8:
  mov    %rbp,%rdi
  call   <cnfUregp@plt>
  jmp    L72
L106:
  mov    %rbx,%rdi
  call   <cnfRegp@plt>
  test   %eax,%eax
  je     L45
  jns    L88
  mov    %rbx,%rdi
  call   <starFree@plt>
  mov    $0x0,%ebx
  jmp    L88
L45:
  mov    %r13,%rdi
  call   <cnfMalloc@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L71
  mov    %r13,%rdx
  mov    %rbx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    %rbx,%rdi
  call   <starFree@plt>
  mov    %rbp,%rbx
  jmp    L88
L71:
  mov    %rbx,%rdi
  call   <starFree@plt>
  mov    %rbp,%rbx
  jmp    L88
```

assistant: ```c
void *cnfRealloc(void *pntr, size_t size) {
  int reg;
  void *p;
  void *temp;
  temp = starRealloc(pntr, size);
  if ((temp != pntr) && (pntr != NULL))
    cnfUregp(pntr);
  if ((temp != pntr) && (temp != NULL)) {
    reg = cnfRegp(temp);
    if (!reg) {
      p = cnfMalloc(size);
      if (p) {
        memcpy(p, temp, size);
        starFree(temp);
        temp = p;
      } else {
        starFree(temp);
        temp = NULL;
      }
    } else if (reg < 0) {
      starFree(temp);
      temp = NULL;
    }
  }
  return temp;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<cnfRealloc>:
  endbr64
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <starRealloc@plt>
  cmp    %rax,%rbp
  mov    %rax,%r12
  setne  %bl
  test   %rbp,%rbp
  je     L76
  test   %bl,%bl
  jne    L64
L76:
  test   %r12,%r12
  je     L88
  test   %bl,%bl
  jne    L63
L88:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L63:
  mov    %r12,%rdi
  call   <cnfRegp@plt>
  test   %eax,%eax
  je     L12
  jns    L88
L77:
  mov    %r12,%rdi
  xor    %r12d,%r12d
  call   <starFree@plt>
  jmp    L88
  nopl   0x0(%rax,%rax,1)
L64:
  mov    %rbp,%rdi
  call   <cnfUregp@plt>
  jmp    L76
  nopw   0x0(%rax,%rax,1)
L12:
  mov    %r13,%rdi
  call   <cnfMalloc@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L77
  mov    %r12,%rsi
  mov    %r13,%rdx
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    %r12,%rdi
  mov    %rbx,%r12
  call   <starFree@plt>
  jmp    L88
```

assistant: ```c
void *cnfRealloc(void *pntr, size_t size) {
  int reg;
  void *p;
  void *temp;
  temp = starRealloc(pntr, size);
  if ((temp != pntr) && (pntr != NULL))
    cnfUregp(pntr);
  if ((temp != pntr) && (temp != NULL)) {
    reg = cnfRegp(temp);
    if (!reg) {
      p = cnfMalloc(size);
      if (p) {
        memcpy(p, temp, size);
        starFree(temp);
        temp = p;
      } else {
        starFree(temp);
        temp = NULL;
      }
    } else if (reg < 0) {
      starFree(temp);
      temp = NULL;
    }
  }
  return temp;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<cnfRealloc>:
  endbr64
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <starRealloc@plt>
  cmp    %rax,%rbp
  mov    %rax,%r12
  setne  %bl
  test   %rbp,%rbp
  je     L37
  test   %bl,%bl
  jne    L87
L37:
  test   %r12,%r12
  je     L58
  test   %bl,%bl
  jne    L5
L58:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L5:
  mov    %r12,%rdi
  call   <cnfRegp@plt>
  test   %eax,%eax
  je     L41
  jns    L58
L14:
  mov    %r12,%rdi
  xor    %r12d,%r12d
  call   <starFree@plt>
  jmp    L58
  nopl   0x0(%rax,%rax,1)
L87:
  mov    %rbp,%rdi
  call   <cnfUregp@plt>
  jmp    L37
  nopw   0x0(%rax,%rax,1)
L41:
  mov    %r13,%rdi
  call   <cnfMalloc@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L14
  mov    %r12,%rsi
  mov    %r13,%rdx
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    %r12,%rdi
  mov    %rbx,%r12
  call   <starFree@plt>
  jmp    L58
```

assistant: ```c
void *cnfRealloc(void *pntr, size_t size) {
  int reg;
  void *p;
  void *temp;
  temp = starRealloc(pntr, size);
  if ((temp != pntr) && (pntr != NULL))
    cnfUregp(pntr);
  if ((temp != pntr) && (temp != NULL)) {
    reg = cnfRegp(temp);
    if (!reg) {
      p = cnfMalloc(size);
      if (p) {
        memcpy(p, temp, size);
        starFree(temp);
        temp = p;
      } else {
        starFree(temp);
        temp = NULL;
      }
    } else if (reg < 0) {
      starFree(temp);
      temp = NULL;
    }
  }
  return temp;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<test7>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xe0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x50(%rbp),%rax
  add    $0x40,%rax
  mov    %rax,-0xe0(%rbp)
  lea    -0xd0(%rbp),%rax
  add    $0x40,%rax
  mov    %rax,-0xd8(%rbp)
  mov    -0xe0(%rbp),%rax
  add    $0x40,%rax
  mov    $0x2,%esi
  mov    %rax,%rdi
  call   <__builtin_object_size@plt>
  test   %eax,%eax
  je     L28
  mov    $0x0,%eax
  call   <abort@plt>
L28:
  mov    -0xd8(%rbp),%rax
  add    $0x3f,%rax
  mov    $0x2,%esi
  mov    %rax,%rdi
  call   <__builtin_object_size@plt>
  cmp    $0x1,%eax
  je     L44
  mov    $0x0,%eax
  call   <abort@plt>
L44:
  mov    -0xd8(%rbp),%rax
  add    $0x40,%rax
  mov    $0x2,%esi
  mov    %rax,%rdi
  call   <__builtin_object_size@plt>
  test   %eax,%eax
  je     L29
  mov    $0x0,%eax
  call   <abort@plt>
L29:
  mov    -0xd8(%rbp),%rax
  add    $0x100,%rax
  mov    $0x2,%esi
  mov    %rax,%rdi
  call   <__builtin_object_size@plt>
  test   %eax,%eax
  je     L14
  mov    $0x0,%eax
  call   <abort@plt>
L14:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L18
  call   <__stack_chk_fail@plt>
L18:
  leave
  ret
```

assistant: ```c
void __attribute__((no)) test7(void) {
  char buf[64];
  struct T {
    char buf[64];
    char buf2[64];
  } t;
  char *p = &buf[64], *q = &t.buf[64];
  if (__builtin_object_size(p + 64, 2) != 0)
    abort();
  if (__builtin_object_size(q + 63, 2) != sizeof(t) - 64 - 63)
    abort();
  if (__builtin_object_size(q + 64, 2) != sizeof(t) - 64 - 64)
    abort();
  if (__builtin_object_size(q + 256, 2) != 0)
    abort();
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<test7>:
  endbr64
  sub    $0xd8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  lea    0x100(%rsp),%rdi
  mov    $0x2,%esi
  call   <__builtin_object_size@plt>
  test   %eax,%eax
  jne    L18
L73:
  lea    0x7f(%rsp),%rdi
  mov    $0x2,%esi
  call   <__builtin_object_size@plt>
  cmp    $0x1,%eax
  jne    L58
L81:
  lea    0x80(%rsp),%rdi
  mov    $0x2,%esi
  call   <__builtin_object_size@plt>
  test   %eax,%eax
  jne    L45
L17:
  lea    0x140(%rsp),%rdi
  mov    $0x2,%esi
  call   <__builtin_object_size@plt>
  test   %eax,%eax
  jne    L42
L10:
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L69
  add    $0xd8,%rsp
  ret
L18:
  mov    $0x0,%eax
  call   <abort@plt>
  jmp    L73
L58:
  mov    $0x0,%eax
  call   <abort@plt>
  jmp    L81
L45:
  mov    $0x0,%eax
  call   <abort@plt>
  jmp    L17
L42:
  mov    $0x0,%eax
  call   <abort@plt>
  jmp    L10
L69:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void __attribute__((no)) test7(void) {
  char buf[64];
  struct T {
    char buf[64];
    char buf2[64];
  } t;
  char *p = &buf[64], *q = &t.buf[64];
  if (__builtin_object_size(p + 64, 2) != 0)
    abort();
  if (__builtin_object_size(q + 63, 2) != sizeof(t) - 64 - 63)
    abort();
  if (__builtin_object_size(q + 64, 2) != sizeof(t) - 64 - 64)
    abort();
  if (__builtin_object_size(q + 256, 2) != 0)
    abort();
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<test7>:
  endbr64
  sub    $0xd8,%rsp
  mov    $0x2,%esi
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  lea    0x100(%rsp),%rdi
  call   <__builtin_object_size@plt>
  test   %eax,%eax
  jne    L42
L0:
  lea    0x7f(%rsp),%rdi
  mov    $0x2,%esi
  call   <__builtin_object_size@plt>
  cmp    $0x1,%eax
  je     L72
  xor    %eax,%eax
  call   <abort@plt>
L72:
  lea    0x80(%rsp),%rdi
  mov    $0x2,%esi
  call   <__builtin_object_size@plt>
  test   %eax,%eax
  jne    L54
L51:
  lea    0x140(%rsp),%rdi
  mov    $0x2,%esi
  call   <__builtin_object_size@plt>
  test   %eax,%eax
  jne    L6
L17:
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L73
  add    $0xd8,%rsp
  ret
  cs nopw 0x0(%rax,%rax,1)
L42:
  xor    %eax,%eax
  call   <abort@plt>
  jmp    L0
  nopl   0x0(%rax)
L6:
  xor    %eax,%eax
  call   <abort@plt>
  jmp    L17
  nopl   0x0(%rax)
L54:
  xor    %eax,%eax
  call   <abort@plt>
  jmp    L51
L73:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void __attribute__((no)) test7(void) {
  char buf[64];
  struct T {
    char buf[64];
    char buf2[64];
  } t;
  char *p = &buf[64], *q = &t.buf[64];
  if (__builtin_object_size(p + 64, 2) != 0)
    abort();
  if (__builtin_object_size(q + 63, 2) != sizeof(t) - 64 - 63)
    abort();
  if (__builtin_object_size(q + 64, 2) != sizeof(t) - 64 - 64)
    abort();
  if (__builtin_object_size(q + 256, 2) != 0)
    abort();
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<test7>:
  endbr64
  sub    $0xd8,%rsp
  mov    $0x2,%esi
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  lea    0x100(%rsp),%rdi
  call   <__builtin_object_size@plt>
  test   %eax,%eax
  jne    L27
L59:
  lea    0x7f(%rsp),%rdi
  mov    $0x2,%esi
  call   <__builtin_object_size@plt>
  cmp    $0x1,%eax
  je     L52
  xor    %eax,%eax
  call   <abort@plt>
L52:
  lea    0x80(%rsp),%rdi
  mov    $0x2,%esi
  call   <__builtin_object_size@plt>
  test   %eax,%eax
  jne    L30
L47:
  lea    0x140(%rsp),%rdi
  mov    $0x2,%esi
  call   <__builtin_object_size@plt>
  test   %eax,%eax
  jne    L62
L33:
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L71
  add    $0xd8,%rsp
  ret
  cs nopw 0x0(%rax,%rax,1)
L27:
  xor    %eax,%eax
  call   <abort@plt>
  jmp    L59
  nopl   0x0(%rax)
L62:
  xor    %eax,%eax
  call   <abort@plt>
  jmp    L33
  nopl   0x0(%rax)
L30:
  xor    %eax,%eax
  call   <abort@plt>
  jmp    L47
L71:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void __attribute__((no)) test7(void) {
  char buf[64];
  struct T {
    char buf[64];
    char buf2[64];
  } t;
  char *p = &buf[64], *q = &t.buf[64];
  if (__builtin_object_size(p + 64, 2) != 0)
    abort();
  if (__builtin_object_size(q + 63, 2) != sizeof(t) - 64 - 63)
    abort();
  if (__builtin_object_size(q + 64, 2) != sizeof(t) - 64 - 64)
    abort();
  if (__builtin_object_size(q + 256, 2) != 0)
    abort();
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<chronopic_get_trama_cambio>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %rsi,%rbp
  mov    %rdx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xe(%rsp),%rsi
  call   <sg_trama_cambio_read@plt>
  mov    %eax,%ebx
  cmp    $0x1,%eax
  je     L36
L50:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L45
  mov    %ebx,%eax
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L36:
  movzbl 0x10(%rsp),%ecx
  movzbl 0xf(%rsp),%edx
  movzbl 0xe(%rsp),%esi
  movzbl 0x12(%rsp),%r9d
  movzbl 0x11(%rsp),%r8d
  lea    D18(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movzbl 0x10(%rsp),%esi
  shl    $0x8,%esi
  movzbl 0x11(%rsp),%eax
  add    %eax,%esi
  shl    $0x8,%esi
  movzbl 0x12(%rsp),%eax
  add    %eax,%esi
  movslq %esi,%rsi
  imul   $0x10624dd3,%rsi,%rsi
  sar    $0x23,%rsi
  lea    D11(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpb   $0x58,0xe(%rsp)
  jne    L4
  movzbl 0xf(%rsp),%eax
  cmp    $0x1,%al
  ja     L60
  movzbl %al,%eax
  mov    %eax,(%r12)
  movzbl 0x10(%rsp),%eax
  shl    $0x8,%eax
  movzbl 0x11(%rsp),%edx
  add    %edx,%eax
  shl    $0x8,%eax
  movzbl 0x12(%rsp),%edx
  add    %edx,%eax
  shl    $0x3,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  divsd  D31(%rip),%xmm0
  movsd  %xmm0,0x0(%rbp)
  lea    D42(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L50
L4:
  lea    D48(%rip),%rdi
  call   <puts@plt>
  mov    $0xffffffff,%ebx
  jmp    L50
L60:
  lea    D3(%rip),%rdi
  call   <puts@plt>
  mov    $0xffffffff,%ebx
  jmp    L50
L45:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D18
type_guessed: string
name: retrieve_data
arguments: tag: D11
type_guessed: string
name: retrieve_data
arguments: tag: D31
type_guessed: byte[8]
name: retrieve_data
arguments: tag: D42
type_guessed: string
name: retrieve_data
arguments: tag: D48
type_guessed: string
name: retrieve_data
arguments: tag: D3
type_guessed: string

tool: D18: %c-%d-%d-%d-%d

tool: D11: %d

tool: {"D31": [0x00,0x00,0x00,0x00,0x00,0x40,0x8f,0x40]}

tool: D42: %f

tool: D48: Error. Trama desconocida

tool: D3: Error. Estado no valido

assistant: ```c
int chronopic_get_trama_cambio(int fd, double *t, int *estado) {
  int n;
  unsigned char trama[10];
  n = sg_trama_cambio_read(fd, trama);
  if (n != 1)
    return n;
  printf("%c-%d-%d-%d-%d", trama[0], trama[1], trama[2], trama[3], trama[4]);
  printf("%d", ((trama[2] * 65536 + trama[3] * 256 + trama[4]) * 8) / 1000);
  if (trama[0] != 'X') {
    printf("Error. Trama desconocida\n");
    return -1;
  }
  if (trama[1] != 0 && trama[1] != 1) {
    printf("Error. Estado no valido\n");
    return -1;
  }
  *estado = (int)(trama[1] & 0xff);
  *t = (double)((trama[2] * 65536 + trama[3] * 256 + trama[4]) * 8) / 1000;
  printf("%f", *t);
  return 1;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<chronopic_get_trama_cambio>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xe(%rsp),%rsi
  call   <sg_trama_cambio_read@plt>
  mov    %eax,%r12d
  cmp    $0x1,%eax
  je     L61
L19:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x20,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L61:
  movzbl 0x10(%rsp),%ecx
  movzbl 0xf(%rsp),%edx
  xor    %eax,%eax
  lea    D58(%rip),%rdi
  movzbl 0xe(%rsp),%esi
  movzbl 0x12(%rsp),%r9d
  movzbl 0x11(%rsp),%r8d
  call   <printf@plt>
  movzbl 0x10(%rsp),%esi
  movzbl 0x11(%rsp),%eax
  lea    D3(%rip),%rdi
  shl    $0x8,%esi
  add    %eax,%esi
  movzbl 0x12(%rsp),%eax
  shl    $0x8,%esi
  add    %eax,%esi
  xor    %eax,%eax
  imul   $0x10624dd3,%rsi,%rsi
  shr    $0x23,%rsi
  call   <printf@plt>
  cmpb   $0x58,0xe(%rsp)
  jne    L41
  movzbl 0xf(%rsp),%eax
  cmp    $0x1,%al
  ja     L29
  mov    %eax,0x0(%rbp)
  movzbl 0x10(%rsp),%eax
  pxor   %xmm0,%xmm0
  lea    D38(%rip),%rdi
  movzbl 0x11(%rsp),%edx
  shl    $0x8,%eax
  add    %edx,%eax
  movzbl 0x12(%rsp),%edx
  shl    $0x8,%eax
  add    %edx,%eax
  shl    $0x3,%eax
  cvtsi2sd %eax,%xmm0
  mov    $0x1,%eax
  divsd  D8(%rip),%xmm0
  movsd  %xmm0,(%rbx)
  call   <printf@plt>
  jmp    L19
L29:
  lea    D28(%rip),%rdi
  mov    $0xffffffff,%r12d
  call   <puts@plt>
  jmp    L19
L41:
  lea    D45(%rip),%rdi
  mov    $0xffffffff,%r12d
  call   <puts@plt>
  jmp    L19
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D58
data_type: string
name: extract_symbolic_data
arguments: label: D3
data_type: string
name: extract_symbolic_data
arguments: label: D38
data_type: string
name: extract_symbolic_data
arguments: label: D8
data_type: byte[8]
name: extract_symbolic_data
arguments: label: D28
data_type: string
name: extract_symbolic_data
arguments: label: D45
data_type: string

tool: D58: %c-%d-%d-%d-%d

tool: D3: %d

tool: D38: %f

tool: {"D8": [0x00,0x00,0x00,0x00,0x00,0x40,0x8f,0x40]}

tool: D28: Error. Estado no valido

tool: D45: Error. Trama desconocida

assistant: ```c
int chronopic_get_trama_cambio(int fd, double *t, int *estado) {
  int n;
  unsigned char trama[10];
  n = sg_trama_cambio_read(fd, trama);
  if (n != 1)
    return n;
  printf("%c-%d-%d-%d-%d", trama[0], trama[1], trama[2], trama[3], trama[4]);
  printf("%d", ((trama[2] * 65536 + trama[3] * 256 + trama[4]) * 8) / 1000);
  if (trama[0] != 'X') {
    printf("Error. Trama desconocida\n");
    return -1;
  }
  if (trama[1] != 0 && trama[1] != 1) {
    printf("Error. Estado no valido\n");
    return -1;
  }
  *estado = (int)(trama[1] & 0xff);
  *t = (double)((trama[2] * 65536 + trama[3] * 256 + trama[4]) * 8) / 1000;
  printf("%f", *t);
  return 1;
}
```