user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xf0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xe0(%rbp)
  movl   $0x0,-0xdc(%rbp)
  movl   $0x0,-0xd8(%rbp)
  lea    -0xe8(%rbp),%rax
  mov    %rax,%rsi
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  jmp    L120
L111:
  lea    -0xec(%rbp),%rax
  mov    %rax,%rsi
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0xec(%rbp),%eax
  mov    %eax,-0xe4(%rbp)
  jmp    L3
L80:
  mov    -0xe4(%rbp),%eax
  cltd
  shr    $0x1d,%edx
  add    %edx,%eax
  and    $0x7,%eax
  sub    %edx,%eax
  mov    %eax,-0xd4(%rbp)
  mov    -0xe0(%rbp),%eax
  cltq
  mov    -0xd4(%rbp),%edx
  mov    %edx,-0xd0(%rbp,%rax,4)
  mov    -0xe4(%rbp),%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  mov    %eax,-0xe4(%rbp)
  addl   $0x1,-0xe0(%rbp)
L3:
  cmpl   $0x0,-0xe4(%rbp)
  jne    L80
  movl   $0x0,-0xe4(%rbp)
  mov    -0xe0(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xdc(%rbp)
  jmp    L52
L87:
  mov    -0xe4(%rbp),%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%edx
  mov    -0xdc(%rbp),%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  cmp    %eax,%edx
  jne    L12
  addl   $0x1,-0xd8(%rbp)
L12:
  addl   $0x1,-0xe4(%rbp)
  subl   $0x1,-0xdc(%rbp)
L52:
  mov    -0xe0(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0xe4(%rbp)
  jl     L87
  mov    -0xe0(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L79
  mov    -0xd8(%rbp),%eax
  add    %eax,%eax
  cmp    %eax,-0xe0(%rbp)
  jne    L55
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L95
L55:
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L95
L79:
  mov    -0xd8(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  cmp    %eax,-0xe0(%rbp)
  jne    L121
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L95
L121:
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L95:
  movl   $0x0,-0xe0(%rbp)
  movl   $0x0,-0xdc(%rbp)
  movl   $0x0,-0xd8(%rbp)
L120:
  mov    -0xe8(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0xe8(%rbp)
  test   %eax,%eax
  jne    L111
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L126
  call   <__stack_chk_fail@plt>
L126:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D19
type_infered: string
name: retrieve_data
arguments: label: D26
type_infered: string
name: retrieve_data
arguments: label: D33
type_infered: string

tool: D19: %d

tool: D26: 1


tool: D33: -1


assistant: ```c
main() {
  int a, b, i, j = 0, c[50], k = 0, l = 0;
  int t;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &a);
    i = a;
    while (i != 0) {
      b = i % 8;
      c[j] = b;
      i = i / 8;
      j++;
    }
    for (i = 0, k = j - 1; i < j / 2; i++, k--) {
      if (c[i] == c[k])
        l++;
    }
    if (j % 2 == 0) {
      if (l * 2 == j)
        printf("1\n");
      else
        printf("-1\n");
    } else {
      if ((l * 2) + 1 == j)
        printf("1\n");
      else
        printf("-1\n");
    }
    j = 0;
    k = 0;
    l = 0;
  }
  return 0;
}
```