ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Demonstrate the C code that generates the assembly output below:

```asm
<writeFile>:
  endbr64
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %rsi,%r12
  lea    D8(%rip),%rsi
  push   %rbp
  call   <fopen@plt>
  mov    %r13d,%edx
  mov    %r12,%rdi
  mov    $0x1,%esi
  mov    %rax,%rcx
  mov    %rax,%rbp
  call   <fwrite@plt>
  mov    %rbp,%rdi
  mov    %eax,%r12d
  call   <fclose@plt>
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: read_data
arguments: label: D8
type_infered: string

tool: D8: wb

assistant: ```c
int writeFile(const char *filename, char *data, int size) {
  FILE *f = fopen(filename, "wb");
  int written = fwrite(data, sizeof(char), size, f);
  fclose(f);
  return written;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<writeFile>:
  endbr64
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %rsi,%r12
  lea    D5(%rip),%rsi
  push   %rbp
  call   <fopen@plt>
  mov    %r13d,%edx
  mov    %r12,%rdi
  mov    $0x1,%esi
  mov    %rax,%rcx
  mov    %rax,%rbp
  call   <fwrite@plt>
  mov    %rbp,%rdi
  mov    %eax,%r12d
  call   <fclose@plt>
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D5
data_type: string

tool: D5: wb

assistant: ```c
int writeFile(const char *filename, char *data, int size) {
  FILE *f = fopen(filename, "wb");
  int written = fwrite(data, sizeof(char), size, f);
  fclose(f);
  return written;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<ColorTableBlue>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movss  %xmm0,-0x4(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x4(%rbp),%xmm1
  movsd  D23(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L9
  movss  D44(%rip),%xmm0
  jmp    L2
L9:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x4(%rbp),%xmm1
  movsd  D8(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L33
  pxor   %xmm0,%xmm0
  cvtss2sd -0x4(%rbp),%xmm0
  movsd  D23(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  D53(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D55(%rip),%xmm0
  subsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  jmp    L2
L33:
  pxor   %xmm0,%xmm0
L2:
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: label: D23
data_type: f64
name: disassemble_data
arguments: label: D44
data_type: f32
name: disassemble_data
arguments: label: D8
data_type: f64
name: disassemble_data
arguments: label: D53
data_type: byte[8]
name: disassemble_data
arguments: label: D55
data_type: f32[2]

tool: D23: 0.33

tool: D44: 1

tool: D8: 0.67

tool: {"D53": [0xc3,0xf5,0x28,0x5c,0x8f,0xc2,0xd5,0x3f]}

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

assistant: ```c
float ColorTableBlue(float c) {
  if (c < 0.33)
    return 1.0;
  if (c < 0.67)
    return 1.0 - (c - 0.33) / (0.67 - 0.33);
  return 0.0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<ColorTableBlue>:
  endbr64
  cvtss2sd %xmm0,%xmm0
  movsd  D38(%rip),%xmm1
  comisd %xmm0,%xmm1
  ja     L18
  movsd  D50(%rip),%xmm1
  comisd %xmm0,%xmm1
  ja     L15
  pxor   %xmm0,%xmm0
  ret
L15:
  subsd  D38(%rip),%xmm0
  divsd  D24(%rip),%xmm0
  movsd  D58(%rip),%xmm1
  subsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm1,%xmm0
  ret
L18:
  movss  D12(%rip),%xmm0
  ret
```

tool_calls: name: disassemble_data
arguments: label: D38
datatype: f64
name: disassemble_data
arguments: label: D50
datatype: f64
name: disassemble_data
arguments: label: D24
datatype: byte[8]
name: disassemble_data
arguments: label: D58
datatype: f64
name: disassemble_data
arguments: label: D12
datatype: byte[4]

tool: D38: 0.33

tool: D50: 0.67

tool: {"D24": [0xc3,0xf5,0x28,0x5c,0x8f,0xc2,0xd5,0x3f]}

tool: D58: 1

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

assistant: ```c
float ColorTableBlue(float c) {
  if (c < 0.33)
    return 1.0;
  if (c < 0.67)
    return 1.0 - (c - 0.33) / (0.67 - 0.33);
  return 0.0;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<ColorTableBlue>:
  endbr64
  movsd  D3(%rip),%xmm1
  cvtss2sd %xmm0,%xmm0
  comisd %xmm0,%xmm1
  ja     L18
  movsd  D7(%rip),%xmm2
  comisd %xmm0,%xmm2
  ja     L17
  pxor   %xmm0,%xmm0
  ret
  nopl   0x0(%rax)
L17:
  subsd  %xmm1,%xmm0
  movsd  D42(%rip),%xmm1
  divsd  D41(%rip),%xmm0
  subsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm1,%xmm0
  ret
  nopl   0x0(%rax)
L18:
  movss  D36(%rip),%xmm0
  ret
```

tool_calls: name: unpack_data
arguments: tag: D3
type: f64
name: unpack_data
arguments: tag: D7
type: f64
name: unpack_data
arguments: tag: D42
type: f64
name: unpack_data
arguments: tag: D41
type: byte[8]
name: unpack_data
arguments: tag: D36
type: byte[4]

tool: D3: 0.33

tool: D7: 0.67

tool: D42: 1

tool: {"D41": [0xc3,0xf5,0x28,0x5c,0x8f,0xc2,0xd5,0x3f]}

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

assistant: ```c
float ColorTableBlue(float c) {
  if (c < 0.33)
    return 1.0;
  if (c < 0.67)
    return 1.0 - (c - 0.33) / (0.67 - 0.33);
  return 0.0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<ColorTableBlue>:
  endbr64
  movsd  D40(%rip),%xmm1
  cvtss2sd %xmm0,%xmm0
  comisd %xmm0,%xmm1
  ja     L11
  movsd  D23(%rip),%xmm2
  comisd %xmm0,%xmm2
  ja     L14
  pxor   %xmm0,%xmm0
  ret
  nopl   0x0(%rax)
L14:
  subsd  %xmm1,%xmm0
  movsd  D35(%rip),%xmm1
  divsd  D5(%rip),%xmm0
  subsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm1,%xmm0
  ret
  nopl   0x0(%rax)
L11:
  movss  D21(%rip),%xmm0
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D40
type_guessed: f64
name: unpack_data
arguments: data_tag: D23
type_guessed: f64
name: unpack_data
arguments: data_tag: D35
type_guessed: f64
name: unpack_data
arguments: data_tag: D5
type_guessed: byte[8]
name: unpack_data
arguments: data_tag: D21
type_guessed: byte[4]

tool: D40: 0.33

tool: D23: 0.67

tool: D35: 1

tool: {"D5": [0xc3,0xf5,0x28,0x5c,0x8f,0xc2,0xd5,0x3f]}

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

assistant: ```c
float ColorTableBlue(float c) {
  if (c < 0.33)
    return 1.0;
  if (c < 0.67)
    return 1.0 - (c - 0.33) / (0.67 - 0.33);
  return 0.0;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movss  D23(%rip),%xmm0
  movss  %xmm0,-0x4(%rbp)
  movss  -0x4(%rbp),%xmm1
  movss  D16(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  movd   %eax,%xmm0
  call   <__print_float@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd -0x4(%rbp),%xmm0
  movsd  D35(%rip),%xmm1
  subsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  movd   %eax,%xmm0
  call   <__print_float@plt>
  movss  -0x4(%rbp),%xmm0
  addss  %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  movd   %eax,%xmm0
  call   <__print_float@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd -0x4(%rbp),%xmm0
  movsd  D21(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  movd   %eax,%xmm0
  call   <__print_float@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D23
type: f32
name: extract_symbolic_data
arguments: tag: D16
type: f32
name: extract_symbolic_data
arguments: tag: D35
type: f64
name: extract_symbolic_data
arguments: tag: D21
type: f64

tool: D23: 5.5

tool: D16: 3.5

tool: D35: 4.2

tool: D21: 1.2

assistant: ```c
int main() {
  float a;
  a = 5.5;
  __print_float(a += 3.5);
  __print_float(a -= 4.2);
  __print_float(a *= 2.0);
  __print_float(a /= 1.2);
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  movss  D16(%rip),%xmm0
  call   <__print_float@plt>
  movss  D23(%rip),%xmm0
  call   <__print_float@plt>
  movss  D13(%rip),%xmm0
  call   <__print_float@plt>
  movss  D1(%rip),%xmm0
  call   <__print_float@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: unpack_data
arguments: label: D16
type_infered: byte[4]
name: unpack_data
arguments: label: D23
type_infered: byte[4]
name: unpack_data
arguments: label: D13
type_infered: byte[4]
name: unpack_data
arguments: label: D1
type_infered: byte[4]

tool: {"D16": [0x00,0x00,0x10,0x41]}

tool: {"D23": [0x9a,0x99,0x99,0x40]}

tool: {"D13": [0x9a,0x99,0x19,0x41]}

tool: {"D1": [0x00,0x00,0x00,0x41]}

assistant: ```c
int main() {
  float a;
  a = 5.5;
  __print_float(a += 3.5);
  __print_float(a -= 4.2);
  __print_float(a *= 2.0);
  __print_float(a /= 1.2);
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  movss  D27(%rip),%xmm0
  call   <__print_float@plt>
  movss  D31(%rip),%xmm0
  call   <__print_float@plt>
  movss  D14(%rip),%xmm0
  call   <__print_float@plt>
  movss  D3(%rip),%xmm0
  call   <__print_float@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D27
type_guessed: byte[4]
name: disassemble_data
arguments: data_tag: D31
type_guessed: byte[4]
name: disassemble_data
arguments: data_tag: D14
type_guessed: byte[4]
name: disassemble_data
arguments: data_tag: D3
type_guessed: byte[4]

tool: {"D27": [0x00,0x00,0x10,0x41]}

tool: {"D31": [0x9a,0x99,0x99,0x40]}

tool: {"D14": [0x9a,0x99,0x19,0x41]}

tool: {"D3": [0x00,0x00,0x00,0x41]}

assistant: ```c
int main() {
  float a;
  a = 5.5;
  __print_float(a += 3.5);
  __print_float(a -= 4.2);
  __print_float(a *= 2.0);
  __print_float(a /= 1.2);
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  movss  D27(%rip),%xmm0
  call   <__print_float@plt>
  movss  D15(%rip),%xmm0
  call   <__print_float@plt>
  movss  D26(%rip),%xmm0
  call   <__print_float@plt>
  movss  D36(%rip),%xmm0
  call   <__print_float@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D27
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D15
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D26
type_infered: byte[4]
name: unpack_data
arguments: data_tag: D36
type_infered: byte[4]

tool: {"D27": [0x00,0x00,0x10,0x41]}

tool: {"D15": [0x9a,0x99,0x99,0x40]}

tool: {"D26": [0x9a,0x99,0x19,0x41]}

tool: {"D36": [0x00,0x00,0x00,0x41]}

assistant: ```c
int main() {
  float a;
  a = 5.5;
  __print_float(a += 3.5);
  __print_float(a -= 4.2);
  __print_float(a *= 2.0);
  __print_float(a /= 1.2);
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<byteorder_swap_pointer_16>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl 0x1(%rax),%eax
  mov    %al,-0x1(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    -0x18(%rbp),%rax
  movzbl -0x1(%rbp),%edx
  mov    %dl,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void byteorder_swap_pointer_16(unsigned char *p) {
  unsigned char c;
  c = p[1];
  p[1] = p[0];
  p[0] = c;
}
```
user: What is the c source code of the assembly code below?

```asm
<byteorder_swap_pointer_16>:
  endbr64
  movzbl 0x1(%rdi),%eax
  movzbl (%rdi),%edx
  mov    %dl,0x1(%rdi)
  mov    %al,(%rdi)
  ret
```

assistant: ```c
void byteorder_swap_pointer_16(unsigned char *p) {
  unsigned char c;
  c = p[1];
  p[1] = p[0];
  p[0] = c;
}
```
user: What is the c source code of the assembly code below:

```asm
<byteorder_swap_pointer_16>:
  endbr64
  rolw   $0x8,(%rdi)
  ret
```

assistant: ```c
void byteorder_swap_pointer_16(unsigned char *p) {
  unsigned char c;
  c = p[1];
  p[1] = p[0];
  p[0] = c;
}
```
user: Translate the below assembly code into C programming language:

```asm
<byteorder_swap_pointer_16>:
  endbr64
  rolw   $0x8,(%rdi)
  ret
```

assistant: ```c
void byteorder_swap_pointer_16(unsigned char *p) {
  unsigned char c;
  c = p[1];
  p[1] = p[0];
  p[0] = c;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movsd  -0x10(%rbp),%xmm1
  movsd  D23(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D4(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <round@plt>
  mov    %eax,%esi
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L9
  call   <__stack_chk_fail@plt>
L9:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D13
data_type: string
name: extract_symbolic_data
arguments: data_tag: D23
data_type: byte[8]
name: extract_symbolic_data
arguments: data_tag: D4
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D20
data_type: string

tool: D13: %lf

tool: {"D23": [0x00,0x00,0x00,0x00,0x00,0xa0,0xb4,0x40]}

tool: D4: 4.854

tool: D20: %d


assistant: ```c
int main() {
  double x;
  scanf("%lf", &x);
  printf("%d\n", (int)round(x * 5280 / 4.854));
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rsi
  lea    D5(%rip),%rdi
  call   <scanf@plt>
  movsd  D8(%rip),%xmm0
  mulsd  (%rsp),%xmm0
  divsd  D29(%rip),%xmm0
  call   <round@plt>
  mov    %eax,%esi
  lea    D7(%rip),%rdi
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  mov    $0x0,%eax
  add    $0x18,%rsp
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D5
data_type: string
name: unpack_data
arguments: data_label: D8
data_type: byte[8]
name: unpack_data
arguments: data_label: D29
data_type: f64
name: unpack_data
arguments: data_label: D7
data_type: string

tool: D5: %lf

tool: {"D8": [0x00,0x00,0x00,0x00,0x00,0xa0,0xb4,0x40]}

tool: D29: 4.854

tool: D7: %d


assistant: ```c
int main() {
  double x;
  scanf("%lf", &x);
  printf("%d\n", (int)round(x * 5280 / 4.854));
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  lea    D16(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rsi
  call   <scanf@plt>
  movsd  D21(%rip),%xmm0
  mulsd  (%rsp),%xmm0
  divsd  D37(%rip),%xmm0
  call   <round@plt>
  lea    D12(%rip),%rdi
  mov    %eax,%esi
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  xor    %eax,%eax
  add    $0x18,%rsp
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D16
data_type: string
name: read_data
arguments: tag: D21
data_type: byte[8]
name: read_data
arguments: tag: D37
data_type: f64
name: read_data
arguments: tag: D12
data_type: string

tool: D16: %lf

tool: {"D21": [0x00,0x00,0x00,0x00,0x00,0xa0,0xb4,0x40]}

tool: D37: 4.854

tool: D12: %d


assistant: ```c
int main() {
  double x;
  scanf("%lf", &x);
  printf("%d\n", (int)round(x * 5280 / 4.854));
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  lea    D38(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rsi
  call   <scanf@plt>
  movsd  D3(%rip),%xmm0
  mulsd  (%rsp),%xmm0
  divsd  D6(%rip),%xmm0
  call   <round@plt>
  lea    D9(%rip),%rdi
  mov    %eax,%esi
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  xor    %eax,%eax
  add    $0x18,%rsp
  ret
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D38
type_guessed: string
name: unpack_data
arguments: tag: D3
type_guessed: byte[8]
name: unpack_data
arguments: tag: D6
type_guessed: f64
name: unpack_data
arguments: tag: D9
type_guessed: string

tool: D38: %lf

tool: {"D3": [0x00,0x00,0x00,0x00,0x00,0xa0,0xb4,0x40]}

tool: D6: 4.854

tool: D9: %d


assistant: ```c
int main() {
  double x;
  scanf("%lf", &x);
  printf("%d\n", (int)round(x * 5280 / 4.854));
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<yscale_up_rgbx>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L26
L11:
  movl   $0x0,-0x18(%rbp)
  jmp    L34
L3:
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm1
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm0,%xmm1
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm2
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm2
  mov    -0x28(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  mov    -0x38(%rbp),%rax
  add    $0xc,%rax
  movss  (%rax),%xmm2
  mov    -0x28(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%ecx
  mov    -0x18(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x40(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    -0x14(%rbp),%eax
  movd   %eax,%xmm0
  call   <linear_sample_to_srgb@plt>
  mov    %al,(%rbx)
  addl   $0x1,-0x18(%rbp)
L34:
  cmpl   $0x2,-0x18(%rbp)
  jle    L3
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x3(%rax),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  addl   $0x4,-0x1c(%rbp)
L26:
  mov    -0x1c(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L11
  nop
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void yscale_up_rgbx(float **in, int len, float coeffs[4], unsigned char *out) {
  int i, j;
  float sum;
  for (i = 0; i < len; i += 4) {
    for (j = 0; j < 3; j++) {
      sum = coeffs[0] * in[0][i + j] + coeffs[1] * in[1][i + j] + coeffs[2] * in[2][i + j] + coeffs[3] * in[3][i + j];
      out[i + j] = linear_sample_to_srgb(sum);
    }
    out[i + 3] = 0;
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<yscale_up_rgbx>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rcx,(%rsp)
  test   %esi,%esi
  jle    L16
  mov    %rdi,%rbp
  mov    %rdx,%r12
  lea    -0x1(%rsi),%eax
  shr    $0x2,%eax
  add    $0x1,%eax
  mov    %eax,%eax
  shl    $0x2,%rax
  mov    %rax,0x8(%rsp)
  mov    $0xc,%r14d
  mov    $0x0,%r15d
  jmp    L22
L25:
  mov    (%rsp),%rax
  movb   $0x0,0x3(%rax,%r15,1)
  add    $0x4,%r15
  add    $0x10,%r14
  cmp    0x8(%rsp),%r15
  je     L16
L22:
  lea    -0xc(%r14),%rbx
  mov    (%rsp),%rax
  lea    (%rax,%r15,1),%r13
L5:
  mov    0x0(%rbp),%rax
  movss  (%rax,%rbx,1),%xmm0
  mulss  (%r12),%xmm0
  mov    0x8(%rbp),%rax
  movss  (%rax,%rbx,1),%xmm1
  mulss  0x4(%r12),%xmm1
  addss  %xmm1,%xmm0
  mov    0x10(%rbp),%rax
  movss  (%rax,%rbx,1),%xmm1
  mulss  0x8(%r12),%xmm1
  addss  %xmm1,%xmm0
  mov    0x18(%rbp),%rax
  movss  (%rax,%rbx,1),%xmm1
  mulss  0xc(%r12),%xmm1
  addss  %xmm1,%xmm0
  call   <linear_sample_to_srgb@plt>
  mov    %al,0x0(%r13)
  add    $0x4,%rbx
  add    $0x1,%r13
  cmp    %r14,%rbx
  jne    L5
  jmp    L25
L16:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void yscale_up_rgbx(float **in, int len, float coeffs[4], unsigned char *out) {
  int i, j;
  float sum;
  for (i = 0; i < len; i += 4) {
    for (j = 0; j < 3; j++) {
      sum = coeffs[0] * in[0][i + j] + coeffs[1] * in[1][i + j] + coeffs[2] * in[2][i + j] + coeffs[3] * in[3][i + j];
      out[i + j] = linear_sample_to_srgb(sum);
    }
    out[i + 3] = 0;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<yscale_up_rgbx>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rcx,(%rsp)
  test   %esi,%esi
  jle    L27
  lea    -0x1(%rsi),%eax
  mov    %rdi,%r15
  mov    %rdx,%r12
  mov    $0xc,%ebp
  shr    $0x2,%eax
  xor    %ebx,%ebx
  add    $0x1,%eax
  shl    $0x2,%rax
  mov    %rax,0x8(%rsp)
  nopl   (%rax)
L5:
  mov    (%rsp),%rax
  lea    0x0(,%rbx,4),%r14
  lea    (%rax,%rbx,1),%r13
L2:
  mov    (%r15),%rax
  add    $0x1,%r13
  movss  (%rax,%r14,1),%xmm0
  mov    0x8(%r15),%rax
  mulss  (%r12),%xmm0
  movss  (%rax,%r14,1),%xmm1
  mulss  0x4(%r12),%xmm1
  mov    0x10(%r15),%rax
  addss  %xmm1,%xmm0
  movss  (%rax,%r14,1),%xmm1
  mov    0x18(%r15),%rax
  mulss  0x8(%r12),%xmm1
  addss  %xmm1,%xmm0
  movss  (%rax,%r14,1),%xmm1
  add    $0x4,%r14
  mulss  0xc(%r12),%xmm1
  addss  %xmm1,%xmm0
  call   <linear_sample_to_srgb@plt>
  mov    %al,-0x1(%r13)
  cmp    %r14,%rbp
  jne    L2
  mov    (%rsp),%rax
  add    $0x10,%rbp
  movb   $0x0,0x3(%rax,%rbx,1)
  add    $0x4,%rbx
  cmp    %rbx,0x8(%rsp)
  jne    L5
L27:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void yscale_up_rgbx(float **in, int len, float coeffs[4], unsigned char *out) {
  int i, j;
  float sum;
  for (i = 0; i < len; i += 4) {
    for (j = 0; j < 3; j++) {
      sum = coeffs[0] * in[0][i + j] + coeffs[1] * in[1][i + j] + coeffs[2] * in[2][i + j] + coeffs[3] * in[3][i + j];
      out[i + j] = linear_sample_to_srgb(sum);
    }
    out[i + 3] = 0;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<yscale_up_rgbx>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rcx,(%rsp)
  test   %esi,%esi
  jle    L16
  lea    -0x1(%rsi),%eax
  mov    %rdi,%r15
  mov    %rdx,%r12
  mov    $0xc,%ebp
  shr    $0x2,%eax
  xor    %ebx,%ebx
  add    $0x1,%eax
  shl    $0x2,%rax
  mov    %rax,0x8(%rsp)
  nopl   (%rax)
L26:
  mov    (%rsp),%rax
  lea    0x0(,%rbx,4),%r14
  lea    (%rax,%rbx,1),%r13
L13:
  mov    (%r15),%rax
  add    $0x1,%r13
  movss  (%rax,%r14,1),%xmm0
  mov    0x8(%r15),%rax
  mulss  (%r12),%xmm0
  movss  (%rax,%r14,1),%xmm1
  mulss  0x4(%r12),%xmm1
  mov    0x10(%r15),%rax
  addss  %xmm1,%xmm0
  movss  (%rax,%r14,1),%xmm1
  mov    0x18(%r15),%rax
  mulss  0x8(%r12),%xmm1
  addss  %xmm1,%xmm0
  movss  (%rax,%r14,1),%xmm1
  add    $0x4,%r14
  mulss  0xc(%r12),%xmm1
  addss  %xmm1,%xmm0
  call   <linear_sample_to_srgb@plt>
  mov    %al,-0x1(%r13)
  cmp    %r14,%rbp
  jne    L13
  mov    (%rsp),%rax
  add    $0x10,%rbp
  movb   $0x0,0x3(%rax,%rbx,1)
  add    $0x4,%rbx
  cmp    %rbx,0x8(%rsp)
  jne    L26
L16:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void yscale_up_rgbx(float **in, int len, float coeffs[4], unsigned char *out) {
  int i, j;
  float sum;
  for (i = 0; i < len; i += 4) {
    for (j = 0; j < 3; j++) {
      sum = coeffs[0] * in[0][i + j] + coeffs[1] * in[1][i + j] + coeffs[2] * in[2][i + j] + coeffs[3] * in[3][i + j];
      out[i + j] = linear_sample_to_srgb(sum);
    }
    out[i + 3] = 0;
  }
}
```