user: What would the C source look like for the assembly code provided here:

```asm
<getModuleFamily>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1d0,%rsp
  mov    %rdi,-0x1c8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x190(%rbp)
  movq   $0x0,-0x188(%rbp)
  movq   $0x0,-0x180(%rbp)
  movq   $0x0,-0x178(%rbp)
  movq   $0x0,-0x170(%rbp)
  movq   $0x0,-0x168(%rbp)
  movq   $0x0,-0x160(%rbp)
  movq   $0x0,-0x158(%rbp)
  movq   $0x0,-0x150(%rbp)
  movq   $0x0,-0x148(%rbp)
  movq   $0x0,-0x140(%rbp)
  movq   $0x0,-0x138(%rbp)
  movq   $0x0,-0x130(%rbp)
  movq   $0x0,-0x128(%rbp)
  movq   $0x0,-0x120(%rbp)
  movq   $0x0,-0x118(%rbp)
  movq   $0x0,-0x1b8(%rbp)
  movq   $0x0,-0x1b0(%rbp)
  movq   $0x0,-0x1a0(%rbp)
  movq   $0x0,-0x198(%rbp)
  movq   $0x0,-0x1a8(%rbp)
  lea    D102(%rip),%rax
  mov    %rax,%rsi
  lea    D114(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x1b8(%rbp)
  cmpq   $0x0,-0x1b8(%rbp)
  je     L191
  jmp    L105
L56:
  lea    -0x110(%rbp),%rax
  lea    D70(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L105
  lea    -0x110(%rbp),%rax
  add    $0x7,%rax
  mov    $0x3a,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x1a0(%rbp)
  mov    -0x1a0(%rbp),%rdx
  lea    -0x190(%rbp),%rax
  lea    D57(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
L105:
  mov    -0x1b8(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    $0xff,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L56
  mov    -0x1b8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    -0x190(%rbp),%rax
  lea    D17(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x1b0(%rbp)
  cmpq   $0x0,-0x1b0(%rbp)
  je     L78
  addq   $0x8,-0x1b0(%rbp)
  mov    -0x1b0(%rbp),%rax
  lea    D79(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x198(%rbp)
  cmpq   $0x0,-0x198(%rbp)
  je     L13
  mov    -0x198(%rbp),%rax
  sub    -0x1b0(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x1a8(%rbp)
  jmp    L58
L13:
  mov    -0x1b0(%rbp),%rax
  lea    D94(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcspn@plt>
  mov    %rax,-0x1a8(%rbp)
  jmp    L58
L78:
  lea    D102(%rip),%rax
  mov    %rax,%rsi
  lea    D109(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x1b8(%rbp)
  cmpq   $0x0,-0x1b8(%rbp)
  jne    L77
  lea    D102(%rip),%rax
  mov    %rax,%rsi
  lea    D63(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x1b8(%rbp)
L77:
  cmpq   $0x0,-0x1b8(%rbp)
  je     L58
  jmp    L175
L110:
  lea    -0x110(%rbp),%rax
  lea    D17(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x1b0(%rbp)
  cmpq   $0x0,-0x1b0(%rbp)
  jne    L203
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
L203:
  addq   $0x8,-0x1b0(%rbp)
  mov    -0x1b0(%rbp),%rax
  lea    D6(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x198(%rbp)
  cmpq   $0x0,-0x198(%rbp)
  je     L129
  mov    -0x198(%rbp),%rax
  sub    -0x1b0(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x1a8(%rbp)
  jmp    L175
L129:
  mov    -0x1b0(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x1a8(%rbp)
L175:
  mov    -0x1b8(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    $0xff,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L110
  mov    -0x1b8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  jmp    L58
L191:
  lea    D151(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
L58:
  mov    -0x1a8(%rbp),%rdx
  mov    -0x1b0(%rbp),%rcx
  mov    -0x1c8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    -0x1c8(%rbp),%rax
  lea    D96(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L52
  mov    $0x0,%eax
  jmp    L83
L52:
  mov    -0x1c8(%rbp),%rax
  lea    D154(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L92
  mov    $0x1,%eax
  jmp    L83
L92:
  mov    $0xffffffff,%eax
L83:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L185
  call   <__stack_chk_fail@plt>
L185:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D102
type_infered: string
name: unpack_data
arguments: label: D114
type_infered: string
name: unpack_data
arguments: label: D70
type_infered: string
name: unpack_data
arguments: label: D57
type_infered: string
name: unpack_data
arguments: label: D17
type_infered: string
name: unpack_data
arguments: label: D79
type_infered: string
name: unpack_data
arguments: label: D94
type_infered: string
name: unpack_data
arguments: label: D109
type_infered: string
name: unpack_data
arguments: label: D63
type_infered: string
name: unpack_data
arguments: label: D21
type_infered: string
name: unpack_data
arguments: label: D6
type_infered: string
name: unpack_data
arguments: label: D151
type_infered: string
name: unpack_data
arguments: label: D96
type_infered: string
name: unpack_data
arguments: label: D154
type_infered: string

tool: D102: r

tool: D114: /proc/cpuinfo

tool: D70: Hardware

tool: D57: %s

tool: D17: Toradex

tool: D79: Module

tool: D94: 


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

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

tool: D21: Invalid Machine!

tool: D6: on

tool: D151: CPU info not available!

tool: D96: Colibri

tool: D154: Apalis

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;
}
```