ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<dirname_a>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x18(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    $0x0,%ecx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <split@plt>
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jns    L17
  mov    $0x0,%eax
  jmp    L9
L17:
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L8
  mov    $0x0,%eax
  jmp    L9
L8:
  mov    -0x18(%rbp),%edx
  mov    -0x28(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x10(%rbp),%rax
L9:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L22
  call   <__stack_chk_fail@plt>
L22:
  leave
  ret
```

assistant: ```c
char *dirname_a(const char *path) {
  int dlen;
  int rc;
  char *d;
  rc = split(path, NULL, &dlen, NULL);
  if (rc < 0)
    return NULL;
  d = malloc(dlen + 1);
  if (d == NULL)
    return NULL;
  memcpy(d, path, dlen);
  d[dlen] = '\0';
  return d;
}
```
user: What is the c source code of the assembly code below:

```asm
<dirname_a>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rdx
  mov    $0x0,%ecx
  mov    $0x0,%esi
  call   <split@plt>
  mov    $0x0,%ebx
  test   %eax,%eax
  js     L8
  mov    0x4(%rsp),%eax
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L8
  mov    0x4(%rsp),%edx
  mov    %rbp,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movslq 0x4(%rsp),%rax
  movb   $0x0,(%rbx,%rax,1)
L8:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L22
  mov    %rbx,%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  ret
L22:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *dirname_a(const char *path) {
  int dlen;
  int rc;
  char *d;
  rc = split(path, NULL, &dlen, NULL);
  if (rc < 0)
    return NULL;
  d = malloc(dlen + 1);
  if (d == NULL)
    return NULL;
  memcpy(d, path, dlen);
  d[dlen] = '\0';
  return d;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<dirname_a>:
  endbr64
  push   %r12
  xor    %ecx,%ecx
  xor    %esi,%esi
  xor    %r12d,%r12d
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rdx
  call   <split@plt>
  test   %eax,%eax
  js     L9
  mov    0x4(%rsp),%eax
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L9
  mov    0x4(%rsp),%edx
  mov    %rbp,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movslq 0x4(%rsp),%rax
  movb   $0x0,(%r12,%rax,1)
L9:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  add    $0x18,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
L15:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *dirname_a(const char *path) {
  int dlen;
  int rc;
  char *d;
  rc = split(path, NULL, &dlen, NULL);
  if (rc < 0)
    return NULL;
  d = malloc(dlen + 1);
  if (d == NULL)
    return NULL;
  memcpy(d, path, dlen);
  d[dlen] = '\0';
  return d;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<dirname_a>:
  endbr64
  push   %r12
  xor    %ecx,%ecx
  xor    %esi,%esi
  xor    %r12d,%r12d
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rdx
  call   <split@plt>
  test   %eax,%eax
  js     L0
  mov    0x4(%rsp),%eax
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L0
  mov    0x4(%rsp),%edx
  mov    %rbp,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movslq 0x4(%rsp),%rax
  movb   $0x0,(%r12,%rax,1)
L0:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x18,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
L9:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *dirname_a(const char *path) {
  int dlen;
  int rc;
  char *d;
  rc = split(path, NULL, &dlen, NULL);
  if (rc < 0)
    return NULL;
  d = malloc(dlen + 1);
  if (d == NULL)
    return NULL;
  memcpy(d, path, dlen);
  d[dlen] = '\0';
  return d;
}
```
user: What is the c source code of the assembly code below?

```asm
<deleteShield>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L0
L14:
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%ecx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x4(%rbp)
L0:
  mov    -0x18(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x4(%rbp)
  jb     L14
  nop
  leave
  ret
```

assistant: ```c
void deleteShield(char *str) {
  for (unsigned int i = 0; i < strlen(str - 1); i++)
    str[i] = str[i + 1];
  return;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<deleteShield>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  mov    $0x0,%ebx
  lea    -0x1(%rdi),%r12
  jmp    L9
L12:
  lea    0x1(%rbx),%eax
  mov    %eax,%edx
  movzbl 0x0(%rbp,%rdx,1),%edx
  mov    %ebx,%ebx
  mov    %dl,0x0(%rbp,%rbx,1)
  mov    %eax,%ebx
L9:
  mov    %r12,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  ja     L12
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void deleteShield(char *str) {
  for (unsigned int i = 0; i < strlen(str - 1); i++)
    str[i] = str[i + 1];
  return;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<deleteShield>:
  endbr64
  push   %r12
  lea    -0x1(%rdi),%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  jmp    L10
  nopl   0x0(%rax,%rax,1)
L19:
  lea    0x1(%rbx),%edx
  mov    %rdx,%rax
  movzbl 0x0(%rbp,%rdx,1),%edx
  mov    %dl,0x0(%rbp,%rbx,1)
  mov    %eax,%ebx
L10:
  mov    %r12,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  ja     L19
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void deleteShield(char *str) {
  for (unsigned int i = 0; i < strlen(str - 1); i++)
    str[i] = str[i + 1];
  return;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<deleteShield>:
  endbr64
  push   %r12
  lea    -0x1(%rdi),%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  jmp    L15
  nopl   0x0(%rax,%rax,1)
L13:
  lea    0x1(%rbx),%edx
  mov    %rdx,%rax
  movzbl 0x0(%rbp,%rdx,1),%edx
  mov    %dl,0x0(%rbp,%rbx,1)
  mov    %eax,%ebx
L15:
  mov    %r12,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  ja     L13
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void deleteShield(char *str) {
  for (unsigned int i = 0; i < strlen(str - 1); i++)
    str[i] = str[i + 1];
  return;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<X509_check_trust>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  cmpl   $0xffffffff,-0x1c(%rbp)
  jne    L4
  mov    $0x1,%eax
  jmp    L79
L4:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L7
  mov    D17(%rip),%rax
  mov    (%rax),%eax
  mov    -0x18(%rbp),%rcx
  mov    $0x0,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <obj_trust@plt>
  mov    %eax,-0xc(%rbp)
  mov    D13(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0xc(%rbp)
  je     L16
  mov    -0xc(%rbp),%eax
  jmp    L79
L16:
  mov    -0x18(%rbp),%rax
  mov    $0x0,%edx
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <trust_compat@plt>
  jmp    L79
L7:
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <X509_TRUST_get_by_id@plt>
  mov    %eax,-0x10(%rbp)
  cmpl   $0xffffffff,-0x10(%rbp)
  jne    L40
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%rcx
  mov    -0x1c(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <default_trust@plt>
  jmp    L79
L40:
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <X509_TRUST_get0@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    (%rax),%r8
  mov    -0x20(%rbp),%edx
  mov    -0x18(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   *%r8
L79:
  leave
  ret
```

assistant: ```c
int X509_check_trust(X509 *x, int id, int flags) {
  X509_TRUST *pt;
  int idx;
  if (id == -1)
    return 1;
  if (id == 0) {
    int rv;
    rv = obj_trust(NID_anyExtendedKeyUsage, x, 0);
    if (rv != X509_TRUST_UNTRUSTED)
      return rv;
    return trust_compat(NULL, x, 0);
  }
  idx = X509_TRUST_get_by_id(id);
  if (idx == -1)
    return default_trust(id, x, flags);
  pt = X509_TRUST_get0(idx);
  return pt->check_trust(pt, x, flags);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<X509_check_trust>:
  endbr64
  mov    $0x1,%eax
  cmp    $0xffffffff,%esi
  je     L44
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  mov    %esi,%ebx
  mov    %edx,%r12d
  test   %esi,%esi
  jne    L48
  mov    $0x0,%edx
  mov    %rdi,%rsi
  mov    D8(%rip),%rax
  mov    (%rax),%edi
  call   <obj_trust@plt>
  mov    D9(%rip),%rdx
  cmp    %eax,(%rdx)
  je     L14
L57:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L14:
  mov    $0x0,%edx
  mov    %rbp,%rsi
  mov    $0x0,%edi
  call   <trust_compat@plt>
  jmp    L57
L48:
  mov    %esi,%edi
  call   <X509_TRUST_get_by_id@plt>
  mov    %eax,%edi
  cmp    $0xffffffff,%eax
  je     L36
  call   <X509_TRUST_get0@plt>
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %rax,%rdi
  call   *(%rax)
  jmp    L57
L36:
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <default_trust@plt>
  jmp    L57
L44:
  ret
```

assistant: ```c
int X509_check_trust(X509 *x, int id, int flags) {
  X509_TRUST *pt;
  int idx;
  if (id == -1)
    return 1;
  if (id == 0) {
    int rv;
    rv = obj_trust(NID_anyExtendedKeyUsage, x, 0);
    if (rv != X509_TRUST_UNTRUSTED)
      return rv;
    return trust_compat(NULL, x, 0);
  }
  idx = X509_TRUST_get_by_id(id);
  if (idx == -1)
    return default_trust(id, x, flags);
  pt = X509_TRUST_get0(idx);
  return pt->check_trust(pt, x, flags);
}
```
user: Translate the below assembly code into C programming language:

```asm
<X509_check_trust>:
  endbr64
  cmp    $0xffffffff,%esi
  je     L9
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  test   %esi,%esi
  jne    L16
  mov    D15(%rip),%rax
  mov    %rdi,%rsi
  xor    %edx,%edx
  mov    (%rax),%edi
  call   <obj_trust@plt>
  mov    D17(%rip),%rdx
  cmp    %eax,(%rdx)
  je     L18
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L16:
  mov    %esi,%edi
  mov    %edx,%r12d
  call   <X509_TRUST_get_by_id@plt>
  mov    %eax,%edi
  cmp    $0xffffffff,%eax
  je     L15
  call   <X509_TRUST_get0@plt>
  pop    %rbp
  mov    %r12d,%edx
  mov    %r13,%rsi
  mov    %rax,%rdi
  pop    %r12
  mov    (%rax),%rax
  pop    %r13
  jmp    *%rax
  nopl   0x0(%rax)
L9:
  mov    $0x1,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L15:
  mov    %r12d,%edx
  mov    %r13,%rsi
  mov    %ebp,%edi
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1090 <default_trust@plt>
  nopw   0x0(%rax,%rax,1)
L18:
  pop    %rbp
  mov    %r13,%rsi
  pop    %r12
  xor    %edx,%edx
  xor    %edi,%edi
  pop    %r13
  jmp    10a0 <trust_compat@plt>
```

assistant: ```c
int X509_check_trust(X509 *x, int id, int flags) {
  X509_TRUST *pt;
  int idx;
  if (id == -1)
    return 1;
  if (id == 0) {
    int rv;
    rv = obj_trust(NID_anyExtendedKeyUsage, x, 0);
    if (rv != X509_TRUST_UNTRUSTED)
      return rv;
    return trust_compat(NULL, x, 0);
  }
  idx = X509_TRUST_get_by_id(id);
  if (idx == -1)
    return default_trust(id, x, flags);
  pt = X509_TRUST_get0(idx);
  return pt->check_trust(pt, x, flags);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<X509_check_trust>:
  endbr64
  cmp    $0xffffffff,%esi
  je     L11
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  test   %esi,%esi
  jne    L25
  mov    D11(%rip),%rax
  mov    %rdi,%rsi
  xor    %edx,%edx
  mov    (%rax),%edi
  call   <obj_trust@plt>
  mov    D9(%rip),%rdx
  cmp    %eax,(%rdx)
  je     L34
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L25:
  mov    %esi,%edi
  mov    %edx,%r12d
  call   <X509_TRUST_get_by_id@plt>
  mov    %eax,%edi
  cmp    $0xffffffff,%eax
  je     L10
  call   <X509_TRUST_get0@plt>
  pop    %rbp
  mov    %r12d,%edx
  mov    %r13,%rsi
  mov    %rax,%rdi
  pop    %r12
  mov    (%rax),%rax
  pop    %r13
  jmp    *%rax
  nopl   0x0(%rax)
L11:
  mov    $0x1,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L10:
  mov    %r12d,%edx
  mov    %r13,%rsi
  mov    %ebp,%edi
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1090 <default_trust@plt>
  nopw   0x0(%rax,%rax,1)
L34:
  pop    %rbp
  mov    %r13,%rsi
  pop    %r12
  xor    %edx,%edx
  xor    %edi,%edi
  pop    %r13
  jmp    10a0 <trust_compat@plt>
```

assistant: ```c
int X509_check_trust(X509 *x, int id, int flags) {
  X509_TRUST *pt;
  int idx;
  if (id == -1)
    return 1;
  if (id == 0) {
    int rv;
    rv = obj_trust(NID_anyExtendedKeyUsage, x, 0);
    if (rv != X509_TRUST_UNTRUSTED)
      return rv;
    return trust_compat(NULL, x, 0);
  }
  idx = X509_TRUST_get_by_id(id);
  if (idx == -1)
    return default_trust(id, x, flags);
  pt = X509_TRUST_get0(idx);
  return pt->check_trust(pt, x, flags);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<lcd_reset>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <hw_i80_reset@plt>
  nop
L5:
  mov    $0x0,%eax
  call   <lcd_read_id@plt>
  cmp    $0x2049481,%eax
  jne    L5
  mov    $0x0,%eax
  call   <lcd_device_init@plt>
  nop
  pop    %rbp
  ret
```

assistant: ```c
void lcd_reset(void) {
  hw_i80_reset();
  while (0x02049481L != lcd_read_id())
    ;
  lcd_device_init();
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<lcd_reset>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <hw_i80_reset@plt>
L4:
  mov    $0x0,%eax
  call   <lcd_read_id@plt>
  cmp    $0x2049481,%eax
  jne    L4
  mov    $0x0,%eax
  call   <lcd_device_init@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void lcd_reset(void) {
  hw_i80_reset();
  while (0x02049481L != lcd_read_id())
    ;
  lcd_device_init();
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<lcd_reset>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <hw_i80_reset@plt>
  nop
L6:
  xor    %eax,%eax
  call   <lcd_read_id@plt>
  cmp    $0x2049481,%eax
  jne    L6
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1070 <lcd_device_init@plt>
```

assistant: ```c
void lcd_reset(void) {
  hw_i80_reset();
  while (0x02049481L != lcd_read_id())
    ;
  lcd_device_init();
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<lcd_reset>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <hw_i80_reset@plt>
  nop
L7:
  xor    %eax,%eax
  call   <lcd_read_id@plt>
  cmp    $0x2049481,%eax
  jne    L7
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1070 <lcd_device_init@plt>
```

assistant: ```c
void lcd_reset(void) {
  hw_i80_reset();
  while (0x02049481L != lcd_read_id())
    ;
  lcd_device_init();
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<r64dec1>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  movl   $0x0,-0x4(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L162
L208:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x8(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  jne    L148
  mov    $0x0,%eax
  jmp    L146
L148:
  cmpl   $0x40,-0x8(%rbp)
  jle    L44
  cmpl   $0x5a,-0x8(%rbp)
  jg     L44
  subl   $0x41,-0x8(%rbp)
  jmp    L87
L44:
  cmpl   $0x60,-0x8(%rbp)
  jle    L30
  cmpl   $0x7a,-0x8(%rbp)
  jg     L30
  subl   $0x47,-0x8(%rbp)
  jmp    L87
L30:
  cmpl   $0x2f,-0x8(%rbp)
  jle    L133
  cmpl   $0x39,-0x8(%rbp)
  jg     L133
  addl   $0x4,-0x8(%rbp)
  jmp    L87
L133:
  cmpl   $0x2b,-0x8(%rbp)
  jne    L178
  movl   $0x3e,-0x8(%rbp)
  jmp    L87
L178:
  cmpl   $0x2f,-0x8(%rbp)
  jne    L114
  movl   $0x3f,-0x8(%rbp)
  jmp    L87
L114:
  cmpl   $0x3d,-0x8(%rbp)
  je     L0
  cmpl   $0x2d,-0x8(%rbp)
  jne    L162
L0:
  movl   $0x0,-0x8(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  jne    L137
  mov    -0x28(%rbp),%rax
  movl   $0x3,(%rax)
  mov    -0x20(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  sub    $0x1,%rax
  jmp    L146
L137:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
L87:
  mov    -0x4(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  or     %edx,%eax
  mov    %eax,-0x4(%rbp)
  addl   $0x1,-0xc(%rbp)
L162:
  cmpl   $0x3,-0xc(%rbp)
  jle    L208
  mov    -0x20(%rbp),%rax
  mov    -0x4(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
L146:
  pop    %rbp
  ret
```

assistant: ```c
char *r64dec1(char *p, unsigned int *vp, int *eofp) {
  int i, x;
  unsigned int v = 0;
  for (i = 0; i < 4;) {
    x = *p++;
    if (!x)
      return 0;
    if (x >= 'A' && x <= 'Z')
      x -= 'A';
    else if (x >= 'a' && x <= 'z')
      x -= 'a' - 26;
    else if (x >= '0' && x <= '9')
      x -= '0' - 52;
    else if (x == '+')
      x = 62;
    else if (x == '/')
      x = 63;
    else if (x == '=' || x == '-') {
      x = 0;
      if (i == 0) {
        *eofp = 3;
        *vp = 0;
        return p - 1;
      }
      *eofp += 1;
    } else
      continue;
    v = v << 6 | x;
    i++;
  }
  *vp = v;
  return p;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<r64dec1>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rcx
  mov    %rsi,%r10
  mov    %rdx,%r9
  mov    $0x0,%esi
  mov    $0x0,%edi
  lea    D1(%rip),%r8
  mov    $0x3e,%ebx
  mov    $0x0,%r11d
  mov    $0x3f,%ebp
  jmp    L58
L130:
  cmp    $0x3d,%al
  jg     L5
  cmp    $0x2a,%al
  jle    L86
  sub    $0x2b,%eax
  cmp    $0x12,%al
  ja     L86
  movzbl %al,%eax
  movslq (%r8,%rax,4),%rax
  add    %r8,%rax
  notrack jmp *%rax
  mov    %ebp,%edx
  jmp    L30
L5:
  sub    $0x61,%eax
  sub    $0x47,%edx
  cmp    $0x19,%al
  ja     L86
L30:
  shl    $0x6,%esi
  or     %edx,%esi
  add    $0x1,%edi
L86:
  cmp    $0x3,%edi
  jg     L6
L58:
  mov    %rcx,%r13
  add    $0x1,%rcx
  movzbl -0x1(%rcx),%eax
  movsbl %al,%edx
  test   %edx,%edx
  je     L140
  mov    %edx,%r12d
  sub    $0x41,%r12d
  cmp    $0x19,%r12d
  ja     L130
  mov    %r12d,%edx
  jmp    L30
  add    $0x4,%edx
  jmp    L30
  test   %edi,%edi
  je     L71
  addl   $0x1,(%r9)
  mov    %r11d,%edx
  jmp    L30
L71:
  movl   $0x3,(%r9)
  movl   $0x0,(%r10)
  jmp    L102
  mov    %ebx,%edx
  jmp    L30
L6:
  mov    %esi,(%r10)
  mov    %rcx,%r13
L102:
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L140:
  mov    $0x0,%r13d
  jmp    L102
```

assistant: ```c
char *r64dec1(char *p, unsigned int *vp, int *eofp) {
  int i, x;
  unsigned int v = 0;
  for (i = 0; i < 4;) {
    x = *p++;
    if (!x)
      return 0;
    if (x >= 'A' && x <= 'Z')
      x -= 'A';
    else if (x >= 'a' && x <= 'z')
      x -= 'a' - 26;
    else if (x >= '0' && x <= '9')
      x -= '0' - 52;
    else if (x == '+')
      x = 62;
    else if (x == '/')
      x = 63;
    else if (x == '=' || x == '-') {
      x = 0;
      if (i == 0) {
        *eofp = 3;
        *vp = 0;
        return p - 1;
      }
      *eofp += 1;
    } else
      continue;
    v = v << 6 | x;
    i++;
  }
  *vp = v;
  return p;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<r64dec1>:
  endbr64
  push   %r12
  mov    %rsi,%r10
  mov    %rdi,%rcx
  mov    %rdx,%r11
  xor    %esi,%esi
  xor    %r8d,%r8d
  lea    D1(%rip),%r9
  nopl   0x0(%rax,%rax,1)
L57:
  mov    %rcx,%r12
  movsbl (%rcx),%edi
  add    $0x1,%rcx
  mov    %edi,%eax
  test   %edi,%edi
  je     L43
  lea    -0x41(%rdi),%edx
  cmp    $0x19,%edx
  jbe    L105
  cmp    $0x3d,%dil
  jg     L104
  cmp    $0x2a,%dil
  jle    L88
  sub    $0x2b,%eax
  cmp    $0x12,%al
  ja     L88
  movzbl %al,%eax
  movslq (%r9,%rax,4),%rax
  add    %r9,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
  lea    0x4(%rdi),%edx
  nopl   0x0(%rax,%rax,1)
L105:
  shl    $0x6,%esi
  add    $0x1,%r8d
  or     %edx,%esi
L88:
  cmp    $0x4,%r8d
  jne    L57
  mov    %esi,(%r10)
  mov    %rcx,%r12
L92:
  mov    %r12,%rax
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
  test   %r8d,%r8d
  je     L41
  addl   $0x1,(%r11)
  xor    %edx,%edx
  jmp    L105
  nopl   (%rax)
L104:
  sub    $0x61,%eax
  lea    -0x47(%rdi),%edx
  cmp    $0x19,%al
  jbe    L105
  jmp    L88
  nopl   0x0(%rax)
  mov    $0x3e,%edx
  jmp    L105
  nop
  mov    $0x3f,%edx
  jmp    L105
  nopw   0x0(%rax,%rax,1)
L43:
  xor    %r12d,%r12d
  mov    %r12,%rax
  pop    %r12
  ret
L41:
  movl   $0x3,(%r11)
  movl   $0x0,(%r10)
  jmp    L92
```

assistant: ```c
char *r64dec1(char *p, unsigned int *vp, int *eofp) {
  int i, x;
  unsigned int v = 0;
  for (i = 0; i < 4;) {
    x = *p++;
    if (!x)
      return 0;
    if (x >= 'A' && x <= 'Z')
      x -= 'A';
    else if (x >= 'a' && x <= 'z')
      x -= 'a' - 26;
    else if (x >= '0' && x <= '9')
      x -= '0' - 52;
    else if (x == '+')
      x = 62;
    else if (x == '/')
      x = 63;
    else if (x == '=' || x == '-') {
      x = 0;
      if (i == 0) {
        *eofp = 3;
        *vp = 0;
        return p - 1;
      }
      *eofp += 1;
    } else
      continue;
    v = v << 6 | x;
    i++;
  }
  *vp = v;
  return p;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<r64dec1>:
  endbr64
  push   %r12
  mov    %rsi,%r10
  mov    %rdi,%rcx
  mov    %rdx,%r11
  xor    %esi,%esi
  xor    %r8d,%r8d
  lea    D9(%rip),%r9
  nopl   0x0(%rax,%rax,1)
L118:
  mov    %rcx,%r12
  movsbl (%rcx),%edi
  add    $0x1,%rcx
  mov    %edi,%eax
  test   %edi,%edi
  je     L105
  lea    -0x41(%rdi),%edx
  cmp    $0x19,%edx
  jbe    L23
  cmp    $0x3d,%dil
  jg     L55
  cmp    $0x2a,%dil
  jle    L126
  sub    $0x2b,%eax
  cmp    $0x12,%al
  ja     L126
  movzbl %al,%eax
  movslq (%r9,%rax,4),%rax
  add    %r9,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
  lea    0x4(%rdi),%edx
  nopl   0x0(%rax,%rax,1)
L23:
  shl    $0x6,%esi
  add    $0x1,%r8d
  or     %edx,%esi
L126:
  cmp    $0x4,%r8d
  jne    L118
  mov    %esi,(%r10)
  mov    %rcx,%r12
L69:
  mov    %r12,%rax
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
  test   %r8d,%r8d
  je     L36
  addl   $0x1,(%r11)
  xor    %edx,%edx
  jmp    L23
  nopl   (%rax)
L55:
  sub    $0x61,%eax
  lea    -0x47(%rdi),%edx
  cmp    $0x19,%al
  jbe    L23
  jmp    L126
  nopl   0x0(%rax)
  mov    $0x3e,%edx
  jmp    L23
  nop
  mov    $0x3f,%edx
  jmp    L23
  nopw   0x0(%rax,%rax,1)
L105:
  xor    %r12d,%r12d
  mov    %r12,%rax
  pop    %r12
  ret
L36:
  movl   $0x3,(%r11)
  movl   $0x0,(%r10)
  jmp    L69
```

assistant: ```c
char *r64dec1(char *p, unsigned int *vp, int *eofp) {
  int i, x;
  unsigned int v = 0;
  for (i = 0; i < 4;) {
    x = *p++;
    if (!x)
      return 0;
    if (x >= 'A' && x <= 'Z')
      x -= 'A';
    else if (x >= 'a' && x <= 'z')
      x -= 'a' - 26;
    else if (x >= '0' && x <= '9')
      x -= '0' - 52;
    else if (x == '+')
      x = 62;
    else if (x == '/')
      x = 63;
    else if (x == '=' || x == '-') {
      x = 0;
      if (i == 0) {
        *eofp = 3;
        *vp = 0;
        return p - 1;
      }
      *eofp += 1;
    } else
      continue;
    v = v << 6 | x;
    i++;
  }
  *vp = v;
  return p;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <InitApp@plt>
L6:
  jmp    L6
```

assistant: ```c
int32_t main(void) {
  InitApp();
  while (1) {
  }
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <InitApp@plt>
L0:
  jmp    L0
```

assistant: ```c
int32_t main(void) {
  InitApp();
  while (1) {
  }
}
```