ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What would the C source look like for the assembly code provided here:

```asm
<vp8_dequant_idct_add_uv_block_neon>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %r8d,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %r9,%rbx
  sub    $0x18,%rsp
  movzwl (%r9),%eax
  mov    %rcx,0x8(%rsp)
  test   %ax,%ax
  je     L38
  test   $0xfefe,%eax
  je     L103
  mov    %r8d,%ecx
  call   <idct_dequant_full_2x_neon@plt>
L38:
  movzwl 0x2(%rbx),%eax
  lea    0x0(,%r12,4),%r15d
  movslq %r15d,%r15
  test   %ax,%ax
  je     L108
  lea    0x40(%rbp),%rdi
  lea    (%r14,%r15,1),%rdx
  test   $0xfefe,%eax
  je     L8
  mov    %r12d,%ecx
  mov    %r13,%rsi
  call   <idct_dequant_full_2x_neon@plt>
L108:
  movzwl 0x4(%rbx),%eax
  test   %ax,%ax
  je     L80
  lea    0x80(%rbp),%rdi
  test   $0xfefe,%eax
  je     L9
  mov    0x8(%rsp),%rdx
  mov    %r12d,%ecx
  mov    %r13,%rsi
  call   <idct_dequant_full_2x_neon@plt>
L80:
  movzwl 0x6(%rbx),%eax
  test   %ax,%ax
  je     L30
  mov    0x8(%rsp),%rdx
  lea    0xc0(%rbp),%rdi
  add    %r15,%rdx
  test   $0xfefe,%eax
  je     L16
  add    $0x18,%rsp
  mov    %r12d,%ecx
  mov    %r13,%rsi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <idct_dequant_full_2x_neon@plt>
  nopw   0x0(%rax,%rax,1)
L30:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L16:
  movswl 0x0(%r13),%esi
  add    $0x18,%rsp
  mov    %r12d,%ecx
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <idct_dequant_0_2x_neon@plt>
  nopl   0x0(%rax,%rax,1)
L9:
  movswl 0x0(%r13),%esi
  mov    0x8(%rsp),%rdx
  mov    %r12d,%ecx
  call   <idct_dequant_0_2x_neon@plt>
  jmp    L80
  nopw   0x0(%rax,%rax,1)
L8:
  movswl 0x0(%r13),%esi
  mov    %r12d,%ecx
  call   <idct_dequant_0_2x_neon@plt>
  jmp    L108
  nopw   0x0(%rax,%rax,1)
L103:
  movswl (%rsi),%esi
  mov    %r8d,%ecx
  call   <idct_dequant_0_2x_neon@plt>
  jmp    L38
```

assistant: ```c
void vp8_dequant_idct_add_uv_block_neon(short *q, short *dq, unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) {
  if (((short *)(eobs))[0]) {
    if (((short *)eobs)[0] & 0xfefe)
      idct_dequant_full_2x_neon(q, dq, dstu, stride);
    else
      idct_dequant_0_2x_neon(q, dq[0], dstu, stride);
  }
  q += 32;
  dstu += 4 * stride;
  if (((short *)(eobs))[1]) {
    if (((short *)eobs)[1] & 0xfefe)
      idct_dequant_full_2x_neon(q, dq, dstu, stride);
    else
      idct_dequant_0_2x_neon(q, dq[0], dstu, stride);
  }
  q += 32;
  if (((short *)(eobs))[2]) {
    if (((short *)eobs)[2] & 0xfefe)
      idct_dequant_full_2x_neon(q, dq, dstv, stride);
    else
      idct_dequant_0_2x_neon(q, dq[0], dstv, stride);
  }
  q += 32;
  dstv += 4 * stride;
  if (((short *)(eobs))[3]) {
    if (((short *)eobs)[3] & 0xfefe)
      idct_dequant_full_2x_neon(q, dq, dstv, stride);
    else
      idct_dequant_0_2x_neon(q, dq[0], dstv, stride);
  }
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<node_available>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  mov    %rdi,%rdx
  mov    %esi,%eax
  mov    $0x0,%ebx
  sub    $0x1,%eax
  jmp    L11
L22:
  mov    (%rdx),%rcx
  cmp    %rcx,%rbx
  jae    L12
  mov    (%rdx),%rbx
L12:
  sub    $0x1,%eax
  add    $0x8,%rdx
L11:
  test   %eax,%eax
  jns    L22
  mov    %rbx,%rax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
unsigned long node_available(register unsigned long *available, register int size) {
  register unsigned long max = 0;
  for (size--; size >= 0; size--, available++)
    if (max < *available)
      max = *available;
  return max;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<node_available>:
  endbr64
  test   %esi,%esi
  jle    L6
  lea    -0x1(%rsi),%eax
  lea    0x8(%rdi,%rax,8),%rcx
  mov    $0x0,%eax
L0:
  mov    (%rdi),%rdx
  cmp    %rdx,%rax
  cmovb  %rdx,%rax
  add    $0x8,%rdi
  cmp    %rcx,%rdi
  jne    L0
  ret
L6:
  mov    $0x0,%eax
  ret
```

assistant: ```c
unsigned long node_available(register unsigned long *available, register int size) {
  register unsigned long max = 0;
  for (size--; size >= 0; size--, available++)
    if (max < *available)
      max = *available;
  return max;
}
```
user: Translate the below assembly code into C programming language:

```asm
<node_available>:
  endbr64
  test   %esi,%esi
  jle    L4
  lea    -0x1(%rsi),%eax
  lea    0x8(%rdi,%rax,8),%rcx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L7:
  mov    (%rdi),%rdx
  cmp    %rdx,%rax
  cmovb  %rdx,%rax
  add    $0x8,%rdi
  cmp    %rcx,%rdi
  jne    L7
  ret
  nopl   0x0(%rax)
L4:
  xor    %eax,%eax
  ret
```

assistant: ```c
unsigned long node_available(register unsigned long *available, register int size) {
  register unsigned long max = 0;
  for (size--; size >= 0; size--, available++)
    if (max < *available)
      max = *available;
  return max;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<node_available>:
  endbr64
  test   %esi,%esi
  jle    L16
  lea    -0x1(%rsi),%eax
  lea    0x8(%rdi,%rax,8),%rcx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L8:
  mov    (%rdi),%rdx
  cmp    %rdx,%rax
  cmovb  %rdx,%rax
  add    $0x8,%rdi
  cmp    %rcx,%rdi
  jne    L8
  ret
  nopl   0x0(%rax)
L16:
  xor    %eax,%eax
  ret
```

assistant: ```c
unsigned long node_available(register unsigned long *available, register int size) {
  register unsigned long max = 0;
  for (size--; size >= 0; size--, available++)
    if (max < *available)
      max = *available;
  return max;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<mlx_int_str_str_cote>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L53
  mov    $0xffffffff,%eax
  jmp    L63
L53:
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L19
L40:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x22,%al
  jne    L96
  mov    $0x1,%eax
  sub    -0x18(%rbp),%eax
  mov    %eax,-0x18(%rbp)
L96:
  cmpl   $0x0,-0x18(%rbp)
  jne    L20
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L56
L62:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L56
  mov    -0x1c(%rbp),%eax
  jmp    L63
L56:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  cmp    %al,%cl
  je     L62
L20:
  addq   $0x1,-0x28(%rbp)
  addl   $0x1,-0x1c(%rbp)
L19:
  mov    -0x14(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L40
  mov    $0xffffffff,%eax
L63:
  leave
  ret
```

assistant: ```c
int mlx_int_str_str_cote(char *str, char *find, int len) {
  int len_f;
  int pos;
  char *s;
  char *f;
  int cote;
  len_f = strlen(find);
  if (len_f > len)
    return (-1);
  cote = 0;
  pos = 0;
  while (*(str + len_f - 1)) {
    if (*str == '"')
      cote = 1 - cote;
    if (!cote) {
      s = str;
      f = find;
      while (*(f++) == *(s++))
        if (!*f)
          return (pos);
    }
    str++;
    pos++;
  }
  return (-1);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<mlx_int_str_str_cote>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %edx,%r12d
  mov    %rsi,%rdi
  call   <strlen@plt>
  cmp    %r12d,%eax
  jg     L7
  cltq
  cmpb   $0x0,-0x1(%rbx,%rax,1)
  je     L19
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x1,%r8d
  jmp    L1
L96:
  add    $0x1,%rbx
  add    $0x1,%edi
  cmpb   $0x0,-0x1(%rbx,%rax,1)
  je     L53
L1:
  mov    %r8d,%ecx
  sub    %esi,%ecx
  cmpb   $0x22,(%rbx)
  cmove  %ecx,%esi
  test   %esi,%esi
  jne    L96
  mov    %rbp,%rdx
  mov    %rbx,%rcx
L86:
  add    $0x1,%rdx
  add    $0x1,%rcx
  movzbl -0x1(%rcx),%r9d
  cmp    %r9b,-0x1(%rdx)
  jne    L96
  cmpb   $0x0,(%rdx)
  jne    L86
L67:
  mov    %edi,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L53:
  mov    $0xffffffff,%edi
  jmp    L67
L7:
  mov    $0xffffffff,%edi
  jmp    L67
L19:
  mov    $0xffffffff,%edi
  jmp    L67
```

assistant: ```c
int mlx_int_str_str_cote(char *str, char *find, int len) {
  int len_f;
  int pos;
  char *s;
  char *f;
  int cote;
  len_f = strlen(find);
  if (len_f > len)
    return (-1);
  cote = 0;
  pos = 0;
  while (*(str + len_f - 1)) {
    if (*str == '"')
      cote = 1 - cote;
    if (!cote) {
      s = str;
      f = find;
      while (*(f++) == *(s++))
        if (!*f)
          return (pos);
    }
    str++;
    pos++;
  }
  return (-1);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<mlx_int_str_str_cote>:
  endbr64
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%rdi
  call   <strlen@plt>
  cmp    %r12d,%eax
  jg     L4
  cltq
  cmpb   $0x0,-0x1(%rbx,%rax,1)
  je     L4
  xor    %edi,%edi
  xor    %r8d,%r8d
  mov    $0x1,%r9d
  jmp    L47
  nopl   0x0(%rax)
L20:
  add    $0x1,%rbx
  add    $0x1,%r8d
  cmpb   $0x0,-0x1(%rbx,%rax,1)
  je     L4
L47:
  movzbl (%rbx),%esi
  mov    %r9d,%edx
  sub    %edi,%edx
  cmp    $0x22,%sil
  cmove  %edx,%edi
  test   %edi,%edi
  jne    L20
  movzbl 0x0(%rbp),%ecx
  mov    $0x1,%edx
  jmp    L33
  nopl   (%rax)
L55:
  movzbl (%rbx,%rdx,1),%esi
  add    $0x1,%rdx
L33:
  cmp    %sil,%cl
  jne    L20
  movzbl 0x0(%rbp,%rdx,1),%ecx
  test   %cl,%cl
  jne    L55
  pop    %rbx
  mov    %r8d,%eax
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L4:
  mov    $0xffffffff,%r8d
  pop    %rbx
  pop    %rbp
  mov    %r8d,%eax
  pop    %r12
  ret
```

assistant: ```c
int mlx_int_str_str_cote(char *str, char *find, int len) {
  int len_f;
  int pos;
  char *s;
  char *f;
  int cote;
  len_f = strlen(find);
  if (len_f > len)
    return (-1);
  cote = 0;
  pos = 0;
  while (*(str + len_f - 1)) {
    if (*str == '"')
      cote = 1 - cote;
    if (!cote) {
      s = str;
      f = find;
      while (*(f++) == *(s++))
        if (!*f)
          return (pos);
    }
    str++;
    pos++;
  }
  return (-1);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<mlx_int_str_str_cote>:
  endbr64
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%rdi
  call   <strlen@plt>
  cmp    %r12d,%eax
  jg     L46
  cltq
  cmpb   $0x0,-0x1(%rbx,%rax,1)
  je     L46
  xor    %esi,%esi
  xor    %r8d,%r8d
  mov    $0x1,%edi
  jmp    L69
  nopl   0x0(%rax,%rax,1)
L2:
  add    $0x1,%rbx
  add    $0x1,%r8d
  cmpb   $0x0,-0x1(%rbx,%rax,1)
  je     L46
L69:
  mov    %edi,%ecx
  sub    %esi,%ecx
  cmpb   $0x22,(%rbx)
  cmove  %ecx,%esi
  test   %esi,%esi
  jne    L2
  mov    %rbp,%rdx
  mov    %rbx,%rcx
  nopl   0x0(%rax,%rax,1)
L6:
  add    $0x1,%rdx
  add    $0x1,%rcx
  movzbl -0x1(%rcx),%r9d
  cmp    %r9b,-0x1(%rdx)
  jne    L2
  cmpb   $0x0,(%rdx)
  jne    L6
  pop    %rbx
  mov    %r8d,%eax
  pop    %rbp
  pop    %r12
  ret
L46:
  mov    $0xffffffff,%r8d
  pop    %rbx
  pop    %rbp
  mov    %r8d,%eax
  pop    %r12
  ret
```

assistant: ```c
int mlx_int_str_str_cote(char *str, char *find, int len) {
  int len_f;
  int pos;
  char *s;
  char *f;
  int cote;
  len_f = strlen(find);
  if (len_f > len)
    return (-1);
  cote = 0;
  pos = 0;
  while (*(str + len_f - 1)) {
    if (*str == '"')
      cote = 1 - cote;
    if (!cote) {
      s = str;
      f = find;
      while (*(f++) == *(s++))
        if (!*f)
          return (pos);
    }
    str++;
    pos++;
  }
  return (-1);
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<var_get_s32>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <var_get_u32@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  and    $0x1,%eax
  neg    %eax
  xor    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x4(%rbp),%eax
  leave
  ret
```

assistant: ```c
int var_get_s32(uint8_t *cp, const uint8_t *endp, int32_t *i) {
  int b = var_get_u32(cp, endp, (uint32_t *)i);
  *i = ((uint32_t)*i >> 1) ^ -(int32_t)(*i & 1);
  return b;
}
```
user: What is the c source code of the assembly code below?

```asm
<var_get_s32>:
  endbr64
  push   %rbx
  mov    %rdx,%rbx
  call   <var_get_u32@plt>
  mov    (%rbx),%ecx
  mov    %ecx,%edx
  and    $0x1,%edx
  neg    %edx
  sar    %ecx
  xor    %ecx,%edx
  mov    %edx,(%rbx)
  pop    %rbx
  ret
```

assistant: ```c
int var_get_s32(uint8_t *cp, const uint8_t *endp, int32_t *i) {
  int b = var_get_u32(cp, endp, (uint32_t *)i);
  *i = ((uint32_t)*i >> 1) ^ -(int32_t)(*i & 1);
  return b;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<var_get_s32>:
  endbr64
  push   %rbx
  mov    %rdx,%rbx
  call   <var_get_u32@plt>
  mov    (%rbx),%ecx
  mov    %ecx,%edx
  sar    %ecx
  and    $0x1,%edx
  neg    %edx
  xor    %ecx,%edx
  mov    %edx,(%rbx)
  pop    %rbx
  ret
```

assistant: ```c
int var_get_s32(uint8_t *cp, const uint8_t *endp, int32_t *i) {
  int b = var_get_u32(cp, endp, (uint32_t *)i);
  *i = ((uint32_t)*i >> 1) ^ -(int32_t)(*i & 1);
  return b;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<var_get_s32>:
  endbr64
  push   %rbx
  mov    %rdx,%rbx
  call   <var_get_u32@plt>
  mov    (%rbx),%ecx
  mov    %ecx,%edx
  sar    %ecx
  and    $0x1,%edx
  neg    %edx
  xor    %ecx,%edx
  mov    %edx,(%rbx)
  pop    %rbx
  ret
```

assistant: ```c
int var_get_s32(uint8_t *cp, const uint8_t *endp, int32_t *i) {
  int b = var_get_u32(cp, endp, (uint32_t *)i);
  *i = ((uint32_t)*i >> 1) ^ -(int32_t)(*i & 1);
  return b;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<makeprint>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    D8(%rip),%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  jle    L78
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <makeprint_for_mb@plt>
  jmp    L12
L73:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isprint@plt>
  test   %eax,%eax
  jne    L28
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L28
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  je     L28
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x8,%al
  je     L28
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  je     L28
  mov    -0x8(%rbp),%rax
  movb   $0x3f,(%rax)
L28:
  addq   $0x1,-0x8(%rbp)
L78:
  mov    -0x10(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  test   %rax,%rax
  jne    L73
L12:
  leave
  ret
```

assistant: ```c
void makeprint(char *s, size_t l) {
  if (MB_CUR_MAX > 1)
    return makeprint_for_mb(s, l);
  while (l--) {
    if (!isprint(((*s) & 0377)) && *s != '\n' && *s != '\r' && *s != '\b' && *s != '\t')
      *s = '?';
    s++;
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<makeprint>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    D2(%rip),%rax
  cmpl   $0x1,(%rax)
  jg     L82
  lea    (%rdi,%rsi,1),%rbp
  test   %rsi,%rsi
  jne    L16
  jmp    L96
L82:
  call   <makeprint_for_mb@plt>
L96:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L64:
  cmp    $0xd,%al
  jne    L93
L97:
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  je     L96
L16:
  movsbl (%rbx),%edi
  call   <isprint@plt>
  test   %eax,%eax
  jne    L97
  movzbl (%rbx),%eax
  cmp    $0xa,%al
  je     L97
  cmp    $0x9,%al
  jg     L64
  cmp    $0x7,%al
  jg     L97
L93:
  movb   $0x3f,(%rbx)
  jmp    L97
```

assistant: ```c
void makeprint(char *s, size_t l) {
  if (MB_CUR_MAX > 1)
    return makeprint_for_mb(s, l);
  while (l--) {
    if (!isprint(((*s) & 0377)) && *s != '\n' && *s != '\r' && *s != '\b' && *s != '\t')
      *s = '?';
    s++;
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<makeprint>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    D5(%rip),%rax
  cmpl   $0x1,(%rax)
  jg     L64
  lea    (%rdi,%rsi,1),%rbx
  test   %rsi,%rsi
  jne    L61
  jmp    L54
  nopl   0x0(%rax)
L83:
  cmp    $0x7,%al
  jg     L21
L66:
  movb   $0x3f,0x0(%rbp)
L21:
  add    $0x1,%rbp
  cmp    %rbx,%rbp
  je     L54
L61:
  movsbl 0x0(%rbp),%edi
  call   <isprint@plt>
  test   %eax,%eax
  jne    L21
  movzbl 0x0(%rbp),%eax
  cmp    $0xa,%al
  je     L21
  cmp    $0x9,%al
  jle    L83
  cmp    $0xd,%al
  jne    L66
  add    $0x1,%rbp
  cmp    %rbx,%rbp
  jne    L61
L54:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  cs nopw 0x0(%rax,%rax,1)
L64:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  jmp    1060 <makeprint_for_mb@plt>
```

assistant: ```c
void makeprint(char *s, size_t l) {
  if (MB_CUR_MAX > 1)
    return makeprint_for_mb(s, l);
  while (l--) {
    if (!isprint(((*s) & 0377)) && *s != '\n' && *s != '\r' && *s != '\b' && *s != '\t')
      *s = '?';
    s++;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<makeprint>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    D2(%rip),%rax
  cmpl   $0x1,(%rax)
  jg     L68
  lea    (%rdi,%rsi,1),%rbx
  test   %rsi,%rsi
  jne    L88
  jmp    L85
  nopl   0x0(%rax)
L11:
  cmp    $0x7,%al
  jg     L39
L69:
  movb   $0x3f,0x0(%rbp)
L39:
  add    $0x1,%rbp
  cmp    %rbx,%rbp
  je     L85
L88:
  movsbl 0x0(%rbp),%edi
  call   <isprint@plt>
  test   %eax,%eax
  jne    L39
  movzbl 0x0(%rbp),%eax
  cmp    $0xa,%al
  je     L39
  cmp    $0x9,%al
  jle    L11
  cmp    $0xd,%al
  jne    L69
  add    $0x1,%rbp
  cmp    %rbx,%rbp
  jne    L88
L85:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  cs nopw 0x0(%rax,%rax,1)
L68:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  jmp    1060 <makeprint_for_mb@plt>
```

assistant: ```c
void makeprint(char *s, size_t l) {
  if (MB_CUR_MAX > 1)
    return makeprint_for_mb(s, l);
  while (l--) {
    if (!isprint(((*s) & 0377)) && *s != '\n' && *s != '\r' && *s != '\b' && *s != '\t')
      *s = '?';
    s++;
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<FIRCalcExactBlackman>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  movsd  %xmm0,-0x20(%rbp)
  mov    %rsi,-0x28(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rdx
  mov    -0x14(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <FIRCalcExactBlackmanWindow@plt>
  mov    -0x8(%rbp),%rdx
  mov    -0x28(%rbp),%rsi
  mov    -0x20(%rbp),%rcx
  mov    -0x14(%rbp),%eax
  movq   %rcx,%xmm0
  mov    %eax,%edi
  call   <FIRCalcWindow@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  leave
  ret
```

assistant: ```c
void FIRCalcExactBlackman(int length, double cutoff, double *coeffs) {
  double *window;
  window = malloc(length * sizeof(double));
  FIRCalcExactBlackmanWindow(length, window);
  FIRCalcWindow(length, cutoff, coeffs, window);
  free(window);
}
```
user: What is the c source code of the assembly code below?

```asm
<FIRCalcExactBlackman>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%ebp
  movq   %xmm0,%r12
  mov    %rsi,%r13
  lea    0x0(,%rdi,8),%edi
  call   <malloc@plt>
  mov    %rax,%rbx
  mov    %rax,%rsi
  mov    %ebp,%edi
  call   <FIRCalcExactBlackmanWindow@plt>
  mov    %rbx,%rdx
  mov    %r13,%rsi
  movq   %r12,%xmm0
  mov    %ebp,%edi
  call   <FIRCalcWindow@plt>
  mov    %rbx,%rdi
  call   <free@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
void FIRCalcExactBlackman(int length, double cutoff, double *coeffs) {
  double *window;
  window = malloc(length * sizeof(double));
  FIRCalcExactBlackmanWindow(length, window);
  FIRCalcWindow(length, cutoff, coeffs, window);
  free(window);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<FIRCalcExactBlackman>:
  endbr64
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %edi,%r12d
  lea    0x0(,%rdi,8),%edi
  push   %rbp
  sub    $0x10,%rsp
  movsd  %xmm0,0x8(%rsp)
  call   <malloc@plt>
  mov    %r12d,%edi
  mov    %rax,%rsi
  mov    %rax,%rbp
  call   <FIRCalcExactBlackmanWindow@plt>
  mov    %r12d,%edi
  mov    %rbp,%rdx
  mov    %r13,%rsi
  movsd  0x8(%rsp),%xmm0
  call   <FIRCalcWindow@plt>
  add    $0x10,%rsp
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1080 <free@plt>
```

assistant: ```c
void FIRCalcExactBlackman(int length, double cutoff, double *coeffs) {
  double *window;
  window = malloc(length * sizeof(double));
  FIRCalcExactBlackmanWindow(length, window);
  FIRCalcWindow(length, cutoff, coeffs, window);
  free(window);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<FIRCalcExactBlackman>:
  endbr64
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %edi,%r12d
  lea    0x0(,%rdi,8),%edi
  push   %rbp
  sub    $0x10,%rsp
  movsd  %xmm0,0x8(%rsp)
  call   <malloc@plt>
  mov    %r12d,%edi
  mov    %rax,%rsi
  mov    %rax,%rbp
  call   <FIRCalcExactBlackmanWindow@plt>
  mov    %r12d,%edi
  mov    %rbp,%rdx
  mov    %r13,%rsi
  movsd  0x8(%rsp),%xmm0
  call   <FIRCalcWindow@plt>
  add    $0x10,%rsp
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1080 <free@plt>
```

assistant: ```c
void FIRCalcExactBlackman(int length, double cutoff, double *coeffs) {
  double *window;
  window = malloc(length * sizeof(double));
  FIRCalcExactBlackmanWindow(length, window);
  FIRCalcWindow(length, cutoff, coeffs, window);
  free(window);
}
```