user: Demonstrate the C code that generates the assembly output below:

```asm
<get_coretype>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <have_cpuid@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  test   %edx,%edx
  jne    L286
L242:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L286:
  mov    $0x4,%edi
  call   <get_cputype@plt>
  mov    %eax,%ebx
  mov    $0x1,%edi
  call   <get_cputype@plt>
  mov    %eax,%r13d
  mov    $0x5,%edi
  call   <get_cputype@plt>
  mov    %eax,%r12d
  mov    $0x2,%edi
  call   <get_cputype@plt>
  mov    %eax,%ebp
  mov    $0x0,%eax
  call   <get_vendor@plt>
  cmp    $0x1,%eax
  je     L92
L294:
  cmp    $0x3,%eax
  je     L357
L289:
  cmp    $0x6,%eax
  je     L393
  mov    $0x0,%eax
  jmp    L242
L92:
  cmp    $0x6,%ebx
  je     L145
  jg     L1
  cmp    $0x4,%ebx
  je     L242
  cmp    $0x5,%ebx
  jne    L289
  mov    $0x2,%eax
  jmp    L242
L1:
  cmp    $0xf,%ebx
  jne    L289
  cmp    $0x2,%r12d
  setg   %al
  movzbl %al,%eax
  add    $0x6,%eax
  jmp    L242
L145:
  cmp    $0x4,%ebp
  ja     L294
  mov    %ebp,%ebp
  lea    D22(%rip),%rcx
  movslq (%rcx,%rbp,4),%rdx
  add    %rcx,%rdx
  notrack jmp *%rdx
  cmp    $0xf,%r12d
  ja     L294
  mov    %r12d,%edx
  lea    D5(%rip),%rcx
  movslq (%rcx,%rdx,4),%rdx
  add    %rcx,%rdx
  notrack jmp *%rdx
  mov    $0x4,%eax
  jmp    L242
  mov    $0x5,%eax
  jmp    L242
  mov    $0x8,%eax
  jmp    L242
  mov    $0xe,%eax
  jmp    L242
  lea    -0x6(%r12),%edx
  cmp    $0x9,%edx
  ja     L294
  mov    %edx,%edx
  lea    D24(%rip),%rcx
  movslq (%rcx,%rdx,4),%rdx
  add    %rcx,%rdx
  notrack jmp *%rdx
  mov    $0xf,%eax
  jmp    L242
  mov    $0x11,%eax
  jmp    L242
  mov    $0x12,%eax
  jmp    L242
  mov    $0x10,%eax
  jmp    L242
  lea    -0x5(%r12),%edx
  cmp    $0xa,%edx
  ja     L294
  mov    %edx,%edx
  lea    D36(%rip),%rcx
  movslq (%rcx,%rdx,4),%rdx
  add    %rcx,%rdx
  notrack jmp *%rdx
  mov    $0x0,%eax
  call   <support_avx@plt>
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0xfffffffd,%eax
  add    $0x14,%eax
  jmp    L242
  mov    $0x0,%eax
  call   <support_avx@plt>
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0xfffffffd,%eax
  add    $0x14,%eax
  jmp    L242
  cmp    $0xa,%r12d
  je     L157
  cmp    $0xc,%r12d
  jne    L289
  mov    $0x0,%eax
  call   <support_avx@plt>
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0xfffffffd,%eax
  add    $0x14,%eax
  jmp    L242
L157:
  mov    $0x0,%eax
  call   <support_avx@plt>
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0xfffffffd,%eax
  add    $0x14,%eax
  jmp    L242
  mov    $0x0,%eax
  cmp    $0x5,%r12d
  jne    L242
  call   <support_avx@plt>
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0xfffffffd,%eax
  add    $0x14,%eax
  jmp    L242
L357:
  mov    $0x1,%eax
  cmp    $0x5,%ebx
  jle    L242
  mov    $0x9,%eax
  cmp    $0xe,%ebx
  jle    L242
  mov    $0x0,%eax
  cmp    $0xf,%ebx
  jne    L242
  mov    $0xa,%eax
  test   $0xfffffffd,%r13d
  je     L242
  cmp    $0x5,%r13d
  je     L295
  mov    $0xb,%eax
  cmp    $0x6,%r13d
  jne    L242
  cmp    $0x1,%r12d
  je     L253
  mov    $0x0,%eax
  cmp    $0x2,%r12d
  jne    L242
  mov    $0x0,%eax
  call   <support_avx@plt>
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0xfffffff4,%eax
  add    $0x17,%eax
  jmp    L242
L253:
  mov    $0x0,%eax
  call   <support_avx@plt>
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0xfffffff5,%eax
  add    $0x16,%eax
  jmp    L242
L393:
  cmp    $0x6,%ebx
  mov    $0x13,%eax
  mov    $0xc,%edx
  cmovne %edx,%eax
  jmp    L242
  mov    $0x3,%eax
  jmp    L242
  mov    $0xe,%eax
  jmp    L242
  mov    $0x11,%eax
  jmp    L242
L295:
  mov    $0x15,%eax
  jmp    L242
```

assistant: ```c
int get_coretype(void) {
  int family, exfamily, model, exmodel, vendor;
  if (!have_cpuid())
    return 1;
  family = get_cputype(4);
  exfamily = get_cputype(1);
  model = get_cputype(5);
  exmodel = get_cputype(2);
  vendor = get_vendor();
  if (vendor == 1) {
    switch (family) {
    case 4:
      return 1;
    case 5:
      return 2;
    case 6:
      switch (exmodel) {
      case 0:
        switch (model) {
        case 0:
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
        case 6:
          return 3;
        case 7:
          return 4;
        case 8:
        case 10:
        case 11:
          return 5;
        case 9:
        case 13:
        case 14:
          return 8;
        case 15:
          return 14;
        }
        break;
      case 1:
        switch (model) {
        case 6:
          return 14;
        case 7:
          return 15;
        case 10:
        case 11:
        case 14:
        case 15:
          return 17;
        case 12:
          return 18;
        case 13:
          return 16;
        }
        break;
      case 2:
        switch (model) {
        case 5:
          return 17;
        case 10:
          if (support_avx())
            return 20;
          else
            return 17;
        case 12:
          return 17;
        case 13:
          if (support_avx())
            return 20;
          else
            return 17;
        case 14:
        case 15:
          return 17;
        }
        break;
      case 3:
        switch (model) {
        case 10:
          if (support_avx())
            return 20;
          else
            return 17;
        case 12:
          if (support_avx())
            return 20;
          else
            return 17;
        }
        break;
      case 4:
        switch (model) {
        case 5:
          if (support_avx())
            return 20;
          else
            return 17;
        }
        break;
      }
      break;
    case 15:
      if (model <= 0x2)
        return 6;
      else
        return 7;
    }
  }
  if (vendor == 3) {
    if (family <= 0x5)
      return 1;
    if (family <= 0xe)
      return 9;
    if (family == 0xf) {
      if ((exfamily == 0) || (exfamily == 2))
        return 10;
      else if (exfamily == 5)
        return 21;
      else if (exfamily == 6) {
        switch (model) {
        case 1:
          if (support_avx())
            return 22;
          else
            return 11;
        case 2:
          if (support_avx())
            return 23;
          else
            return 11;
        }
      } else
        return 11;
    }
  }
  if (vendor == 6) {
    switch (family) {
    case 0x6:
      return 19;
      break;
    }
    return 12;
  }
  return 0;
}
```