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

```asm
<del_split_array>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  test   %esi,%esi
  jle    L16
  lea    -0x1(%rsi),%eax
  mov    %rdi,%rbx
  lea    0x8(%rdi,%rax,8),%rbp
  nopw   0x0(%rax,%rax,1)
L8:
  mov    (%rbx),%rdi
  add    $0x8,%rbx
  call   <free@plt>
  cmp    %rbp,%rbx
  jne    L8
L16:
  pop    %rbx
  mov    %r12,%rdi
  pop    %rbp
  pop    %r12
  jmp    1050 <free@plt>
```

assistant: ```c
void del_split_array(char **arr, int count) {
  int i;
  for (i = 0; i < count; i++)
    free(arr[i]);
  free(arr);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<del_split_array>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  test   %esi,%esi
  jle    L16
  lea    -0x1(%rsi),%eax
  mov    %rdi,%rbx
  lea    0x8(%rdi,%rax,8),%rbp
  nopw   0x0(%rax,%rax,1)
L8:
  mov    (%rbx),%rdi
  add    $0x8,%rbx
  call   <free@plt>
  cmp    %rbp,%rbx
  jne    L8
L16:
  pop    %rbx
  mov    %r12,%rdi
  pop    %rbp
  pop    %r12
  jmp    1050 <free@plt>
```

assistant: ```c
void del_split_array(char **arr, int count) {
  int i;
  for (i = 0; i < count; i++)
    free(arr[i]);
  free(arr);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<getSlashSlashParam>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movl   $0x0,-0xc(%rbp)
  mov    $0x0,%eax
  call   <getTexChar@plt>
  mov    %al,-0xd(%rbp)
  cmpb   $0x2a,-0xd(%rbp)
  je     L19
  movsbl -0xd(%rbp),%eax
  mov    %eax,%edi
  call   <ungetTexChar@plt>
L19:
  mov    $0x0,%eax
  call   <getBracketParam@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L18
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <getStringDimension@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L18:
  mov    -0xc(%rbp),%eax
  leave
  ret
```

assistant: ```c
int getSlashSlashParam(void) {
  char cThis, *vertical_space;
  int height = 0;
  cThis = getTexChar();
  if (cThis != '*')
    ungetTexChar(cThis);
  vertical_space = getBracketParam();
  if (vertical_space) {
    height = getStringDimension(vertical_space);
    free(vertical_space);
  }
  return height;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<getSlashSlashParam>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <getTexChar@plt>
  cmp    $0x2a,%al
  jne    L22
L5:
  mov    $0x0,%eax
  call   <getBracketParam@plt>
  mov    %rax,%rbx
  mov    $0x0,%ebp
  test   %rax,%rax
  je     L17
  mov    %rax,%rdi
  call   <getStringDimension@plt>
  mov    %eax,%ebp
  mov    %rbx,%rdi
  call   <free@plt>
L17:
  mov    %ebp,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L22:
  movsbl %al,%edi
  call   <ungetTexChar@plt>
  jmp    L5
```

assistant: ```c
int getSlashSlashParam(void) {
  char cThis, *vertical_space;
  int height = 0;
  cThis = getTexChar();
  if (cThis != '*')
    ungetTexChar(cThis);
  vertical_space = getBracketParam();
  if (vertical_space) {
    height = getStringDimension(vertical_space);
    free(vertical_space);
  }
  return height;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<getSlashSlashParam>:
  endbr64
  push   %r12
  xor    %eax,%eax
  push   %rbp
  sub    $0x8,%rsp
  call   <getTexChar@plt>
  cmp    $0x2a,%al
  je     L15
  movsbl %al,%edi
  call   <ungetTexChar@plt>
L15:
  xor    %eax,%eax
  xor    %r12d,%r12d
  call   <getBracketParam@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L3
  mov    %rax,%rdi
  call   <getStringDimension@plt>
  mov    %rbp,%rdi
  mov    %eax,%r12d
  call   <free@plt>
L3:
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int getSlashSlashParam(void) {
  char cThis, *vertical_space;
  int height = 0;
  cThis = getTexChar();
  if (cThis != '*')
    ungetTexChar(cThis);
  vertical_space = getBracketParam();
  if (vertical_space) {
    height = getStringDimension(vertical_space);
    free(vertical_space);
  }
  return height;
}
```
user: Translate the below assembly code into C programming language:

```asm
<getSlashSlashParam>:
  endbr64
  push   %r12
  xor    %eax,%eax
  push   %rbp
  sub    $0x8,%rsp
  call   <getTexChar@plt>
  cmp    $0x2a,%al
  je     L15
  movsbl %al,%edi
  call   <ungetTexChar@plt>
L15:
  xor    %eax,%eax
  xor    %r12d,%r12d
  call   <getBracketParam@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L1
  mov    %rax,%rdi
  call   <getStringDimension@plt>
  mov    %rbp,%rdi
  mov    %eax,%r12d
  call   <free@plt>
L1:
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int getSlashSlashParam(void) {
  char cThis, *vertical_space;
  int height = 0;
  cThis = getTexChar();
  if (cThis != '*')
    ungetTexChar(cThis);
  vertical_space = getBracketParam();
  if (vertical_space) {
    height = getStringDimension(vertical_space);
    free(vertical_space);
  }
  return height;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<setupProximity>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <I2C_setup@plt>
  test   %rax,%rax
  js     L8
  mov    $0x14,%esi
  mov    $0x83,%edi
  call   <VCNL4000_writeCmd@plt>
  mov    $0x2,%esi
  mov    $0x89,%edi
  call   <VCNL4000_writeCmd@plt>
  mov    $0x81,%esi
  mov    $0x8a,%edi
  call   <VCNL4000_writeCmd@plt>
  jmp    L15
L8:
  nop
L15:
  pop    %rbp
  ret
```

assistant: ```c
void setupProximity() {
  if (I2C_setup() < 0) {
    return;
  }
  VCNL4000_writeCmd(0x80 + 0x3, 0x14);
  VCNL4000_writeCmd(0x80 + 0x9, 0x2);
  VCNL4000_writeCmd(0x80 + 0xa, 0x81);
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<setupProximity>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <I2C_setup@plt>
  test   %rax,%rax
  js     L0
  mov    $0x14,%esi
  mov    $0x83,%edi
  call   <VCNL4000_writeCmd@plt>
  mov    $0x2,%esi
  mov    $0x89,%edi
  call   <VCNL4000_writeCmd@plt>
  mov    $0x81,%esi
  mov    $0x8a,%edi
  call   <VCNL4000_writeCmd@plt>
L0:
  add    $0x8,%rsp
  ret
```

assistant: ```c
void setupProximity() {
  if (I2C_setup() < 0) {
    return;
  }
  VCNL4000_writeCmd(0x80 + 0x3, 0x14);
  VCNL4000_writeCmd(0x80 + 0x9, 0x2);
  VCNL4000_writeCmd(0x80 + 0xa, 0x81);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<setupProximity>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <I2C_setup@plt>
  test   %rax,%rax
  js     L8
  mov    $0x14,%esi
  mov    $0x83,%edi
  call   <VCNL4000_writeCmd@plt>
  mov    $0x2,%esi
  mov    $0x89,%edi
  call   <VCNL4000_writeCmd@plt>
  mov    $0x81,%esi
  mov    $0x8a,%edi
  add    $0x8,%rsp
  jmp    1060 <VCNL4000_writeCmd@plt>
  nopl   (%rax)
L8:
  add    $0x8,%rsp
  ret
```

assistant: ```c
void setupProximity() {
  if (I2C_setup() < 0) {
    return;
  }
  VCNL4000_writeCmd(0x80 + 0x3, 0x14);
  VCNL4000_writeCmd(0x80 + 0x9, 0x2);
  VCNL4000_writeCmd(0x80 + 0xa, 0x81);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<setupProximity>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <I2C_setup@plt>
  test   %rax,%rax
  js     L7
  mov    $0x14,%esi
  mov    $0x83,%edi
  call   <VCNL4000_writeCmd@plt>
  mov    $0x2,%esi
  mov    $0x89,%edi
  call   <VCNL4000_writeCmd@plt>
  mov    $0x81,%esi
  mov    $0x8a,%edi
  add    $0x8,%rsp
  jmp    1060 <VCNL4000_writeCmd@plt>
  nopl   (%rax)
L7:
  add    $0x8,%rsp
  ret
```

assistant: ```c
void setupProximity() {
  if (I2C_setup() < 0) {
    return;
  }
  VCNL4000_writeCmd(0x80 + 0x3, 0x14);
  VCNL4000_writeCmd(0x80 + 0x9, 0x2);
  VCNL4000_writeCmd(0x80 + 0xa, 0x81);
}
```
user: What is the c source code of the assembly code below:

```asm
<calc_fib>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jne    L20
  mov    $0x0,%eax
  jmp    L24
L20:
  cmpl   $0x1,-0x14(%rbp)
  jne    L5
  mov    $0x1,%eax
  jmp    L24
L5:
  mov    -0x14(%rbp),%eax
  sub    $0x2,%eax
  mov    %eax,%edi
  call   <calc_fib>
  mov    %eax,%ebx
  mov    -0x14(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edi
  call   <calc_fib>
  add    %ebx,%eax
L24:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int calc_fib(int n) {
  if (n == 0) {
    return 0;
  } else if (n == 1) {
    return 1;
  } else
    return ((calc_fib(n - 2) + calc_fib(n - 1)));
}
```
user: Translate the below assembly code into C programming language:

```asm
<calc_fib>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%ebx
  test   %edi,%edi
  je     L14
  cmp    $0x1,%edi
  jne    L20
L14:
  mov    %ebx,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L20:
  lea    -0x2(%rdi),%edi
  call   <calc_fib>
  mov    %eax,%ebp
  lea    -0x1(%rbx),%edi
  call   <calc_fib>
  lea    0x0(%rbp,%rax,1),%ebx
  jmp    L14
```

assistant: ```c
int calc_fib(int n) {
  if (n == 0) {
    return 0;
  } else if (n == 1) {
    return 1;
  } else
    return ((calc_fib(n - 2) + calc_fib(n - 1)));
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<amplitude2signal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  cmpl   $0x3e80,-0x4(%rbp)
  jle    L213
  mov    $0x1,%eax
  jmp    L278
L213:
  cmpl   $0x1f40,-0x4(%rbp)
  jle    L124
  mov    $0x2,%eax
  jmp    L278
L124:
  cmpl   $0xfa0,-0x4(%rbp)
  jle    L12
  mov    $0x4,%eax
  jmp    L278
L12:
  cmpl   $0x7d0,-0x4(%rbp)
  jle    L165
  mov    $0x8,%eax
  jmp    L278
L165:
  cmpl   $0x3e8,-0x4(%rbp)
  jle    L152
  mov    $0x10,%eax
  jmp    L278
L152:
  cmpl   $0x1f4,-0x4(%rbp)
  jle    L188
  mov    $0x20,%eax
  jmp    L278
L188:
  cmpl   $0xfa,-0x4(%rbp)
  jle    L267
  mov    $0x40,%eax
  jmp    L278
L267:
  cmpl   $0x0,-0x4(%rbp)
  js     L82
  mov    $0x80,%eax
  jmp    L278
L82:
  cmpl   $0xffffc180,-0x4(%rbp)
  jge    L221
  mov    $0x8000,%eax
  jmp    L278
L221:
  cmpl   $0xffffe0c0,-0x4(%rbp)
  jge    L234
  mov    $0x4000,%eax
  jmp    L278
L234:
  cmpl   $0xfffff060,-0x4(%rbp)
  jge    L265
  mov    $0x2000,%eax
  jmp    L278
L265:
  cmpl   $0xfffff830,-0x4(%rbp)
  jge    L33
  mov    $0x1000,%eax
  jmp    L278
L33:
  cmpl   $0xfffffc18,-0x4(%rbp)
  jge    L258
  mov    $0x800,%eax
  jmp    L278
L258:
  cmpl   $0xfffffe0c,-0x4(%rbp)
  jge    L55
  mov    $0x400,%eax
  jmp    L278
L55:
  cmpl   $0xffffff06,-0x4(%rbp)
  jge    L261
  mov    $0x200,%eax
  jmp    L278
L261:
  mov    $0x100,%eax
L278:
  pop    %rbp
  ret
```

assistant: ```c
unsigned int amplitude2signal(int input) {
  if (input > 16000) {
    return (0x0001);
  } else if (input > 8000) {
    return (0x0002U);
  } else if (input > 4000) {
    return (0x0004U);
  } else if (input > 2000) {
    return (0x0008U);
  } else if (input > 1000) {
    return (0x0010U);
  } else if (input > 500) {
    return (0x0020U);
  } else if (input > 250) {
    return (0x0040U);
  } else if (input >= 0) {
    return (0x0080U);
  } else if (input < -16000) {
    return (0x8000U);
  } else if (input < -8000) {
    return (0x4000U);
  } else if (input < -4000) {
    return (0x2000U);
  } else if (input < -2000) {
    return (0x1000U);
  } else if (input < -1000) {
    return (0x0800U);
  } else if (input < -500) {
    return (0x0400U);
  } else if (input < -250) {
    return (0x0200U);
  } else {
    return (0x0100);
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<amplitude2signal>:
  endbr64
  mov    $0x1,%eax
  cmp    $0x3e80,%edi
  jg     L139
  mov    $0x2,%eax
  cmp    $0x1f40,%edi
  jg     L139
  mov    $0x4,%eax
  cmp    $0xfa0,%edi
  jg     L139
  mov    $0x8,%eax
  cmp    $0x7d0,%edi
  jg     L139
  mov    $0x10,%eax
  cmp    $0x3e8,%edi
  jg     L139
  mov    $0x20,%eax
  cmp    $0x1f4,%edi
  jg     L139
  mov    $0x40,%eax
  cmp    $0xfa,%edi
  jg     L139
  mov    $0x80,%eax
  test   %edi,%edi
  jns    L139
  mov    $0x8000,%eax
  cmp    $0xffffc180,%edi
  jl     L139
  mov    $0x4000,%eax
  cmp    $0xffffe0c0,%edi
  jl     L139
  mov    $0x2000,%eax
  cmp    $0xfffff060,%edi
  jl     L139
  mov    $0x1000,%eax
  cmp    $0xfffff830,%edi
  jl     L139
  mov    $0x800,%eax
  cmp    $0xfffffc18,%edi
  jl     L139
  mov    $0x400,%eax
  cmp    $0xfffffe0c,%edi
  jl     L139
  cmp    $0xffffff06,%edi
  mov    $0x200,%eax
  mov    $0x100,%edx
  cmovge %edx,%eax
L139:
  ret
```

assistant: ```c
unsigned int amplitude2signal(int input) {
  if (input > 16000) {
    return (0x0001);
  } else if (input > 8000) {
    return (0x0002U);
  } else if (input > 4000) {
    return (0x0004U);
  } else if (input > 2000) {
    return (0x0008U);
  } else if (input > 1000) {
    return (0x0010U);
  } else if (input > 500) {
    return (0x0020U);
  } else if (input > 250) {
    return (0x0040U);
  } else if (input >= 0) {
    return (0x0080U);
  } else if (input < -16000) {
    return (0x8000U);
  } else if (input < -8000) {
    return (0x4000U);
  } else if (input < -4000) {
    return (0x2000U);
  } else if (input < -2000) {
    return (0x1000U);
  } else if (input < -1000) {
    return (0x0800U);
  } else if (input < -500) {
    return (0x0400U);
  } else if (input < -250) {
    return (0x0200U);
  } else {
    return (0x0100);
  }
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<amplitude2signal>:
  endbr64
  mov    $0x1,%eax
  cmp    $0x3e80,%edi
  jg     L119
  mov    $0x2,%eax
  cmp    $0x1f40,%edi
  jg     L119
  mov    $0x4,%eax
  cmp    $0xfa0,%edi
  jg     L119
  mov    $0x8,%eax
  cmp    $0x7d0,%edi
  jg     L119
  mov    $0x10,%eax
  cmp    $0x3e8,%edi
  jg     L119
  mov    $0x20,%eax
  cmp    $0x1f4,%edi
  jg     L119
  mov    $0x40,%eax
  cmp    $0xfa,%edi
  jg     L119
  mov    $0x80,%eax
  test   %edi,%edi
  jns    L119
  mov    $0x8000,%eax
  cmp    $0xffffc180,%edi
  jl     L119
  mov    $0x4000,%eax
  cmp    $0xffffe0c0,%edi
  jl     L119
  mov    $0x2000,%eax
  cmp    $0xfffff060,%edi
  jl     L119
  mov    $0x1000,%eax
  cmp    $0xfffff830,%edi
  jl     L119
  mov    $0x800,%eax
  cmp    $0xfffffc18,%edi
  jl     L119
  mov    $0x400,%eax
  cmp    $0xfffffe0c,%edi
  jl     L119
  cmp    $0xffffff06,%edi
  mov    $0x200,%eax
  mov    $0x100,%edx
  cmovge %edx,%eax
L119:
  ret
```

assistant: ```c
unsigned int amplitude2signal(int input) {
  if (input > 16000) {
    return (0x0001);
  } else if (input > 8000) {
    return (0x0002U);
  } else if (input > 4000) {
    return (0x0004U);
  } else if (input > 2000) {
    return (0x0008U);
  } else if (input > 1000) {
    return (0x0010U);
  } else if (input > 500) {
    return (0x0020U);
  } else if (input > 250) {
    return (0x0040U);
  } else if (input >= 0) {
    return (0x0080U);
  } else if (input < -16000) {
    return (0x8000U);
  } else if (input < -8000) {
    return (0x4000U);
  } else if (input < -4000) {
    return (0x2000U);
  } else if (input < -2000) {
    return (0x1000U);
  } else if (input < -1000) {
    return (0x0800U);
  } else if (input < -500) {
    return (0x0400U);
  } else if (input < -250) {
    return (0x0200U);
  } else {
    return (0x0100);
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<amplitude2signal>:
  endbr64
  mov    $0x1,%eax
  cmp    $0x3e80,%edi
  jg     L18
  mov    $0x2,%eax
  cmp    $0x1f40,%edi
  jg     L18
  mov    $0x4,%eax
  cmp    $0xfa0,%edi
  jg     L18
  mov    $0x8,%eax
  cmp    $0x7d0,%edi
  jg     L18
  mov    $0x10,%eax
  cmp    $0x3e8,%edi
  jg     L18
  mov    $0x20,%eax
  cmp    $0x1f4,%edi
  jg     L18
  mov    $0x40,%eax
  cmp    $0xfa,%edi
  jg     L18
  mov    $0x80,%eax
  test   %edi,%edi
  jns    L18
  mov    $0x8000,%eax
  cmp    $0xffffc180,%edi
  jl     L18
  mov    $0x4000,%eax
  cmp    $0xffffe0c0,%edi
  jl     L18
  mov    $0x2000,%eax
  cmp    $0xfffff060,%edi
  jl     L18
  mov    $0x1000,%eax
  cmp    $0xfffff830,%edi
  jl     L18
  mov    $0x800,%eax
  cmp    $0xfffffc18,%edi
  jl     L18
  mov    $0x400,%eax
  cmp    $0xfffffe0c,%edi
  jl     L18
  cmp    $0xffffff06,%edi
  mov    $0x200,%eax
  mov    $0x100,%edx
  cmovge %edx,%eax
L18:
  ret
```

assistant: ```c
unsigned int amplitude2signal(int input) {
  if (input > 16000) {
    return (0x0001);
  } else if (input > 8000) {
    return (0x0002U);
  } else if (input > 4000) {
    return (0x0004U);
  } else if (input > 2000) {
    return (0x0008U);
  } else if (input > 1000) {
    return (0x0010U);
  } else if (input > 500) {
    return (0x0020U);
  } else if (input > 250) {
    return (0x0040U);
  } else if (input >= 0) {
    return (0x0080U);
  } else if (input < -16000) {
    return (0x8000U);
  } else if (input < -8000) {
    return (0x4000U);
  } else if (input < -4000) {
    return (0x2000U);
  } else if (input < -2000) {
    return (0x1000U);
  } else if (input < -1000) {
    return (0x0800U);
  } else if (input < -500) {
    return (0x0400U);
  } else if (input < -250) {
    return (0x0200U);
  } else {
    return (0x0100);
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<Base64Encode>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %esi,%esi
  jle    L122
  lea    -0x1(%rcx),%r14d
  mov    %rdi,%rbp
  xor    %r13d,%r13d
  xor    %r12d,%r12d
  lea    0x14(%rsp),%rcx
  nop
L12:
  lea    -0x1(%rsi),%ebx
  mov    $0x2,%esi
  mov    %rcx,0x8(%rsp)
  mov    %ebx,%edi
  call   <min@plt>
  mov    0x8(%rsp),%rcx
  lea    0x1(%r13),%r10d
  mov    $0x1,%edx
  mov    %eax,%r8d
  lea    0x3(%r13),%eax
L44:
  mov    %edx,%edi
  mov    0x0(%rbp),%esi
  add    $0x4,%rbp
  not    %edi
  shr    $0x1f,%edi
  test   %ebx,%ebx
  mov    %esi,0x4(%rcx,%rdx,4)
  mov    %ebx,%esi
  setg   %r9b
  sub    $0x1,%rdx
  test   %dil,%r9b
  je     L119
  sub    $0x1,%ebx
  jmp    L44
  nopl   0x0(%rax)
L119:
  add    %r10d,%r8d
  cmp    %r14d,%r12d
  jge    L86
  mov    0x14(%rsp),%edi
L1:
  mov    $0x3d,%edx
  cmp    %eax,%r8d
  jl     L143
  mov    %edi,%edx
  and    $0x3f,%edx
  cmp    $0x19,%dl
  jg     L145
  add    $0x41,%edx
L143:
  mov    %dl,(%r15,%rax,1)
  sar    $0x6,%edi
  add    $0x1,%r12d
  cmp    %rax,%r13
  je     L59
  sub    $0x1,%rax
  cmp    %r14d,%r12d
  jl     L1
  nopl   0x0(%rax)
L59:
  mov    %edi,0x14(%rsp)
L86:
  add    $0x4,%r13
  test   %ebx,%ebx
  jne    L12
  movslq %r12d,%rax
  add    %rax,%r15
L18:
  movb   $0x0,(%r15)
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L60
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L145:
  cmp    $0x33,%dl
  jg     L77
  add    $0x47,%edx
  jmp    L143
  nopw   0x0(%rax,%rax,1)
L77:
  cmp    $0x3d,%dl
  jg     L95
  sub    $0x4,%edx
  jmp    L143
  nopw   0x0(%rax,%rax,1)
L95:
  cmp    $0x3f,%dl
  sete   %dl
  lea    0x2b(,%rdx,4),%edx
  jmp    L143
L122:
  xor    %r12d,%r12d
  jmp    L18
L60:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int Base64Encode(uint8_t *pSrc, int SrcLen, char *pDest, int DstLen) {
  int idx = 0;
  uint32_t d = 0;
  uint8_t *p = (uint8_t *)&d;
  int len;
  int cnt = 0;
  while (SrcLen > 0) {
    d = 0;
    len = min(SrcLen - 1, 2);
    for (int i = 2; i >= 0 && SrcLen > 0; i--) {
      p[i] = *pSrc;
      pSrc++;
      SrcLen--;
    }
    len += 1 + idx;
    for (int i = idx + 3; i >= idx && cnt < DstLen - 1; i--) {
      if (i > len)
        pDest[i] = '=';
      else {
        pDest[i] = d & 0x3f;
        if (pDest[i] < 26)
          pDest[i] += 'A';
        else if (pDest[i] < 52)
          pDest[i] += 'a' - 26;
        else if (pDest[i] < 62)
          pDest[i] += '0' - 52;
        else if (pDest[i] == 63)
          pDest[i] = '/';
        else
          pDest[i] = '+';
      }
      d >>= 6;
      cnt++;
    }
    idx += 4;
  }
  pDest[cnt] = '\0';
  return cnt;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<Filter>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8,-0x38(%rbp)
  mov    %r9d,-0x3c(%rbp)
  mov    $0x0,%ebx
  jmp    L39
L15:
  mov    -0x38(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    %rbx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movapd %xmm1,%xmm5
  mov    $0x1,%r12d
  jmp    L33
L17:
  mov    %r12,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    %rbx,%rax
  sub    %r12,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  mov    %r12,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    %rbx,%rax
  sub    %r12,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movapd %xmm5,%xmm3
  addsd  %xmm3,%xmm0
  movapd %xmm0,%xmm5
  add    $0x1,%r12
L33:
  mov    -0x3c(%rbp),%eax
  cltq
  cmp    %rax,%r12
  jle    L17
  mov    %rbx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movapd %xmm5,%xmm4
  movsd  %xmm4,(%rax)
  add    $0x1,%rbx
L39:
  cmp    -0x28(%rbp),%rbx
  jl     L15
  nop
  nop
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

assistant: ```c
void Filter(double *ip, double *op, long nSamples, const double *a, const double *b, int order) {
  register double y;
  register long i, k;
  for (i = 0; i < nSamples; i++) {
    y = b[0] * ip[i];
    for (k = 1; k <= order; k++)
      y += (b[k] * ip[i - k]) - (a[k] * op[i - k]);
    op[i] = y;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<Filter>:
  endbr64
  test   %rdx,%rdx
  jle    L13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbp
  mov    $0xfffffffffffffff8,%rbx
  mov    $0x0,%r11d
  movslq %r9d,%r10
  add    $0x1,%r10
L10:
  mov    %r11,%r12
  movsd  (%r8),%xmm2
  mulsd  (%rdi,%r11,8),%xmm2
  test   %r9d,%r9d
  jle    L21
  mov    %rbx,%rdx
  mov    $0x1,%eax
L38:
  movsd  (%r8,%rax,8),%xmm0
  mulsd  (%rdi,%rdx,1),%xmm0
  movsd  (%rcx,%rax,8),%xmm1
  mulsd  (%rsi,%rdx,1),%xmm1
  subsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm2
  add    $0x1,%rax
  sub    $0x8,%rdx
  cmp    %r10,%rax
  jne    L38
L21:
  movsd  %xmm2,(%rsi,%r12,8)
  add    $0x1,%r11
  add    $0x8,%rbx
  cmp    %r11,%rbp
  jne    L10
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L13:
  ret
```

assistant: ```c
void Filter(double *ip, double *op, long nSamples, const double *a, const double *b, int order) {
  register double y;
  register long i, k;
  for (i = 0; i < nSamples; i++) {
    y = b[0] * ip[i];
    for (k = 1; k <= order; k++)
      y += (b[k] * ip[i - k]) - (a[k] * op[i - k]);
    op[i] = y;
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<Filter>:
  endbr64
  mov    %rcx,%r10
  movslq %r9d,%rcx
  add    $0x1,%rcx
  test   %rdx,%rdx
  jle    L29
  push   %rbp
  xor    %r11d,%r11d
  mov    $0xfffffffffffffff8,%rbp
  push   %rbx
  mov    %rdx,%rbx
  nopw   0x0(%rax,%rax,1)
L27:
  movsd  (%r8),%xmm2
  mulsd  (%rdi,%r11,8),%xmm2
  test   %r9d,%r9d
  jle    L37
  mov    %rbp,%rdx
  mov    $0x1,%eax
L25:
  movsd  (%r8,%rax,8),%xmm0
  movsd  (%r10,%rax,8),%xmm1
  add    $0x1,%rax
  mulsd  (%rdi,%rdx,1),%xmm0
  mulsd  (%rsi,%rdx,1),%xmm1
  sub    $0x8,%rdx
  subsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm2
  cmp    %rcx,%rax
  jne    L25
L37:
  movsd  %xmm2,(%rsi,%r11,8)
  add    $0x1,%r11
  add    $0x8,%rbp
  cmp    %r11,%rbx
  jne    L27
  pop    %rbx
  pop    %rbp
  ret
L29:
  ret
```

assistant: ```c
void Filter(double *ip, double *op, long nSamples, const double *a, const double *b, int order) {
  register double y;
  register long i, k;
  for (i = 0; i < nSamples; i++) {
    y = b[0] * ip[i];
    for (k = 1; k <= order; k++)
      y += (b[k] * ip[i - k]) - (a[k] * op[i - k]);
    op[i] = y;
  }
}
```