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

```asm
<main>:
  endbr64
  push   %r14
  mov    $0x2928,%edx
  lea    D10(%rip),%r14
  push   %r13
  lea    D31(%rip),%r13
  push   %r12
  push   %rbp
  lea    D58(%rip),%rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movl   $0x5d5b7d7b,0x12(%rsp)
  lea    0xc(%rsp),%r12
  mov    %dx,0x16(%rsp)
  nopl   0x0(%rax)
L80:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    %eax,%ebx
  cmp    $0x1,%eax
  jne    L78
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L78
  nopw   0x0(%rax,%rax,1)
L3:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L3
  cmp    $0x1,%ebx
  jne    L80
  mov    0xc(%rsp),%edi
  test   %edi,%edi
  jle    L80
  call   <malloc@plt>
  lea    D24(%rip),%rdi
  xor    %ebp,%ebp
  lea    0x12(%rsp),%r12
  mov    %rax,%r13
  call   <printf@plt>
  nopl   0x0(%rax,%rax,1)
L53:
  xor    %eax,%eax
  call   <getchar@plt>
  mov    %r12,%rdi
  movsbl %al,%esi
  mov    %esi,%ebx
  call   <strchr@plt>
  test   %rax,%rax
  je     L4
  cmp    %ebp,0xc(%rsp)
  jle    L4
  movslq %ebp,%rax
  add    $0x1,%ebp
  mov    %bl,0x0(%r13,%rax,1)
L4:
  cmp    $0xa,%bl
  jne    L53
  lea    D28(%rip),%rdi
  call   <printf@plt>
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <brackets_checker@plt>
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L72
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L78:
  mov    %r14,%rdi
  call   <printf@plt>
  jmp    L3
L72:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D10
type: string
name: retrieve_data
arguments: label: D31
type: string
name: retrieve_data
arguments: label: D58
type: string
name: retrieve_data
arguments: label: D24
type: string
name: retrieve_data
arguments: label: D28
type: string
name: retrieve_data
arguments: label: D8
type: string

tool: D10: Wrong input!


tool: D31: Number of brackets: 

tool: D58: %d

tool: D24: Insert a sequence of parentheses, square and curly brackets.
(All invalid and exceeding characters will be ignored)
Insert: 

tool: D28: 
Longest prefix: 

tool: D8: 


assistant: ```c
int main(void) {
  char *input_string, valid_chars[] = {'{', '}', '[', ']', '(', ')'}, tmp_char;
  int ele_num = 0, array_dim, scanf_result = 0;
  do {
    printf("Number of brackets: ");
    scanf_result = scanf("%d", &array_dim);
    if ((scanf_result != 1) || (array_dim <= 0))
      printf("Wrong input!\n");
    do {
      tmp_char = getchar();
    } while (tmp_char != '\n');
  } while ((scanf_result != 1) || (array_dim <= 0));
  input_string = (char *)malloc(sizeof(char) * array_dim);
  printf("Insert a sequence of parentheses, square and curly brackets.\n"
         "(All invalid and exceeding characters will be ignored)\n"
         "Insert: ");
  do {
    tmp_char = getchar();
    if (strchr(valid_chars, tmp_char) && ele_num < array_dim) {
      input_string[ele_num] = tmp_char;
      ele_num++;
    }
  } while (tmp_char != '\n');
  printf("\nLongest prefix: ");
  brackets_checker(input_string, ele_num);
  printf("\n");
  free(input_string);
  return 0;
}
```