#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 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:
          return 44;
        case 12:
          return 21;
        case 13:
          return 44;
        case 15:
          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:
      case 6:
        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   1050 <have_cpuid@plt>
cmp    $0x0,%eax
jne    1154 <get_cpuname+0x24>
movl   $0xb,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
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    13a2 <get_cpuname+0x272>
mov    -0x8(%rbp),%eax
add    $0xfffffffc,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0xb,%eax
ja     1396 <get_cpuname+0x266>
mov    -0x20(%rbp),%rax
lea    0xe74(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xc,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0xd,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
mov    -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
test   %eax,%eax
je     1212 <get_cpuname+0xe2>
jmp    11f0 <get_cpuname+0xc0>
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
je     1270 <get_cpuname+0x140>
jmp    1201 <get_cpuname+0xd1>
mov    -0x24(%rbp),%eax
sub    $0x2,%eax
je     12da <get_cpuname+0x1aa>
jmp    1344 <get_cpuname+0x214>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0xe,%eax
ja     126b <get_cpuname+0x13b>
mov    -0x30(%rbp),%rax
lea    0xe82(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xe,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0xf,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x10,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x12,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
jmp    1344 <get_cpuname+0x214>
mov    -0x10(%rbp),%eax
add    $0xfffffffa,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x9,%eax
ja     12d5 <get_cpuname+0x1a5>
mov    -0x38(%rbp),%rax
lea    0xdfc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x12,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x13,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x15,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x16,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x14,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
jmp    1344 <get_cpuname+0x214>
mov    -0x10(%rbp),%eax
add    $0xfffffffb,%eax
mov    %eax,%ecx
mov    %rcx,-0x40(%rbp)
sub    $0xa,%eax
ja     133f <get_cpuname+0x20f>
mov    -0x40(%rbp),%rax
lea    0xd66(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x15,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x2c,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x15,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x2c,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x15,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
jmp    1344 <get_cpuname+0x214>
jmp    1396 <get_cpuname+0x266>
movl   $0x17,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x44(%rbp)
test   %eax,%eax
je     1379 <get_cpuname+0x249>
jmp    1368 <get_cpuname+0x238>
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
je     1385 <get_cpuname+0x255>
jmp    1391 <get_cpuname+0x261>
movl   $0x11,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x17,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
jmp    1396 <get_cpuname+0x266>
movl   $0x1,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
cmpl   $0x3,-0x14(%rbp)
jne    1496 <get_cpuname+0x366>
mov    -0x8(%rbp),%eax
add    $0xfffffffc,%eax
mov    %eax,%ecx
mov    %rcx,-0x50(%rbp)
sub    $0xb,%eax
ja     148a <get_cpuname+0x35a>
mov    -0x50(%rbp),%rax
lea    0xc34(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x19,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x1a,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x1b,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x54(%rbp)
test   %eax,%eax
je     1461 <get_cpuname+0x331>
jmp    140c <get_cpuname+0x2dc>
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
je     146d <get_cpuname+0x33d>
jmp    141d <get_cpuname+0x2ed>
mov    -0x54(%rbp),%eax
sub    $0x2,%eax
je     1461 <get_cpuname+0x331>
jmp    142e <get_cpuname+0x2fe>
mov    -0x54(%rbp),%eax
sub    $0x5,%eax
je     1479 <get_cpuname+0x349>
jmp    143f <get_cpuname+0x30f>
mov    -0x54(%rbp),%eax
sub    $0x6,%eax
je     146d <get_cpuname+0x33d>
jmp    1450 <get_cpuname+0x320>
mov    -0x54(%rbp),%eax
sub    $0xa,%eax
je     146d <get_cpuname+0x33d>
jmp    1485 <get_cpuname+0x355>
movl   $0x1d,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x1e,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x2d,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
jmp    148a <get_cpuname+0x35a>
movl   $0x3,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
cmpl   $0x4,-0x14(%rbp)
jne    1506 <get_cpuname+0x3d6>
mov    -0x8(%rbp),%eax
mov    %eax,-0x58(%rbp)
sub    $0x4,%eax
je     14d6 <get_cpuname+0x3a6>
jmp    14b4 <get_cpuname+0x384>
mov    -0x58(%rbp),%eax
sub    $0x5,%eax
je     14e2 <get_cpuname+0x3b2>
jmp    14c5 <get_cpuname+0x395>
mov    -0x58(%rbp),%eax
sub    $0x6,%eax
je     14ee <get_cpuname+0x3be>
jmp    14fa <get_cpuname+0x3ca>
movl   $0x21,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x22,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x23,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x4,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
cmpl   $0x5,-0x14(%rbp)
jne    1539 <get_cpuname+0x409>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    152d <get_cpuname+0x3fd>
jmp    1521 <get_cpuname+0x3f1>
movl   $0x24,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x5,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
cmpl   $0x6,-0x14(%rbp)
jne    158c <get_cpuname+0x45c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x5c(%rbp)
sub    $0x5,%eax
je     1568 <get_cpuname+0x438>
jmp    1557 <get_cpuname+0x427>
mov    -0x5c(%rbp),%eax
sub    $0x6,%eax
je     1574 <get_cpuname+0x444>
jmp    1580 <get_cpuname+0x450>
movl   $0x25,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x2b,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x2a,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
cmpl   $0x7,-0x14(%rbp)
jne    15bf <get_cpuname+0x48f>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    15b3 <get_cpuname+0x483>
jmp    15a7 <get_cpuname+0x477>
movl   $0x26,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x7,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
cmpl   $0x8,-0x14(%rbp)
jne    15f2 <get_cpuname+0x4c2>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    15e6 <get_cpuname+0x4b6>
jmp    15da <get_cpuname+0x4aa>
movl   $0x27,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x8,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
cmpl   $0x9,-0x14(%rbp)
jne    1625 <get_cpuname+0x4f5>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    1619 <get_cpuname+0x4e9>
jmp    160d <get_cpuname+0x4dd>
movl   $0x28,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0x9,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
cmpl   $0xa,-0x14(%rbp)
jne    1658 <get_cpuname+0x528>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    164c <get_cpuname+0x51c>
jmp    1640 <get_cpuname+0x510>
movl   $0x29,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
movl   $0xa,-0x4(%rbp)
jmp    165f <get_cpuname+0x52f>
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   1050 <have_cpuid@plt>
test   %eax,%eax
je     11c1 <get_cpuname+0x91>
mov    $0x4,%edi
call   1030 <get_cputype@plt>
mov    %eax,%r14d
mov    $0x1,%edi
call   1030 <get_cputype@plt>
mov    %eax,%r12d
mov    $0x5,%edi
call   1030 <get_cputype@plt>
mov    %eax,%r15d
mov    $0x2,%edi
call   1030 <get_cputype@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <get_vendor@plt>
add    $0xffffffff,%eax
cmp    $0x9,%eax
ja     11c6 <get_cpuname+0x96>
lea    0xe72(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    $0xfffffffc,%r14d
cmp    $0xb,%r14d
ja     1340 <get_cpuname+0x210>
mov    $0xc,%ebx
lea    0xea7(%rip),%rax
movslq (%rax,%r14,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0xd,%ebx
jmp    11c6 <get_cpuname+0x96>
mov    $0xb,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    -0x4(%r14),%eax
add    $0x1d,%r14d
cmp    $0x3,%eax
mov    $0x4,%ebx
cmovb  %r14d,%ebx
jmp    11c6 <get_cpuname+0x96>
cmp    $0x5,%r14d
mov    $0x26,%eax
mov    $0x7,%ebx
cmove  %eax,%ebx
jmp    11c6 <get_cpuname+0x96>
add    $0xfffffffc,%r14d
cmp    $0xb,%r14d
ja     12b8 <get_cpuname+0x188>
mov    $0x19,%ebx
lea    0xe14(%rip),%rax
movslq (%rax,%r14,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0x1a,%ebx
jmp    11c6 <get_cpuname+0x96>
cmp    $0x5,%r14d
mov    $0x24,%eax
mov    $0x5,%ebx
cmove  %eax,%ebx
jmp    11c6 <get_cpuname+0x96>
xor    %eax,%eax
cmp    $0x6,%r14d
sete   %al
or     $0x2a,%eax
cmp    $0x5,%r14d
mov    $0x25,%ebx
cmovne %eax,%ebx
jmp    11c6 <get_cpuname+0x96>
cmp    $0x5,%r14d
mov    $0x27,%eax
mov    $0x8,%ebx
cmove  %eax,%ebx
jmp    11c6 <get_cpuname+0x96>
cmp    $0x5,%r14d
mov    $0x28,%eax
mov    $0x9,%ebx
cmove  %eax,%ebx
jmp    11c6 <get_cpuname+0x96>
cmp    $0x5,%r14d
mov    $0x29,%eax
mov    $0xa,%ebx
cmove  %eax,%ebx
jmp    11c6 <get_cpuname+0x96>
mov    $0x1b,%ebx
jmp    11c6 <get_cpuname+0x96>
cmp    $0xb,%r12d
jae    12b8 <get_cpuname+0x188>
movslq %r12d,%rax
lea    0xe68(%rip),%rcx
mov    (%rcx,%rax,4),%ebx
jmp    11c6 <get_cpuname+0x96>
mov    $0x3,%ebx
jmp    11c6 <get_cpuname+0x96>
cmp    $0x2,%ebp
je     1311 <get_cpuname+0x1e1>
cmp    $0x1,%ebp
je     1327 <get_cpuname+0x1f7>
test   %ebp,%ebp
jne    1340 <get_cpuname+0x210>
add    $0xffffffff,%r15d
cmp    $0xf,%r15d
jae    1340 <get_cpuname+0x210>
movslq %r15d,%rax
lea    0xda4(%rip),%rcx
jmp    12b0 <get_cpuname+0x180>
mov    $0x17,%ebx
jmp    11c6 <get_cpuname+0x96>
cmp    $0x1,%r12d
mov    $0x17,%eax
mov    $0x1,%ecx
cmove  %eax,%ecx
test   %r12d,%r12d
mov    $0x11,%ebx
cmovne %ecx,%ebx
jmp    11c6 <get_cpuname+0x96>
add    $0xfffffffb,%r15d
cmp    $0xb,%r15d
jae    1340 <get_cpuname+0x210>
movslq %r15d,%rax
lea    0xdc7(%rip),%rcx
jmp    12b0 <get_cpuname+0x180>
add    $0xfffffffa,%r15d
cmp    $0xa,%r15d
jae    1340 <get_cpuname+0x210>
movslq %r15d,%rax
lea    0xd89(%rip),%rcx
jmp    12b0 <get_cpuname+0x180>
mov    $0x1,%ebx
jmp    11c6 <get_cpuname+0x96>

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 %123
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 %55
18: ; preds = %10
%19 = load i32, i32* %2
switch i32 %19, label %54 [
i32 4, label %20
i32 5, label %21
i32 6, label %22
i32 7, label %48
i32 15, label %49
]
20: ; preds = %18
store i32 12, i32* %1
br label %123
21: ; preds = %18
store i32 13, i32* %1
br label %123
22: ; preds = %18
%23 = load i32, i32* %6
switch i32 %23, label %47 [
i32 0, label %24
i32 1, label %31
i32 2, label %39
]
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 %123
27: ; preds = %24, %24, %24, %24
store i32 15, i32* %1
br label %123
28: ; preds = %24, %24, %24
store i32 16, i32* %1
br label %123
29: ; preds = %24
store i32 18, i32* %1
br label %123
30: ; preds = %24
br label %47
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 %123
34: ; preds = %31
store i32 19, i32* %1
br label %123
35: ; preds = %31, %31, %31, %31
store i32 21, i32* %1
br label %123
36: ; preds = %31
store i32 22, i32* %1
br label %123
37: ; preds = %31
store i32 20, i32* %1
br label %123
38: ; preds = %31
br label %47
39: ; preds = %22
%40 = load i32, i32* %4
switch i32 %40, label %46 [
i32 5, label %41
i32 10, label %42
i32 12, label %43
i32 13, label %44
i32 15, label %45
]
41: ; preds = %39
store i32 21, i32* %1
br label %123
42: ; preds = %39
store i32 44, i32* %1
br label %123
43: ; preds = %39
store i32 21, i32* %1
br label %123
44: ; preds = %39
store i32 44, i32* %1
br label %123
45: ; preds = %39
store i32 21, i32* %1
br label %123
46: ; preds = %39
br label %47
47: ; preds = %22, %46, %38, %30
br label %54
48: ; preds = %18
store i32 23, i32* %1
br label %123
49: ; preds = %18
%50 = load i32, i32* %3
switch i32 %50, label %53 [
i32 0, label %51
i32 1, label %52
]
51: ; preds = %49
store i32 17, i32* %1
br label %123
52: ; preds = %49
store i32 23, i32* %1
br label %123
53: ; preds = %49
br label %54
54: ; preds = %18, %53, %47
store i32 1, i32* %1
br label %123
55: ; preds = %10
%56 = load i32, i32* %5
%57 = icmp eq i32 %56, 3
br i1 %57, label %58, label %70
58: ; preds = %55
%59 = load i32, i32* %2
switch i32 %59, label %69 [
i32 4, label %60
i32 5, label %61
i32 6, label %62
i32 15, label %63
]
60: ; preds = %58
store i32 25, i32* %1
br label %123
61: ; preds = %58
store i32 26, i32* %1
br label %123
62: ; preds = %58
store i32 27, i32* %1
br label %123
63: ; preds = %58
%64 = load i32, i32* %3
switch i32 %64, label %68 [
i32 0, label %65
i32 2, label %65
i32 1, label %66
i32 10, label %66
i32 6, label %66
i32 5, label %67
]
65: ; preds = %63, %63
store i32 29, i32* %1
br label %123
66: ; preds = %63, %63, %63
store i32 30, i32* %1
br label %123
67: ; preds = %63
store i32 45, i32* %1
br label %123
68: ; preds = %63
br label %69
69: ; preds = %58, %68
store i32 3, i32* %1
br label %123
70: ; preds = %55
%71 = load i32, i32* %5
%72 = icmp eq i32 %71, 4
br i1 %72, label %73, label %79
73: ; preds = %70
%74 = load i32, i32* %2
switch i32 %74, label %78 [
i32 4, label %75
i32 5, label %76
i32 6, label %77
]
75: ; preds = %73
store i32 33, i32* %1
br label %123
76: ; preds = %73
store i32 34, i32* %1
br label %123
77: ; preds = %73
store i32 35, i32* %1
br label %123
78: ; preds = %73
store i32 4, i32* %1
br label %123
79: ; preds = %70
%80 = load i32, i32* %5
%81 = icmp eq i32 %80, 5
br i1 %81, label %82, label %86
82: ; preds = %79
%83 = load i32, i32* %2
switch i32 %83, label %85 [
i32 5, label %84
]
84: ; preds = %82
store i32 36, i32* %1
br label %123
85: ; preds = %82
store i32 5, i32* %1
br label %123
86: ; preds = %79
%87 = load i32, i32* %5
%88 = icmp eq i32 %87, 6
br i1 %88, label %89, label %94
89: ; preds = %86
%90 = load i32, i32* %2
switch i32 %90, label %93 [
i32 5, label %91
i32 6, label %92
]
91: ; preds = %89
store i32 37, i32* %1
br label %123
92: ; preds = %89
store i32 43, i32* %1
br label %123
93: ; preds = %89
store i32 42, i32* %1
br label %123
94: ; preds = %86
%95 = load i32, i32* %5
%96 = icmp eq i32 %95, 7
br i1 %96, label %97, label %101
97: ; preds = %94
%98 = load i32, i32* %2
switch i32 %98, label %100 [
i32 5, label %99
]
99: ; preds = %97
store i32 38, i32* %1
br label %123
100: ; preds = %97
store i32 7, i32* %1
br label %123
101: ; preds = %94
%102 = load i32, i32* %5
%103 = icmp eq i32 %102, 8
br i1 %103, label %104, label %108
104: ; preds = %101
%105 = load i32, i32* %2
switch i32 %105, label %107 [
i32 5, label %106
]
106: ; preds = %104
store i32 39, i32* %1
br label %123
107: ; preds = %104
store i32 8, i32* %1
br label %123
108: ; preds = %101
%109 = load i32, i32* %5
%110 = icmp eq i32 %109, 9
br i1 %110, label %111, label %115
111: ; preds = %108
%112 = load i32, i32* %2
switch i32 %112, label %114 [
i32 5, label %113
]
113: ; preds = %111
store i32 40, i32* %1
br label %123
114: ; preds = %111
store i32 9, i32* %1
br label %123
115: ; preds = %108
%116 = load i32, i32* %5
%117 = icmp eq i32 %116, 10
br i1 %117, label %118, label %122
118: ; preds = %115
%119 = load i32, i32* %2
switch i32 %119, label %121 [
i32 5, label %120
]
120: ; preds = %118
store i32 41, i32* %1
br label %123
121: ; preds = %118
store i32 10, i32* %1
br label %123
122: ; preds = %115
store i32 0, i32* %1
br label %123
123: ; preds = %122, %121, %120, %114, %113, %107, %106, %100, %99, %93, %92, %91, %85, %84, %78, %77, %76, %75, %69, %67, %66, %65, %62, %61, %60, %54, %52, %51, %48, %45, %44, %43, %42, %41, %37, %36, %35, %34, %33, %29, %28, %27, %26, %21, %20, %9
%124 = load i32, i32* %1
ret i32 %124
}

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