ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请从给定的汇编指令推导出C源代码:

```asm
<base64decode>:
  endbr64
  push   %r15
  lea    (%rsi,%rsi,2),%eax
  push   %r14
  add    %eax,%eax
  push   %r13
  mov    %rdi,%r13
  push   %r12
  lea    0xe(%rax),%r12d
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x8,%rsp
  add    $0x7,%eax
  mov    (%rdx),%rdi
  cmovns %eax,%r12d
  sar    $0x3,%r12d
  test   %rdi,%rdi
  je     L13
  call   <free@plt>
L13:
  mov    %r12d,%edi
  call   <malloc@plt>
  mov    %r12d,%edx
  xor    %esi,%esi
  mov    %rax,(%rbx)
  mov    %rax,%rdi
  call   <memset@plt>
  xor    %eax,%eax
  call   <BIO_f_base64@plt>
  mov    %eax,%edi
  call   <BIO_new@plt>
  mov    %ebp,%esi
  mov    %r13,%rdi
  mov    %rax,%r14
  call   <BIO_new_mem_buf@plt>
  mov    %r14,%rdi
  mov    %rax,%rsi
  call   <BIO_push@plt>
  mov    (%rbx),%rsi
  mov    %r12d,%edx
  mov    %rax,%rdi
  mov    %rax,%r14
  call   <BIO_read@plt>
  mov    %eax,%r15d
  test   %eax,%eax
  je     L21
L12:
  mov    %r14,%rdi
  call   <BIO_free_all@plt>
  add    $0x8,%rsp
  mov    %r15d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L21:
  mov    %r14,%rdi
  call   <BIO_free_all@plt>
  xor    %eax,%eax
  call   <BIO_f_base64@plt>
  mov    %eax,%edi
  call   <BIO_new@plt>
  mov    %rax,%r14
  mov    D3(%rip),%rax
  mov    %r14,%rdi
  mov    (%rax),%esi
  call   <BIO_set_flags@plt>
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <BIO_new_mem_buf@plt>
  mov    %r14,%rdi
  mov    %rax,%rsi
  call   <BIO_push@plt>
  mov    (%rbx),%rsi
  mov    %r12d,%edx
  mov    %rax,%rdi
  mov    %rax,%r14
  call   <BIO_read@plt>
  mov    %eax,%r15d
  jmp    L12
```

assistant: ```c
int base64decode(unsigned char *source, int length, char **target) {
  BIO *b64, *bmem;
  int len, bufmaxlen;
  bufmaxlen = ((length * 6 + 7) / 8) * sizeof(char);
  if (*target) {
    free(*target);
  }
  *target = (char *)malloc(bufmaxlen);
  memset(*target, 0, bufmaxlen);
  b64 = BIO_new(BIO_f_base64());
  bmem = BIO_new_mem_buf(source, length);
  b64 = BIO_push(b64, bmem);
  len = BIO_read(b64, *target, bufmaxlen);
  if (len == 0) {
    BIO_free_all(b64);
    b64 = BIO_new(BIO_f_base64());
    BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
    bmem = BIO_new_mem_buf(source, length);
    b64 = BIO_push(b64, bmem);
    len = BIO_read(b64, *target, bufmaxlen);
  }
  BIO_free_all(b64);
  return len;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<base64decode>:
  endbr64
  push   %r15
  lea    (%rsi,%rsi,2),%eax
  push   %r14
  add    %eax,%eax
  push   %r13
  mov    %rdi,%r13
  push   %r12
  lea    0xe(%rax),%r12d
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x8,%rsp
  add    $0x7,%eax
  mov    (%rdx),%rdi
  cmovns %eax,%r12d
  sar    $0x3,%r12d
  test   %rdi,%rdi
  je     L29
  call   <free@plt>
L29:
  mov    %r12d,%edi
  call   <malloc@plt>
  mov    %r12d,%edx
  xor    %esi,%esi
  mov    %rax,(%rbx)
  mov    %rax,%rdi
  call   <memset@plt>
  xor    %eax,%eax
  call   <BIO_f_base64@plt>
  mov    %eax,%edi
  call   <BIO_new@plt>
  mov    %ebp,%esi
  mov    %r13,%rdi
  mov    %rax,%r14
  call   <BIO_new_mem_buf@plt>
  mov    %r14,%rdi
  mov    %rax,%rsi
  call   <BIO_push@plt>
  mov    (%rbx),%rsi
  mov    %r12d,%edx
  mov    %rax,%rdi
  mov    %rax,%r14
  call   <BIO_read@plt>
  mov    %eax,%r15d
  test   %eax,%eax
  je     L22
L19:
  mov    %r14,%rdi
  call   <BIO_free_all@plt>
  add    $0x8,%rsp
  mov    %r15d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L22:
  mov    %r14,%rdi
  call   <BIO_free_all@plt>
  xor    %eax,%eax
  call   <BIO_f_base64@plt>
  mov    %eax,%edi
  call   <BIO_new@plt>
  mov    %rax,%r14
  mov    D3(%rip),%rax
  mov    %r14,%rdi
  mov    (%rax),%esi
  call   <BIO_set_flags@plt>
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <BIO_new_mem_buf@plt>
  mov    %r14,%rdi
  mov    %rax,%rsi
  call   <BIO_push@plt>
  mov    (%rbx),%rsi
  mov    %r12d,%edx
  mov    %rax,%rdi
  mov    %rax,%r14
  call   <BIO_read@plt>
  mov    %eax,%r15d
  jmp    L19
```

assistant: ```c
int base64decode(unsigned char *source, int length, char **target) {
  BIO *b64, *bmem;
  int len, bufmaxlen;
  bufmaxlen = ((length * 6 + 7) / 8) * sizeof(char);
  if (*target) {
    free(*target);
  }
  *target = (char *)malloc(bufmaxlen);
  memset(*target, 0, bufmaxlen);
  b64 = BIO_new(BIO_f_base64());
  bmem = BIO_new_mem_buf(source, length);
  b64 = BIO_push(b64, bmem);
  len = BIO_read(b64, *target, bufmaxlen);
  if (len == 0) {
    BIO_free_all(b64);
    b64 = BIO_new(BIO_f_base64());
    BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
    bmem = BIO_new_mem_buf(source, length);
    b64 = BIO_push(b64, bmem);
    len = BIO_read(b64, *target, bufmaxlen);
  }
  BIO_free_all(b64);
  return len;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<vzero>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void vzero(float *v) {
  v[0] = 0.0;
  v[1] = 0.0;
  v[2] = 0.0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<vzero>:
  endbr64
  movl   $0x0,(%rdi)
  movl   $0x0,0x4(%rdi)
  movl   $0x0,0x8(%rdi)
  ret
```

assistant: ```c
void vzero(float *v) {
  v[0] = 0.0;
  v[1] = 0.0;
  v[2] = 0.0;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<vzero>:
  endbr64
  movq   $0x0,(%rdi)
  movl   $0x0,0x8(%rdi)
  ret
```

assistant: ```c
void vzero(float *v) {
  v[0] = 0.0;
  v[1] = 0.0;
  v[2] = 0.0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<vzero>:
  endbr64
  movq   $0x0,(%rdi)
  movl   $0x0,0x8(%rdi)
  ret
```

assistant: ```c
void vzero(float *v) {
  v[0] = 0.0;
  v[1] = 0.0;
  v[2] = 0.0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<Strtok>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L24
  mov    -0x18(%rbp),%rax
  mov    %rax,D3(%rip)
  jmp    L60
L24:
  mov    D3(%rip),%rax
  test   %rax,%rax
  jne    L60
  mov    $0x0,%eax
  jmp    L54
L60:
  mov    D3(%rip),%rax
  mov    %rax,-0x8(%rbp)
  mov    D3(%rip),%rax
  mov    %rax,-0x10(%rbp)
L70:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L55
  movq   $0x0,D3(%rip)
  jmp    L79
L55:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L53
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x0,(%rax)
  mov    -0x10(%rbp),%rax
  mov    %rax,D14(%rip)
  jmp    L79
L53:
  addq   $0x1,-0x10(%rbp)
  jmp    L70
L79:
  mov    -0x8(%rbp),%rax
L54:
  leave
  ret
```

assistant: ```c
char *Strtok(char *buf, const char *delims) {
  static char *p = NULL;
  char *start, *end;
  if (buf != NULL) {
    p = buf;
  } else {
    if (p == NULL)
      return (NULL);
  }
  for (start = p, end = p;; end++) {
    if (*end == '\0') {
      p = NULL;
      break;
    }
    if (strchr(delims, (int)*end) != NULL) {
      *end++ = '\0';
      p = end;
      break;
    }
  }
  return (start);
}
```
user: What is the c source code of the assembly code below?

```asm
<Strtok>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%r12
  test   %rdi,%rdi
  je     L48
  mov    %rdi,D20(%rip)
L34:
  mov    D20(%rip),%rbp
  movzbl 0x0(%rbp),%esi
  mov    %rbp,%rbx
  test   %sil,%sil
  je     L50
L19:
  movsbl %sil,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L24
  add    $0x1,%rbx
  movzbl (%rbx),%esi
  test   %sil,%sil
  jne    L19
L50:
  movq   $0x0,D20(%rip)
L5:
  mov    %rbp,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L48:
  mov    D20(%rip),%rbp
  test   %rbp,%rbp
  jne    L34
  jmp    L5
L24:
  movb   $0x0,(%rbx)
  add    $0x1,%rbx
  mov    %rbx,D7(%rip)
  jmp    L5
```

assistant: ```c
char *Strtok(char *buf, const char *delims) {
  static char *p = NULL;
  char *start, *end;
  if (buf != NULL) {
    p = buf;
  } else {
    if (p == NULL)
      return (NULL);
  }
  for (start = p, end = p;; end++) {
    if (*end == '\0') {
      p = NULL;
      break;
    }
    if (strchr(delims, (int)*end) != NULL) {
      *end++ = '\0';
      p = end;
      break;
    }
  }
  return (start);
}
```
user: What is the c source code of the assembly code below:

```asm
<Strtok>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  test   %rdi,%rdi
  je     L69
L64:
  movsbl (%r12),%esi
  mov    %r12,%rbx
  test   %sil,%sil
  jne    L13
  jmp    L30
  nopw   0x0(%rax,%rax,1)
L58:
  movsbl (%rbx),%esi
  test   %sil,%sil
  je     L30
L13:
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    %rbx,%rdx
  add    $0x1,%rbx
  test   %rax,%rax
  je     L58
  movb   $0x0,(%rdx)
  mov    %r12,%rax
  mov    %rbx,D28(%rip)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L30:
  movq   $0x0,D28(%rip)
  mov    %r12,%rax
L18:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L69:
  mov    D28(%rip),%r12
  test   %r12,%r12
  jne    L64
  xor    %eax,%eax
  jmp    L18
```

assistant: ```c
char *Strtok(char *buf, const char *delims) {
  static char *p = NULL;
  char *start, *end;
  if (buf != NULL) {
    p = buf;
  } else {
    if (p == NULL)
      return (NULL);
  }
  for (start = p, end = p;; end++) {
    if (*end == '\0') {
      p = NULL;
      break;
    }
    if (strchr(delims, (int)*end) != NULL) {
      *end++ = '\0';
      p = end;
      break;
    }
  }
  return (start);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<Strtok>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  test   %rdi,%rdi
  je     L28
L7:
  movsbl (%r12),%esi
  mov    %r12,%rbx
  test   %sil,%sil
  jne    L23
  jmp    L14
  nopw   0x0(%rax,%rax,1)
L19:
  movsbl (%rbx),%esi
  test   %sil,%sil
  je     L14
L23:
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    %rbx,%rdx
  add    $0x1,%rbx
  test   %rax,%rax
  je     L19
  movb   $0x0,(%rdx)
  mov    %r12,%rax
  mov    %rbx,D25(%rip)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L14:
  movq   $0x0,D25(%rip)
  mov    %r12,%rax
L20:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L28:
  mov    D25(%rip),%r12
  test   %r12,%r12
  jne    L7
  xor    %eax,%eax
  jmp    L20
```

assistant: ```c
char *Strtok(char *buf, const char *delims) {
  static char *p = NULL;
  char *start, *end;
  if (buf != NULL) {
    p = buf;
  } else {
    if (p == NULL)
      return (NULL);
  }
  for (start = p, end = p;; end++) {
    if (*end == '\0') {
      p = NULL;
      break;
    }
    if (strchr(delims, (int)*end) != NULL) {
      *end++ = '\0';
      p = end;
      break;
    }
  }
  return (start);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<stringtoken>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,%eax
  mov    %rdx,-0x28(%rbp)
  mov    %al,-0x1c(%rbp)
  mov    $0x100,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x10(%rbp)
L22:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x10(%rbp)
  je     L29
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x1c(%rbp)
  je     L16
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0xc(%rbp)
  addl   $0x1,-0x10(%rbp)
  jmp    L22
L29:
  nop
  jmp    L27
L16:
  nop
L27:
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
char *stringtoken(char *string, char tag, int *log) {
  int i, j;
  char *result;
  result = (char *)malloc(256);
  j = 0;
  for (i = *log;; i++) {
    if (i == strlen(string))
      break;
    if (string[i] == tag)
      break;
    result[j] = string[i];
    j++;
  }
  *log = i + 1;
  return ((char *)result);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<stringtoken>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbp
  mov    %rdx,%r15
  mov    %esi,%r13d
  mov    $0x100,%edi
  call   <malloc@plt>
  mov    %rax,%r14
  mov    %rax,0x8(%rsp)
  movslq (%r15),%rax
  mov    %rax,%rbx
  sub    %rax,%r14
  jmp    L11
L9:
  mov    %al,-0x1(%rbx,%r14,1)
L11:
  mov    %ebx,%r12d
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  je     L28
  add    $0x1,%rbx
  movzbl -0x1(%rbp,%rbx,1),%eax
  cmp    %r13b,%al
  jne    L9
L28:
  add    $0x1,%r12d
  mov    %r12d,(%r15)
  mov    0x8(%rsp),%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
char *stringtoken(char *string, char tag, int *log) {
  int i, j;
  char *result;
  result = (char *)malloc(256);
  j = 0;
  for (i = *log;; i++) {
    if (i == strlen(string))
      break;
    if (string[i] == tag)
      break;
    result[j] = string[i];
    j++;
  }
  *log = i + 1;
  return ((char *)result);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<stringtoken>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  mov    $0x100,%edi
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x8,%rsp
  call   <malloc@plt>
  movslq (%r14),%rbx
  mov    %rax,%r12
  mov    %rax,%r13
  sub    %rbx,%r12
  jmp    L25
  nopw   0x0(%rax,%rax,1)
L18:
  add    $0x1,%rbx
  movzbl -0x1(%r15,%rbx,1),%eax
  cmp    %bpl,%al
  je     L28
  mov    %al,-0x1(%rbx,%r12,1)
L25:
  mov    %r15,%rdi
  call   <strlen@plt>
  lea    0x1(%rbx),%edx
  cmp    %ebx,%eax
  jne    L18
L28:
  mov    %edx,(%r14)
  add    $0x8,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
char *stringtoken(char *string, char tag, int *log) {
  int i, j;
  char *result;
  result = (char *)malloc(256);
  j = 0;
  for (i = *log;; i++) {
    if (i == strlen(string))
      break;
    if (string[i] == tag)
      break;
    result[j] = string[i];
    j++;
  }
  *log = i + 1;
  return ((char *)result);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<stringtoken>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  mov    $0x100,%edi
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x8,%rsp
  call   <malloc@plt>
  movslq (%r14),%rbx
  mov    %rax,%r12
  mov    %rax,%r13
  sub    %rbx,%r12
  jmp    L9
  nopw   0x0(%rax,%rax,1)
L26:
  add    $0x1,%rbx
  movzbl -0x1(%r15,%rbx,1),%eax
  cmp    %bpl,%al
  je     L27
  mov    %al,-0x1(%rbx,%r12,1)
L9:
  mov    %r15,%rdi
  call   <strlen@plt>
  lea    0x1(%rbx),%edx
  cmp    %ebx,%eax
  jne    L26
L27:
  mov    %edx,(%r14)
  add    $0x8,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
char *stringtoken(char *string, char tag, int *log) {
  int i, j;
  char *result;
  result = (char *)malloc(256);
  j = 0;
  for (i = *log;; i++) {
    if (i == strlen(string))
      break;
    if (string[i] == tag)
      break;
    result[j] = string[i];
    j++;
  }
  *log = i + 1;
  return ((char *)result);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<mp_mul_radix_test>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    %r9,-0x38(%rbp)
  mov    -0x1c(%rbp),%eax
  sar    %eax
  add    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jle    L20
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x8(%rbp)
L20:
  mov    -0x18(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x1c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L40
L23:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  subl   $0x1,-0xc(%rbp)
L40:
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jg     L23
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L29
L16:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x4(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  subl   $0x1,-0xc(%rbp)
L29:
  cmpl   $0x2,-0xc(%rbp)
  jg     L16
  mov    -0x28(%rbp),%rax
  add    $0x10,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x28(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rcx
  mov    -0x30(%rbp),%rdx
  mov    -0x28(%rbp),%rsi
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <mp_mul_csqu@plt>
  mov    -0x28(%rbp),%rdx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <mp_mul_d2i_test@plt>
  addsd  %xmm0,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

assistant: ```c
double mp_mul_radix_test(int n, int radix, int nfft, double tmpfft[], int ip[], double w[]) {
  void mp_mul_csqu(int nfft, double d1[], int ip[], double w[]);
  double mp_mul_d2i_test(int radix, int nfft, double din[]);
  int j, ndata, radix_2;
  ndata = (nfft >> 1) + 1;
  if (ndata > n) {
    ndata = n;
  }
  tmpfft[nfft + 1] = radix - 1;
  for (j = nfft; j > ndata; j--) {
    tmpfft[j] = 0;
  }
  radix_2 = (radix + 1) / 2;
  for (j = ndata; j > 2; j--) {
    tmpfft[j] = radix_2;
  }
  tmpfft[2] = radix;
  tmpfft[1] = radix - 1;
  tmpfft[0] = 0;
  mp_mul_csqu(nfft, tmpfft, ip, w);
  return 2 * mp_mul_d2i_test(radix, nfft, tmpfft);
}
```
user: Translate the below assembly code into C programming language:

```asm
<mp_mul_radix_test>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%r12d
  mov    %edx,%ebp
  mov    %rcx,%rbx
  mov    %edx,%eax
  sar    %eax
  add    $0x1,%eax
  cmp    %edi,%eax
  cmovg  %edi,%eax
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    -0x1(%rsi),%esi
  pxor   %xmm1,%xmm1
  cvtsi2sd %esi,%xmm1
  movsd  %xmm1,(%rcx,%rdx,8)
  cmp    %ebp,%eax
  jge    L29
  lea    0x0(,%rdx,8),%rcx
  sub    $0x8,%rcx
  lea    (%rbx,%rcx,1),%rdx
  lea    -0x8(%rbx,%rcx,1),%rcx
  lea    -0x1(%rbp),%esi
  sub    %eax,%esi
  shl    $0x3,%rsi
  sub    %rsi,%rcx
L6:
  movq   $0x0,(%rdx)
  sub    $0x8,%rdx
  cmp    %rcx,%rdx
  jne    L6
L29:
  lea    0x1(%r12),%ecx
  mov    %ecx,%edx
  shr    $0x1f,%edx
  add    %ecx,%edx
  sar    %edx
  cmp    $0x2,%eax
  jle    L4
  cltq
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
L39:
  movsd  %xmm0,(%rbx,%rax,8)
  sub    $0x1,%rax
  cmp    $0x2,%eax
  jg     L39
L4:
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12d,%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  %xmm1,0x8(%rbx)
  movq   $0x0,(%rbx)
  mov    %r9,%rcx
  mov    %r8,%rdx
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <mp_mul_csqu@plt>
  mov    %rbx,%rdx
  mov    %ebp,%esi
  mov    %r12d,%edi
  call   <mp_mul_d2i_test@plt>
  addsd  %xmm0,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
double mp_mul_radix_test(int n, int radix, int nfft, double tmpfft[], int ip[], double w[]) {
  void mp_mul_csqu(int nfft, double d1[], int ip[], double w[]);
  double mp_mul_d2i_test(int radix, int nfft, double din[]);
  int j, ndata, radix_2;
  ndata = (nfft >> 1) + 1;
  if (ndata > n) {
    ndata = n;
  }
  tmpfft[nfft + 1] = radix - 1;
  for (j = nfft; j > ndata; j--) {
    tmpfft[j] = 0;
  }
  radix_2 = (radix + 1) / 2;
  for (j = ndata; j > 2; j--) {
    tmpfft[j] = radix_2;
  }
  tmpfft[2] = radix;
  tmpfft[1] = radix - 1;
  tmpfft[0] = 0;
  mp_mul_csqu(nfft, tmpfft, ip, w);
  return 2 * mp_mul_d2i_test(radix, nfft, tmpfft);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<mp_mul_radix_test>:
  endbr64
  push   %r15
  mov    %edx,%eax
  pxor   %xmm1,%xmm1
  mov    %r9,%r15
  push   %r14
  sar    %eax
  mov    %r8,%r14
  push   %r13
  add    $0x1,%eax
  mov    %esi,%r13d
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x18,%rsp
  cmp    %edi,%eax
  cmovle %eax,%ebx
  movslq %edx,%rax
  lea    -0x1(%rsi),%edx
  cvtsi2sd %edx,%xmm1
  add    $0x1,%rax
  movsd  %xmm1,(%rcx,%rax,8)
  cmp    %ebp,%ebx
  jge    L13
  lea    0x0(,%rax,8),%rcx
  lea    -0x1(%rbp),%eax
  xor    %esi,%esi
  movsd  %xmm1,0x8(%rsp)
  sub    %ebx,%eax
  lea    0x8(,%rax,8),%rdx
  neg    %rax
  lea    -0x8(%rcx,%rax,8),%rdi
  add    %r12,%rdi
  call   <memset@plt>
  movsd  0x8(%rsp),%xmm1
L13:
  lea    0x1(%r13),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cmp    $0x2,%ebx
  jle    L15
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movslq %ebx,%rax
  nopl   0x0(%rax)
L11:
  movsd  %xmm0,(%r12,%rax,8)
  sub    $0x1,%rax
  cmp    $0x2,%eax
  jg     L11
L15:
  pxor   %xmm0,%xmm0
  movsd  %xmm1,0x8(%r12)
  mov    %r15,%rcx
  mov    %ebp,%edi
  cvtsi2sd %r13d,%xmm0
  movq   $0x0,(%r12)
  mov    %r14,%rdx
  mov    %r12,%rsi
  movsd  %xmm0,0x10(%r12)
  call   <mp_mul_csqu@plt>
  mov    %r12,%rdx
  mov    %ebp,%esi
  mov    %r13d,%edi
  call   <mp_mul_d2i_test@plt>
  add    $0x18,%rsp
  pop    %rbx
  addsd  %xmm0,%xmm0
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
double mp_mul_radix_test(int n, int radix, int nfft, double tmpfft[], int ip[], double w[]) {
  void mp_mul_csqu(int nfft, double d1[], int ip[], double w[]);
  double mp_mul_d2i_test(int radix, int nfft, double din[]);
  int j, ndata, radix_2;
  ndata = (nfft >> 1) + 1;
  if (ndata > n) {
    ndata = n;
  }
  tmpfft[nfft + 1] = radix - 1;
  for (j = nfft; j > ndata; j--) {
    tmpfft[j] = 0;
  }
  radix_2 = (radix + 1) / 2;
  for (j = ndata; j > 2; j--) {
    tmpfft[j] = radix_2;
  }
  tmpfft[2] = radix;
  tmpfft[1] = radix - 1;
  tmpfft[0] = 0;
  mp_mul_csqu(nfft, tmpfft, ip, w);
  return 2 * mp_mul_d2i_test(radix, nfft, tmpfft);
}
```