user: Translate the below assembly code into C programming language:

```asm
<get_cpuname>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    $0x0,%eax
  call   <have_cpuid@plt>
  test   %eax,%eax
  jne    L1013
  mov    $0xb,%eax
  jmp    L1133
L1013:
  mov    $0x4,%edi
  call   <get_cputype@plt>
  mov    %eax,-0x14(%rbp)
  mov    $0x1,%edi
  call   <get_cputype@plt>
  mov    %eax,-0x10(%rbp)
  mov    $0x5,%edi
  call   <get_cputype@plt>
  mov    %eax,-0xc(%rbp)
  mov    $0x2,%edi
  call   <get_cputype@plt>
  mov    %eax,-0x8(%rbp)
  mov    $0x0,%eax
  call   <get_vendor@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x1,-0x4(%rbp)
  jne    L1571
  mov    -0x14(%rbp),%eax
  sub    $0x4,%eax
  cmp    $0xb,%eax
  ja     L56
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D63(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D63(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0xc,%eax
  jmp    L1133
  mov    $0xd,%eax
  jmp    L1133
  cmpl   $0x9,-0x8(%rbp)
  ja     L307
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D185(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D185(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  cmpl   $0x6,-0xc(%rbp)
  jg     L939
  cmpl   $0x0,-0xc(%rbp)
  jg     L1070
  jmp    L116
L698:
  mov    -0xc(%rbp),%eax
  sub    $0x7,%eax
  cmp    $0x8,%eax
  ja     L116
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D187(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D187(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
L1070:
  mov    -0xc(%rbp),%eax
  mov    $0x6a,%edx
  mov    %eax,%ecx
  shr    %cl,%rdx
  mov    %rdx,%rax
  and    $0x1,%eax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  jne    L1414
  jmp    L116
L939:
  cmpl   $0xf,-0xc(%rbp)
  jg     L116
  cmpl   $0x7,-0xc(%rbp)
  jge    L698
  jmp    L116
L1414:
  mov    $0xe,%eax
  jmp    L1133
  mov    $0xf,%eax
  jmp    L1133
  mov    $0x10,%eax
  jmp    L1133
  mov    $0x12,%eax
  jmp    L1133
  mov    -0xc(%rbp),%eax
  sub    $0x6,%eax
  cmp    $0x9,%eax
  ja     L586
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D41(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D41(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x12,%eax
  jmp    L1133
  mov    $0x13,%eax
  jmp    L1133
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x16,%eax
  jmp    L1133
  mov    $0x14,%eax
  jmp    L1133
  mov    -0xc(%rbp),%eax
  sub    $0x5,%eax
  cmp    $0xa,%eax
  ja     L1258
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D74(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D74(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L1082
  mov    $0x2c,%eax
  jmp    L1133
L1082:
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L1487
  mov    $0x2c,%eax
  jmp    L1133
L1487:
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x15,%eax
  jmp    L1133
  mov    -0xc(%rbp),%eax
  sub    $0x7,%eax
  cmp    $0x8,%eax
  ja     L1384
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D170(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D170(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x16,%eax
  jmp    L1133
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L1333
  mov    $0x2c,%eax
  jmp    L1133
L1333:
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L556
  mov    $0x30,%eax
  jmp    L1133
L556:
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L521
  mov    $0x30,%eax
  jmp    L1133
L521:
  mov    $0x15,%eax
  jmp    L1133
  mov    -0xc(%rbp),%eax
  sub    $0x5,%eax
  cmp    $0xa,%eax
  ja     L1507
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D186(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D186(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L974
  mov    $0x30,%eax
  jmp    L1133
L974:
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L638
  mov    $0x30,%eax
  jmp    L1133
L638:
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L308
  mov    $0x30,%eax
  jmp    L1133
L308:
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x15,%eax
  jmp    L1133
  mov    -0xc(%rbp),%eax
  sub    $0x5,%eax
  cmp    $0x9,%eax
  ja     L1325
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D180(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D180(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L476
  mov    $0x30,%eax
  jmp    L1133
L476:
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L22
  mov    $0x30,%eax
  jmp    L1133
L22:
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L804
  mov    $0x30,%eax
  jmp    L1133
L804:
  mov    $0x15,%eax
  jmp    L1133
  mov    $0x15,%eax
  jmp    L1133
  cmpl   $0xe,-0xc(%rbp)
  jne    L451
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L219
  mov    $0x30,%eax
  jmp    L1133
L219:
  mov    $0x15,%eax
  jmp    L1133
L116:
  nop
  jmp    L307
L586:
  nop
  jmp    L307
L1258:
  nop
  jmp    L307
L1384:
  nop
  jmp    L307
L1507:
  nop
  jmp    L307
L1325:
  nop
  jmp    L307
L451:
  nop
  jmp    L307
  mov    $0x17,%eax
  jmp    L1133
  cmpl   $0x0,-0x10(%rbp)
  je     L1021
  cmpl   $0x1,-0x10(%rbp)
  je     L1359
  jmp    L56
L1021:
  mov    $0x11,%eax
  jmp    L1133
L1359:
  mov    $0x17,%eax
  jmp    L1133
L307:
  nop
L56:
  mov    $0x1,%eax
  jmp    L1133
L1571:
  cmpl   $0x3,-0x4(%rbp)
  jne    L157
  cmpl   $0xf,-0x14(%rbp)
  je     L60
  cmpl   $0xf,-0x14(%rbp)
  jg     L700
  cmpl   $0x6,-0x14(%rbp)
  je     L1623
  cmpl   $0x6,-0x14(%rbp)
  jg     L700
  cmpl   $0x4,-0x14(%rbp)
  je     L988
  cmpl   $0x5,-0x14(%rbp)
  je     L624
  jmp    L700
L988:
  mov    $0x19,%eax
  jmp    L1133
L624:
  mov    $0x1a,%eax
  jmp    L1133
L1623:
  mov    $0x1b,%eax
  jmp    L1133
L60:
  cmpl   $0xa,-0x10(%rbp)
  ja     L579
  mov    -0x10(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D86(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D86(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x1d,%eax
  jmp    L1133
  mov    $0x1e,%eax
  jmp    L1133
  mov    $0x2d,%eax
  jmp    L1133
  cmpl   $0x8,-0xc(%rbp)
  ja     L1032
  mov    -0xc(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D126(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D126(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L1640
  mov    $0x2e,%eax
  jmp    L1133
L1640:
  mov    $0x1e,%eax
  jmp    L1133
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L760
  mov    $0x2f,%eax
  jmp    L1133
L760:
  mov    $0x1e,%eax
  jmp    L1133
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L893
  mov    $0x32,%eax
  jmp    L1133
L893:
  mov    $0x1e,%eax
  jmp    L1133
  cmpl   $0x6,-0x8(%rbp)
  je     L391
  cmpl   $0x6,-0x8(%rbp)
  jg     L1500
  cmpl   $0x1,-0x8(%rbp)
  je     L487
  cmpl   $0x3,-0x8(%rbp)
  je     L1090
  jmp    L1500
L487:
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L294
  mov    $0x2f,%eax
  jmp    L1133
L294:
  mov    $0x1e,%eax
  jmp    L1133
L1090:
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L852
  mov    $0x31,%eax
  jmp    L1133
L852:
  mov    $0x1e,%eax
  jmp    L1133
L391:
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L1639
  mov    $0x32,%eax
  jmp    L1133
L1639:
  mov    $0x1e,%eax
  jmp    L1133
L1500:
  nop
  jmp    L1032
  cmpl   $0x1,-0xc(%rbp)
  jne    L579
  mov    $0x0,%eax
  call   <support_avx@plt>
  test   %eax,%eax
  je     L419
  mov    $0x33,%eax
  jmp    L1133
L419:
  mov    $0x1e,%eax
  jmp    L1133
L1032:
  nop
L579:
  nop
L700:
  mov    $0x3,%eax
  jmp    L1133
L157:
  cmpl   $0x4,-0x4(%rbp)
  jne    L906
  cmpl   $0x6,-0x14(%rbp)
  je     L357
  cmpl   $0x6,-0x14(%rbp)
  jg     L1111
  cmpl   $0x4,-0x14(%rbp)
  je     L329
  cmpl   $0x5,-0x14(%rbp)
  je     L1000
  jmp    L1111
L329:
  mov    $0x21,%eax
  jmp    L1133
L1000:
  mov    $0x22,%eax
  jmp    L1133
L357:
  mov    $0x23,%eax
  jmp    L1133
L1111:
  mov    $0x4,%eax
  jmp    L1133
L906:
  cmpl   $0x5,-0x4(%rbp)
  jne    L1246
  cmpl   $0x5,-0x14(%rbp)
  jne    L1011
  mov    $0x24,%eax
  jmp    L1133
L1011:
  mov    $0x5,%eax
  jmp    L1133
L1246:
  cmpl   $0x6,-0x4(%rbp)
  jne    L1146
  cmpl   $0x5,-0x14(%rbp)
  je     L162
  cmpl   $0x6,-0x14(%rbp)
  je     L913
  jmp    L1034
L162:
  mov    $0x25,%eax
  jmp    L1133
L913:
  mov    $0x2b,%eax
  jmp    L1133
L1034:
  mov    $0x2a,%eax
  jmp    L1133
L1146:
  cmpl   $0x7,-0x4(%rbp)
  jne    L1161
  cmpl   $0x5,-0x14(%rbp)
  jne    L635
  mov    $0x26,%eax
  jmp    L1133
L635:
  mov    $0x7,%eax
  jmp    L1133
L1161:
  cmpl   $0x8,-0x4(%rbp)
  jne    L1139
  cmpl   $0x5,-0x14(%rbp)
  jne    L1480
  mov    $0x27,%eax
  jmp    L1133
L1480:
  mov    $0x8,%eax
  jmp    L1133
L1139:
  cmpl   $0x9,-0x4(%rbp)
  jne    L1583
  cmpl   $0x5,-0x14(%rbp)
  jne    L297
  mov    $0x28,%eax
  jmp    L1133
L297:
  mov    $0x9,%eax
  jmp    L1133
L1583:
  cmpl   $0xa,-0x4(%rbp)
  jne    L135
  cmpl   $0x5,-0x14(%rbp)
  jne    L788
  mov    $0x29,%eax
  jmp    L1133
L788:
  mov    $0xa,%eax
  jmp    L1133
L135:
  mov    $0x0,%eax
L1133:
  leave
  ret
```

assistant: ```c
int get_cpuname(void) {
  int family, exfamily, model, vendor, exmodel;
  if (!have_cpuid())
    return 11;
  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 0x4:
      return 12;
    case 0x5:
      return 13;
    case 0x6:
      switch (exmodel) {
      case 0:
        switch (model) {
        case 1:
        case 3:
        case 5:
        case 6:
          return 14;
        case 7:
        case 8:
        case 10:
        case 11:
          return 15;
        case 9:
        case 13:
        case 14:
          return 16;
        case 15:
          return 18;
        }
        break;
      case 1:
        switch (model) {
        case 6:
          return 18;
        case 7:
          return 19;
        case 10:
        case 11:
        case 14:
        case 15:
          return 21;
        case 12:
          return 22;
        case 13:
          return 20;
        }
        break;
      case 2:
        switch (model) {
        case 5:
          return 21;
        case 10:
          if (support_avx())
            return 44;
          else
            return 21;
        case 12:
          return 21;
        case 13:
          if (support_avx())
            return 44;
          else
            return 21;
        case 14:
        case 15:
          return 21;
        }
        break;
      case 3:
        switch (model) {
        case 7:
          return 22;
        case 10:
        case 14:
          if (support_avx())
            return 44;
          else
            return 21;
        case 12:
        case 15:
          if (support_avx())
            return 48;
          else
            return 21;
        case 13:
          if (support_avx())
            return 48;
          else
            return 21;
        }
        break;
      case 4:
        switch (model) {
        case 5:
        case 6:
          if (support_avx())
            return 48;
          else
            return 21;
        case 7:
        case 15:
          if (support_avx())
            return 48;
          else
            return 21;
        case 14:
          if (support_avx())
            return 48;
          else
            return 21;
        case 12:
        case 13:
          return 21;
        }
        break;
      case 5:
        switch (model) {
        case 6:
          if (support_avx())
            return 48;
          else
            return 21;
        case 5:
        case 14:
          if (support_avx())
            return 48;
          else
            return 21;
        case 7:
          if (support_avx())
            return 48;
          else
            return 21;
        case 12:
          return 21;
        }
        break;
      case 9:
      case 8:
        switch (model) {
        case 14:
          if (support_avx())
            return 48;
          else
            return 21;
        }
        break;
      }
      break;
    case 0x7:
      return 23;
    case 0xf:
      switch (exfamily) {
      case 0:
        return 17;
      case 1:
        return 23;
      }
      break;
    }
    return 1;
  }
  if (vendor == 3) {
    switch (family) {
    case 0x4:
      return 25;
    case 0x5:
      return 26;
    case 0x6:
      return 27;
    case 0xf:
      switch (exfamily) {
      case 0:
      case 2:
        return 29;
      case 1:
      case 3:
      case 7:
      case 10:
        return 30;
      case 5:
        return 45;
      case 6:
        switch (model) {
        case 1:
          if (support_avx())
            return 46;
          else
            return 30;
        case 2:
        case 3:
          if (support_avx())
            return 47;
          else
            return 30;
        case 5:
          if (support_avx())
            return 50;
          else
            return 30;
        case 0:
        case 8:
          switch (exmodel) {
          case 1:
            if (support_avx())
              return 47;
            else
              return 30;
          case 3:
            if (support_avx())
              return 49;
            else
              return 30;
          case 6:
            if (support_avx())
              return 50;
            else
              return 30;
          }
          break;
        }
        break;
      case 8:
        switch (model) {
        case 1:
          if (support_avx())
            return 51;
          else
            return 30;
        }
      }
      break;
    }
    return 3;
  }
  if (vendor == 4) {
    switch (family) {
    case 0x4:
      return 33;
    case 0x5:
      return 34;
    case 0x6:
      return 35;
    }
    return 4;
  }
  if (vendor == 5) {
    switch (family) {
    case 0x5:
      return 36;
    }
    return 5;
  }
  if (vendor == 6) {
    switch (family) {
    case 0x5:
      return 37;
      break;
    case 0x6:
      return 43;
      break;
    }
    return 42;
  }
  if (vendor == 7) {
    switch (family) {
    case 0x5:
      return 38;
    }
    return 7;
  }
  if (vendor == 8) {
    switch (family) {
    case 0x5:
      return 39;
    }
    return 8;
  }
  if (vendor == 9) {
    switch (family) {
    case 0x5:
      return 40;
    }
    return 9;
  }
  if (vendor == 10) {
    switch (family) {
    case 0x5:
      return 41;
    }
    return 10;
  }
  return 0;
}
```