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

```asm
<main>:
  endbr64
  push   %r14
  lea    D29(%rip),%rdi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rcx
  lea    0x8(%rsp),%rdx
  lea    0x4(%rsp),%rsi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  lea    0x1(%rax),%ebp
  lea    0x0(,%rbp,4),%r13d
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    %r13d,%edx
  mov    $0xffffffff,%esi
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <memset@plt>
  mov    %ebp,%edi
  call   <initializeSet@plt>
  mov    0x8(%rsp),%edx
  test   %edx,%edx
  je     L47
  xor    %ebx,%ebx
  lea    0x14(%rsp),%r14
  lea    0x10(%rsp),%r13
  lea    D16(%rip),%rbp
  nopw   0x0(%rax,%rax,1)
L52:
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x10(%rsp),%esi
  mov    0x14(%rsp),%edx
  cmp    %edx,%esi
  je     L64
  mov    %r12,%rdi
  call   <addEdge@plt>
L64:
  add    $0x1,%ebx
  cmp    %ebx,0x8(%rsp)
  ja     L52
L47:
  mov    0xc(%rsp),%eax
  xor    %ebx,%ebx
  lea    D14(%rip),%r14
  lea    0x0(,%rax,4),%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    0xc(%rsp),%eax
  lea    0x0(,%rax,4),%edi
  call   <malloc@plt>
  mov    %rax,%r13
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  je     L27
  nopl   0x0(%rax)
L62:
  mov    %ebx,%eax
  mov    %r14,%rdi
  add    $0x1,%ebx
  lea    0x0(%rbp,%rax,4),%rsi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  cmp    %ebx,%eax
  ja     L62
  test   %eax,%eax
  je     L27
  xor    %ebx,%ebx
  nopw   0x0(%rax,%rax,1)
L58:
  mov    %ebx,%eax
  mov    %r12,%rdi
  add    $0x1,%ebx
  mov    0x0(%rbp,%rax,4),%esi
  lea    0x0(%r13,%rax,4),%r14
  call   <getRootNode@plt>
  mov    %eax,(%r14)
  cmp    %ebx,0xc(%rsp)
  ja     L58
L27:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    0xc(%rsp),%esi
  mov    %r13,%rdi
  call   <getMaxPalindromeLengthOptimised@plt>
  mov    %r13,%rdi
  mov    %eax,%ebp
  call   <free@plt>
  mov    %ebp,%esi
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L53
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L53:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D29
data_type: string
name: retrieve_data
arguments: data_tag: D16
data_type: string
name: retrieve_data
arguments: data_tag: D14
data_type: string
name: retrieve_data
arguments: data_tag: D8
data_type: string

tool: D29: %u%u%u

tool: D16: %u%u

tool: D14: %u

tool: D8: %u


assistant: ```c
int main() {
  unsigned int *arr, *brr, n, k, j, m, i, x, y;
  unsigned int maxPalindromeLength;
  scanf("%u%u%u", &n, &k, &m);
  unsigned int v = n + 1;
  unsigned int *arrLoc = (unsigned int *)malloc(sizeof(unsigned int) * v);
  memset(arrLoc, -1, sizeof(unsigned int) * v);
  initializeSet(v);
  for (j = 0; j < k; j++) {
    scanf("%u%u", &x, &y);
    if (x != y) {
      addEdge(arrLoc, x, y);
    }
  }
  arr = (unsigned int *)malloc(m * sizeof(unsigned int));
  brr = (unsigned int *)malloc(m * sizeof(unsigned int));
  for (i = 0; i < m; i++) {
    scanf("%u", &arr[i]);
  }
  for (i = 0; i < m; i++) {
    brr[i] = getRootNode(arrLoc, arr[i]);
  }
  free(arr);
  free(arrLoc);
  maxPalindromeLength = getMaxPalindromeLengthOptimised(brr, m);
  free(brr);
  printf("%u\n", maxPalindromeLength);
  return 0;
}
```