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

```asm
<itemdb_split_atoi>:
  endbr64
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  test   %rdi,%rdi
  je     L28
  mov    %rdi,%rbp
  call   <atoi@plt>
  mov    %rbp,%rdi
  mov    $0x3a,%esi
  xor    %ebp,%ebp
  mov    %eax,%ebx
  call   <strchr@plt>
  test   %rax,%rax
  je     L33
  movb   $0x0,(%rax)
  lea    0x1(%rax),%r14
  mov    %r14,%rdi
  call   <atoi@plt>
  mov    $0x3a,%esi
  mov    %r14,%rdi
  mov    %eax,%ebp
  call   <strchr@plt>
  test   %rax,%rax
  je     L33
  movb   $0x0,(%rax)
L33:
  mov    %ebx,0x0(%r13)
  pop    %rbx
  mov    %ebp,(%r12)
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L28:
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  jmp    L33
```

assistant: ```c
void itemdb_split_atoi(char *str, int *melee, int *magic) {
  int i, val[2];
  for (i = 0; i < 2; i++) {
    if (str) {
      val[i] = atoi(str);
      str = strchr(str, ':');
      if (str)
        *str++ = 0;
    } else {
      val[i] = 0;
    }
  }
  *melee = val[0];
  *magic = val[1];
  return;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<usage>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  nop
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D2
datatype: string

tool: D2: usage: juniper-lex [-4h] [-r path] config_path


assistant: ```c
void usage() {
  printf("usage: juniper-lex [-4h] [-r path] config_path\n");
  exit(0);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<usage>:
  endbr64
  sub    $0x8,%rsp
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: parse_data
arguments: data_label: D9
type_guessed: string

tool: D9: usage: juniper-lex [-4h] [-r path] config_path


assistant: ```c
void usage() {
  printf("usage: juniper-lex [-4h] [-r path] config_path\n");
  exit(0);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<usage>:
  endbr64
  sub    $0x8,%rsp
  lea    D3(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    1070 <exit@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D3
type: string

tool: D3: usage: juniper-lex [-4h] [-r path] config_path


assistant: ```c
void usage() {
  printf("usage: juniper-lex [-4h] [-r path] config_path\n");
  exit(0);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<usage>:
  endbr64
  sub    $0x8,%rsp
  lea    D2(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  add    $0x8,%rsp
  jmp    1070 <exit@plt>
```

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

tool: D2: usage: juniper-lex [-4h] [-r path] config_path


assistant: ```c
void usage() {
  printf("usage: juniper-lex [-4h] [-r path] config_path\n");
  exit(0);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<toUppercase>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movq   $0x0,-0x18(%rbp)
  jmp    L3
L7:
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x60,%al
  jle    L38
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x7a,%al
  jg     L38
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  sub    $0x20,%eax
  jmp    L16
L38:
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
L16:
  mov    -0x8(%rbp),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    %al,(%rdx)
  addq   $0x1,-0x18(%rbp)
L3:
  mov    -0x18(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jbe    L7
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
char *toUppercase(char *raw) {
  size_t len = strlen(raw);
  char *ret = malloc(len + 1);
  for (size_t i = 0; i <= len; ++i) {
    ret[i] = raw[i] >= 97 && raw[i] <= 122 ? raw[i] - 32 : raw[i];
  }
  return ret;
}
```
user: Translate the below assembly code into C programming language:

```asm
<toUppercase>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  call   <strlen@plt>
  mov    %rax,%rbx
  lea    0x1(%rax),%rdi
  call   <malloc@plt>
  mov    $0x0,%ecx
  jmp    L12
L17:
  mov    %rdx,%rcx
L12:
  movzbl 0x0(%rbp,%rcx,1),%edx
  lea    -0x61(%rdx),%edi
  lea    -0x20(%rdx),%esi
  cmp    $0x1a,%dil
  cmovb  %esi,%edx
  mov    %dl,(%rax,%rcx,1)
  lea    0x1(%rcx),%rdx
  cmp    %rcx,%rbx
  jne    L17
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
char *toUppercase(char *raw) {
  size_t len = strlen(raw);
  char *ret = malloc(len + 1);
  for (size_t i = 0; i <= len; ++i) {
    ret[i] = raw[i] >= 97 && raw[i] <= 122 ? raw[i] - 32 : raw[i];
  }
  return ret;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<toUppercase>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <strlen@plt>
  lea    0x1(%rax),%rdi
  mov    %rax,%rbx
  call   <malloc@plt>
  xor    %ecx,%ecx
  jmp    L6
  nopw   0x0(%rax,%rax,1)
L13:
  mov    %rdx,%rcx
L6:
  movzbl 0x0(%rbp,%rcx,1),%edx
  lea    -0x61(%rdx),%edi
  lea    -0x20(%rdx),%esi
  cmp    $0x1a,%dil
  cmovb  %esi,%edx
  mov    %dl,(%rax,%rcx,1)
  lea    0x1(%rcx),%rdx
  cmp    %rcx,%rbx
  jne    L13
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
char *toUppercase(char *raw) {
  size_t len = strlen(raw);
  char *ret = malloc(len + 1);
  for (size_t i = 0; i <= len; ++i) {
    ret[i] = raw[i] >= 97 && raw[i] <= 122 ? raw[i] - 32 : raw[i];
  }
  return ret;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<hash>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
  jmp    L15
L19:
  mov    -0x10(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  add    %rax,%rax
  lea    (%rax,%rdx,1),%rcx
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbq %al,%rax
  add    %rcx,%rax
  add    %rax,-0x10(%rbp)
  addq   $0x1,-0x8(%rbp)
L15:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %rax,-0x8(%rbp)
  jb     L19
  mov    -0x10(%rbp),%rax
  mov    $0x0,%edx
  divq   -0x20(%rbp)
  mov    %rdx,%rax
  leave
  ret
```

assistant: ```c
size_t hash(char *key, size_t size) {
  size_t hash = 0;
  for (size_t i = 0; i < strlen(key); i++) {
    hash += (hash * 19) + key[i];
  }
  return hash % size;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<hash>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%rbx
  call   <strlen@plt>
  mov    %rbp,%rdx
  lea    0x0(%rbp,%rax,1),%rdi
  mov    $0x0,%eax
  jmp    L0
L10:
  lea    (%rax,%rax,8),%rsi
  movsbq (%rdx),%rcx
  lea    (%rsi,%rax,1),%rax
  lea    (%rcx,%rax,2),%rax
  add    $0x1,%rdx
L0:
  cmp    %rdi,%rdx
  jne    L10
  mov    $0x0,%edx
  div    %rbx
  mov    %rdx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
size_t hash(char *key, size_t size) {
  size_t hash = 0;
  for (size_t i = 0; i < strlen(key); i++) {
    hash += (hash * 19) + key[i];
  }
  return hash % size;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<hash>:
  endbr64
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  call   <strlen@plt>
  mov    %rbx,%rdi
  lea    (%rbx,%rax,1),%rsi
  xor    %eax,%eax
  jmp    L11
L4:
  movsbq (%rdi),%rdx
  lea    (%rax,%rax,8),%rcx
  add    $0x1,%rdi
  add    %rax,%rcx
  lea    (%rdx,%rcx,2),%rax
L11:
  cmp    %rsi,%rdi
  jne    L4
  xor    %edx,%edx
  add    $0x8,%rsp
  div    %rbp
  pop    %rbx
  pop    %rbp
  mov    %rdx,%rax
  ret
```

assistant: ```c
size_t hash(char *key, size_t size) {
  size_t hash = 0;
  for (size_t i = 0; i < strlen(key); i++) {
    hash += (hash * 19) + key[i];
  }
  return hash % size;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<hash>:
  endbr64
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  call   <strlen@plt>
  test   %rax,%rax
  je     L17
  lea    (%rbx,%rax,1),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L6:
  movsbq (%rdi),%rdx
  lea    (%rax,%rax,8),%rcx
  add    $0x1,%rdi
  add    %rcx,%rax
  lea    (%rdx,%rax,2),%rax
  cmp    %rsi,%rdi
  jne    L6
L17:
  xor    %edx,%edx
  add    $0x8,%rsp
  div    %rbp
  pop    %rbx
  pop    %rbp
  mov    %rdx,%rax
  ret
```

assistant: ```c
size_t hash(char *key, size_t size) {
  size_t hash = 0;
  for (size_t i = 0; i < strlen(key); i++) {
    hash += (hash * 19) + key[i];
  }
  return hash % size;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<verify>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,%eax
  mov    %edx,-0x10(%rbp)
  mov    %ecx,-0x14(%rbp)
  mov    %al,-0xc(%rbp)
  jmp    L11
L34:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  cmp    %al,-0xc(%rbp)
  je     L11
  movsbl -0xc(%rbp),%ecx
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x10(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %esi,%r8d
  mov    %eax,%esi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L14
L11:
  mov    -0x10(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  test   %eax,%eax
  jg     L34
  mov    $0x0,%eax
L14:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D6
datatype: string

tool: D6: Verify error in child %d, *buf = %x, val = %x, size = %d


assistant: ```c
int verify(char *buf, char val, int size, int child) {
  while (size-- > 0) {
    if (*buf++ != val) {
      printf("Verify error in child %d, *buf = %x, val = %x, size = %d\n", child, *buf, val, size);
      return 1;
    }
  }
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<verify>:
  endbr64
  mov    %esi,%r9d
  mov    %edx,%r8d
  mov    %ecx,%esi
  mov    %r9d,%edx
L7:
  mov    %r8d,%eax
  sub    $0x1,%r8d
  test   %eax,%eax
  jle    L2
  add    $0x1,%rdi
  cmp    %dl,-0x1(%rdi)
  je     L7
  sub    $0x8,%rsp
  movsbl %r9b,%ecx
  movsbl (%rdi),%edx
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  add    $0x8,%rsp
  ret
L2:
  mov    $0x0,%eax
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D9
type_guessed: string

tool: D9: Verify error in child %d, *buf = %x, val = %x, size = %d


assistant: ```c
int verify(char *buf, char val, int size, int child) {
  while (size-- > 0) {
    if (*buf++ != val) {
      printf("Verify error in child %d, *buf = %x, val = %x, size = %d\n", child, *buf, val, size);
      return 1;
    }
  }
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<verify>:
  endbr64
  mov    %esi,%r9d
  mov    %edx,%r8d
  mov    %ecx,%esi
  mov    %r9d,%edx
  jmp    L14
  nopl   0x0(%rax)
L19:
  add    $0x1,%rdi
  cmp    %dl,-0x1(%rdi)
  jne    L23
L14:
  mov    %r8d,%eax
  sub    $0x1,%r8d
  test   %eax,%eax
  jg     L19
  xor    %eax,%eax
  ret
  nop
L23:
  sub    $0x8,%rsp
  movsbl (%rdi),%edx
  movsbl %r9b,%ecx
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D8
type_guessed: string

tool: D8: Verify error in child %d, *buf = %x, val = %x, size = %d


assistant: ```c
int verify(char *buf, char val, int size, int child) {
  while (size-- > 0) {
    if (*buf++ != val) {
      printf("Verify error in child %d, *buf = %x, val = %x, size = %d\n", child, *buf, val, size);
      return 1;
    }
  }
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<verify>:
  endbr64
  mov    %esi,%r9d
  mov    %edx,%r8d
  mov    %ecx,%esi
  mov    %r9d,%edx
  jmp    L5
  nopl   0x0(%rax)
L10:
  add    $0x1,%rdi
  cmp    %dl,-0x1(%rdi)
  jne    L23
L5:
  mov    %r8d,%eax
  sub    $0x1,%r8d
  test   %eax,%eax
  jg     L10
  xor    %eax,%eax
  ret
  nop
L23:
  sub    $0x8,%rsp
  movsbl (%rdi),%edx
  movsbl %r9b,%ecx
  lea    D5(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D5
type_infered: string

tool: D5: Verify error in child %d, *buf = %x, val = %x, size = %d


assistant: ```c
int verify(char *buf, char val, int size, int child) {
  while (size-- > 0) {
    if (*buf++ != val) {
      printf("Verify error in child %d, *buf = %x, val = %x, size = %d\n", child, *buf, val, size);
      return 1;
    }
  }
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<shake128>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1b0,%rsp
  mov    %rdi,-0x198(%rbp)
  mov    %rsi,-0x1a0(%rbp)
  mov    %rdx,-0x1a8(%rbp)
  mov    %rcx,-0x1b0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x1a0(%rbp),%rax
  shr    $0x3,%rax
  movabs $0xc30c30c30c30c31,%rdx
  mul    %rdx
  mov    %rdx,-0x188(%rbp)
  movq   $0x0,-0x190(%rbp)
  jmp    L55
L21:
  mov    -0x190(%rbp),%rax
  movq   $0x0,-0x180(%rbp,%rax,8)
  addq   $0x1,-0x190(%rbp)
L55:
  cmpq   $0x18,-0x190(%rbp)
  jbe    L21
  mov    -0x1b0(%rbp),%rcx
  mov    -0x1a8(%rbp),%rdx
  lea    -0x180(%rbp),%rax
  mov    $0x1f,%r8d
  mov    $0xa8,%esi
  mov    %rax,%rdi
  call   <keccak_absorb@plt>
  mov    -0x188(%rbp),%rax
  mov    %eax,%esi
  lea    -0x180(%rbp),%rdx
  mov    -0x198(%rbp),%rax
  mov    $0xa8,%ecx
  mov    %rax,%rdi
  call   <keccak_squeezeblocks@plt>
  mov    -0x188(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rax,-0x198(%rbp)
  mov    -0x188(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  sub    %rax,-0x1a0(%rbp)
  cmpq   $0x0,-0x1a0(%rbp)
  je     L18
  lea    -0x180(%rbp),%rdx
  lea    -0xb0(%rbp),%rax
  mov    $0xa8,%ecx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <keccak_squeezeblocks@plt>
  movq   $0x0,-0x190(%rbp)
  jmp    L48
L15:
  mov    -0x198(%rbp),%rdx
  mov    -0x190(%rbp),%rax
  add    %rax,%rdx
  lea    -0xb0(%rbp),%rcx
  mov    -0x190(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addq   $0x1,-0x190(%rbp)
L48:
  mov    -0x190(%rbp),%rax
  cmp    -0x1a0(%rbp),%rax
  jb     L15
L18:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L37
  call   <__stack_chk_fail@plt>
L37:
  leave
  ret
```

assistant: ```c
void shake128(unsigned char *output, unsigned long long outlen, const unsigned char *input, unsigned long long inlen) {
  uint64_t s[25];
  unsigned char t[168];
  unsigned long long nblocks = outlen / 168;
  size_t i;
  for (i = 0; i < 25; ++i)
    s[i] = 0;
  keccak_absorb(s, 168, input, inlen, 0x1F);
  keccak_squeezeblocks(output, nblocks, s, 168);
  output += nblocks * 168;
  outlen -= nblocks * 168;
  if (outlen) {
    keccak_squeezeblocks(t, 1, s, 168);
    for (i = 0; i < outlen; i++)
      output[i] = t[i];
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<shake128>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x188,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%rbx
  mov    %rdx,%r9
  mov    %fs:0x28,%rax
  mov    %rax,0x178(%rsp)
  xor    %eax,%eax
  mov    %rsi,%r12
  shr    $0x3,%r12
  movabs $0xc30c30c30c30c31,%rdx
  mov    %r12,%rax
  mul    %rdx
  mov    %rdx,%r12
  mov    %rsp,%rsi
  lea    0xc8(%rsp),%rdi
L33:
  movq   $0x0,(%rsi)
  add    $0x8,%rsi
  cmp    %rdi,%rsi
  jne    L33
  mov    %rsp,%r13
  mov    $0x1f,%r8d
  mov    %r9,%rdx
  mov    $0xa8,%esi
  mov    %r13,%rdi
  call   <keccak_absorb@plt>
  mov    $0xa8,%ecx
  mov    %r13,%rdx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <keccak_squeezeblocks@plt>
  mov    %rbx,%rdx
  shr    $0x3,%rdx
  movabs $0xc30c30c30c30c31,%rcx
  mov    %rdx,%rax
  mul    %rcx
  lea    (%rdx,%rdx,4),%rax
  lea    (%rdx,%rax,4),%rax
  shl    $0x3,%rax
  sub    %rax,%rbx
  jne    L6
L38:
  mov    0x178(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L44
  add    $0x188,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L6:
  lea    (%r12,%r12,4),%rax
  lea    (%r12,%rax,4),%r12
  shl    $0x3,%r12
  mov    %rsp,%rdx
  lea    0xd0(%rsp),%rdi
  mov    $0xa8,%ecx
  mov    $0x1,%esi
  call   <keccak_squeezeblocks@plt>
  mov    $0x0,%eax
  add    %r12,%rbp
L20:
  movzbl 0xd0(%rsp,%rax,1),%edx
  mov    %dl,0x0(%rbp,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rbx
  jne    L20
  jmp    L38
L44:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void shake128(unsigned char *output, unsigned long long outlen, const unsigned char *input, unsigned long long inlen) {
  uint64_t s[25];
  unsigned char t[168];
  unsigned long long nblocks = outlen / 168;
  size_t i;
  for (i = 0; i < 25; ++i)
    s[i] = 0;
  keccak_absorb(s, 168, input, inlen, 0x1F);
  keccak_squeezeblocks(output, nblocks, s, 168);
  output += nblocks * 168;
  outlen -= nblocks * 168;
  if (outlen) {
    keccak_squeezeblocks(t, 1, s, 168);
    for (i = 0; i < outlen; i++)
      output[i] = t[i];
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<shake128>:
  endbr64
  push   %r14
  mov    %rdx,%r9
  mov    %rcx,%r10
  mov    $0x19,%ecx
  push   %r13
  mov    $0x1f,%r8d
  movabs $0xc30c30c30c30c31,%rdx
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  shr    $0x3,%rbp
  mov    %rsi,%rbx
  mov    $0xa8,%esi
  sub    $0x180,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x178(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r13
  mov    %rbp,%rax
  mul    %rdx
  mov    %r13,%rdi
  xor    %eax,%eax
  rep stos %rax,%es:(%rdi)
  mov    %r10,%rcx
  mov    %r13,%rdi
  mov    %rdx,%rbp
  mov    %r9,%rdx
  call   <keccak_absorb@plt>
  mov    %ebp,%esi
  mov    $0xa8,%ecx
  mov    %r13,%rdx
  mov    %r12,%rdi
  call   <keccak_squeezeblocks@plt>
  lea    0x0(%rbp,%rbp,4),%rax
  lea    0x0(%rbp,%rax,4),%rbp
  shl    $0x3,%rbp
  sub    %rbp,%rbx
  jne    L79
L70:
  mov    0x178(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L56
  add    $0x180,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L79:
  mov    $0xa8,%ecx
  mov    %r13,%rdx
  mov    $0x1,%esi
  add    %rbp,%r12
  lea    0xd0(%rsp),%r14
  mov    %r14,%rdi
  call   <keccak_squeezeblocks@plt>
  cmp    $0x8,%ebx
  jae    L58
  test   $0x4,%bl
  jne    L43
  test   %ebx,%ebx
  je     L70
  movzbl 0xd0(%rsp),%eax
  mov    %al,(%r12)
  test   $0x2,%bl
  je     L70
  mov    %ebx,%ebx
  movzwl -0x2(%r14,%rbx,1),%eax
  mov    %ax,-0x2(%r12,%rbx,1)
  jmp    L70
  nopw   0x0(%rax,%rax,1)
L58:
  mov    0xd0(%rsp),%rax
  lea    0x8(%r12),%rdi
  mov    %r14,%rsi
  and    $0xfffffffffffffff8,%rdi
  mov    %rax,(%r12)
  mov    %ebx,%eax
  mov    -0x8(%r14,%rax,1),%rdx
  mov    %rdx,-0x8(%r12,%rax,1)
  sub    %rdi,%r12
  add    %r12d,%ebx
  sub    %r12,%rsi
  shr    $0x3,%ebx
  mov    %ebx,%ecx
  rep movsq %ds:(%rsi),%es:(%rdi)
  jmp    L70
L43:
  mov    0xd0(%rsp),%eax
  mov    %ebx,%ebx
  mov    %eax,(%r12)
  mov    -0x4(%r14,%rbx,1),%eax
  mov    %eax,-0x4(%r12,%rbx,1)
  jmp    L70
L56:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void shake128(unsigned char *output, unsigned long long outlen, const unsigned char *input, unsigned long long inlen) {
  uint64_t s[25];
  unsigned char t[168];
  unsigned long long nblocks = outlen / 168;
  size_t i;
  for (i = 0; i < 25; ++i)
    s[i] = 0;
  keccak_absorb(s, 168, input, inlen, 0x1F);
  keccak_squeezeblocks(output, nblocks, s, 168);
  output += nblocks * 168;
  outlen -= nblocks * 168;
  if (outlen) {
    keccak_squeezeblocks(t, 1, s, 168);
    for (i = 0; i < outlen; i++)
      output[i] = t[i];
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<shake128>:
  endbr64
  push   %r14
  mov    %rdx,%r9
  mov    %rcx,%r10
  mov    $0x19,%ecx
  push   %r13
  mov    $0x1f,%r8d
  movabs $0xc30c30c30c30c31,%rdx
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  shr    $0x3,%rbp
  mov    %rsi,%rbx
  mov    $0xa8,%esi
  sub    $0x180,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x178(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r13
  mov    %rbp,%rax
  mul    %rdx
  mov    %r13,%rdi
  xor    %eax,%eax
  rep stos %rax,%es:(%rdi)
  mov    %r10,%rcx
  mov    %r13,%rdi
  mov    %rdx,%rbp
  mov    %r9,%rdx
  call   <keccak_absorb@plt>
  mov    %ebp,%esi
  mov    $0xa8,%ecx
  mov    %r13,%rdx
  mov    %r12,%rdi
  call   <keccak_squeezeblocks@plt>
  lea    0x0(%rbp,%rbp,4),%rax
  lea    0x0(%rbp,%rax,4),%rbp
  shl    $0x3,%rbp
  sub    %rbp,%rbx
  jne    L73
L75:
  mov    0x178(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L51
  add    $0x180,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L73:
  mov    $0xa8,%ecx
  mov    %r13,%rdx
  mov    $0x1,%esi
  add    %rbp,%r12
  lea    0xd0(%rsp),%r14
  mov    %r14,%rdi
  call   <keccak_squeezeblocks@plt>
  cmp    $0x8,%ebx
  jae    L66
  test   $0x4,%bl
  jne    L3
  test   %ebx,%ebx
  je     L75
  movzbl 0xd0(%rsp),%eax
  mov    %al,(%r12)
  test   $0x2,%bl
  je     L75
  mov    %ebx,%ebx
  movzwl -0x2(%r14,%rbx,1),%eax
  mov    %ax,-0x2(%r12,%rbx,1)
  jmp    L75
  nopw   0x0(%rax,%rax,1)
L66:
  mov    0xd0(%rsp),%rax
  lea    0x8(%r12),%rdi
  mov    %r14,%rsi
  and    $0xfffffffffffffff8,%rdi
  mov    %rax,(%r12)
  mov    %ebx,%eax
  mov    -0x8(%r14,%rax,1),%rdx
  mov    %rdx,-0x8(%r12,%rax,1)
  sub    %rdi,%r12
  add    %r12d,%ebx
  sub    %r12,%rsi
  shr    $0x3,%ebx
  mov    %ebx,%ecx
  rep movsq %ds:(%rsi),%es:(%rdi)
  jmp    L75
L3:
  mov    0xd0(%rsp),%eax
  mov    %ebx,%ebx
  mov    %eax,(%r12)
  mov    -0x4(%r14,%rbx,1),%eax
  mov    %eax,-0x4(%r12,%rbx,1)
  jmp    L75
L51:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void shake128(unsigned char *output, unsigned long long outlen, const unsigned char *input, unsigned long long inlen) {
  uint64_t s[25];
  unsigned char t[168];
  unsigned long long nblocks = outlen / 168;
  size_t i;
  for (i = 0; i < 25; ++i)
    s[i] = 0;
  keccak_absorb(s, 168, input, inlen, 0x1F);
  keccak_squeezeblocks(output, nblocks, s, 168);
  output += nblocks * 168;
  outlen -= nblocks * 168;
  if (outlen) {
    keccak_squeezeblocks(t, 1, s, 168);
    for (i = 0; i < outlen; i++)
      output[i] = t[i];
  }
}
```