ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<ip_sum_calc>:
  endbr64
  mov    %edi,%ecx
  mov    %rsi,%rdx
  test   %edi,%edi
  jle    L21
  lea    -0x1(%rdi),%eax
  mov    %eax,%edi
  shr    %edi
  add    $0x1,%edi
  cmp    $0x5,%eax
  jbe    L15
  mov    %rsi,%rax
  mov    %edi,%esi
  movdqa D16(%rip),%xmm4
  pxor   %xmm2,%xmm2
  shr    $0x2,%esi
  movdqa D2(%rip),%xmm3
  sub    $0x1,%esi
  shl    $0x5,%rsi
  lea    0x20(%rdx,%rsi,1),%rsi
  nopl   0x0(%rax)
L26:
  movdqu (%rax),%xmm1
  movdqu 0x10(%rax),%xmm5
  add    $0x20,%rax
  movdqa %xmm1,%xmm0
  shufps $0xdd,%xmm5,%xmm1
  pand   %xmm3,%xmm1
  shufps $0x88,%xmm5,%xmm0
  pslld  $0x8,%xmm0
  pand   %xmm4,%xmm0
  paddd  %xmm1,%xmm0
  paddd  %xmm0,%xmm2
  cmp    %rax,%rsi
  jne    L26
  movdqa %xmm2,%xmm0
  mov    %edi,%esi
  psrldq $0x8,%xmm0
  and    $0xfffffffc,%esi
  paddd  %xmm0,%xmm2
  lea    (%rsi,%rsi,1),%r8d
  movdqa %xmm2,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm2
  movd   %xmm2,%eax
  cmp    %edi,%esi
  je     L40
L68:
  movslq %r8d,%r9
  mov    (%rdx,%r9,4),%esi
  lea    0x0(,%r9,4),%rdi
  movzbl 0x4(%rdx,%r9,4),%r9d
  shl    $0x8,%esi
  movzwl %si,%esi
  add    %r9d,%esi
  add    %esi,%eax
  lea    0x2(%r8),%esi
  cmp    %esi,%ecx
  jle    L40
  mov    0x8(%rdx,%rdi,1),%esi
  movzbl 0xc(%rdx,%rdi,1),%r9d
  add    $0x4,%r8d
  shl    $0x8,%esi
  movzwl %si,%esi
  add    %r9d,%esi
  add    %esi,%eax
  cmp    %r8d,%ecx
  jle    L40
  mov    0x10(%rdx,%rdi,1),%ecx
  movzbl 0x14(%rdx,%rdi,1),%edx
  shl    $0x8,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  add    %edx,%eax
  jmp    L40
  nopl   0x0(%rax)
L80:
  movzwl %ax,%eax
  add    %edx,%eax
L40:
  mov    %eax,%edx
  sar    $0x10,%edx
  jne    L80
  not    %eax
  ret
  nop
L21:
  mov    $0xffffffff,%eax
  ret
L15:
  xor    %r8d,%r8d
  xor    %eax,%eax
  jmp    L68
```

tool_calls: name: extract_symbolic_data
arguments: label: D16
type_guessed: byte[16]
name: extract_symbolic_data
arguments: label: D2
type_guessed: byte[16]

tool: {"D16": [0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00]}

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

assistant: ```c
uint16_t ip_sum_calc(uint16_t len_ip_header, uint16_t buff[]) {
  uint16_t word16;
  uint32_t sum = 0;
  uint16_t i;
  for (i = 0; i < len_ip_header; i = i + 2) {
    word16 = ((buff[i] << 8) & 0xFF00) + (buff[i + 1] & 0xFF);
    sum = sum + (uint32_t)word16;
  }
  while (sum >> 16)
    sum = (sum & 0xFFFF) + (sum >> 16);
  sum = ~sum;
  return ((uint16_t)sum);
}
```
user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xf60,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x1f5c(%rbp),%rax
  mov    %rax,%rsi
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0x1f54(%rbp)
  jmp    L21
L1:
  lea    -0x1f58(%rbp),%rax
  mov    %rax,%rsi
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x1f58(%rbp),%edx
  lea    -0xfb0(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <read_int_array@plt>
  mov    -0x1f58(%rbp),%ecx
  lea    -0x1f50(%rbp),%rdx
  lea    -0xfb0(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <print_w_seq@plt>
  addl   $0x1,-0x1f54(%rbp)
L21:
  mov    -0x1f5c(%rbp),%eax
  cmp    %eax,-0x1f54(%rbp)
  jl     L1
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L10
  call   <__stack_chk_fail@plt>
L10:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D19
type: string

tool: D19: %d

assistant: ```c
int main() {
  int num_tests;
  int stack[1000];
  int p[1000];
  scanf("%d", &num_tests);
  for (int i = 0; i < num_tests; ++i) {
    int len;
    scanf("%d", &len);
    read_int_array(p, len);
    print_w_seq(p, len, stack);
  }
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xf60,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1f58(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rsi
  lea    D4(%rip),%rdi
  call   <scanf@plt>
  cmpl   $0x0,0x8(%rsp)
  jle    L15
  mov    $0x0,%ebx
  lea    D4(%rip),%r12
L1:
  lea    0xc(%rsp),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  lea    0xfb0(%rsp),%rbp
  mov    0xc(%rsp),%esi
  mov    %rbp,%rdi
  call   <read_int_array@plt>
  lea    0x10(%rsp),%rdx
  mov    0xc(%rsp),%esi
  mov    %rbp,%rdi
  call   <print_w_seq@plt>
  add    $0x1,%ebx
  cmp    %ebx,0x8(%rsp)
  jg     L1
L15:
  mov    0x1f58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L20
  mov    $0x0,%eax
  add    $0x1f60,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L20:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D4
data_type: string

tool: D4: %d

assistant: ```c
int main() {
  int num_tests;
  int stack[1000];
  int p[1000];
  scanf("%d", &num_tests);
  for (int i = 0; i < num_tests; ++i) {
    int len;
    scanf("%d", &len);
    read_int_array(p, len);
    print_w_seq(p, len, stack);
  }
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xf60,%rsp
  lea    D1(%rip),%r12
  mov    %r12,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x1f58(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rsi
  call   <scanf@plt>
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L7
  xor    %ebx,%ebx
  lea    0xc(%rsp),%r14
  lea    0x10(%rsp),%r13
  lea    0xfb0(%rsp),%rbp
  nopw   0x0(%rax,%rax,1)
L3:
  mov    %r14,%rsi
  mov    %r12,%rdi
  add    $0x1,%ebx
  call   <scanf@plt>
  mov    0xc(%rsp),%esi
  mov    %rbp,%rdi
  call   <read_int_array@plt>
  mov    0xc(%rsp),%esi
  mov    %r13,%rdx
  mov    %rbp,%rdi
  call   <print_w_seq@plt>
  cmp    %ebx,0x8(%rsp)
  jg     L3
L7:
  mov    0x1f58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L18
  add    $0x1f60,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L18:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D1
data_type: string

tool: D1: %d

assistant: ```c
int main() {
  int num_tests;
  int stack[1000];
  int p[1000];
  scanf("%d", &num_tests);
  for (int i = 0; i < num_tests; ++i) {
    int len;
    scanf("%d", &len);
    read_int_array(p, len);
    print_w_seq(p, len, stack);
  }
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xf60,%rsp
  lea    D6(%rip),%r12
  mov    %r12,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x1f58(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rsi
  call   <scanf@plt>
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L13
  xor    %ebx,%ebx
  lea    0xc(%rsp),%r14
  lea    0x10(%rsp),%r13
  lea    0xfb0(%rsp),%rbp
  nopw   0x0(%rax,%rax,1)
L5:
  mov    %r14,%rsi
  mov    %r12,%rdi
  add    $0x1,%ebx
  call   <scanf@plt>
  mov    0xc(%rsp),%esi
  mov    %rbp,%rdi
  call   <read_int_array@plt>
  mov    0xc(%rsp),%esi
  mov    %r13,%rdx
  mov    %rbp,%rdi
  call   <print_w_seq@plt>
  cmp    %ebx,0x8(%rsp)
  jg     L5
L13:
  mov    0x1f58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  add    $0x1f60,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L12:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D6
type_infered: string

tool: D6: %d

assistant: ```c
int main() {
  int num_tests;
  int stack[1000];
  int p[1000];
  scanf("%d", &num_tests);
  for (int i = 0; i < num_tests; ++i) {
    int len;
    scanf("%d", &len);
    read_int_array(p, len);
    print_w_seq(p, len, stack);
  }
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<grammar_tests>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <lexer_tests@plt>
  mov    $0x0,%eax
  call   <parser_tests@plt>
  nop
  pop    %rbp
  ret
```

assistant: ```c
void grammar_tests() {
  lexer_tests();
  parser_tests();
}
```
user: 请从给定的汇编指令推导出C源代码:

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

assistant: ```c
void grammar_tests() {
  lexer_tests();
  parser_tests();
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<grammar_tests>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <lexer_tests@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1070 <parser_tests@plt>
```

assistant: ```c
void grammar_tests() {
  lexer_tests();
  parser_tests();
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<grammar_tests>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <lexer_tests@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1070 <parser_tests@plt>
```

assistant: ```c
void grammar_tests() {
  lexer_tests();
  parser_tests();
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffff91a2b3c5,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0xb,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffff88888889,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x5,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  sub    -0x14(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffff88888889,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x5,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0xc(%rbp)
  mov    -0xc(%rbp),%edx
  imul   $0x3c,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%ecx
  mov    -0x10(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D9
type: string
name: unpack_data
arguments: label: D2
type: string
name: unpack_data
arguments: label: D3
type: string

tool: D9: Informe o tempo em segudos: 

tool: D2: %d

tool: D3: %d:%d:%d


assistant: ```c
int main(void) {
  int s, hora, min, seg;
  printf("Informe o tempo em segudos: ");
  scanf("%d", &s);
  hora = s / 3600;
  min = s / 60 - hora;
  seg = s % 60;
  printf("%d:%d:%d\n", hora, min, seg);
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D17(%rip),%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D16(%rip),%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%ecx
  movslq %ecx,%rax
  imul   $0xffffffff91a2b3c5,%rax,%rsi
  shr    $0x20,%rsi
  add    %ecx,%esi
  sar    $0xb,%esi
  mov    %ecx,%edi
  sar    $0x1f,%edi
  sub    %edi,%esi
  imul   $0xffffffff88888889,%rax,%rdx
  shr    $0x20,%rdx
  add    %ecx,%edx
  sar    $0x5,%edx
  sub    %edi,%edx
  imul   $0x3c,%edx,%eax
  sub    %eax,%ecx
  sub    %esi,%edx
  lea    D1(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  mov    $0x0,%eax
  add    $0x18,%rsp
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D17
data_type: string
name: read_data
arguments: label: D16
data_type: string
name: read_data
arguments: label: D1
data_type: string

tool: D17: Informe o tempo em segudos: 

tool: D16: %d

tool: D1: %d:%d:%d


assistant: ```c
int main(void) {
  int s, hora, min, seg;
  printf("Informe o tempo em segudos: ");
  scanf("%d", &s);
  hora = s / 3600;
  min = s / 60 - hora;
  seg = s % 60;
  printf("%d:%d:%d\n", hora, min, seg);
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  lea    D26(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D4(%rip),%rdi
  call   <scanf@plt>
  movslq 0x4(%rsp),%rax
  imul   $0xffffffff88888889,%rax,%rdx
  mov    %eax,%edi
  mov    %rax,%rcx
  imul   $0xffffffff91a2b3c5,%rax,%rsi
  sar    $0x1f,%edi
  shr    $0x20,%rdx
  add    %eax,%edx
  shr    $0x20,%rsi
  sar    $0x5,%edx
  add    %eax,%esi
  sub    %edi,%edx
  sar    $0xb,%esi
  imul   $0x3c,%edx,%eax
  sub    %edi,%esi
  lea    D18(%rip),%rdi
  sub    %esi,%edx
  sub    %eax,%ecx
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  xor    %eax,%eax
  add    $0x18,%rsp
  ret
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D26
data_type: string
name: retrieve_data
arguments: label: D4
data_type: string
name: retrieve_data
arguments: label: D18
data_type: string

tool: D26: Informe o tempo em segudos: 

tool: D4: %d

tool: D18: %d:%d:%d


assistant: ```c
int main(void) {
  int s, hora, min, seg;
  printf("Informe o tempo em segudos: ");
  scanf("%d", &s);
  hora = s / 3600;
  min = s / 60 - hora;
  seg = s % 60;
  printf("%d:%d:%d\n", hora, min, seg);
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  lea    D7(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D17(%rip),%rdi
  call   <scanf@plt>
  movslq 0x4(%rsp),%rax
  imul   $0xffffffff88888889,%rax,%rdx
  mov    %eax,%edi
  mov    %rax,%rcx
  imul   $0xffffffff91a2b3c5,%rax,%rsi
  sar    $0x1f,%edi
  shr    $0x20,%rdx
  add    %eax,%edx
  shr    $0x20,%rsi
  sar    $0x5,%edx
  add    %eax,%esi
  sub    %edi,%edx
  sar    $0xb,%esi
  imul   $0x3c,%edx,%eax
  sub    %edi,%esi
  lea    D18(%rip),%rdi
  sub    %esi,%edx
  sub    %eax,%ecx
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  xor    %eax,%eax
  add    $0x18,%rsp
  ret
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D7
type: string
name: disassemble_data
arguments: label: D17
type: string
name: disassemble_data
arguments: label: D18
type: string

tool: D7: Informe o tempo em segudos: 

tool: D17: %d

tool: D18: %d:%d:%d


assistant: ```c
int main(void) {
  int s, hora, min, seg;
  printf("Informe o tempo em segudos: ");
  scanf("%d", &s);
  hora = s / 3600;
  min = s / 60 - hora;
  seg = s % 60;
  printf("%d:%d:%d\n", hora, min, seg);
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<lib3ds_quat_axis_angle>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  movss  %xmm0,-0x34(%rbp)
  mov    -0x30(%rbp),%rax
  movss  (%rax),%xmm1
  mov    -0x30(%rbp),%rax
  movss  (%rax),%xmm0
  mulss  %xmm0,%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm2
  mov    -0x30(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm2
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  movd   %xmm1,%eax
  movd   %eax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movsd  D26(%rip),%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L1
  mov    -0x28(%rbp),%rax
  lea    0x8(%rax),%rdx
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rdx)
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  movss  (%rax),%xmm0
  mov    -0x28(%rbp),%rax
  movss  %xmm0,(%rax)
  mov    -0x28(%rbp),%rax
  add    $0xc,%rax
  movss  D4(%rip),%xmm0
  movss  %xmm0,(%rax)
  jmp    L4
L1:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x34(%rbp),%xmm1
  movsd  D15(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  divsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  pxor   %xmm1,%xmm1
  cvtsd2ss -0x8(%rbp),%xmm1
  mov    -0x30(%rbp),%rax
  movss  (%rax),%xmm0
  mulss  %xmm1,%xmm0
  mov    -0x28(%rbp),%rax
  movss  %xmm0,(%rax)
  pxor   %xmm1,%xmm1
  cvtsd2ss -0x8(%rbp),%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm0
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  mulss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  pxor   %xmm1,%xmm1
  cvtsd2ss -0x8(%rbp),%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm0
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  mulss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    $0xc,%rax
  pxor   %xmm0,%xmm0
  cvtsi2ss %rdx,%xmm0
  movss  %xmm0,(%rax)
L4:
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D26
data_type: byte[8]
name: unpack_data
arguments: label: D4
data_type: byte[4]
name: unpack_data
arguments: label: D15
data_type: byte[8]

tool: {"D26": [0xf1,0x68,0xe3,0x88,0xb5,0xf8,0xe4,0x3e]}

tool: {"D4": [0x00,0x00,0x80,0x3f]}

tool: {"D15": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xbf]}

assistant: ```c
void lib3ds_quat_axis_angle(float c[4], float axis[3], float angle) {
  double omega, s;
  double l;
  l = sqrt(axis[0] * axis[0] + axis[1] * axis[1] + axis[2] * axis[2]);
  if (l < (1e-5)) {
    c[0] = c[1] = c[2] = 0.0f;
    c[3] = 1.0f;
  } else {
    omega = -0.5 * angle;
    s = sin(omega) / l;
    c[0] = (float)s * axis[0];
    c[1] = (float)s * axis[1];
    c[2] = (float)s * axis[2];
    c[3] = (float)cos(omega);
  }
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<lib3ds_quat_axis_angle>:
  endbr64
  push   %r14
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  movss  %xmm0,0xc(%rsp)
  movss  (%rsi),%xmm0
  movss  0x4(%rsi),%xmm2
  movss  0x8(%rsi),%xmm1
  mulss  %xmm0,%xmm0
  mulss  %xmm2,%xmm2
  addss  %xmm2,%xmm0
  mulss  %xmm1,%xmm1
  addss  %xmm1,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm3
  movsd  %xmm0,(%rsp)
  movsd  D12(%rip),%xmm0
  comisd %xmm3,%xmm0
  jbe    L7
  movl   $0x0,0x8(%rbx)
  movl   $0x0,0x4(%rbx)
  movl   $0x0,(%rbx)
  movss  D20(%rip),%xmm0
L16:
  movss  %xmm0,0xc(%rbx)
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r14
  ret
L7:
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  mulsd  D16(%rip),%xmm0
  movq   %xmm0,%r14
  call   <sin@plt>
  divsd  (%rsp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movaps %xmm0,%xmm1
  mulss  0x0(%rbp),%xmm1
  movss  %xmm1,(%rbx)
  movaps %xmm0,%xmm1
  mulss  0x4(%rbp),%xmm1
  movss  %xmm1,0x4(%rbx)
  mulss  0x8(%rbp),%xmm0
  movss  %xmm0,0x8(%rbx)
  movq   %r14,%xmm0
  call   <cos@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  jmp    L16
```

tool_calls: name: retrieve_data
arguments: tag: D12
datatype: byte[8]
name: retrieve_data
arguments: tag: D20
datatype: byte[4]
name: retrieve_data
arguments: tag: D16
datatype: byte[8]

tool: {"D12": [0xf1,0x68,0xe3,0x88,0xb5,0xf8,0xe4,0x3e]}

tool: {"D20": [0x00,0x00,0x80,0x3f]}

tool: {"D16": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xbf]}

assistant: ```c
void lib3ds_quat_axis_angle(float c[4], float axis[3], float angle) {
  double omega, s;
  double l;
  l = sqrt(axis[0] * axis[0] + axis[1] * axis[1] + axis[2] * axis[2]);
  if (l < (1e-5)) {
    c[0] = c[1] = c[2] = 0.0f;
    c[3] = 1.0f;
  } else {
    omega = -0.5 * angle;
    s = sin(omega) / l;
    c[0] = (float)s * axis[0];
    c[1] = (float)s * axis[1];
    c[2] = (float)s * axis[2];
    c[3] = (float)cos(omega);
  }
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<lib3ds_quat_axis_angle>:
  endbr64
  push   %r14
  movd   %xmm0,%r14d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x10,%rsp
  movss  (%rsi),%xmm0
  movss  0x4(%rsi),%xmm2
  movss  0x8(%rsi),%xmm1
  mulss  %xmm2,%xmm2
  mulss  %xmm0,%xmm0
  mulss  %xmm1,%xmm1
  addss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm2
  movsd  D27(%rip),%xmm0
  comisd %xmm2,%xmm0
  jbe    L3
  movss  D2(%rip),%xmm0
  movq   $0x0,0x0(%rbp)
  movl   $0x0,0x8(%rbp)
  movss  %xmm0,0xc(%rbp)
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r14
  ret
  nopl   (%rax)
L3:
  movd   %r14d,%xmm3
  pxor   %xmm1,%xmm1
  movsd  %xmm2,0x8(%rsp)
  cvtss2sd %xmm3,%xmm1
  mulsd  D25(%rip),%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,(%rsp)
  call   <sin@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  (%rsp),%xmm1
  divsd  %xmm2,%xmm0
  movss  (%rbx),%xmm2
  cvtsd2ss %xmm0,%xmm0
  mulss  %xmm0,%xmm2
  movss  %xmm2,0x0(%rbp)
  movss  0x4(%rbx),%xmm2
  mulss  %xmm0,%xmm2
  movss  %xmm2,0x4(%rbp)
  mulss  0x8(%rbx),%xmm0
  movss  %xmm0,0x8(%rbp)
  movapd %xmm1,%xmm0
  call   <cos@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  movss  %xmm0,0xc(%rbp)
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r14
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D27
type_guessed: byte[8]
name: disassemble_data
arguments: data_label: D2
type_guessed: byte[4]
name: disassemble_data
arguments: data_label: D25
type_guessed: byte[8]

tool: {"D27": [0xf1,0x68,0xe3,0x88,0xb5,0xf8,0xe4,0x3e]}

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

tool: {"D25": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xbf]}

assistant: ```c
void lib3ds_quat_axis_angle(float c[4], float axis[3], float angle) {
  double omega, s;
  double l;
  l = sqrt(axis[0] * axis[0] + axis[1] * axis[1] + axis[2] * axis[2]);
  if (l < (1e-5)) {
    c[0] = c[1] = c[2] = 0.0f;
    c[3] = 1.0f;
  } else {
    omega = -0.5 * angle;
    s = sin(omega) / l;
    c[0] = (float)s * axis[0];
    c[1] = (float)s * axis[1];
    c[2] = (float)s * axis[2];
    c[3] = (float)cos(omega);
  }
}
```