#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:
          if (support_avx())
            return 44;
          else
            return 21;
        case 12:
          if (support_avx())
            return 44;
          else
            return 21;
        }
        break;
      case 4:
        switch (model) {
        case 5:
          if (support_avx())
            return 44;
          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;
        }
        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    1786 <get_cpuname+0x646>
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    1492 <get_cpuname+0x352>
mov    -0x8(%rbp),%eax
add    $0xfffffffc,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0xb,%eax
ja     1486 <get_cpuname+0x346>
mov    -0x20(%rbp),%rax
lea    0xe90(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xc,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0xd,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
mov    -0x18(%rbp),%eax
mov    %rax,-0x28(%rbp)
sub    $0x4,%rax
ja     1434 <get_cpuname+0x2f4>
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    0xec2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xe,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0xf,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x10,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x12,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
jmp    1434 <get_cpuname+0x2f4>
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    0xe3c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x12,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x13,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x15,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x16,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x14,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
jmp    1434 <get_cpuname+0x2f4>
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    0xda6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x15,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     132b <get_cpuname+0x1eb>
movl   $0x2c,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x15,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x15,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     135f <get_cpuname+0x21f>
movl   $0x2c,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x15,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x15,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
jmp    1434 <get_cpuname+0x2f4>
mov    -0x10(%rbp),%eax
mov    %eax,-0x44(%rbp)
sub    $0xa,%eax
je     13a1 <get_cpuname+0x261>
jmp    1390 <get_cpuname+0x250>
mov    -0x44(%rbp),%eax
sub    $0xc,%eax
je     13c9 <get_cpuname+0x289>
jmp    13f1 <get_cpuname+0x2b1>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     13bd <get_cpuname+0x27d>
movl   $0x2c,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x15,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     13e5 <get_cpuname+0x2a5>
movl   $0x2c,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x15,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
jmp    1434 <get_cpuname+0x2f4>
mov    -0x10(%rbp),%eax
sub    $0x5,%eax
jne    142f <get_cpuname+0x2ef>
jmp    1407 <get_cpuname+0x2c7>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     1423 <get_cpuname+0x2e3>
movl   $0x2c,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x15,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
jmp    1434 <get_cpuname+0x2f4>
jmp    1486 <get_cpuname+0x346>
movl   $0x17,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
mov    -0xc(%rbp),%eax
mov    %eax,-0x48(%rbp)
test   %eax,%eax
je     1469 <get_cpuname+0x329>
jmp    1458 <get_cpuname+0x318>
mov    -0x48(%rbp),%eax
sub    $0x1,%eax
je     1475 <get_cpuname+0x335>
jmp    1481 <get_cpuname+0x341>
movl   $0x11,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x17,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
jmp    1486 <get_cpuname+0x346>
movl   $0x1,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
cmpl   $0x3,-0x14(%rbp)
jne    15bd <get_cpuname+0x47d>
mov    -0x8(%rbp),%eax
add    $0xfffffffc,%eax
mov    %eax,%ecx
mov    %rcx,-0x50(%rbp)
sub    $0xb,%eax
ja     15b1 <get_cpuname+0x471>
mov    -0x50(%rbp),%rax
lea    0xb44(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x19,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x1a,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x1b,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
mov    -0xc(%rbp),%eax
mov    %rax,-0x58(%rbp)
sub    $0xa,%rax
ja     15ac <get_cpuname+0x46c>
mov    -0x58(%rbp),%rax
lea    0xb2b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1d,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x1e,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
mov    -0x10(%rbp),%eax
mov    %eax,-0x5c(%rbp)
sub    $0x1,%eax
je     154b <get_cpuname+0x40b>
jmp    153a <get_cpuname+0x3fa>
mov    -0x5c(%rbp),%eax
sub    $0x2,%eax
je     1573 <get_cpuname+0x433>
jmp    159b <get_cpuname+0x45b>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     1567 <get_cpuname+0x427>
movl   $0x2e,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x1e,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     158f <get_cpuname+0x44f>
movl   $0x2f,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x1e,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
jmp    15ac <get_cpuname+0x46c>
movl   $0x2d,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
jmp    15b1 <get_cpuname+0x471>
movl   $0x3,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
cmpl   $0x4,-0x14(%rbp)
jne    162d <get_cpuname+0x4ed>
mov    -0x8(%rbp),%eax
mov    %eax,-0x60(%rbp)
sub    $0x4,%eax
je     15fd <get_cpuname+0x4bd>
jmp    15db <get_cpuname+0x49b>
mov    -0x60(%rbp),%eax
sub    $0x5,%eax
je     1609 <get_cpuname+0x4c9>
jmp    15ec <get_cpuname+0x4ac>
mov    -0x60(%rbp),%eax
sub    $0x6,%eax
je     1615 <get_cpuname+0x4d5>
jmp    1621 <get_cpuname+0x4e1>
movl   $0x21,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x22,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x23,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x4,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
cmpl   $0x5,-0x14(%rbp)
jne    1660 <get_cpuname+0x520>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    1654 <get_cpuname+0x514>
jmp    1648 <get_cpuname+0x508>
movl   $0x24,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x5,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
cmpl   $0x6,-0x14(%rbp)
jne    16b3 <get_cpuname+0x573>
mov    -0x8(%rbp),%eax
mov    %eax,-0x64(%rbp)
sub    $0x5,%eax
je     168f <get_cpuname+0x54f>
jmp    167e <get_cpuname+0x53e>
mov    -0x64(%rbp),%eax
sub    $0x6,%eax
je     169b <get_cpuname+0x55b>
jmp    16a7 <get_cpuname+0x567>
movl   $0x25,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x2b,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x2a,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
cmpl   $0x7,-0x14(%rbp)
jne    16e6 <get_cpuname+0x5a6>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    16da <get_cpuname+0x59a>
jmp    16ce <get_cpuname+0x58e>
movl   $0x26,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x7,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
cmpl   $0x8,-0x14(%rbp)
jne    1719 <get_cpuname+0x5d9>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    170d <get_cpuname+0x5cd>
jmp    1701 <get_cpuname+0x5c1>
movl   $0x27,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x8,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
cmpl   $0x9,-0x14(%rbp)
jne    174c <get_cpuname+0x60c>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    1740 <get_cpuname+0x600>
jmp    1734 <get_cpuname+0x5f4>
movl   $0x28,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0x9,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
cmpl   $0xa,-0x14(%rbp)
jne    177f <get_cpuname+0x63f>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    1773 <get_cpuname+0x633>
jmp    1767 <get_cpuname+0x627>
movl   $0x29,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
movl   $0xa,-0x4(%rbp)
jmp    1786 <get_cpuname+0x646>
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    %ebx,%ebx
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,%ebp
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,%ebp
cmp    $0xb,%ebp
ja     13de <get_cpuname+0x29e>
mov    $0xc,%ebx
lea    0xec5(%rip),%rax
movslq (%rax,%rbp,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0xd,%ebx
jmp    11d4 <get_cpuname+0x94>
mov    $0xb,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0xfffffffc,%ebp
cmp    $0xb,%ebp
ja     1363 <get_cpuname+0x223>
mov    $0x19,%ebx
lea    0xe31(%rip),%rax
movslq (%rax,%rbp,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0x1a,%ebx
jmp    11d4 <get_cpuname+0x94>
lea    -0x4(%rbp),%eax
add    $0x1d,%ebp
cmp    $0x3,%eax
mov    $0x4,%ebx
cmovb  %ebp,%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0x5,%ebp
mov    $0x24,%eax
mov    $0x5,%ebx
cmove  %eax,%ebx
jmp    11d4 <get_cpuname+0x94>
xor    %eax,%eax
cmp    $0x6,%ebp
sete   %al
or     $0x2a,%eax
cmp    $0x5,%ebp
mov    $0x25,%ebx
cmovne %eax,%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0x5,%ebp
mov    $0x26,%eax
mov    $0x7,%ebx
cmove  %eax,%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0x5,%ebp
mov    $0x27,%eax
mov    $0x8,%ebx
cmove  %eax,%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0x5,%ebp
mov    $0x28,%eax
mov    $0x9,%ebx
cmove  %eax,%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0x5,%ebp
mov    $0x29,%eax
mov    $0xa,%ebx
cmove  %eax,%ebx
jmp    11d4 <get_cpuname+0x94>
mov    $0x1b,%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0xa,%r15d
ja     1363 <get_cpuname+0x223>
mov    $0x1d,%ebx
mov    %r15d,%eax
lea    0xd9d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x1e,%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0x4,%r12d
ja     13de <get_cpuname+0x29e>
mov    %r12d,%eax
lea    0xdd2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    $0xffffffff,%r14d
cmp    $0xf,%r14d
jae    13de <get_cpuname+0x29e>
movslq %r14d,%rax
lea    0xdc5(%rip),%rcx
jmp    1381 <get_cpuname+0x241>
mov    $0x17,%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0x1,%r15d
mov    $0x17,%eax
mov    $0x1,%ecx
cmove  %eax,%ecx
test   %r15d,%r15d
mov    $0x11,%ebx
cmovne %ecx,%ebx
jmp    11d4 <get_cpuname+0x94>
mov    $0x2d,%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0x2,%r14d
je     13e8 <get_cpuname+0x2a8>
cmp    $0x1,%r14d
jne    1363 <get_cpuname+0x223>
xor    %eax,%eax
call   1050 <support_avx@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
shl    $0x4,%ebx
add    $0x1e,%ebx
jmp    11d4 <get_cpuname+0x94>
mov    $0x3,%ebx
jmp    11d4 <get_cpuname+0x94>
add    $0xfffffffa,%r14d
cmp    $0xa,%r14d
jae    13de <get_cpuname+0x29e>
movslq %r14d,%rax
lea    0xd83(%rip),%rcx
mov    (%rcx,%rax,4),%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0xf,%r14d
ja     13de <get_cpuname+0x29e>
mov    $0x15,%ebx
mov    $0xd020,%eax
bt     %r14d,%eax
jb     11d4 <get_cpuname+0x94>
cmp    $0xa,%r14d
je     13bd <get_cpuname+0x27d>
cmp    $0xd,%r14d
je     13bd <get_cpuname+0x27d>
jmp    13de <get_cpuname+0x29e>
cmp    $0xc,%r14d
je     13bd <get_cpuname+0x27d>
cmp    $0xa,%r14d
jne    13de <get_cpuname+0x29e>
xor    %eax,%eax
call   1050 <support_avx@plt>
test   %eax,%eax
mov    $0x15,%eax
mov    $0x2c,%ebx
cmove  %eax,%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0x5,%r14d
je     13bd <get_cpuname+0x27d>
mov    $0x1,%ebx
jmp    11d4 <get_cpuname+0x94>
xor    %eax,%eax
call   1050 <support_avx@plt>
test   %eax,%eax
mov    $0x1e,%eax
mov    $0x2f,%ebx
cmove  %eax,%ebx
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 %165
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 %84
18: ; preds = %10
%19 = load i32, i32* %2
switch i32 %19, label %83 [
i32 4, label %20
i32 5, label %21
i32 6, label %22
i32 7, label %77
i32 15, label %78
]
20: ; preds = %18
store i32 12, i32* %1
br label %165
21: ; preds = %18
store i32 13, i32* %1
br label %165
22: ; preds = %18
%23 = load i32, i32* %6
switch i32 %23, label %76 [
i32 0, label %24
i32 1, label %31
i32 2, label %39
i32 3, label %55
i32 4, label %68
]
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 %165
27: ; preds = %24, %24, %24, %24
store i32 15, i32* %1
br label %165
28: ; preds = %24, %24, %24
store i32 16, i32* %1
br label %165
29: ; preds = %24
store i32 18, i32* %1
br label %165
30: ; preds = %24
br label %76
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 %165
34: ; preds = %31
store i32 19, i32* %1
br label %165
35: ; preds = %31, %31, %31, %31
store i32 21, i32* %1
br label %165
36: ; preds = %31
store i32 22, i32* %1
br label %165
37: ; preds = %31
store i32 20, i32* %1
br label %165
38: ; preds = %31
br label %76
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 %165
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 %165
46: ; preds = %42
store i32 21, i32* %1
br label %165
47: ; preds = %39
store i32 21, i32* %1
br label %165
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 %165
52: ; preds = %48
store i32 21, i32* %1
br label %165
53: ; preds = %39, %39
store i32 21, i32* %1
br label %165
54: ; preds = %39
br label %76
55: ; preds = %22
%56 = load i32, i32* %4
switch i32 %56, label %67 [
i32 10, label %57
i32 12, label %62
]
57: ; preds = %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 %165
61: ; preds = %57
store i32 21, i32* %1
br label %165
62: ; preds = %55
%63 = call i32 (...) @support_avx()
%64 = icmp ne i32 %63, 0
br i1 %64, label %65, label %66
65: ; preds = %62
store i32 44, i32* %1
br label %165
66: ; preds = %62
store i32 21, i32* %1
br label %165
67: ; preds = %55
br label %76
68: ; preds = %22
%69 = load i32, i32* %4
switch i32 %69, label %75 [
i32 5, label %70
]
70: ; preds = %68
%71 = call i32 (...) @support_avx()
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %74
73: ; preds = %70
store i32 44, i32* %1
br label %165
74: ; preds = %70
store i32 21, i32* %1
br label %165
75: ; preds = %68
br label %76
76: ; preds = %22, %75, %67, %54, %38, %30
br label %83
77: ; preds = %18
store i32 23, i32* %1
br label %165
78: ; preds = %18
%79 = load i32, i32* %3
switch i32 %79, label %82 [
i32 0, label %80
i32 1, label %81
]
80: ; preds = %78
store i32 17, i32* %1
br label %165
81: ; preds = %78
store i32 23, i32* %1
br label %165
82: ; preds = %78
br label %83
83: ; preds = %18, %82, %76
store i32 1, i32* %1
br label %165
84: ; preds = %10
%85 = load i32, i32* %5
%86 = icmp eq i32 %85, 3
br i1 %86, label %87, label %112
87: ; preds = %84
%88 = load i32, i32* %2
switch i32 %88, label %111 [
i32 4, label %89
i32 5, label %90
i32 6, label %91
i32 15, label %92
]
89: ; preds = %87
store i32 25, i32* %1
br label %165
90: ; preds = %87
store i32 26, i32* %1
br label %165
91: ; preds = %87
store i32 27, i32* %1
br label %165
92: ; preds = %87
%93 = load i32, i32* %3
switch i32 %93, label %110 [
i32 0, label %94
i32 2, label %94
i32 1, label %95
i32 10, label %95
i32 6, label %96
i32 5, label %109
]
94: ; preds = %92, %92
store i32 29, i32* %1
br label %165
95: ; preds = %92, %92
store i32 30, i32* %1
br label %165
96: ; preds = %92
%97 = load i32, i32* %4
switch i32 %97, label %108 [
i32 1, label %98
i32 2, label %103
]
98: ; preds = %96
%99 = call i32 (...) @support_avx()
%100 = icmp ne i32 %99, 0
br i1 %100, label %101, label %102
101: ; preds = %98
store i32 46, i32* %1
br label %165
102: ; preds = %98
store i32 30, i32* %1
br label %165
103: ; preds = %96
%104 = call i32 (...) @support_avx()
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %107
106: ; preds = %103
store i32 47, i32* %1
br label %165
107: ; preds = %103
store i32 30, i32* %1
br label %165
108: ; preds = %96
br label %110
109: ; preds = %92
store i32 45, i32* %1
br label %165
110: ; preds = %92, %108
br label %111
111: ; preds = %87, %110
store i32 3, i32* %1
br label %165
112: ; preds = %84
%113 = load i32, i32* %5
%114 = icmp eq i32 %113, 4
br i1 %114, label %115, label %121
115: ; preds = %112
%116 = load i32, i32* %2
switch i32 %116, label %120 [
i32 4, label %117
i32 5, label %118
i32 6, label %119
]
117: ; preds = %115
store i32 33, i32* %1
br label %165
118: ; preds = %115
store i32 34, i32* %1
br label %165
119: ; preds = %115
store i32 35, i32* %1
br label %165
120: ; preds = %115
store i32 4, i32* %1
br label %165
121: ; preds = %112
%122 = load i32, i32* %5
%123 = icmp eq i32 %122, 5
br i1 %123, label %124, label %128
124: ; preds = %121
%125 = load i32, i32* %2
switch i32 %125, label %127 [
i32 5, label %126
]
126: ; preds = %124
store i32 36, i32* %1
br label %165
127: ; preds = %124
store i32 5, i32* %1
br label %165
128: ; preds = %121
%129 = load i32, i32* %5
%130 = icmp eq i32 %129, 6
br i1 %130, label %131, label %136
131: ; preds = %128
%132 = load i32, i32* %2
switch i32 %132, label %135 [
i32 5, label %133
i32 6, label %134
]
133: ; preds = %131
store i32 37, i32* %1
br label %165
134: ; preds = %131
store i32 43, i32* %1
br label %165
135: ; preds = %131
store i32 42, i32* %1
br label %165
136: ; preds = %128
%137 = load i32, i32* %5
%138 = icmp eq i32 %137, 7
br i1 %138, label %139, label %143
139: ; preds = %136
%140 = load i32, i32* %2
switch i32 %140, label %142 [
i32 5, label %141
]
141: ; preds = %139
store i32 38, i32* %1
br label %165
142: ; preds = %139
store i32 7, i32* %1
br label %165
143: ; preds = %136
%144 = load i32, i32* %5
%145 = icmp eq i32 %144, 8
br i1 %145, label %146, label %150
146: ; preds = %143
%147 = load i32, i32* %2
switch i32 %147, label %149 [
i32 5, label %148
]
148: ; preds = %146
store i32 39, i32* %1
br label %165
149: ; preds = %146
store i32 8, i32* %1
br label %165
150: ; preds = %143
%151 = load i32, i32* %5
%152 = icmp eq i32 %151, 9
br i1 %152, label %153, label %157
153: ; preds = %150
%154 = load i32, i32* %2
switch i32 %154, label %156 [
i32 5, label %155
]
155: ; preds = %153
store i32 40, i32* %1
br label %165
156: ; preds = %153
store i32 9, i32* %1
br label %165
157: ; preds = %150
%158 = load i32, i32* %5
%159 = icmp eq i32 %158, 10
br i1 %159, label %160, label %164
160: ; preds = %157
%161 = load i32, i32* %2
switch i32 %161, label %163 [
i32 5, label %162
]
162: ; preds = %160
store i32 41, i32* %1
br label %165
163: ; preds = %160
store i32 10, i32* %1
br label %165
164: ; preds = %157
store i32 0, i32* %1
br label %165
165: ; preds = %164, %163, %162, %156, %155, %149, %148, %142, %141, %135, %134, %133, %127, %126, %120, %119, %118, %117, %111, %109, %107, %106, %102, %101, %95, %94, %91, %90, %89, %83, %81, %80, %77, %74, %73, %66, %65, %61, %60, %53, %52, %51, %47, %46, %45, %41, %37, %36, %35, %34, %33, %29, %28, %27, %26, %21, %20, %9
%166 = load i32, i32* %1
ret i32 %166
}

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