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

```asm
<primary>:
  endbr64
  push   %r13
  mov    %rdi,%r13
  lea    D18(%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    L103
  lea    0xf(%rsp),%rbp
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <symname@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L28
  xor    %eax,%eax
  lea    0x8(%rsp),%rdi
  call   <constant@plt>
  test   %eax,%eax
  je     L23
  movq   $0x0,0x0(%r13)
L26:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L92
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L28:
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <findloc@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L123
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <findglb@plt>
  movslq %eax,%rbx
  test   %eax,%eax
  je     L110
  cmpb   $0x4,0x9(%rbx)
  je     L110
  mov    %eax,0x0(%r13)
  movl   $0x0,0x4(%r13)
  cmpb   $0x2,0x9(%rbx)
  je     L120
  mov    $0x1,%r12d
  jmp    L26
  xchg   %ax,%ax
L103:
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <heir1@plt>
  lea    D12(%rip),%rdi
  mov    %eax,%r12d
  xor    %eax,%eax
  call   <needbrack@plt>
  jmp    L26
L123:
  movslq %eax,%rbp
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <getloc@plt>
  mov    %r12d,0x0(%r13)
  movsbl 0xa(%rbp),%eax
  mov    $0x2,%edx
  mov    %eax,0x4(%r13)
  cmpb   $0x3,0x9(%rbp)
  cmove  %edx,%eax
  xor    %r12d,%r12d
  mov    %eax,0x4(%r13)
  cmpb   $0x2,0x9(%rbp)
  setne  %r12b
  jmp    L26
  nopl   0x0(%rax)
L23:
  lea    D10(%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    L26
  nopl   0x0(%rax)
L110:
  xor    %ecx,%ecx
  mov    $0x2,%edx
  mov    $0x4,%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <addglb@plt>
  movl   $0x0,0x4(%r13)
  mov    %eax,0x0(%r13)
  jmp    L26
  nop
L120:
  xor    %eax,%eax
  call   <immed@plt>
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <outname@plt>
  xor    %eax,%eax
  call   <nl@plt>
  movsbl 0xa(%rbx),%eax
  movd   %eax,%xmm0
  pshufd $0xe0,%xmm0,%xmm0
  movq   %xmm0,0x4(%r13)
  jmp    L26
L92:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D18
type_guessed: string
name: extract_symbolic_data
arguments: label: D12
type_guessed: string
name: extract_symbolic_data
arguments: label: D10
type_guessed: string

tool: D18: (

tool: D12: )

tool: D10: invalid expression

assistant: ```c
primary(lval) int *lval;
{
  char *ptr, sname[9];
  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[10];
      if (ptr[9] == 3)
        lval[1] = 2;
      if (ptr[9] == 2)
        return 0;
      else
        return 1;
    }
    if (ptr = findglb(sname))
      if (ptr[9] != 4) {
        lval[0] = ptr;
        lval[1] = 0;
        if (ptr[9] != 2)
          return 1;
        immed();
        outname(ptr);
        nl();
        lval[1] = lval[2] = ptr[10];
        return 0;
      }
    ptr = addglb(sname, 4, 2, 0);
    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;
  }
}
```