ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Demonstrate the C code that generates the assembly output below:

```asm
<my_is_prime>:
  endbr64
  cmp    $0x2,%edi
  je     L28
  xor    %edx,%edx
  test   $0x1,%dil
  je     L44
L28:
  xor    %edx,%edx
  cmp    $0x1,%edi
  jle    L44
  cmp    $0x8,%edi
  jle    L73
  movslq %edi,%rdx
  mov    %edi,%eax
  imul   $0x55555556,%rdx,%rdx
  sar    $0x1f,%eax
  shr    $0x20,%rdx
  sub    %eax,%edx
  lea    (%rdx,%rdx,2),%eax
  mov    %edi,%edx
  sub    %eax,%edx
  je     L44
  mov    $0x3,%ecx
  jmp    L35
  nopw   0x0(%rax,%rax,1)
L67:
  mov    %edi,%eax
  cltd
  idiv   %ecx
  test   %edx,%edx
  je     L44
L35:
  add    $0x2,%ecx
  mov    %ecx,%eax
  imul   %ecx,%eax
  cmp    %edi,%eax
  jle    L67
L73:
  mov    $0x1,%edx
L44:
  mov    %edx,%eax
  ret
```

assistant: ```c
int my_is_prime(int nb) {
  int i;
  i = 0;
  if ((nb % 2 == 0 && nb != 2) || nb <= 1)
    return (0);
  i = 3;
  while (i * i <= nb) {
    if ((nb % i) == 0)
      return (0);
    i += 2;
  }
  return (1);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<basefile>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    -0x10(%rbp),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <memrchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L0
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    -0x10(%rbp),%rdx
  add    %rdx,%rax
  cmp    %rax,-0x8(%rbp)
  jne    L15
  mov    -0x10(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L0
L15:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x10(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memmove@plt>
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    -0x10(%rbp),%rdx
  add    %rdx,%rax
  movb   $0x0,(%rax)
L0:
  mov    -0x10(%rbp),%rax
  leave
  ret
```

assistant: ```c
char *basefile(char *path) {
  char *base;
  char *p;
  base = strdup(path);
  p = memrchr(base, '/', strlen(base));
  if (p != NULL) {
    if (base + strlen(p) == p) {
      base[0] = '\0';
    } else {
      memmove(base, p + 1, strlen(p + 1));
      base[strlen(p + 1)] = '\0';
    }
  }
  return base;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<basefile>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <strdup@plt>
  mov    %rax,%rbx
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    $0x2f,%esi
  mov    %rbx,%rdi
  call   <memrchr@plt>
  test   %rax,%rax
  je     L15
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %rbx,%rax
  cmp    %rax,%rbp
  je     L12
  add    $0x1,%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <memmove@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  movb   $0x0,(%rbx,%rax,1)
L15:
  mov    %rbx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L12:
  movb   $0x0,(%rbx)
  jmp    L15
```

assistant: ```c
char *basefile(char *path) {
  char *base;
  char *p;
  base = strdup(path);
  p = memrchr(base, '/', strlen(base));
  if (p != NULL) {
    if (base + strlen(p) == p) {
      base[0] = '\0';
    } else {
      memmove(base, p + 1, strlen(p + 1));
      base[strlen(p + 1)] = '\0';
    }
  }
  return base;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<basefile>:
  endbr64
  push   %r12
  push   %rbp
  sub    $0x8,%rsp
  call   <strdup@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <strlen@plt>
  mov    $0x2f,%esi
  mov    %r12,%rdi
  mov    %rax,%rdx
  call   <memrchr@plt>
  test   %rax,%rax
  je     L4
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <strlen@plt>
  add    %r12,%rax
  cmp    %rax,%rbp
  je     L18
  add    $0x1,%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    %rax,%rdx
  call   <memmove@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  movb   $0x0,(%r12,%rax,1)
L4:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L18:
  movb   $0x0,(%r12)
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
char *basefile(char *path) {
  char *base;
  char *p;
  base = strdup(path);
  p = memrchr(base, '/', strlen(base));
  if (p != NULL) {
    if (base + strlen(p) == p) {
      base[0] = '\0';
    } else {
      memmove(base, p + 1, strlen(p + 1));
      base[strlen(p + 1)] = '\0';
    }
  }
  return base;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<basefile>:
  endbr64
  push   %r12
  push   %rbp
  sub    $0x8,%rsp
  call   <strdup@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <strlen@plt>
  mov    $0x2f,%esi
  mov    %r12,%rdi
  mov    %rax,%rdx
  call   <memrchr@plt>
  test   %rax,%rax
  je     L14
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <strlen@plt>
  add    %r12,%rax
  cmp    %rax,%rbp
  je     L11
  add    $0x1,%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    %rax,%rdx
  call   <memmove@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  movb   $0x0,(%r12,%rax,1)
L14:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L11:
  movb   $0x0,(%r12)
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
char *basefile(char *path) {
  char *base;
  char *p;
  base = strdup(path);
  p = memrchr(base, '/', strlen(base));
  if (p != NULL) {
    if (base + strlen(p) == p) {
      base[0] = '\0';
    } else {
      memmove(base, p + 1, strlen(p + 1));
      base[strlen(p + 1)] = '\0';
    }
  }
  return base;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<MultiplicaEZ>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x28(%rbp),%rcx
  lea    -0x14(%rbp),%rax
  mov    $0x6,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0xf(%rbp)
  mov    -0x30(%rbp),%rcx
  lea    -0xe(%rbp),%rax
  mov    $0x6,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x9(%rbp)
  lea    -0x14(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x1c(%rbp)
  lea    -0xe(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  imul   -0x18(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

assistant: ```c
int MultiplicaEZ(char m1[], char m2[]) {
  char subm1[6];
  strncpy(subm1, m1, 6);
  subm1[5] = '\0';
  char subm2[6];
  strncpy(subm2, m2, 6);
  subm2[5] = '\0';
  int im1 = atoi(subm1);
  int im2 = atoi(subm2);
  return (im1 * im2);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<MultiplicaEZ>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%r12
  mov    $0x6,%edx
  mov    %rdi,%rsi
  mov    %r12,%rdi
  call   <strncpy@plt>
  movb   $0x0,0x11(%rsp)
  lea    0x12(%rsp),%rbp
  mov    $0x6,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <strncpy@plt>
  movb   $0x0,0x17(%rsp)
  mov    %r12,%rdi
  call   <atoi@plt>
  mov    %eax,%ebx
  mov    %rbp,%rdi
  call   <atoi@plt>
  imul   %ebx,%eax
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L8
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L8:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int MultiplicaEZ(char m1[], char m2[]) {
  char subm1[6];
  strncpy(subm1, m1, 6);
  subm1[5] = '\0';
  char subm2[6];
  strncpy(subm2, m2, 6);
  subm2[5] = '\0';
  int im1 = atoi(subm1);
  int im2 = atoi(subm2);
  return (im1 * im2);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<MultiplicaEZ>:
  endbr64
  push   %r13
  mov    $0x6,%edx
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  mov    %rdi,%rsi
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%r13
  lea    0x12(%rsp),%r12
  mov    %r13,%rdi
  call   <strncpy@plt>
  mov    $0x6,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  movb   $0x0,0x11(%rsp)
  call   <strncpy@plt>
  mov    %r13,%rdi
  movb   $0x0,0x17(%rsp)
  call   <atoi@plt>
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <atoi@plt>
  imul   %ebx,%eax
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L2
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L2:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int MultiplicaEZ(char m1[], char m2[]) {
  char subm1[6];
  strncpy(subm1, m1, 6);
  subm1[5] = '\0';
  char subm2[6];
  strncpy(subm2, m2, 6);
  subm2[5] = '\0';
  int im1 = atoi(subm1);
  int im2 = atoi(subm2);
  return (im1 * im2);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<MultiplicaEZ>:
  endbr64
  push   %r13
  mov    $0x6,%edx
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  mov    %rdi,%rsi
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%r13
  lea    0x12(%rsp),%r12
  mov    %r13,%rdi
  call   <strncpy@plt>
  mov    $0x6,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  movb   $0x0,0x11(%rsp)
  call   <strncpy@plt>
  mov    %r13,%rdi
  movb   $0x0,0x17(%rsp)
  call   <atoi@plt>
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <atoi@plt>
  imul   %ebx,%eax
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L1
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L1:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int MultiplicaEZ(char m1[], char m2[]) {
  char subm1[6];
  strncpy(subm1, m1, 6);
  subm1[5] = '\0';
  char subm2[6];
  strncpy(subm2, m2, 6);
  subm2[5] = '\0';
  int im1 = atoi(subm1);
  int im2 = atoi(subm2);
  return (im1 * im2);
}
```
user: What is the c source code of the assembly code below:

```asm
<sort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movb   $0x0,-0x9(%rbp)
  jmp    L30
L25:
  movb   $0x1,-0x9(%rbp)
  movl   $0x1,-0x8(%rbp)
  jmp    L49
L1:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L46
  movb   $0x0,-0x9(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
L46:
  addl   $0x1,-0x8(%rbp)
L49:
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L1
L30:
  cmpb   $0x1,-0x9(%rbp)
  jne    L25
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void sort(int *array, int sz) {
  int i;
  unsigned char done = 0;
  int c;
  while (done != 1) {
    done = 1;
    for (i = 1; i < sz - 1; i++) {
      if (array[i] < array[i - 1]) {
        done = 0;
        c = array[i];
        array[i] = array[i - 1];
        array[i - 1] = c;
      }
    }
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<sort>:
  endbr64
  lea    -0x3(%rsi),%eax
  lea    0x4(%rdi,%rax,4),%r8
  mov    $0x1,%r11d
  mov    $0x0,%r10d
  jmp    L0
L36:
  add    $0x4,%rax
  cmp    %r8,%rax
  je     L30
L23:
  mov    0x4(%rax),%edx
  mov    (%rax),%ecx
  cmp    %ecx,%edx
  jge    L36
  mov    %ecx,0x4(%rax)
  mov    %edx,(%rax)
  mov    %r10d,%r9d
  jmp    L36
L30:
  cmp    $0x1,%r9b
  je     L15
L0:
  cmp    $0x2,%esi
  jle    L15
  mov    %rdi,%rax
  mov    %r11d,%r9d
  jmp    L23
L15:
  ret
```

assistant: ```c
void sort(int *array, int sz) {
  int i;
  unsigned char done = 0;
  int c;
  while (done != 1) {
    done = 1;
    for (i = 1; i < sz - 1; i++) {
      if (array[i] < array[i - 1]) {
        done = 0;
        c = array[i];
        array[i] = array[i - 1];
        array[i - 1] = c;
      }
    }
  }
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<sort>:
  endbr64
  lea    -0x1(%rsi),%r8d
  mov    $0x1,%r9d
  mov    $0x1,%edx
  nopl   0x0(%rax,%rax,1)
L6:
  cmp    %r8d,%edx
  jge    L34
L67:
  movslq %edx,%rax
  lea    (%rdi,%rax,4),%rax
L19:
  mov    (%rax),%ecx
  mov    -0x4(%rax),%esi
  add    $0x1,%edx
  cmp    %esi,%ecx
  jge    L6
  mov    %esi,(%rax)
  xor    %r9d,%r9d
  add    $0x4,%rax
  mov    %ecx,-0x8(%rax)
  cmp    %edx,%r8d
  jg     L19
  mov    $0x1,%edx
  mov    $0x1,%r9d
  cmp    %r8d,%edx
  jl     L67
  nopl   0x0(%rax)
L34:
  cmp    $0x1,%r9b
  jne    L52
L24:
  ret
  nop
L52:
  cmp    $0x1,%r8d
  jle    L24
  mov    $0x1,%r9d
  mov    $0x1,%edx
  jmp    L67
```

assistant: ```c
void sort(int *array, int sz) {
  int i;
  unsigned char done = 0;
  int c;
  while (done != 1) {
    done = 1;
    for (i = 1; i < sz - 1; i++) {
      if (array[i] < array[i - 1]) {
        done = 0;
        c = array[i];
        array[i] = array[i - 1];
        array[i - 1] = c;
      }
    }
  }
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<sort>:
  endbr64
  lea    -0x1(%rsi),%r8d
  mov    $0x1,%r9d
  mov    $0x1,%edx
  nopl   0x0(%rax,%rax,1)
L46:
  cmp    %edx,%r8d
  jle    L33
L43:
  movslq %edx,%rax
  lea    (%rdi,%rax,4),%rcx
L59:
  movq   -0x4(%rcx),%xmm0
  add    $0x1,%edx
  pshufd $0xe5,%xmm0,%xmm2
  movd   %xmm0,%esi
  movd   %xmm2,%eax
  pshufd $0xe1,%xmm0,%xmm1
  cmp    %eax,%esi
  jle    L46
  movq   %xmm1,-0x4(%rcx)
  xor    %r9d,%r9d
  add    $0x4,%rcx
  cmp    %edx,%r8d
  jg     L59
  mov    $0x1,%edx
  mov    $0x1,%r9d
  cmp    %edx,%r8d
  jg     L43
  nopl   0x0(%rax,%rax,1)
L33:
  cmp    $0x1,%r9b
  jne    L66
L68:
  ret
  nop
L66:
  cmp    $0x1,%r8d
  jle    L68
  mov    $0x1,%r9d
  mov    $0x1,%edx
  jmp    L43
```

assistant: ```c
void sort(int *array, int sz) {
  int i;
  unsigned char done = 0;
  int c;
  while (done != 1) {
    done = 1;
    for (i = 1; i < sz - 1; i++) {
      if (array[i] < array[i - 1]) {
        done = 0;
        c = array[i];
        array[i] = array[i - 1];
        array[i - 1] = c;
      }
    }
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<RandomFunc>:
  endbr64
  mov    %rsi,%rdx
  movzbl (%rdi),%eax
  sub    $0x6b,%eax
  mov    %eax,%ecx
  shr    $0x3,%cl
  test   $0x8,%al
  je     L23
  movzbl %al,%esi
  test   $0x1,%al
  je     L8
  shl    $0x3,%esi
  and    $0x78,%esi
  or     %eax,%esi
  lea    0x0(,%rsi,4),%eax
  and    $0x1c,%eax
  or     %esi,%eax
  jmp    L34
L8:
  mov    %eax,%r8d
  and    $0xe,%r8d
  or     $0x1,%r8d
  mov    $0x8,%ecx
  sub    %r8d,%ecx
  mov    %esi,%edi
  sar    %cl,%edi
  mov    %r8d,%ecx
  shl    %cl,%esi
  or     %esi,%edi
  shl    $0x4,%edi
  or     %eax,%edi
  shl    $0x4,%eax
  or     %edi,%eax
  jmp    L34
L23:
  movzbl %al,%esi
  and    $0x6,%ecx
  or     $0x1,%ecx
  sar    %cl,%esi
  shl    $0x3,%esi
  or     %esi,%eax
  mov    %eax,%ecx
  shr    $0x4,%cl
  and    $0xe,%ecx
  or     $0x1,%ecx
  rol    %cl,%al
L34:
  sub    $0x7e,%eax
  mov    %al,(%rdx)
  ret
```

assistant: ```c
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  {
    state[0UL] = (input[0UL] - 51238316UL) - (unsigned char)191;
    if ((state[0UL] >> (unsigned char)3) & (unsigned char)1) {
      if (state[0UL] & (unsigned char)1) {
        if (state[0UL] & (unsigned char)1) {
          state[0UL] |= (state[0UL] & (unsigned char)15) << 3UL;
          state[0UL] |= (state[0UL] & (unsigned char)7) << 2UL;
        } else {
          state[0UL] |= (state[0UL] & (unsigned char)15) << 3UL;
          state[0UL] |= (((state[0UL] >> ((state[0UL] & (unsigned char)15) | 1UL)) | (state[0UL] << (8 - ((state[0UL] & (unsigned char)15) | 1UL)))) & (unsigned char)31) << 4UL;
        }
      } else if ((state[0UL] >> (unsigned char)3) & (unsigned char)1) {
        state[0UL] |= (((state[0UL] << ((state[0UL] & (unsigned char)15) | 1UL)) | (state[0UL] >> (8 - ((state[0UL] & (unsigned char)15) | 1UL)))) & (unsigned char)63) << 4UL;
        state[0UL] |= (state[0UL] & (unsigned char)63) << 4UL;
      } else {
        state[0UL] = (state[0UL] >> (((state[0UL] >> (unsigned char)4) & (unsigned char)15) | 1UL)) | (state[0UL] << (8 - (((state[0UL] >> (unsigned char)4) & (unsigned char)15) | 1UL)));
        state[0UL] |= (state[0UL] & (unsigned char)31) << 4UL;
      }
    } else {
      state[0UL] |= ((state[0UL] >> (((state[0UL] >> (unsigned char)3) & (unsigned char)7) | 1UL)) & (unsigned char)31) << 3UL;
      state[0UL] = (state[0UL] << (((state[0UL] >> (unsigned char)4) & (unsigned char)15) | 1UL)) | (state[0UL] >> (8 - (((state[0UL] >> (unsigned char)4) & (unsigned char)15) | 1UL)));
    }
    output[0UL] = state[0UL] - (unsigned char)126;
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<RandomFunc>:
  endbr64
  movzbl (%rdi),%eax
  sub    $0x6b,%eax
  mov    %eax,%ecx
  movzbl %al,%edx
  shr    $0x3,%cl
  test   $0x8,%al
  je     L19
  test   $0x1,%al
  je     L1
  shl    $0x3,%edx
  and    $0x78,%edx
  or     %eax,%edx
  lea    0x0(,%rdx,4),%eax
  and    $0x1c,%eax
  or     %edx,%eax
  sub    $0x7e,%eax
  mov    %al,(%rsi)
  ret
  nopl   0x0(%rax)
L19:
  and    $0x6,%ecx
  or     $0x1,%ecx
  sar    %cl,%edx
  shl    $0x3,%edx
  or     %edx,%eax
  mov    %eax,%ecx
  shr    $0x4,%cl
  and    $0xe,%ecx
  or     $0x1,%ecx
  rol    %cl,%al
  sub    $0x7e,%eax
  mov    %al,(%rsi)
  ret
  nopl   0x0(%rax,%rax,1)
L1:
  mov    %eax,%r8d
  mov    $0x8,%ecx
  and    $0xe,%r8d
  or     $0x1,%r8d
  movzbl %r8b,%edi
  sub    %edi,%ecx
  mov    %edx,%edi
  sar    %cl,%edi
  mov    %r8d,%ecx
  shl    %cl,%edx
  or     %edx,%edi
  shl    $0x4,%edi
  or     %eax,%edi
  shl    $0x4,%eax
  or     %edi,%eax
  sub    $0x7e,%eax
  mov    %al,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  {
    state[0UL] = (input[0UL] - 51238316UL) - (unsigned char)191;
    if ((state[0UL] >> (unsigned char)3) & (unsigned char)1) {
      if (state[0UL] & (unsigned char)1) {
        if (state[0UL] & (unsigned char)1) {
          state[0UL] |= (state[0UL] & (unsigned char)15) << 3UL;
          state[0UL] |= (state[0UL] & (unsigned char)7) << 2UL;
        } else {
          state[0UL] |= (state[0UL] & (unsigned char)15) << 3UL;
          state[0UL] |= (((state[0UL] >> ((state[0UL] & (unsigned char)15) | 1UL)) | (state[0UL] << (8 - ((state[0UL] & (unsigned char)15) | 1UL)))) & (unsigned char)31) << 4UL;
        }
      } else if ((state[0UL] >> (unsigned char)3) & (unsigned char)1) {
        state[0UL] |= (((state[0UL] << ((state[0UL] & (unsigned char)15) | 1UL)) | (state[0UL] >> (8 - ((state[0UL] & (unsigned char)15) | 1UL)))) & (unsigned char)63) << 4UL;
        state[0UL] |= (state[0UL] & (unsigned char)63) << 4UL;
      } else {
        state[0UL] = (state[0UL] >> (((state[0UL] >> (unsigned char)4) & (unsigned char)15) | 1UL)) | (state[0UL] << (8 - (((state[0UL] >> (unsigned char)4) & (unsigned char)15) | 1UL)));
        state[0UL] |= (state[0UL] & (unsigned char)31) << 4UL;
      }
    } else {
      state[0UL] |= ((state[0UL] >> (((state[0UL] >> (unsigned char)3) & (unsigned char)7) | 1UL)) & (unsigned char)31) << 3UL;
      state[0UL] = (state[0UL] << (((state[0UL] >> (unsigned char)4) & (unsigned char)15) | 1UL)) | (state[0UL] >> (8 - (((state[0UL] >> (unsigned char)4) & (unsigned char)15) | 1UL)));
    }
    output[0UL] = state[0UL] - (unsigned char)126;
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<RandomFunc>:
  endbr64
  movzbl (%rdi),%eax
  sub    $0x6b,%eax
  mov    %eax,%ecx
  movzbl %al,%edx
  shr    $0x3,%cl
  test   $0x8,%al
  je     L11
  test   $0x1,%al
  je     L8
  shl    $0x3,%edx
  and    $0x78,%edx
  or     %eax,%edx
  lea    0x0(,%rdx,4),%eax
  and    $0x1c,%eax
  or     %edx,%eax
  sub    $0x7e,%eax
  mov    %al,(%rsi)
  ret
  nopl   0x0(%rax)
L11:
  and    $0x6,%ecx
  or     $0x1,%ecx
  sar    %cl,%edx
  shl    $0x3,%edx
  or     %edx,%eax
  mov    %eax,%ecx
  shr    $0x4,%cl
  and    $0xe,%ecx
  or     $0x1,%ecx
  rol    %cl,%al
  sub    $0x7e,%eax
  mov    %al,(%rsi)
  ret
  nopl   0x0(%rax,%rax,1)
L8:
  mov    %eax,%r8d
  mov    $0x8,%ecx
  and    $0xe,%r8d
  or     $0x1,%r8d
  movzbl %r8b,%edi
  sub    %edi,%ecx
  mov    %edx,%edi
  sar    %cl,%edi
  mov    %r8d,%ecx
  shl    %cl,%edx
  or     %edx,%edi
  shl    $0x4,%edi
  or     %eax,%edi
  shl    $0x4,%eax
  or     %edi,%eax
  sub    $0x7e,%eax
  mov    %al,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  {
    state[0UL] = (input[0UL] - 51238316UL) - (unsigned char)191;
    if ((state[0UL] >> (unsigned char)3) & (unsigned char)1) {
      if (state[0UL] & (unsigned char)1) {
        if (state[0UL] & (unsigned char)1) {
          state[0UL] |= (state[0UL] & (unsigned char)15) << 3UL;
          state[0UL] |= (state[0UL] & (unsigned char)7) << 2UL;
        } else {
          state[0UL] |= (state[0UL] & (unsigned char)15) << 3UL;
          state[0UL] |= (((state[0UL] >> ((state[0UL] & (unsigned char)15) | 1UL)) | (state[0UL] << (8 - ((state[0UL] & (unsigned char)15) | 1UL)))) & (unsigned char)31) << 4UL;
        }
      } else if ((state[0UL] >> (unsigned char)3) & (unsigned char)1) {
        state[0UL] |= (((state[0UL] << ((state[0UL] & (unsigned char)15) | 1UL)) | (state[0UL] >> (8 - ((state[0UL] & (unsigned char)15) | 1UL)))) & (unsigned char)63) << 4UL;
        state[0UL] |= (state[0UL] & (unsigned char)63) << 4UL;
      } else {
        state[0UL] = (state[0UL] >> (((state[0UL] >> (unsigned char)4) & (unsigned char)15) | 1UL)) | (state[0UL] << (8 - (((state[0UL] >> (unsigned char)4) & (unsigned char)15) | 1UL)));
        state[0UL] |= (state[0UL] & (unsigned char)31) << 4UL;
      }
    } else {
      state[0UL] |= ((state[0UL] >> (((state[0UL] >> (unsigned char)3) & (unsigned char)7) | 1UL)) & (unsigned char)31) << 3UL;
      state[0UL] = (state[0UL] << (((state[0UL] >> (unsigned char)4) & (unsigned char)15) | 1UL)) | (state[0UL] >> (8 - (((state[0UL] >> (unsigned char)4) & (unsigned char)15) | 1UL)));
    }
    output[0UL] = state[0UL] - (unsigned char)126;
  }
}
```