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

```asm
<difference>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  test   %edx,%edx
  jle    L63
  mov    %ecx,%r14d
  lea    -0x1(%rcx),%eax
  lea    0xc(%rdi,%rax,8),%r12
  lea    0x4(%rsi),%r13
  lea    -0x1(%rdx),%edx
  imul   $0x2a3,%rdx,%rdx
  add    %rax,%rdx
  lea    0x1524(%rdi,%rdx,8),%rcx
  mov    %rcx,0x10(%rsp)
  pxor   %xmm4,%xmm4
  movss  %xmm4,0xc(%rsp)
  mov    $0x0,%r15d
  not    %rax
  shl    $0x3,%rax
  mov    %rax,0x18(%rsp)
  jmp    L0
L17:
  movss  -0x4(%rbx),%xmm0
  subss  -0x4(%rbp),%xmm0
  movss  (%rbx),%xmm1
  subss  0x0(%rbp),%xmm1
  mulss  %xmm0,%xmm0
  mulss  %xmm1,%xmm1
  addss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  pxor   %xmm2,%xmm2
  ucomisd %xmm0,%xmm2
  ja     L33
  sqrtsd %xmm0,%xmm0
L36:
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  addsd  %xmm1,%xmm0
  pxor   %xmm3,%xmm3
  cvtsd2ss %xmm0,%xmm3
  movss  %xmm3,0xc(%rsp)
  add    $0x8,%rbx
  add    $0x8,%rbp
  cmp    %r12,%rbx
  jne    L17
  add    %r14d,%r15d
L52:
  add    $0x1518,%r12
  add    $0x1518,%r13
  cmp    0x10(%rsp),%r12
  je     L37
L0:
  mov    0x18(%rsp),%rax
  lea    (%rax,%r12,1),%rbx
  mov    %r13,%rbp
  test   %r14d,%r14d
  jg     L17
  jmp    L52
L33:
  call   <sqrt@plt>
  jmp    L36
L63:
  pxor   %xmm5,%xmm5
  movss  %xmm5,0xc(%rsp)
  mov    $0x0,%r15d
L37:
  pxor   %xmm1,%xmm1
  cvtsi2ss %r15d,%xmm1
  movss  0xc(%rsp),%xmm0
  divss  %xmm1,%xmm0
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
float difference(v1, v2, pic_x, pic_y)
float v1[675][675][2], v2[675][675][2];
int pic_x, pic_y;
{
  int i, j, n;
  float sum, t1, t2;
  sum = 0.0;
  n = 0;
  for (i = 0; i < pic_x; i++)
    for (j = 0; j < pic_y; j++) {
      t1 = v1[i][j][0] - v2[i][j][0];
      t2 = v1[i][j][1] - v2[i][j][1];
      sum += sqrt(t1 * t1 + t2 * t2);
      n++;
    }
  sum = sum / n;
  return (sum);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<difference>:
  endbr64
  test   %edx,%edx
  jle    L59
  lea    -0x1(%rdx),%eax
  push   %r15
  lea    -0x1(%rcx),%r8d
  pxor   %xmm2,%xmm2
  imul   $0x2a3,%rax,%rax
  push   %r14
  mov    %ecx,%r14d
  xor    %r15d,%r15d
  push   %r13
  lea    0x0(,%r8,8),%rcx
  lea    0x4(%rsi),%r13
  pxor   %xmm3,%xmm3
  push   %r12
  lea    0xc(%rdi,%rcx,1),%r12
  push   %rbp
  add    %r8,%rax
  push   %rbx
  lea    0x1524(%rdi,%rax,8),%rdx
  mov    $0xfffffffffffffff8,%rax
  sub    %rcx,%rax
  sub    $0x28,%rsp
  nopl   0x0(%rax)
L45:
  lea    (%rax,%r12,1),%rbx
  mov    %r13,%rbp
  test   %r14d,%r14d
  jle    L56
  nopl   0x0(%rax)
L16:
  movss  -0x4(%rbx),%xmm0
  movss  (%rbx),%xmm1
  subss  -0x4(%rbp),%xmm0
  subss  0x0(%rbp),%xmm1
  mulss  %xmm0,%xmm0
  mulss  %xmm1,%xmm1
  addss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  ucomisd %xmm0,%xmm3
  ja     L44
  sqrtsd %xmm0,%xmm0
L18:
  cvtss2sd %xmm2,%xmm2
  addsd  %xmm0,%xmm2
  add    $0x8,%rbx
  add    $0x8,%rbp
  cvtsd2ss %xmm2,%xmm2
  cmp    %rbx,%r12
  jne    L16
  add    %r14d,%r15d
L56:
  add    $0x1518,%r12
  add    $0x1518,%r13
  cmp    %rdx,%r12
  jne    L45
  pxor   %xmm0,%xmm0
  add    $0x28,%rsp
  cvtsi2ss %r15d,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  divss  %xmm0,%xmm2
  movaps %xmm2,%xmm0
  ret
L59:
  pxor   %xmm0,%xmm0
  movaps %xmm0,%xmm2
  divss  %xmm0,%xmm2
  movaps %xmm2,%xmm0
  ret
L44:
  mov    %rax,0x18(%rsp)
  mov    %rdx,0x10(%rsp)
  movss  %xmm2,0xc(%rsp)
  call   <sqrt@plt>
  mov    0x18(%rsp),%rax
  mov    0x10(%rsp),%rdx
  pxor   %xmm3,%xmm3
  movss  0xc(%rsp),%xmm2
  jmp    L18
```

assistant: ```c
float difference(v1, v2, pic_x, pic_y)
float v1[675][675][2], v2[675][675][2];
int pic_x, pic_y;
{
  int i, j, n;
  float sum, t1, t2;
  sum = 0.0;
  n = 0;
  for (i = 0; i < pic_x; i++)
    for (j = 0; j < pic_y; j++) {
      t1 = v1[i][j][0] - v2[i][j][0];
      t2 = v1[i][j][1] - v2[i][j][1];
      sum += sqrt(t1 * t1 + t2 * t2);
      n++;
    }
  sum = sum / n;
  return (sum);
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<difference>:
  endbr64
  test   %edx,%edx
  jle    L15
  lea    -0x1(%rdx),%eax
  push   %r15
  lea    -0x1(%rcx),%r8d
  pxor   %xmm2,%xmm2
  imul   $0x2a3,%rax,%rax
  push   %r14
  mov    %ecx,%r14d
  xor    %r15d,%r15d
  push   %r13
  lea    0x0(,%r8,8),%rcx
  lea    0x4(%rsi),%r13
  pxor   %xmm3,%xmm3
  push   %r12
  lea    0xc(%rdi,%rcx,1),%r12
  push   %rbp
  add    %r8,%rax
  push   %rbx
  lea    0x1524(%rdi,%rax,8),%rdx
  mov    $0xfffffffffffffff8,%rax
  sub    %rcx,%rax
  sub    $0x28,%rsp
  nopl   0x0(%rax)
L2:
  lea    (%rax,%r12,1),%rbx
  mov    %r13,%rbp
  test   %r14d,%r14d
  jle    L60
  nopl   0x0(%rax)
L12:
  movss  -0x4(%rbx),%xmm0
  movss  (%rbx),%xmm1
  subss  -0x4(%rbp),%xmm0
  subss  0x0(%rbp),%xmm1
  mulss  %xmm0,%xmm0
  mulss  %xmm1,%xmm1
  addss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  ucomisd %xmm0,%xmm3
  ja     L47
  sqrtsd %xmm0,%xmm0
  cvtss2sd %xmm2,%xmm2
  add    $0x8,%rbx
  add    $0x8,%rbp
  addsd  %xmm0,%xmm2
  cvtsd2ss %xmm2,%xmm2
  cmp    %r12,%rbx
  jne    L12
L14:
  add    %r14d,%r15d
L60:
  add    $0x1518,%r12
  add    $0x1518,%r13
  cmp    %rdx,%r12
  jne    L2
  pxor   %xmm0,%xmm0
  add    $0x28,%rsp
  cvtsi2ss %r15d,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  divss  %xmm0,%xmm2
  movaps %xmm2,%xmm0
  ret
L15:
  pxor   %xmm0,%xmm0
  movaps %xmm0,%xmm2
  divss  %xmm0,%xmm2
  movaps %xmm2,%xmm0
  ret
L47:
  mov    %rax,0x18(%rsp)
  add    $0x8,%rbx
  add    $0x8,%rbp
  mov    %rdx,0x10(%rsp)
  movss  %xmm2,0xc(%rsp)
  call   <sqrt@plt>
  movss  0xc(%rsp),%xmm2
  cmp    %r12,%rbx
  mov    0x10(%rsp),%rdx
  mov    0x18(%rsp),%rax
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm2,%xmm2
  addsd  %xmm0,%xmm2
  cvtsd2ss %xmm2,%xmm2
  jne    L12
  jmp    L14
```

assistant: ```c
float difference(v1, v2, pic_x, pic_y)
float v1[675][675][2], v2[675][675][2];
int pic_x, pic_y;
{
  int i, j, n;
  float sum, t1, t2;
  sum = 0.0;
  n = 0;
  for (i = 0; i < pic_x; i++)
    for (j = 0; j < pic_y; j++) {
      t1 = v1[i][j][0] - v2[i][j][0];
      t2 = v1[i][j][1] - v2[i][j][1];
      sum += sqrt(t1 * t1 + t2 * t2);
      n++;
    }
  sum = sum / n;
  return (sum);
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<Tcl_Ckalloc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L2
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <panic@plt>
L2:
  mov    -0x8(%rbp),%rax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D7
type_infered: string

tool: D7: unable to alloc %d bytes

assistant: ```c
void *Tcl_Ckalloc(size)
unsigned int size;
{
  char *result;
  result = malloc(size);
  if (result == 0)
    panic("unable to alloc %d bytes", size);
  return result;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<Tcl_Ckalloc>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%ebp
  mov    %edi,%edi
  call   <malloc@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L17
L1:
  mov    %rbx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L17:
  mov    %ebp,%esi
  lea    D0(%rip),%rdi
  mov    $0x0,%eax
  call   <panic@plt>
  jmp    L1
```

tool_calls: name: read_data
arguments: data_tag: D0
type_infered: string

tool: D0: unable to alloc %d bytes

assistant: ```c
void *Tcl_Ckalloc(size)
unsigned int size;
{
  char *result;
  result = malloc(size);
  if (result == 0)
    panic("unable to alloc %d bytes", size);
  return result;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<Tcl_Ckalloc>:
  endbr64
  push   %r12
  mov    %edi,%edi
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x8,%rsp
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L7
L19:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
L7:
  mov    %ebp,%esi
  lea    D2(%rip),%rdi
  xor    %eax,%eax
  call   <panic@plt>
  jmp    L19
```

tool_calls: name: retrieve_data
arguments: tag: D2
type_infered: string

tool: D2: unable to alloc %d bytes

assistant: ```c
void *Tcl_Ckalloc(size)
unsigned int size;
{
  char *result;
  result = malloc(size);
  if (result == 0)
    panic("unable to alloc %d bytes", size);
  return result;
}
```
user: What is the c source code of the assembly code below:

```asm
<Tcl_Ckalloc>:
  endbr64
  push   %r12
  mov    %edi,%edi
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x8,%rsp
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L1
L15:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
L1:
  mov    %ebp,%esi
  lea    D5(%rip),%rdi
  xor    %eax,%eax
  call   <panic@plt>
  jmp    L15
```

tool_calls: name: parse_data
arguments: data_tag: D5
type: string

tool: D5: unable to alloc %d bytes

assistant: ```c
void *Tcl_Ckalloc(size)
unsigned int size;
{
  char *result;
  result = malloc(size);
  if (result == 0)
    panic("unable to alloc %d bytes", size);
  return result;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<print_daustd_usage>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  pop    %rbp
  ret
```

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

tool: D0: Usage: daust [options]
	-V, --version		Print the version and exit.
	-h, --help		Print this help and exit.

Options: 
	-l, --logfile		Filename for optional logging.
	-k, --keynode		Node that will introduce this node to the network.
	-p, --publicfacing	Specify a public facing address for this node.
	-v, --verbose		More verbose output


assistant: ```c
void print_daustd_usage() {
  printf("Usage: daust [options]\n"
         "\t-V, --version\t\tPrint the version and exit.\n"
         "\t-h, --help\t\tPrint this help and exit.\n\n"
         "Options: \n"
         "\t-l, --logfile\t\tFilename for optional logging.\n"
         "\t-k, --keynode\t\tNode that will introduce this node to the network.\n"
         "\t-p, --publicfacing\tSpecify a public facing address for this node.\n"
         "\t-v, --verbose\t\tMore verbose output\n");
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<print_daustd_usage>:
  endbr64
  sub    $0x8,%rsp
  lea    D0(%rip),%rdi
  call   <printf@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D0
datatype: string

tool: D0: Usage: daust [options]
	-V, --version		Print the version and exit.
	-h, --help		Print this help and exit.

Options: 
	-l, --logfile		Filename for optional logging.
	-k, --keynode		Node that will introduce this node to the network.
	-p, --publicfacing	Specify a public facing address for this node.
	-v, --verbose		More verbose output


assistant: ```c
void print_daustd_usage() {
  printf("Usage: daust [options]\n"
         "\t-V, --version\t\tPrint the version and exit.\n"
         "\t-h, --help\t\tPrint this help and exit.\n\n"
         "Options: \n"
         "\t-l, --logfile\t\tFilename for optional logging.\n"
         "\t-k, --keynode\t\tNode that will introduce this node to the network.\n"
         "\t-p, --publicfacing\tSpecify a public facing address for this node.\n"
         "\t-v, --verbose\t\tMore verbose output\n");
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<print_daustd_usage>:
  endbr64
  lea    D6(%rip),%rdi
  jmp    1050 <printf@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D6
data_type: string

tool: D6: Usage: daust [options]
	-V, --version		Print the version and exit.
	-h, --help		Print this help and exit.

Options: 
	-l, --logfile		Filename for optional logging.
	-k, --keynode		Node that will introduce this node to the network.
	-p, --publicfacing	Specify a public facing address for this node.
	-v, --verbose		More verbose output


assistant: ```c
void print_daustd_usage() {
  printf("Usage: daust [options]\n"
         "\t-V, --version\t\tPrint the version and exit.\n"
         "\t-h, --help\t\tPrint this help and exit.\n\n"
         "Options: \n"
         "\t-l, --logfile\t\tFilename for optional logging.\n"
         "\t-k, --keynode\t\tNode that will introduce this node to the network.\n"
         "\t-p, --publicfacing\tSpecify a public facing address for this node.\n"
         "\t-v, --verbose\t\tMore verbose output\n");
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<print_daustd_usage>:
  endbr64
  lea    D7(%rip),%rdi
  jmp    1050 <printf@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D7
type_guessed: string

tool: D7: Usage: daust [options]
	-V, --version		Print the version and exit.
	-h, --help		Print this help and exit.

Options: 
	-l, --logfile		Filename for optional logging.
	-k, --keynode		Node that will introduce this node to the network.
	-p, --publicfacing	Specify a public facing address for this node.
	-v, --verbose		More verbose output


assistant: ```c
void print_daustd_usage() {
  printf("Usage: daust [options]\n"
         "\t-V, --version\t\tPrint the version and exit.\n"
         "\t-h, --help\t\tPrint this help and exit.\n\n"
         "Options: \n"
         "\t-l, --logfile\t\tFilename for optional logging.\n"
         "\t-k, --keynode\t\tNode that will introduce this node to the network.\n"
         "\t-p, --publicfacing\tSpecify a public facing address for this node.\n"
         "\t-v, --verbose\t\tMore verbose output\n");
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<pair_one2m_prompt_element_name>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xa0,%rsp
  mov    %rdi,-0x98(%rbp)
  mov    %rsi,-0xa0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0xa0(%rbp),%rcx
  mov    -0x98(%rbp),%rdx
  lea    -0x90(%rbp),%rax
  lea    D2(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L5
  call   <__stack_chk_fail@plt>
L5:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D2
type: string

tool: D2: %s%s

assistant: ```c
char *pair_one2m_prompt_element_name(char *pair_one2m_prefix, char *folder_label) {
  char element_name[128];
  sprintf(element_name, "%s%s", pair_one2m_prefix, folder_label);
  return strdup(element_name);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<pair_one2m_prompt_element_name>:
  endbr64
  push   %rbx
  sub    $0x90,%rsp
  mov    %rdi,%rdx
  mov    %rsi,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  lea    D7(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <strdup@plt>
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L0
  add    $0x90,%rsp
  pop    %rbx
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D7
type: string

tool: D7: %s%s

assistant: ```c
char *pair_one2m_prompt_element_name(char *pair_one2m_prefix, char *folder_label) {
  char element_name[128];
  sprintf(element_name, "%s%s", pair_one2m_prefix, folder_label);
  return strdup(element_name);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<pair_one2m_prompt_element_name>:
  endbr64
  push   %rbp
  mov    %rdi,%rdx
  mov    %rsi,%rcx
  lea    D1(%rip),%rsi
  sub    $0x90,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <strdup@plt>
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L0
  add    $0x90,%rsp
  pop    %rbp
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D1
type: string

tool: D1: %s%s

assistant: ```c
char *pair_one2m_prompt_element_name(char *pair_one2m_prefix, char *folder_label) {
  char element_name[128];
  sprintf(element_name, "%s%s", pair_one2m_prefix, folder_label);
  return strdup(element_name);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<pair_one2m_prompt_element_name>:
  endbr64
  push   %rbp
  mov    %rdi,%rdx
  mov    %rsi,%rcx
  lea    D3(%rip),%rsi
  sub    $0x90,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <strdup@plt>
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L7
  add    $0x90,%rsp
  pop    %rbp
  ret
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D3
type_guessed: string

tool: D3: %s%s

assistant: ```c
char *pair_one2m_prompt_element_name(char *pair_one2m_prefix, char *folder_label) {
  char element_name[128];
  sprintf(element_name, "%s%s", pair_one2m_prefix, folder_label);
  return strdup(element_name);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<para_parse_str>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L24
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  jmp    L104
L24:
  mov    -0x8(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x3f,%al
  je     L29
  mov    -0x8(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x26,%al
  je     L29
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  jmp    L104
L29:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  je     L8
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  jmp    L104
L8:
  mov    -0x8(%rbp),%rax
  mov    $0x3d,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  jmp    L56
L15:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x26,%al
  je     L72
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    -0x8(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
L56:
  addq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L15
  jmp    L83
L72:
  nop
L83:
  mov    -0x10(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
L104:
  leave
  ret
```

assistant: ```c
char *para_parse_str(const char *src, const char *para, char *val) {
  char *p;
  char *q;
  q = strstr(src, para);
  if (!q) {
    *val = '\0';
    return val;
  }
  if (*(q - 1) != '?' && *(q - 1) != '&') {
    *val = '\0';
    return val;
  }
  if (*(q + strlen(para)) != '=') {
    *val = '\0';
    return val;
  }
  q = strchr(q, '=');
  p = val;
  while (*++q)
    if (*q == '&')
      break;
    else
      *p++ = *q;
  *p = '\0';
  return val;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<para_parse_str>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%r12
  mov    %rdx,%rbp
  call   <strstr@plt>
  test   %rax,%rax
  je     L34
  mov    %rax,%rbx
  movzbl -0x1(%rax),%eax
  cmp    $0x3f,%al
  je     L35
  cmp    $0x26,%al
  je     L35
  movb   $0x0,0x0(%rbp)
L97:
  mov    %rbp,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L34:
  movb   $0x0,0x0(%rbp)
  jmp    L97
L35:
  mov    %r12,%rdi
  call   <strlen@plt>
  cltq
  cmpb   $0x3d,(%rbx,%rax,1)
  je     L70
  movb   $0x0,0x0(%rbp)
  jmp    L97
L70:
  mov    $0x3d,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  lea    0x1(%rax),%rcx
  movzbl 0x1(%rax),%eax
  cmp    $0x26,%al
  je     L37
  test   %al,%al
  je     L37
  mov    %rbp,%rdx
L30:
  add    $0x1,%rdx
  mov    %al,-0x1(%rdx)
  add    $0x1,%rcx
  movzbl (%rcx),%eax
  cmp    $0x26,%al
  je     L54
  test   %al,%al
  jne    L30
L54:
  movb   $0x0,(%rdx)
  jmp    L97
L37:
  mov    %rbp,%rdx
  jmp    L54
```

assistant: ```c
char *para_parse_str(const char *src, const char *para, char *val) {
  char *p;
  char *q;
  q = strstr(src, para);
  if (!q) {
    *val = '\0';
    return val;
  }
  if (*(q - 1) != '?' && *(q - 1) != '&') {
    *val = '\0';
    return val;
  }
  if (*(q + strlen(para)) != '=') {
    *val = '\0';
    return val;
  }
  q = strchr(q, '=');
  p = val;
  while (*++q)
    if (*q == '&')
      break;
    else
      *p++ = *q;
  *p = '\0';
  return val;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<para_parse_str>:
  endbr64
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  call   <strstr@plt>
  test   %rax,%rax
  je     L29
  mov    %rax,%rbp
  movzbl -0x1(%rax),%eax
  cmp    $0x3f,%al
  je     L17
  cmp    $0x26,%al
  je     L17
L29:
  mov    %r12,%rax
  pop    %rbp
  movb   $0x0,(%r12)
  pop    %r12
  pop    %r13
  ret
  cs nopw 0x0(%rax,%rax,1)
L17:
  mov    %r13,%rdi
  call   <strlen@plt>
  cltq
  cmpb   $0x3d,0x0(%rbp,%rax,1)
  jne    L29
  mov    $0x3d,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    %r12,%rdx
  lea    0x1(%rax),%rcx
  movzbl 0x1(%rax),%eax
  cmp    $0x26,%al
  jne    L65
  jmp    L9
  nop
L16:
  add    $0x1,%rcx
  mov    %al,(%rdx)
  add    $0x1,%rdx
  movzbl (%rcx),%eax
  cmp    $0x26,%al
  je     L9
L65:
  test   %al,%al
  jne    L16
L9:
  movb   $0x0,(%rdx)
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
char *para_parse_str(const char *src, const char *para, char *val) {
  char *p;
  char *q;
  q = strstr(src, para);
  if (!q) {
    *val = '\0';
    return val;
  }
  if (*(q - 1) != '?' && *(q - 1) != '&') {
    *val = '\0';
    return val;
  }
  if (*(q + strlen(para)) != '=') {
    *val = '\0';
    return val;
  }
  q = strchr(q, '=');
  p = val;
  while (*++q)
    if (*q == '&')
      break;
    else
      *p++ = *q;
  *p = '\0';
  return val;
}
```
user: Translate the below assembly code into C programming language:

```asm
<para_parse_str>:
  endbr64
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  call   <strstr@plt>
  test   %rax,%rax
  je     L58
  mov    %rax,%rbp
  movzbl -0x1(%rax),%eax
  cmp    $0x3f,%al
  je     L11
  cmp    $0x26,%al
  je     L11
L58:
  mov    %r12,%rax
  pop    %rbp
  movb   $0x0,(%r12)
  pop    %r12
  pop    %r13
  ret
  cs nopw 0x0(%rax,%rax,1)
L11:
  mov    %r13,%rdi
  call   <strlen@plt>
  cltq
  cmpb   $0x3d,0x0(%rbp,%rax,1)
  jne    L58
  mov    $0x3d,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    %r12,%rdx
  lea    0x1(%rax),%rcx
  movzbl 0x1(%rax),%eax
  cmp    $0x26,%al
  jne    L66
  jmp    L0
  nop
L20:
  add    $0x1,%rcx
  mov    %al,(%rdx)
  add    $0x1,%rdx
  movzbl (%rcx),%eax
  cmp    $0x26,%al
  je     L0
L66:
  test   %al,%al
  jne    L20
L0:
  movb   $0x0,(%rdx)
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
char *para_parse_str(const char *src, const char *para, char *val) {
  char *p;
  char *q;
  q = strstr(src, para);
  if (!q) {
    *val = '\0';
    return val;
  }
  if (*(q - 1) != '?' && *(q - 1) != '&') {
    *val = '\0';
    return val;
  }
  if (*(q + strlen(para)) != '=') {
    *val = '\0';
    return val;
  }
  q = strchr(q, '=');
  p = val;
  while (*++q)
    if (*q == '&')
      break;
    else
      *p++ = *q;
  *p = '\0';
  return val;
}
```