ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Translate the below assembly code into C programming language:

```asm
<dirname>:
  endbr64
  push   %r12
  call   <strdup@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <stripslash@plt>
  mov    $0x2f,%esi
  mov    %eax,%edi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L16
  cmp    %rax,%r12
  je     L3
  movb   $0x0,(%rax)
  mov    %r12,%rax
  pop    %r12
  ret
  nopl   (%rax)
L3:
  cmpb   $0x2f,(%r12)
  lea    0x1(%r12),%rax
  cmovne %r12,%rax
  movb   $0x0,(%rax)
  mov    %r12,%rax
  pop    %r12
  ret
  nop
L16:
  mov    %r12,%rdi
  call   <free@plt>
  lea    D7(%rip),%rdi
  pop    %r12
  jmp    10b0 <strdup@plt>
```

tool_calls: name: read_data
arguments: tag: D7
data_type: string

tool: D7: .

assistant: ```c
char *dirname(char *pathname) {
  char *dup = strdup(pathname);
  char *ptr = strrchr(stripslash(dup), '/');
  if (ptr == NULL) {
    free(dup);
    return strdup(".");
  }
  if (ptr == dup && dup[0] == '/')
    ptr++;
  *ptr = '\0';
  return dup;
}
```
user: What is the c source code of the assembly code below?

```asm
<microsec_sleep>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sdq -0x28(%rbp),%xmm1
  movsd  D15(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdq -0x28(%rbp),%xmm0
  mov    -0x20(%rbp),%rax
  pxor   %xmm2,%xmm2
  cvtsi2sd %rax,%xmm2
  movsd  D19(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  lea    -0x20(%rbp),%rax
  mov    %rax,%r8
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <select@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L5
  call   <__stack_chk_fail@plt>
L5:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D15
datatype: byte[8]
name: disassemble_data
arguments: data_label: D19
datatype: f64

tool: {"D15": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

tool: D19: 1000000

assistant: ```c
void microsec_sleep(long ms) {
  struct timeval delay;
  delay.tv_sec = ms * 1e-6;
  delay.tv_usec = ms - 1e6 * delay.tv_sec;
  select(0, NULL, NULL, NULL, &delay);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<microsec_sleep>:
  endbr64
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdi,%xmm0
  movapd %xmm0,%xmm1
  mulsd  D12(%rip),%xmm1
  cvttsd2si %xmm1,%rax
  mov    %rax,(%rsp)
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  mulsd  D7(%rip),%xmm1
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,0x8(%rsp)
  mov    %rsp,%r8
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <select@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x28,%rsp
  ret
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D12
type_guessed: byte[8]
name: read_data
arguments: data_label: D7
type_guessed: f64

tool: {"D12": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

tool: D7: 1000000

assistant: ```c
void microsec_sleep(long ms) {
  struct timeval delay;
  delay.tv_sec = ms * 1e-6;
  delay.tv_usec = ms - 1e6 * delay.tv_sec;
  select(0, NULL, NULL, NULL, &delay);
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<microsec_sleep>:
  endbr64
  pxor   %xmm0,%xmm0
  sub    $0x28,%rsp
  xor    %ecx,%ecx
  xor    %edx,%edx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cvtsi2sd %rdi,%xmm0
  xor    %esi,%esi
  xor    %edi,%edi
  movsd  D18(%rip),%xmm1
  mov    %rsp,%r8
  mulsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  mulsd  D12(%rip),%xmm1
  mov    %rax,(%rsp)
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,0x8(%rsp)
  call   <select@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  add    $0x28,%rsp
  ret
L5:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D18
data_type: byte[8]
name: parse_data
arguments: tag: D12
data_type: f64

tool: {"D18": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

tool: D12: 1000000

assistant: ```c
void microsec_sleep(long ms) {
  struct timeval delay;
  delay.tv_sec = ms * 1e-6;
  delay.tv_usec = ms - 1e6 * delay.tv_sec;
  select(0, NULL, NULL, NULL, &delay);
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<microsec_sleep>:
  endbr64
  pxor   %xmm0,%xmm0
  sub    $0x28,%rsp
  xor    %ecx,%ecx
  xor    %esi,%esi
  cvtsi2sd %rdi,%xmm0
  movsd  D3(%rip),%xmm1
  xor    %edi,%edi
  mov    %rsp,%r8
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mulsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  mulsd  D2(%rip),%xmm1
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rdx
  movq   %rax,%xmm0
  movq   %rdx,%xmm2
  xor    %edx,%edx
  punpcklqdq %xmm2,%xmm0
  movaps %xmm0,(%rsp)
  call   <select@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x28,%rsp
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D3
type_guessed: byte[8]
name: read_data
arguments: label: D2
type_guessed: f64

tool: {"D3": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

tool: D2: 1000000

assistant: ```c
void microsec_sleep(long ms) {
  struct timeval delay;
  delay.tv_sec = ms * 1e-6;
  delay.tv_usec = ms - 1e6 * delay.tv_sec;
  select(0, NULL, NULL, NULL, &delay);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x1c(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L64
L102:
  lea    -0x14(%rbp),%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x1c(%rbp),%eax
  cltq
  mov    -0x14(%rbp,%rax,4),%eax
  add    %eax,-0x18(%rbp)
  addl   $0x1,-0x1c(%rbp)
L64:
  cmpl   $0x2,-0x1c(%rbp)
  jle    L102
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%eax
  cmp    %eax,%edx
  jge    L92
  mov    -0x14(%rbp),%edx
  mov    -0xc(%rbp),%eax
  cmp    %eax,%edx
  jge    L92
  mov    -0x14(%rbp),%eax
  sub    %eax,-0x18(%rbp)
  jmp    L41
L92:
  mov    -0x10(%rbp),%edx
  mov    -0x14(%rbp),%eax
  cmp    %eax,%edx
  jge    L10
  mov    -0x10(%rbp),%edx
  mov    -0xc(%rbp),%eax
  cmp    %eax,%edx
  jge    L10
  mov    -0x10(%rbp),%eax
  sub    %eax,-0x18(%rbp)
  jmp    L41
L10:
  mov    -0xc(%rbp),%edx
  mov    -0x14(%rbp),%eax
  cmp    %eax,%edx
  jge    L41
  mov    -0xc(%rbp),%edx
  mov    -0x10(%rbp),%eax
  cmp    %eax,%edx
  jge    L41
  mov    -0xc(%rbp),%eax
  sub    %eax,-0x18(%rbp)
L41:
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L16
  call   <__stack_chk_fail@plt>
L16:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D11
type_guessed: string
name: retrieve_data
arguments: data_tag: D5
type_guessed: string

tool: D11: %d

tool: D5: %d


assistant: ```c
int main(int argc, char const *argv[]) {
  int value[3];
  int i = 0;
  int sum = 0;
  for (i = 0; i < 3; ++i) {
    scanf("%d", &value[i]);
    sum += value[i];
  }
  if (value[0] < value[1] && value[0] < value[2]) {
    sum -= value[0];
  } else if (value[1] < value[0] && value[1] < value[2]) {
    sum -= value[1];
  } else if (value[2] < value[0] && value[2] < value[1]) {
    sum -= value[2];
  }
  printf("%d\n", sum);
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rbx
  lea    0x18(%rsp),%r13
  mov    $0x0,%ebp
  lea    D11(%rip),%r12
L46:
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  add    (%rbx),%ebp
  add    $0x4,%rbx
  cmp    %r13,%rbx
  jne    L46
  mov    0xc(%rsp),%eax
  mov    0x10(%rsp),%edx
  cmp    %edx,%eax
  jge    L98
  cmp    0x14(%rsp),%eax
  jge    L74
  sub    %eax,%ebp
  jmp    L73
L98:
  jle    L74
  cmp    0x14(%rsp),%edx
  jge    L74
  sub    %edx,%ebp
  jmp    L73
L74:
  mov    0x14(%rsp),%ecx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  cmp    %eax,%ecx
  jl     L16
L73:
  mov    %ebp,%esi
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L51
  mov    $0x0,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L16:
  sub    %ecx,%ebp
  jmp    L73
L51:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D11
type: string
name: read_data
arguments: label: D9
type: string

tool: D11: %d

tool: D9: %d


assistant: ```c
int main(int argc, char const *argv[]) {
  int value[3];
  int i = 0;
  int sum = 0;
  for (i = 0; i < 3; ++i) {
    scanf("%d", &value[i]);
    sum += value[i];
  }
  if (value[0] < value[1] && value[0] < value[2]) {
    sum -= value[0];
  } else if (value[1] < value[0] && value[1] < value[2]) {
    sum -= value[1];
  } else if (value[2] < value[0] && value[2] < value[1]) {
    sum -= value[2];
  }
  printf("%d\n", sum);
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  lea    D8(%rip),%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rbx
  lea    0x18(%rsp),%r13
L20:
  mov    %rbx,%rsi
  mov    %r12,%rdi
  add    $0x4,%rbx
  call   <scanf@plt>
  mov    -0x4(%rbx),%eax
  add    %ebp,%eax
  mov    %eax,%ebp
  cmp    %rbx,%r13
  jne    L20
  mov    0xc(%rsp),%edx
  mov    0x10(%rsp),%ecx
  mov    0x14(%rsp),%esi
  cmp    %ecx,%edx
  jge    L12
  cmp    %esi,%edx
  jge    L60
  sub    %edx,%ebp
L27:
  mov    %ebp,%esi
  lea    D11(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L79
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L12:
  jle    L60
  cmp    %esi,%ecx
  jl     L40
L60:
  cmp    %ecx,%edx
  cmovg  %ecx,%edx
  cmp    %esi,%edx
  jle    L27
  sub    %esi,%eax
  mov    %eax,%ebp
  jmp    L27
L40:
  sub    %ecx,%ebp
  jmp    L27
L79:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D8
data_type: string
name: retrieve_data
arguments: tag: D11
data_type: string

tool: D8: %d

tool: D11: %d


assistant: ```c
int main(int argc, char const *argv[]) {
  int value[3];
  int i = 0;
  int sum = 0;
  for (i = 0; i < 3; ++i) {
    scanf("%d", &value[i]);
    sum += value[i];
  }
  if (value[0] < value[1] && value[0] < value[2]) {
    sum -= value[0];
  } else if (value[1] < value[0] && value[1] < value[2]) {
    sum -= value[1];
  } else if (value[2] < value[0] && value[2] < value[1]) {
    sum -= value[2];
  }
  printf("%d\n", sum);
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  lea    D18(%rip),%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rbx
  lea    0x18(%rsp),%r13
L48:
  mov    %rbx,%rsi
  mov    %r12,%rdi
  add    $0x4,%rbx
  call   <scanf@plt>
  mov    -0x4(%rbx),%eax
  add    %ebp,%eax
  mov    %eax,%ebp
  cmp    %rbx,%r13
  jne    L48
  mov    0xc(%rsp),%edx
  mov    0x10(%rsp),%ecx
  mov    0x14(%rsp),%esi
  cmp    %ecx,%edx
  jge    L33
  cmp    %esi,%edx
  jge    L26
  sub    %edx,%ebp
L74:
  mov    %ebp,%esi
  lea    D5(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L33:
  jle    L26
  cmp    %esi,%ecx
  jl     L54
L26:
  cmp    %ecx,%edx
  cmovg  %ecx,%edx
  cmp    %esi,%edx
  jle    L74
  sub    %esi,%eax
  mov    %eax,%ebp
  jmp    L74
L54:
  sub    %ecx,%ebp
  jmp    L74
L15:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D18
data_type: string
name: disassemble_data
arguments: data_label: D5
data_type: string

tool: D18: %d

tool: D5: %d


assistant: ```c
int main(int argc, char const *argv[]) {
  int value[3];
  int i = 0;
  int sum = 0;
  for (i = 0; i < 3; ++i) {
    scanf("%d", &value[i]);
    sum += value[i];
  }
  if (value[0] < value[1] && value[0] < value[2]) {
    sum -= value[0];
  } else if (value[1] < value[0] && value[1] < value[2]) {
    sum -= value[1];
  } else if (value[2] < value[0] && value[2] < value[1]) {
    sum -= value[2];
  }
  printf("%d\n", sum);
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<FindSubStringA>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x8(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  jmp    L73
L4:
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L21
  movq   $0x1,-0x20(%rbp)
  jmp    L34
L82:
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x10(%rbp)
  jbe    L76
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x30(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L76
  addq   $0x1,-0x20(%rbp)
L34:
  mov    -0x20(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jb     L82
L76:
  mov    -0x20(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jne    L21
  mov    -0x18(%rbp),%rax
  jmp    L2
L21:
  addq   $0x1,-0x18(%rbp)
L73:
  mov    -0x18(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jb     L4
  mov    $0xffffffffffffffff,%rax
L2:
  leave
  ret
```

assistant: ```c
long FindSubStringA(const char *pszSearch, const char *pszText) {
  const unsigned long dwSearchSize = (unsigned long)strlen(pszSearch);
  const unsigned long dwTextSize = (unsigned long)strlen(pszText);
  unsigned long dwTextIndex = 0;
  for (unsigned long dwIndex = 0; dwIndex < dwSearchSize; dwIndex++) {
    if (pszSearch[dwIndex] == pszText[0]) {
      for (dwTextIndex = 1; dwTextIndex < dwTextSize; dwTextIndex++) {
        if ((dwTextIndex + dwIndex) >= dwSearchSize || pszSearch[dwIndex + dwTextIndex] != pszText[dwTextIndex])
          break;
      }
      if (dwTextIndex == dwTextSize)
        return dwIndex;
    }
  }
  return -1;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<FindSubStringA>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  mov    %rsi,%rbp
  call   <strlen@plt>
  mov    %rax,%rbx
  mov    %rbp,%rdi
  call   <strlen@plt>
  test   %rbx,%rbx
  je     L0
  movzbl 0x0(%rbp),%r9d
  mov    $0x1,%ecx
  lea    -0x1(%r12),%r10
  jmp    L118
L75:
  mov    $0x1,%edx
L9:
  cmp    %rdx,%rax
  je     L125
L110:
  lea    0x1(%rcx),%rdx
  cmp    %rcx,%rbx
  je     L49
  mov    %rdx,%rcx
L118:
  lea    -0x1(%rcx),%rdi
  cmp    %r9b,-0x1(%r12,%rcx,1)
  jne    L110
  cmp    $0x1,%rax
  jbe    L75
  cmp    %rcx,%rbx
  jbe    L110
  mov    $0x1,%edx
  lea    (%r10,%rcx,1),%r8
L89:
  movzbl 0x0(%rbp,%rdx,1),%esi
  cmp    %sil,(%r8,%rdx,1)
  jne    L9
  add    $0x1,%rdx
  cmp    %rdx,%rax
  je     L125
  lea    (%rdx,%rdi,1),%rsi
  cmp    %rsi,%rbx
  ja     L89
  jmp    L110
L125:
  mov    %rdi,%rax
  jmp    L104
L49:
  mov    $0xffffffffffffffff,%rax
L104:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L0:
  mov    $0xffffffffffffffff,%rax
  jmp    L104
```

assistant: ```c
long FindSubStringA(const char *pszSearch, const char *pszText) {
  const unsigned long dwSearchSize = (unsigned long)strlen(pszSearch);
  const unsigned long dwTextSize = (unsigned long)strlen(pszText);
  unsigned long dwTextIndex = 0;
  for (unsigned long dwIndex = 0; dwIndex < dwSearchSize; dwIndex++) {
    if (pszSearch[dwIndex] == pszText[0]) {
      for (dwTextIndex = 1; dwTextIndex < dwTextSize; dwTextIndex++) {
        if ((dwTextIndex + dwIndex) >= dwSearchSize || pszSearch[dwIndex + dwTextIndex] != pszText[dwTextIndex])
          break;
      }
      if (dwTextIndex == dwTextSize)
        return dwIndex;
    }
  }
  return -1;
}
```
user: Translate the below assembly code into C programming language:

```asm
<FindSubStringA>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  call   <strlen@plt>
  mov    %rbp,%rdi
  mov    %rax,%rbx
  call   <strlen@plt>
  test   %rbx,%rbx
  je     L102
  movzbl 0x0(%rbp),%r9d
  mov    $0x1,%ecx
  lea    -0x1(%r12),%r10
  jmp    L55
  nopl   0x0(%rax)
L108:
  lea    0x1(%rcx),%rdx
  cmp    %rcx,%rbx
  jbe    L102
L66:
  mov    %rdx,%rcx
L55:
  lea    -0x1(%rcx),%rdi
  cmp    %r9b,-0x1(%r12,%rcx,1)
  jne    L108
  cmp    $0x1,%rax
  jle    L28
  cmp    %rcx,%rbx
  jbe    L102
  mov    $0x1,%edx
  lea    (%r10,%rcx,1),%r8
  jmp    L63
  nopl   (%rax)
L117:
  add    $0x1,%rdx
  cmp    %rdx,%rax
  je     L41
  lea    (%rdx,%rdi,1),%rsi
  cmp    %rbx,%rsi
  jae    L90
L63:
  movzbl 0x0(%rbp,%rdx,1),%esi
  cmp    %sil,(%r8,%rdx,1)
  je     L117
L90:
  lea    0x1(%rcx),%rdx
  jmp    L66
  nopl   0x0(%rax,%rax,1)
L102:
  pop    %rbx
  mov    $0xffffffffffffffff,%rax
  pop    %rbp
  pop    %r12
  ret
L28:
  jne    L108
L41:
  pop    %rbx
  mov    %rdi,%rax
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
long FindSubStringA(const char *pszSearch, const char *pszText) {
  const unsigned long dwSearchSize = (unsigned long)strlen(pszSearch);
  const unsigned long dwTextSize = (unsigned long)strlen(pszText);
  unsigned long dwTextIndex = 0;
  for (unsigned long dwIndex = 0; dwIndex < dwSearchSize; dwIndex++) {
    if (pszSearch[dwIndex] == pszText[0]) {
      for (dwTextIndex = 1; dwTextIndex < dwTextSize; dwTextIndex++) {
        if ((dwTextIndex + dwIndex) >= dwSearchSize || pszSearch[dwIndex + dwTextIndex] != pszText[dwTextIndex])
          break;
      }
      if (dwTextIndex == dwTextSize)
        return dwIndex;
    }
  }
  return -1;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<FindSubStringA>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  call   <strlen@plt>
  mov    %rbp,%rdi
  mov    %rax,%rbx
  call   <strlen@plt>
  test   %rbx,%rbx
  je     L70
  movzbl 0x0(%rbp),%r9d
  mov    $0x1,%ecx
  lea    -0x1(%r12),%r10
  jmp    L96
  nopl   0x0(%rax)
L101:
  lea    0x1(%rcx),%rdx
  cmp    %rbx,%rcx
  jae    L70
  mov    %rdx,%rcx
L96:
  lea    -0x1(%rcx),%rdi
  cmp    %r9b,-0x1(%r12,%rcx,1)
  jne    L101
  cmp    $0x1,%rax
  jle    L13
  cmp    %rbx,%rcx
  jae    L101
  mov    $0x1,%edx
  lea    (%r10,%rcx,1),%r8
  jmp    L99
  nopl   (%rax)
L62:
  lea    (%rdx,%rdi,1),%rsi
  cmp    %rsi,%rbx
  jbe    L101
L99:
  movzbl 0x0(%rbp,%rdx,1),%esi
  cmp    %sil,(%r8,%rdx,1)
  jne    L101
  add    $0x1,%rdx
  cmp    %rdx,%rax
  jne    L62
L112:
  pop    %rbx
  mov    %rdi,%rax
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L70:
  pop    %rbx
  mov    $0xffffffffffffffff,%rax
  pop    %rbp
  pop    %r12
  ret
L13:
  jne    L101
  jmp    L112
```

assistant: ```c
long FindSubStringA(const char *pszSearch, const char *pszText) {
  const unsigned long dwSearchSize = (unsigned long)strlen(pszSearch);
  const unsigned long dwTextSize = (unsigned long)strlen(pszText);
  unsigned long dwTextIndex = 0;
  for (unsigned long dwIndex = 0; dwIndex < dwSearchSize; dwIndex++) {
    if (pszSearch[dwIndex] == pszText[0]) {
      for (dwTextIndex = 1; dwTextIndex < dwTextSize; dwTextIndex++) {
        if ((dwTextIndex + dwIndex) >= dwSearchSize || pszSearch[dwIndex + dwTextIndex] != pszText[dwTextIndex])
          break;
      }
      if (dwTextIndex == dwTextSize)
        return dwIndex;
    }
  }
  return -1;
}
```
user: Translate the below assembly code into C programming language:

```asm
<mpeg4_cpu>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L54
L53:
  movl   $0x0,-0xc(%rbp)
  jmp    L61
L51:
  movl   $0x0,-0x8(%rbp)
  jmp    L10
L22:
  movl   $0x0,-0x4(%rbp)
  jmp    L13
L24:
  mov    -0x10(%rbp),%eax
  shl    $0xe,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  movss  (%rdx,%rax,4),%xmm1
  mov    -0x10(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    %rdx,%rax
  shl    $0x8,%rax
  add    %rdx,%rax
  shl    $0x6,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%ecx
  mov    -0x4(%rbp),%edx
  add    %ecx,%edx
  mov    %edx,%edx
  movss  (%rax,%rdx,4),%xmm2
  mov    -0x8(%rbp),%eax
  shl    $0x4,%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  mov    -0x10(%rbp),%eax
  shl    $0xe,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  addss  %xmm1,%xmm0
  mov    -0xc(%rbp),%eax
  movss  %xmm0,(%rdx,%rax,4)
  addl   $0x1,-0x4(%rbp)
L13:
  cmpl   $0xf,-0x4(%rbp)
  jbe    L24
  addl   $0x1,-0x8(%rbp)
L10:
  cmpl   $0xf,-0x8(%rbp)
  jbe    L22
  addl   $0x1,-0xc(%rbp)
L61:
  cmpl   $0xfff,-0xc(%rbp)
  jbe    L51
  addl   $0x1,-0x10(%rbp)
L54:
  cmpl   $0xfff,-0x10(%rbp)
  jbe    L53
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void mpeg4_cpu(float result[4096][4096], float prev[4096 + 16][4096 + 16], float curr[16 * 16]) {
  unsigned int i;
  unsigned int j;
  unsigned int k;
  unsigned int l;
  for (i = 0; i < 4096; ++i)
    for (j = 0; j < 4096; ++j)
      for (k = 0; k < 16; ++k)
        for (l = 0; l < 16; ++l)
          result[i][j] += prev[i + k][j + l] * curr[k * 16 + l];
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<mpeg4_cpu>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  mov    %rdx,%r10
  mov    %rdi,%r14
  mov    $0x0,%r13d
  mov    $0x10,%r15d
  jmp    L58
L55:
  add    $0x4,%rdx
  add    $0x1,%edi
  cmp    $0x1010,%edi
  je     L60
L35:
  lea    -0x10(%rdi),%r11d
  mov    %r15d,%esi
  sub    %edi,%esi
  mov    %r13d,%r8d
  mov    $0x110,%r9d
  sub    %edi,%r9d
L42:
  mov    %r8d,%eax
  mov    %rax,%rcx
  shl    $0x8,%rcx
  add    %rax,%rcx
  shl    $0x6,%rcx
  add    %rbx,%rcx
  mov    %r11d,%eax
L5:
  lea    (%rax,%rsi,1),%r12d
  mov    %eax,%ebp
  movss  (%r10,%r12,4),%xmm0
  mulss  (%rcx,%rbp,4),%xmm0
  addss  (%rdx),%xmm0
  movss  %xmm0,(%rdx)
  add    $0x1,%eax
  cmp    %edi,%eax
  jne    L5
  add    $0x1,%r8d
  add    $0x10,%esi
  cmp    %r9d,%esi
  jne    L42
  jmp    L55
L60:
  add    $0x1,%r13d
  add    $0x4000,%r14
  cmp    $0x1000,%r13d
  je     L47
L58:
  mov    %r14,%rdx
  mov    $0x10,%edi
  jmp    L35
L47:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void mpeg4_cpu(float result[4096][4096], float prev[4096 + 16][4096 + 16], float curr[16 * 16]) {
  unsigned int i;
  unsigned int j;
  unsigned int k;
  unsigned int l;
  for (i = 0; i < 4096; ++i)
    for (j = 0; j < 4096; ++j)
      for (k = 0; k < 16; ++k)
        for (l = 0; l < 16; ++l)
          result[i][j] += prev[i + k][j + l] * curr[k * 16 + l];
}
```