user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x3c0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movabs $0x617272656b636168,%rax
  mov    %rax,-0x139a(%rbp)
  movw   $0x6b6e,-0x1392(%rbp)
  lea    -0x13b4(%rbp),%rax
  mov    %rax,%rsi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x1390(%rbp),%rax
  mov    %rax,%rdi
  call   <gets@plt>
  jmp    L103
L165:
  movl   $0x0,-0x13a8(%rbp)
  movl   $0x0,-0x13a4(%rbp)
  lea    -0x1390(%rbp),%rax
  mov    %rax,%rdi
  call   <gets@plt>
  lea    -0x1390(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x13a0(%rbp)
  movl   $0x0,-0x13b0(%rbp)
  jmp    L132
L143:
  mov    -0x13b0(%rbp),%eax
  cltq
  movzbl -0x1390(%rbp,%rax,1),%edx
  mov    -0x13b0(%rbp),%eax
  cltq
  movzbl -0x139a(%rbp,%rax,1),%eax
  cmp    %al,%dl
  je     L42
  movl   $0x1,-0x13a8(%rbp)
  jmp    L142
L42:
  addl   $0x1,-0x13b0(%rbp)
L132:
  cmpl   $0x9,-0x13b0(%rbp)
  jle    L143
L142:
  mov    -0x13a0(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x13b0(%rbp)
  movl   $0x9,-0x13ac(%rbp)
  jmp    L79
L137:
  mov    -0x13b0(%rbp),%eax
  cltq
  movzbl -0x1390(%rbp,%rax,1),%edx
  mov    -0x13ac(%rbp),%eax
  cltq
  movzbl -0x139a(%rbp,%rax,1),%eax
  cmp    %al,%dl
  je     L28
  movl   $0x1,-0x13a4(%rbp)
  jmp    L39
L28:
  subl   $0x1,-0x13b0(%rbp)
  subl   $0x1,-0x13ac(%rbp)
L79:
  cmpl   $0x0,-0x13ac(%rbp)
  jns    L137
L39:
  cmpl   $0x0,-0x13a8(%rbp)
  jne    L174
  cmpl   $0x0,-0x13a4(%rbp)
  jne    L174
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L103
L174:
  cmpl   $0x0,-0x13a8(%rbp)
  jne    L17
  cmpl   $0x1,-0x13a4(%rbp)
  jne    L17
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L103
L17:
  cmpl   $0x1,-0x13a8(%rbp)
  jne    L47
  cmpl   $0x0,-0x13a4(%rbp)
  jne    L47
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L103
L47:
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L103:
  mov    -0x13b4(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x13b4(%rbp)
  test   %eax,%eax
  jne    L165
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L19
  call   <__stack_chk_fail@plt>
L19:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D37
datatype: string
name: retrieve_data
arguments: tag: D21
datatype: string
name: retrieve_data
arguments: tag: D36
datatype: string
name: retrieve_data
arguments: tag: D9
datatype: string
name: retrieve_data
arguments: tag: D46
datatype: string

tool: D37: %d

tool: D21: 0


tool: D36: 1


tool: D9: 2


tool: D46: -1


assistant: ```c
int main() {
  int i, j, k, t, n, flag1, flag2;
  char str[5000];
  char str1[10] = {'h', 'a', 'c', 'k', 'e', 'r', 'r', 'a', 'n', 'k'};
  scanf("%d", &t);
  gets(str);
  while (t--) {
    flag1 = 0;
    flag2 = 0;
    gets(str);
    n = strlen(str);
    for (i = 0; i < 10; i++) {
      if (str[i] == str1[i]) {
      } else {
        flag1 = 1;
        break;
      }
    }
    for (i = n - 1, j = 9; i >= (n - 10), j >= 0; i--, j--) {
      if (str[i] == str1[j]) {
      } else {
        flag2 = 1;
        break;
      }
    }
    if (flag1 == 0 && flag2 == 0)
      printf("0\n");
    else if (flag1 == 0 && flag2 == 1)
      printf("1\n");
    else if (flag1 == 1 && flag2 == 0)
      printf("2\n");
    else
      printf("-1\n");
  }
  return 0;
}
```