#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:
        if (support_avx())
          return 46;
        else
          return 30;
      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    $0x60,%rsp
mov    $0x0,%al
call   1060 <have_cpuid@plt>
cmp    $0x0,%eax
jne    1164 <get_cpuname+0x24>
movl   $0xb,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
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    1734 <get_cpuname+0x5f4>
movl   $0xd,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
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    1734 <get_cpuname+0x5f4>
movl   $0xf,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x10,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x12,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
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    1734 <get_cpuname+0x5f4>
movl   $0x13,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x15,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x16,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x14,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
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    1734 <get_cpuname+0x5f4>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     132b <get_cpuname+0x1eb>
movl   $0x2c,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x15,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x15,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     135f <get_cpuname+0x21f>
movl   $0x2c,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x15,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x15,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
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    1734 <get_cpuname+0x5f4>
movl   $0x15,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     13e5 <get_cpuname+0x2a5>
movl   $0x2c,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x15,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
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    1734 <get_cpuname+0x5f4>
movl   $0x15,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
jmp    1434 <get_cpuname+0x2f4>
jmp    1486 <get_cpuname+0x346>
movl   $0x17,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
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    1734 <get_cpuname+0x5f4>
movl   $0x17,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
jmp    1486 <get_cpuname+0x346>
movl   $0x1,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
cmpl   $0x3,-0x14(%rbp)
jne    156b <get_cpuname+0x42b>
mov    -0x8(%rbp),%eax
add    $0xfffffffc,%eax
mov    %eax,%ecx
mov    %rcx,-0x50(%rbp)
sub    $0xb,%eax
ja     155f <get_cpuname+0x41f>
mov    -0x50(%rbp),%rax
lea    0xb44(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x19,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x1a,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x1b,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
mov    -0xc(%rbp),%eax
mov    %rax,-0x58(%rbp)
sub    $0xa,%rax
ja     155a <get_cpuname+0x41a>
mov    -0x58(%rbp),%rax
lea    0xb2b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1d,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x1e,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     1542 <get_cpuname+0x402>
movl   $0x2e,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x1e,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x2d,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
jmp    155f <get_cpuname+0x41f>
movl   $0x3,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
cmpl   $0x4,-0x14(%rbp)
jne    15db <get_cpuname+0x49b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x5c(%rbp)
sub    $0x4,%eax
je     15ab <get_cpuname+0x46b>
jmp    1589 <get_cpuname+0x449>
mov    -0x5c(%rbp),%eax
sub    $0x5,%eax
je     15b7 <get_cpuname+0x477>
jmp    159a <get_cpuname+0x45a>
mov    -0x5c(%rbp),%eax
sub    $0x6,%eax
je     15c3 <get_cpuname+0x483>
jmp    15cf <get_cpuname+0x48f>
movl   $0x21,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x22,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x23,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x4,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
cmpl   $0x5,-0x14(%rbp)
jne    160e <get_cpuname+0x4ce>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    1602 <get_cpuname+0x4c2>
jmp    15f6 <get_cpuname+0x4b6>
movl   $0x24,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x5,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
cmpl   $0x6,-0x14(%rbp)
jne    1661 <get_cpuname+0x521>
mov    -0x8(%rbp),%eax
mov    %eax,-0x60(%rbp)
sub    $0x5,%eax
je     163d <get_cpuname+0x4fd>
jmp    162c <get_cpuname+0x4ec>
mov    -0x60(%rbp),%eax
sub    $0x6,%eax
je     1649 <get_cpuname+0x509>
jmp    1655 <get_cpuname+0x515>
movl   $0x25,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x2b,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x2a,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
cmpl   $0x7,-0x14(%rbp)
jne    1694 <get_cpuname+0x554>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    1688 <get_cpuname+0x548>
jmp    167c <get_cpuname+0x53c>
movl   $0x26,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x7,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
cmpl   $0x8,-0x14(%rbp)
jne    16c7 <get_cpuname+0x587>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    16bb <get_cpuname+0x57b>
jmp    16af <get_cpuname+0x56f>
movl   $0x27,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x8,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
cmpl   $0x9,-0x14(%rbp)
jne    16fa <get_cpuname+0x5ba>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    16ee <get_cpuname+0x5ae>
jmp    16e2 <get_cpuname+0x5a2>
movl   $0x28,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x9,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
cmpl   $0xa,-0x14(%rbp)
jne    172d <get_cpuname+0x5ed>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    1721 <get_cpuname+0x5e1>
jmp    1715 <get_cpuname+0x5d5>
movl   $0x29,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0xa,-0x4(%rbp)
jmp    1734 <get_cpuname+0x5f4>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%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     13ca <get_cpuname+0x28a>
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     12ca <get_cpuname+0x18a>
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     12ca <get_cpuname+0x18a>
mov    $0x1d,%ebx
mov    %r15d,%eax
lea    0xda1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x1e,%ebx
jmp    11d4 <get_cpuname+0x94>
mov    $0x3,%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0x4,%r12d
ja     13ca <get_cpuname+0x28a>
mov    %r12d,%eax
lea    0xdcc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    $0xffffffff,%r14d
cmp    $0xf,%r14d
jae    13ca <get_cpuname+0x28a>
movslq %r14d,%rax
lea    0xdbf(%rip),%rcx
jmp    136d <get_cpuname+0x22d>
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>
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>
add    $0xfffffffa,%r14d
cmp    $0xa,%r14d
jae    13ca <get_cpuname+0x28a>
movslq %r14d,%rax
lea    0xd97(%rip),%rcx
mov    (%rcx,%rax,4),%ebx
jmp    11d4 <get_cpuname+0x94>
cmp    $0xf,%r14d
ja     13ca <get_cpuname+0x28a>
mov    $0x15,%ebx
mov    $0xd020,%eax
bt     %r14d,%eax
jb     11d4 <get_cpuname+0x94>
cmp    $0xa,%r14d
je     13a9 <get_cpuname+0x269>
cmp    $0xd,%r14d
je     13a9 <get_cpuname+0x269>
jmp    13ca <get_cpuname+0x28a>
cmp    $0xc,%r14d
je     13a9 <get_cpuname+0x269>
cmp    $0xa,%r14d
jne    13ca <get_cpuname+0x28a>
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     13a9 <get_cpuname+0x269>
mov    $0x1,%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 %157
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 %157
21: ; preds = %18
store i32 13, i32* %1
br label %157
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 %157
27: ; preds = %24, %24, %24, %24
store i32 15, i32* %1
br label %157
28: ; preds = %24, %24, %24
store i32 16, i32* %1
br label %157
29: ; preds = %24
store i32 18, i32* %1
br label %157
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 %157
34: ; preds = %31
store i32 19, i32* %1
br label %157
35: ; preds = %31, %31, %31, %31
store i32 21, i32* %1
br label %157
36: ; preds = %31
store i32 22, i32* %1
br label %157
37: ; preds = %31
store i32 20, i32* %1
br label %157
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 %157
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 %157
46: ; preds = %42
store i32 21, i32* %1
br label %157
47: ; preds = %39
store i32 21, i32* %1
br label %157
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 %157
52: ; preds = %48
store i32 21, i32* %1
br label %157
53: ; preds = %39, %39
store i32 21, i32* %1
br label %157
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 %157
61: ; preds = %57
store i32 21, i32* %1
br label %157
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 %157
66: ; preds = %62
store i32 21, i32* %1
br label %157
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 %157
74: ; preds = %70
store i32 21, i32* %1
br label %157
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 %157
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 %157
81: ; preds = %78
store i32 23, i32* %1
br label %157
82: ; preds = %78
br label %83
83: ; preds = %18, %82, %76
store i32 1, i32* %1
br label %157
84: ; preds = %10
%85 = load i32, i32* %5
%86 = icmp eq i32 %85, 3
br i1 %86, label %87, label %104
87: ; preds = %84
%88 = load i32, i32* %2
switch i32 %88, label %103 [
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 %157
90: ; preds = %87
store i32 26, i32* %1
br label %157
91: ; preds = %87
store i32 27, i32* %1
br label %157
92: ; preds = %87
%93 = load i32, i32* %3
switch i32 %93, label %102 [
i32 0, label %94
i32 2, label %94
i32 1, label %95
i32 10, label %95
i32 6, label %96
i32 5, label %101
]
94: ; preds = %92, %92
store i32 29, i32* %1
br label %157
95: ; preds = %92, %92
store i32 30, i32* %1
br label %157
96: ; preds = %92
%97 = call i32 (...) @support_avx()
%98 = icmp ne i32 %97, 0
br i1 %98, label %99, label %100
99: ; preds = %96
store i32 46, i32* %1
br label %157
100: ; preds = %96
store i32 30, i32* %1
br label %157
101: ; preds = %92
store i32 45, i32* %1
br label %157
102: ; preds = %92
br label %103
103: ; preds = %87, %102
store i32 3, i32* %1
br label %157
104: ; preds = %84
%105 = load i32, i32* %5
%106 = icmp eq i32 %105, 4
br i1 %106, label %107, label %113
107: ; preds = %104
%108 = load i32, i32* %2
switch i32 %108, label %112 [
i32 4, label %109
i32 5, label %110
i32 6, label %111
]
109: ; preds = %107
store i32 33, i32* %1
br label %157
110: ; preds = %107
store i32 34, i32* %1
br label %157
111: ; preds = %107
store i32 35, i32* %1
br label %157
112: ; preds = %107
store i32 4, i32* %1
br label %157
113: ; preds = %104
%114 = load i32, i32* %5
%115 = icmp eq i32 %114, 5
br i1 %115, label %116, label %120
116: ; preds = %113
%117 = load i32, i32* %2
switch i32 %117, label %119 [
i32 5, label %118
]
118: ; preds = %116
store i32 36, i32* %1
br label %157
119: ; preds = %116
store i32 5, i32* %1
br label %157
120: ; preds = %113
%121 = load i32, i32* %5
%122 = icmp eq i32 %121, 6
br i1 %122, label %123, label %128
123: ; preds = %120
%124 = load i32, i32* %2
switch i32 %124, label %127 [
i32 5, label %125
i32 6, label %126
]
125: ; preds = %123
store i32 37, i32* %1
br label %157
126: ; preds = %123
store i32 43, i32* %1
br label %157
127: ; preds = %123
store i32 42, i32* %1
br label %157
128: ; preds = %120
%129 = load i32, i32* %5
%130 = icmp eq i32 %129, 7
br i1 %130, label %131, label %135
131: ; preds = %128
%132 = load i32, i32* %2
switch i32 %132, label %134 [
i32 5, label %133
]
133: ; preds = %131
store i32 38, i32* %1
br label %157
134: ; preds = %131
store i32 7, i32* %1
br label %157
135: ; preds = %128
%136 = load i32, i32* %5
%137 = icmp eq i32 %136, 8
br i1 %137, label %138, label %142
138: ; preds = %135
%139 = load i32, i32* %2
switch i32 %139, label %141 [
i32 5, label %140
]
140: ; preds = %138
store i32 39, i32* %1
br label %157
141: ; preds = %138
store i32 8, i32* %1
br label %157
142: ; preds = %135
%143 = load i32, i32* %5
%144 = icmp eq i32 %143, 9
br i1 %144, label %145, label %149
145: ; preds = %142
%146 = load i32, i32* %2
switch i32 %146, label %148 [
i32 5, label %147
]
147: ; preds = %145
store i32 40, i32* %1
br label %157
148: ; preds = %145
store i32 9, i32* %1
br label %157
149: ; preds = %142
%150 = load i32, i32* %5
%151 = icmp eq i32 %150, 10
br i1 %151, label %152, label %156
152: ; preds = %149
%153 = load i32, i32* %2
switch i32 %153, label %155 [
i32 5, label %154
]
154: ; preds = %152
store i32 41, i32* %1
br label %157
155: ; preds = %152
store i32 10, i32* %1
br label %157
156: ; preds = %149
store i32 0, i32* %1
br label %157
157: ; preds = %156, %155, %154, %148, %147, %141, %140, %134, %133, %127, %126, %125, %119, %118, %112, %111, %110, %109, %103, %101, %100, %99, %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
%158 = load i32, i32* %1
ret i32 %158
}

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