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

```asm
<get_coretype>:
  endbr64
  push   %r13
  xor    %eax,%eax
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <have_cpuid@plt>
  test   %eax,%eax
  jne    L311
L371:
  mov    $0x1,%eax
L144:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L311:
  mov    $0x4,%edi
  call   <get_cputype@plt>
  mov    $0x1,%edi
  mov    %eax,%ebx
  call   <get_cputype@plt>
  mov    $0x5,%edi
  mov    %eax,%r12d
  call   <get_cputype@plt>
  mov    $0x2,%edi
  mov    %eax,%ebp
  call   <get_cputype@plt>
  mov    %eax,%r13d
  xor    %eax,%eax
  call   <get_vendor@plt>
  cmp    $0x1,%eax
  je     L354
  cmp    $0x3,%eax
  je     L247
  cmp    $0x6,%eax
  jne    L27
  cmp    $0x6,%ebx
  mov    $0x13,%eax
  mov    $0xc,%edx
  cmovne %edx,%eax
  jmp    L144
  cmp    $0x5,%ebp
  je     L179
L27:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L354:
  cmp    $0x6,%ebx
  je     L367
  jg     L151
  cmp    $0x4,%ebx
  je     L144
  xor    %eax,%eax
  cmp    $0x5,%ebx
  sete   %al
  add    $0x8,%rsp
  pop    %rbx
  add    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L151:
  cmp    $0xf,%ebx
  jne    L27
  xor    %eax,%eax
  cmp    $0x2,%ebp
  setg   %al
  add    $0x6,%eax
  jmp    L144
  nopl   (%rax)
L247:
  cmp    $0x5,%ebx
  jle    L371
  mov    $0x9,%eax
  cmp    $0xe,%ebx
  jle    L144
  xor    %eax,%eax
  cmp    $0xf,%ebx
  jne    L144
  mov    $0xa,%eax
  test   $0xfffffffd,%r12d
  je     L144
  cmp    $0x5,%r12d
  je     L225
  mov    $0xb,%eax
  cmp    $0x6,%r12d
  jne    L144
  cmp    $0x1,%ebp
  je     L363
  cmp    $0x2,%ebp
  jne    L27
  xor    %eax,%eax
  call   <support_avx@plt>
  mov    %eax,%r8d
  mov    $0x17,%eax
  test   %r8d,%r8d
  jne    L144
L8:
  mov    $0xb,%eax
  jmp    L144
  nopl   0x0(%rax)
L367:
  cmp    $0x4,%r13d
  ja     L27
  lea    D16(%rip),%rdx
  mov    %r13d,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  sub    $0xa,%ebp
  and    $0xfffffffd,%ebp
  jne    L27
L179:
  xor    %eax,%eax
  call   <support_avx@plt>
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0xfffffffd,%eax
  add    $0x14,%eax
  jmp    L144
  cmp    $0xf,%ebp
  ja     L27
  mov    $0x1,%edx
  mov    %ebp,%ecx
  mov    $0x11,%eax
  shl    %cl,%rdx
  test   $0xd020,%edx
  jne    L144
  xor    %eax,%eax
  and    $0x24,%dh
  je     L144
  jmp    L179
  sub    $0x6,%ebp
  cmp    $0x9,%ebp
  ja     L27
  lea    D13(%rip),%rdx
  movslq (%rdx,%rbp,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  cmp    $0xf,%ebp
  ja     L27
  lea    D3(%rip),%rdx
  movslq (%rdx,%rbp,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x3,%eax
  jmp    L144
  mov    $0x11,%eax
  jmp    L144
  mov    $0x8,%eax
  jmp    L144
  mov    $0x5,%eax
  jmp    L144
  mov    $0xe,%eax
  jmp    L144
  mov    $0x10,%eax
  jmp    L144
  mov    $0x12,%eax
  jmp    L144
  mov    $0xf,%eax
  jmp    L144
  mov    $0x4,%eax
  jmp    L144
L363:
  xor    %eax,%eax
  call   <support_avx@plt>
  mov    %eax,%r8d
  mov    $0x16,%eax
  test   %r8d,%r8d
  jne    L144
  jmp    L8
L225:
  mov    $0x15,%eax
  jmp    L144
```

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