ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<chebev>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  movss  %xmm0,0x4(%rsp)
  movss  %xmm1,0x8(%rsp)
  mov    %rdi,%rbp
  mov    %esi,%ebx
  movaps %xmm2,%xmm5
  movss  %xmm2,0xc(%rsp)
  movaps %xmm2,%xmm6
  subss  %xmm0,%xmm6
  movaps %xmm6,%xmm0
  subss  %xmm1,%xmm5
  mulss  %xmm5,%xmm0
  comiss D21(%rip),%xmm0
  ja     L32
L44:
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  addsd  %xmm1,%xmm1
  movss  0x4(%rsp),%xmm6
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm6,%xmm0
  subsd  %xmm0,%xmm1
  movss  0x8(%rsp),%xmm7
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm7,%xmm0
  subsd  %xmm0,%xmm1
  movaps %xmm7,%xmm0
  subss  %xmm6,%xmm0
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm0,%xmm1
  cvtsd2ss %xmm1,%xmm1
  movaps %xmm1,%xmm4
  addss  %xmm1,%xmm4
  lea    -0x1(%rbx),%eax
  test   %eax,%eax
  jle    L37
  cltq
  pxor   %xmm3,%xmm3
  movaps %xmm3,%xmm2
  jmp    L35
L32:
  lea    D17(%rip),%rdi
  call   <nrerror@plt>
  jmp    L44
L19:
  movaps %xmm0,%xmm2
L35:
  movaps %xmm4,%xmm0
  mulss  %xmm2,%xmm0
  subss  %xmm3,%xmm0
  addss  0x0(%rbp,%rax,4),%xmm0
  sub    $0x1,%rax
  movaps %xmm2,%xmm3
  test   %eax,%eax
  jg     L19
L18:
  mulss  %xmm0,%xmm1
  subss  %xmm2,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x0(%rbp),%xmm1
  mulsd  D21(%rip),%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  ret
L37:
  pxor   %xmm2,%xmm2
  movaps %xmm2,%xmm0
  jmp    L18
```

tool_calls: name: read_data
arguments: data_label: D21
datatype: f64
name: read_data
arguments: data_label: D17
datatype: string

tool: D21: 0.5

tool: D17: x not in range in routine chebev

assistant: ```c
float chebev(float a, float b, float c[], int m, float x) {
  void nrerror(char error_text[]);
  float d = 0.0, dd = 0.0, sv, y, y2;
  int j;
  if ((x - a) * (x - b) > 0.0)
    nrerror("x not in range in routine chebev");
  y2 = 2.0 * (y = (2.0 * x - a - b) / (b - a));
  for (j = m - 1; j >= 1; j--) {
    sv = d;
    d = y2 * d - dd + c[j];
    dd = sv;
  }
  return y * d - dd + 0.5 * c[0];
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<chebev>:
  endbr64
  movaps %xmm0,%xmm3
  movaps %xmm2,%xmm4
  movaps %xmm1,%xmm0
  push   %rbp
  movaps %xmm2,%xmm1
  subss  %xmm0,%xmm4
  push   %rbx
  pxor   %xmm5,%xmm5
  subss  %xmm3,%xmm1
  mov    %rdi,%rbp
  mov    %esi,%ebx
  sub    $0x18,%rsp
  mulss  %xmm4,%xmm1
  comiss %xmm5,%xmm1
  jbe    L44
  lea    D6(%rip),%rdi
  movss  %xmm2,0xc(%rsp)
  movss  %xmm0,0x8(%rsp)
  movss  %xmm3,0x4(%rsp)
  call   <nrerror@plt>
  movss  0xc(%rsp),%xmm2
  movss  0x8(%rsp),%xmm0
  movss  0x4(%rsp),%xmm3
L44:
  cvtss2sd %xmm2,%xmm2
  addsd  %xmm2,%xmm2
  pxor   %xmm4,%xmm4
  lea    -0x1(%rbx),%eax
  cvtss2sd %xmm3,%xmm4
  movapd %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  subsd  %xmm4,%xmm1
  cvtss2sd %xmm0,%xmm2
  subss  %xmm3,%xmm0
  subsd  %xmm2,%xmm1
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm0,%xmm1
  cvtsd2ss %xmm1,%xmm1
  movaps %xmm1,%xmm4
  addss  %xmm1,%xmm4
  test   %eax,%eax
  jle    L27
  pxor   %xmm3,%xmm3
  cltq
  movaps %xmm3,%xmm2
  jmp    L15
  nopl   (%rax)
L6:
  movaps %xmm0,%xmm2
L15:
  movaps %xmm4,%xmm0
  mulss  %xmm2,%xmm0
  subss  %xmm3,%xmm0
  addss  0x0(%rbp,%rax,4),%xmm0
  sub    $0x1,%rax
  movaps %xmm2,%xmm3
  test   %eax,%eax
  jg     L6
L18:
  mulss  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd 0x0(%rbp),%xmm0
  mulsd  D9(%rip),%xmm0
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  subss  %xmm2,%xmm1
  cvtss2sd %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  ret
  nopl   0x0(%rax,%rax,1)
L27:
  pxor   %xmm2,%xmm2
  movaps %xmm2,%xmm0
  jmp    L18
```

tool_calls: name: extract_symbolic_data
arguments: label: D6
type: string
name: extract_symbolic_data
arguments: label: D9
type: f64

tool: D6: x not in range in routine chebev

tool: D9: 0.5

assistant: ```c
float chebev(float a, float b, float c[], int m, float x) {
  void nrerror(char error_text[]);
  float d = 0.0, dd = 0.0, sv, y, y2;
  int j;
  if ((x - a) * (x - b) > 0.0)
    nrerror("x not in range in routine chebev");
  y2 = 2.0 * (y = (2.0 * x - a - b) / (b - a));
  for (j = m - 1; j >= 1; j--) {
    sv = d;
    d = y2 * d - dd + c[j];
    dd = sv;
  }
  return y * d - dd + 0.5 * c[0];
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<chebev>:
  endbr64
  movaps %xmm0,%xmm3
  movaps %xmm2,%xmm4
  movaps %xmm1,%xmm0
  push   %rbp
  movaps %xmm2,%xmm1
  subss  %xmm0,%xmm4
  push   %rbx
  pxor   %xmm5,%xmm5
  subss  %xmm3,%xmm1
  mov    %rdi,%rbp
  mov    %esi,%ebx
  sub    $0x18,%rsp
  mulss  %xmm4,%xmm1
  comiss %xmm5,%xmm1
  jbe    L46
  lea    D12(%rip),%rdi
  movss  %xmm2,0xc(%rsp)
  movss  %xmm0,0x8(%rsp)
  movss  %xmm3,0x4(%rsp)
  call   <nrerror@plt>
  movss  0xc(%rsp),%xmm2
  movss  0x8(%rsp),%xmm0
  movss  0x4(%rsp),%xmm3
L46:
  cvtss2sd %xmm2,%xmm2
  addsd  %xmm2,%xmm2
  pxor   %xmm4,%xmm4
  lea    -0x1(%rbx),%eax
  cvtss2sd %xmm3,%xmm4
  movapd %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  subsd  %xmm4,%xmm1
  cvtss2sd %xmm0,%xmm2
  subss  %xmm3,%xmm0
  subsd  %xmm2,%xmm1
  cvtss2sd %xmm0,%xmm0
  divsd  %xmm0,%xmm1
  cvtsd2ss %xmm1,%xmm1
  movaps %xmm1,%xmm4
  addss  %xmm1,%xmm4
  test   %eax,%eax
  jle    L19
  pxor   %xmm3,%xmm3
  cltq
  movaps %xmm3,%xmm2
  jmp    L47
  nopl   (%rax)
L45:
  movaps %xmm0,%xmm2
L47:
  movaps %xmm4,%xmm0
  mulss  %xmm2,%xmm0
  subss  %xmm3,%xmm0
  addss  0x0(%rbp,%rax,4),%xmm0
  sub    $0x1,%rax
  movaps %xmm2,%xmm3
  test   %eax,%eax
  jg     L45
L25:
  mulss  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd 0x0(%rbp),%xmm0
  mulsd  D14(%rip),%xmm0
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  subss  %xmm2,%xmm1
  cvtss2sd %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  ret
  nopl   0x0(%rax,%rax,1)
L19:
  pxor   %xmm2,%xmm2
  movaps %xmm2,%xmm0
  jmp    L25
```

tool_calls: name: retrieve_data
arguments: tag: D12
datatype: string
name: retrieve_data
arguments: tag: D14
datatype: f64

tool: D12: x not in range in routine chebev

tool: D14: 0.5

assistant: ```c
float chebev(float a, float b, float c[], int m, float x) {
  void nrerror(char error_text[]);
  float d = 0.0, dd = 0.0, sv, y, y2;
  int j;
  if ((x - a) * (x - b) > 0.0)
    nrerror("x not in range in routine chebev");
  y2 = 2.0 * (y = (2.0 * x - a - b) / (b - a));
  for (j = m - 1; j >= 1; j--) {
    sv = d;
    d = y2 * d - dd + c[j];
    dd = sv;
  }
  return y * d - dd + 0.5 * c[0];
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<getLevel>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L16
L10:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  jne    L11
  addl   $0x1,-0x4(%rbp)
L11:
  addq   $0x1,-0x18(%rbp)
L16:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  je     L10
  mov    -0x4(%rbp),%eax
  leave
  ret
```

assistant: ```c
extern int getLevel(char *str) {
  int rValue = 0;
  while (!isalpha(*str)) {
    if (*str == '\t')
      rValue++;
    str++;
  }
  return rValue;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<getLevel>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    $0x0,%ebp
  jmp    L10
L2:
  cmpb   $0x9,(%rbx)
  sete   %al
  movzbl %al,%eax
  add    %eax,%ebp
  add    $0x1,%rbx
L10:
  movsbl (%rbx),%edi
  call   <isalpha@plt>
  test   %eax,%eax
  je     L2
  mov    %ebp,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
extern int getLevel(char *str) {
  int rValue = 0;
  while (!isalpha(*str)) {
    if (*str == '\t')
      rValue++;
    str++;
  }
  return rValue;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<getLevel>:
  endbr64
  push   %r12
  xor    %r12d,%r12d
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  jmp    L1
  nopl   0x0(%rax,%rax,1)
L12:
  xor    %eax,%eax
  cmpb   $0x9,(%rbx)
  sete   %al
  add    $0x1,%rbx
  add    %eax,%r12d
L1:
  movsbl (%rbx),%edi
  call   <isalpha@plt>
  test   %eax,%eax
  je     L12
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %r12
  ret
```

assistant: ```c
extern int getLevel(char *str) {
  int rValue = 0;
  while (!isalpha(*str)) {
    if (*str == '\t')
      rValue++;
    str++;
  }
  return rValue;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<getLevel>:
  endbr64
  push   %r12
  xor    %r12d,%r12d
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  jmp    L6
  nopl   0x0(%rax,%rax,1)
L10:
  xor    %eax,%eax
  cmpb   $0x9,(%rbx)
  sete   %al
  add    $0x1,%rbx
  add    %eax,%r12d
L6:
  movsbl (%rbx),%edi
  call   <isalpha@plt>
  test   %eax,%eax
  je     L10
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %r12
  ret
```

assistant: ```c
extern int getLevel(char *str) {
  int rValue = 0;
  while (!isalpha(*str)) {
    if (*str == '\t')
      rValue++;
    str++;
  }
  return rValue;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<getop>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jne    L18
  mov    D5(%rip),%rax
  mov    (%rax),%eax
  jmp    L51
L18:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  nop
L22:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L22
  cmpl   $0x9,-0xc(%rbp)
  je     L22
  addq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0xc(%rbp),%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L57
  cmpl   $0x2e,-0xc(%rbp)
  je     L57
  mov    -0xc(%rbp),%eax
  jmp    L51
L57:
  mov    -0xc(%rbp),%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L59
  nop
L32:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    -0xc(%rbp),%edx
  mov    %dl,(%rax)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L32
L59:
  cmpl   $0x2e,-0xc(%rbp)
  jne    L36
  nop
L83:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    -0xc(%rbp),%edx
  mov    %dl,(%rax)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L83
L36:
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  mov    $0x30,%eax
L51:
  leave
  ret
```

assistant: ```c
int getop(char *s, int argc, char **argv) {
  if (argc == 0)
    return EOF;
  char *param = *argv;
  int c;
  while ((*s = c = *param++) == ' ' || c == '\t')
    ;
  *++s = '\0';
  if (!isdigit(c) && c != '.')
    return c;
  if (isdigit(c))
    while (isdigit(*s++ = c = *param++))
      ;
  if (c == '.')
    while (isdigit(*s++ = c = *param++))
      ;
  *s = '\0';
  return '0';
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<getop>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  test   %esi,%esi
  je     L55
  mov    %rdi,%r12
  mov    (%rdx),%rbx
L31:
  add    $0x1,%rbx
  movzbl -0x1(%rbx),%eax
  movsbl %al,%ebp
  mov    %al,(%r12)
  cmp    $0x9,%al
  je     L31
  cmp    $0x20,%al
  je     L31
  movb   $0x0,0x1(%r12)
  mov    %ebp,%edi
  call   <isdigit@plt>
  cmp    $0x2e,%ebp
  je     L99
  test   %rax,%rax
  je     L19
L99:
  add    $0x1,%r12
  mov    %ebp,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L23
L49:
  add    $0x1,%rbx
  movzbl -0x1(%rbx),%eax
  movsbl %al,%ebp
  add    $0x1,%r12
  mov    %al,-0x1(%r12)
  mov    %ebp,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L49
L23:
  cmp    $0x2e,%ebp
  je     L14
L47:
  movb   $0x0,(%r12)
  mov    $0x30,%ebp
  jmp    L19
L55:
  mov    D0(%rip),%rax
  mov    (%rax),%ebp
L19:
  mov    %ebp,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L14:
  add    $0x1,%rbx
  movzbl -0x1(%rbx),%edi
  add    $0x1,%r12
  mov    %dil,-0x1(%r12)
  movsbl %dil,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L14
  jmp    L47
```

assistant: ```c
int getop(char *s, int argc, char **argv) {
  if (argc == 0)
    return EOF;
  char *param = *argv;
  int c;
  while ((*s = c = *param++) == ' ' || c == '\t')
    ;
  *++s = '\0';
  if (!isdigit(c) && c != '.')
    return c;
  if (isdigit(c))
    while (isdigit(*s++ = c = *param++))
      ;
  if (c == '.')
    while (isdigit(*s++ = c = *param++))
      ;
  *s = '\0';
  return '0';
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<getop>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  test   %esi,%esi
  je     L54
  mov    (%rdx),%rbx
  nopl   0x0(%rax,%rax,1)
L36:
  movsbl (%rbx),%r12d
  add    $0x1,%rbx
  mov    %r12b,(%rdi)
  cmp    $0x9,%r12b
  je     L36
  cmp    $0x20,%r12b
  je     L36
  movb   $0x0,0x1(%rdi)
  lea    0x1(%rdi),%rbp
  mov    %r12d,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L62
  cmp    $0x2e,%r12d
  je     L47
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L47:
  mov    $0x2e,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L72
  nopw   0x0(%rax,%rax,1)
L7:
  movsbl (%rbx),%r12d
  add    $0x1,%rbx
  add    $0x1,%rbp
  mov    %r12b,-0x1(%rbp)
L62:
  mov    %r12d,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L7
  cmp    $0x2e,%r12d
  je     L72
L74:
  mov    $0x30,%r12d
  movb   $0x0,0x0(%rbp)
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L72:
  movsbl (%rbx),%edi
  add    $0x1,%rbx
  add    $0x1,%rbp
  mov    %dil,-0x1(%rbp)
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L72
  jmp    L74
  nopl   0x0(%rax,%rax,1)
L54:
  mov    D2(%rip),%rax
  pop    %rbx
  pop    %rbp
  mov    (%rax),%r12d
  mov    %r12d,%eax
  pop    %r12
  ret
```

assistant: ```c
int getop(char *s, int argc, char **argv) {
  if (argc == 0)
    return EOF;
  char *param = *argv;
  int c;
  while ((*s = c = *param++) == ' ' || c == '\t')
    ;
  *++s = '\0';
  if (!isdigit(c) && c != '.')
    return c;
  if (isdigit(c))
    while (isdigit(*s++ = c = *param++))
      ;
  if (c == '.')
    while (isdigit(*s++ = c = *param++))
      ;
  *s = '\0';
  return '0';
}
```
user: Translate the below assembly code into C programming language:

```asm
<getop>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  test   %esi,%esi
  je     L25
  mov    (%rdx),%rbx
  nopl   0x0(%rax,%rax,1)
L17:
  movsbl (%rbx),%r12d
  add    $0x1,%rbx
  mov    %r12b,(%rdi)
  cmp    $0x9,%r12b
  je     L17
  cmp    $0x20,%r12b
  je     L17
  movb   $0x0,0x1(%rdi)
  lea    0x1(%rdi),%rbp
  mov    %r12d,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L8
  cmp    $0x2e,%r12d
  je     L11
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L11:
  mov    $0x2e,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L31
  nopw   0x0(%rax,%rax,1)
L24:
  movsbl (%rbx),%r12d
  add    $0x1,%rbx
  add    $0x1,%rbp
  mov    %r12b,-0x1(%rbp)
L8:
  mov    %r12d,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L24
  cmp    $0x2e,%r12d
  je     L31
L45:
  mov    $0x30,%r12d
  movb   $0x0,0x0(%rbp)
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L31:
  movsbl (%rbx),%edi
  add    $0x1,%rbx
  add    $0x1,%rbp
  mov    %dil,-0x1(%rbp)
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L31
  jmp    L45
  nopl   0x0(%rax,%rax,1)
L25:
  mov    D3(%rip),%rax
  pop    %rbx
  pop    %rbp
  mov    (%rax),%r12d
  mov    %r12d,%eax
  pop    %r12
  ret
```

assistant: ```c
int getop(char *s, int argc, char **argv) {
  if (argc == 0)
    return EOF;
  char *param = *argv;
  int c;
  while ((*s = c = *param++) == ' ' || c == '\t')
    ;
  *++s = '\0';
  if (!isdigit(c) && c != '.')
    return c;
  if (isdigit(c))
    while (isdigit(*s++ = c = *param++))
      ;
  if (c == '.')
    while (isdigit(*s++ = c = *param++))
      ;
  *s = '\0';
  return '0';
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<fxpt_atan2>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  cmp    %rdi,%rsi
  jne    L11
  mov    %rdi,%rax
  sar    $0x3f,%rax
  and    $0xa000,%eax
  test   %rdi,%rdi
  mov    $0x2000,%edx
  cmovg  %edx,%eax
L1:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L11:
  mov    %rsi,%rbp
  call   <abs@plt>
  mov    %rax,%r12
  mov    %rbp,%rdi
  call   <abs@plt>
  cmp    %rax,%r12
  jge    L55
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <q15_div@plt>
  mov    %rax,%rbx
  mov    %rax,%rdi
  call   <abs@plt>
  mov    %rax,%rsi
  mov    $0xb1f,%edi
  call   <q15_mul@plt>
  mov    $0x2b1f,%edi
  sub    %rax,%rdi
  mov    %rbx,%rsi
  call   <q15_mul@plt>
  lea    0x8000(%rax),%edx
  test   %rbp,%rbp
  cmovle %edx,%eax
  jmp    L1
L55:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <q15_div@plt>
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <abs@plt>
  mov    %rax,%rsi
  mov    $0xb1f,%edi
  call   <q15_mul@plt>
  mov    $0x2b1f,%edi
  sub    %rax,%rdi
  mov    %rbp,%rsi
  call   <q15_mul@plt>
  mov    %rax,%rdx
  test   %rbx,%rbx
  jle    L0
  mov    $0x4000,%eax
  sub    %edx,%eax
  jmp    L1
L0:
  mov    $0xc000,%eax
  sub    %edx,%eax
  jmp    L1
```

assistant: ```c
int16_t fxpt_atan2(const int32_t y, const int32_t x) {
  static const int32_t k1 = 2847;
  static const int32_t k2 = 11039;
  if (x == y) {
    if (y > 0) {
      return 8192;
    } else if (y < 0) {
      return 40960;
    } else {
      return 0;
    }
  }
  const int32_t abs_y = abs(y), abs_x = abs(x);
  if (abs_x > abs_y) {
    const int32_t y_over_x = q15_div(y, x);
    const int32_t correction = q15_mul(k1, abs(y_over_x));
    const int32_t unrotated = q15_mul(k2 - correction, y_over_x);
    if (x > 0) {
      return unrotated;
    } else {
      return 32768 + unrotated;
    }
  } else {
    const int32_t x_over_y = q15_div(x, y);
    const int32_t correction = q15_mul(k1, abs(x_over_y));
    const int32_t unrotated = q15_mul(k2 - correction, x_over_y);
    if (y > 0) {
      return 16384 - unrotated;
    } else {
      return 49152 - unrotated;
    }
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<fxpt_atan2>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  cmp    %rdi,%rsi
  jne    L23
  mov    $0x2000,%eax
  test   %rsi,%rsi
  jg     L2
  neg    %rbp
  sbb    %eax,%eax
  and    $0xa000,%eax
L2:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L23:
  mov    %rdi,%r12
  call   <abs@plt>
  mov    %rbp,%rdi
  mov    %rax,%rbx
  call   <abs@plt>
  cmp    %rax,%rbx
  jge    L13
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <q15_div@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <abs@plt>
  mov    $0xb1f,%edi
  mov    %rax,%rsi
  call   <q15_mul@plt>
  mov    $0x2b1f,%edi
  mov    %r12,%rsi
  sub    %rax,%rdi
  call   <q15_mul@plt>
  test   %rbp,%rbp
  pop    %rbx
  pop    %rbp
  lea    0x8000(%rax),%edx
  pop    %r12
  cmovle %edx,%eax
  ret
  nopl   0x0(%rax)
L13:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <q15_div@plt>
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <abs@plt>
  mov    $0xb1f,%edi
  mov    %rax,%rsi
  call   <q15_mul@plt>
  mov    $0x2b1f,%edi
  mov    %rbp,%rsi
  sub    %rax,%rdi
  call   <q15_mul@plt>
  mov    %rax,%rdx
  test   %r12,%r12
  jle    L7
  mov    $0x4000,%eax
  pop    %rbx
  pop    %rbp
  sub    %edx,%eax
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L7:
  mov    $0xc000,%eax
  pop    %rbx
  pop    %rbp
  sub    %edx,%eax
  pop    %r12
  ret
```

assistant: ```c
int16_t fxpt_atan2(const int32_t y, const int32_t x) {
  static const int32_t k1 = 2847;
  static const int32_t k2 = 11039;
  if (x == y) {
    if (y > 0) {
      return 8192;
    } else if (y < 0) {
      return 40960;
    } else {
      return 0;
    }
  }
  const int32_t abs_y = abs(y), abs_x = abs(x);
  if (abs_x > abs_y) {
    const int32_t y_over_x = q15_div(y, x);
    const int32_t correction = q15_mul(k1, abs(y_over_x));
    const int32_t unrotated = q15_mul(k2 - correction, y_over_x);
    if (x > 0) {
      return unrotated;
    } else {
      return 32768 + unrotated;
    }
  } else {
    const int32_t x_over_y = q15_div(x, y);
    const int32_t correction = q15_mul(k1, abs(x_over_y));
    const int32_t unrotated = q15_mul(k2 - correction, x_over_y);
    if (y > 0) {
      return 16384 - unrotated;
    } else {
      return 49152 - unrotated;
    }
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<fxpt_atan2>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  cmp    %rdi,%rsi
  jne    L25
  mov    $0x2000,%eax
  test   %rsi,%rsi
  jg     L31
  neg    %rbp
  sbb    %eax,%eax
  and    $0xa000,%eax
L31:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L25:
  mov    %rdi,%r12
  call   <abs@plt>
  mov    %rbp,%rdi
  mov    %rax,%rbx
  call   <abs@plt>
  cmp    %rax,%rbx
  jge    L24
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <q15_div@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <abs@plt>
  mov    $0xb1f,%edi
  mov    %rax,%rsi
  call   <q15_mul@plt>
  mov    $0x2b1f,%edi
  mov    %r12,%rsi
  sub    %rax,%rdi
  call   <q15_mul@plt>
  test   %rbp,%rbp
  pop    %rbx
  pop    %rbp
  lea    0x8000(%rax),%edx
  pop    %r12
  cmovle %edx,%eax
  ret
  nopl   0x0(%rax)
L24:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <q15_div@plt>
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <abs@plt>
  mov    $0xb1f,%edi
  mov    %rax,%rsi
  call   <q15_mul@plt>
  mov    $0x2b1f,%edi
  mov    %rbp,%rsi
  sub    %rax,%rdi
  call   <q15_mul@plt>
  mov    %rax,%rdx
  test   %r12,%r12
  jle    L36
  mov    $0x4000,%eax
  pop    %rbx
  pop    %rbp
  sub    %edx,%eax
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L36:
  mov    $0xc000,%eax
  pop    %rbx
  pop    %rbp
  sub    %edx,%eax
  pop    %r12
  ret
```

assistant: ```c
int16_t fxpt_atan2(const int32_t y, const int32_t x) {
  static const int32_t k1 = 2847;
  static const int32_t k2 = 11039;
  if (x == y) {
    if (y > 0) {
      return 8192;
    } else if (y < 0) {
      return 40960;
    } else {
      return 0;
    }
  }
  const int32_t abs_y = abs(y), abs_x = abs(x);
  if (abs_x > abs_y) {
    const int32_t y_over_x = q15_div(y, x);
    const int32_t correction = q15_mul(k1, abs(y_over_x));
    const int32_t unrotated = q15_mul(k2 - correction, y_over_x);
    if (x > 0) {
      return unrotated;
    } else {
      return 32768 + unrotated;
    }
  } else {
    const int32_t x_over_y = q15_div(x, y);
    const int32_t correction = q15_mul(k1, abs(x_over_y));
    const int32_t unrotated = q15_mul(k2 - correction, x_over_y);
    if (y > 0) {
      return 16384 - unrotated;
    } else {
      return 49152 - unrotated;
    }
  }
}
```