ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Converte this assembly snippet into its equivalent C code:

```asm
<pipe_read>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <pipe@plt>
  cmp    $0xffffffff,%eax
  je     L26
  call   <fork@plt>
  xor    %r12d,%r12d
  cmp    $0xffffffff,%eax
  je     L18
  test   %eax,%eax
  je     L54
L5:
  mov    0x4(%rsp),%edi
  call   <close@plt>
  mov    (%rsp),%edi
  xor    %esi,%esi
  call   <list_from_fd@plt>
  mov    D14(%rip),%rbp
  xor    %edi,%edi
  mov    %rax,%r12
  mov    0x0(%rbp),%ebx
  call   <wait@plt>
  mov    %ebx,0x0(%rbp)
L18:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L73
  add    $0x10,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L54:
  mov    (%rsp),%edi
  call   <close@plt>
  mov    D6(%rip),%rbx
  mov    0x4(%rsp),%edi
  mov    (%rbx),%esi
  call   <dup2@plt>
  cmp    $0xffffffff,%eax
  je     L45
L72:
  mov    D9(%rip),%rax
  mov    (%rbx),%edi
  mov    (%rax),%esi
  call   <dup2@plt>
  mov    %rbp,%rdi
  call   <system@plt>
  mov    %eax,%edi
  call   <exit@plt>
  jmp    L5
  nopl   0x0(%rax,%rax,1)
L26:
  xor    %r12d,%r12d
  jmp    L18
  nopl   (%rax)
L45:
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L72
L73:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
struct list *pipe_read(const char *cmd) {
  int fds[2];
  if (pipe(fds) == -1)
    return NULL;
  switch (fork()) {
  case -1:
    return NULL;
  case 0:
    close(fds[0]);
    if (dup2(fds[1], STDOUT_FILENO) == -1)
      exit(-1);
    dup2(STDOUT_FILENO, STDERR_FILENO);
    exit(system(cmd));
  default: {
    struct list *l;
    int saveerrno;
    close(fds[1]);
    l = list_from_fd(fds[0], NULL);
    saveerrno = errno;
    wait(NULL);
    errno = saveerrno;
    return l;
  }
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<get_sndtimeo>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    D11(%rip),%rax
  mov    (%rax),%edx
  mov    D2(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  pop    %rbp
  ret
```

assistant: ```c
int get_sndtimeo(int fd, void *optval, int *optlen) {
  errno = EOPNOTSUPP;
  return -1;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<get_sndtimeo>:
  endbr64
  mov    D15(%rip),%rax
  mov    (%rax),%edx
  mov    D6(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int get_sndtimeo(int fd, void *optval, int *optlen) {
  errno = EOPNOTSUPP;
  return -1;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<get_sndtimeo>:
  endbr64
  mov    D17(%rip),%rax
  mov    (%rax),%edx
  mov    D6(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int get_sndtimeo(int fd, void *optval, int *optlen) {
  errno = EOPNOTSUPP;
  return -1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<get_sndtimeo>:
  endbr64
  mov    D15(%rip),%rax
  mov    (%rax),%edx
  mov    D16(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int get_sndtimeo(int fd, void *optval, int *optlen) {
  errno = EOPNOTSUPP;
  return -1;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<addc_smatrix>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9d,%eax
  mov    %ax,-0x4c(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L4
L10:
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L24
L33:
  mov    -0x18(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  mov    %eax,%edx
  movzwl -0x4c(%rbp),%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%rax
  lea    (%rax,%rax,1),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  mov    %dx,(%rax)
  addq   $0x1,-0x18(%rbp)
L24:
  mov    -0x18(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jle    L33
  addq   $0x1,-0x20(%rbp)
L4:
  mov    -0x20(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jle    L10
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void addc_smatrix(short **src, long nrl, long nrh, long ncl, long nch, short cte, short **dst) {
  long i, j;
  short *Xi, *Yi;
  for (i = nrl; i <= nrh; i++) {
    Xi = src[i];
    Yi = dst[i];
    for (j = ncl; j <= nch; j++) {
      Yi[j] = Xi[j] + cte;
    }
  }
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<addc_smatrix>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x20(%rsp),%r12
  cmp    %rdx,%rsi
  jg     L19
  mov    %rdi,%rbx
  mov    %rsi,%r10
  mov    %rcx,%r11
  lea    0x1(%rdx),%rbp
  lea    0x1(%r8),%rdi
L13:
  mov    (%rbx,%r10,8),%rcx
  mov    (%r12,%r10,8),%rsi
  cmp    %r8,%r11
  jg     L0
  mov    %r11,%rax
L4:
  mov    %r9d,%edx
  add    (%rcx,%rax,2),%dx
  mov    %dx,(%rsi,%rax,2)
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L4
L0:
  add    $0x1,%r10
  cmp    %rbp,%r10
  jne    L13
L19:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void addc_smatrix(short **src, long nrl, long nrh, long ncl, long nch, short cte, short **dst) {
  long i, j;
  short *Xi, *Yi;
  for (i = nrl; i <= nrh; i++) {
    Xi = src[i];
    Yi = dst[i];
    for (j = ncl; j <= nch; j++) {
      Yi[j] = Xi[j] + cte;
    }
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<addc_smatrix>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x20(%rsp),%r12
  cmp    %rdx,%rsi
  jg     L22
  mov    %rdi,%rbx
  mov    %rsi,%r10
  lea    0x1(%rdx),%rbp
  mov    %rcx,%r11
  lea    0x1(%r8),%rdi
  nopl   0x0(%rax,%rax,1)
L15:
  mov    (%rbx,%r10,8),%rsi
  mov    (%r12,%r10,8),%rcx
  mov    %r11,%rax
  cmp    %r8,%r11
  jg     L27
  nopl   0x0(%rax,%rax,1)
L37:
  movzwl (%rsi,%rax,2),%edx
  add    %r9d,%edx
  mov    %dx,(%rcx,%rax,2)
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L37
L27:
  add    $0x1,%r10
  cmp    %rbp,%r10
  jne    L15
L22:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void addc_smatrix(short **src, long nrl, long nrh, long ncl, long nch, short cte, short **dst) {
  long i, j;
  short *Xi, *Yi;
  for (i = nrl; i <= nrh; i++) {
    Xi = src[i];
    Yi = dst[i];
    for (j = ncl; j <= nch; j++) {
      Yi[j] = Xi[j] + cte;
    }
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<addc_smatrix>:
  endbr64
  cmp    %rdx,%rsi
  jg     L26
  push   %r15
  mov    %rcx,%r11
  push   %r14
  push   %r13
  mov    %r8,%r13
  push   %r12
  push   %rbp
  push   %rbx
  cmp    %r8,%rcx
  jg     L57
  lea    0x1(%rdx),%rax
  lea    (%rcx,%rcx,1),%r12
  sub    %rcx,%r8
  mov    %rdi,%rbx
  mov    %rax,-0x30(%rsp)
  movd   %r9d,%xmm1
  mov    %rsi,%rdi
  lea    0x1(%r13),%rbp
  lea    0x2(%r12),%rax
  punpcklwd %xmm1,%xmm1
  mov    %rax,-0x38(%rsp)
  lea    0x1(%r8),%rax
  pshufd $0x0,%xmm1,%xmm1
  mov    %rax,%r10
  mov    %rax,-0x28(%rsp)
  and    $0xfffffffffffffff8,%rax
  mov    %rax,%r14
  lea    (%rcx,%rax,1),%rax
  shr    $0x3,%r10
  mov    %rax,-0x20(%rsp)
  mov    %r8,%rax
  shl    $0x4,%r10
  sub    %r14,%rax
  mov    %rax,-0x18(%rsp)
  add    $0x1,%rax
  mov    %rax,-0x10(%rsp)
L142:
  mov    0x38(%rsp),%rax
  mov    (%rbx,%rdi,8),%rdx
  mov    (%rax,%rdi,8),%rcx
  mov    -0x38(%rsp),%rax
  lea    (%rcx,%r12,1),%rsi
  lea    (%rdx,%rax,1),%r15
  mov    %rsi,%rax
  sub    %r15,%rax
  cmp    $0xc,%rax
  jbe    L62
  cmp    $0x2,%r8
  jbe    L62
  cmp    $0x6,%r8
  jbe    L19
  lea    (%rdx,%r12,1),%r15
  xor    %eax,%eax
  nopl   0x0(%rax)
L24:
  movdqu (%r15,%rax,1),%xmm0
  paddw  %xmm1,%xmm0
  movups %xmm0,(%rsi,%rax,1)
  add    $0x10,%rax
  cmp    %r10,%rax
  jne    L24
  cmp    %r14,-0x28(%rsp)
  je     L150
  cmpq   $0x2,-0x18(%rsp)
  mov    -0x10(%rsp),%r15
  jbe    L79
  mov    -0x20(%rsp),%rax
  mov    %r14,%rsi
L78:
  add    %r11,%rsi
  movd   %r9d,%xmm3
  movq   (%rdx,%rsi,2),%xmm0
  pshuflw $0x0,%xmm3,%xmm2
  paddw  %xmm2,%xmm0
  movq   %xmm0,(%rcx,%rsi,2)
  mov    %r15,%rsi
  and    $0xfffffffffffffffc,%rsi
  add    %rsi,%rax
  cmp    %rsi,%r15
  je     L150
L41:
  movzwl (%rdx,%rax,2),%r15d
  lea    (%rax,%rax,1),%rsi
  add    %r9d,%r15d
  mov    %r15w,(%rcx,%rax,2)
  lea    0x1(%rax),%r15
  cmp    %r15,%r13
  jl     L150
  movzwl 0x2(%rdx,%rsi,1),%r15d
  add    $0x2,%rax
  add    %r9d,%r15d
  mov    %r15w,0x2(%rcx,%rsi,1)
  cmp    %rax,%r13
  jl     L150
  movzwl 0x4(%rdx,%rsi,1),%eax
  add    %r9d,%eax
  mov    %ax,0x4(%rcx,%rsi,1)
L150:
  add    $0x1,%rdi
  cmp    -0x30(%rsp),%rdi
  jne    L142
L57:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L62:
  mov    %r11,%rax
  nopl   0x0(%rax,%rax,1)
L151:
  movzwl (%rdx,%rax,2),%esi
  add    %r9d,%esi
  mov    %si,(%rcx,%rax,2)
  add    $0x1,%rax
  cmp    %rax,%rbp
  jne    L151
  jmp    L150
L19:
  mov    -0x28(%rsp),%r15
  mov    %r11,%rax
  xor    %esi,%esi
  jmp    L78
L79:
  mov    -0x20(%rsp),%rax
  jmp    L41
L26:
  ret
```

assistant: ```c
void addc_smatrix(short **src, long nrl, long nrh, long ncl, long nch, short cte, short **dst) {
  long i, j;
  short *Xi, *Yi;
  for (i = nrl; i <= nrh; i++) {
    Xi = src[i];
    Yi = dst[i];
    for (j = ncl; j <= nch; j++) {
      Yi[j] = Xi[j] + cte;
    }
  }
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<BMK_GetMilliStart>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <ftime@plt>
  mov    -0x10(%rbp),%edx
  mov    -0xc(%rbp),%eax
  and    $0xfffff,%eax
  imul   $0x3e8,%eax,%eax
  add    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

assistant: ```c
int BMK_GetMilliStart(void) {
  struct timeb tb;
  int nCount;
  ftime(&tb);
  nCount = tb.millitm + (tb.time & 0xfffff) * 1000;
  return nCount;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<BMK_GetMilliStart>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <ftime@plt>
  mov    0x4(%rsp),%eax
  and    $0xfffff,%eax
  imul   $0x3e8,%eax,%eax
  add    (%rsp),%eax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L3
  add    $0x18,%rsp
  ret
L3:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int BMK_GetMilliStart(void) {
  struct timeb tb;
  int nCount;
  ftime(&tb);
  nCount = tb.millitm + (tb.time & 0xfffff) * 1000;
  return nCount;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<BMK_GetMilliStart>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <ftime@plt>
  mov    0x4(%rsp),%eax
  and    $0xfffff,%eax
  imul   $0x3e8,%eax,%eax
  add    (%rsp),%eax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L8
  add    $0x18,%rsp
  ret
L8:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int BMK_GetMilliStart(void) {
  struct timeb tb;
  int nCount;
  ftime(&tb);
  nCount = tb.millitm + (tb.time & 0xfffff) * 1000;
  return nCount;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<BMK_GetMilliStart>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <ftime@plt>
  mov    0x4(%rsp),%eax
  and    $0xfffff,%eax
  imul   $0x3e8,%eax,%eax
  add    (%rsp),%eax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L2
  add    $0x18,%rsp
  ret
L2:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int BMK_GetMilliStart(void) {
  struct timeb tb;
  int nCount;
  ftime(&tb);
  nCount = tb.millitm + (tb.time & 0xfffff) * 1000;
  return nCount;
}
```
user: What is the c source code of the assembly code below?

```asm
<skip_identifier>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %edx,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  je     L74
  cmpq   $0x0,-0x8(%rbp)
  je     L130
  cmpq   $0x0,-0x10(%rbp)
  je     L130
  mov    $0x1,%eax
  jmp    L139
L130:
  mov    $0x0,%eax
L139:
  mov    %eax,%edi
  call   <assert@plt>
  jmp    L152
L141:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,(%rax)
L152:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%edx
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L158
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <is_separator@plt>
  test   %eax,%eax
  je     L141
  jmp    L158
L74:
  cmpq   $0x0,-0x8(%rbp)
  jne    L12
  cmpq   $0x0,-0x10(%rbp)
  je     L124
L12:
  mov    $0x1,%eax
  jmp    L160
L124:
  mov    $0x0,%eax
L160:
  mov    %eax,%edi
  call   <assert@plt>
  cmpq   $0x0,-0x8(%rbp)
  je     L49
  jmp    L62
L9:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,(%rax)
L62:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <is_separator@plt>
  test   %eax,%eax
  je     L9
L49:
  cmpq   $0x0,-0x10(%rbp)
  je     L158
  jmp    L22
L27:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,(%rax)
L22:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <is_separator@plt>
  test   %eax,%eax
  je     L27
L158:
  nop
  leave
  ret
```

assistant: ```c
void skip_identifier(char *restrict *lhs, char *restrict *rhs, int strict) {
  if (strict) {
    assert(lhs && rhs);
    while (**lhs == **rhs && !is_separator(**lhs))
      ++*lhs, ++*rhs;
  } else {
    assert(lhs || rhs);
    if (lhs)
      while (!is_separator(**lhs))
        ++*lhs;
    if (rhs)
      while (!is_separator(**rhs))
        ++*rhs;
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<skip_identifier>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  test   %edx,%edx
  je     L34
  test   %rdi,%rdi
  setne  %al
  test   %rsi,%rsi
  setne  %dil
  movzbl %dil,%edi
  and    %eax,%edi
  call   <assert@plt>
  mov    (%rbx),%rax
  movzbl (%rax),%edi
  mov    0x0(%rbp),%rax
  cmp    (%rax),%dil
  jne    L69
L63:
  movsbl %dil,%edi
  call   <is_separator@plt>
  test   %eax,%eax
  jne    L69
  addq   $0x1,(%rbx)
  mov    0x0(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x0(%rbp)
  mov    (%rbx),%rdx
  movzbl (%rdx),%edi
  cmp    0x1(%rax),%dil
  je     L63
  jmp    L69
L34:
  mov    %rdi,%rax
  or     %rsi,%rax
  setne  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  test   %rbx,%rbx
  jne    L72
  jmp    L68
L103:
  addq   $0x1,(%rbx)
L72:
  mov    (%rbx),%rax
  movsbl (%rax),%edi
  call   <is_separator@plt>
  test   %eax,%eax
  je     L103
L68:
  test   %rbp,%rbp
  jne    L92
  jmp    L69
L50:
  addq   $0x1,0x0(%rbp)
L92:
  mov    0x0(%rbp),%rax
  movsbl (%rax),%edi
  call   <is_separator@plt>
  test   %eax,%eax
  je     L50
L69:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void skip_identifier(char *restrict *lhs, char *restrict *rhs, int strict) {
  if (strict) {
    assert(lhs && rhs);
    while (**lhs == **rhs && !is_separator(**lhs))
      ++*lhs, ++*rhs;
  } else {
    assert(lhs || rhs);
    if (lhs)
      while (!is_separator(**lhs))
        ++*lhs;
    if (rhs)
      while (!is_separator(**rhs))
        ++*rhs;
  }
}
```
user: What is the c source code of the assembly code below?

```asm
<skip_identifier>:
  endbr64
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  test   %edx,%edx
  je     L59
  test   %rdi,%rdi
  setne  %al
  xor    %edi,%edi
  test   %rsi,%rsi
  setne  %dil
  and    %eax,%edi
  call   <assert@plt>
  mov    (%rbx),%rax
  movsbl (%rax),%edi
  mov    0x0(%rbp),%rax
  cmp    (%rax),%dil
  je     L34
L18:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L25:
  addq   $0x1,(%rbx)
  mov    0x0(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x0(%rbp)
  mov    (%rbx),%rdx
  movsbl (%rdx),%edi
  cmp    0x1(%rax),%dil
  jne    L18
L34:
  call   <is_separator@plt>
  test   %eax,%eax
  je     L25
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L59:
  mov    %rdi,%rax
  xor    %edi,%edi
  or     %rsi,%rax
  setne  %dil
  call   <assert@plt>
  test   %rbx,%rbx
  je     L40
  mov    (%rbx),%rax
  jmp    L11
  nopl   0x0(%rax,%rax,1)
L89:
  mov    (%rbx),%rax
  add    $0x1,%rax
  mov    %rax,(%rbx)
L11:
  movsbl (%rax),%edi
  call   <is_separator@plt>
  test   %eax,%eax
  je     L89
L40:
  test   %rbp,%rbp
  je     L18
  mov    0x0(%rbp),%rax
  jmp    L2
  nopl   0x0(%rax)
L60:
  mov    0x0(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,0x0(%rbp)
L2:
  movsbl (%rax),%edi
  call   <is_separator@plt>
  test   %eax,%eax
  je     L60
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void skip_identifier(char *restrict *lhs, char *restrict *rhs, int strict) {
  if (strict) {
    assert(lhs && rhs);
    while (**lhs == **rhs && !is_separator(**lhs))
      ++*lhs, ++*rhs;
  } else {
    assert(lhs || rhs);
    if (lhs)
      while (!is_separator(**lhs))
        ++*lhs;
    if (rhs)
      while (!is_separator(**rhs))
        ++*rhs;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<skip_identifier>:
  endbr64
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  test   %edx,%edx
  je     L45
  test   %rdi,%rdi
  setne  %al
  xor    %edi,%edi
  test   %rsi,%rsi
  setne  %dil
  and    %eax,%edi
  call   <assert@plt>
  mov    (%rbx),%rax
  movsbl (%rax),%edi
  mov    0x0(%rbp),%rax
  cmp    (%rax),%dil
  je     L34
L2:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L76:
  addq   $0x1,(%rbx)
  mov    0x0(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x0(%rbp)
  mov    (%rbx),%rdx
  movsbl (%rdx),%edi
  cmp    0x1(%rax),%dil
  jne    L2
L34:
  call   <is_separator@plt>
  test   %eax,%eax
  je     L76
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L45:
  mov    %rdi,%rax
  xor    %edi,%edi
  or     %rsi,%rax
  setne  %dil
  call   <assert@plt>
  test   %rbx,%rbx
  je     L61
  mov    (%rbx),%rax
  jmp    L33
  nopl   0x0(%rax,%rax,1)
L21:
  mov    (%rbx),%rax
  add    $0x1,%rax
  mov    %rax,(%rbx)
L33:
  movsbl (%rax),%edi
  call   <is_separator@plt>
  test   %eax,%eax
  je     L21
L61:
  test   %rbp,%rbp
  je     L2
  mov    0x0(%rbp),%rax
  jmp    L80
  nopl   0x0(%rax)
L90:
  mov    0x0(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,0x0(%rbp)
L80:
  movsbl (%rax),%edi
  call   <is_separator@plt>
  test   %eax,%eax
  je     L90
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void skip_identifier(char *restrict *lhs, char *restrict *rhs, int strict) {
  if (strict) {
    assert(lhs && rhs);
    while (**lhs == **rhs && !is_separator(**lhs))
      ++*lhs, ++*rhs;
  } else {
    assert(lhs || rhs);
    if (lhs)
      while (!is_separator(**lhs))
        ++*lhs;
    if (rhs)
      while (!is_separator(**rhs))
        ++*rhs;
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movl   $0x636261,0x4(%rsp)
  lea    D59(%rip),%rbp
  mov    %rbp,%rsi
  lea    D69(%rip),%r13
  mov    %r13,%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rbx
  mov    %rbx,%rsi
  lea    D48(%rip),%r12
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <quick_search@plt>
  lea    D61(%rip),%rbp
  mov    %rbp,%rdi
  call   <puts@plt>
  lea    D44(%rip),%r14
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <quick_search@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  lea    D1(%rip),%r14
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <quick_search@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  lea    D42(%rip),%r14
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <quick_search@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  mov    $0x0,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D59
type: string
name: unpack_data
arguments: label: D69
type: string
name: unpack_data
arguments: label: D48
type: string
name: unpack_data
arguments: label: D61
type: string
name: unpack_data
arguments: label: D44
type: string
name: unpack_data
arguments: label: D1
type: string
name: unpack_data
arguments: label: D42
type: string

tool: D59: abcgaaabbbabbbc

tool: D69: TEXT: '%s'


tool: D48: PATTERN: '%s'


tool: 

tool: D44: accgaaabbbabbabc

tool: D1: accgaaabcbbabbab

tool: D42: abcgaaabcabcbababc

assistant: ```c
int main() {
  char P[] = "abc";
  {
    printf("TEXT: '%s'\n", "abcgaaabbbabbbc");
    printf("PATTERN: '%s'\n", P);
    quick_search("abcgaaabbbabbbc", P);
    puts("");
  };
  {
    printf("TEXT: '%s'\n", "accgaaabbbabbabc");
    printf("PATTERN: '%s'\n", P);
    quick_search("accgaaabbbabbabc", P);
    puts("");
  };
  {
    printf("TEXT: '%s'\n", "accgaaabcbbabbab");
    printf("PATTERN: '%s'\n", P);
    quick_search("accgaaabcbbabbab", P);
    puts("");
  };
  {
    printf("TEXT: '%s'\n", "abcgaaabcabcbababc");
    printf("PATTERN: '%s'\n", P);
    quick_search("abcgaaabcabcbababc", P);
    puts("");
  };
}
```