user: What is the c source code of the assembly code below:

```asm
<getModuleFamily>:
  endbr64
  push   %r15
  lea    D120(%rip),%r15
  pxor   %xmm0,%xmm0
  push   %r14
  mov    %r15,%rsi
  push   %r13
  mov    %rdi,%r13
  lea    D56(%rip),%rdi
  push   %r12
  lea    D86(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x1a8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x198(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x10(%rsp)
  lea    0x10(%rsp),%r14
  lea    0x90(%rsp),%rbx
  movaps %xmm0,0x20(%rsp)
  movaps %xmm0,0x30(%rsp)
  movaps %xmm0,0x40(%rsp)
  movaps %xmm0,0x50(%rsp)
  movaps %xmm0,0x60(%rsp)
  movaps %xmm0,0x70(%rsp)
  movaps %xmm0,0x80(%rsp)
  call   <fopen@plt>
  mov    %rax,%rbp
  lea    0x97(%rsp),%rax
  mov    %rax,0x8(%rsp)
  test   %rbp,%rbp
  jne    L78
  jmp    L150
  xchg   %ax,%ax
L72:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L161
L78:
  mov    %rbp,%rdx
  mov    $0xff,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L72
  mov    %rbp,%rdi
  lea    D39(%rip),%r12
  call   <fclose@plt>
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <strstr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L197
  add    $0x8,%rbp
  lea    D29(%rip),%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L192
  sub    %rbp,%rax
  lea    -0x1(%rax),%r15
L199:
  mov    %r15,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strncpy@plt>
  lea    D115(%rip),%rsi
  mov    %r13,%rdi
  call   <strstr@plt>
  mov    %rax,%r8
  xor    %eax,%eax
  test   %r8,%r8
  jne    L198
  lea    D139(%rip),%rsi
  mov    %r13,%rdi
  call   <strstr@plt>
  cmp    $0x1,%rax
  sbb    %eax,%eax
  or     $0x1,%eax
L198:
  mov    0x198(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L84
  add    $0x1a8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L161:
  mov    0x8(%rsp),%rdi
  mov    $0x3a,%esi
  call   <strchr@plt>
  lea    D5(%rip),%rsi
  mov    %r14,%rdi
  mov    %rax,%rdx
  call   <sprintf@plt>
  jmp    L78
  cs nopw 0x0(%rax,%rax,1)
L192:
  lea    D77(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcspn@plt>
  mov    %rax,%r15
  jmp    L199
  nopw   0x0(%rax,%rax,1)
L150:
  lea    D33(%rip),%rdi
  xor    %r15d,%r15d
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L199
L197:
  mov    %r15,%rsi
  lea    D118(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L38
L34:
  xor    %r15d,%r15d
  nopl   0x0(%rax)
L99:
  mov    %r14,%rdx
  mov    $0xff,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L90
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L103
L130:
  add    $0x8,%rbp
  lea    D47(%rip),%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L109
  sub    %rbp,%rax
  lea    -0x1(%rax),%r15
  jmp    L99
  nopl   0x0(%rax)
L109:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rax,%r15
  jmp    L99
L103:
  lea    D94(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L130
L90:
  mov    %r14,%rdi
  call   <fclose@plt>
  jmp    L199
L38:
  mov    %r15,%rsi
  lea    D89(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  test   %rax,%rax
  jne    L34
  xor    %r15d,%r15d
  jmp    L199
L84:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D120
type: string
name: extract_symbolic_data
arguments: tag: D56
type: string
name: extract_symbolic_data
arguments: tag: D86
type: string
name: extract_symbolic_data
arguments: tag: D39
type: string
name: extract_symbolic_data
arguments: tag: D29
type: string
name: extract_symbolic_data
arguments: tag: D115
type: string
name: extract_symbolic_data
arguments: tag: D139
type: string
name: extract_symbolic_data
arguments: tag: D5
type: string
name: extract_symbolic_data
arguments: tag: D77
type: string
name: extract_symbolic_data
arguments: tag: D33
type: string
name: extract_symbolic_data
arguments: tag: D118
type: string
name: extract_symbolic_data
arguments: tag: D47
type: string
name: extract_symbolic_data
arguments: tag: D94
type: string
name: extract_symbolic_data
arguments: tag: D89
type: string

tool: D120: r

tool: D56: /proc/cpuinfo

tool: D86: Hardware

tool: D39: Toradex

tool: D29: Module

tool: D115: Colibri

tool: D139: Apalis

tool: D5: %s

tool: D77: 


tool: D33: CPU info not available!

tool: D118: /sys/firmware/devicetree/base/model

tool: D47: on

tool: D94: Invalid Machine!

tool: D89: /sys/bus/soc/devices/soc0/machine

assistant: ```c
unsigned int getModuleFamily(char *moduleName) {
  char buf[256], hardware[128] = {0};
  FILE *file = NULL;
  char *start = NULL, *numStr = NULL, *end = NULL;
  size_t len = 0;
  file = fopen("/proc/cpuinfo", "r");
  if (file) {
    while (fgets(buf, 255, file)) {
      if (strstr(buf, "Hardware")) {
        numStr = strstr(&buf[7], ":");
        sprintf(hardware, "%s", numStr);
      }
    }
    fclose(file);
    start = strstr(hardware, "Toradex");
    if (start != NULL) {
      start += 8;
      end = strstr(start, "Module");
      if (end)
        len = end - start - 1;
      else
        len = strcspn(start, "\n");
    } else {
      file = fopen("/sys/firmware/devicetree/base/model", "r");
      if (file == NULL) {
        file = fopen("/sys/bus/soc/devices/soc0/machine", "r");
      }
      if (file) {
        while (fgets(buf, 255, file)) {
          start = strstr(buf, "Toradex");
          if (start == NULL) {
            printf("Invalid Machine!");
            exit(-1);
          }
          start += 8;
          end = strstr(start, "on");
          if (end)
            len = end - start - 1;
          else
            len = strlen(start);
        }
        fclose(file);
      }
    }
  } else {
    printf("CPU info not available!");
    exit(-1);
  }
  strncpy(moduleName, start, len);
  if (strstr(moduleName, "Colibri")) {
    return 0;
  } else if (strstr(moduleName, "Apalis")) {
    return 1;
  }
  return -1;
}
```