#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int get_cputype(int);
int get_vendor();
int /*<<< orphan*/ have_cpuid();
int /*<<< orphan*/ support_avx();
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 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;
        }
        break;
      case 5:
        switch (model) {
        case 6:
          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 10:
        return 30;
      case 6:
        switch (model) {
        case 1:
          if (support_avx())
            return 46;
          else
            return 30;
        case 2:
          if (support_avx())
            return 47;
          else
            return 30;
        case 0:
          if (support_avx())
            return 49;
          else
            return 30;
        }
        break;
      case 5:
        return 45;
      }
      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;
}


x86 assembly (clang, -O0):
<get_cpuname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    $0x0,%al
call   1060 <have_cpuid@plt>
cmp    $0x0,%eax
jne    1164 <get_cpuname+0x24>
movl   $0xb,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
mov    $0x4,%edi
call   1030 <get_cputype@plt>
mov    %eax,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <get_cputype@plt>
mov    %eax,-0xc(%rbp)
mov    $0x5,%edi
call   1030 <get_cputype@plt>
mov    %eax,-0x10(%rbp)
mov    $0x2,%edi
call   1030 <get_cputype@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <get_vendor@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    154c <get_cpuname+0x40c>
mov    -0x8(%rbp),%eax
add    $0xfffffffc,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0xb,%eax
ja     1540 <get_cpuname+0x400>
mov    -0x20(%rbp),%rax
lea    0xe90(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xc,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0xd,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
mov    -0x18(%rbp),%eax
mov    %rax,-0x28(%rbp)
sub    $0x5,%rax
ja     14ee <get_cpuname+0x3ae>
mov    -0x28(%rbp),%rax
lea    0xe83(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0xe,%eax
ja     126b <get_cpuname+0x12b>
mov    -0x30(%rbp),%rax
lea    0xede(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xe,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0xf,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x10,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x12,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
jmp    14ee <get_cpuname+0x3ae>
mov    -0x10(%rbp),%eax
add    $0xfffffffa,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x9,%eax
ja     12d5 <get_cpuname+0x195>
mov    -0x38(%rbp),%rax
lea    0xe58(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x12,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x13,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x15,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x16,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x14,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
jmp    14ee <get_cpuname+0x3ae>
mov    -0x10(%rbp),%eax
add    $0xfffffffb,%eax
mov    %eax,%ecx
mov    %rcx,-0x40(%rbp)
sub    $0xa,%eax
ja     1377 <get_cpuname+0x237>
mov    -0x40(%rbp),%rax
lea    0xdc2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x15,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     132b <get_cpuname+0x1eb>
movl   $0x2c,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x15,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x15,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     135f <get_cpuname+0x21f>
movl   $0x2c,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x15,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x15,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
jmp    14ee <get_cpuname+0x3ae>
mov    -0x10(%rbp),%eax
add    $0xfffffff6,%eax
mov    %eax,%ecx
mov    %rcx,-0x48(%rbp)
sub    $0x5,%eax
ja     141d <get_cpuname+0x2dd>
mov    -0x48(%rbp),%rax
lea    0xd08(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     13c1 <get_cpuname+0x281>
movl   $0x2c,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x15,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     13e9 <get_cpuname+0x2a9>
movl   $0x30,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x15,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     1411 <get_cpuname+0x2d1>
movl   $0x30,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x15,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
jmp    14ee <get_cpuname+0x3ae>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4c(%rbp)
add    $0xfffffffb,%eax
sub    $0x2,%eax
jb     145b <get_cpuname+0x31b>
jmp    1439 <get_cpuname+0x2f9>
mov    -0x4c(%rbp),%eax
sub    $0x7,%eax
je     1483 <get_cpuname+0x343>
jmp    144a <get_cpuname+0x30a>
mov    -0x4c(%rbp),%eax
sub    $0xf,%eax
je     1483 <get_cpuname+0x343>
jmp    14ab <get_cpuname+0x36b>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     1477 <get_cpuname+0x337>
movl   $0x30,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x15,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     149f <get_cpuname+0x35f>
movl   $0x30,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x15,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
jmp    14ee <get_cpuname+0x3ae>
mov    -0x10(%rbp),%eax
sub    $0x6,%eax
jne    14e9 <get_cpuname+0x3a9>
jmp    14c1 <get_cpuname+0x381>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     14dd <get_cpuname+0x39d>
movl   $0x30,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x15,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
jmp    14ee <get_cpuname+0x3ae>
jmp    1540 <get_cpuname+0x400>
movl   $0x17,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
mov    -0xc(%rbp),%eax
mov    %eax,-0x50(%rbp)
test   %eax,%eax
je     1523 <get_cpuname+0x3e3>
jmp    1512 <get_cpuname+0x3d2>
mov    -0x50(%rbp),%eax
sub    $0x1,%eax
je     152f <get_cpuname+0x3ef>
jmp    153b <get_cpuname+0x3fb>
movl   $0x11,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x17,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
jmp    1540 <get_cpuname+0x400>
movl   $0x1,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
cmpl   $0x3,-0x14(%rbp)
jne    16af <get_cpuname+0x56f>
mov    -0x8(%rbp),%eax
add    $0xfffffffc,%eax
mov    %eax,%ecx
mov    %rcx,-0x58(%rbp)
sub    $0xb,%eax
ja     16a3 <get_cpuname+0x563>
mov    -0x58(%rbp),%rax
lea    0xa8a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x19,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x1a,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x1b,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
mov    -0xc(%rbp),%eax
mov    %rax,-0x60(%rbp)
sub    $0xa,%rax
ja     169e <get_cpuname+0x55e>
mov    -0x60(%rbp),%rax
lea    0xa71(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1d,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x1e,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
mov    -0x10(%rbp),%eax
mov    %eax,-0x64(%rbp)
test   %eax,%eax
je     1665 <get_cpuname+0x525>
jmp    15f3 <get_cpuname+0x4b3>
mov    -0x64(%rbp),%eax
sub    $0x1,%eax
je     1615 <get_cpuname+0x4d5>
jmp    1604 <get_cpuname+0x4c4>
mov    -0x64(%rbp),%eax
sub    $0x2,%eax
je     163d <get_cpuname+0x4fd>
jmp    168d <get_cpuname+0x54d>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     1631 <get_cpuname+0x4f1>
movl   $0x2e,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x1e,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     1659 <get_cpuname+0x519>
movl   $0x2f,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x1e,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     1681 <get_cpuname+0x541>
movl   $0x31,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x1e,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
jmp    169e <get_cpuname+0x55e>
movl   $0x2d,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
jmp    16a3 <get_cpuname+0x563>
movl   $0x3,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
cmpl   $0x4,-0x14(%rbp)
jne    171f <get_cpuname+0x5df>
mov    -0x8(%rbp),%eax
mov    %eax,-0x68(%rbp)
sub    $0x4,%eax
je     16ef <get_cpuname+0x5af>
jmp    16cd <get_cpuname+0x58d>
mov    -0x68(%rbp),%eax
sub    $0x5,%eax
je     16fb <get_cpuname+0x5bb>
jmp    16de <get_cpuname+0x59e>
mov    -0x68(%rbp),%eax
sub    $0x6,%eax
je     1707 <get_cpuname+0x5c7>
jmp    1713 <get_cpuname+0x5d3>
movl   $0x21,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x22,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x23,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x4,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
cmpl   $0x5,-0x14(%rbp)
jne    1752 <get_cpuname+0x612>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    1746 <get_cpuname+0x606>
jmp    173a <get_cpuname+0x5fa>
movl   $0x24,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x5,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
cmpl   $0x6,-0x14(%rbp)
jne    17a5 <get_cpuname+0x665>
mov    -0x8(%rbp),%eax
mov    %eax,-0x6c(%rbp)
sub    $0x5,%eax
je     1781 <get_cpuname+0x641>
jmp    1770 <get_cpuname+0x630>
mov    -0x6c(%rbp),%eax
sub    $0x6,%eax
je     178d <get_cpuname+0x64d>
jmp    1799 <get_cpuname+0x659>
movl   $0x25,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x2b,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x2a,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
cmpl   $0x7,-0x14(%rbp)
jne    17d8 <get_cpuname+0x698>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    17cc <get_cpuname+0x68c>
jmp    17c0 <get_cpuname+0x680>
movl   $0x26,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x7,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
cmpl   $0x8,-0x14(%rbp)
jne    180b <get_cpuname+0x6cb>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    17ff <get_cpuname+0x6bf>
jmp    17f3 <get_cpuname+0x6b3>
movl   $0x27,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x8,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
cmpl   $0x9,-0x14(%rbp)
jne    183e <get_cpuname+0x6fe>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    1832 <get_cpuname+0x6f2>
jmp    1826 <get_cpuname+0x6e6>
movl   $0x28,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x9,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
cmpl   $0xa,-0x14(%rbp)
jne    1871 <get_cpuname+0x731>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    1865 <get_cpuname+0x725>
jmp    1859 <get_cpuname+0x719>
movl   $0x29,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0xa,-0x4(%rbp)
jmp    1878 <get_cpuname+0x738>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cpuname>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
xor    %ebp,%ebp
xor    %eax,%eax
call   1060 <have_cpuid@plt>
test   %eax,%eax
je     11cf <get_cpuname+0x8f>
mov    $0x4,%edi
call   1030 <get_cputype@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1030 <get_cputype@plt>
mov    %eax,%r15d
mov    $0x5,%edi
call   1030 <get_cputype@plt>
mov    %eax,%r14d
mov    $0x2,%edi
call   1030 <get_cputype@plt>
mov    %eax,%r12d
xor    %eax,%eax
call   1040 <get_vendor@plt>
add    $0xffffffff,%eax
cmp    $0x9,%eax
ja     11d4 <get_cpuname+0x94>
lea    0xe62(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    $0xfffffffc,%ebx
cmp    $0xb,%ebx
ja     1431 <get_cpuname+0x2f1>
mov    $0xc,%ebp
lea    0xec5(%rip),%rax
movslq (%rax,%rbx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0xd,%ebp
jmp    11d4 <get_cpuname+0x94>
mov    $0xb,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0xfffffffc,%ebx
cmp    $0xb,%ebx
ja     1370 <get_cpuname+0x230>
mov    $0x19,%ebp
lea    0xe31(%rip),%rax
movslq (%rax,%rbx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0x1a,%ebp
jmp    11d4 <get_cpuname+0x94>
lea    -0x4(%rbx),%eax
add    $0x1d,%ebx
cmp    $0x3,%eax
mov    $0x4,%ebp
cmovb  %ebx,%ebp
jmp    11d4 <get_cpuname+0x94>
cmp    $0x5,%ebx
mov    $0x24,%eax
mov    $0x5,%ebp
cmove  %eax,%ebp
jmp    11d4 <get_cpuname+0x94>
xor    %eax,%eax
cmp    $0x6,%ebx
sete   %al
or     $0x2a,%eax
cmp    $0x5,%ebx
mov    $0x25,%ebp
cmovne %eax,%ebp
jmp    11d4 <get_cpuname+0x94>
cmp    $0x5,%ebx
mov    $0x26,%eax
mov    $0x7,%ebp
cmove  %eax,%ebp
jmp    11d4 <get_cpuname+0x94>
cmp    $0x5,%ebx
mov    $0x27,%eax
mov    $0x8,%ebp
cmove  %eax,%ebp
jmp    11d4 <get_cpuname+0x94>
cmp    $0x5,%ebx
mov    $0x28,%eax
mov    $0x9,%ebp
cmove  %eax,%ebp
jmp    11d4 <get_cpuname+0x94>
cmp    $0x5,%ebx
mov    $0x29,%eax
mov    $0xa,%ebp
cmove  %eax,%ebp
jmp    11d4 <get_cpuname+0x94>
mov    $0x1b,%ebp
jmp    11d4 <get_cpuname+0x94>
cmp    $0xa,%r15d
ja     1370 <get_cpuname+0x230>
mov    $0x1d,%ebp
mov    %r15d,%eax
lea    0xd9d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x1e,%ebp
jmp    11d4 <get_cpuname+0x94>
cmp    $0x5,%r12d
ja     1431 <get_cpuname+0x2f1>
mov    %r12d,%eax
lea    0xdd2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    $0xffffffff,%r14d
cmp    $0xf,%r14d
jae    1431 <get_cpuname+0x2f1>
movslq %r14d,%rax
lea    0xde1(%rip),%rcx
jmp    1392 <get_cpuname+0x252>
mov    $0x17,%ebp
jmp    11d4 <get_cpuname+0x94>
cmp    $0x1,%r15d
mov    $0x17,%eax
mov    $0x1,%ecx
cmove  %eax,%ecx
test   %r15d,%r15d
mov    $0x11,%ebp
cmovne %ecx,%ebp
jmp    11d4 <get_cpuname+0x94>
mov    $0x2d,%ebp
jmp    11d4 <get_cpuname+0x94>
test   %r14d,%r14d
je     143b <get_cpuname+0x2fb>
cmp    $0x2,%r14d
je     1456 <get_cpuname+0x316>
cmp    $0x1,%r14d
jne    1370 <get_cpuname+0x230>
xor    %eax,%eax
call   1050 <support_avx@plt>
xor    %ebp,%ebp
test   %eax,%eax
setne  %bpl
shl    $0x4,%ebp
add    $0x1e,%ebp
jmp    11d4 <get_cpuname+0x94>
mov    $0x3,%ebp
jmp    11d4 <get_cpuname+0x94>
add    $0xfffffffa,%r14d
cmp    $0xa,%r14d
jae    1431 <get_cpuname+0x2f1>
movslq %r14d,%rax
lea    0xd8e(%rip),%rcx
mov    (%rcx,%rax,4),%ebp
jmp    11d4 <get_cpuname+0x94>
cmp    $0xf,%r14d
ja     1431 <get_cpuname+0x2f1>
mov    $0x15,%ebp
mov    $0xd020,%eax
bt     %r14d,%eax
jb     11d4 <get_cpuname+0x94>
cmp    $0xa,%r14d
je     13e0 <get_cpuname+0x2a0>
cmp    $0xd,%r14d
je     13e0 <get_cpuname+0x2a0>
jmp    1431 <get_cpuname+0x2f1>
add    $0xfffffff6,%r14d
cmp    $0x5,%r14d
ja     1431 <get_cpuname+0x2f1>
lea    0xcf5(%rip),%rax
movslq (%rax,%r14,4),%rcx
add    %rax,%rcx
jmp    *%rcx
xor    %eax,%eax
call   1050 <support_avx@plt>
test   %eax,%eax
mov    $0x15,%eax
mov    $0x2c,%ebp
cmove  %eax,%ebp
jmp    11d4 <get_cpuname+0x94>
lea    -0x5(%r14),%eax
cmp    $0x2,%eax
jb     1410 <get_cpuname+0x2d0>
cmp    $0x7,%r14d
je     1410 <get_cpuname+0x2d0>
cmp    $0xf,%r14d
jne    1431 <get_cpuname+0x2f1>
xor    %eax,%eax
call   1050 <support_avx@plt>
test   %eax,%eax
mov    $0x15,%eax
mov    $0x30,%ebp
cmove  %eax,%ebp
jmp    11d4 <get_cpuname+0x94>
cmp    $0x6,%r14d
je     1410 <get_cpuname+0x2d0>
mov    $0x1,%ebp
jmp    11d4 <get_cpuname+0x94>
xor    %eax,%eax
call   1050 <support_avx@plt>
test   %eax,%eax
mov    $0x1e,%eax
mov    $0x31,%ebp
cmove  %eax,%ebp
jmp    11d4 <get_cpuname+0x94>
xor    %eax,%eax
call   1050 <support_avx@plt>
test   %eax,%eax
mov    $0x1e,%eax
mov    $0x2f,%ebp
cmove  %eax,%ebp
jmp    11d4 <get_cpuname+0x94>

LLVM IR (-O0):
define i32 @get_cpuname() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = call i32 (...) @have_cpuid()
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %0
store i32 11, i32* %1
br label %188
10: ; preds = %0
%11 = call i32 @get_cputype(i32 4)
store i32 %11, i32* %2
%12 = call i32 @get_cputype(i32 1)
store i32 %12, i32* %3
%13 = call i32 @get_cputype(i32 5)
store i32 %13, i32* %4
%14 = call i32 @get_cputype(i32 2)
store i32 %14, i32* %6
%15 = call i32 (...) @get_vendor()
store i32 %15, i32* %5
%16 = load i32, i32* %5
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %102
18: ; preds = %10
%19 = load i32, i32* %2
switch i32 %19, label %101 [
i32 4, label %20
i32 5, label %21
i32 6, label %22
i32 7, label %95
i32 15, label %96
]
20: ; preds = %18
store i32 12, i32* %1
br label %188
21: ; preds = %18
store i32 13, i32* %1
br label %188
22: ; preds = %18
%23 = load i32, i32* %6
switch i32 %23, label %94 [
i32 0, label %24
i32 1, label %31
i32 2, label %39
i32 3, label %55
i32 4, label %73
i32 5, label %86
]
24: ; preds = %22
%25 = load i32, i32* %4
switch i32 %25, label %30 [
i32 1, label %26
i32 3, label %26
i32 5, label %26
i32 6, label %26
i32 7, label %27
i32 8, label %27
i32 10, label %27
i32 11, label %27
i32 9, label %28
i32 13, label %28
i32 14, label %28
i32 15, label %29
]
26: ; preds = %24, %24, %24, %24
store i32 14, i32* %1
br label %188
27: ; preds = %24, %24, %24, %24
store i32 15, i32* %1
br label %188
28: ; preds = %24, %24, %24
store i32 16, i32* %1
br label %188
29: ; preds = %24
store i32 18, i32* %1
br label %188
30: ; preds = %24
br label %94
31: ; preds = %22
%32 = load i32, i32* %4
switch i32 %32, label %38 [
i32 6, label %33
i32 7, label %34
i32 10, label %35
i32 11, label %35
i32 14, label %35
i32 15, label %35
i32 12, label %36
i32 13, label %37
]
33: ; preds = %31
store i32 18, i32* %1
br label %188
34: ; preds = %31
store i32 19, i32* %1
br label %188
35: ; preds = %31, %31, %31, %31
store i32 21, i32* %1
br label %188
36: ; preds = %31
store i32 22, i32* %1
br label %188
37: ; preds = %31
store i32 20, i32* %1
br label %188
38: ; preds = %31
br label %94
39: ; preds = %22
%40 = load i32, i32* %4
switch i32 %40, label %54 [
i32 5, label %41
i32 10, label %42
i32 12, label %47
i32 13, label %48
i32 14, label %53
i32 15, label %53
]
41: ; preds = %39
store i32 21, i32* %1
br label %188
42: ; preds = %39
%43 = call i32 (...) @support_avx()
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %46
45: ; preds = %42
store i32 44, i32* %1
br label %188
46: ; preds = %42
store i32 21, i32* %1
br label %188
47: ; preds = %39
store i32 21, i32* %1
br label %188
48: ; preds = %39
%49 = call i32 (...) @support_avx()
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %52
51: ; preds = %48
store i32 44, i32* %1
br label %188
52: ; preds = %48
store i32 21, i32* %1
br label %188
53: ; preds = %39, %39
store i32 21, i32* %1
br label %188
54: ; preds = %39
br label %94
55: ; preds = %22
%56 = load i32, i32* %4
switch i32 %56, label %72 [
i32 10, label %57
i32 14, label %57
i32 12, label %62
i32 15, label %62
i32 13, label %67
]
57: ; preds = %55, %55
%58 = call i32 (...) @support_avx()
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %61
60: ; preds = %57
store i32 44, i32* %1
br label %188
61: ; preds = %57
store i32 21, i32* %1
br label %188
62: ; preds = %55, %55
%63 = call i32 (...) @support_avx()
%64 = icmp ne i32 %63, 0
br i1 %64, label %65, label %66
65: ; preds = %62
store i32 48, i32* %1
br label %188
66: ; preds = %62
store i32 21, i32* %1
br label %188
67: ; preds = %55
%68 = call i32 (...) @support_avx()
%69 = icmp ne i32 %68, 0
br i1 %69, label %70, label %71
70: ; preds = %67
store i32 48, i32* %1
br label %188
71: ; preds = %67
store i32 21, i32* %1
br label %188
72: ; preds = %55
br label %94
73: ; preds = %22
%74 = load i32, i32* %4
switch i32 %74, label %85 [
i32 5, label %75
i32 6, label %75
i32 7, label %80
i32 15, label %80
]
75: ; preds = %73, %73
%76 = call i32 (...) @support_avx()
%77 = icmp ne i32 %76, 0
br i1 %77, label %78, label %79
78: ; preds = %75
store i32 48, i32* %1
br label %188
79: ; preds = %75
store i32 21, i32* %1
br label %188
80: ; preds = %73, %73
%81 = call i32 (...) @support_avx()
%82 = icmp ne i32 %81, 0
br i1 %82, label %83, label %84
83: ; preds = %80
store i32 48, i32* %1
br label %188
84: ; preds = %80
store i32 21, i32* %1
br label %188
85: ; preds = %73
br label %94
86: ; preds = %22
%87 = load i32, i32* %4
switch i32 %87, label %93 [
i32 6, label %88
]
88: ; preds = %86
%89 = call i32 (...) @support_avx()
%90 = icmp ne i32 %89, 0
br i1 %90, label %91, label %92
91: ; preds = %88
store i32 48, i32* %1
br label %188
92: ; preds = %88
store i32 21, i32* %1
br label %188
93: ; preds = %86
br label %94
94: ; preds = %22, %93, %85, %72, %54, %38, %30
br label %101
95: ; preds = %18
store i32 23, i32* %1
br label %188
96: ; preds = %18
%97 = load i32, i32* %3
switch i32 %97, label %100 [
i32 0, label %98
i32 1, label %99
]
98: ; preds = %96
store i32 17, i32* %1
br label %188
99: ; preds = %96
store i32 23, i32* %1
br label %188
100: ; preds = %96
br label %101
101: ; preds = %18, %100, %94
store i32 1, i32* %1
br label %188
102: ; preds = %10
%103 = load i32, i32* %5
%104 = icmp eq i32 %103, 3
br i1 %104, label %105, label %135
105: ; preds = %102
%106 = load i32, i32* %2
switch i32 %106, label %134 [
i32 4, label %107
i32 5, label %108
i32 6, label %109
i32 15, label %110
]
107: ; preds = %105
store i32 25, i32* %1
br label %188
108: ; preds = %105
store i32 26, i32* %1
br label %188
109: ; preds = %105
store i32 27, i32* %1
br label %188
110: ; preds = %105
%111 = load i32, i32* %3
switch i32 %111, label %133 [
i32 0, label %112
i32 2, label %112
i32 1, label %113
i32 10, label %113
i32 6, label %114
i32 5, label %132
]
112: ; preds = %110, %110
store i32 29, i32* %1
br label %188
113: ; preds = %110, %110
store i32 30, i32* %1
br label %188
114: ; preds = %110
%115 = load i32, i32* %4
switch i32 %115, label %131 [
i32 1, label %116
i32 2, label %121
i32 0, label %126
]
116: ; preds = %114
%117 = call i32 (...) @support_avx()
%118 = icmp ne i32 %117, 0
br i1 %118, label %119, label %120
119: ; preds = %116
store i32 46, i32* %1
br label %188
120: ; preds = %116
store i32 30, i32* %1
br label %188
121: ; preds = %114
%122 = call i32 (...) @support_avx()
%123 = icmp ne i32 %122, 0
br i1 %123, label %124, label %125
124: ; preds = %121
store i32 47, i32* %1
br label %188
125: ; preds = %121
store i32 30, i32* %1
br label %188
126: ; preds = %114
%127 = call i32 (...) @support_avx()
%128 = icmp ne i32 %127, 0
br i1 %128, label %129, label %130
129: ; preds = %126
store i32 49, i32* %1
br label %188
130: ; preds = %126
store i32 30, i32* %1
br label %188
131: ; preds = %114
br label %133
132: ; preds = %110
store i32 45, i32* %1
br label %188
133: ; preds = %110, %131
br label %134
134: ; preds = %105, %133
store i32 3, i32* %1
br label %188
135: ; preds = %102
%136 = load i32, i32* %5
%137 = icmp eq i32 %136, 4
br i1 %137, label %138, label %144
138: ; preds = %135
%139 = load i32, i32* %2
switch i32 %139, label %143 [
i32 4, label %140
i32 5, label %141
i32 6, label %142
]
140: ; preds = %138
store i32 33, i32* %1
br label %188
141: ; preds = %138
store i32 34, i32* %1
br label %188
142: ; preds = %138
store i32 35, i32* %1
br label %188
143: ; preds = %138
store i32 4, i32* %1
br label %188
144: ; preds = %135
%145 = load i32, i32* %5
%146 = icmp eq i32 %145, 5
br i1 %146, label %147, label %151
147: ; preds = %144
%148 = load i32, i32* %2
switch i32 %148, label %150 [
i32 5, label %149
]
149: ; preds = %147
store i32 36, i32* %1
br label %188
150: ; preds = %147
store i32 5, i32* %1
br label %188
151: ; preds = %144
%152 = load i32, i32* %5
%153 = icmp eq i32 %152, 6
br i1 %153, label %154, label %159
154: ; preds = %151
%155 = load i32, i32* %2
switch i32 %155, label %158 [
i32 5, label %156
i32 6, label %157
]
156: ; preds = %154
store i32 37, i32* %1
br label %188
157: ; preds = %154
store i32 43, i32* %1
br label %188
158: ; preds = %154
store i32 42, i32* %1
br label %188
159: ; preds = %151
%160 = load i32, i32* %5
%161 = icmp eq i32 %160, 7
br i1 %161, label %162, label %166
162: ; preds = %159
%163 = load i32, i32* %2
switch i32 %163, label %165 [
i32 5, label %164
]
164: ; preds = %162
store i32 38, i32* %1
br label %188
165: ; preds = %162
store i32 7, i32* %1
br label %188
166: ; preds = %159
%167 = load i32, i32* %5
%168 = icmp eq i32 %167, 8
br i1 %168, label %169, label %173
169: ; preds = %166
%170 = load i32, i32* %2
switch i32 %170, label %172 [
i32 5, label %171
]
171: ; preds = %169
store i32 39, i32* %1
br label %188
172: ; preds = %169
store i32 8, i32* %1
br label %188
173: ; preds = %166
%174 = load i32, i32* %5
%175 = icmp eq i32 %174, 9
br i1 %175, label %176, label %180
176: ; preds = %173
%177 = load i32, i32* %2
switch i32 %177, label %179 [
i32 5, label %178
]
178: ; preds = %176
store i32 40, i32* %1
br label %188
179: ; preds = %176
store i32 9, i32* %1
br label %188
180: ; preds = %173
%181 = load i32, i32* %5
%182 = icmp eq i32 %181, 10
br i1 %182, label %183, label %187
183: ; preds = %180
%184 = load i32, i32* %2
switch i32 %184, label %186 [
i32 5, label %185
]
185: ; preds = %183
store i32 41, i32* %1
br label %188
186: ; preds = %183
store i32 10, i32* %1
br label %188
187: ; preds = %180
store i32 0, i32* %1
br label %188
188: ; preds = %187, %186, %185, %179, %178, %172, %171, %165, %164, %158, %157, %156, %150, %149, %143, %142, %141, %140, %134, %132, %130, %129, %125, %124, %120, %119, %113, %112, %109, %108, %107, %101, %99, %98, %95, %92, %91, %84, %83, %79, %78, %71, %70, %66, %65, %61, %60, %53, %52, %51, %47, %46, %45, %41, %37, %36, %35, %34, %33, %29, %28, %27, %26, %21, %20, %9
%189 = load i32, i32* %1
ret i32 %189
}

LLVM IR (-O2):
@switch.table.get_cpuname = [15 x i32] [i32 14, i32 1, i32 14, i32 1, i32 14, i32 14, i32 15, i32 15, i32 16, i32 15, i32 15, i32 1, i32 16, i32 16, i32 18]
@switch.table.get_cpuname.1 = [10 x i32] [i32 18, i32 19, i32 1, i32 1, i32 21, i32 21, i32 22, i32 20, i32 21, i32 21]
define i32 @get_cpuname() {
%1 = tail call i32 (...) @have_cpuid()
%2 = icmp eq i32 %1, 0
br i1 %2, label %115, label %3
3: ; preds = %0
%4 = tail call i32 @get_cputype(i32 4)
%5 = tail call i32 @get_cputype(i32 1)
%6 = tail call i32 @get_cputype(i32 5)
%7 = tail call i32 @get_cputype(i32 2)
%8 = tail call i32 (...) @get_vendor()
switch i32 %8, label %115 [
i32 1, label %9
i32 3, label %62
i32 4, label %82
i32 5, label %87
i32 6, label %90
i32 7, label %95
i32 8, label %98
i32 9, label %101
i32 10, label %104
]
9: ; preds = %3
switch i32 %4, label %61 [
i32 4, label %115
i32 5, label %10
i32 6, label %11
i32 7, label %55
i32 15, label %56
]
10: ; preds = %9
br label %115
11: ; preds = %9
switch i32 %7, label %61 [
i32 0, label %12
i32 1, label %15
i32 2, label %18
i32 3, label %27
i32 4, label %40
i32 5, label %49
]
12: ; preds = %11
%13 = add i32 %6, -1
%14 = icmp ult i32 %13, 15
br i1 %14, label %107, label %61
15: ; preds = %11
%16 = add i32 %6, -6
%17 = icmp ult i32 %16, 10
br i1 %17, label %111, label %61
18: ; preds = %11
switch i32 %6, label %61 [
i32 5, label %115
i32 10, label %19
i32 12, label %115
i32 13, label %23
i32 14, label %115
i32 15, label %115
]
19: ; preds = %18
%20 = tail call i32 (...) @support_avx()
%21 = icmp eq i32 %20, 0
%22 = select i1 %21, i32 21, i32 44
br label %115
23: ; preds = %18
%24 = tail call i32 (...) @support_avx()
%25 = icmp eq i32 %24, 0
%26 = select i1 %25, i32 21, i32 44
br label %115
27: ; preds = %11
switch i32 %6, label %61 [
i32 10, label %28
i32 14, label %28
i32 12, label %32
i32 15, label %32
i32 13, label %36
]
28: ; preds = %27, %27
%29 = tail call i32 (...) @support_avx()
%30 = icmp eq i32 %29, 0
%31 = select i1 %30, i32 21, i32 44
br label %115
32: ; preds = %27, %27
%33 = tail call i32 (...) @support_avx()
%34 = icmp eq i32 %33, 0
%35 = select i1 %34, i32 21, i32 48
br label %115
36: ; preds = %27
%37 = tail call i32 (...) @support_avx()
%38 = icmp eq i32 %37, 0
%39 = select i1 %38, i32 21, i32 48
br label %115
40: ; preds = %11
switch i32 %6, label %61 [
i32 5, label %41
i32 6, label %41
i32 7, label %45
i32 15, label %45
]
41: ; preds = %40, %40
%42 = tail call i32 (...) @support_avx()
%43 = icmp eq i32 %42, 0
%44 = select i1 %43, i32 21, i32 48
br label %115
45: ; preds = %40, %40
%46 = tail call i32 (...) @support_avx()
%47 = icmp eq i32 %46, 0
%48 = select i1 %47, i32 21, i32 48
br label %115
49: ; preds = %11
%50 = icmp eq i32 %6, 6
br i1 %50, label %51, label %61
51: ; preds = %49
%52 = tail call i32 (...) @support_avx()
%53 = icmp eq i32 %52, 0
%54 = select i1 %53, i32 21, i32 48
br label %115
55: ; preds = %9
br label %115
56: ; preds = %9
%57 = icmp eq i32 %5, 1
%58 = select i1 %57, i32 23, i32 1
%59 = icmp eq i32 %5, 0
%60 = select i1 %59, i32 17, i32 %58
br label %115
61: ; preds = %15, %12, %11, %18, %27, %40, %49, %9
br label %115
62: ; preds = %3
switch i32 %4, label %81 [
i32 4, label %115
i32 5, label %63
i32 6, label %64
i32 15, label %65
]
63: ; preds = %62
br label %115
64: ; preds = %62
br label %115
65: ; preds = %62
switch i32 %5, label %81 [
i32 0, label %115
i32 2, label %115
i32 1, label %66
i32 10, label %66
i32 6, label %67
i32 5, label %80
]
66: ; preds = %65, %65
br label %115
67: ; preds = %65
switch i32 %6, label %81 [
i32 1, label %68
i32 2, label %72
i32 0, label %76
]
68: ; preds = %67
%69 = tail call i32 (...) @support_avx()
%70 = icmp eq i32 %69, 0
%71 = select i1 %70, i32 30, i32 46
br label %115
72: ; preds = %67
%73 = tail call i32 (...) @support_avx()
%74 = icmp eq i32 %73, 0
%75 = select i1 %74, i32 30, i32 47
br label %115
76: ; preds = %67
%77 = tail call i32 (...) @support_avx()
%78 = icmp eq i32 %77, 0
%79 = select i1 %78, i32 30, i32 49
br label %115
80: ; preds = %65
br label %115
81: ; preds = %65, %67, %62
br label %115
82: ; preds = %3
%83 = add i32 %4, -4
%84 = icmp ult i32 %83, 3
%85 = add i32 %4, 29
%86 = select i1 %84, i32 %85, i32 4
br label %115
87: ; preds = %3
%88 = icmp eq i32 %4, 5
%89 = select i1 %88, i32 36, i32 5
br label %115
90: ; preds = %3
%91 = icmp eq i32 %4, 6
%92 = select i1 %91, i32 43, i32 42
%93 = icmp eq i32 %4, 5
%94 = select i1 %93, i32 37, i32 %92
br label %115
95: ; preds = %3
%96 = icmp eq i32 %4, 5
%97 = select i1 %96, i32 38, i32 7
br label %115
98: ; preds = %3
%99 = icmp eq i32 %4, 5
%100 = select i1 %99, i32 39, i32 8
br label %115
101: ; preds = %3
%102 = icmp eq i32 %4, 5
%103 = select i1 %102, i32 40, i32 9
br label %115
104: ; preds = %3
%105 = icmp eq i32 %4, 5
%106 = select i1 %105, i32 41, i32 10
br label %115
107: ; preds = %12
%108 = sext i32 %13 to i64
%109 = getelementptr inbounds [15 x i32], [15 x i32]* @switch.table.get_cpuname, i64 0, i64 %108
%110 = load i32, i32* %109
br label %115
111: ; preds = %15
%112 = sext i32 %16 to i64
%113 = getelementptr inbounds [10 x i32], [10 x i32]* @switch.table.get_cpuname.1, i64 0, i64 %112
%114 = load i32, i32* %113
br label %115
115: ; preds = %82, %111, %107, %3, %104, %101, %98, %95, %90, %87, %76, %72, %68, %65, %65, %62, %56, %51, %45, %41, %36, %32, %28, %18, %18, %23, %18, %19, %18, %9, %0, %81, %80, %66, %64, %63, %61, %55, %10
%116 = phi i32 [ 1, %61 ], [ 23, %55 ], [ 13, %10 ], [ 3, %81 ], [ 45, %80 ], [ 30, %66 ], [ 27, %64 ], [ 26, %63 ], [ 11, %0 ], [ 12, %9 ], [ 21, %18 ], [ %22, %19 ], [ 21, %18 ], [ %26, %23 ], [ 21, %18 ], [ 21, %18 ], [ %31, %28 ], [ %35, %32 ], [ %39, %36 ], [ %44, %41 ], [ %48, %45 ], [ %54, %51 ], [ %60, %56 ], [ 25, %62 ], [ 29, %65 ], [ 29, %65 ], [ %71, %68 ], [ %75, %72 ], [ %79, %76 ], [ %89, %87 ], [ %94, %90 ], [ %97, %95 ], [ %100, %98 ], [ %103, %101 ], [ %106, %104 ], [ 0, %3 ], [ %110, %107 ], [ %114, %111 ], [ %86, %82 ]
ret i32 %116
}