ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What is the c source code of the assembly code below:

```asm
<is_deleted>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L6
L16:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xff,%al
  je     L36
  mov    $0x0,%eax
  jmp    L17
L36:
  addq   $0x1,-0x18(%rbp)
  addl   $0x1,-0x4(%rbp)
L6:
  mov    -0x4(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L16
  mov    $0x1,%eax
L17:
  pop    %rbp
  ret
```

assistant: ```c
int is_deleted(unsigned char *key, int size) {
  for (int i = 0; i < size; i++) {
    if (*key != 255) {
      return 0;
    }
    key++;
  }
  return 1;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<is_deleted>:
  endbr64
  test   %esi,%esi
  jle    L15
  mov    %esi,%esi
  lea    (%rdi,%rsi,1),%rax
L9:
  cmpb   $0xff,(%rdi)
  jne    L28
  add    $0x1,%rdi
  cmp    %rax,%rdi
  jne    L9
  mov    $0x1,%eax
  ret
L15:
  mov    $0x1,%eax
  ret
L28:
  mov    $0x0,%eax
  ret
```

assistant: ```c
int is_deleted(unsigned char *key, int size) {
  for (int i = 0; i < size; i++) {
    if (*key != 255) {
      return 0;
    }
    key++;
  }
  return 1;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<is_deleted>:
  endbr64
  test   %esi,%esi
  jle    L8
  movslq %esi,%rsi
  lea    (%rdi,%rsi,1),%rax
  jmp    L29
  nopl   0x0(%rax)
L10:
  add    $0x1,%rdi
  cmp    %rax,%rdi
  je     L8
L29:
  cmpb   $0xff,(%rdi)
  je     L10
  xor    %eax,%eax
  ret
  nopl   0x0(%rax)
L8:
  mov    $0x1,%eax
  ret
```

assistant: ```c
int is_deleted(unsigned char *key, int size) {
  for (int i = 0; i < size; i++) {
    if (*key != 255) {
      return 0;
    }
    key++;
  }
  return 1;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<is_deleted>:
  endbr64
  test   %esi,%esi
  jle    L38
  movslq %esi,%rsi
  lea    (%rdi,%rsi,1),%rax
  jmp    L9
  nopl   0x0(%rax)
L14:
  add    $0x1,%rdi
  cmp    %rax,%rdi
  je     L38
L9:
  cmpb   $0xff,(%rdi)
  je     L14
  xor    %eax,%eax
  ret
  nopl   0x0(%rax)
L38:
  mov    $0x1,%eax
  ret
```

assistant: ```c
int is_deleted(unsigned char *key, int size) {
  for (int i = 0; i < size; i++) {
    if (*key != 255) {
      return 0;
    }
    key++;
  }
  return 1;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<e_bne_branch>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <e_branch@plt>
  mov    $0x0,%eax
  call   <e_bne@plt>
  nop
  pop    %rbp
  ret
```

assistant: ```c
void e_bne_branch() {
  e_branch();
  e_bne();
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<e_bne_branch>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <e_branch@plt>
  mov    $0x0,%eax
  call   <e_bne@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void e_bne_branch() {
  e_branch();
  e_bne();
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<e_bne_branch>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <e_branch@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1060 <e_bne@plt>
```

assistant: ```c
void e_bne_branch() {
  e_branch();
  e_bne();
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<e_bne_branch>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <e_branch@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1060 <e_bne@plt>
```

assistant: ```c
void e_bne_branch() {
  e_branch();
  e_bne();
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<get_ip>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <gethostbyname@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L10
  mov    $0x0,%eax
  jmp    L0
L10:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  mov    D4(%rip),%rax
  mov    (%rax),%eax
  mov    -0x24(%rbp),%ecx
  mov    -0x20(%rbp),%rdx
  mov    %eax,%edi
  call   <inet_ntop@plt>
  test   %rax,%rax
  jne    L21
  mov    $0x0,%eax
  jmp    L0
L21:
  mov    -0x20(%rbp),%rax
L0:
  leave
  ret
```

assistant: ```c
char *get_ip(char *host, char *ip, u_int ip_len) {
  struct hostent *hent;
  memset(ip, 0, ip_len);
  if ((hent = gethostbyname(host)) == NULL) {
    return (NULL);
  }
  if (inet_ntop(AF_INET, (void *)hent->h_addr_list[0], ip, ip_len) == NULL) {
    return (NULL);
  }
  return ip;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<get_ip>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  mov    %rsi,%rbx
  mov    %edx,%ebp
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    %r12,%rdi
  call   <gethostbyname@plt>
  test   %rax,%rax
  je     L12
  mov    (%rax),%rax
  mov    %ebp,%ecx
  mov    %rbx,%rdx
  mov    (%rax),%rsi
  mov    D3(%rip),%rax
  mov    (%rax),%edi
  call   <inet_ntop@plt>
  test   %rax,%rax
  cmove  %rax,%rbx
L8:
  mov    %rbx,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L12:
  mov    %rax,%rbx
  jmp    L8
```

assistant: ```c
char *get_ip(char *host, char *ip, u_int ip_len) {
  struct hostent *hent;
  memset(ip, 0, ip_len);
  if ((hent = gethostbyname(host)) == NULL) {
    return (NULL);
  }
  if (inet_ntop(AF_INET, (void *)hent->h_addr_list[0], ip, ip_len) == NULL) {
    return (NULL);
  }
  return ip;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<get_ip>:
  endbr64
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %rsi,%r12
  xor    %esi,%esi
  push   %rbp
  mov    %rdi,%rbp
  mov    %r12,%rdi
  call   <memset@plt>
  mov    %rbp,%rdi
  call   <gethostbyname@plt>
  test   %rax,%rax
  je     L0
  mov    (%rax),%rax
  mov    %r13d,%ecx
  mov    %r12,%rdx
  mov    (%rax),%rsi
  mov    D4(%rip),%rax
  mov    (%rax),%edi
  call   <inet_ntop@plt>
  test   %rax,%rax
  je     L0
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L0:
  xor    %r12d,%r12d
  pop    %rbp
  mov    %r12,%rax
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
char *get_ip(char *host, char *ip, u_int ip_len) {
  struct hostent *hent;
  memset(ip, 0, ip_len);
  if ((hent = gethostbyname(host)) == NULL) {
    return (NULL);
  }
  if (inet_ntop(AF_INET, (void *)hent->h_addr_list[0], ip, ip_len) == NULL) {
    return (NULL);
  }
  return ip;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<get_ip>:
  endbr64
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %rsi,%r12
  xor    %esi,%esi
  push   %rbp
  mov    %rdi,%rbp
  mov    %r12,%rdi
  call   <memset@plt>
  mov    %rbp,%rdi
  call   <gethostbyname@plt>
  test   %rax,%rax
  je     L5
  mov    (%rax),%rax
  mov    %r13d,%ecx
  mov    %r12,%rdx
  mov    (%rax),%rsi
  mov    D5(%rip),%rax
  mov    (%rax),%edi
  call   <inet_ntop@plt>
  test   %rax,%rax
  je     L5
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L5:
  xor    %r12d,%r12d
  pop    %rbp
  mov    %r12,%rax
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
char *get_ip(char *host, char *ip, u_int ip_len) {
  struct hostent *hent;
  memset(ip, 0, ip_len);
  if ((hent = gethostbyname(host)) == NULL) {
    return (NULL);
  }
  if (inet_ntop(AF_INET, (void *)hent->h_addr_list[0], ip, ip_len) == NULL) {
    return (NULL);
  }
  return ip;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<ccof_bwbp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  mov    $0x4,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L26
  mov    $0x0,%eax
  jmp    L35
L26:
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <ccof_bwhp@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L52
  mov    $0x0,%eax
  jmp    L35
L52:
  movl   $0x0,-0x14(%rbp)
  jmp    L24
L30:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    -0x14(%rbp),%edx
  add    %edx,%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x10(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x14(%rbp)
L24:
  mov    -0x14(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L30
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    -0x24(%rbp),%edx
  add    %edx,%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x10(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x10(%rbp),%rax
L35:
  leave
  ret
```

assistant: ```c
int *ccof_bwbp(int n) {
  int *tcof;
  int *ccof;
  int i;
  ccof = (int *)calloc(2 * n + 1, sizeof(int));
  if (ccof == NULL)
    return (NULL);
  tcof = ccof_bwhp(n);
  if (tcof == NULL)
    return (NULL);
  for (i = 0; i < n; ++i) {
    ccof[2 * i] = tcof[i];
    ccof[2 * i + 1] = 0.0;
  }
  ccof[2 * n] = tcof[n];
  free(tcof);
  return (ccof);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<ccof_bwbp>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%ebx
  lea    (%rdi,%rdi,1),%r12d
  lea    0x1(%r12),%edi
  mov    $0x4,%esi
  call   <calloc@plt>
  mov    $0x0,%r13d
  test   %rax,%rax
  je     L48
  mov    %rax,%rbp
  mov    %ebx,%edi
  call   <ccof_bwhp@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L46
  mov    %rbp,%r13
  test   %ebx,%ebx
  jle    L41
  mov    %rax,%rcx
  mov    %rbp,%rdx
  mov    %ebx,%eax
  lea    0x0(%rbp,%rax,8),%r8
L5:
  mov    (%rcx),%esi
  mov    %esi,(%rdx)
  movl   $0x0,0x4(%rdx)
  add    $0x4,%rcx
  add    $0x8,%rdx
  cmp    %r8,%rdx
  jne    L5
L41:
  movslq %ebx,%rbx
  mov    (%rdi,%rbx,4),%eax
  movslq %r12d,%r12
  mov    %eax,0x0(%rbp,%r12,4)
  call   <free@plt>
L48:
  mov    %r13,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L46:
  mov    %rax,%r13
  jmp    L48
```

assistant: ```c
int *ccof_bwbp(int n) {
  int *tcof;
  int *ccof;
  int i;
  ccof = (int *)calloc(2 * n + 1, sizeof(int));
  if (ccof == NULL)
    return (NULL);
  tcof = ccof_bwhp(n);
  if (tcof == NULL)
    return (NULL);
  for (i = 0; i < n; ++i) {
    ccof[2 * i] = tcof[i];
    ccof[2 * i + 1] = 0.0;
  }
  ccof[2 * n] = tcof[n];
  free(tcof);
  return (ccof);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<ccof_bwbp>:
  endbr64
  push   %r13
  mov    $0x4,%esi
  push   %r12
  lea    (%rdi,%rdi,1),%r12d
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  lea    0x1(%r12),%edi
  sub    $0x8,%rsp
  call   <calloc@plt>
  test   %rax,%rax
  je     L3
  mov    %ebx,%edi
  mov    %rax,%rbp
  call   <ccof_bwhp@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L3
  mov    %rbp,%r13
  test   %ebx,%ebx
  jle    L35
  mov    %rax,%rcx
  mov    %ebx,%eax
  mov    %rbp,%rdx
  lea    0x0(%rbp,%rax,8),%r8
  xchg   %ax,%ax
L4:
  mov    (%rcx),%esi
  add    $0x8,%rdx
  movl   $0x0,-0x4(%rdx)
  add    $0x4,%rcx
  mov    %esi,-0x8(%rdx)
  cmp    %r8,%rdx
  jne    L4
L35:
  movslq %ebx,%rbx
  movslq %r12d,%r12
  mov    (%rdi,%rbx,4),%eax
  mov    %eax,0x0(%rbp,%r12,4)
  call   <free@plt>
  add    $0x8,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L3:
  add    $0x8,%rsp
  xor    %r13d,%r13d
  pop    %rbx
  mov    %r13,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
int *ccof_bwbp(int n) {
  int *tcof;
  int *ccof;
  int i;
  ccof = (int *)calloc(2 * n + 1, sizeof(int));
  if (ccof == NULL)
    return (NULL);
  tcof = ccof_bwhp(n);
  if (tcof == NULL)
    return (NULL);
  for (i = 0; i < n; ++i) {
    ccof[2 * i] = tcof[i];
    ccof[2 * i + 1] = 0.0;
  }
  ccof[2 * n] = tcof[n];
  free(tcof);
  return (ccof);
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<ccof_bwbp>:
  endbr64
  push   %r13
  mov    $0x4,%esi
  push   %r12
  lea    (%rdi,%rdi,1),%r12d
  push   %rbp
  mov    %edi,%ebp
  lea    0x1(%r12),%edi
  push   %rbx
  sub    $0x8,%rsp
  call   <calloc@plt>
  test   %rax,%rax
  je     L100
  mov    %ebp,%edi
  mov    %rax,%rbx
  call   <ccof_bwhp@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L100
  mov    %rbx,%r13
  movslq %ebp,%rsi
  test   %ebp,%ebp
  jle    L35
  lea    (%rdi,%rsi,4),%rdx
  lea    (%rbx,%rsi,8),%rcx
  mov    %rbx,%rax
  cmp    %rdx,%rbx
  setae  %dl
  cmp    %rcx,%rdi
  setae  %cl
  or     %cl,%dl
  je     L46
  lea    -0x1(%rbp),%edx
  cmp    $0x2,%edx
  jbe    L46
  mov    %ebp,%ecx
  mov    %rdi,%rdx
  pxor   %xmm1,%xmm1
  shr    $0x2,%ecx
  shl    $0x4,%rcx
  add    %rdi,%rcx
  xchg   %ax,%ax
L9:
  movdqu (%rdx),%xmm0
  add    $0x10,%rdx
  add    $0x20,%rax
  movdqa %xmm0,%xmm2
  punpckhdq %xmm1,%xmm0
  punpckldq %xmm1,%xmm2
  movups %xmm0,-0x10(%rax)
  movups %xmm2,-0x20(%rax)
  cmp    %rdx,%rcx
  jne    L9
  mov    %ebp,%edx
  and    $0xfffffffc,%edx
  test   $0x3,%bpl
  je     L35
  mov    %edx,%r8d
  lea    (%rdx,%rdx,1),%eax
  lea    0x0(,%r8,4),%r10
  mov    (%rdi,%r8,4),%r8d
  movslq %eax,%rcx
  movl   $0x0,0x4(%rbx,%rcx,4)
  lea    0x0(,%rcx,4),%r9
  mov    %r8d,(%rbx,%rcx,4)
  lea    0x1(%rdx),%ecx
  cmp    %ecx,%ebp
  jle    L35
  mov    0x4(%rdi,%r10,1),%ecx
  add    $0x2,%eax
  add    $0x2,%edx
  cltq
  mov    %ecx,0x8(%rbx,%r9,1)
  movl   $0x0,0x4(%rbx,%rax,4)
  cmp    %edx,%ebp
  jle    L35
  mov    0x8(%rdi,%r10,1),%edx
  mov    %edx,0x10(%rbx,%r9,1)
  movl   $0x0,0xc(%rbx,%rax,4)
L35:
  mov    (%rdi,%rsi,4),%eax
  movslq %r12d,%r12
  mov    %eax,(%rbx,%r12,4)
  call   <free@plt>
  add    $0x8,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L100:
  add    $0x8,%rsp
  xor    %r13d,%r13d
  pop    %rbx
  mov    %r13,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L46:
  mov    %ebp,%ebp
  mov    %rdi,%rdx
  lea    (%rbx,%rbp,8),%r8
  nopl   0x0(%rax)
L78:
  mov    (%rdx),%ecx
  add    $0x8,%rax
  movl   $0x0,-0x4(%rax)
  add    $0x4,%rdx
  mov    %ecx,-0x8(%rax)
  cmp    %rax,%r8
  jne    L78
  jmp    L35
```

assistant: ```c
int *ccof_bwbp(int n) {
  int *tcof;
  int *ccof;
  int i;
  ccof = (int *)calloc(2 * n + 1, sizeof(int));
  if (ccof == NULL)
    return (NULL);
  tcof = ccof_bwhp(n);
  if (tcof == NULL)
    return (NULL);
  for (i = 0; i < n; ++i) {
    ccof[2 * i] = tcof[i];
    ccof[2 * i + 1] = 0.0;
  }
  ccof[2 * n] = tcof[n];
  free(tcof);
  return (ccof);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<_utstring_BuildTable>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  movq   $0x0,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    %rax,(%rdx)
  jmp    L65
L3:
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
L2:
  cmpq   $0x0,-0x8(%rbp)
  js     L66
  mov    -0x10(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x8(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L3
L66:
  addq   $0x1,-0x10(%rbp)
  addq   $0x1,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jge    L21
  mov    -0x10(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x8(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L25
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  jmp    L65
L25:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    %rax,(%rdx)
  jmp    L65
L21:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    %rax,(%rdx)
L65:
  mov    -0x10(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jl     L2
  nop
  pop    %rbp
  ret
```

assistant: ```c
__attribute__((__unused__)) void _utstring_BuildTable(const char *P_Needle, ssize_t P_NeedleLen, long *P_KMP_Table) {
  long i, j;
  i = 0;
  j = i - 1;
  P_KMP_Table[i] = j;
  while (i < P_NeedleLen) {
    while ((j > -1) && (P_Needle[i] != P_Needle[j])) {
      j = P_KMP_Table[j];
    }
    i++;
    j++;
    if (i < P_NeedleLen) {
      if (P_Needle[i] == P_Needle[j]) {
        P_KMP_Table[i] = P_KMP_Table[j];
      } else {
        P_KMP_Table[i] = j;
      }
    } else {
      P_KMP_Table[i] = j;
    }
  }
  return;
}
```
user: What is the c source code of the assembly code below?

```asm
<_utstring_BuildTable>:
  endbr64
  movq   $0xffffffffffffffff,(%rdx)
  mov    $0x0,%r8d
  mov    $0xffffffffffffffff,%rax
  test   %rsi,%rsi
  jg     L59
  ret
L51:
  mov    (%rdx,%rax,8),%r9
  mov    %r9,(%rdx,%r8,8)
L36:
  test   %rax,%rax
  js     L59
  movzbl (%rdi,%rcx,1),%ecx
L67:
  cmp    (%rdi,%rax,1),%cl
  je     L59
  mov    (%rdx,%rax,8),%rax
  test   %rax,%rax
  jns    L67
L59:
  add    $0x1,%r8
  add    $0x1,%rax
  cmp    %r8,%rsi
  je     L39
  mov    %r8,%rcx
  movzbl (%rdi,%rax,1),%r10d
  cmp    %r10b,(%rdi,%r8,1)
  je     L51
  mov    %rax,(%rdx,%r8,8)
  jmp    L36
L39:
  mov    %rax,(%rdx,%r8,8)
  ret
```

assistant: ```c
__attribute__((__unused__)) void _utstring_BuildTable(const char *P_Needle, ssize_t P_NeedleLen, long *P_KMP_Table) {
  long i, j;
  i = 0;
  j = i - 1;
  P_KMP_Table[i] = j;
  while (i < P_NeedleLen) {
    while ((j > -1) && (P_Needle[i] != P_Needle[j])) {
      j = P_KMP_Table[j];
    }
    i++;
    j++;
    if (i < P_NeedleLen) {
      if (P_Needle[i] == P_Needle[j]) {
        P_KMP_Table[i] = P_KMP_Table[j];
      } else {
        P_KMP_Table[i] = j;
      }
    } else {
      P_KMP_Table[i] = j;
    }
  }
  return;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<_utstring_BuildTable>:
  endbr64
  movq   $0xffffffffffffffff,(%rdx)
  xor    %r8d,%r8d
  mov    $0xffffffffffffffff,%rax
  test   %rsi,%rsi
  jle    L75
  nopw   0x0(%rax,%rax,1)
L23:
  add    $0x1,%r8
  add    $0x1,%rax
  cmp    %r8,%rsi
  jle    L39
L10:
  movzbl (%rdi,%rax,1),%r9d
  mov    %rax,%rcx
  cmp    %r9b,(%rdi,%r8,1)
  jne    L45
  mov    (%rdx,%rax,8),%rcx
L45:
  mov    %rcx,(%rdx,%r8,8)
L30:
  test   %rax,%rax
  js     L23
  movzbl (%rdi,%r8,1),%ecx
  nopl   (%rax)
L76:
  cmp    (%rdi,%rax,1),%cl
  je     L23
  mov    (%rdx,%rax,8),%rax
  test   %rax,%rax
  jns    L76
  add    $0x1,%r8
  add    $0x1,%rax
  cmp    %r8,%rsi
  jg     L10
L39:
  mov    %rax,(%rdx,%r8,8)
  jne    L30
  ret
L75:
  ret
```

assistant: ```c
__attribute__((__unused__)) void _utstring_BuildTable(const char *P_Needle, ssize_t P_NeedleLen, long *P_KMP_Table) {
  long i, j;
  i = 0;
  j = i - 1;
  P_KMP_Table[i] = j;
  while (i < P_NeedleLen) {
    while ((j > -1) && (P_Needle[i] != P_Needle[j])) {
      j = P_KMP_Table[j];
    }
    i++;
    j++;
    if (i < P_NeedleLen) {
      if (P_Needle[i] == P_Needle[j]) {
        P_KMP_Table[i] = P_KMP_Table[j];
      } else {
        P_KMP_Table[i] = j;
      }
    } else {
      P_KMP_Table[i] = j;
    }
  }
  return;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<_utstring_BuildTable>:
  endbr64
  movq   $0xffffffffffffffff,(%rdx)
  xor    %r8d,%r8d
  mov    $0xffffffffffffffff,%rax
  test   %rsi,%rsi
  jle    L53
  nopw   0x0(%rax,%rax,1)
L52:
  add    $0x1,%r8
  add    $0x1,%rax
  cmp    %r8,%rsi
  jle    L51
L49:
  movzbl (%rdi,%rax,1),%r9d
  mov    %rax,%rcx
  cmp    %r9b,(%rdi,%r8,1)
  jne    L25
  mov    (%rdx,%rax,8),%rcx
L25:
  mov    %rcx,(%rdx,%r8,8)
L60:
  test   %rax,%rax
  js     L52
  movzbl (%rdi,%r8,1),%ecx
  nopl   (%rax)
L73:
  cmp    (%rdi,%rax,1),%cl
  je     L52
  mov    (%rdx,%rax,8),%rax
  test   %rax,%rax
  jns    L73
  add    $0x1,%r8
  add    $0x1,%rax
  cmp    %r8,%rsi
  jg     L49
L51:
  mov    %rax,(%rdx,%r8,8)
  jne    L60
  ret
L53:
  ret
```

assistant: ```c
__attribute__((__unused__)) void _utstring_BuildTable(const char *P_Needle, ssize_t P_NeedleLen, long *P_KMP_Table) {
  long i, j;
  i = 0;
  j = i - 1;
  P_KMP_Table[i] = j;
  while (i < P_NeedleLen) {
    while ((j > -1) && (P_Needle[i] != P_Needle[j])) {
      j = P_KMP_Table[j];
    }
    i++;
    j++;
    if (i < P_NeedleLen) {
      if (P_Needle[i] == P_Needle[j]) {
        P_KMP_Table[i] = P_KMP_Table[j];
      } else {
        P_KMP_Table[i] = j;
      }
    } else {
      P_KMP_Table[i] = j;
    }
  }
  return;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<insert_batch>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rax
  mov    %esi,%ebp
  mov    %rdx,%rsi
  mov    %rcx,%rdx
  lea    (%r8,%r8,2),%r12d
  mov    %r12d,%ecx
  mov    (%rsi),%edi
  mov    0x4(%rsi),%r10d
  mov    0x8(%rsi),%r11d
  test   %r8d,%r8d
  je     L66
  jle    L58
  mov    %rdx,%rsi
  lea    -0x1(%r8),%ebx
  lea    (%rbx,%rbx,2),%rbx
  lea    0xc(%rdx,%rbx,4),%rbx
L47:
  add    (%rsi),%edi
  add    0x4(%rsi),%r10d
  add    0x8(%rsi),%r11d
  add    $0xc,%rsi
  cmp    %rbx,%rsi
  jne    L47
L58:
  cmp    $0x26,%r12d
  jg     L46
L66:
  lea    0x0(%rbp,%rbp,2),%ebx
  cmp    %ebp,%r8d
  jge    L46
  movslq %r12d,%r12
  shl    $0x2,%r12
  add    %r12,%rax
  add    %r12,%rdx
L14:
  mov    (%rax),%esi
  sub    %edi,%esi
  mov    %esi,(%rdx)
  mov    0x4(%rax),%esi
  sub    %r10d,%esi
  mov    %esi,0x4(%rdx)
  mov    0x8(%rax),%esi
  sub    %r11d,%esi
  mov    %esi,0x8(%rdx)
  mov    (%rax),%edi
  mov    0x4(%rax),%r10d
  mov    0x8(%rax),%r11d
  add    $0x3,%ecx
  cmp    $0x26,%ecx
  jg     L46
  add    $0xc,%rax
  add    $0xc,%rdx
  cmp    %ebx,%ecx
  jl     L14
L46:
  mov    %ecx,(%r9)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void insert_batch(const int *input_ptr, const int ntriplets_left, const int *prevcoord, int *encode_ints, const int startenc, int *nenc) {
  int nencode = startenc * 3;
  int tmp_prevcoord[3];
  tmp_prevcoord[0] = prevcoord[0];
  tmp_prevcoord[1] = prevcoord[1];
  tmp_prevcoord[2] = prevcoord[2];
  if (startenc) {
    int i;
    for (i = 0; i < startenc; i++) {
      tmp_prevcoord[0] += encode_ints[i * 3];
      tmp_prevcoord[1] += encode_ints[i * 3 + 1];
      tmp_prevcoord[2] += encode_ints[i * 3 + 2];
    }
  }
  while ((nencode < 3 + 12 * 3) && (nencode < ntriplets_left * 3)) {
    encode_ints[nencode] = input_ptr[nencode] - tmp_prevcoord[0];
    encode_ints[nencode + 1] = input_ptr[nencode + 1] - tmp_prevcoord[1];
    encode_ints[nencode + 2] = input_ptr[nencode + 2] - tmp_prevcoord[2];
    tmp_prevcoord[0] = input_ptr[nencode];
    tmp_prevcoord[1] = input_ptr[nencode + 1];
    tmp_prevcoord[2] = input_ptr[nencode + 2];
    nencode += 3;
  }
  *nenc = nencode;
}
```