ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Translate the below assembly code into C programming language:

```asm
<get_rot>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rcx,%r13
  mov    %r9,%rcx
  push   %r12
  mov    %rdi,%r12
  mov    %r14,%rdi
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  mov    %rbp,%rdx
  mov    %rsi,%rbx
  mov    %r13,%rsi
  sub    $0x108,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xf8(%rsp)
  xor    %eax,%eax
  mov    0x140(%rsp),%r15
  lea    0x18(%rsp),%r8
  call   <c_dih_ang@plt>
  lea    0x20(%rsp),%r8
  mov    %rbp,%rdx
  mov    %r13,%rsi
  mov    %r15,%rcx
  mov    %r14,%rdi
  call   <c_dih_ang@plt>
  mov    %r13,%rdi
  lea    0x28(%rsp),%rdx
  mov    %rbp,%rsi
  movsd  0x20(%rsp),%xmm0
  subsd  0x18(%rsp),%xmm0
  mulsd  D2(%rip),%xmm0
  movsd  %xmm0,0x8(%rsp)
  call   <c_bnd_len@plt>
  movsd  0x28(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm0
  xor    %eax,%eax
  lea    0x30(%rsp),%rdi
L29:
  movsd  0x0(%rbp,%rax,1),%xmm1
  subsd  0x0(%r13,%rax,1),%xmm1
  divsd  %xmm2,%xmm1
  movsd  %xmm1,(%rdi,%rax,1)
  add    $0x8,%rax
  cmp    $0x18,%rax
  jne    L29
  lea    0x90(%rsp),%r14
  lea    0xb0(%rsp),%r13
  mov    %r14,%rsi
  call   <quaternion@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <rotation_matrix@plt>
  xor    %eax,%eax
  lea    0x70(%rsp),%rsi
L19:
  movsd  (%r12,%rax,1),%xmm0
  subsd  0x0(%rbp,%rax,1),%xmm0
  movsd  %xmm0,(%rsi,%rax,1)
  add    $0x8,%rax
  cmp    $0x18,%rax
  jne    L19
  lea    0x50(%rsp),%r12
  mov    %r13,%rdi
  mov    %r12,%rdx
  call   <matmul@plt>
  xor    %eax,%eax
L6:
  movsd  (%r12,%rax,1),%xmm0
  addsd  0x0(%rbp,%rax,1),%xmm0
  movsd  %xmm0,(%rbx,%rax,1)
  add    $0x8,%rax
  cmp    $0x18,%rax
  jne    L6
  mov    0xf8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L20
  add    $0x108,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L20:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D2
type_guessed: f64

tool: D2: 0.25

assistant: ```c
void get_rot(double obj_i[3], double obj_f[3], double tor1[3], double tor2[3], double tor3[3], double tor4_i[3], double tor4_f[3]) {
  double Us[3][3], p[4];
  double vec_rot[3], mat1[3], mat11[3];
  double angle, ang_i, ang_f, vec_len;
  int i;
  c_dih_ang(tor1, tor2, tor3, tor4_i, &ang_i);
  c_dih_ang(tor1, tor2, tor3, tor4_f, &ang_f);
  angle = (ang_f - ang_i) * 0.25;
  c_bnd_len(tor2, tor3, &vec_len);
  for (i = 0; i < 3; i++)
    vec_rot[i] = (tor3[i] - tor2[i]) / vec_len;
  quaternion(vec_rot, angle, p);
  rotation_matrix(p, Us);
  for (i = 0; i < 3; i++)
    mat11[i] = obj_i[i] - tor3[i];
  matmul(Us, mat11, mat1);
  for (i = 0; i < 3; i++)
    obj_f[i] = mat1[i] + tor3[i];
  return;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<get_rot>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rdi,%r13
  mov    %r14,%rdi
  push   %r12
  mov    %rcx,%r12
  mov    %r9,%rcx
  push   %rbp
  mov    %rsi,%rbp
  mov    %r12,%rsi
  push   %rbx
  mov    %r8,%rbx
  mov    %rbx,%rdx
  sub    $0x108,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xf8(%rsp)
  xor    %eax,%eax
  mov    0x140(%rsp),%r15
  lea    0x18(%rsp),%r8
  call   <c_dih_ang@plt>
  lea    0x20(%rsp),%r8
  mov    %r12,%rsi
  mov    %r14,%rdi
  mov    %r15,%rcx
  mov    %rbx,%rdx
  lea    0x90(%rsp),%r14
  call   <c_dih_ang@plt>
  lea    0x28(%rsp),%rdx
  mov    %r12,%rdi
  mov    %rbx,%rsi
  movsd  0x20(%rsp),%xmm0
  subsd  0x18(%rsp),%xmm0
  mulsd  D0(%rip),%xmm0
  movsd  %xmm0,0x8(%rsp)
  call   <c_bnd_len@plt>
  movupd (%r12),%xmm4
  movupd (%rbx),%xmm1
  lea    0x30(%rsp),%rdi
  movsd  0x28(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm0
  mov    %r14,%rsi
  subpd  %xmm4,%xmm1
  movapd %xmm2,%xmm3
  unpcklpd %xmm3,%xmm3
  divpd  %xmm3,%xmm1
  movaps %xmm1,0x30(%rsp)
  movsd  0x10(%rbx),%xmm1
  subsd  0x10(%r12),%xmm1
  lea    0xb0(%rsp),%r12
  divsd  %xmm2,%xmm1
  movsd  %xmm1,0x40(%rsp)
  call   <quaternion@plt>
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <rotation_matrix@plt>
  movupd 0x0(%r13),%xmm0
  movupd (%rbx),%xmm5
  mov    %r12,%rdi
  lea    0x50(%rsp),%rdx
  lea    0x70(%rsp),%rsi
  subpd  %xmm5,%xmm0
  movaps %xmm0,0x70(%rsp)
  movsd  0x10(%r13),%xmm0
  subsd  0x10(%rbx),%xmm0
  movsd  %xmm0,0x80(%rsp)
  call   <matmul@plt>
  lea    0x8(%rbx),%rax
  cmp    %rax,%rbp
  je     L15
  movupd (%rbx),%xmm0
  addpd  0x50(%rsp),%xmm0
  movups %xmm0,0x0(%rbp)
  movsd  0x10(%rbx),%xmm0
  addsd  0x60(%rsp),%xmm0
  movsd  %xmm0,0x10(%rbp)
L2:
  mov    0xf8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  add    $0x108,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L15:
  movsd  0x50(%rsp),%xmm0
  addsd  (%rbx),%xmm0
  movsd  %xmm0,0x8(%rbx)
  addsd  0x58(%rsp),%xmm0
  movsd  %xmm0,0x10(%rbx)
  addsd  0x60(%rsp),%xmm0
  movsd  %xmm0,0x18(%rbx)
  jmp    L2
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D0
type_infered: f64

tool: D0: 0.25

assistant: ```c
void get_rot(double obj_i[3], double obj_f[3], double tor1[3], double tor2[3], double tor3[3], double tor4_i[3], double tor4_f[3]) {
  double Us[3][3], p[4];
  double vec_rot[3], mat1[3], mat11[3];
  double angle, ang_i, ang_f, vec_len;
  int i;
  c_dih_ang(tor1, tor2, tor3, tor4_i, &ang_i);
  c_dih_ang(tor1, tor2, tor3, tor4_f, &ang_f);
  angle = (ang_f - ang_i) * 0.25;
  c_bnd_len(tor2, tor3, &vec_len);
  for (i = 0; i < 3; i++)
    vec_rot[i] = (tor3[i] - tor2[i]) / vec_len;
  quaternion(vec_rot, angle, p);
  rotation_matrix(p, Us);
  for (i = 0; i < 3; i++)
    mat11[i] = obj_i[i] - tor3[i];
  matmul(Us, mat11, mat1);
  for (i = 0; i < 3; i++)
    obj_f[i] = mat1[i] + tor3[i];
  return;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<sinal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jne    L16
  mov    $0x0,%eax
  jmp    L21
L16:
  cmpl   $0x0,-0x4(%rbp)
  jns    L25
  mov    $0xffffffff,%eax
  jmp    L21
L25:
  mov    $0x1,%eax
L21:
  pop    %rbp
  ret
```

assistant: ```c
int sinal(int x) {
  if (!x)
    return (0);
  return (abs(x) / x);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<sinal>:
  endbr64
  mov    %edi,%eax
  test   %edi,%edi
  je     L9
  sar    $0x1f,%eax
  or     $0x1,%eax
L9:
  ret
```

assistant: ```c
int sinal(int x) {
  if (!x)
    return (0);
  return (abs(x) / x);
}
```
user: What is the c source code of the assembly code below:

```asm
<sinal>:
  endbr64
  xor    %eax,%eax
  test   %edi,%edi
  je     L3
  mov    %edi,%eax
  sar    $0x1f,%eax
  or     $0x1,%eax
L3:
  ret
```

assistant: ```c
int sinal(int x) {
  if (!x)
    return (0);
  return (abs(x) / x);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<sinal>:
  endbr64
  xor    %eax,%eax
  test   %edi,%edi
  je     L5
  mov    %edi,%eax
  sar    $0x1f,%eax
  or     $0x1,%eax
L5:
  ret
```

assistant: ```c
int sinal(int x) {
  if (!x)
    return (0);
  return (abs(x) / x);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<hs_binary_floatToHalf>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movss  %xmm0,-0x24(%rbp)
  movss  -0x24(%rbp),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  shr    $0x10,%eax
  and    $0x8000,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  shr    $0x17,%eax
  movzbl %al,%eax
  sub    $0x70,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  and    $0x7fffff,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  jg     L102
  cmpl   $0xfffffff6,-0x18(%rbp)
  jge    L59
  mov    -0x10(%rbp),%eax
  jmp    L2
L59:
  orl    $0x800000,-0x14(%rbp)
  mov    $0xe,%eax
  sub    -0x18(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  mov    -0x14(%rbp),%edx
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  and    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %eax,%edx
  mov    -0xc(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  or     %edx,%eax
  jmp    L2
L102:
  cmpl   $0x8f,-0x18(%rbp)
  jne    L17
  cmpl   $0x0,-0x14(%rbp)
  jne    L32
  mov    -0x10(%rbp),%eax
  or     $0x7c,%ah
  jmp    L2
L32:
  sarl   $0xd,-0x14(%rbp)
  mov    -0x10(%rbp),%eax
  or     $0x7c,%ah
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  or     %eax,%edx
  cmpl   $0x0,-0x14(%rbp)
  sete   %al
  movzbl %al,%eax
  or     %edx,%eax
  jmp    L2
L17:
  mov    -0x14(%rbp),%eax
  lea    0xfff(%rax),%edx
  mov    -0x14(%rbp),%eax
  sar    $0xd,%eax
  and    $0x1,%eax
  add    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  and    $0x800000,%eax
  test   %eax,%eax
  je     L16
  movl   $0x0,-0x14(%rbp)
  addl   $0x1,-0x18(%rbp)
L16:
  cmpl   $0x1e,-0x18(%rbp)
  jle    L100
  mov    -0x10(%rbp),%eax
  or     $0x7c,%ah
  jmp    L2
L100:
  mov    -0x18(%rbp),%eax
  shl    $0xa,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  or     %eax,%edx
  mov    -0x14(%rbp),%eax
  sar    $0xd,%eax
  or     %edx,%eax
L2:
  pop    %rbp
  ret
```

assistant: ```c
unsigned short hs_binary_floatToHalf(float f) {
  union {
    float d;
    unsigned int i;
  } u = {f};
  int s = (u.i >> 16) & 0x8000;
  int e = ((u.i >> 23) & 0xff) - 112;
  int m = u.i & 0x7fffff;
  if (e <= 0) {
    if (e < -10)
      return s;
    m |= 0x800000;
    int t = 14 - e;
    int a = (1 << (t - 1)) - 1;
    int b = (m >> t) & 1;
    return s | ((m + a + b) >> t);
  }
  if (e == 143) {
    if (m == 0)
      return s | 0x7c00;
    m >>= 13;
    return s | 0x7c00 | m | (m == 0);
  }
  m = m + 0xfff + ((m >> 13) & 1);
  if (m & 0x800000) {
    m = 0;
    e += 1;
  }
  if (e > 30)
    return s | 0x7c00;
  return s | (e << 10) | (m >> 13);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<hs_binary_floatToHalf>:
  endbr64
  movd   %xmm0,%edx
  movd   %xmm0,%eax
  shr    $0x10,%eax
  and    $0x8000,%eax
  movd   %xmm0,%ecx
  shr    $0x17,%ecx
  movzbl %cl,%ecx
  lea    -0x70(%rcx),%esi
  and    $0x7fffff,%edx
  test   %esi,%esi
  jle    L38
  cmp    $0x8f,%esi
  je     L4
  mov    %edx,%edi
  sar    $0xd,%edi
  and    $0x1,%edi
  lea    0xfff(%rdi,%rdx,1),%edx
  test   $0x800000,%edx
  je     L28
  lea    -0x6f(%rcx),%esi
  mov    $0x0,%edx
L28:
  cmp    $0x1e,%esi
  jg     L0
  shl    $0xa,%esi
  sar    $0xd,%edx
  or     %edx,%esi
  or     %esi,%eax
L36:
  ret
L38:
  cmp    $0xfffffff6,%esi
  jl     L36
  or     $0x800000,%edx
  mov    $0xe,%edi
  sub    %esi,%edi
  mov    $0xd,%ecx
  sub    %esi,%ecx
  mov    $0x1,%esi
  shl    %cl,%esi
  lea    -0x1(%rdx,%rsi,1),%esi
  mov    %edi,%ecx
  sar    %cl,%edx
  and    $0x1,%edx
  add    %esi,%edx
  sar    %cl,%edx
  or     %edx,%eax
  ret
L4:
  test   %edx,%edx
  jne    L50
  or     $0x7c,%ah
  ret
L50:
  sar    $0xd,%edx
  sete   %cl
  movzbl %cl,%ecx
  or     %eax,%edx
  mov    %ecx,%eax
  or     %edx,%eax
  or     $0x7c,%ah
  ret
L0:
  or     $0x7c,%ah
  ret
```

assistant: ```c
unsigned short hs_binary_floatToHalf(float f) {
  union {
    float d;
    unsigned int i;
  } u = {f};
  int s = (u.i >> 16) & 0x8000;
  int e = ((u.i >> 23) & 0xff) - 112;
  int m = u.i & 0x7fffff;
  if (e <= 0) {
    if (e < -10)
      return s;
    m |= 0x800000;
    int t = 14 - e;
    int a = (1 << (t - 1)) - 1;
    int b = (m >> t) & 1;
    return s | ((m + a + b) >> t);
  }
  if (e == 143) {
    if (m == 0)
      return s | 0x7c00;
    m >>= 13;
    return s | 0x7c00 | m | (m == 0);
  }
  m = m + 0xfff + ((m >> 13) & 1);
  if (m & 0x800000) {
    m = 0;
    e += 1;
  }
  if (e > 30)
    return s | 0x7c00;
  return s | (e << 10) | (m >> 13);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<hs_binary_floatToHalf>:
  endbr64
  movd   %xmm0,%ecx
  movd   %xmm0,%eax
  movd   %xmm0,%edx
  shr    $0x17,%ecx
  shr    $0x10,%eax
  and    $0x7fffff,%edx
  movzbl %cl,%ecx
  and    $0x8000,%eax
  lea    -0x70(%rcx),%esi
  test   %esi,%esi
  jle    L48
  cmp    $0x8f,%esi
  je     L53
  mov    %edx,%edi
  sar    $0xd,%edi
  and    $0x1,%edi
  lea    0xfff(%rdi,%rdx,1),%edx
  test   $0x800000,%edx
  jne    L7
L61:
  cmp    $0x1e,%esi
  jg     L47
  shl    $0xa,%esi
  sar    $0xd,%edx
  or     %edx,%esi
  or     %esi,%eax
L14:
  ret
  nopw   0x0(%rax,%rax,1)
L53:
  test   %edx,%edx
  jne    L64
L47:
  or     $0x7c,%ah
  ret
  nopl   0x0(%rax,%rax,1)
L48:
  cmp    $0xfffffff6,%esi
  jl     L14
  mov    $0xe,%edi
  mov    $0xd,%ecx
  or     $0x800000,%edx
  sub    %esi,%ecx
  sub    %esi,%edi
  mov    $0x1,%esi
  shl    %cl,%esi
  mov    %edi,%ecx
  lea    -0x1(%rdx,%rsi,1),%esi
  sar    %cl,%edx
  and    $0x1,%edx
  add    %esi,%edx
  sar    %cl,%edx
  or     %edx,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L7:
  lea    -0x6f(%rcx),%esi
  xor    %edx,%edx
  jmp    L61
  nop
L64:
  xor    %ecx,%ecx
  sar    $0xd,%edx
  sete   %cl
  or     %eax,%edx
  mov    %ecx,%eax
  or     %edx,%eax
  or     $0x7c,%ah
  ret
```

assistant: ```c
unsigned short hs_binary_floatToHalf(float f) {
  union {
    float d;
    unsigned int i;
  } u = {f};
  int s = (u.i >> 16) & 0x8000;
  int e = ((u.i >> 23) & 0xff) - 112;
  int m = u.i & 0x7fffff;
  if (e <= 0) {
    if (e < -10)
      return s;
    m |= 0x800000;
    int t = 14 - e;
    int a = (1 << (t - 1)) - 1;
    int b = (m >> t) & 1;
    return s | ((m + a + b) >> t);
  }
  if (e == 143) {
    if (m == 0)
      return s | 0x7c00;
    m >>= 13;
    return s | 0x7c00 | m | (m == 0);
  }
  m = m + 0xfff + ((m >> 13) & 1);
  if (m & 0x800000) {
    m = 0;
    e += 1;
  }
  if (e > 30)
    return s | 0x7c00;
  return s | (e << 10) | (m >> 13);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<hs_binary_floatToHalf>:
  endbr64
  movd   %xmm0,%ecx
  movd   %xmm0,%eax
  movd   %xmm0,%edx
  shr    $0x17,%ecx
  shr    $0x10,%eax
  and    $0x7fffff,%edx
  movzbl %cl,%ecx
  and    $0x8000,%eax
  lea    -0x70(%rcx),%esi
  test   %esi,%esi
  jle    L68
  cmp    $0x8f,%esi
  je     L56
  mov    %edx,%edi
  sar    $0xd,%edi
  and    $0x1,%edi
  lea    0xfff(%rdi,%rdx,1),%edx
  test   $0x800000,%edx
  jne    L50
L55:
  cmp    $0x1e,%esi
  jg     L20
  shl    $0xa,%esi
  sar    $0xd,%edx
  or     %edx,%esi
  or     %esi,%eax
L62:
  ret
  nopw   0x0(%rax,%rax,1)
L56:
  test   %edx,%edx
  jne    L17
L20:
  or     $0x7c,%ah
  ret
  nopl   0x0(%rax,%rax,1)
L68:
  cmp    $0xfffffff6,%esi
  jl     L62
  mov    $0xe,%edi
  mov    $0xd,%ecx
  or     $0x800000,%edx
  sub    %esi,%ecx
  sub    %esi,%edi
  mov    $0x1,%esi
  shl    %cl,%esi
  mov    %edi,%ecx
  lea    -0x1(%rdx,%rsi,1),%esi
  sar    %cl,%edx
  and    $0x1,%edx
  add    %esi,%edx
  sar    %cl,%edx
  or     %edx,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L50:
  lea    -0x6f(%rcx),%esi
  xor    %edx,%edx
  jmp    L55
  nop
L17:
  xor    %ecx,%ecx
  sar    $0xd,%edx
  sete   %cl
  or     %eax,%edx
  mov    %ecx,%eax
  or     %edx,%eax
  or     $0x7c,%ah
  ret
```

assistant: ```c
unsigned short hs_binary_floatToHalf(float f) {
  union {
    float d;
    unsigned int i;
  } u = {f};
  int s = (u.i >> 16) & 0x8000;
  int e = ((u.i >> 23) & 0xff) - 112;
  int m = u.i & 0x7fffff;
  if (e <= 0) {
    if (e < -10)
      return s;
    m |= 0x800000;
    int t = 14 - e;
    int a = (1 << (t - 1)) - 1;
    int b = (m >> t) & 1;
    return s | ((m + a + b) >> t);
  }
  if (e == 143) {
    if (m == 0)
      return s | 0x7c00;
    m >>= 13;
    return s | 0x7c00 | m | (m == 0);
  }
  m = m + 0xfff + ((m >> 13) & 1);
  if (m & 0x800000) {
    m = 0;
    e += 1;
  }
  if (e > 30)
    return s | 0x7c00;
  return s | (e << 10) | (m >> 13);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<is_aim_key>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L21
L47:
  addl   $0x1,-0x14(%rbp)
L21:
  mov    -0x14(%rbp),%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L47
  mov    -0x14(%rbp),%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rbx
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %rax,%rbx
  jae    L52
  mov    $0xffffffff,%eax
  jmp    L89
L52:
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  add    %rax,%rcx
  mov    -0x30(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L51
  mov    $0xffffffff,%eax
  jmp    L89
L51:
  mov    -0x14(%rbp),%ebx
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  lea    (%rbx,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L6
  mov    -0x14(%rbp),%ebx
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  lea    (%rbx,%rax,1),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L41
L6:
  mov    $0x1,%eax
  jmp    L89
L41:
  mov    $0xffffffff,%eax
L89:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int is_aim_key(const char *cur_str, char *key) {
  unsigned int i = 0;
  for (; cur_str[i] == ' '; i++)
    ;
  if (strlen(&cur_str[i]) < strlen(key))
    return -1;
  if (strncmp(&cur_str[i], key, strlen(key))) {
    return -1;
  }
  if (cur_str[i + strlen(key)] == ' ' || cur_str[i + strlen(key)] == '=')
    return 1;
  return -1;
}
```
user: What is the c source code of the assembly code below?

```asm
<is_aim_key>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  mov    %rsi,%r13
  cmpb   $0x20,(%rdi)
  jne    L37
  mov    $0x0,%eax
L48:
  add    $0x1,%eax
  mov    %eax,%ebp
  lea    (%r12,%rbp,1),%rbx
  cmpb   $0x20,(%rbx)
  je     L48
L26:
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %rax,%r14
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    $0xffffffff,%eax
  cmp    %rdx,%r14
  jae    L52
L47:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L37:
  mov    %rdi,%rbx
  mov    $0x0,%ebp
  jmp    L26
L52:
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  mov    %rax,%rdx
  mov    $0xffffffff,%eax
  test   %rdx,%rdx
  jne    L47
  mov    %r13,%rdi
  call   <strlen@plt>
  add    %rbp,%r12
  movzbl (%r12,%rax,1),%edx
  cmp    $0x3d,%dl
  je     L1
  mov    $0xffffffff,%eax
  cmp    $0x20,%dl
  jne    L47
L1:
  mov    $0x1,%eax
  jmp    L47
```

assistant: ```c
int is_aim_key(const char *cur_str, char *key) {
  unsigned int i = 0;
  for (; cur_str[i] == ' '; i++)
    ;
  if (strlen(&cur_str[i]) < strlen(key))
    return -1;
  if (strncmp(&cur_str[i], key, strlen(key))) {
    return -1;
  }
  if (cur_str[i + strlen(key)] == ' ' || cur_str[i + strlen(key)] == '=')
    return 1;
  return -1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<is_aim_key>:
  endbr64
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  cmpb   $0x20,(%rdi)
  jne    L50
  xor    %eax,%eax
  nopl   (%rax)
L7:
  lea    0x1(%rax),%ebx
  lea    (%r12,%rbx,1),%rbp
  mov    %rbx,%rax
  cmpb   $0x20,0x0(%rbp)
  je     L7
L63:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %r13,%rdi
  mov    %rax,%r14
  call   <strlen@plt>
  mov    %rax,%rdx
  cmp    %rax,%r14
  jae    L25
L51:
  pop    %rbx
  mov    $0xffffffff,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L25:
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L51
  mov    %r13,%rdi
  add    %rbx,%r12
  call   <strlen@plt>
  movzbl (%r12,%rax,1),%eax
  cmp    $0x3d,%al
  je     L43
  cmp    $0x20,%al
  jne    L51
L43:
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  cs nopw 0x0(%rax,%rax,1)
L50:
  mov    %rdi,%rbp
  xor    %ebx,%ebx
  jmp    L63
```

assistant: ```c
int is_aim_key(const char *cur_str, char *key) {
  unsigned int i = 0;
  for (; cur_str[i] == ' '; i++)
    ;
  if (strlen(&cur_str[i]) < strlen(key))
    return -1;
  if (strncmp(&cur_str[i], key, strlen(key))) {
    return -1;
  }
  if (cur_str[i + strlen(key)] == ' ' || cur_str[i + strlen(key)] == '=')
    return 1;
  return -1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<is_aim_key>:
  endbr64
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  cmpb   $0x20,(%rdi)
  jne    L54
  xor    %eax,%eax
  nopl   (%rax)
L24:
  lea    0x1(%rax),%ebx
  lea    (%r12,%rbx,1),%rbp
  mov    %rbx,%rax
  cmpb   $0x20,0x0(%rbp)
  je     L24
L31:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %r13,%rdi
  mov    %rax,%r14
  call   <strlen@plt>
  mov    %rax,%rdx
  cmp    %rax,%r14
  jae    L49
L43:
  pop    %rbx
  mov    $0xffffffff,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L49:
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L43
  mov    %r13,%rdi
  add    %rbx,%r12
  call   <strlen@plt>
  movzbl (%r12,%rax,1),%eax
  cmp    $0x3d,%al
  je     L23
  cmp    $0x20,%al
  jne    L43
L23:
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  cs nopw 0x0(%rax,%rax,1)
L54:
  mov    %rdi,%rbp
  xor    %ebx,%ebx
  jmp    L31
```

assistant: ```c
int is_aim_key(const char *cur_str, char *key) {
  unsigned int i = 0;
  for (; cur_str[i] == ' '; i++)
    ;
  if (strlen(&cur_str[i]) < strlen(key))
    return -1;
  if (strncmp(&cur_str[i], key, strlen(key))) {
    return -1;
  }
  if (cur_str[i + strlen(key)] == ' ' || cur_str[i + strlen(key)] == '=')
    return 1;
  return -1;
}
```