ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将以下的汇编代码转换成C语言代码：

```asm
<createListFromArray>:
  endbr64
  push   %r12
  xor    %eax,%eax
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %esi,%ebx
  call   <createList@plt>
  mov    %rax,%r12
  sub    $0x1,%ebx
  js     L16
  movslq %ebx,%rbx
  nop
L2:
  mov    0x0(%rbp,%rbx,4),%esi
  mov    %r12,%rdi
  sub    $0x1,%rbx
  call   <insertFirst@plt>
  test   %ebx,%ebx
  jns    L2
L16:
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
struct list *createListFromArray(int *a, int sz) {
  struct list *result = createList();
  for (int i = sz - 1; i >= 0; --i)
    insertFirst(result, a[i]);
  return result;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<createListFromArray>:
  endbr64
  push   %r12
  xor    %eax,%eax
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %esi,%ebx
  call   <createList@plt>
  mov    %rax,%r12
  sub    $0x1,%ebx
  js     L5
  movslq %ebx,%rbx
  nop
L17:
  mov    0x0(%rbp,%rbx,4),%esi
  mov    %r12,%rdi
  sub    $0x1,%rbx
  call   <insertFirst@plt>
  test   %ebx,%ebx
  jns    L17
L5:
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
struct list *createListFromArray(int *a, int sz) {
  struct list *result = createList();
  for (int i = sz - 1; i >= 0; --i)
    insertFirst(result, a[i]);
  return result;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<isSafe>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L38
L24:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L36
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x18(%rbp)
  jne    L36
  mov    $0x0,%eax
  jmp    L44
L36:
  addl   $0x1,-0x4(%rbp)
L38:
  mov    -0x4(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L24
  mov    $0x1,%eax
L44:
  pop    %rbp
  ret
```

assistant: ```c
int isSafe(int ver, int col, int solution[], int **graph) {
  for (int i = 0; i < ver; i++) {
    if (graph[ver][i] && col == solution[i])
      return 0;
  }
  return 1;
}
```
user: What is the c source code of the assembly code below?

```asm
<isSafe>:
  endbr64
  test   %edi,%edi
  jle    L12
  movslq %edi,%rax
  mov    (%rcx,%rax,8),%rcx
  mov    %edi,%edi
  mov    $0x0,%eax
  jmp    L44
L2:
  add    $0x1,%rax
  cmp    %rdi,%rax
  je     L3
L44:
  cmpl   $0x0,(%rcx,%rax,4)
  je     L2
  cmp    %esi,(%rdx,%rax,4)
  jne    L2
  mov    $0x0,%eax
  ret
L3:
  mov    $0x1,%eax
  ret
L12:
  mov    $0x1,%eax
  ret
```

assistant: ```c
int isSafe(int ver, int col, int solution[], int **graph) {
  for (int i = 0; i < ver; i++) {
    if (graph[ver][i] && col == solution[i])
      return 0;
  }
  return 1;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<isSafe>:
  endbr64
  test   %edi,%edi
  jle    L6
  movslq %edi,%rdi
  xor    %eax,%eax
  mov    (%rcx,%rdi,8),%rcx
  nopl   0x0(%rax)
L2:
  mov    (%rcx,%rax,4),%r8d
  test   %r8d,%r8d
  je     L10
  cmp    %esi,(%rdx,%rax,4)
  je     L11
L10:
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L2
L6:
  mov    $0x1,%eax
  ret
  nopl   (%rax)
L11:
  xor    %eax,%eax
  ret
```

assistant: ```c
int isSafe(int ver, int col, int solution[], int **graph) {
  for (int i = 0; i < ver; i++) {
    if (graph[ver][i] && col == solution[i])
      return 0;
  }
  return 1;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<isSafe>:
  endbr64
  test   %edi,%edi
  jle    L10
  movslq %edi,%rdi
  xor    %eax,%eax
  mov    (%rcx,%rdi,8),%rcx
  nopl   0x0(%rax)
L0:
  mov    (%rcx,%rax,4),%r8d
  test   %r8d,%r8d
  je     L23
  cmp    %esi,(%rdx,%rax,4)
  je     L32
L23:
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L0
L10:
  mov    $0x1,%eax
  ret
  nopl   (%rax)
L32:
  xor    %eax,%eax
  ret
```

assistant: ```c
int isSafe(int ver, int col, int solution[], int **graph) {
  for (int i = 0; i < ver; i++) {
    if (graph[ver][i] && col == solution[i])
      return 0;
  }
  return 1;
}
```
user: Translate the below assembly code into C programming language:

```asm
<vec3_abs>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movss  (%rax),%xmm0
  movss  D29(%rip),%xmm1
  andps  %xmm1,%xmm0
  mov    -0x8(%rbp),%rax
  movss  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  add    $0x4,%rax
  movss  (%rax),%xmm0
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  movss  D29(%rip),%xmm1
  andps  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  add    $0x8,%rax
  movss  (%rax),%xmm0
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  movss  D29(%rip),%xmm1
  andps  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%rax
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: data_label: D29
type_guessed: dword

tool: D29: 2147483647

assistant: ```c
float *vec3_abs(float *result, float *a) {
  result[0] = fabsf(a[0]);
  result[1] = fabsf(a[1]);
  result[2] = fabsf(a[2]);
  return result;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<vec3_abs>:
  endbr64
  mov    %rdi,%rax
  movss  (%rsi),%xmm0
  movss  D7(%rip),%xmm1
  andps  %xmm1,%xmm0
  movss  %xmm0,(%rdi)
  movss  0x4(%rsi),%xmm0
  andps  %xmm1,%xmm0
  movss  %xmm0,0x4(%rdi)
  movss  0x8(%rsi),%xmm0
  andps  %xmm1,%xmm0
  movss  %xmm0,0x8(%rdi)
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D7
type: dword

tool: D7: 2147483647

assistant: ```c
float *vec3_abs(float *result, float *a) {
  result[0] = fabsf(a[0]);
  result[1] = fabsf(a[1]);
  result[2] = fabsf(a[2]);
  return result;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<vec3_abs>:
  endbr64
  movss  (%rsi),%xmm0
  movss  D1(%rip),%xmm1
  mov    %rdi,%rax
  andps  %xmm1,%xmm0
  movss  %xmm0,(%rdi)
  movss  0x4(%rsi),%xmm0
  andps  %xmm1,%xmm0
  movss  %xmm0,0x4(%rdi)
  movss  0x8(%rsi),%xmm0
  andps  %xmm1,%xmm0
  movss  %xmm0,0x8(%rdi)
  ret
```

tool_calls: name: retrieve_data
arguments: label: D1
type_infered: dword

tool: D1: 2147483647

assistant: ```c
float *vec3_abs(float *result, float *a) {
  result[0] = fabsf(a[0]);
  result[1] = fabsf(a[1]);
  result[2] = fabsf(a[2]);
  return result;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<vec3_abs>:
  endbr64
  movss  (%rsi),%xmm0
  movss  D7(%rip),%xmm1
  mov    %rdi,%rax
  andps  %xmm1,%xmm0
  movss  %xmm0,(%rdi)
  movss  0x4(%rsi),%xmm0
  andps  %xmm1,%xmm0
  movss  %xmm0,0x4(%rdi)
  movss  0x8(%rsi),%xmm0
  andps  %xmm1,%xmm0
  movss  %xmm0,0x8(%rdi)
  ret
```

tool_calls: name: unpack_data
arguments: label: D7
datatype: dword

tool: D7: 2147483647

assistant: ```c
float *vec3_abs(float *result, float *a) {
  result[0] = fabsf(a[0]);
  result[1] = fabsf(a[1]);
  result[2] = fabsf(a[2]);
  return result;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<very_complex_function>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x24(%rbp)
  mov    -0x38(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x20(%rbp),%rax
  lea    D4(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L8
  movl   $0x1,-0x24(%rbp)
L8:
  mov    -0x24(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L13
  call   <__stack_chk_fail@plt>
L13:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D4
type_guessed: string

tool: D4: V3RY53cr37

assistant: ```c
int very_complex_function(char *password) {
  char buffer[16];
  int result;
  result = 0;
  strcpy(buffer, password);
  if (strcmp(buffer, "V3RY53cr37") == 0)
    result = 1;
  return result;
}
```
user: Translate the below assembly code into C programming language:

```asm
<very_complex_function>:
  endbr64
  push   %rbx
  sub    $0x20,%rsp
  mov    %rdi,%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  mov    %rbx,%rdi
  call   <strcpy@plt>
  lea    D6(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  sete   %al
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L6
  movzbl %al,%eax
  add    $0x20,%rsp
  pop    %rbx
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D6
type_guessed: string

tool: D6: V3RY53cr37

assistant: ```c
int very_complex_function(char *password) {
  char buffer[16];
  int result;
  result = 0;
  strcpy(buffer, password);
  if (strcmp(buffer, "V3RY53cr37") == 0)
    result = 1;
  return result;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<very_complex_function>:
  endbr64
  push   %rbp
  mov    %rdi,%rsi
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <strcpy@plt>
  lea    D0(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  sete   %al
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L4
  add    $0x20,%rsp
  movzbl %al,%eax
  pop    %rbp
  ret
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D0
type_guessed: string

tool: D0: V3RY53cr37

assistant: ```c
int very_complex_function(char *password) {
  char buffer[16];
  int result;
  result = 0;
  strcpy(buffer, password);
  if (strcmp(buffer, "V3RY53cr37") == 0)
    result = 1;
  return result;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<very_complex_function>:
  endbr64
  push   %rbp
  mov    %rdi,%rsi
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <strcpy@plt>
  lea    D0(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  sete   %al
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L6
  add    $0x20,%rsp
  movzbl %al,%eax
  pop    %rbp
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D0
data_type: string

tool: D0: V3RY53cr37

assistant: ```c
int very_complex_function(char *password) {
  char buffer[16];
  int result;
  result = 0;
  strcpy(buffer, password);
  if (strcmp(buffer, "V3RY53cr37") == 0)
    result = 1;
  return result;
}
```
user: What is the c source code of the assembly code below:

```asm
<fixed_xor>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  call   <strlen@plt>
  mov    %eax,%r9d
  cltq
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L42:
  cmp    %rdx,%rsp
  je     L10
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L42
L10:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L13
  orq    $0x0,-0x8(%rsp,%rax,1)
L13:
  mov    %rsp,%r13
  test   %r9d,%r9d
  jle    L46
  mov    %r9d,%r8d
  mov    $0x0,%edx
L58:
  movsbl (%rbx,%rdx,1),%edi
  lea    -0x30(%rdi),%eax
  movsbl (%r12,%rdx,1),%esi
  lea    -0x30(%rsi),%ecx
  sub    $0x57,%edi
  cmp    $0x9,%eax
  cmovg  %edi,%eax
  sub    $0x57,%esi
  cmp    $0x9,%ecx
  cmovg  %esi,%ecx
  xor    %ecx,%eax
  lea    0x30(%rax),%ecx
  add    $0x57,%eax
  cmp    $0x39,%cl
  cmovg  %eax,%ecx
  mov    %cl,0x0(%r13,%rdx,1)
  add    $0x1,%rdx
  cmp    %r8,%rdx
  jne    L58
L46:
  movslq %r9d,%rax
  movb   $0x0,0x0(%r13,%rax,1)
  mov    %r9d,%edi
  call   <malloc@plt>
  mov    %rax,%rbx
  mov    %r13,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L52
  mov    %rbx,%rax
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
L52:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *fixed_xor(char *buffer1, char *buffer2) {
  int length = strlen(buffer1);
  char result[length];
  int i, b1, b2;
  for (i = 0; i < length; i++) {
    b1 = buffer1[i] - '0';
    b2 = buffer2[i] - '0';
    if (b1 >= 10)
      b1 -= 39;
    if (b2 >= 10)
      b2 -= 39;
    int hexNumber = (b1 ^ b2);
    char encodeCharater = hexNumber + '0';
    if (encodeCharater > 57)
      encodeCharater += 39;
    result[i] = encodeCharater;
  }
  result[length] = '\0';
  char *res = malloc(length);
  strcpy(res, result);
  return res;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<fixed_xor>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  call   <strlen@plt>
  mov    %rsp,%rcx
  movslq %eax,%r8
  lea    0xf(%r8),%rax
  mov    %r8,%r9
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L38
L25:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L25
L38:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L14
L63:
  mov    %rsp,%r13
  test   %r9d,%r9d
  jle    L43
  xor    %edx,%edx
  xchg   %ax,%ax
L69:
  movsbl (%rbx,%rdx,1),%edi
  movsbl (%r12,%rdx,1),%esi
  lea    -0x30(%rdi),%eax
  lea    -0x30(%rsi),%ecx
  sub    $0x57,%edi
  cmp    $0x9,%eax
  cmovg  %edi,%eax
  sub    $0x57,%esi
  cmp    $0x9,%ecx
  cmovg  %esi,%ecx
  xor    %ecx,%eax
  lea    0x30(%rax),%ecx
  add    $0x57,%eax
  cmp    $0x39,%cl
  cmovg  %eax,%ecx
  mov    %cl,0x0(%r13,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdx,%r8
  jne    L69
L43:
  mov    %r9d,%edi
  movb   $0x0,0x0(%r13,%r8,1)
  call   <malloc@plt>
  mov    %r13,%rsi
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <strcpy@plt>
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L32
  lea    -0x18(%rbp),%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
  cs nopw 0x0(%rax,%rax,1)
L14:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L63
L32:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *fixed_xor(char *buffer1, char *buffer2) {
  int length = strlen(buffer1);
  char result[length];
  int i, b1, b2;
  for (i = 0; i < length; i++) {
    b1 = buffer1[i] - '0';
    b2 = buffer2[i] - '0';
    if (b1 >= 10)
      b1 -= 39;
    if (b2 >= 10)
      b2 -= 39;
    int hexNumber = (b1 ^ b2);
    char encodeCharater = hexNumber + '0';
    if (encodeCharater > 57)
      encodeCharater += 39;
    result[i] = encodeCharater;
  }
  result[length] = '\0';
  char *res = malloc(length);
  strcpy(res, result);
  return res;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<vo_draw_alpha_rgb24_C>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %rdx,-0x30(%rbp)
  mov    %rcx,-0x38(%rbp)
  mov    %r8d,-0x3c(%rbp)
  mov    %r9,-0x48(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L20
L48:
  mov    -0x48(%rbp),%r12
  mov    $0x0,%ebx
  jmp    L19
L34:
  movslq %ebx,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L43
  movzbl (%r12),%eax
  movzbl %al,%edx
  movslq %ebx,%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   %edx,%eax
  sar    $0x8,%eax
  mov    %eax,%ecx
  movslq %ebx,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  add    %ecx,%eax
  mov    %al,(%r12)
  lea    0x1(%r12),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  movslq %ebx,%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   %edx,%eax
  sar    $0x8,%eax
  mov    %eax,%ecx
  movslq %ebx,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  lea    0x1(%r12),%rax
  add    %ecx,%edx
  mov    %dl,(%rax)
  lea    0x2(%r12),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  movslq %ebx,%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   %edx,%eax
  sar    $0x8,%eax
  mov    %eax,%ecx
  movslq %ebx,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  lea    0x2(%r12),%rax
  add    %ecx,%edx
  mov    %dl,(%rax)
L43:
  add    $0x3,%r12
  add    $0x1,%ebx
L19:
  cmp    -0x24(%rbp),%ebx
  jl     L34
  mov    -0x3c(%rbp),%eax
  cltq
  add    %rax,-0x30(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  add    %rax,-0x38(%rbp)
  mov    0x10(%rbp),%eax
  cltq
  add    %rax,-0x48(%rbp)
  addl   $0x1,-0x14(%rbp)
L20:
  mov    -0x14(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L48
  nop
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

assistant: ```c
void vo_draw_alpha_rgb24_C(int w, int h, unsigned char *src, unsigned char *srca, int srcstride, unsigned char *dstbase, int dststride) {
  int y;
  for (y = 0; y < h; y++) {
    register unsigned char *dst = dstbase;
    register int x;
    for (x = 0; x < w; x++) {
      if (srca[x]) {
        dst[0] = ((dst[0] * srca[x]) >> 8) + src[x];
        dst[1] = ((dst[1] * srca[x]) >> 8) + src[x];
        dst[2] = ((dst[2] * srca[x]) >> 8) + src[x];
      }
      dst += 3;
    }
    src += srcstride;
    srca += srcstride;
    dstbase += dststride;
  }
  return;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<vo_draw_alpha_rgb24_C>:
  endbr64
  test   %esi,%esi
  jle    L51
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r11d
  mov    %esi,%ebx
  mov    %rdx,%r10
  mov    %rcx,%rbp
  movslq 0x30(%rsp),%r13
  lea    -0x1(%rdi),%eax
  lea    0x3(%rax,%rax,2),%rdi
  add    %r9,%rdi
  mov    $0x0,%r12d
  movslq %r8d,%r8
  jmp    L18
L77:
  add    $0x3,%rax
  add    $0x1,%rdx
  add    $0x1,%rsi
  cmp    %rdi,%rax
  je     L19
L25:
  movzbl (%rdx),%r14d
  test   %r14b,%r14b
  je     L77
  movzbl (%rax),%ecx
  movzbl %r14b,%r14d
  imul   %r14d,%ecx
  sar    $0x8,%ecx
  add    (%rsi),%cl
  mov    %cl,(%rax)
  movzbl 0x1(%rax),%ecx
  movzbl (%rdx),%r14d
  imul   %r14d,%ecx
  sar    $0x8,%ecx
  add    (%rsi),%cl
  mov    %cl,0x1(%rax)
  movzbl 0x2(%rax),%ecx
  movzbl (%rdx),%r14d
  imul   %r14d,%ecx
  sar    $0x8,%ecx
  add    (%rsi),%cl
  mov    %cl,0x2(%rax)
  jmp    L77
L19:
  add    %r8,%r10
  add    %r8,%rbp
  add    %r13,%r9
  add    $0x1,%r12d
  add    %r13,%rdi
  cmp    %r12d,%ebx
  je     L43
L18:
  mov    %rbp,%rdx
  mov    %r10,%rsi
  mov    %r9,%rax
  test   %r11d,%r11d
  jg     L25
  jmp    L19
L43:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L51:
  ret
```

assistant: ```c
void vo_draw_alpha_rgb24_C(int w, int h, unsigned char *src, unsigned char *srca, int srcstride, unsigned char *dstbase, int dststride) {
  int y;
  for (y = 0; y < h; y++) {
    register unsigned char *dst = dstbase;
    register int x;
    for (x = 0; x < w; x++) {
      if (srca[x]) {
        dst[0] = ((dst[0] * srca[x]) >> 8) + src[x];
        dst[1] = ((dst[1] * srca[x]) >> 8) + src[x];
        dst[2] = ((dst[2] * srca[x]) >> 8) + src[x];
      }
      dst += 3;
    }
    src += srcstride;
    srca += srcstride;
    dstbase += dststride;
  }
  return;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<vo_draw_alpha_rgb24_C>:
  endbr64
  test   %esi,%esi
  jle    L0
  lea    -0x1(%rdi),%eax
  push   %r14
  mov    %edi,%r11d
  mov    %rdx,%r10
  push   %r13
  lea    0x3(%rax,%rax,2),%rdi
  push   %r12
  add    %r9,%rdi
  movslq %r8d,%r12
  xor    %r8d,%r8d
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  movslq 0x30(%rsp),%r13
  mov    %esi,%ebx
  nopl   (%rax)
L13:
  mov    %rbp,%rdx
  mov    %r10,%rsi
  mov    %r9,%rax
  test   %r11d,%r11d
  jle    L40
  cs nopw 0x0(%rax,%rax,1)
L12:
  movzbl (%rdx),%r14d
  test   %r14b,%r14b
  je     L36
  movzbl (%rax),%ecx
  imul   %r14d,%ecx
  sar    $0x8,%ecx
  add    (%rsi),%cl
  mov    %cl,(%rax)
  movzbl 0x1(%rax),%ecx
  movzbl (%rdx),%r14d
  imul   %r14d,%ecx
  sar    $0x8,%ecx
  add    (%rsi),%cl
  mov    %cl,0x1(%rax)
  movzbl 0x2(%rax),%ecx
  movzbl (%rdx),%r14d
  imul   %r14d,%ecx
  sar    $0x8,%ecx
  add    (%rsi),%cl
  mov    %cl,0x2(%rax)
L36:
  add    $0x3,%rax
  add    $0x1,%rdx
  add    $0x1,%rsi
  cmp    %rdi,%rax
  jne    L12
L40:
  add    $0x1,%r8d
  add    %r12,%r10
  add    %r12,%rbp
  add    %r13,%r9
  add    %r13,%rdi
  cmp    %r8d,%ebx
  jne    L13
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L0:
  ret
```

assistant: ```c
void vo_draw_alpha_rgb24_C(int w, int h, unsigned char *src, unsigned char *srca, int srcstride, unsigned char *dstbase, int dststride) {
  int y;
  for (y = 0; y < h; y++) {
    register unsigned char *dst = dstbase;
    register int x;
    for (x = 0; x < w; x++) {
      if (srca[x]) {
        dst[0] = ((dst[0] * srca[x]) >> 8) + src[x];
        dst[1] = ((dst[1] * srca[x]) >> 8) + src[x];
        dst[2] = ((dst[2] * srca[x]) >> 8) + src[x];
      }
      dst += 3;
    }
    src += srcstride;
    srca += srcstride;
    dstbase += dststride;
  }
  return;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<vo_draw_alpha_rgb24_C>:
  endbr64
  test   %esi,%esi
  jle    L36
  movslq %edi,%rax
  push   %r13
  push   %r12
  push   %rbp
  movslq %r8d,%rbp
  push   %rbx
  movslq 0x28(%rsp),%r12
  test   %eax,%eax
  jle    L7
  lea    (%rax,%rax,2),%rdi
  mov    %esi,%r11d
  mov    %rdx,%r10
  mov    %rcx,%rbx
  add    %r9,%rdi
  xor    %r8d,%r8d
  nopl   0x0(%rax,%rax,1)
L24:
  mov    %rbx,%rdx
  mov    %r10,%rsi
  mov    %r9,%rax
  nopl   0x0(%rax)
L48:
  movzbl (%rdx),%r13d
  test   %r13b,%r13b
  je     L2
  movzbl (%rax),%ecx
  imul   %r13d,%ecx
  sar    $0x8,%ecx
  add    (%rsi),%cl
  mov    %cl,(%rax)
  movzbl 0x1(%rax),%ecx
  movzbl (%rdx),%r13d
  imul   %r13d,%ecx
  sar    $0x8,%ecx
  add    (%rsi),%cl
  mov    %cl,0x1(%rax)
  movzbl 0x2(%rax),%ecx
  movzbl (%rdx),%r13d
  imul   %r13d,%ecx
  sar    $0x8,%ecx
  add    (%rsi),%cl
  mov    %cl,0x2(%rax)
L2:
  add    $0x3,%rax
  add    $0x1,%rdx
  add    $0x1,%rsi
  cmp    %rdi,%rax
  jne    L48
  add    $0x1,%r8d
  add    %rbp,%r10
  add    %rbp,%rbx
  add    %r12,%r9
  add    %r12,%rdi
  cmp    %r8d,%r11d
  jne    L24
L7:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L36:
  ret
```

assistant: ```c
void vo_draw_alpha_rgb24_C(int w, int h, unsigned char *src, unsigned char *srca, int srcstride, unsigned char *dstbase, int dststride) {
  int y;
  for (y = 0; y < h; y++) {
    register unsigned char *dst = dstbase;
    register int x;
    for (x = 0; x < w; x++) {
      if (srca[x]) {
        dst[0] = ((dst[0] * srca[x]) >> 8) + src[x];
        dst[1] = ((dst[1] * srca[x]) >> 8) + src[x];
        dst[2] = ((dst[2] * srca[x]) >> 8) + src[x];
      }
      dst += 3;
    }
    src += srcstride;
    srca += srcstride;
    dstbase += dststride;
  }
  return;
}
```