ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 这段汇编代码用C语言表示是什么样的:

```asm
<KIONIX_ACCEL_position_mask_ri>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movb   $0x0,0x7(%rsp)
  lea    0x7(%rsp),%rsi
  mov    $0x1,%edx
  mov    $0x1c,%edi
  call   <KIONIX_ACCEL_read_bytes@plt>
  mov    %rax,%rdx
  mov    $0x1,%eax
  test   %rdx,%rdx
  je     L1
L13:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L24
  add    $0x18,%rsp
  ret
L1:
  movzbl 0x7(%rsp),%esi
  or     $0x10,%esi
  mov    %sil,0x7(%rsp)
  movsbl %sil,%esi
  mov    $0x1c,%edi
  call   <KIONIX_ACCEL_write_byte@plt>
  mov    $0x0,%eax
  jmp    L13
L24:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int KIONIX_ACCEL_position_mask_ri(void) {
  char ctrl_reg2 = 0;
  int status = 0;
  if (KIONIX_ACCEL_read_bytes(0x1C, &ctrl_reg2, 1) == 0) {
    ctrl_reg2 |= 0x10;
    KIONIX_ACCEL_write_byte(0x1C, ctrl_reg2);
  } else
    status = 1;
  return status;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<KIONIX_ACCEL_position_mask_ri>:
  endbr64
  sub    $0x18,%rsp
  mov    $0x1,%edx
  mov    $0x1c,%edi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x7(%rsp),%rsi
  movb   $0x0,0x7(%rsp)
  call   <KIONIX_ACCEL_read_bytes@plt>
  mov    %rax,%r8
  mov    $0x1,%eax
  test   %r8,%r8
  je     L25
L21:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L23
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax,%rax,1)
L25:
  movzbl 0x7(%rsp),%esi
  mov    $0x1c,%edi
  or     $0x10,%esi
  mov    %sil,0x7(%rsp)
  movsbl %sil,%esi
  call   <KIONIX_ACCEL_write_byte@plt>
  xor    %eax,%eax
  jmp    L21
L23:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int KIONIX_ACCEL_position_mask_ri(void) {
  char ctrl_reg2 = 0;
  int status = 0;
  if (KIONIX_ACCEL_read_bytes(0x1C, &ctrl_reg2, 1) == 0) {
    ctrl_reg2 |= 0x10;
    KIONIX_ACCEL_write_byte(0x1C, ctrl_reg2);
  } else
    status = 1;
  return status;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<KIONIX_ACCEL_position_mask_ri>:
  endbr64
  sub    $0x18,%rsp
  mov    $0x1,%edx
  mov    $0x1c,%edi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x7(%rsp),%rsi
  movb   $0x0,0x7(%rsp)
  call   <KIONIX_ACCEL_read_bytes@plt>
  mov    %rax,%r8
  mov    $0x1,%eax
  test   %r8,%r8
  je     L25
L16:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L1
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax,%rax,1)
L25:
  movzbl 0x7(%rsp),%esi
  mov    $0x1c,%edi
  or     $0x10,%esi
  mov    %sil,0x7(%rsp)
  movsbl %sil,%esi
  call   <KIONIX_ACCEL_write_byte@plt>
  xor    %eax,%eax
  jmp    L16
L1:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int KIONIX_ACCEL_position_mask_ri(void) {
  char ctrl_reg2 = 0;
  int status = 0;
  if (KIONIX_ACCEL_read_bytes(0x1C, &ctrl_reg2, 1) == 0) {
    ctrl_reg2 |= 0x10;
    KIONIX_ACCEL_write_byte(0x1C, ctrl_reg2);
  } else
    status = 1;
  return status;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<des_decrypt>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %esi,%r14d
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %rdx,%rdx
  je     L24
  mov    %rdx,%r15
  lea    -0x2(%rsi),%eax
  test   $0x7,%al
  jne    L87
  cmp    $0x11,%esi
  jle    L87
  sub    $0x8,%r14d
  movslq %r14d,%rsi
  add    %rdi,%rsi
  lea    0x20(%rsp),%rdi
  mov    $0x8,%edx
  mov    $0x0,%eax
  call   <memcpy@plt>
  mov    $0x2,%r13d
  lea    0x20(%rsp),%r12
  jmp    L96
L11:
  add    $0x8,%r13
  cmp    %r13d,%r14d
  jle    L78
L96:
  lea    0x18(%rsp),%rbx
  mov    $0x8,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <memcpy@plt>
  mov    0x8(%rsp),%rax
  lea    (%rax,%r13,1),%rbp
  mov    $0x8,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <memcpy@plt>
  lea    0x8(%r15),%rsi
  mov    %rbp,%r8
  mov    $0x0,%ecx
  mov    $0x3,%edx
  mov    %r15,%rdi
  call   <EuroDes@plt>
L20:
  movzbl (%rbx),%eax
  xor    %al,0x0(%rbp)
  add    $0x1,%rbp
  add    $0x1,%rbx
  cmp    %r12,%rbx
  jne    L20
  jmp    L11
L78:
  mov    $0x2,%eax
  mov    $0x0,%edx
L31:
  mov    0x8(%rsp),%rcx
  movzbl (%rcx,%rax,1),%ecx
  mov    %edx,%esi
  xor    %ecx,%edx
  add    $0x1,%rax
  cmp    %eax,%r14d
  jg     L31
  cmp    %sil,%cl
  mov    $0xffffffff,%eax
  cmovne %eax,%r14d
L24:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L62
  mov    %r14d,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L87:
  mov    $0xffffffff,%r14d
  jmp    L24
L62:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int des_decrypt(unsigned char *buffer, int len, unsigned char *deskey) {
  char ivec[8];
  char nextIvec[8];
  int i;
  unsigned char checksum = 0;
  if (!deskey)
    return len;
  if ((len - 2) % 8 || (len - 2) < 16)
    return -1;
  len -= 8;
  memcpy(nextIvec, buffer + len, 8);
  for (i = 2; i < len; i += 8) {
    unsigned char j;
    const unsigned char flags = (1 << 0) | (1 << 1);
    memcpy(ivec, nextIvec, 8);
    memcpy(nextIvec, buffer + i, 8);
    EuroDes(deskey, deskey + 8, flags, 0, buffer + i);
    for (j = 0; j < 8; j++)
      buffer[i + j] ^= ivec[j];
  }
  for (i = 2; i < len; i++)
    checksum ^= buffer[i];
  if (checksum)
    return -1;
  return len;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<des_decrypt>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdx,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  test   %rdx,%rdx
  je     L87
  lea    -0x2(%rsi),%eax
  test   $0x7,%al
  jne    L6
  cmp    $0x11,%esi
  jle    L6
  sub    $0x8,%r12d
  lea    0x30(%rsp),%r14
  mov    %rdi,%r13
  xor    %eax,%eax
  movslq %r12d,%rsi
  mov    $0x8,%edx
  mov    $0x2,%ebp
  mov    %r14,%r15
  add    %rdi,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  mov    0x10(%rsp),%rax
  lea    0x28(%rsp),%r10
  add    $0x8,%rax
  mov    %rax,0x18(%rsp)
  nopl   0x0(%rax,%rax,1)
L16:
  mov    %r10,%rdi
  mov    %r14,%rsi
  mov    $0x8,%edx
  xor    %eax,%eax
  lea    0x0(%r13,%rbp,1),%rbx
  mov    %r10,0x8(%rsp)
  call   <memcpy@plt>
  mov    %r14,%rdi
  mov    $0x8,%edx
  mov    %rbx,%rsi
  xor    %eax,%eax
  mov    %r15,%r14
  call   <memcpy@plt>
  mov    0x18(%rsp),%rsi
  mov    %rbx,%r8
  xor    %ecx,%ecx
  mov    0x10(%rsp),%rdi
  mov    $0x3,%edx
  call   <EuroDes@plt>
  mov    0x8(%rsp),%r10
  mov    %r10,%rax
  nopw   0x0(%rax,%rax,1)
L51:
  movzbl (%rax),%edx
  add    $0x1,%rax
  xor    %dl,(%rbx)
  add    $0x1,%rbx
  cmp    %r15,%rax
  jne    L51
  add    $0x8,%rbp
  cmp    %ebp,%r12d
  jg     L16
  mov    $0x2,%eax
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L0:
  movzbl 0x0(%r13,%rax,1),%ecx
  add    $0x1,%rax
  mov    %edx,%esi
  xor    %ecx,%edx
  cmp    %eax,%r12d
  jg     L0
  cmp    %sil,%cl
  jne    L6
L87:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L61
  add    $0x48,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L6:
  mov    $0xffffffff,%r12d
  jmp    L87
L61:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int des_decrypt(unsigned char *buffer, int len, unsigned char *deskey) {
  char ivec[8];
  char nextIvec[8];
  int i;
  unsigned char checksum = 0;
  if (!deskey)
    return len;
  if ((len - 2) % 8 || (len - 2) < 16)
    return -1;
  len -= 8;
  memcpy(nextIvec, buffer + len, 8);
  for (i = 2; i < len; i += 8) {
    unsigned char j;
    const unsigned char flags = (1 << 0) | (1 << 1);
    memcpy(ivec, nextIvec, 8);
    memcpy(nextIvec, buffer + i, 8);
    EuroDes(deskey, deskey + 8, flags, 0, buffer + i);
    for (j = 0; j < 8; j++)
      buffer[i + j] ^= ivec[j];
  }
  for (i = 2; i < len; i++)
    checksum ^= buffer[i];
  if (checksum)
    return -1;
  return len;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<des_decrypt>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %rdx,%rdx
  je     L12
  lea    -0x2(%rsi),%eax
  test   $0x7,%al
  jne    L28
  cmp    $0x11,%esi
  jle    L28
  sub    $0x8,%r12d
  lea    0x20(%rsp),%rbx
  mov    %rdi,%rbp
  mov    %rdx,%r13
  movslq %r12d,%rsi
  mov    $0x8,%edx
  lea    0x8(%r13),%r15
  xor    %eax,%eax
  add    %rdi,%rsi
  mov    %rbx,%rdi
  lea    0x18(%rsp),%r14
  call   <memcpy@plt>
  mov    %rbp,%rax
  lea    0x2(%rbp),%rbp
  neg    %eax
  mov    %eax,0xc(%rsp)
L75:
  mov    $0x8,%edx
  mov    %rbx,%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <memcpy@plt>
  mov    %rbp,%rsi
  mov    $0x8,%edx
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <memcpy@plt>
  mov    %rbp,%r8
  xor    %ecx,%ecx
  mov    $0x3,%edx
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <EuroDes@plt>
  movzbl 0x18(%rsp),%eax
  xor    %al,0x0(%rbp)
  movzbl 0x19(%rsp),%eax
  xor    %al,0x1(%rbp)
  movzbl 0x1a(%rsp),%eax
  xor    %al,0x2(%rbp)
  movzbl 0x1b(%rsp),%eax
  xor    %al,0x3(%rbp)
  movzbl 0x1c(%rsp),%eax
  xor    %al,0x4(%rbp)
  movzbl 0x1d(%rsp),%eax
  xor    %al,0x5(%rbp)
  movzbl 0x1e(%rsp),%eax
  xor    %al,0x6(%rbp)
  movzbl 0x1f(%rsp),%eax
  xor    %al,0x7(%rbp)
  add    $0x8,%rbp
  mov    0xc(%rsp),%eax
  add    %ebp,%eax
  cmp    %eax,%r12d
  jg     L75
  mov    $0x2,%eax
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L1:
  mov    (%rsp),%rbx
  mov    %edx,%esi
  movzbl (%rbx,%rax,1),%ecx
  add    $0x1,%rax
  xor    %ecx,%edx
  cmp    %eax,%r12d
  jg     L1
  cmp    %sil,%cl
  jne    L28
L12:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L60
  add    $0x38,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L28:
  mov    $0xffffffff,%r12d
  jmp    L12
L60:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int des_decrypt(unsigned char *buffer, int len, unsigned char *deskey) {
  char ivec[8];
  char nextIvec[8];
  int i;
  unsigned char checksum = 0;
  if (!deskey)
    return len;
  if ((len - 2) % 8 || (len - 2) < 16)
    return -1;
  len -= 8;
  memcpy(nextIvec, buffer + len, 8);
  for (i = 2; i < len; i += 8) {
    unsigned char j;
    const unsigned char flags = (1 << 0) | (1 << 1);
    memcpy(ivec, nextIvec, 8);
    memcpy(nextIvec, buffer + i, 8);
    EuroDes(deskey, deskey + 8, flags, 0, buffer + i);
    for (j = 0; j < 8; j++)
      buffer[i + j] ^= ivec[j];
  }
  for (i = 2; i < len; i++)
    checksum ^= buffer[i];
  if (checksum)
    return -1;
  return len;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<fmap_lsearch>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  movl   $0x0,-0xc(%rbp)
  movq   $0x0,-0x8(%rbp)
  jmp    L9
L28:
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <is_valid_fmap@plt>
  test   %rax,%rax
  je     L25
  movl   $0x1,-0xc(%rbp)
  jmp    L11
L25:
  addq   $0x1,-0x8(%rbp)
L9:
  mov    -0x20(%rbp),%rax
  sub    $0x8,%rax
  cmp    %rax,-0x8(%rbp)
  jb     L28
L11:
  cmpl   $0x0,-0xc(%rbp)
  jne    L78
  mov    $0xffffffffffffffff,%rax
  jmp    L44
L78:
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <fmap_size@plt>
  mov    -0x8(%rbp),%rdx
  add    %rdx,%rax
  cmp    %rax,-0x20(%rbp)
  jae    L4
  mov    $0xffffffffffffffff,%rax
  jmp    L44
L4:
  mov    -0x8(%rbp),%rax
L44:
  leave
  ret
```

assistant: ```c
long int fmap_lsearch(const uint8_t *image, size_t len) {
  unsigned long int offset;
  int fmap_found = 0;
  for (offset = 0; offset < len - strlen("__FMAP__"); offset++) {
    if (is_valid_fmap((const struct fmap *)&image[offset])) {
      fmap_found = 1;
      break;
    }
  }
  if (!fmap_found)
    return -1;
  if (offset + fmap_size((const struct fmap *)&image[offset]) > len)
    return -1;
  return offset;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<fmap_lsearch>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%r12
  sub    $0x8,%r12
  je     L27
  mov    %rdi,%r14
  mov    %rsi,%r13
  mov    %rdi,%rbp
  mov    $0x0,%ebx
L26:
  mov    %rbp,%rdi
  call   <is_valid_fmap@plt>
  test   %rax,%rax
  jne    L31
  add    $0x1,%rbx
  add    $0x4,%rbp
  cmp    %r12,%rbx
  jne    L26
L27:
  mov    $0xffffffffffffffff,%rax
  jmp    L19
L31:
  lea    (%r14,%rbx,4),%rdi
  call   <fmap_size@plt>
  add    %rbx,%rax
  cmp    %r13,%rax
  mov    $0xffffffffffffffff,%rax
  cmovbe %rbx,%rax
L19:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
long int fmap_lsearch(const uint8_t *image, size_t len) {
  unsigned long int offset;
  int fmap_found = 0;
  for (offset = 0; offset < len - strlen("__FMAP__"); offset++) {
    if (is_valid_fmap((const struct fmap *)&image[offset])) {
      fmap_found = 1;
      break;
    }
  }
  if (!fmap_found)
    return -1;
  if (offset + fmap_size((const struct fmap *)&image[offset]) > len)
    return -1;
  return offset;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<fmap_lsearch>:
  endbr64
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  sub    $0x8,%r12
  je     L16
  mov    %rsi,%r13
  mov    %rdi,%rbp
  xor    %ebx,%ebx
  jmp    L32
  nopl   0x0(%rax)
L24:
  add    $0x1,%rbx
  add    $0x4,%rbp
  cmp    %r12,%rbx
  je     L16
L32:
  mov    %rbp,%rdi
  call   <is_valid_fmap@plt>
  test   %rax,%rax
  je     L24
  mov    %rbp,%rdi
  call   <fmap_size@plt>
  add    %rbx,%rax
  cmp    %r13,%rax
  ja     L16
  add    $0x8,%rsp
  mov    %rbx,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L16:
  add    $0x8,%rsp
  mov    $0xffffffffffffffff,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
long int fmap_lsearch(const uint8_t *image, size_t len) {
  unsigned long int offset;
  int fmap_found = 0;
  for (offset = 0; offset < len - strlen("__FMAP__"); offset++) {
    if (is_valid_fmap((const struct fmap *)&image[offset])) {
      fmap_found = 1;
      break;
    }
  }
  if (!fmap_found)
    return -1;
  if (offset + fmap_size((const struct fmap *)&image[offset]) > len)
    return -1;
  return offset;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<fmap_lsearch>:
  endbr64
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  sub    $0x8,%r12
  je     L36
  mov    %rsi,%r13
  mov    %rdi,%rbp
  xor    %ebx,%ebx
  jmp    L40
  nopl   0x0(%rax)
L5:
  add    $0x1,%rbx
  add    $0x4,%rbp
  cmp    %r12,%rbx
  je     L36
L40:
  mov    %rbp,%rdi
  call   <is_valid_fmap@plt>
  test   %rax,%rax
  je     L5
  mov    %rbp,%rdi
  call   <fmap_size@plt>
  add    %rbx,%rax
  cmp    %r13,%rax
  ja     L36
  add    $0x8,%rsp
  mov    %rbx,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L36:
  add    $0x8,%rsp
  mov    $0xffffffffffffffff,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
long int fmap_lsearch(const uint8_t *image, size_t len) {
  unsigned long int offset;
  int fmap_found = 0;
  for (offset = 0; offset < len - strlen("__FMAP__"); offset++) {
    if (is_valid_fmap((const struct fmap *)&image[offset])) {
      fmap_found = 1;
      break;
    }
  }
  if (!fmap_found)
    return -1;
  if (offset + fmap_size((const struct fmap *)&image[offset]) > len)
    return -1;
  return offset;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<preproc_skip_comment>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L92
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L38
  addq   $0x2,-0x8(%rbp)
  jmp    L23
L64:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L76
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L150
  addq   $0x1,-0x8(%rbp)
  jmp    L76
L150:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  jne    L76
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L76
  addq   $0x2,-0x8(%rbp)
L76:
  addq   $0x1,-0x8(%rbp)
L23:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L92
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L64
  jmp    L92
L38:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L92
  addq   $0x2,-0x8(%rbp)
  jmp    L32
L104:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L121
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L121
  addq   $0x2,-0x8(%rbp)
  jmp    L92
L121:
  addq   $0x1,-0x8(%rbp)
L32:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L104
L92:
  mov    -0x18(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void preproc_skip_comment(const char **cpp) {
  const char *cp = *cpp;
  if (cp[0] == '/') {
    if (cp[1] == '/') {
      cp += 2;
      while (*cp != '\n' && *cp != '\0') {
        if (cp[0] == '\\') {
          if (cp[1] == '\n') {
            cp++;
          } else if (cp[1] == '\r' && cp[2] == '\n') {
            cp += 2;
          }
        }
        cp++;
      }
    } else if (cp[1] == '*') {
      cp += 2;
      while (*cp != '\0') {
        if (cp[0] == '*' && cp[1] == '/') {
          cp += 2;
          break;
        }
        cp++;
      }
    }
  }
  *cpp = cp;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<preproc_skip_comment>:
  endbr64
  mov    (%rdi),%rax
  cmpb   $0x2f,(%rax)
  je     L49
L92:
  mov    %rax,(%rdi)
  ret
L49:
  movzbl 0x1(%rax),%edx
  cmp    $0x2f,%dl
  je     L38
  cmp    $0x2a,%dl
  jne    L92
  lea    0x2(%rax),%rdx
  movzbl 0x2(%rax),%eax
  test   %al,%al
  jne    L23
  mov    %rdx,%rax
  jmp    L92
L38:
  lea    0x2(%rax),%rcx
  movzbl 0x2(%rax),%edx
  cmp    $0xa,%dl
  je     L67
  test   %dl,%dl
  jne    L124
L67:
  mov    %rcx,%rax
  jmp    L92
L100:
  add    $0x1,%rcx
L2:
  lea    0x1(%rcx),%rax
  movzbl 0x1(%rcx),%edx
  cmp    $0xa,%dl
  je     L92
  test   %dl,%dl
  je     L92
L129:
  mov    %rax,%rcx
L124:
  cmp    $0x5c,%dl
  jne    L2
  movzbl 0x1(%rcx),%eax
  cmp    $0xa,%al
  je     L100
  cmp    $0xd,%al
  jne    L2
  cmpb   $0xa,0x2(%rcx)
  je     L147
  lea    0x1(%rcx),%rax
  movzbl 0x1(%rcx),%edx
  jmp    L129
L147:
  add    $0x2,%rcx
  jmp    L2
L78:
  add    $0x1,%rdx
  movzbl (%rdx),%eax
  test   %al,%al
  je     L138
L23:
  cmp    $0x2a,%al
  jne    L78
  cmpb   $0x2f,0x1(%rdx)
  jne    L78
  lea    0x2(%rdx),%rax
  jmp    L92
L138:
  mov    %rdx,%rax
  jmp    L92
```

assistant: ```c
void preproc_skip_comment(const char **cpp) {
  const char *cp = *cpp;
  if (cp[0] == '/') {
    if (cp[1] == '/') {
      cp += 2;
      while (*cp != '\n' && *cp != '\0') {
        if (cp[0] == '\\') {
          if (cp[1] == '\n') {
            cp++;
          } else if (cp[1] == '\r' && cp[2] == '\n') {
            cp += 2;
          }
        }
        cp++;
      }
    } else if (cp[1] == '*') {
      cp += 2;
      while (*cp != '\0') {
        if (cp[0] == '*' && cp[1] == '/') {
          cp += 2;
          break;
        }
        cp++;
      }
    }
  }
  *cpp = cp;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<preproc_skip_comment>:
  endbr64
  mov    (%rdi),%rax
  cmpb   $0x2f,(%rax)
  je     L109
L216:
  mov    %rax,(%rdi)
  ret
L109:
  movzbl 0x1(%rax),%edx
  cmp    $0x2f,%dl
  je     L161
  cmp    $0x2a,%dl
  jne    L216
  lea    0x2(%rax),%rdx
  movzbl 0x2(%rax),%eax
  test   %al,%al
  jne    L204
  jmp    L17
  nop
L127:
  add    $0x1,%rdx
  test   %al,%al
  je     L17
L204:
  mov    %eax,%ecx
  movzbl 0x1(%rdx),%eax
  cmp    $0x2a,%cl
  jne    L127
  cmp    $0x2f,%al
  jne    L127
  lea    0x2(%rdx),%rax
  jmp    L216
  nopl   (%rax)
L161:
  movzbl 0x2(%rax),%ecx
  lea    0x2(%rax),%rdx
  mov    %rdx,%rax
  test   %cl,%cl
  je     L216
  cmp    $0xa,%cl
  je     L216
  movzbl 0x1(%rax),%edx
  cmp    $0x5c,%cl
  je     L10
  nopl   (%rax)
L6:
  add    $0x1,%rax
  cmp    $0xa,%dl
  je     L216
  test   %dl,%dl
  je     L216
  mov    %edx,%ecx
L191:
  movzbl 0x1(%rax),%edx
  cmp    $0x5c,%cl
  jne    L6
L10:
  cmp    $0xa,%dl
  je     L41
  cmp    $0xd,%dl
  jne    L6
  cmpb   $0xa,0x2(%rax)
  je     L170
  add    $0x1,%rax
  mov    %edx,%ecx
  jmp    L191
L41:
  movzbl 0x2(%rax),%edx
  add    $0x1,%rax
  jmp    L6
  nopw   0x0(%rax,%rax,1)
L17:
  mov    %rdx,%rax
  jmp    L216
  nopl   0x0(%rax,%rax,1)
L170:
  movzbl 0x3(%rax),%edx
  add    $0x2,%rax
  jmp    L6
```

assistant: ```c
void preproc_skip_comment(const char **cpp) {
  const char *cp = *cpp;
  if (cp[0] == '/') {
    if (cp[1] == '/') {
      cp += 2;
      while (*cp != '\n' && *cp != '\0') {
        if (cp[0] == '\\') {
          if (cp[1] == '\n') {
            cp++;
          } else if (cp[1] == '\r' && cp[2] == '\n') {
            cp += 2;
          }
        }
        cp++;
      }
    } else if (cp[1] == '*') {
      cp += 2;
      while (*cp != '\0') {
        if (cp[0] == '*' && cp[1] == '/') {
          cp += 2;
          break;
        }
        cp++;
      }
    }
  }
  *cpp = cp;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<preproc_skip_comment>:
  endbr64
  mov    (%rdi),%rax
  cmpb   $0x2f,(%rax)
  je     L178
L157:
  mov    %rax,(%rdi)
  ret
L178:
  movzbl 0x1(%rax),%edx
  cmp    $0x2f,%dl
  je     L198
  cmp    $0x2a,%dl
  jne    L157
  lea    0x2(%rax),%rdx
  movzbl 0x2(%rax),%eax
  test   %al,%al
  jne    L181
  jmp    L160
  nop
L169:
  add    $0x1,%rdx
  test   %al,%al
  je     L160
L181:
  mov    %eax,%ecx
  movzbl 0x1(%rdx),%eax
  cmp    $0x2a,%cl
  jne    L169
  cmp    $0x2f,%al
  jne    L169
  lea    0x2(%rdx),%rax
  jmp    L157
  nopl   (%rax)
L198:
  movzbl 0x2(%rax),%ecx
  lea    0x2(%rax),%rdx
  mov    %rdx,%rax
  test   %cl,%cl
  je     L157
  cmp    $0xa,%cl
  je     L157
  movzbl 0x1(%rax),%edx
  cmp    $0x5c,%cl
  je     L94
  nopl   (%rax)
L54:
  add    $0x1,%rax
  cmp    $0xa,%dl
  je     L157
  test   %dl,%dl
  je     L157
  mov    %edx,%ecx
L185:
  movzbl 0x1(%rax),%edx
  cmp    $0x5c,%cl
  jne    L54
L94:
  cmp    $0xa,%dl
  je     L176
  cmp    $0xd,%dl
  jne    L54
  cmpb   $0xa,0x2(%rax)
  je     L204
  add    $0x1,%rax
  mov    %edx,%ecx
  jmp    L185
L176:
  movzbl 0x2(%rax),%edx
  add    $0x1,%rax
  jmp    L54
  nopw   0x0(%rax,%rax,1)
L160:
  mov    %rdx,%rax
  jmp    L157
  nopl   0x0(%rax,%rax,1)
L204:
  movzbl 0x3(%rax),%edx
  add    $0x2,%rax
  jmp    L54
```

assistant: ```c
void preproc_skip_comment(const char **cpp) {
  const char *cp = *cpp;
  if (cp[0] == '/') {
    if (cp[1] == '/') {
      cp += 2;
      while (*cp != '\n' && *cp != '\0') {
        if (cp[0] == '\\') {
          if (cp[1] == '\n') {
            cp++;
          } else if (cp[1] == '\r' && cp[2] == '\n') {
            cp += 2;
          }
        }
        cp++;
      }
    } else if (cp[1] == '*') {
      cp += 2;
      while (*cp != '\0') {
        if (cp[0] == '*' && cp[1] == '/') {
          cp += 2;
          break;
        }
        cp++;
      }
    }
  }
  *cpp = cp;
}
```