ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<RandomFunc>:
  endbr64
  mov    (%rdi),%edx
  mov    %edx,%eax
  xor    $0x29be1cdb,%eax
  cmp    $0x29be1cdb,%edx
  je     L0
  mov    %eax,%edi
  mov    %eax,%ecx
  and    $0xffffff,%eax
  shr    $0x18,%edi
  shl    $0x18,%ecx
  mov    %edi,%edx
  or     %ecx,%eax
  mov    %dl,%al
  shl    $0x3,%eax
  mov    %eax,(%rsi)
  ret
L0:
  mov    $0x0,%ah
  xor    %edx,%edx
  mov    %dl,%al
  shl    $0x3,%eax
  mov    %eax,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local1;
  unsigned short copy11;
  char copy12;
  char copy13;
  {
    state[0UL] = input[0UL] ^ 700325083U;
    local1 = 0UL;
    while (local1 < 1UL) {
      if (state[0UL] != local1) {
        if (state[0UL] == local1) {
          copy11 = *((unsigned short *)(&state[0UL]) + 0);
          *((unsigned short *)(&state[0UL]) + 0) = *((unsigned short *)(&state[0UL]) + 1);
          *((unsigned short *)(&state[0UL]) + 1) = copy11;
        } else {
          copy12 = *((char *)(&state[local1]) + 3);
          *((char *)(&state[local1]) + 3) = *((char *)(&state[local1]) + 0);
          *((char *)(&state[local1]) + 0) = copy12;
        }
      } else if (state[0UL] == local1) {
        copy13 = *((char *)(&state[local1]) + 1);
        *((char *)(&state[local1]) + 1) = *((char *)(&state[local1]) + 0);
        *((char *)(&state[local1]) + 0) = copy13;
      } else {
        state[local1] <<= ((state[local1] >> 4U) & 7U) | 1UL;
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] << 3U;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<RandomFunc>:
  endbr64
  mov    (%rdi),%edx
  mov    %edx,%eax
  xor    $0x29be1cdb,%eax
  cmp    $0x29be1cdb,%edx
  je     L6
  mov    %eax,%edi
  mov    %eax,%ecx
  and    $0xffffff,%eax
  shr    $0x18,%edi
  shl    $0x18,%ecx
  mov    %edi,%edx
  or     %ecx,%eax
  mov    %dl,%al
  shl    $0x3,%eax
  mov    %eax,(%rsi)
  ret
L6:
  mov    $0x0,%ah
  xor    %edx,%edx
  mov    %dl,%al
  shl    $0x3,%eax
  mov    %eax,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local1;
  unsigned short copy11;
  char copy12;
  char copy13;
  {
    state[0UL] = input[0UL] ^ 700325083U;
    local1 = 0UL;
    while (local1 < 1UL) {
      if (state[0UL] != local1) {
        if (state[0UL] == local1) {
          copy11 = *((unsigned short *)(&state[0UL]) + 0);
          *((unsigned short *)(&state[0UL]) + 0) = *((unsigned short *)(&state[0UL]) + 1);
          *((unsigned short *)(&state[0UL]) + 1) = copy11;
        } else {
          copy12 = *((char *)(&state[local1]) + 3);
          *((char *)(&state[local1]) + 3) = *((char *)(&state[local1]) + 0);
          *((char *)(&state[local1]) + 0) = copy12;
        }
      } else if (state[0UL] == local1) {
        copy13 = *((char *)(&state[local1]) + 1);
        *((char *)(&state[local1]) + 1) = *((char *)(&state[local1]) + 0);
        *((char *)(&state[local1]) + 0) = copy13;
      } else {
        state[local1] <<= ((state[local1] >> 4U) & 7U) | 1UL;
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] << 3U;
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<rc_url_login_with_password>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %rdi,-0xa8(%rbp)
  mov    %rsi,-0xb0(%rbp)
  mov    %rdx,-0xb8(%rbp)
  mov    %rcx,-0xc0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0xb8(%rbp),%rdx
  lea    -0x90(%rbp),%rax
  mov    $0x40,%esi
  mov    %rax,%rdi
  call   <rc_url_encode@plt>
  test   %rax,%rax
  je     L35
  mov    $0xffffffff,%eax
  jmp    L0
L35:
  mov    -0xc0(%rbp),%rdx
  lea    -0x50(%rbp),%rax
  mov    $0x40,%esi
  mov    %rax,%rdi
  call   <rc_url_encode@plt>
  test   %rax,%rax
  je     L56
  mov    $0xffffffff,%eax
  jmp    L0
L56:
  lea    -0x50(%rbp),%rcx
  lea    -0x90(%rbp),%rdx
  mov    -0xb0(%rbp),%rsi
  mov    -0xa8(%rbp),%rax
  mov    %rcx,%r8
  mov    %rdx,%rcx
  lea    D7(%rip),%rdx
  mov    %rax,%rdi
  call   <snprintf@plt>
  mov    %eax,-0x94(%rbp)
  mov    -0x94(%rbp),%eax
  cltq
  cmp    %rax,-0xb0(%rbp)
  ja     L16
  mov    $0xffffffff,%eax
  jmp    L0
L16:
  mov    $0x0,%eax
L0:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L18
  call   <__stack_chk_fail@plt>
L18:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D7
type_guessed: string

tool: D7: http://retroachievements.org/dorequest.php?r=login&u=%s&p=%s

assistant: ```c
int rc_url_login_with_password(char *buffer, size_t size, const char *user_name, const char *password) {
  char urle_user_name[64];
  char urle_password[64];
  int written;
  if (rc_url_encode(urle_user_name, sizeof(urle_user_name), user_name) != 0) {
    return -1;
  }
  if (rc_url_encode(urle_password, sizeof(urle_password), password) != 0) {
    return -1;
  }
  written = snprintf(buffer, size, "http://retroachievements.org/dorequest.php?r=login&u=%s&p=%s", urle_user_name, urle_password);
  return (size_t)written >= size ? -1 : 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<rc_url_login_with_password>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x90,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%rbx
  mov    %rcx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  mov    $0x40,%esi
  call   <rc_url_encode@plt>
  test   %rax,%rax
  jne    L39
  lea    0x40(%rsp),%rdi
  mov    %r12,%rdx
  mov    $0x40,%esi
  call   <rc_url_encode@plt>
  test   %rax,%rax
  jne    L37
  mov    %rsp,%rcx
  lea    0x40(%rsp),%r8
  lea    D0(%rip),%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <snprintf@plt>
  cltq
  cmp    %rbx,%rax
  setae  %al
  movzbl %al,%eax
  neg    %eax
L21:
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L42
  add    $0x90,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L39:
  mov    $0xffffffff,%eax
  jmp    L21
L37:
  mov    $0xffffffff,%eax
  jmp    L21
L42:
  call   <__stack_chk_fail@plt>
```

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

tool: D0: http://retroachievements.org/dorequest.php?r=login&u=%s&p=%s

assistant: ```c
int rc_url_login_with_password(char *buffer, size_t size, const char *user_name, const char *password) {
  char urle_user_name[64];
  char urle_password[64];
  int written;
  if (rc_url_encode(urle_user_name, sizeof(urle_user_name), user_name) != 0) {
    return -1;
  }
  if (rc_url_encode(urle_password, sizeof(urle_password), password) != 0) {
    return -1;
  }
  written = snprintf(buffer, size, "http://retroachievements.org/dorequest.php?r=login&u=%s&p=%s", urle_user_name, urle_password);
  return (size_t)written >= size ? -1 : 0;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<rc_url_login_with_password>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rsi,%rbx
  mov    $0x40,%esi
  sub    $0x90,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r13
  mov    %r13,%rdi
  call   <rc_url_encode@plt>
  test   %rax,%rax
  jne    L33
  lea    0x40(%rsp),%r14
  mov    %r12,%rdx
  mov    $0x40,%esi
  mov    %r14,%rdi
  call   <rc_url_encode@plt>
  test   %rax,%rax
  jne    L33
  mov    %r14,%r8
  mov    %r13,%rcx
  lea    D7(%rip),%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <snprintf@plt>
  cltq
  cmp    %rbx,%rax
  setae  %al
  movzbl %al,%eax
  neg    %eax
L26:
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L36
  add    $0x90,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  cs nopw 0x0(%rax,%rax,1)
L33:
  mov    $0xffffffff,%eax
  jmp    L26
L36:
  call   <__stack_chk_fail@plt>
```

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

tool: D7: http://retroachievements.org/dorequest.php?r=login&u=%s&p=%s

assistant: ```c
int rc_url_login_with_password(char *buffer, size_t size, const char *user_name, const char *password) {
  char urle_user_name[64];
  char urle_password[64];
  int written;
  if (rc_url_encode(urle_user_name, sizeof(urle_user_name), user_name) != 0) {
    return -1;
  }
  if (rc_url_encode(urle_password, sizeof(urle_password), password) != 0) {
    return -1;
  }
  written = snprintf(buffer, size, "http://retroachievements.org/dorequest.php?r=login&u=%s&p=%s", urle_user_name, urle_password);
  return (size_t)written >= size ? -1 : 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<rc_url_login_with_password>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rsi,%rbx
  mov    $0x40,%esi
  sub    $0x90,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r13
  mov    %r13,%rdi
  call   <rc_url_encode@plt>
  test   %rax,%rax
  jne    L31
  lea    0x40(%rsp),%r14
  mov    %r12,%rdx
  mov    $0x40,%esi
  mov    %r14,%rdi
  call   <rc_url_encode@plt>
  test   %rax,%rax
  jne    L31
  mov    %r14,%r8
  mov    %r13,%rcx
  lea    D1(%rip),%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <snprintf@plt>
  cltq
  cmp    %rbx,%rax
  setae  %al
  movzbl %al,%eax
  neg    %eax
L20:
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L22
  add    $0x90,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  cs nopw 0x0(%rax,%rax,1)
L31:
  mov    $0xffffffff,%eax
  jmp    L20
L22:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D1
datatype: string

tool: D1: http://retroachievements.org/dorequest.php?r=login&u=%s&p=%s

assistant: ```c
int rc_url_login_with_password(char *buffer, size_t size, const char *user_name, const char *password) {
  char urle_user_name[64];
  char urle_password[64];
  int written;
  if (rc_url_encode(urle_user_name, sizeof(urle_user_name), user_name) != 0) {
    return -1;
  }
  if (rc_url_encode(urle_password, sizeof(urle_password), password) != 0) {
    return -1;
  }
  written = snprintf(buffer, size, "http://retroachievements.org/dorequest.php?r=login&u=%s&p=%s", urle_user_name, urle_password);
  return (size_t)written >= size ? -1 : 0;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<gravityOnMoon>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  movsd  %xmm0,-0x18(%rbp)
  movsd  D9(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D9
type_guessed: byte[8]
name: disassemble_data
arguments: data_label: D16
type_guessed: string

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

tool: D16: Gravity on the Moon is %.3lf


assistant: ```c
void gravityOnMoon(double gravity) {
  const double gravitationalMoon = 17.0 / 100;
  printf("Gravity on the Moon is %.3lf\n", gravity * gravitationalMoon);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<gravityOnMoon>:
  endbr64
  sub    $0x8,%rsp
  mulsd  D14(%rip),%xmm0
  lea    D8(%rip),%rdi
  call   <printf@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: read_data
arguments: tag: D14
type_guessed: byte[8]
name: read_data
arguments: tag: D8
type_guessed: string

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

tool: D8: Gravity on the Moon is %.3lf


assistant: ```c
void gravityOnMoon(double gravity) {
  const double gravitationalMoon = 17.0 / 100;
  printf("Gravity on the Moon is %.3lf\n", gravity * gravitationalMoon);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<gravityOnMoon>:
  endbr64
  mulsd  D7(%rip),%xmm0
  lea    D5(%rip),%rdi
  jmp    1050 <printf@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D7
data_type: byte[8]
name: extract_symbolic_data
arguments: data_tag: D5
data_type: string

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

tool: D5: Gravity on the Moon is %.3lf


assistant: ```c
void gravityOnMoon(double gravity) {
  const double gravitationalMoon = 17.0 / 100;
  printf("Gravity on the Moon is %.3lf\n", gravity * gravitationalMoon);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<gravityOnMoon>:
  endbr64
  mulsd  D11(%rip),%xmm0
  lea    D5(%rip),%rdi
  jmp    1050 <printf@plt>
```

tool_calls: name: parse_data
arguments: tag: D11
type: byte[8]
name: parse_data
arguments: tag: D5
type: string

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

tool: D5: Gravity on the Moon is %.3lf


assistant: ```c
void gravityOnMoon(double gravity) {
  const double gravitationalMoon = 17.0 / 100;
  printf("Gravity on the Moon is %.3lf\n", gravity * gravitationalMoon);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D5
type: string

tool: D5: Test PASSED


assistant: ```c
int main(void) {
  printf("Test PASSED\n");
  return 0;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  lea    D3(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: unpack_data
arguments: label: D3
datatype: string

tool: D3: Test PASSED


assistant: ```c
int main(void) {
  printf("Test PASSED\n");
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码:

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

tool_calls: name: retrieve_data
arguments: label: D9
data_type: string

tool: D9: Test PASSED


assistant: ```c
int main(void) {
  printf("Test PASSED\n");
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

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

tool_calls: name: retrieve_data
arguments: label: D7
type_infered: string

tool: D7: Test PASSED


assistant: ```c
int main(void) {
  printf("Test PASSED\n");
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<f2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x2c(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L13
L24:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd D3(%rip),%xmm0
  jbe    L28
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
L28:
  addl   $0x1,-0x4(%rbp)
L13:
  mov    -0x4(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  setl   %al
  test   %al,%al
  jne    L24
  nop
  nop
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D3
datatype: f64

tool: D3: 10

assistant: ```c
__attribute__((noipa)) void f2(double *__restrict__ a, const double *__restrict__ b, const long *__restrict__ c, int n) {
  int i;
#pragma GCC ivdep
  for (i = 0; i < n; ++i)
    if (a[i] > 10.0)
      a[i] = b[c[i]];
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<f2>:
  endbr64
  test   %ecx,%ecx
  jle    L38
  mov    %ecx,%ecx
  mov    $0x0,%eax
  movsd  D1(%rip),%xmm1
  jmp    L46
L9:
  add    $0x1,%rax
  cmp    %rcx,%rax
  je     L38
L46:
  movsd  (%rdi,%rax,8),%xmm0
  comisd %xmm1,%xmm0
  jbe    L9
  mov    (%rdx,%rax,8),%r8
  movsd  (%rsi,%r8,8),%xmm0
  movsd  %xmm0,(%rdi,%rax,8)
  jmp    L9
L38:
  ret
```

tool_calls: name: read_data
arguments: tag: D1
type: f64

tool: D1: 10

assistant: ```c
__attribute__((noipa)) void f2(double *__restrict__ a, const double *__restrict__ b, const long *__restrict__ c, int n) {
  int i;
#pragma GCC ivdep
  for (i = 0; i < n; ++i)
    if (a[i] > 10.0)
      a[i] = b[c[i]];
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<f2>:
  endbr64
  test   %ecx,%ecx
  jle    L10
  movsd  D3(%rip),%xmm1
  movslq %ecx,%rcx
  xor    %eax,%eax
  nopl   (%rax)
L4:
  movsd  (%rdi,%rax,8),%xmm0
  comisd %xmm1,%xmm0
  jbe    L7
  mov    (%rdx,%rax,8),%r8
  movsd  (%rsi,%r8,8),%xmm0
  movsd  %xmm0,(%rdi,%rax,8)
L7:
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L4
L10:
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D3
type: f64

tool: D3: 10

assistant: ```c
__attribute__((noipa)) void f2(double *__restrict__ a, const double *__restrict__ b, const long *__restrict__ c, int n) {
  int i;
#pragma GCC ivdep
  for (i = 0; i < n; ++i)
    if (a[i] > 10.0)
      a[i] = b[c[i]];
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<f2>:
  endbr64
  test   %ecx,%ecx
  jle    L2
  movsd  D2(%rip),%xmm1
  movslq %ecx,%rcx
  xor    %eax,%eax
  nopl   (%rax)
L21:
  movsd  (%rdi,%rax,8),%xmm0
  comisd %xmm1,%xmm0
  jbe    L11
  mov    (%rdx,%rax,8),%r8
  movsd  (%rsi,%r8,8),%xmm0
  movsd  %xmm0,(%rdi,%rax,8)
L11:
  add    $0x1,%rax
  cmp    %rax,%rcx
  jne    L21
L2:
  ret
```

tool_calls: name: unpack_data
arguments: label: D2
datatype: f64

tool: D2: 10

assistant: ```c
__attribute__((noipa)) void f2(double *__restrict__ a, const double *__restrict__ b, const long *__restrict__ c, int n) {
  int i;
#pragma GCC ivdep
  for (i = 0; i < n; ++i)
    if (a[i] > 10.0)
      a[i] = b[c[i]];
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<ehnlc_strpbrk>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L71
  mov    $0x0,%eax
  jmp    L50
L71:
  cmpq   $0x0,-0x30(%rbp)
  jne    L116
  mov    $0x0,%eax
  jmp    L50
L116:
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <ehnlc_strlen@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L119
  mov    $0x0,%eax
  jmp    L50
L119:
  movq   $0x0,-0x18(%rbp)
  jmp    L29
L102:
  movq   $0x0,-0x10(%rbp)
  jmp    L17
L32:
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x30(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L30
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  jmp    L50
L30:
  addq   $0x1,-0x10(%rbp)
L17:
  mov    -0x10(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jb     L32
  addq   $0x1,-0x18(%rbp)
L29:
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L102
  mov    $0x0,%eax
L50:
  leave
  ret
```

assistant: ```c
char *ehnlc_strpbrk(const char *s, const char *accept) {
  size_t i, j, len;
  if (!s) {
    return NULL;
  }
  if (!accept) {
    return NULL;
  }
  len = ehnlc_strlen(accept);
  if (!len) {
    return NULL;
  }
  for (i = 0; s[i]; ++i) {
    for (j = 0; j < len; ++j) {
      if (s[i] == accept[j]) {
        return (char *)(s + i);
      }
    }
  }
  return NULL;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<ehnlc_strpbrk>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %rsi,%rsi
  je     L9
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  test   %rdi,%rdi
  je     L9
  mov    %rsi,%rdi
  call   <ehnlc_strlen@plt>
  test   %rax,%rax
  je     L55
  movzbl (%rbx),%ecx
  lea    (%rax,%rbp,1),%rdx
  test   %cl,%cl
  je     L61
L13:
  mov    %rbp,%rax
L15:
  cmp    %cl,(%rax)
  je     L14
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L15
  add    $0x1,%rbx
  movzbl (%rbx),%ecx
  test   %cl,%cl
  jne    L13
  mov    $0x0,%ebx
  jmp    L14
L61:
  mov    $0x0,%ebx
  jmp    L14
L9:
  mov    $0x0,%ebx
L14:
  mov    %rbx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L55:
  mov    $0x0,%ebx
  jmp    L14
```

assistant: ```c
char *ehnlc_strpbrk(const char *s, const char *accept) {
  size_t i, j, len;
  if (!s) {
    return NULL;
  }
  if (!accept) {
    return NULL;
  }
  len = ehnlc_strlen(accept);
  if (!len) {
    return NULL;
  }
  for (i = 0; s[i]; ++i) {
    for (j = 0; j < len; ++j) {
      if (s[i] == accept[j]) {
        return (char *)(s + i);
      }
    }
  }
  return NULL;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<ehnlc_strpbrk>:
  endbr64
  push   %r12
  push   %rbx
  sub    $0x8,%rsp
  test   %rdi,%rdi
  je     L32
  mov    %rsi,%rbx
  test   %rsi,%rsi
  je     L32
  mov    %rdi,%r12
  mov    %rsi,%rdi
  call   <ehnlc_strlen@plt>
  test   %rax,%rax
  je     L32
  movzbl (%r12),%edx
  test   %dl,%dl
  je     L32
  lea    (%rax,%rbx,1),%rcx
L31:
  mov    %rbx,%rax
  nopl   0x0(%rax,%rax,1)
L46:
  cmp    %dl,(%rax)
  je     L11
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L46
  movzbl 0x1(%r12),%edx
  add    $0x1,%r12
  test   %dl,%dl
  jne    L31
  nopl   0x0(%rax,%rax,1)
L32:
  xor    %r12d,%r12d
L11:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
```

assistant: ```c
char *ehnlc_strpbrk(const char *s, const char *accept) {
  size_t i, j, len;
  if (!s) {
    return NULL;
  }
  if (!accept) {
    return NULL;
  }
  len = ehnlc_strlen(accept);
  if (!len) {
    return NULL;
  }
  for (i = 0; s[i]; ++i) {
    for (j = 0; j < len; ++j) {
      if (s[i] == accept[j]) {
        return (char *)(s + i);
      }
    }
  }
  return NULL;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<ehnlc_strpbrk>:
  endbr64
  push   %r12
  push   %rbx
  sub    $0x8,%rsp
  test   %rdi,%rdi
  je     L7
  mov    %rsi,%rbx
  test   %rsi,%rsi
  je     L7
  mov    %rdi,%r12
  mov    %rsi,%rdi
  call   <ehnlc_strlen@plt>
  test   %rax,%rax
  je     L7
  movzbl (%r12),%edx
  test   %dl,%dl
  je     L7
  lea    (%rax,%rbx,1),%rcx
L8:
  mov    %rbx,%rax
  nopl   0x0(%rax,%rax,1)
L30:
  cmp    %dl,(%rax)
  je     L12
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L30
  movzbl 0x1(%r12),%edx
  add    $0x1,%r12
  test   %dl,%dl
  jne    L8
  nopl   0x0(%rax,%rax,1)
L7:
  xor    %r12d,%r12d
L12:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
```

assistant: ```c
char *ehnlc_strpbrk(const char *s, const char *accept) {
  size_t i, j, len;
  if (!s) {
    return NULL;
  }
  if (!accept) {
    return NULL;
  }
  len = ehnlc_strlen(accept);
  if (!len) {
    return NULL;
  }
  for (i = 0; s[i]; ++i) {
    for (j = 0; j < len; ++j) {
      if (s[i] == accept[j]) {
        return (char *)(s + i);
      }
    }
  }
  return NULL;
}
```