ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<kth_smallest>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  mov    %rdi,-0x30(%rbp)
  mov    %esi,-0x34(%rbp)
  mov    %edx,-0x38(%rbp)
  mov    $0x0,%r14d
  mov    -0x34(%rbp),%eax
  lea    -0x1(%rax),%r13d
  jmp    L2
L34:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%r15
  mov    %r14d,%r12d
  mov    %r13d,%ebx
  jmp    L67
L89:
  add    $0x1,%r12d
L67:
  movslq %r12d,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  cmp    %rax,%r15
  jg     L89
  jmp    L86
L1:
  sub    $0x1,%ebx
L86:
  movslq %ebx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  cmp    %rax,%r15
  jl     L1
  cmp    %ebx,%r12d
  jg     L70
  movslq %r12d,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rsi
  movslq %ebx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movslq %r12d,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  movslq %ebx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rsi,(%rax)
  add    $0x1,%r12d
  sub    $0x1,%ebx
L70:
  cmp    %ebx,%r12d
  jle    L67
  cmp    -0x38(%rbp),%ebx
  jge    L50
  mov    %r12d,%r14d
L50:
  cmp    %r12d,-0x38(%rbp)
  jge    L2
  mov    %ebx,%r13d
L2:
  cmp    %r13d,%r14d
  jl     L34
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
uint32_t kth_smallest(uint32_t a[], int n, int k) {
  register int i, j, l, m;
  register uint32_t x;
  l = 0;
  m = n - 1;
  while (l < m) {
    x = a[k];
    i = l;
    j = m;
    do {
      while (a[i] < x)
        i++;
      while (x < a[j])
        j--;
      if (i <= j) {
        {
          register uint32_t t = (a[i]);
          (a[i]) = (a[j]);
          (a[j]) = t;
        };
        i++;
        j--;
      }
    } while (i <= j);
    if (j < k)
      l = i;
    if (k < i)
      m = j;
  }
  return a[k];
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<kth_smallest>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  mov    %edx,%r15d
  lea    -0x1(%rsi),%r14d
  test   %r14d,%r14d
  jle    L58
  movslq %edx,%rax
  lea    (%rdi,%rax,8),%rax
  mov    %rax,-0x8(%rsp)
  mov    $0x0,%r13d
  jmp    L71
L78:
  mov    %rcx,0x0(%rbp)
  mov    %r11,(%rdi)
  mov    %r10d,%ebx
  sub    $0x1,%edx
  cmp    %edx,%r10d
  jg     L99
L5:
  add    $0x8,%r8
  add    $0x1,%r10d
  add    $0x1,%r9d
L67:
  mov    %r9d,%ebx
  mov    %r8,%rbp
  mov    (%r8),%r11
  cmp    %rsi,%r11
  jl     L5
  movslq %edx,%rax
  lea    (%r12,%rax,8),%rdi
  mov    (%rdi),%rcx
  cmp    %rcx,%rsi
  jge    L21
  lea    -0x8(%r12,%rax,8),%rax
L0:
  sub    $0x1,%edx
  mov    %rax,%rdi
  sub    $0x8,%rax
  mov    0x8(%rax),%rcx
  cmp    %rsi,%rcx
  jg     L0
L21:
  cmp    %edx,%ebx
  jle    L78
L99:
  cmp    %edx,%r15d
  jg     L94
  cmp    %ebx,%r15d
  cmovl  %edx,%r14d
L83:
  cmp    %r13d,%r14d
  jle    L58
L71:
  mov    -0x8(%rsp),%rax
  mov    (%rax),%rsi
  movslq %r13d,%rax
  lea    (%r12,%rax,8),%r8
  mov    %r13d,%r9d
  lea    0x1(%r13),%r10d
  mov    %r14d,%edx
  jmp    L67
L94:
  cmp    %ebx,%r15d
  jl     L58
  mov    %ebx,%r13d
  jmp    L83
L58:
  movslq %r15d,%r15
  mov    (%r12,%r15,8),%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
uint32_t kth_smallest(uint32_t a[], int n, int k) {
  register int i, j, l, m;
  register uint32_t x;
  l = 0;
  m = n - 1;
  while (l < m) {
    x = a[k];
    i = l;
    j = m;
    do {
      while (a[i] < x)
        i++;
      while (x < a[j])
        j--;
      if (i <= j) {
        {
          register uint32_t t = (a[i]);
          (a[i]) = (a[j]);
          (a[j]) = t;
        };
        i++;
        j--;
      }
    } while (i <= j);
    if (j < k)
      l = i;
    if (k < i)
      m = j;
  }
  return a[k];
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<kth_smallest>:
  endbr64
  push   %r15
  movslq %edx,%rax
  push   %r14
  lea    (%rdi,%rax,8),%r15
  push   %r13
  lea    -0x1(%rsi),%r13d
  push   %r12
  push   %rbp
  push   %rbx
  test   %r13d,%r13d
  jle    L64
  mov    %rdi,%rbp
  mov    %rax,%r14
  xor    %r12d,%r12d
  nopw   0x0(%rax,%rax,1)
L70:
  movslq %r12d,%rax
  mov    (%r15),%rdi
  mov    %r12d,%r8d
  lea    0x1(%r12),%r10d
  lea    0x0(%rbp,%rax,8),%r9
  mov    %r13d,%edx
  movslq %r13d,%rax
  nopl   0x0(%rax)
L79:
  mov    (%r9),%r11
  lea    0x0(%rbp,%rax,8),%rsi
  mov    %r8d,%ebx
  mov    (%rsi),%rcx
  cmp    %rdi,%r11
  jl     L73
  cmp    %rcx,%rdi
  jge    L65
  lea    -0x8(%rbp,%rax,8),%rax
  nopl   (%rax)
L49:
  mov    %rax,%rsi
  mov    (%rax),%rcx
  sub    $0x8,%rax
  sub    $0x1,%edx
  cmp    %rdi,%rcx
  jg     L49
L65:
  cmp    %edx,%r8d
  jle    L44
L63:
  cmp    %edx,%r14d
  cmovg  %ebx,%r12d
  cmp    %ebx,%r14d
  cmovl  %edx,%r13d
  cmp    %r12d,%r13d
  jg     L70
L64:
  pop    %rbx
  mov    (%r15),%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L44:
  sub    $0x1,%edx
  mov    %rcx,(%r9)
  mov    %r10d,%ebx
  mov    %r11,(%rsi)
  cmp    %edx,%r10d
  jg     L63
  movslq %edx,%rax
L73:
  add    $0x8,%r9
  add    $0x1,%r10d
  add    $0x1,%r8d
  jmp    L79
```

assistant: ```c
uint32_t kth_smallest(uint32_t a[], int n, int k) {
  register int i, j, l, m;
  register uint32_t x;
  l = 0;
  m = n - 1;
  while (l < m) {
    x = a[k];
    i = l;
    j = m;
    do {
      while (a[i] < x)
        i++;
      while (x < a[j])
        j--;
      if (i <= j) {
        {
          register uint32_t t = (a[i]);
          (a[i]) = (a[j]);
          (a[j]) = t;
        };
        i++;
        j--;
      }
    } while (i <= j);
    if (j < k)
      l = i;
    if (k < i)
      m = j;
  }
  return a[k];
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<kth_smallest>:
  endbr64
  push   %r15
  movslq %edx,%rax
  push   %r14
  lea    (%rdi,%rax,8),%r15
  mov    %rax,%r14
  push   %r13
  lea    -0x1(%rsi),%r13d
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  test   %r13d,%r13d
  jle    L94
  nopw   0x0(%rax,%rax,1)
L34:
  movslq %r12d,%rax
  mov    (%r15),%rdi
  mov    %r12d,%r8d
  lea    0x1(%r12),%r10d
  lea    0x0(%rbp,%rax,8),%r9
  mov    %r13d,%edx
  movslq %r13d,%rax
  nopl   0x0(%rax)
L99:
  mov    (%r9),%r11
  lea    0x0(%rbp,%rax,8),%rsi
  mov    %r8d,%ebx
  mov    (%rsi),%rcx
  cmp    %rdi,%r11
  jl     L38
  cmp    %rcx,%rdi
  jge    L7
  lea    -0x8(%rbp,%rax,8),%rax
  nopl   (%rax)
L0:
  mov    %rax,%rsi
  mov    (%rax),%rcx
  sub    $0x8,%rax
  sub    $0x1,%edx
  cmp    %rdi,%rcx
  jg     L0
L7:
  cmp    %edx,%r8d
  jle    L104
L37:
  cmp    %edx,%r14d
  cmovg  %ebx,%r12d
  cmp    %ebx,%r14d
  jl     L69
  cmp    %r13d,%r12d
  jl     L34
L94:
  pop    %rbx
  mov    (%r15),%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L104:
  sub    $0x1,%edx
  mov    %rcx,(%r9)
  mov    %r10d,%ebx
  mov    %r11,(%rsi)
  cmp    %edx,%r10d
  jg     L37
  movslq %edx,%rax
L38:
  add    $0x8,%r9
  add    $0x1,%r10d
  add    $0x1,%r8d
  jmp    L99
L69:
  cmp    %edx,%r12d
  jge    L94
  mov    %edx,%r13d
  jmp    L34
```

assistant: ```c
uint32_t kth_smallest(uint32_t a[], int n, int k) {
  register int i, j, l, m;
  register uint32_t x;
  l = 0;
  m = n - 1;
  while (l < m) {
    x = a[k];
    i = l;
    j = m;
    do {
      while (a[i] < x)
        i++;
      while (x < a[j])
        j--;
      if (i <= j) {
        {
          register uint32_t t = (a[i]);
          (a[i]) = (a[j]);
          (a[j]) = t;
        };
        i++;
        j--;
      }
    } while (i <= j);
    if (j < k)
      l = i;
    if (k < i)
      m = j;
  }
  return a[k];
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<matches_pattern>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  jmp    L60
L62:
  cmpq   $0x0,-0x18(%rbp)
  jne    L42
  mov    $0x0,%eax
  jmp    L17
L42:
  mov    -0x18(%rbp),%rcx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x2,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  mov    %edx,-0x4(%rbp)
  mov    -0x18(%rbp),%rcx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    $0x2,%rax
  sar    $0x3f,%rcx
  mov    %rcx,%rdx
  sub    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5f,%al
  je     L22
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    -0x4(%rbp),%edx
  add    $0x30,%edx
  cmp    %edx,%eax
  je     L22
  mov    $0x0,%eax
  jmp    L17
L22:
  subq   $0x1,-0x28(%rbp)
L60:
  mov    -0x28(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jae    L62
  cmpq   $0x0,-0x18(%rbp)
  sete   %al
  movzbl %al,%eax
L17:
  pop    %rbp
  ret
```

assistant: ```c
bool matches_pattern(long num, const char *pattern, const char *tail_ptr) {
  while (tail_ptr >= pattern) {
    if (num == 0)
      return false;
    int digit = num % 10;
    num /= 10;
    if (*tail_ptr != '_' && *tail_ptr != (digit + '0'))
      return false;
    tail_ptr--;
  }
  return num == 0;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<matches_pattern>:
  endbr64
  mov    %rsi,%r10
  mov    %rdx,%r8
  cmp    %rsi,%rdx
  jb     L42
  movabs $0x6666666666666667,%r9
  test   %rdi,%rdi
  jne    L53
  mov    $0x0,%eax
  ret
L56:
  sub    $0x1,%r8
  cmp    %r8,%r10
  ja     L42
  test   %rcx,%rcx
  je     L51
L53:
  mov    %rdi,%rsi
  mov    %rdi,%rax
  imul   %r9
  sar    $0x2,%rdx
  sar    $0x3f,%rdi
  mov    %rdx,%rcx
  sub    %rdi,%rcx
  mov    %rcx,%rdi
  movzbl (%r8),%eax
  cmp    $0x5f,%al
  je     L56
  movsbl %al,%r11d
  lea    (%rcx,%rcx,4),%rax
  add    %rax,%rax
  sub    %rax,%rsi
  mov    %rsi,%rdx
  add    $0x30,%edx
  cmp    %edx,%r11d
  je     L56
  mov    $0x0,%eax
  ret
L42:
  test   %rdi,%rdi
  sete   %al
  movzbl %al,%eax
  ret
L51:
  mov    $0x0,%eax
  ret
```

assistant: ```c
bool matches_pattern(long num, const char *pattern, const char *tail_ptr) {
  while (tail_ptr >= pattern) {
    if (num == 0)
      return false;
    int digit = num % 10;
    num /= 10;
    if (*tail_ptr != '_' && *tail_ptr != (digit + '0'))
      return false;
    tail_ptr--;
  }
  return num == 0;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<matches_pattern>:
  endbr64
  mov    %rdi,%r10
  mov    %rsi,%r9
  mov    %rdx,%rdi
  cmp    %rsi,%rdx
  jb     L65
  movabs $0x6666666666666667,%r8
  test   %r10,%r10
  jne    L68
  jmp    L61
  nopl   0x0(%rax,%rax,1)
L28:
  test   %rsi,%rsi
  je     L61
L68:
  mov    %r10,%rax
  mov    %r10,%rcx
  imul   %r8
  mov    %r10,%rax
  sar    $0x3f,%rax
  sar    $0x2,%rdx
  mov    %rdx,%rsi
  sub    %rax,%rsi
  movzbl (%rdi),%eax
  mov    %rsi,%r10
  cmp    $0x5f,%al
  je     L58
  movsbl %al,%r11d
  lea    (%rsi,%rsi,4),%rax
  add    %rax,%rax
  sub    %rax,%rcx
  add    $0x30,%ecx
  cmp    %ecx,%r11d
  jne    L61
L58:
  sub    $0x1,%rdi
  cmp    %rdi,%r9
  jbe    L28
L65:
  xor    %eax,%eax
  test   %r10,%r10
  sete   %al
  ret
  nopl   0x0(%rax)
L61:
  xor    %eax,%eax
  ret
```

assistant: ```c
bool matches_pattern(long num, const char *pattern, const char *tail_ptr) {
  while (tail_ptr >= pattern) {
    if (num == 0)
      return false;
    int digit = num % 10;
    num /= 10;
    if (*tail_ptr != '_' && *tail_ptr != (digit + '0'))
      return false;
    tail_ptr--;
  }
  return num == 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<matches_pattern>:
  endbr64
  mov    %rdi,%r10
  mov    %rsi,%r9
  mov    %rdx,%rdi
  cmp    %rsi,%rdx
  jb     L23
  movabs $0x6666666666666667,%r8
  test   %r10,%r10
  jne    L18
  jmp    L42
  nopl   0x0(%rax,%rax,1)
L6:
  test   %rsi,%rsi
  je     L42
L18:
  mov    %r10,%rax
  mov    %r10,%rcx
  imul   %r8
  mov    %r10,%rax
  sar    $0x3f,%rax
  sar    $0x2,%rdx
  mov    %rdx,%rsi
  sub    %rax,%rsi
  movzbl (%rdi),%eax
  mov    %rsi,%r10
  cmp    $0x5f,%al
  je     L1
  movsbl %al,%r11d
  lea    (%rsi,%rsi,4),%rax
  add    %rax,%rax
  sub    %rax,%rcx
  add    $0x30,%ecx
  cmp    %ecx,%r11d
  jne    L42
L1:
  sub    $0x1,%rdi
  cmp    %rdi,%r9
  jbe    L6
L23:
  xor    %eax,%eax
  test   %r10,%r10
  sete   %al
  ret
  nopl   0x0(%rax)
L42:
  xor    %eax,%eax
  ret
```

assistant: ```c
bool matches_pattern(long num, const char *pattern, const char *tail_ptr) {
  while (tail_ptr >= pattern) {
    if (num == 0)
      return false;
    int digit = num % 10;
    num /= 10;
    if (*tail_ptr != '_' && *tail_ptr != (digit + '0'))
      return false;
    tail_ptr--;
  }
  return num == 0;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<clefiaconset>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x20(%rbp),%rcx
  lea    -0xa(%rbp),%rax
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <bytecpy@plt>
  jmp    L36
L26:
  movzbl -0xa(%rbp),%eax
  xor    $0xffffffb7,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  movzbl -0x9(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  xor    $0xffffffe1,%edx
  mov    %dl,(%rax)
  movzbl -0xa(%rbp),%eax
  movzbl %al,%eax
  add    %eax,%eax
  mov    %eax,%edx
  movzbl -0x9(%rbp),%eax
  shr    $0x7,%al
  or     %edx,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  not    %edx
  mov    %dl,(%rax)
  movzbl -0x9(%rbp),%eax
  movzbl %al,%eax
  add    %eax,%eax
  mov    %eax,%edx
  movzbl -0xa(%rbp),%eax
  shr    $0x7,%al
  or     %edx,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  not    %edx
  mov    %dl,(%rax)
  movzbl -0xa(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  xor    $0xffffffdb,%edx
  mov    %dl,(%rax)
  movzbl -0x9(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    $0x5,%rax
  xor    $0xffffffc0,%edx
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%rax
  lea    0x6(%rax),%rdx
  movzbl -0x9(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x18(%rbp),%rax
  lea    0x7(%rax),%rdx
  movzbl -0xa(%rbp),%eax
  mov    %al,(%rdx)
  addq   $0x8,-0x18(%rbp)
  movzbl -0x9(%rbp),%eax
  movzbl %al,%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L37
  movzbl -0xa(%rbp),%eax
  xor    $0xffffffa8,%eax
  mov    %al,-0xa(%rbp)
  movzbl -0x9(%rbp),%eax
  xor    $0x30,%eax
  mov    %al,-0x9(%rbp)
L37:
  movzbl -0xa(%rbp),%eax
  shl    $0x7,%eax
  mov    %al,-0xb(%rbp)
  movzbl -0xa(%rbp),%eax
  shr    %al
  mov    %eax,%edx
  movzbl -0x9(%rbp),%eax
  movzbl %al,%eax
  shl    $0x7,%eax
  or     %edx,%eax
  mov    %al,-0xa(%rbp)
  movzbl -0x9(%rbp),%eax
  shr    %al
  or     -0xb(%rbp),%al
  mov    %al,-0x9(%rbp)
L36:
  mov    -0x24(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x24(%rbp)
  test   %eax,%eax
  jg     L26
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L16
  call   <__stack_chk_fail@plt>
L16:
  leave
  ret
```

assistant: ```c
void clefiaconset(unsigned char *con, const unsigned char *iv, int lk) {
  unsigned char t[2];
  unsigned char tmp;
  bytecpy(t, iv, 2);
  while (lk-- > 0) {
    con[0] = t[0] ^ 0xb7u;
    con[1] = t[1] ^ 0xe1u;
    con[2] = ~((t[0] << 1) | (t[1] >> 7));
    con[3] = ~((t[1] << 1) | (t[0] >> 7));
    con[4] = ~t[0] ^ 0x24u;
    con[5] = ~t[1] ^ 0x3fu;
    con[6] = t[1];
    con[7] = t[0];
    con += 8;
    if (t[1] & 0x01u) {
      t[0] ^= 0xa8u;
      t[1] ^= 0x30u;
    }
    tmp = t[0] << 7;
    t[0] = (t[0] >> 1) | (t[1] << 7);
    t[1] = (t[1] >> 1) | tmp;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<clefiaconset>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%rbx
  mov    %edx,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x6(%rsp),%rdi
  mov    $0x2,%edx
  call   <bytecpy@plt>
  test   %ebp,%ebp
  jle    L54
  movzbl 0x6(%rsp),%eax
  movzbl 0x7(%rsp),%edx
  mov    %ebp,%ebp
  lea    (%rbx,%rbp,8),%r9
  jmp    L43
L17:
  mov    %edx,%r8d
  mov    %eax,%edi
L23:
  mov    %bpl,-0x8(%rbx)
  mov    %r11b,-0x7(%rbx)
  mov    %sil,-0x6(%rbx)
  mov    %cl,-0x5(%rbx)
  mov    %r12b,-0x4(%rbx)
  mov    %r10b,-0x3(%rbx)
  mov    %dl,-0x2(%rbx)
  mov    %al,-0x1(%rbx)
  mov    %edi,%edx
  shr    %dl
  mov    %r8d,%eax
  shl    $0x7,%eax
  or     %edx,%eax
  shr    %r8b
  shl    $0x7,%edi
  mov    %r8d,%edx
  or     %edi,%edx
  cmp    %rbx,%r9
  je     L54
L43:
  mov    %eax,%ebp
  xor    $0xffffffb7,%ebp
  mov    %edx,%r11d
  xor    $0xffffffe1,%r11d
  mov    %edx,%ecx
  shr    $0x7,%cl
  lea    (%rax,%rax,1),%esi
  or     %ecx,%esi
  not    %esi
  mov    %eax,%edi
  shr    $0x7,%dil
  lea    (%rdx,%rdx,1),%ecx
  or     %edi,%ecx
  not    %ecx
  mov    %eax,%r12d
  xor    $0xffffffdb,%r12d
  mov    %edx,%r10d
  xor    $0xffffffc0,%r10d
  add    $0x8,%rbx
  test   $0x1,%dl
  je     L17
  mov    %eax,%edi
  xor    $0xffffffa8,%edi
  mov    %edx,%r8d
  xor    $0x30,%r8d
  jmp    L23
L54:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L39
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L39:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void clefiaconset(unsigned char *con, const unsigned char *iv, int lk) {
  unsigned char t[2];
  unsigned char tmp;
  bytecpy(t, iv, 2);
  while (lk-- > 0) {
    con[0] = t[0] ^ 0xb7u;
    con[1] = t[1] ^ 0xe1u;
    con[2] = ~((t[0] << 1) | (t[1] >> 7));
    con[3] = ~((t[1] << 1) | (t[0] >> 7));
    con[4] = ~t[0] ^ 0x24u;
    con[5] = ~t[1] ^ 0x3fu;
    con[6] = t[1];
    con[7] = t[0];
    con += 8;
    if (t[1] & 0x01u) {
      t[0] ^= 0xa8u;
      t[1] ^= 0x30u;
    }
    tmp = t[0] << 7;
    t[0] = (t[0] >> 1) | (t[1] << 7);
    t[1] = (t[1] >> 1) | tmp;
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<clefiaconset>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  movslq %edx,%rbp
  mov    $0x2,%edx
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x6(%rsp),%rdi
  call   <bytecpy@plt>
  test   %ebp,%ebp
  jle    L36
  movzbl 0x6(%rsp),%eax
  movzbl 0x7(%rsp),%ecx
  lea    (%rbx,%rbp,8),%r9
  jmp    L54
  nopl   0x0(%rax,%rax,1)
L37:
  mov    %ecx,%edi
  mov    %eax,%r10d
  xor    $0x30,%edi
  xor    $0xffffffa8,%r10d
  movzbl %dil,%r8d
L18:
  mov    %dl,-0x5(%rbx)
  mov    %r8d,%edx
  shr    %dil
  mov    %al,-0x1(%rbx)
  mov    %r10d,%eax
  shl    $0x7,%edx
  shr    %al
  mov    %cl,-0x2(%rbx)
  or     %edx,%eax
  mov    %r10d,%edx
  mov    %bpl,-0x8(%rbx)
  shl    $0x7,%edx
  mov    %r11b,-0x7(%rbx)
  or     %edx,%edi
  mov    %sil,-0x6(%rbx)
  mov    %r13b,-0x4(%rbx)
  mov    %edi,%ecx
  mov    %r12b,-0x3(%rbx)
  cmp    %rbx,%r9
  je     L36
L54:
  mov    %ecx,%edx
  lea    (%rax,%rax,1),%esi
  movzbl %cl,%r8d
  mov    %eax,%ebp
  shr    $0x7,%dl
  lea    (%r8,%r8,1),%edi
  mov    %ecx,%r11d
  mov    %eax,%r13d
  or     %edx,%esi
  mov    %eax,%edx
  mov    %ecx,%r12d
  xor    $0xffffffb7,%ebp
  shr    $0x7,%dl
  xor    $0xffffffe1,%r11d
  not    %esi
  xor    $0xffffffdb,%r13d
  or     %edi,%edx
  xor    $0xffffffc0,%r12d
  add    $0x8,%rbx
  not    %edx
  test   $0x1,%cl
  jne    L37
  mov    %ecx,%edi
  mov    %eax,%r10d
  jmp    L18
  nopw   0x0(%rax,%rax,1)
L36:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L3:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void clefiaconset(unsigned char *con, const unsigned char *iv, int lk) {
  unsigned char t[2];
  unsigned char tmp;
  bytecpy(t, iv, 2);
  while (lk-- > 0) {
    con[0] = t[0] ^ 0xb7u;
    con[1] = t[1] ^ 0xe1u;
    con[2] = ~((t[0] << 1) | (t[1] >> 7));
    con[3] = ~((t[1] << 1) | (t[0] >> 7));
    con[4] = ~t[0] ^ 0x24u;
    con[5] = ~t[1] ^ 0x3fu;
    con[6] = t[1];
    con[7] = t[0];
    con += 8;
    if (t[1] & 0x01u) {
      t[0] ^= 0xa8u;
      t[1] ^= 0x30u;
    }
    tmp = t[0] << 7;
    t[0] = (t[0] >> 1) | (t[1] << 7);
    t[1] = (t[1] >> 1) | tmp;
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<clefiaconset>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  movslq %edx,%rbp
  mov    $0x2,%edx
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x6(%rsp),%rdi
  call   <bytecpy@plt>
  test   %ebp,%ebp
  jle    L6
  movzbl 0x6(%rsp),%eax
  movzbl 0x7(%rsp),%ecx
  lea    (%rbx,%rbp,8),%r9
  nopl   (%rax)
L12:
  mov    %eax,%edx
  mov    %ecx,%esi
  mov    %ecx,%r8d
  add    $0x8,%rbx
  xor    $0x30,%esi
  xor    $0xffffffa8,%edx
  mov    %ecx,%r12d
  and    $0x1,%r8d
  cmove  %eax,%edx
  lea    (%rax,%rax,1),%ebp
  shr    $0x7,%r12b
  movzbl %cl,%edi
  or     %r12d,%ebp
  mov    %eax,%r12d
  mov    %eax,%r10d
  lea    (%rdi,%rdi,1),%r13d
  shr    $0x7,%r12b
  mov    %ecx,%r14d
  movzbl %cl,%r15d
  or     %r13d,%r12d
  mov    %eax,%r13d
  movzbl %al,%eax
  xor    $0xffffffc0,%r14d
  shl    $0x8,%rax
  movzbl %r14b,%r14d
  xor    $0xffffffdb,%r13d
  not    %r12d
  or     %r15,%rax
  movzbl %r13b,%r13d
  movzbl %r12b,%r12d
  not    %ebp
  shl    $0x8,%rax
  mov    %ecx,%r11d
  movzbl %bpl,%ebp
  xor    $0xffffffb7,%r10d
  or     %r14,%rax
  xor    $0xffffffe1,%r11d
  movzbl %r10b,%r10d
  shl    $0x8,%rax
  movzbl %r11b,%r11d
  or     %r13,%rax
  shl    $0x8,%rax
  or     %r12,%rax
  shl    $0x8,%rax
  or     %rbp,%rax
  shl    $0x8,%rax
  or     %r11,%rax
  shl    $0x8,%rax
  or     %r10,%rax
  test   %r8b,%r8b
  mov    %rax,-0x8(%rbx)
  movzbl %sil,%eax
  cmovne %eax,%edi
  mov    %edx,%eax
  shr    %al
  shl    $0x7,%edi
  or     %edi,%eax
  test   %r8b,%r8b
  cmove  %ecx,%esi
  shl    $0x7,%edx
  shr    %sil
  mov    %esi,%ecx
  or     %edx,%ecx
  cmp    %rbx,%r9
  jne    L12
L6:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L10
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L10:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void clefiaconset(unsigned char *con, const unsigned char *iv, int lk) {
  unsigned char t[2];
  unsigned char tmp;
  bytecpy(t, iv, 2);
  while (lk-- > 0) {
    con[0] = t[0] ^ 0xb7u;
    con[1] = t[1] ^ 0xe1u;
    con[2] = ~((t[0] << 1) | (t[1] >> 7));
    con[3] = ~((t[1] << 1) | (t[0] >> 7));
    con[4] = ~t[0] ^ 0x24u;
    con[5] = ~t[1] ^ 0x3fu;
    con[6] = t[1];
    con[7] = t[0];
    con += 8;
    if (t[1] & 0x01u) {
      t[0] ^= 0xa8u;
      t[1] ^= 0x30u;
    }
    tmp = t[0] << 7;
    t[0] = (t[0] >> 1) | (t[1] << 7);
    t[1] = (t[1] >> 1) | tmp;
  }
}
```