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

```asm
<print_usage>:
  endbr64
  sub    $0x8,%rsp
  lea    D21(%rip),%rsi
  lea    D44(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D57(%rip),%rdi
  call   <puts@plt>
  lea    D69(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0x0,%eax
  call   <print_short_usage@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D24(%rip),%rdi
  call   <puts@plt>
  lea    D47(%rip),%rdi
  call   <puts@plt>
  lea    D15(%rip),%rdi
  call   <puts@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: parse_data
arguments: data_label: D21
data_type: string
name: parse_data
arguments: data_label: D44
data_type: string
name: parse_data
arguments: data_label: D57
data_type: string
name: parse_data
arguments: data_label: D69
data_type: string
name: parse_data
arguments: data_label: D24
data_type: string
name: parse_data
arguments: data_label: D47
data_type: string
name: parse_data
arguments: data_label: D15
data_type: string

tool: D21: 0.1

tool: D44: gap %s - Generalized Assignment Problem


tool: D57: Copyright Mattia Barbaresi <mattia.barbaresi@gmail.com> and Massimo Neri <hello@mneri.me>, all rights

tool: D69: reserved. Licensed under the GNU GPLv3.0.

tool: D24: Examples:

tool: D47:   gap -i dataset.txt

tool: D15:   gap -i dataset.txt -V

assistant: ```c
void print_usage() {
  printf("gap %s - Generalized Assignment Problem\n", "0.1");
  printf("Copyright Mattia Barbaresi <mattia.barbaresi@gmail.com> and Massimo Neri <hello@mneri.me>, all rights\n");
  printf("reserved. Licensed under the GNU GPLv3.0.\n");
  printf("\n");
  print_short_usage();
  printf("\n");
  printf("Examples:\n");
  printf("  gap -i dataset.txt\n");
  printf("  gap -i dataset.txt -V\n");
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<print_usage>:
  endbr64
  sub    $0x8,%rsp
  lea    D10(%rip),%rsi
  lea    D0(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D51(%rip),%rdi
  call   <puts@plt>
  lea    D53(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  xor    %eax,%eax
  call   <print_short_usage@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D69(%rip),%rdi
  call   <puts@plt>
  lea    D4(%rip),%rdi
  call   <puts@plt>
  lea    D35(%rip),%rdi
  add    $0x8,%rsp
  jmp    1090 <puts@plt>
```

tool_calls: name: parse_data
arguments: tag: D10
type: string
name: parse_data
arguments: tag: D0
type: string
name: parse_data
arguments: tag: D51
type: string
name: parse_data
arguments: tag: D53
type: string
name: parse_data
arguments: tag: D69
type: string
name: parse_data
arguments: tag: D4
type: string
name: parse_data
arguments: tag: D35
type: string

tool: D10: 0.1

tool: D0: gap %s - Generalized Assignment Problem


tool: D51: Copyright Mattia Barbaresi <mattia.barbaresi@gmail.com> and Massimo Neri <hello@mneri.me>, all rights

tool: D53: reserved. Licensed under the GNU GPLv3.0.

tool: D69: Examples:

tool: D4:   gap -i dataset.txt

tool: D35:   gap -i dataset.txt -V

assistant: ```c
void print_usage() {
  printf("gap %s - Generalized Assignment Problem\n", "0.1");
  printf("Copyright Mattia Barbaresi <mattia.barbaresi@gmail.com> and Massimo Neri <hello@mneri.me>, all rights\n");
  printf("reserved. Licensed under the GNU GPLv3.0.\n");
  printf("\n");
  print_short_usage();
  printf("\n");
  printf("Examples:\n");
  printf("  gap -i dataset.txt\n");
  printf("  gap -i dataset.txt -V\n");
}
```
user: Translate the below assembly code into C programming language:

```asm
<print_usage>:
  endbr64
  sub    $0x8,%rsp
  lea    D9(%rip),%rsi
  lea    D7(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D5(%rip),%rdi
  call   <puts@plt>
  lea    D48(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  xor    %eax,%eax
  call   <print_short_usage@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D37(%rip),%rdi
  call   <puts@plt>
  lea    D20(%rip),%rdi
  call   <puts@plt>
  lea    D68(%rip),%rdi
  add    $0x8,%rsp
  jmp    1090 <puts@plt>
```

tool_calls: name: retrieve_data
arguments: label: D9
datatype: string
name: retrieve_data
arguments: label: D7
datatype: string
name: retrieve_data
arguments: label: D5
datatype: string
name: retrieve_data
arguments: label: D48
datatype: string
name: retrieve_data
arguments: label: D37
datatype: string
name: retrieve_data
arguments: label: D20
datatype: string
name: retrieve_data
arguments: label: D68
datatype: string

tool: D9: 0.1

tool: D7: gap %s - Generalized Assignment Problem


tool: D5: Copyright Mattia Barbaresi <mattia.barbaresi@gmail.com> and Massimo Neri <hello@mneri.me>, all rights

tool: D48: reserved. Licensed under the GNU GPLv3.0.

tool: D37: Examples:

tool: D20:   gap -i dataset.txt

tool: D68:   gap -i dataset.txt -V

assistant: ```c
void print_usage() {
  printf("gap %s - Generalized Assignment Problem\n", "0.1");
  printf("Copyright Mattia Barbaresi <mattia.barbaresi@gmail.com> and Massimo Neri <hello@mneri.me>, all rights\n");
  printf("reserved. Licensed under the GNU GPLv3.0.\n");
  printf("\n");
  print_short_usage();
  printf("\n");
  printf("Examples:\n");
  printf("  gap -i dataset.txt\n");
  printf("  gap -i dataset.txt -V\n");
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<compute_scale>:
  endbr64
  push   %rbx
  sub    $0x10,%rsp
  mov    $0x0,%esi
  pxor   %xmm5,%xmm5
  movapd %xmm5,%xmm1
  movsd  %xmm5,0x8(%rsp)
  movsd  %xmm5,(%rsp)
  mov    $0x0,%ebx
  movapd %xmm5,%xmm0
  mov    $0x1,%r8d
  jmp    L28
L19:
  add    %ecx,%ebx
  imul   %r9d,%ecx
  pxor   %xmm2,%xmm2
  cvtsi2sd %ecx,%xmm2
  addsd  (%rsp),%xmm2
  movsd  %xmm2,(%rsp)
  imul   %r9d,%ecx
  pxor   %xmm2,%xmm2
  cvtsi2sd %ecx,%xmm2
  addsd  0x8(%rsp),%xmm2
  movsd  %xmm2,0x8(%rsp)
  add    $0x1,%rsi
  cmp    $0xe6a9,%rsi
  je     L34
L28:
  mov    %esi,%edx
  movswl (%rdi,%rsi,2),%r9d
  pxor   %xmm2,%xmm2
  cvtsi2sd %r9d,%xmm2
  addsd  %xmm2,%xmm1
  mov    %r9d,%eax
  imul   %r9d,%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  addsd  %xmm2,%xmm0
  mov    $0xa,%r10d
  mov    %r8d,%ecx
L45:
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%r11d
  sar    $0x1f,%r11d
  sub    %r11d,%eax
  lea    (%rax,%rax,2),%eax
  mov    %edx,%r11d
  sub    %eax,%r11d
  lea    (%rcx,%rcx,1),%eax
  cmp    $0x2,%r11d
  cmove  %eax,%ecx
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  sar    $0x1f,%edx
  mov    %edx,%r11d
  mov    %eax,%edx
  sub    %r11d,%edx
  sub    $0x1,%r10d
  jne    L45
  jmp    L19
L34:
  movsd  D0(%rip),%xmm2
  divsd  %xmm2,%xmm1
  divsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L41
L29:
  pxor   %xmm2,%xmm2
  cvtsi2sd %ebx,%xmm2
  movsd  (%rsp),%xmm1
  divsd  %xmm2,%xmm1
  movsd  0x8(%rsp),%xmm0
  divsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L37
  sqrtsd %xmm0,%xmm0
L38:
  cvtsd2ss %xmm0,%xmm0
  add    $0x10,%rsp
  pop    %rbx
  ret
L41:
  call   <sqrt@plt>
  jmp    L29
L37:
  call   <sqrt@plt>
  jmp    L38
```

tool_calls: name: retrieve_data
arguments: data_label: D0
datatype: byte[8]

tool: {"D0": [0x00,0x00,0x00,0x00,0x20,0xd5,0xec,0x40]}

assistant: ```c
float compute_scale(short *table) {
  double sums;
  double sums2;
  int sumw;
  double sumws;
  double sumws2;
  int i;
  double mean;
  double sdev;
  sums = 0;
  sums2 = 0;
  sumw = 0;
  sumws = 0;
  sumws2 = 0;
  for (i = 0; i < 59049; i++) {
    int score;
    int weight;
    int temp;
    int j;
    score = table[i];
    sums += score;
    sums2 += score * score;
    weight = 1;
    temp = i;
    for (j = 0; j < 10; j++) {
      if (temp % 3 == 2)
        weight *= 2;
      temp /= 3;
    }
    sumw += weight;
    sumws += weight * score;
    sumws2 += weight * score * score;
  }
  mean = sums / 59049;
  sdev = sqrt(sums2 / 59049 - mean * mean);
  mean = sumws / sumw;
  sdev = sqrt(sumws2 / sumw - mean * mean);
  return sdev;
}
```
user: Translate the below assembly code into C programming language:

```asm
<compute_scale>:
  endbr64
  push   %rbx
  pxor   %xmm5,%xmm5
  mov    %rdi,%r11
  xor    %r10d,%r10d
  movapd %xmm5,%xmm1
  movapd %xmm5,%xmm2
  xor    %ebx,%ebx
  mov    $0xaaaaaaab,%r8d
  movapd %xmm5,%xmm0
  movapd %xmm5,%xmm3
  sub    $0x10,%rsp
  nopl   0x0(%rax,%rax,1)
L19:
  movswl (%r11,%r10,2),%r9d
  pxor   %xmm4,%xmm4
  mov    %r10d,%eax
  mov    $0xa,%esi
  mov    $0x1,%ecx
  cvtsi2sd %r9d,%xmm4
  mov    %r9d,%edx
  imul   %r9d,%edx
  addsd  %xmm4,%xmm3
  pxor   %xmm4,%xmm4
  cvtsi2sd %edx,%xmm4
  addsd  %xmm4,%xmm0
  nopw   0x0(%rax,%rax,1)
L25:
  imul   $0xaaaaaaab,%eax,%edx
  lea    (%rcx,%rcx,1),%edi
  mov    %eax,%eax
  sub    $0x55555556,%edx
  cmp    $0x55555555,%edx
  cmovb  %edi,%ecx
  imul   %r8,%rax
  shr    $0x21,%rax
  sub    $0x1,%esi
  jne    L25
  add    %ecx,%ebx
  imul   %r9d,%ecx
  pxor   %xmm4,%xmm4
  add    $0x1,%r10
  cvtsi2sd %ecx,%xmm4
  imul   %r9d,%ecx
  addsd  %xmm4,%xmm2
  pxor   %xmm4,%xmm4
  cvtsi2sd %ecx,%xmm4
  addsd  %xmm4,%xmm1
  cmp    $0xe6a9,%r10
  jne    L19
  movsd  D2(%rip),%xmm4
  divsd  %xmm4,%xmm3
  divsd  %xmm4,%xmm0
  mulsd  %xmm3,%xmm3
  subsd  %xmm3,%xmm0
  ucomisd %xmm0,%xmm5
  ja     L26
L58:
  pxor   %xmm3,%xmm3
  cvtsi2sd %ebx,%xmm3
  divsd  %xmm3,%xmm2
  divsd  %xmm3,%xmm1
  mulsd  %xmm2,%xmm2
  movapd %xmm1,%xmm0
  subsd  %xmm2,%xmm0
  ucomisd %xmm0,%xmm5
  ja     L31
  sqrtsd %xmm0,%xmm0
L18:
  add    $0x10,%rsp
  cvtsd2ss %xmm0,%xmm0
  pop    %rbx
  ret
L26:
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm2
  pxor   %xmm5,%xmm5
  jmp    L58
L31:
  call   <sqrt@plt>
  jmp    L18
```

tool_calls: name: retrieve_data
arguments: label: D2
data_type: byte[8]

tool: {"D2": [0x00,0x00,0x00,0x00,0x20,0xd5,0xec,0x40]}

assistant: ```c
float compute_scale(short *table) {
  double sums;
  double sums2;
  int sumw;
  double sumws;
  double sumws2;
  int i;
  double mean;
  double sdev;
  sums = 0;
  sums2 = 0;
  sumw = 0;
  sumws = 0;
  sumws2 = 0;
  for (i = 0; i < 59049; i++) {
    int score;
    int weight;
    int temp;
    int j;
    score = table[i];
    sums += score;
    sums2 += score * score;
    weight = 1;
    temp = i;
    for (j = 0; j < 10; j++) {
      if (temp % 3 == 2)
        weight *= 2;
      temp /= 3;
    }
    sumw += weight;
    sumws += weight * score;
    sumws2 += weight * score * score;
  }
  mean = sums / 59049;
  sdev = sqrt(sums2 / 59049 - mean * mean);
  mean = sumws / sumw;
  sdev = sqrt(sumws2 / sumw - mean * mean);
  return sdev;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<inspect_fw_phexdef>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  mov    %edx,-0x10(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xc(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jne    L10
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L9
L10:
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L9:
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D18
datatype: string
name: parse_data
arguments: label: D14
datatype: string
name: parse_data
arguments: label: D3
datatype: string

tool: D18: %-23s: 0x%08x                  

tool: D14: (== OpenWrt default)

tool: D3: (OpenWrt default: 0x%08x)


assistant: ```c
void inspect_fw_phexdef(char *label, uint32_t val, uint32_t defval) {
  printf("%-23s: 0x%08x                  ", label, val);
  if (val == defval)
    printf("(== OpenWrt default)\n");
  else
    printf("(OpenWrt default: 0x%08x)\n", defval);
}
```
user: What is the c source code of the assembly code below:

```asm
<inspect_fw_phexdef>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %esi,%ebx
  mov    %edx,%ebp
  mov    %esi,%edx
  mov    %rdi,%rsi
  lea    D27(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmp    %ebp,%ebx
  je     L16
  mov    %ebp,%esi
  lea    D15(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L4:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L16:
  lea    D28(%rip),%rdi
  call   <puts@plt>
  jmp    L4
```

tool_calls: name: parse_data
arguments: label: D27
type_guessed: string
name: parse_data
arguments: label: D15
type_guessed: string
name: parse_data
arguments: label: D28
type_guessed: string

tool: D27: %-23s: 0x%08x                  

tool: D15: (OpenWrt default: 0x%08x)


tool: D28: (== OpenWrt default)

assistant: ```c
void inspect_fw_phexdef(char *label, uint32_t val, uint32_t defval) {
  printf("%-23s: 0x%08x                  ", label, val);
  if (val == defval)
    printf("(== OpenWrt default)\n");
  else
    printf("(OpenWrt default: 0x%08x)\n", defval);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<inspect_fw_phexdef>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  mov    %edx,%ebp
  mov    %esi,%edx
  push   %rbx
  mov    %esi,%ebx
  mov    %rdi,%rsi
  lea    D15(%rip),%rdi
  sub    $0x8,%rsp
  call   <printf@plt>
  cmp    %ebp,%ebx
  je     L1
  add    $0x8,%rsp
  mov    %ebp,%esi
  lea    D4(%rip),%rdi
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  jmp    1070 <printf@plt>
  nopl   0x0(%rax,%rax,1)
L1:
  add    $0x8,%rsp
  lea    D2(%rip),%rdi
  pop    %rbx
  pop    %rbp
  jmp    1060 <puts@plt>
```

tool_calls: name: retrieve_data
arguments: label: D15
type_infered: string
name: retrieve_data
arguments: label: D4
type_infered: string
name: retrieve_data
arguments: label: D2
type_infered: string

tool: D15: %-23s: 0x%08x                  

tool: D4: (OpenWrt default: 0x%08x)


tool: D2: (== OpenWrt default)

assistant: ```c
void inspect_fw_phexdef(char *label, uint32_t val, uint32_t defval) {
  printf("%-23s: 0x%08x                  ", label, val);
  if (val == defval)
    printf("(== OpenWrt default)\n");
  else
    printf("(OpenWrt default: 0x%08x)\n", defval);
}
```
user: What is the c source code of the assembly code below?

```asm
<inspect_fw_phexdef>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  mov    %edx,%ebp
  mov    %esi,%edx
  push   %rbx
  mov    %esi,%ebx
  mov    %rdi,%rsi
  lea    D5(%rip),%rdi
  sub    $0x8,%rsp
  call   <printf@plt>
  cmp    %ebp,%ebx
  je     L1
  add    $0x8,%rsp
  mov    %ebp,%esi
  lea    D28(%rip),%rdi
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  jmp    1070 <printf@plt>
  nopl   0x0(%rax,%rax,1)
L1:
  add    $0x8,%rsp
  lea    D3(%rip),%rdi
  pop    %rbx
  pop    %rbp
  jmp    1060 <puts@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D5
type_infered: string
name: unpack_data
arguments: data_tag: D28
type_infered: string
name: unpack_data
arguments: data_tag: D3
type_infered: string

tool: D5: %-23s: 0x%08x                  

tool: D28: (OpenWrt default: 0x%08x)


tool: D3: (== OpenWrt default)

assistant: ```c
void inspect_fw_phexdef(char *label, uint32_t val, uint32_t defval) {
  printf("%-23s: 0x%08x                  ", label, val);
  if (val == defval)
    printf("(== OpenWrt default)\n");
  else
    printf("(OpenWrt default: 0x%08x)\n", defval);
}
```
user: Translate the below assembly code into C programming language:

```asm
<aom_hadamard_8x8_c>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x140,%rsp
  mov    %rdi,-0x128(%rbp)
  mov    %esi,-0x12c(%rbp)
  mov    %rdx,-0x138(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x110(%rbp),%rax
  mov    %rax,-0x118(%rbp)
  movl   $0x0,-0x11c(%rbp)
  jmp    L28
L37:
  mov    -0x118(%rbp),%rdx
  mov    -0x12c(%rbp),%ecx
  mov    -0x128(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <hadamard_col8@plt>
  addq   $0x20,-0x118(%rbp)
  addq   $0x4,-0x128(%rbp)
  addl   $0x1,-0x11c(%rbp)
L28:
  cmpl   $0x7,-0x11c(%rbp)
  jle    L37
  lea    -0x110(%rbp),%rax
  mov    %rax,-0x118(%rbp)
  movl   $0x0,-0x11c(%rbp)
  jmp    L2
L44:
  mov    -0x138(%rbp),%rdx
  mov    -0x118(%rbp),%rax
  mov    $0x8,%esi
  mov    %rax,%rdi
  call   <hadamard_col8@plt>
  addq   $0x20,-0x138(%rbp)
  addq   $0x4,-0x118(%rbp)
  addl   $0x1,-0x11c(%rbp)
L2:
  cmpl   $0x7,-0x11c(%rbp)
  jle    L44
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L12
  call   <__stack_chk_fail@plt>
L12:
  leave
  ret
```

assistant: ```c
void aom_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff) {
  int idx;
  int16_t buffer[64];
  int16_t *tmp_buf = &buffer[0];
  for (idx = 0; idx < 8; ++idx) {
    hadamard_col8(src_diff, src_stride, tmp_buf);
    tmp_buf += 8;
    ++src_diff;
  }
  tmp_buf = &buffer[0];
  for (idx = 0; idx < 8; ++idx) {
    hadamard_col8(tmp_buf, 8, coeff);
    coeff += 8;
    ++tmp_buf;
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<aom_hadamard_8x8_c>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x110,%rsp
  mov    %rdi,%r12
  mov    %esi,%r13d
  mov    %rdx,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  lea    0x100(%rsp),%r14
L0:
  mov    %rbx,%rdx
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <hadamard_col8@plt>
  add    $0x20,%rbx
  add    $0x4,%r12
  cmp    %r14,%rbx
  jne    L0
  mov    %rsp,%rbx
  lea    0x20(%rsp),%r12
L25:
  mov    %rbp,%rdx
  mov    $0x8,%esi
  mov    %rbx,%rdi
  call   <hadamard_col8@plt>
  add    $0x20,%rbp
  add    $0x4,%rbx
  cmp    %r12,%rbx
  jne    L25
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L18
  add    $0x110,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L18:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void aom_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff) {
  int idx;
  int16_t buffer[64];
  int16_t *tmp_buf = &buffer[0];
  for (idx = 0; idx < 8; ++idx) {
    hadamard_col8(src_diff, src_stride, tmp_buf);
    tmp_buf += 8;
    ++src_diff;
  }
  tmp_buf = &buffer[0];
  for (idx = 0; idx < 8; ++idx) {
    hadamard_col8(tmp_buf, 8, coeff);
    coeff += 8;
    ++tmp_buf;
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<aom_hadamard_8x8_c>:
  endbr64
  push   %r15
  push   %r14
  mov    %esi,%r14d
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  lea    0x100(%rsp),%r15
  mov    %rbx,%rbp
  nop
L16:
  mov    %rbp,%rdx
  mov    %r13,%rdi
  mov    %r14d,%esi
  add    $0x20,%rbp
  call   <hadamard_col8@plt>
  add    $0x4,%r13
  cmp    %r15,%rbp
  jne    L16
  lea    0x20(%rsp),%rbp
L0:
  mov    %r12,%rdx
  mov    %rbx,%rdi
  mov    $0x8,%esi
  add    $0x4,%rbx
  call   <hadamard_col8@plt>
  add    $0x20,%r12
  cmp    %rbp,%rbx
  jne    L0
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L13
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L13:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void aom_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff) {
  int idx;
  int16_t buffer[64];
  int16_t *tmp_buf = &buffer[0];
  for (idx = 0; idx < 8; ++idx) {
    hadamard_col8(src_diff, src_stride, tmp_buf);
    tmp_buf += 8;
    ++src_diff;
  }
  tmp_buf = &buffer[0];
  for (idx = 0; idx < 8; ++idx) {
    hadamard_col8(tmp_buf, 8, coeff);
    coeff += 8;
    ++tmp_buf;
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<aom_hadamard_8x8_c>:
  endbr64
  push   %r15
  push   %r14
  mov    %esi,%r14d
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  lea    0x100(%rsp),%r15
  mov    %rbx,%rbp
  nop
L0:
  mov    %rbp,%rdx
  mov    %r13,%rdi
  mov    %r14d,%esi
  add    $0x20,%rbp
  call   <hadamard_col8@plt>
  add    $0x4,%r13
  cmp    %r15,%rbp
  jne    L0
  lea    0x20(%rsp),%rbp
L22:
  mov    %r12,%rdx
  mov    %rbx,%rdi
  mov    $0x8,%esi
  add    $0x4,%rbx
  call   <hadamard_col8@plt>
  add    $0x20,%r12
  cmp    %rbp,%rbx
  jne    L22
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L17:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void aom_hadamard_8x8_c(const int16_t *src_diff, int src_stride, int16_t *coeff) {
  int idx;
  int16_t buffer[64];
  int16_t *tmp_buf = &buffer[0];
  for (idx = 0; idx < 8; ++idx) {
    hadamard_col8(src_diff, src_stride, tmp_buf);
    tmp_buf += 8;
    ++src_diff;
  }
  tmp_buf = &buffer[0];
  for (idx = 0; idx < 8; ++idx) {
    hadamard_col8(tmp_buf, 8, coeff);
    coeff += 8;
    ++tmp_buf;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<strstr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L17
  mov    -0x38(%rbp),%rax
  jmp    L0
L17:
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rbx
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    %rbx,%rax
  sub    %rdx,%rax
  lea    0x1(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  jmp    L87
L64:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x40(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L45
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x20(%rbp)
L66:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L42
  mov    -0x38(%rbp),%rax
  jmp    L0
L42:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%ecx
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  cmp    %al,%cl
  jne    L75
  jmp    L66
L75:
  nop
L45:
  addq   $0x1,-0x38(%rbp)
L87:
  mov    -0x38(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jb     L64
  mov    $0x0,%eax
L0:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
char *strstr(const char *haystack, const char *needle) {
  const char *hend;
  const char *a, *b;
  if (*needle == 0)
    return (char *)haystack;
  hend = haystack + strlen(haystack) - strlen(needle) + 1;
  while (haystack < hend) {
    if (*haystack == *needle) {
      a = haystack;
      b = needle;
      for (;;) {
        if (*b == 0)
          return (char *)haystack;
        if (*a++ != *b++) {
          break;
        }
      }
    }
    haystack++;
  }
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<strstr>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  movzbl (%rsi),%r12d
  mov    %rdi,%rax
  test   %r12b,%r12b
  je     L33
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  call   <strlen@plt>
  mov    %rax,%r13
  mov    %rbp,%rdi
  call   <strlen@plt>
  add    $0x1,%r13
  sub    %rax,%r13
  lea    (%rbx,%r13,1),%rcx
  cmp    %rcx,%rbx
  jb     L39
  mov    $0x0,%eax
  jmp    L33
L23:
  add    $0x1,%rbx
  cmp    %rbx,%rcx
  je     L17
L39:
  cmp    (%rbx),%r12b
  jne    L23
  mov    %r12d,%edx
  mov    $0x0,%eax
L10:
  cmp    %dl,(%rbx,%rax,1)
  jne    L23
  add    $0x1,%rax
  movzbl 0x0(%rbp,%rax,1),%edx
  test   %dl,%dl
  jne    L10
  mov    %rbx,%rax
L33:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L17:
  mov    $0x0,%eax
  jmp    L33
```

assistant: ```c
char *strstr(const char *haystack, const char *needle) {
  const char *hend;
  const char *a, *b;
  if (*needle == 0)
    return (char *)haystack;
  hend = haystack + strlen(haystack) - strlen(needle) + 1;
  while (haystack < hend) {
    if (*haystack == *needle) {
      a = haystack;
      b = needle;
      for (;;) {
        if (*b == 0)
          return (char *)haystack;
        if (*a++ != *b++) {
          break;
        }
      }
    }
    haystack++;
  }
  return 0;
}
```