user: Translate the below assembly code into C programming language:

```asm
<primary>:
  endbr64
  push   %r13
  mov    %rdi,%r13
  lea    D0(%rip),%rdi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <match@plt>
  test   %eax,%eax
  jne    L98
  lea    0xd(%rsp),%rbp
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <symname@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L78
  xor    %eax,%eax
  lea    0x8(%rsp),%rdi
  call   <constant@plt>
  test   %eax,%eax
  je     L84
  movq   $0x0,0x0(%r13)
L55:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L40
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L78:
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <findloc@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L117
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <findglb@plt>
  movslq %eax,%rbx
  test   %eax,%eax
  je     L95
  cmpb   $0x4,0xb(%rbx)
  je     L95
  mov    %eax,0x0(%r13)
  movl   $0x0,0x4(%r13)
  cmpb   $0x2,0xb(%rbx)
  je     L127
  mov    $0x1,%r12d
  jmp    L55
  xchg   %ax,%ax
L98:
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <heir1@plt>
  lea    D18(%rip),%rdi
  mov    %eax,%r12d
  xor    %eax,%eax
  call   <needbrack@plt>
  jmp    L55
L117:
  movslq %eax,%rbp
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <getloc@plt>
  mov    %r12d,0x0(%r13)
  movsbl 0xc(%rbp),%eax
  mov    $0x2,%edx
  mov    %eax,0x4(%r13)
  cmpb   $0x3,0xb(%rbp)
  cmove  %edx,%eax
  xor    %r12d,%r12d
  mov    %eax,0x4(%r13)
  cmpb   $0x2,0xb(%rbp)
  setne  %r12b
  jmp    L55
  nopl   0x0(%rax)
L84:
  lea    D24(%rip),%rdi
  xor    %eax,%eax
  call   <error@plt>
  xor    %eax,%eax
  call   <immed@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <outdec@plt>
  xor    %eax,%eax
  call   <nl@plt>
  xor    %eax,%eax
  call   <junk@plt>
  jmp    L55
  nopl   0x0(%rax)
L95:
  mov    $0x1,%r8d
  xor    %ecx,%ecx
  mov    $0x2,%edx
  mov    %rbp,%rdi
  mov    $0x4,%esi
  xor    %eax,%eax
  call   <addglb@plt>
  movl   $0x0,0x4(%r13)
  mov    %eax,0x0(%r13)
  jmp    L55
  nopl   (%rax)
L127:
  xor    %eax,%eax
  call   <immed@plt>
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <outname@plt>
  xor    %eax,%eax
  call   <nl@plt>
  movsbl 0xc(%rbx),%eax
  mov    %eax,0x4(%r13)
  jmp    L55
L40:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D0
type_infered: string
name: unpack_data
arguments: data_label: D18
type_infered: string
name: unpack_data
arguments: data_label: D24
type_infered: string

tool: D0: (

tool: D18: )

tool: D24: invalid expression

assistant: ```c
primary(lval) int *lval;
{
  char *ptr, sname[11];
  int num[1];
  int k;
  if (match("(")) {
    k = heir1(lval);
    needbrack(")");
    return k;
  }
  if (symname(sname)) {
    if (ptr = findloc(sname)) {
      getloc(ptr);
      lval[0] = ptr;
      lval[1] = ptr[12];
      if (ptr[11] == 3)
        lval[1] = 2;
      if (ptr[11] == 2)
        return 0;
      else
        return 1;
    }
    if (ptr = findglb(sname))
      if (ptr[11] != 4) {
        lval[0] = ptr;
        lval[1] = 0;
        if (ptr[11] != 2)
          return 1;
        immed();
        outname(ptr);
        nl();
        lval[1] = ptr[12];
        return 0;
      }
    ptr = addglb(sname, 4, 2, 0, 1);
    lval[0] = ptr;
    lval[1] = 0;
    return 0;
  }
  if (constant(num))
    return (lval[0] = lval[1] = 0);
  else {
    error("invalid expression");
    immed();
    outdec(0);
    nl();
    junk();
    return 0;
  }
}
```