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

```asm
<radix_sorti>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <radix_sortu@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  je     L47
  mov    -0x4(%rbp),%eax
  jmp    L28
L47:
  movl   $0x0,-0x8(%rbp)
  jmp    L14
L12:
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L43
  addl   $0x1,-0x8(%rbp)
L14:
  mov    -0x8(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jb     L12
  jmp    L50
L43:
  nop
L50:
  mov    -0x8(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jae    L2
  mov    -0x1c(%rbp),%eax
  sub    -0x8(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <rotatei@plt>
L2:
  mov    $0x0,%eax
L28:
  leave
  ret
```

assistant: ```c
int radix_sorti(int *data, unsigned size, unsigned radix) {
  unsigned pos;
  int res;
  if ((res = radix_sortu((unsigned *)data, size, radix)) != 0)
    return res;
  for (pos = 0; pos < size; ++pos) {
    if (data[pos] < 0)
      break;
  }
  if (pos < size)
    rotatei(data, size, size - pos);
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<radix_sorti>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %esi,%ebp
  call   <radix_sortu@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L15
  test   %ebp,%ebp
  je     L15
  mov    %ebp,%ecx
  mov    $0x0,%eax
L44:
  mov    %eax,%edx
  cmpl   $0x0,(%rbx,%rax,4)
  js     L18
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L44
L15:
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L18:
  cmp    %eax,%ebp
  jbe    L15
  mov    %ebp,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  mov    %ebp,%esi
  mov    %rbx,%rdi
  call   <rotatei@plt>
  jmp    L15
```

assistant: ```c
int radix_sorti(int *data, unsigned size, unsigned radix) {
  unsigned pos;
  int res;
  if ((res = radix_sortu((unsigned *)data, size, radix)) != 0)
    return res;
  for (pos = 0; pos < size; ++pos) {
    if (data[pos] < 0)
      break;
  }
  if (pos < size)
    rotatei(data, size, size - pos);
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<radix_sorti>:
  endbr64
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  call   <radix_sortu@plt>
  mov    %eax,%r13d
  test   %eax,%eax
  jne    L13
  test   %r12d,%r12d
  je     L13
  mov    %r12d,%ecx
  xor    %edx,%edx
  jmp    L46
  nopw   0x0(%rax,%rax,1)
L35:
  add    $0x1,%rdx
  cmp    %rcx,%rdx
  je     L13
L46:
  mov    0x0(%rbp,%rdx,4),%eax
  mov    %edx,%edi
  test   %eax,%eax
  jns    L35
  mov    %r12d,%edx
  mov    %r12d,%esi
  sub    %edi,%edx
  mov    %rbp,%rdi
  call   <rotatei@plt>
L13:
  mov    %r13d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
int radix_sorti(int *data, unsigned size, unsigned radix) {
  unsigned pos;
  int res;
  if ((res = radix_sortu((unsigned *)data, size, radix)) != 0)
    return res;
  for (pos = 0; pos < size; ++pos) {
    if (data[pos] < 0)
      break;
  }
  if (pos < size)
    rotatei(data, size, size - pos);
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<radix_sorti>:
  endbr64
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  call   <radix_sortu@plt>
  mov    %eax,%r13d
  test   %eax,%eax
  jne    L7
  test   %r12d,%r12d
  je     L7
  mov    %r12d,%ecx
  xor    %edx,%edx
  jmp    L45
  nopw   0x0(%rax,%rax,1)
L34:
  add    $0x1,%rdx
  cmp    %rcx,%rdx
  je     L7
L45:
  mov    0x0(%rbp,%rdx,4),%eax
  mov    %edx,%edi
  test   %eax,%eax
  jns    L34
  mov    %r12d,%edx
  mov    %r12d,%esi
  sub    %edi,%edx
  mov    %rbp,%rdi
  call   <rotatei@plt>
L7:
  mov    %r13d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
int radix_sorti(int *data, unsigned size, unsigned radix) {
  unsigned pos;
  int res;
  if ((res = radix_sortu((unsigned *)data, size, radix)) != 0)
    return res;
  for (pos = 0; pos < size; ++pos) {
    if (data[pos] < 0)
      break;
  }
  if (pos < size)
    rotatei(data, size, size - pos);
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<Tcl_DbCkfree>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %edx,-0x14(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  leave
  ret
```

assistant: ```c
int Tcl_DbCkfree(ptr, file, line)
char *ptr;
char *file;
int line;
{
  free(ptr);
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<Tcl_DbCkfree>:
  endbr64
  sub    $0x8,%rsp
  call   <free@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int Tcl_DbCkfree(ptr, file, line)
char *ptr;
char *file;
int line;
{
  free(ptr);
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<Tcl_DbCkfree>:
  endbr64
  sub    $0x8,%rsp
  call   <free@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int Tcl_DbCkfree(ptr, file, line)
char *ptr;
char *file;
int line;
{
  free(ptr);
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<Tcl_DbCkfree>:
  endbr64
  sub    $0x8,%rsp
  call   <free@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int Tcl_DbCkfree(ptr, file, line)
char *ptr;
char *file;
int line;
{
  free(ptr);
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<macros_parse_token>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  mov    %rsi,%r12
  mov    %ecx,%r14d
  mov    $0x0,%ebx
  lea    -0x1(%rdx),%r13d
  jmp    L65
L63:
  test   %ebx,%ebx
  je     L65
  cmp    $0x1,%r14d
  je     L38
L11:
  mov    %rbp,%rdi
  call   <tokens_get_char@plt>
  cmp    $0x20,%al
  je     L11
  cmp    $0x9,%al
  je     L11
  cmp    $0x28,%al
  je     L20
  movsbl %al,%esi
  mov    %rbp,%rdi
  call   <tokens_unget_char@plt>
L21:
  movslq %ebx,%rbx
  movb   $0x0,(%r12,%rbx,1)
  mov    $0x0,%eax
L15:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L38:
  movslq %ebx,%rbx
  movb   $0x0,(%r12,%rbx,1)
  mov    $0x0,%eax
  jmp    L15
L20:
  movslq %ebx,%rbx
  movb   $0x0,(%r12,%rbx,1)
  mov    $0x1,%eax
  jmp    L15
L101:
  movslq %ebx,%rdx
  mov    %al,(%r12,%rdx,1)
  lea    0x1(%rbx),%ebx
L105:
  cmp    %ebx,%r13d
  je     L21
L65:
  mov    %rbp,%rdi
  call   <tokens_get_char@plt>
  cmp    $0x20,%al
  je     L63
  cmp    $0x9,%al
  je     L63
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  jbe    L101
  cmp    $0x5f,%al
  je     L101
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L131
  test   %ebx,%ebx
  je     L19
  movslq %ebx,%rdx
  mov    %al,(%r12,%rdx,1)
  lea    0x1(%rbx),%ebx
  jmp    L105
L19:
  mov    %rbp,%rsi
  lea    D2(%rip),%rdi
  call   <print_error@plt>
  mov    $0xffffffff,%eax
  jmp    L15
L131:
  cmp    $0x28,%al
  je     L55
  movsbl %al,%esi
  mov    %rbp,%rdi
  call   <tokens_unget_char@plt>
  jmp    L21
L55:
  movslq %ebx,%rbx
  movb   $0x0,(%r12,%rbx,1)
  mov    $0x1,%eax
  jmp    L15
```

tool_calls: name: disassemble_data
arguments: label: D2
type: string

tool: D2: Bad macro name

assistant: ```c
int macros_parse_token(struct _asm_context *asm_context, char *token, int len, int macro_type) {
  int ptr = 0;
  char ch;
  while (1) {
    ch = tokens_get_char(asm_context);
    if (ch == '\t') {
      ch = ' ';
    }
    if (ch == ' ') {
      if (ptr == 0) {
        continue;
      }
      if (macro_type == 1) {
        token[ptr] = 0;
        return 0;
      }
      while (1) {
        ch = tokens_get_char(asm_context);
        if (ch == '\t') {
          ch = ' ';
        }
        if (ch == ' ') {
          continue;
        }
        if (ch == '(') {
          token[ptr] = 0;
          return 1;
        }
        tokens_unget_char(asm_context, ch);
        break;
      }
      break;
    }
    if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '_') {
      token[ptr++] = ch;
    } else if (ch >= '0' && ch <= '9') {
      if (ptr == 0) {
        print_error("Bad macro name", asm_context);
        return -1;
      }
      token[ptr++] = ch;
    } else if (ch == '(') {
      token[ptr] = 0;
      return 1;
    } else {
      tokens_unget_char(asm_context, ch);
      break;
    }
    if (ptr == len - 1) {
      break;
    }
  }
  token[ptr] = 0;
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<macros_parse_token>:
  endbr64
  push   %r14
  mov    %rdi,%r14
  push   %r13
  lea    -0x1(%rdx),%r13d
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  xor    %ebx,%ebx
L85:
  mov    %r14,%rdi
  call   <tokens_get_char@plt>
  cmp    $0x9,%al
  je     L26
  cmp    $0x20,%al
  je     L26
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  jbe    L150
  cmp    $0x5f,%al
  jne    L7
L150:
  movslq %ebx,%rdx
  add    $0x1,%ebx
  mov    %al,0x0(%rbp,%rdx,1)
  cmp    %ebx,%r13d
  jne    L85
  movslq %r13d,%rbx
  jmp    L140
L26:
  test   %ebx,%ebx
  je     L85
  movslq %ebx,%rbx
  lea    0x0(%rbp,%rbx,1),%r13
  cmp    $0x1,%r12d
  je     L2
L143:
  mov    %r14,%rdi
  call   <tokens_get_char@plt>
  cmp    $0x20,%al
  je     L143
  cmp    $0x9,%al
  je     L143
  cmp    $0x28,%al
  je     L56
  movsbl %al,%esi
  mov    %r14,%rdi
  call   <tokens_unget_char@plt>
L140:
  movb   $0x0,0x0(%rbp,%rbx,1)
  xor    %eax,%eax
L149:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L7:
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L77
  test   %ebx,%ebx
  jne    L150
  mov    %r14,%rsi
  lea    D0(%rip),%rdi
  call   <print_error@plt>
  mov    $0xffffffff,%eax
  jmp    L149
  nopw   0x0(%rax,%rax,1)
L56:
  movb   $0x0,0x0(%r13)
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L2:
  movb   $0x0,0x0(%r13)
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L77:
  cmp    $0x28,%al
  je     L126
  movsbl %al,%esi
  mov    %r14,%rdi
  movslq %ebx,%rbx
  call   <tokens_unget_char@plt>
  jmp    L140
L126:
  movslq %ebx,%rbx
  mov    $0x1,%eax
  movb   $0x0,0x0(%rbp,%rbx,1)
  jmp    L149
```

tool_calls: name: read_data
arguments: tag: D0
type: string

tool: D0: Bad macro name

assistant: ```c
int macros_parse_token(struct _asm_context *asm_context, char *token, int len, int macro_type) {
  int ptr = 0;
  char ch;
  while (1) {
    ch = tokens_get_char(asm_context);
    if (ch == '\t') {
      ch = ' ';
    }
    if (ch == ' ') {
      if (ptr == 0) {
        continue;
      }
      if (macro_type == 1) {
        token[ptr] = 0;
        return 0;
      }
      while (1) {
        ch = tokens_get_char(asm_context);
        if (ch == '\t') {
          ch = ' ';
        }
        if (ch == ' ') {
          continue;
        }
        if (ch == '(') {
          token[ptr] = 0;
          return 1;
        }
        tokens_unget_char(asm_context, ch);
        break;
      }
      break;
    }
    if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '_') {
      token[ptr++] = ch;
    } else if (ch >= '0' && ch <= '9') {
      if (ptr == 0) {
        print_error("Bad macro name", asm_context);
        return -1;
      }
      token[ptr++] = ch;
    } else if (ch == '(') {
      token[ptr] = 0;
      return 1;
    } else {
      tokens_unget_char(asm_context, ch);
      break;
    }
    if (ptr == len - 1) {
      break;
    }
  }
  token[ptr] = 0;
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<macros_parse_token>:
  endbr64
  push   %r14
  mov    %rdi,%r14
  push   %r13
  lea    -0x1(%rdx),%r13d
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  xor    %ebx,%ebx
L117:
  mov    %r14,%rdi
  call   <tokens_get_char@plt>
  cmp    $0x9,%al
  je     L39
  cmp    $0x20,%al
  je     L39
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  jbe    L139
  cmp    $0x5f,%al
  jne    L14
L139:
  movslq %ebx,%rdx
  add    $0x1,%ebx
  mov    %al,0x0(%rbp,%rdx,1)
  cmp    %ebx,%r13d
  jne    L117
  movslq %r13d,%rbx
  jmp    L154
L39:
  test   %ebx,%ebx
  je     L117
  movslq %ebx,%rbx
  lea    0x0(%rbp,%rbx,1),%r13
  cmp    $0x1,%r12d
  je     L135
L38:
  mov    %r14,%rdi
  call   <tokens_get_char@plt>
  cmp    $0x20,%al
  je     L38
  cmp    $0x9,%al
  je     L38
  cmp    $0x28,%al
  je     L12
  movsbl %al,%esi
  mov    %r14,%rdi
  call   <tokens_unget_char@plt>
L154:
  movb   $0x0,0x0(%rbp,%rbx,1)
  xor    %eax,%eax
L124:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L14:
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L67
  test   %ebx,%ebx
  jne    L139
  mov    %r14,%rsi
  lea    D4(%rip),%rdi
  call   <print_error@plt>
  mov    $0xffffffff,%eax
  jmp    L124
  nopw   0x0(%rax,%rax,1)
L12:
  movb   $0x0,0x0(%r13)
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L135:
  movb   $0x0,0x0(%r13)
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L67:
  cmp    $0x28,%al
  je     L99
  movsbl %al,%esi
  mov    %r14,%rdi
  movslq %ebx,%rbx
  call   <tokens_unget_char@plt>
  jmp    L154
L99:
  movslq %ebx,%rbx
  mov    $0x1,%eax
  movb   $0x0,0x0(%rbp,%rbx,1)
  jmp    L124
```

tool_calls: name: retrieve_data
arguments: tag: D4
type_infered: string

tool: D4: Bad macro name

assistant: ```c
int macros_parse_token(struct _asm_context *asm_context, char *token, int len, int macro_type) {
  int ptr = 0;
  char ch;
  while (1) {
    ch = tokens_get_char(asm_context);
    if (ch == '\t') {
      ch = ' ';
    }
    if (ch == ' ') {
      if (ptr == 0) {
        continue;
      }
      if (macro_type == 1) {
        token[ptr] = 0;
        return 0;
      }
      while (1) {
        ch = tokens_get_char(asm_context);
        if (ch == '\t') {
          ch = ' ';
        }
        if (ch == ' ') {
          continue;
        }
        if (ch == '(') {
          token[ptr] = 0;
          return 1;
        }
        tokens_unget_char(asm_context, ch);
        break;
      }
      break;
    }
    if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '_') {
      token[ptr++] = ch;
    } else if (ch >= '0' && ch <= '9') {
      if (ptr == 0) {
        print_error("Bad macro name", asm_context);
        return -1;
      }
      token[ptr++] = ch;
    } else if (ch == '(') {
      token[ptr] = 0;
      return 1;
    } else {
      tokens_unget_char(asm_context, ch);
      break;
    }
    if (ptr == len - 1) {
      break;
    }
  }
  token[ptr] = 0;
  return 0;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<skip_token>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  jmp    L42
L18:
  addq   $0x1,-0x8(%rbp)
L42:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L12
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L12
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  je     L12
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L18
L12:
  mov    -0x8(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
char *skip_token(char *c) {
  while (*c && (*c != ' ') && (*c != '\t') && (*c != '='))
    c++;
  return c;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<skip_token>:
  endbr64
  movzbl (%rdi),%edx
  cmp    $0x3d,%dl
  ja     L10
  mov    %rdi,%rax
  movabs $0x2000000100000201,%rcx
  bt     %rdx,%rcx
  jb     L15
L10:
  mov    %rdi,%rax
  movabs $0x2000000100000201,%rcx
L2:
  add    $0x1,%rax
  movzbl (%rax),%edx
  cmp    $0x3d,%dl
  ja     L2
  bt     %rdx,%rcx
  jae    L2
L15:
  ret
```

assistant: ```c
char *skip_token(char *c) {
  while (*c && (*c != ' ') && (*c != '\t') && (*c != '='))
    c++;
  return c;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<skip_token>:
  endbr64
  movzbl (%rdi),%edx
  cmp    $0x3d,%dl
  ja     L25
  movabs $0xdffffffefffffdfe,%rcx
  mov    %rdi,%rax
  bt     %rdx,%rcx
  jae    L7
L25:
  movabs $0xdffffffefffffdfe,%rcx
  mov    %rdi,%rax
  nopl   0x0(%rax)
L39:
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  cmp    $0x3d,%dl
  ja     L39
  bt     %rdx,%rcx
  jb     L39
L7:
  ret
```

assistant: ```c
char *skip_token(char *c) {
  while (*c && (*c != ' ') && (*c != '\t') && (*c != '='))
    c++;
  return c;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<skip_token>:
  endbr64
  movzbl (%rdi),%edx
  cmp    $0x3d,%dl
  ja     L30
  movabs $0xdffffffefffffdfe,%rcx
  mov    %rdi,%rax
  bt     %rdx,%rcx
  jae    L10
L30:
  movabs $0xdffffffefffffdfe,%rcx
  mov    %rdi,%rax
  nopl   0x0(%rax)
L3:
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  cmp    $0x3d,%dl
  ja     L3
  bt     %rdx,%rcx
  jb     L3
L10:
  ret
```

assistant: ```c
char *skip_token(char *c) {
  while (*c && (*c != ' ') && (*c != '\t') && (*c != '='))
    c++;
  return c;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x28(%rbp),%rcx
  lea    -0x30(%rbp),%rdx
  lea    -0x38(%rbp),%rax
  mov    %rax,%rsi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movsd  -0x30(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm2
  movsd  D38(%rip),%xmm1
  mulsd  %xmm1,%xmm2
  movsd  -0x28(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  movsd  -0x30(%rbp),%xmm2
  movsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  -0x38(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movq   D2(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x20(%rbp),%xmm1
  movsd  -0x38(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x38(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L25
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L45
L25:
  pxor   %xmm0,%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L20
L45:
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L5
L20:
  movsd  -0x10(%rbp),%xmm0
  mov    -0x18(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
L5:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L11
  call   <__stack_chk_fail@plt>
L11:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D15
type_infered: string
name: unpack_data
arguments: data_label: D38
type_infered: byte[8]
name: unpack_data
arguments: data_label: D2
type_infered: byte[8]
name: unpack_data
arguments: data_label: D36
type_infered: string
name: unpack_data
arguments: data_label: D17
type_infered: string

tool: D15: %lf %lf %lf

tool: {"D38": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40]}

tool: {"D2": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

tool: D36: Impossivel calcular

tool: D17: R1 = %.5f
R2 = %.5f


assistant: ```c
int main(void) {
  double a, b, c, delta, x, x2;
  scanf("%lf %lf %lf", &a, &b, &c);
  delta = sqrt((b * b) - (4 * a * c));
  x = ((-b) + delta) / (2 * a);
  x2 = ((-b) - delta) / (2 * a);
  if (a == 0 || delta < 0)
    printf("Impossivel calcular\n");
  else
    printf("R1 = %.5f\nR2 = %.5f\n", x, x2);
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rcx
  lea    0x8(%rsp),%rdx
  mov    %rsp,%rsi
  lea    D23(%rip),%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%rbp
  mov    (%rsp),%rbx
  movq   %rbp,%xmm0
  mulsd  %xmm0,%xmm0
  movq   %rbx,%xmm1
  mulsd  D29(%rip),%xmm1
  mulsd  0x10(%rsp),%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L1
  sqrtsd %xmm0,%xmm0
L10:
  movq   %rbx,%xmm4
  ucomisd D35(%rip),%xmm4
  jp     L2
  je     L32
L2:
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  jbe    L44
L32:
  lea    D34(%rip),%rdi
  call   <puts@plt>
L16:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  mov    $0x0,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
L1:
  call   <sqrt@plt>
  jmp    L10
L44:
  movq   %rbx,%xmm2
  addsd  %xmm2,%xmm2
  movq   %rbp,%xmm1
  xorpd  D36(%rip),%xmm1
  subsd  %xmm0,%xmm1
  movq   %rbp,%xmm7
  subsd  %xmm7,%xmm0
  divsd  %xmm2,%xmm0
  divsd  %xmm2,%xmm1
  lea    D17(%rip),%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  jmp    L16
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D23
data_type: string
name: unpack_data
arguments: tag: D29
data_type: byte[8]
name: unpack_data
arguments: tag: D35
data_type: byte[8]
name: unpack_data
arguments: tag: D34
data_type: string
name: unpack_data
arguments: tag: D36
data_type: byte[16]
name: unpack_data
arguments: tag: D17
data_type: string

tool: D23: %lf %lf %lf

tool: {"D29": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40]}

tool: {"D35": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D34: Impossivel calcular

tool: {"D36": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D17: R1 = %.5f
R2 = %.5f


assistant: ```c
int main(void) {
  double a, b, c, delta, x, x2;
  scanf("%lf %lf %lf", &a, &b, &c);
  delta = sqrt((b * b) - (4 * a * c));
  x = ((-b) + delta) / (2 * a);
  x2 = ((-b) - delta) / (2 * a);
  if (a == 0 || delta < 0)
    printf("Impossivel calcular\n");
  else
    printf("R1 = %.5f\nR2 = %.5f\n", x, x2);
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<main>:
  endbr64
  sub    $0x38,%rsp
  lea    D1(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%rcx
  lea    0x18(%rsp),%rdx
  lea    0x10(%rsp),%rsi
  call   <scanf@plt>
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm1
  movsd  D6(%rip),%xmm2
  movapd %xmm3,%xmm0
  mulsd  %xmm1,%xmm2
  mulsd  0x20(%rsp),%xmm2
  mulsd  %xmm3,%xmm0
  subsd  %xmm2,%xmm0
  pxor   %xmm2,%xmm2
  ucomisd %xmm0,%xmm2
  ja     L14
  sqrtsd %xmm0,%xmm0
L42:
  ucomisd %xmm2,%xmm1
  jp     L11
  je     L64
L11:
  comisd %xmm0,%xmm2
  jbe    L55
L64:
  lea    D12(%rip),%rdi
  call   <puts@plt>
L37:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L27
  xor    %eax,%eax
  add    $0x38,%rsp
  ret
L55:
  addsd  %xmm1,%xmm1
  lea    D40(%rip),%rdi
  mov    $0x2,%eax
  movapd %xmm1,%xmm2
  movapd %xmm3,%xmm1
  xorpd  D48(%rip),%xmm1
  subsd  %xmm0,%xmm1
  subsd  %xmm3,%xmm0
  divsd  %xmm2,%xmm1
  divsd  %xmm2,%xmm0
  call   <printf@plt>
  jmp    L37
L14:
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm3,(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm3
  pxor   %xmm2,%xmm2
  jmp    L42
L27:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D1
type_guessed: string
name: unpack_data
arguments: data_tag: D6
type_guessed: byte[8]
name: unpack_data
arguments: data_tag: D12
type_guessed: string
name: unpack_data
arguments: data_tag: D40
type_guessed: string
name: unpack_data
arguments: data_tag: D48
type_guessed: byte[16]

tool: D1: %lf %lf %lf

tool: {"D6": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40]}

tool: D12: Impossivel calcular

tool: D40: R1 = %.5f
R2 = %.5f


tool: {"D48": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
int main(void) {
  double a, b, c, delta, x, x2;
  scanf("%lf %lf %lf", &a, &b, &c);
  delta = sqrt((b * b) - (4 * a * c));
  x = ((-b) + delta) / (2 * a);
  x2 = ((-b) - delta) / (2 * a);
  if (a == 0 || delta < 0)
    printf("Impossivel calcular\n");
  else
    printf("R1 = %.5f\nR2 = %.5f\n", x, x2);
  return 0;
}
```