ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请从给定的汇编指令推导出C源代码:

```asm
<test_crypto_aead>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,(%rsp)
  mov    %rsi,0x8(%rsp)
  mov    %rdx,%r12
  mov    %rcx,%r13
  mov    %r8,%r14
  mov    %r9,%r15
  mov    0x68(%rsp),%ebx
  add    0x58(%rsp),%rbx
  mov    %rbx,%rdi
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    %rbx,%rdi
  call   <malloc@plt>
  mov    %rax,%rbx
  push   %rax
  push   %rbp
  mov    0x78(%rsp),%eax
  push   %rax
  push   0x78(%rsp)
  push   0x78(%rsp)
  push   0x78(%rsp)
  mov    %r15,%r9
  mov    %r14,%r8
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    0x38(%rsp),%rsi
  mov    0x30(%rsp),%rdi
  call   <do_test_crypto_aead@plt>
  mov    %eax,%r12d
  add    $0x30,%rsp
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %rbx,%rdi
  call   <free@plt>
  mov    %r12d,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int test_crypto_aead(const unsigned char *key, unsigned long long keyLen, const unsigned char *nonce, unsigned long long nonceLen, const unsigned char *AD, unsigned long long ADlen, const unsigned char *plaintext, unsigned long long plaintextLen, const unsigned char *ciphertext, unsigned int tagLen) {
  unsigned char *temp1 = malloc(plaintextLen + tagLen);
  unsigned char *temp2 = malloc(plaintextLen + tagLen);
  int retcode = do_test_crypto_aead(key, keyLen, nonce, nonceLen, AD, ADlen, plaintext, plaintextLen, ciphertext, tagLen, temp1, temp2);
  free(temp1);
  free(temp2);
  return retcode;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<test_crypto_aead>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %r8,%rbx
  sub    $0x18,%rsp
  mov    0x68(%rsp),%ebp
  add    0x58(%rsp),%rbp
  mov    %rcx,0x8(%rsp)
  mov    %rbp,%rdi
  mov    %r9,(%rsp)
  call   <malloc@plt>
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <malloc@plt>
  mov    %rbx,%r8
  mov    %r13,%rdx
  mov    %r15,%rsi
  push   %rax
  mov    %rax,%rbp
  mov    %r14,%rdi
  push   %r12
  mov    0x78(%rsp),%eax
  push   %rax
  push   0x78(%rsp)
  push   0x78(%rsp)
  push   0x78(%rsp)
  mov    0x30(%rsp),%r9
  mov    0x38(%rsp),%rcx
  call   <do_test_crypto_aead@plt>
  add    $0x30,%rsp
  mov    %r12,%rdi
  mov    %eax,%r13d
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  add    $0x18,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int test_crypto_aead(const unsigned char *key, unsigned long long keyLen, const unsigned char *nonce, unsigned long long nonceLen, const unsigned char *AD, unsigned long long ADlen, const unsigned char *plaintext, unsigned long long plaintextLen, const unsigned char *ciphertext, unsigned int tagLen) {
  unsigned char *temp1 = malloc(plaintextLen + tagLen);
  unsigned char *temp2 = malloc(plaintextLen + tagLen);
  int retcode = do_test_crypto_aead(key, keyLen, nonce, nonceLen, AD, ADlen, plaintext, plaintextLen, ciphertext, tagLen, temp1, temp2);
  free(temp1);
  free(temp2);
  return retcode;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<test_crypto_aead>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %r8,%rbx
  sub    $0x18,%rsp
  mov    0x68(%rsp),%ebp
  add    0x58(%rsp),%rbp
  mov    %rcx,0x8(%rsp)
  mov    %rbp,%rdi
  mov    %r9,(%rsp)
  call   <malloc@plt>
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <malloc@plt>
  mov    %rbx,%r8
  mov    %r13,%rdx
  mov    %r15,%rsi
  push   %rax
  mov    %rax,%rbp
  mov    %r14,%rdi
  push   %r12
  mov    0x78(%rsp),%eax
  push   %rax
  push   0x78(%rsp)
  push   0x78(%rsp)
  push   0x78(%rsp)
  mov    0x30(%rsp),%r9
  mov    0x38(%rsp),%rcx
  call   <do_test_crypto_aead@plt>
  add    $0x30,%rsp
  mov    %r12,%rdi
  mov    %eax,%r13d
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  add    $0x18,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int test_crypto_aead(const unsigned char *key, unsigned long long keyLen, const unsigned char *nonce, unsigned long long nonceLen, const unsigned char *AD, unsigned long long ADlen, const unsigned char *plaintext, unsigned long long plaintextLen, const unsigned char *ciphertext, unsigned int tagLen) {
  unsigned char *temp1 = malloc(plaintextLen + tagLen);
  unsigned char *temp2 = malloc(plaintextLen + tagLen);
  int retcode = do_test_crypto_aead(key, keyLen, nonce, nonceLen, AD, ADlen, plaintext, plaintextLen, ciphertext, tagLen, temp1, temp2);
  free(temp1);
  free(temp2);
  return retcode;
}
```
user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x2,-0x30(%rbp)
  movl   $0x1,-0x2c(%rbp)
  movl   $0x8,-0x28(%rbp)
  movl   $0x3,-0x24(%rbp)
  movl   $0x9,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  movl   $0x4,-0x18(%rbp)
  movl   $0x6,-0x14(%rbp)
  movl   $0x7,-0x10(%rbp)
  movl   $0x5,-0xc(%rbp)
  movl   $0xa,-0x34(%rbp)
  mov    -0x34(%rbp),%edx
  lea    -0x30(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <shell_sort2@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

assistant: ```c
int main(void) {
  int arr[] = {2, 1, 8, 3, 9, 0, 4, 6, 7, 5};
  int length = 10;
  shell_sort2(arr, length);
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<main>:
  endbr64
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movl   $0x2,(%rsp)
  movl   $0x1,0x4(%rsp)
  movl   $0x8,0x8(%rsp)
  movl   $0x3,0xc(%rsp)
  movl   $0x9,0x10(%rsp)
  movl   $0x0,0x14(%rsp)
  movl   $0x4,0x18(%rsp)
  movl   $0x6,0x1c(%rsp)
  movl   $0x7,0x20(%rsp)
  movl   $0x5,0x24(%rsp)
  mov    %rsp,%rdi
  mov    $0xa,%esi
  call   <shell_sort2@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  mov    $0x0,%eax
  add    $0x38,%rsp
  ret
L1:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int main(void) {
  int arr[] = {2, 1, 8, 3, 9, 0, 4, 6, 7, 5};
  int length = 10;
  shell_sort2(arr, length);
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  sub    $0x38,%rsp
  mov    $0xa,%esi
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  movabs $0x100000002,%rax
  mov    %rsp,%rdi
  movq   $0x9,0x10(%rsp)
  mov    %rax,(%rsp)
  movabs $0x300000008,%rax
  mov    %rax,0x8(%rsp)
  movabs $0x600000004,%rax
  mov    %rax,0x18(%rsp)
  movabs $0x500000007,%rax
  mov    %rax,0x20(%rsp)
  call   <shell_sort2@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  xor    %eax,%eax
  add    $0x38,%rsp
  ret
L1:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int main(void) {
  int arr[] = {2, 1, 8, 3, 9, 0, 4, 6, 7, 5};
  int length = 10;
  shell_sort2(arr, length);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  sub    $0x38,%rsp
  movdqa D26(%rip),%xmm0
  mov    $0xa,%esi
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    D13(%rip),%rax
  mov    %rsp,%rdi
  movaps %xmm0,(%rsp)
  movdqa D29(%rip),%xmm0
  mov    %rax,0x20(%rsp)
  movaps %xmm0,0x10(%rsp)
  call   <shell_sort2@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  xor    %eax,%eax
  add    $0x38,%rsp
  ret
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D26
type_guessed: byte[16]
name: unpack_data
arguments: label: D13
type_guessed: byte[8]
name: unpack_data
arguments: label: D29
type_guessed: byte[16]

tool: {"D26": [0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

tool: {"D13": [0x07,0x00,0x00,0x00,0x05,0x00,0x00,0x00]}

tool: {"D29": [0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00]}

assistant: ```c
int main(void) {
  int arr[] = {2, 1, 8, 3, 9, 0, 4, 6, 7, 5};
  int length = 10;
  shell_sort2(arr, length);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<ServeHeaderTable>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D67(%rip),%rdi
  call   <puts@plt>
  lea    D3(%rip),%r12
  mov    %r12,%rdi
  call   <puts@plt>
  lea    D57(%rip),%rdi
  call   <puts@plt>
  lea    D10(%rip),%rbx
  mov    %rbx,%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  call   <puts@plt>
  mov    %rbp,%rsi
  lea    D23(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D73(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rbp
  mov    %rbp,%rdi
  call   <time@plt>
  mov    %eax,0x4(%rsp)
  mov    %rbp,%rdi
  call   <localtime@plt>
  lea    D75(%rip),%rdi
  call   <getenv@plt>
  mov    %rax,%rsi
  lea    D99(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <ctime@plt>
  mov    %rax,%rsi
  lea    D34(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D63(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L5:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D67
datatype: string
name: retrieve_data
arguments: label: D3
datatype: string
name: retrieve_data
arguments: label: D57
datatype: string
name: retrieve_data
arguments: label: D10
datatype: string
name: retrieve_data
arguments: label: D23
datatype: string
name: retrieve_data
arguments: label: D73
datatype: string
name: retrieve_data
arguments: label: D75
datatype: string
name: retrieve_data
arguments: label: D99
datatype: string
name: retrieve_data
arguments: label: D34
datatype: string
name: retrieve_data
arguments: label: D63
datatype: string

tool: D67: <table width="760" border="0" cellspacing="0" cellpadding="0">

tool: D3: <tr align="center">

tool: D57: <td width="760" colspan="2"><h1>The Linux Audio Backstop</h1></td>

tool: D10: </tr>

tool: D23: <td width="760" colspan="2"><h2>%s</h2></td>


tool: D73: <tr>

tool: D75: HTTP_HOST

tool: D99: <td width="380" align="left"><h4>Hostname: %s</h4></td>

tool: D34: <td width="380" align="right"><h4>%s</h4></td>


tool: D63: </table>

assistant: ```c
void ServeHeaderTable(char *sSubHead) {
  time_t tTime;
  struct tm tmTime;
  printf("<table width=\"760\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n");
  printf("<tr align=\"center\">\n");
  printf("<td width=\"760\" colspan=\"2\"><h1>The Linux Audio Backstop</h1></td>\n");
  printf("</tr>\n");
  printf("<tr align=\"center\">\n");
  printf("<td width=\"760\" colspan=\"2\"><h2>%s</h2></td>\n", sSubHead);
  printf("</tr>\n");
  printf("<tr>\n");
  tTime = time(&tTime);
  tmTime = *localtime(&tTime);
  printf("<td width=\"380\" align=\"left\"><h4>Hostname: %s</h4></td>", getenv("HTTP_HOST"));
  printf("<td width=\"380\" align=\"right\"><h4>%s</h4></td>\n", ctime(&tTime));
  printf("</tr>\n");
  printf("</table>\n");
}
```
user: What is the c source code of the assembly code below?

```asm
<ServeHeaderTable>:
  endbr64
  push   %r13
  lea    D52(%rip),%r13
  push   %r12
  mov    %rdi,%r12
  lea    D0(%rip),%rdi
  push   %rbp
  lea    D97(%rip),%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <puts@plt>
  mov    %r13,%rdi
  call   <puts@plt>
  lea    D50(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  mov    %r13,%rdi
  call   <puts@plt>
  mov    %r12,%rsi
  lea    D70(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    0x4(%rsp),%r12
  call   <puts@plt>
  lea    D2(%rip),%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  call   <time@plt>
  mov    %r12,%rdi
  mov    %eax,0x4(%rsp)
  call   <localtime@plt>
  lea    D40(%rip),%rdi
  call   <getenv@plt>
  lea    D73(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12,%rdi
  call   <ctime@plt>
  lea    D41(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  lea    D29(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x10,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D52
type_guessed: string
name: read_data
arguments: label: D0
type_guessed: string
name: read_data
arguments: label: D97
type_guessed: string
name: read_data
arguments: label: D50
type_guessed: string
name: read_data
arguments: label: D70
type_guessed: string
name: read_data
arguments: label: D2
type_guessed: string
name: read_data
arguments: label: D40
type_guessed: string
name: read_data
arguments: label: D73
type_guessed: string
name: read_data
arguments: label: D41
type_guessed: string
name: read_data
arguments: label: D29
type_guessed: string

tool: D52: <tr align="center">

tool: D0: <table width="760" border="0" cellspacing="0" cellpadding="0">

tool: D97: </tr>

tool: D50: <td width="760" colspan="2"><h1>The Linux Audio Backstop</h1></td>

tool: D70: <td width="760" colspan="2"><h2>%s</h2></td>


tool: D2: <tr>

tool: D40: HTTP_HOST

tool: D73: <td width="380" align="left"><h4>Hostname: %s</h4></td>

tool: D41: <td width="380" align="right"><h4>%s</h4></td>


tool: D29: </table>

assistant: ```c
void ServeHeaderTable(char *sSubHead) {
  time_t tTime;
  struct tm tmTime;
  printf("<table width=\"760\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n");
  printf("<tr align=\"center\">\n");
  printf("<td width=\"760\" colspan=\"2\"><h1>The Linux Audio Backstop</h1></td>\n");
  printf("</tr>\n");
  printf("<tr align=\"center\">\n");
  printf("<td width=\"760\" colspan=\"2\"><h2>%s</h2></td>\n", sSubHead);
  printf("</tr>\n");
  printf("<tr>\n");
  tTime = time(&tTime);
  tmTime = *localtime(&tTime);
  printf("<td width=\"380\" align=\"left\"><h4>Hostname: %s</h4></td>", getenv("HTTP_HOST"));
  printf("<td width=\"380\" align=\"right\"><h4>%s</h4></td>\n", ctime(&tTime));
  printf("</tr>\n");
  printf("</table>\n");
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<ServeHeaderTable>:
  endbr64
  push   %r13
  lea    D76(%rip),%r13
  push   %r12
  mov    %rdi,%r12
  lea    D42(%rip),%rdi
  push   %rbp
  lea    D63(%rip),%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <puts@plt>
  mov    %r13,%rdi
  call   <puts@plt>
  lea    D55(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  mov    %r13,%rdi
  call   <puts@plt>
  mov    %r12,%rsi
  lea    D79(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    0x4(%rsp),%r12
  call   <puts@plt>
  lea    D89(%rip),%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  call   <time@plt>
  mov    %r12,%rdi
  mov    %eax,0x4(%rsp)
  call   <localtime@plt>
  lea    D58(%rip),%rdi
  call   <getenv@plt>
  lea    D21(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12,%rdi
  call   <ctime@plt>
  lea    D98(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  lea    D84(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x10,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D76
type_guessed: string
name: parse_data
arguments: data_tag: D42
type_guessed: string
name: parse_data
arguments: data_tag: D63
type_guessed: string
name: parse_data
arguments: data_tag: D55
type_guessed: string
name: parse_data
arguments: data_tag: D79
type_guessed: string
name: parse_data
arguments: data_tag: D89
type_guessed: string
name: parse_data
arguments: data_tag: D58
type_guessed: string
name: parse_data
arguments: data_tag: D21
type_guessed: string
name: parse_data
arguments: data_tag: D98
type_guessed: string
name: parse_data
arguments: data_tag: D84
type_guessed: string

tool: D76: <tr align="center">

tool: D42: <table width="760" border="0" cellspacing="0" cellpadding="0">

tool: D63: </tr>

tool: D55: <td width="760" colspan="2"><h1>The Linux Audio Backstop</h1></td>

tool: D79: <td width="760" colspan="2"><h2>%s</h2></td>


tool: D89: <tr>

tool: D58: HTTP_HOST

tool: D21: <td width="380" align="left"><h4>Hostname: %s</h4></td>

tool: D98: <td width="380" align="right"><h4>%s</h4></td>


tool: D84: </table>

assistant: ```c
void ServeHeaderTable(char *sSubHead) {
  time_t tTime;
  struct tm tmTime;
  printf("<table width=\"760\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n");
  printf("<tr align=\"center\">\n");
  printf("<td width=\"760\" colspan=\"2\"><h1>The Linux Audio Backstop</h1></td>\n");
  printf("</tr>\n");
  printf("<tr align=\"center\">\n");
  printf("<td width=\"760\" colspan=\"2\"><h2>%s</h2></td>\n", sSubHead);
  printf("</tr>\n");
  printf("<tr>\n");
  tTime = time(&tTime);
  tmTime = *localtime(&tTime);
  printf("<td width=\"380\" align=\"left\"><h4>Hostname: %s</h4></td>", getenv("HTTP_HOST"));
  printf("<td width=\"380\" align=\"right\"><h4>%s</h4></td>\n", ctime(&tTime));
  printf("</tr>\n");
  printf("</table>\n");
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<upc_e_to_a>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    $0x20,%esi
  call   <strchr@plt>
  test   %rax,%rax
  je     L32
  sub    %ebx,%eax
L26:
  cmp    $0x7,%eax
  je     L83
  cmp    $0x8,%eax
  je     L102
  mov    $0x0,%ebp
  cmp    $0x6,%eax
  je     L49
L23:
  mov    %rbp,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L32:
  mov    %rbx,%rdi
  call   <strlen@plt>
  jmp    L26
L49:
  mov    %rbx,%rdi
  call   <upc_e_to_a0@plt>
  mov    %eax,%esi
  lea    D29(%rip),%rbp
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L23
L83:
  movzbl (%rbx),%eax
  sub    $0x30,%eax
  cmp    $0x1,%al
  jbe    L24
  mov    %rbx,%rdi
  call   <upc_e_to_a0@plt>
  mov    %eax,%esi
  lea    D29(%rip),%rbp
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <ean_make_checksum@plt>
  mov    %eax,%edx
  movzbl 0x6(%rbx),%eax
  sub    $0x30,%eax
  cmp    %edx,%eax
  mov    $0x0,%eax
  cmove  %rbp,%rax
  mov    %rax,%rbp
  jmp    L23
L24:
  lea    0x1(%rbx),%rdi
  call   <upc_e_to_a0@plt>
  mov    %eax,%esi
  lea    D29(%rip),%rbp
  mov    %rbp,%rdi
  call   <strcpy@plt>
  movzbl (%rbx),%eax
  mov    %al,D53(%rip)
  jmp    L23
L102:
  movzbl (%rbx),%eax
  sub    $0x30,%eax
  mov    $0x0,%ebp
  cmp    $0x1,%al
  ja     L23
  lea    0x1(%rbx),%rdi
  call   <upc_e_to_a0@plt>
  mov    %eax,%esi
  lea    D53(%rip),%rbp
  mov    %rbp,%rdi
  call   <strcpy@plt>
  movzbl (%rbx),%eax
  mov    %al,D53(%rip)
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <ean_make_checksum@plt>
  mov    %eax,%edx
  movzbl 0x7(%rbx),%eax
  sub    $0x30,%eax
  cmp    %edx,%eax
  mov    $0x0,%eax
  cmove  %rbp,%rax
  mov    %rax,%rbp
  jmp    L23
```

assistant: ```c
char *upc_e_to_a(unsigned char *text) {
  static unsigned char result[16], *spc;
  int len, chk;
  spc = strchr(text, ' ');
  if (spc)
    len = spc - text;
  else
    len = strlen(text);
  switch (len) {
  case 6:
    strcpy(result, upc_e_to_a0(text));
    return result;
  case 7:
    if (text[0] == '0' || text[0] == '1') {
      strcpy(result, upc_e_to_a0(text + 1));
      result[0] = text[0];
      return result;
    }
    strcpy(result, upc_e_to_a0(text));
    chk = ean_make_checksum(result, 0);
    if (chk == (text[len - 1] - '0'))
      return result;
    return NULL;
  case 8:
    if (text[0] == '0' || text[0] == '1') {
      strcpy(result, upc_e_to_a0(text + 1));
      result[0] = text[0];
      chk = ean_make_checksum(result, 0);
      if (chk == (text[len - 1] - '0'))
        return result;
    }
  default:
    return NULL;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<upc_e_to_a>:
  endbr64
  push   %r12
  mov    $0x20,%esi
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  call   <strchr@plt>
  test   %rax,%rax
  je     L27
  sub    %ebp,%eax
L19:
  cmp    $0x7,%eax
  je     L83
  cmp    $0x8,%eax
  je     L100
  xor    %r8d,%r8d
  cmp    $0x6,%eax
  je     L37
L10:
  pop    %rbx
  mov    %r8,%rax
  pop    %rbp
  pop    %r12
  ret
  xchg   %ax,%ax
L83:
  movzbl 0x0(%rbp),%eax
  sub    $0x30,%eax
  cmp    $0x1,%al
  jbe    L102
  mov    %rbp,%rdi
  lea    D61(%rip),%r12
  call   <upc_e_to_a0@plt>
  mov    %r12,%rdi
  mov    %eax,%esi
  call   <strcpy@plt>
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <ean_make_checksum@plt>
  mov    %eax,%r8d
  movzbl 0x6(%rbp),%eax
  sub    $0x30,%eax
  cmp    %r8d,%eax
  jne    L34
L74:
  lea    D61(%rip),%r8
  pop    %rbx
  pop    %rbp
  mov    %r8,%rax
  pop    %r12
  ret
L37:
  mov    %rbp,%rdi
  lea    D61(%rip),%rbp
  call   <upc_e_to_a0@plt>
  mov    %rbp,%rdi
  mov    %eax,%esi
  call   <strcpy@plt>
  mov    %rbp,%r8
  pop    %rbx
  pop    %rbp
  mov    %r8,%rax
  pop    %r12
  ret
  nopl   0x0(%rax)
L100:
  movzbl 0x0(%rbp),%eax
  sub    $0x30,%eax
  cmp    $0x1,%al
  jbe    L9
L34:
  xor    %r8d,%r8d
  pop    %rbx
  pop    %rbp
  mov    %r8,%rax
  pop    %r12
  ret
  xchg   %ax,%ax
L9:
  lea    0x1(%rbp),%rdi
  lea    D61(%rip),%r12
  call   <upc_e_to_a0@plt>
  mov    %r12,%rdi
  mov    %eax,%esi
  call   <strcpy@plt>
  movzbl 0x0(%rbp),%eax
  xor    %esi,%esi
  mov    %r12,%rdi
  mov    %al,D69(%rip)
  call   <ean_make_checksum@plt>
  mov    %eax,%r8d
  movzbl 0x7(%rbp),%eax
  sub    $0x30,%eax
  cmp    %r8d,%eax
  jne    L34
  jmp    L74
  nopw   0x0(%rax,%rax,1)
L102:
  lea    0x1(%rbp),%rdi
  lea    D69(%rip),%rbx
  call   <upc_e_to_a0@plt>
  mov    %rbx,%rdi
  mov    %eax,%esi
  call   <strcpy@plt>
  movzbl 0x0(%rbp),%eax
  mov    %rbx,%r8
  mov    %al,D69(%rip)
  jmp    L10
  nopl   0x0(%rax)
L27:
  mov    %rbp,%rdi
  call   <strlen@plt>
  jmp    L19
```

assistant: ```c
char *upc_e_to_a(unsigned char *text) {
  static unsigned char result[16], *spc;
  int len, chk;
  spc = strchr(text, ' ');
  if (spc)
    len = spc - text;
  else
    len = strlen(text);
  switch (len) {
  case 6:
    strcpy(result, upc_e_to_a0(text));
    return result;
  case 7:
    if (text[0] == '0' || text[0] == '1') {
      strcpy(result, upc_e_to_a0(text + 1));
      result[0] = text[0];
      return result;
    }
    strcpy(result, upc_e_to_a0(text));
    chk = ean_make_checksum(result, 0);
    if (chk == (text[len - 1] - '0'))
      return result;
    return NULL;
  case 8:
    if (text[0] == '0' || text[0] == '1') {
      strcpy(result, upc_e_to_a0(text + 1));
      result[0] = text[0];
      chk = ean_make_checksum(result, 0);
      if (chk == (text[len - 1] - '0'))
        return result;
    }
  default:
    return NULL;
  }
}
```