ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<padcon_get_quaddobl_closest_pole>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movl   $0x2,0xc(%rsp)
  lea    0x10(%rsp),%rcx
  lea    0xc(%rsp),%rsi
  mov    $0x0,%r8d
  mov    $0x0,%edx
  mov    $0x362,%edi
  call   <_ada_use_c2phc4c@plt>
  movsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
  movsd  0x18(%rsp),%xmm0
  movsd  %xmm0,(%rbx)
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L4
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  ret
L4:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int padcon_get_quaddobl_closest_pole(double *cre, double *cim) {
  int fail;
  int precision = 2;
  int *b;
  double nbr[2];
  fail = _ada_use_c2phc4c(866, &precision, b, nbr, 0);
  *cre = nbr[0];
  *cim = nbr[1];
  return fail;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<padcon_get_quaddobl_closest_pole>:
  endbr64
  push   %rbp
  xor    %r8d,%r8d
  mov    %rdi,%rbp
  xor    %edx,%edx
  push   %rbx
  mov    $0x362,%edi
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rcx
  lea    0xc(%rsp),%rsi
  movl   $0x2,0xc(%rsp)
  call   <_ada_use_c2phc4c@plt>
  movsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
  movsd  0x18(%rsp),%xmm0
  movsd  %xmm0,(%rbx)
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L2
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  ret
L2:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int padcon_get_quaddobl_closest_pole(double *cre, double *cim) {
  int fail;
  int precision = 2;
  int *b;
  double nbr[2];
  fail = _ada_use_c2phc4c(866, &precision, b, nbr, 0);
  *cre = nbr[0];
  *cim = nbr[1];
  return fail;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<padcon_get_quaddobl_closest_pole>:
  endbr64
  push   %rbp
  xor    %r8d,%r8d
  mov    %rdi,%rbp
  xor    %edx,%edx
  push   %rbx
  mov    $0x362,%edi
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rcx
  lea    0xc(%rsp),%rsi
  movl   $0x2,0xc(%rsp)
  call   <_ada_use_c2phc4c@plt>
  movsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
  movsd  0x18(%rsp),%xmm0
  movsd  %xmm0,(%rbx)
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L1
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  ret
L1:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int padcon_get_quaddobl_closest_pole(double *cre, double *cim) {
  int fail;
  int precision = 2;
  int *b;
  double nbr[2];
  fail = _ada_use_c2phc4c(866, &precision, b, nbr, 0);
  *cre = nbr[0];
  *cim = nbr[1];
  return fail;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<gamma_continued_frac>:
  endbr64
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  movsd  %xmm1,(%rsp)
  movsd  %xmm0,0x8(%rsp)
  call   <gammln@plt>
  movsd  (%rsp),%xmm3
  movsd  D42(%rip),%xmm7
  mov    $0x1,%eax
  movsd  0x8(%rsp),%xmm8
  movapd %xmm0,%xmm10
  movsd  D6(%rip),%xmm11
  movsd  %xmm0,0x0(%rbp)
  addsd  %xmm7,%xmm3
  movapd %xmm7,%xmm12
  movsd  D30(%rip),%xmm0
  movq   D13(%rip),%xmm4
  movsd  D0(%rip),%xmm5
  movapd %xmm11,%xmm2
  movsd  D32(%rip),%xmm9
  subsd  %xmm8,%xmm3
  divsd  %xmm3,%xmm12
  movapd %xmm12,%xmm6
  jmp    L6
  nopl   0x0(%rax)
L30:
  movapd %xmm7,%xmm12
  cmpnltsd %xmm5,%xmm1
  divsd  %xmm13,%xmm12
  andpd  %xmm1,%xmm2
  andnpd %xmm5,%xmm1
  orpd   %xmm1,%xmm2
L51:
  movapd %xmm2,%xmm1
  mulsd  %xmm12,%xmm1
  mulsd  %xmm1,%xmm6
  subsd  %xmm7,%xmm1
  andpd  %xmm4,%xmm1
  comisd %xmm1,%xmm9
  ja     L7
  add    $0x1,%eax
  cmp    $0x65,%eax
  je     L57
L6:
  pxor   %xmm13,%xmm13
  pxor   %xmm1,%xmm1
  addsd  %xmm0,%xmm3
  mov    %eax,%edx
  cvtsi2sd %eax,%xmm13
  neg    %edx
  cvtsi2sd %edx,%xmm1
  subsd  %xmm8,%xmm13
  mulsd  %xmm13,%xmm1
  mulsd  %xmm1,%xmm12
  divsd  %xmm2,%xmm1
  movapd %xmm12,%xmm13
  addsd  %xmm3,%xmm13
  movapd %xmm13,%xmm12
  andpd  %xmm4,%xmm12
  comisd %xmm12,%xmm5
  movapd %xmm1,%xmm2
  addsd  %xmm3,%xmm2
  movapd %xmm2,%xmm1
  andpd  %xmm4,%xmm1
  jbe    L30
  comisd %xmm1,%xmm5
  ja     L7
  movapd %xmm11,%xmm12
  jmp    L51
  nop
L57:
  movsd  (%rsp),%xmm0
  movsd  %xmm6,0x10(%rsp)
  movsd  %xmm8,0x18(%rsp)
  movsd  %xmm10,0x8(%rsp)
  call   <log@plt>
  movsd  0x18(%rsp),%xmm8
  movsd  0x8(%rsp),%xmm10
  mulsd  %xmm8,%xmm0
  subsd  (%rsp),%xmm0
  subsd  %xmm10,%xmm0
  call   <exp@plt>
  movsd  0x10(%rsp),%xmm6
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%rbx)
L7:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D42
type: f64
name: retrieve_data
arguments: tag: D6
type: byte[8]
name: retrieve_data
arguments: tag: D30
type: f64
name: retrieve_data
arguments: tag: D13
type: qword
name: retrieve_data
arguments: tag: D0
type: byte[8]
name: retrieve_data
arguments: tag: D32
type: byte[8]

tool: D42: 1

tool: {"D6": [0xe9,0x8c,0xa0,0x39,0x59,0x3e,0x29,0x46]}

tool: D30: 2

tool: D13: 9223372036854775807

tool: {"D0": [0xa0,0xc2,0xeb,0xfe,0x4b,0x48,0xb4,0x39]}

tool: {"D32": [0x76,0x83,0x0d,0xf4,0xf5,0x21,0x94,0x3e]}

assistant: ```c
void gamma_continued_frac(double *gammcf, double a, double x, double *gln) {
  int i;
  double an, b, c, d, del, h;
  *gln = gammln(a);
  b = x + 1.0 - a;
  c = 1.0 / 1.0e-30;
  d = 1.0 / b;
  h = d;
  for (i = 1; i <= 100; i++) {
    an = -i * (i - a);
    b += 2.0;
    d = an * d + b;
    if (fabs(d) < 1.0e-30)
      d = 1.0e-30;
    c = b + an / c;
    if (fabs(c) < 1.0e-30)
      c = 1.0e-30;
    d = 1.0 / d;
    del = d * c;
    h *= del;
    if (fabs(del - 1.0) < 3.0e-7)
      break;
  }
  if (i > 100)
    *gammcf = exp(-x + a * log(x) - (*gln)) * h;
}
```
user: Translate the below assembly code into C programming language:

```asm
<gamma_continued_frac>:
  endbr64
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  movsd  %xmm1,(%rsp)
  movsd  %xmm0,0x8(%rsp)
  call   <gammln@plt>
  movsd  (%rsp),%xmm3
  movsd  D37(%rip),%xmm7
  mov    $0x1,%eax
  movsd  0x8(%rsp),%xmm8
  movapd %xmm0,%xmm10
  movsd  D28(%rip),%xmm11
  movsd  %xmm0,0x0(%rbp)
  addsd  %xmm7,%xmm3
  movapd %xmm7,%xmm12
  movsd  D41(%rip),%xmm0
  movq   D21(%rip),%xmm4
  movsd  D51(%rip),%xmm5
  movapd %xmm11,%xmm2
  movsd  D15(%rip),%xmm9
  subsd  %xmm8,%xmm3
  divsd  %xmm3,%xmm12
  movapd %xmm12,%xmm6
  jmp    L23
  nopl   0x0(%rax)
L35:
  movapd %xmm7,%xmm12
  cmpnltsd %xmm5,%xmm1
  divsd  %xmm13,%xmm12
  andpd  %xmm1,%xmm2
  andnpd %xmm5,%xmm1
  orpd   %xmm1,%xmm2
L31:
  movapd %xmm2,%xmm1
  mulsd  %xmm12,%xmm1
  mulsd  %xmm1,%xmm6
  subsd  %xmm7,%xmm1
  andpd  %xmm4,%xmm1
  comisd %xmm1,%xmm9
  ja     L9
  add    $0x1,%eax
  cmp    $0x65,%eax
  je     L2
L23:
  pxor   %xmm13,%xmm13
  pxor   %xmm1,%xmm1
  addsd  %xmm0,%xmm3
  mov    %eax,%edx
  cvtsi2sd %eax,%xmm13
  neg    %edx
  cvtsi2sd %edx,%xmm1
  subsd  %xmm8,%xmm13
  mulsd  %xmm13,%xmm1
  mulsd  %xmm1,%xmm12
  divsd  %xmm2,%xmm1
  movapd %xmm12,%xmm13
  addsd  %xmm3,%xmm13
  movapd %xmm13,%xmm12
  andpd  %xmm4,%xmm12
  comisd %xmm12,%xmm5
  movapd %xmm1,%xmm2
  addsd  %xmm3,%xmm2
  movapd %xmm2,%xmm1
  andpd  %xmm4,%xmm1
  jbe    L35
  comisd %xmm1,%xmm5
  ja     L9
  movapd %xmm11,%xmm12
  jmp    L31
  nop
L2:
  movsd  (%rsp),%xmm0
  movsd  %xmm6,0x10(%rsp)
  movsd  %xmm8,0x18(%rsp)
  movsd  %xmm10,0x8(%rsp)
  call   <log@plt>
  movsd  0x18(%rsp),%xmm8
  movsd  0x8(%rsp),%xmm10
  mulsd  %xmm8,%xmm0
  subsd  (%rsp),%xmm0
  subsd  %xmm10,%xmm0
  call   <exp@plt>
  movsd  0x10(%rsp),%xmm6
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%rbx)
L9:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: tag: D37
type_guessed: f64
name: unpack_data
arguments: tag: D28
type_guessed: byte[8]
name: unpack_data
arguments: tag: D41
type_guessed: f64
name: unpack_data
arguments: tag: D21
type_guessed: qword
name: unpack_data
arguments: tag: D51
type_guessed: byte[8]
name: unpack_data
arguments: tag: D15
type_guessed: byte[8]

tool: D37: 1

tool: {"D28": [0xe9,0x8c,0xa0,0x39,0x59,0x3e,0x29,0x46]}

tool: D41: 2

tool: D21: 9223372036854775807

tool: {"D51": [0xa0,0xc2,0xeb,0xfe,0x4b,0x48,0xb4,0x39]}

tool: {"D15": [0x76,0x83,0x0d,0xf4,0xf5,0x21,0x94,0x3e]}

assistant: ```c
void gamma_continued_frac(double *gammcf, double a, double x, double *gln) {
  int i;
  double an, b, c, d, del, h;
  *gln = gammln(a);
  b = x + 1.0 - a;
  c = 1.0 / 1.0e-30;
  d = 1.0 / b;
  h = d;
  for (i = 1; i <= 100; i++) {
    an = -i * (i - a);
    b += 2.0;
    d = an * d + b;
    if (fabs(d) < 1.0e-30)
      d = 1.0e-30;
    c = b + an / c;
    if (fabs(c) < 1.0e-30)
      c = 1.0e-30;
    d = 1.0 / d;
    del = d * c;
    h *= del;
    if (fabs(del - 1.0) < 3.0e-7)
      break;
  }
  if (i > 100)
    *gammcf = exp(-x + a * log(x) - (*gln)) * h;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<arraylist_add>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L19
  mov    $0xffffffff,%eax
  jmp    L15
L19:
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    $0xffffffff,%esi
  mov    %rax,%rdi
  call   <arraylist_insert@plt>
L15:
  leave
  ret
```

assistant: ```c
int arraylist_add(struct t_arraylist *arraylist, void *pointer) {
  if (!arraylist)
    return -1;
  return arraylist_insert(arraylist, -1, pointer);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<arraylist_add>:
  endbr64
  test   %rdi,%rdi
  je     L2
  sub    $0x8,%rsp
  mov    %rsi,%rdx
  mov    $0xffffffff,%esi
  call   <arraylist_insert@plt>
  add    $0x8,%rsp
  ret
L2:
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int arraylist_add(struct t_arraylist *arraylist, void *pointer) {
  if (!arraylist)
    return -1;
  return arraylist_insert(arraylist, -1, pointer);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<arraylist_add>:
  endbr64
  mov    %rsi,%rdx
  test   %rdi,%rdi
  je     L2
  mov    $0xffffffff,%esi
  jmp    1050 <arraylist_insert@plt>
L2:
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int arraylist_add(struct t_arraylist *arraylist, void *pointer) {
  if (!arraylist)
    return -1;
  return arraylist_insert(arraylist, -1, pointer);
}
```
user: What is the c source code of the assembly code below:

```asm
<arraylist_add>:
  endbr64
  mov    %rsi,%rdx
  test   %rdi,%rdi
  je     L6
  mov    $0xffffffff,%esi
  jmp    1050 <arraylist_insert@plt>
L6:
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int arraylist_add(struct t_arraylist *arraylist, void *pointer) {
  if (!arraylist)
    return -1;
  return arraylist_insert(arraylist, -1, pointer);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<fastpow>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movss  %xmm0,-0x14(%rbp)
  mov    %edi,-0x18(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  jg     L25
  movss  D3(%rip),%xmm0
  movss  %xmm0,-0x4(%rbp)
  jmp    L25
L19:
  mov    -0x18(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L38
  movss  -0x4(%rbp),%xmm0
  mulss  -0x14(%rbp),%xmm0
  movss  %xmm0,-0x4(%rbp)
L38:
  movss  -0x14(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  movss  %xmm0,-0x14(%rbp)
  sarl   -0x18(%rbp)
L25:
  cmpl   $0x0,-0x18(%rbp)
  jg     L19
  movss  -0x4(%rbp),%xmm0
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D3
type: byte[4]

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

assistant: ```c
float fastpow(float base, int expo) {
  float ans;
  if (expo <= 0)
    ans = 1;
  while (expo > 0) {
    if (expo % 2)
      ans *= base;
    base *= base;
    expo >>= 1;
  }
  return ans;
}
```
user: What is the c source code of the assembly code below:

```asm
<fastpow>:
  endbr64
  test   %edi,%edi
  jle    L18
  movss  D6(%rip),%xmm1
  jmp    L49
L21:
  mulss  %xmm0,%xmm0
  sar    %edi
  test   %edi,%edi
  jle    L19
L49:
  test   $0x1,%dil
  je     L21
  mulss  %xmm0,%xmm1
  jmp    L21
L18:
  movss  D6(%rip),%xmm1
L19:
  movaps %xmm1,%xmm0
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D6
type_infered: byte[4]

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

assistant: ```c
float fastpow(float base, int expo) {
  float ans;
  if (expo <= 0)
    ans = 1;
  while (expo > 0) {
    if (expo % 2)
      ans *= base;
    base *= base;
    expo >>= 1;
  }
  return ans;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<fastpow>:
  endbr64
  movss  D4(%rip),%xmm1
  test   %edi,%edi
  jle    L11
L27:
  test   $0x1,%dil
  je     L2
  mulss  %xmm0,%xmm1
L2:
  mulss  %xmm0,%xmm0
  sar    %edi
  jne    L27
L11:
  movaps %xmm1,%xmm0
  ret
```

tool_calls: name: unpack_data
arguments: tag: D4
type_infered: byte[4]

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

assistant: ```c
float fastpow(float base, int expo) {
  float ans;
  if (expo <= 0)
    ans = 1;
  while (expo > 0) {
    if (expo % 2)
      ans *= base;
    base *= base;
    expo >>= 1;
  }
  return ans;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<fastpow>:
  endbr64
  movss  D4(%rip),%xmm1
  test   %edi,%edi
  jle    L11
L27:
  test   $0x1,%dil
  je     L8
  mulss  %xmm0,%xmm1
L8:
  mulss  %xmm0,%xmm0
  sar    %edi
  jne    L27
L11:
  movaps %xmm1,%xmm0
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D4
datatype: byte[4]

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

assistant: ```c
float fastpow(float base, int expo) {
  float ans;
  if (expo <= 0)
    ans = 1;
  while (expo > 0) {
    if (expo % 2)
      ans *= base;
    base *= base;
    expo >>= 1;
  }
  return ans;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<dspl_win_blackman_nuttall>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  D35(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  D44(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  D53(%rip),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  D6(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x50(%rbp),%eax
  and    $0x100,%eax
  test   %eax,%eax
  jne    L36
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D36(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L36:
  mov    -0x50(%rbp),%eax
  and    $0x100,%eax
  test   %eax,%eax
  je     L1
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x4c(%rbp),%xmm1
  movsd  D36(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L1:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L21
L11:
  mov    -0x30(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x18(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movapd %xmm0,%xmm3
  addsd  %xmm0,%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm4
  mulsd  -0x10(%rbp),%xmm4
  movapd %xmm4,%xmm0
  addsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x30(%rbp),%xmm1
  movsd  D68(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x8(%rbp),%xmm1
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x58(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x30(%rbp),%xmm0
  addsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  addl   $0x1,-0x34(%rbp)
L21:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L11
  nop
  nop
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D35
data_type: f64
name: retrieve_data
arguments: tag: D44
data_type: f64
name: retrieve_data
arguments: tag: D53
data_type: f64
name: retrieve_data
arguments: tag: D6
data_type: f64
name: retrieve_data
arguments: tag: D36
data_type: f64
name: retrieve_data
arguments: tag: D68
data_type: f64

tool: D35: 0.3635819

tool: D44: 0.4891775

tool: D53: 0.1365995

tool: D6: 0.0106411

tool: D36: 6.283185307179586

tool: D68: 3

assistant: ```c
void dspl_win_blackman_nuttall(double *w, int n, int win_type) {
  double y;
  double x = 0.0;
  double a0 = 0.3635819;
  double a1 = 0.4891775;
  double a2 = 0.1365995;
  double a3 = 0.0106411;
  int i;
  if ((win_type & 0x00000100) == 0x00000000)
    x = 6.283185307179586476925286766559 / (double)(n - 1);
  if ((win_type & 0x00000100) == 0x00000100)
    x = 6.283185307179586476925286766559 / (double)n;
  y = 0.0;
  for (i = 0; i < n; i++) {
    w[i] = a0 - a1 * cos(y) + a2 * cos(2.0 * y) - a3 * cos(3.0 * y);
    y += x;
  }
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<dspl_win_blackman_nuttall>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   $0x1,%dh
  jne    L24
  lea    -0x1(%rsi),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D26(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
L19:
  test   %esi,%esi
  jle    L29
  mov    %rdi,%rbp
  lea    -0x1(%rsi),%eax
  lea    0x8(%rdi,%rax,8),%r12
  pxor   %xmm5,%xmm5
  movsd  %xmm5,(%rsp)
L21:
  movsd  (%rsp),%xmm0
  call   <cos@plt>
  movq   %xmm0,%r13
  movsd  (%rsp),%xmm3
  movapd %xmm3,%xmm0
  addsd  %xmm3,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rbx
  movsd  D62(%rip),%xmm0
  mulsd  (%rsp),%xmm0
  call   <cos@plt>
  movapd %xmm0,%xmm2
  movq   %r13,%xmm0
  mulsd  D54(%rip),%xmm0
  movsd  D32(%rip),%xmm1
  subsd  %xmm0,%xmm1
  movq   %rbx,%xmm0
  mulsd  D9(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D14(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  subsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%rbp)
  movsd  (%rsp),%xmm3
  addsd  0x8(%rsp),%xmm3
  movsd  %xmm3,(%rsp)
  add    $0x8,%rbp
  cmp    %r12,%rbp
  jne    L21
L29:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L24:
  pxor   %xmm0,%xmm0
  cvtsi2sd %esi,%xmm0
  movsd  D26(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
  jmp    L19
```

tool_calls: name: parse_data
arguments: data_label: D26
data_type: f64
name: parse_data
arguments: data_label: D62
data_type: f64
name: parse_data
arguments: data_label: D54
data_type: f64
name: parse_data
arguments: data_label: D32
data_type: f64
name: parse_data
arguments: data_label: D9
data_type: f64
name: parse_data
arguments: data_label: D14
data_type: f64

tool: D26: 6.283185307179586

tool: D62: 3

tool: D54: 0.4891775

tool: D32: 0.3635819

tool: D9: 0.1365995

tool: D14: 0.0106411

assistant: ```c
void dspl_win_blackman_nuttall(double *w, int n, int win_type) {
  double y;
  double x = 0.0;
  double a0 = 0.3635819;
  double a1 = 0.4891775;
  double a2 = 0.1365995;
  double a3 = 0.0106411;
  int i;
  if ((win_type & 0x00000100) == 0x00000000)
    x = 6.283185307179586476925286766559 / (double)(n - 1);
  if ((win_type & 0x00000100) == 0x00000100)
    x = 6.283185307179586476925286766559 / (double)n;
  y = 0.0;
  for (i = 0; i < n; i++) {
    w[i] = a0 - a1 * cos(y) + a2 * cos(2.0 * y) - a3 * cos(3.0 * y);
    y += x;
  }
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<dspl_win_blackman_nuttall>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  and    $0x1,%dh
  jne    L28
  lea    -0x1(%rsi),%eax
  pxor   %xmm0,%xmm0
  movsd  D49(%rip),%xmm1
  cvtsi2sd %eax,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rsp)
L8:
  test   %esi,%esi
  jle    L5
  movsd  D50(%rip),%xmm0
  lea    -0x1(%rsi),%eax
  mov    %rdi,%rbp
  pxor   %xmm4,%xmm4
  lea    0x8(%rdi,%rax,8),%rbx
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm2
  jmp    L17
  nopl   0x0(%rax)
L32:
  movapd %xmm4,%xmm0
  movsd  %xmm4,(%rsp)
  call   <cos@plt>
  movsd  (%rsp),%xmm4
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm4,%xmm0
  addsd  %xmm4,%xmm0
  call   <cos@plt>
  movsd  (%rsp),%xmm4
  movsd  %xmm0,0x8(%rsp)
  movsd  D74(%rip),%xmm0
  mulsd  %xmm4,%xmm0
  call   <cos@plt>
  movsd  (%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm2
L17:
  mulsd  D38(%rip),%xmm2
  movsd  D27(%rip),%xmm1
  add    $0x8,%rbp
  mulsd  D39(%rip),%xmm0
  addsd  0x18(%rsp),%xmm4
  subsd  %xmm2,%xmm1
  movsd  D71(%rip),%xmm2
  mulsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,-0x8(%rbp)
  cmp    %rbx,%rbp
  jne    L32
L5:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L28:
  pxor   %xmm0,%xmm0
  movsd  D49(%rip),%xmm1
  cvtsi2sd %esi,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rsp)
  jmp    L8
```

tool_calls: name: parse_data
arguments: label: D49
type_infered: f64
name: parse_data
arguments: label: D50
type_infered: f32[2]
name: parse_data
arguments: label: D74
type_infered: f64
name: parse_data
arguments: label: D38
type_infered: f64
name: parse_data
arguments: label: D27
type_infered: f64
name: parse_data
arguments: label: D39
type_infered: f64
name: parse_data
arguments: label: D71
type_infered: f64

tool: D49: 6.283185307179586

tool: {"D50": [0.0,1.875]}

tool: D74: 3

tool: D38: 0.4891775

tool: D27: 0.3635819

tool: D39: 0.0106411

tool: D71: 0.1365995

assistant: ```c
void dspl_win_blackman_nuttall(double *w, int n, int win_type) {
  double y;
  double x = 0.0;
  double a0 = 0.3635819;
  double a1 = 0.4891775;
  double a2 = 0.1365995;
  double a3 = 0.0106411;
  int i;
  if ((win_type & 0x00000100) == 0x00000000)
    x = 6.283185307179586476925286766559 / (double)(n - 1);
  if ((win_type & 0x00000100) == 0x00000100)
    x = 6.283185307179586476925286766559 / (double)n;
  y = 0.0;
  for (i = 0; i < n; i++) {
    w[i] = a0 - a1 * cos(y) + a2 * cos(2.0 * y) - a3 * cos(3.0 * y);
    y += x;
  }
}
```