#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;
        }
        break;
      case 4:
        switch (model) {
        case 5:
        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;
        }
        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    178d <get_cpuname+0x64d>
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    1499 <get_cpuname+0x359>
mov    -0x8(%rbp),%eax
add    $0xfffffffc,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0xb,%eax
ja     148d <get_cpuname+0x34d>
mov    -0x20(%rbp),%rax
lea    0xe90(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xc,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0xd,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
mov    -0x18(%rbp),%eax
mov    %rax,-0x28(%rbp)
sub    $0x4,%rax
ja     143b <get_cpuname+0x2fb>
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    0xeda(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xe,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0xf,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x10,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x12,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
jmp    143b <get_cpuname+0x2fb>
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    0xe54(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x12,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x13,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x15,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x16,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x14,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
jmp    143b <get_cpuname+0x2fb>
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    0xdbe(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x15,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     132b <get_cpuname+0x1eb>
movl   $0x2c,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x15,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x15,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     135f <get_cpuname+0x21f>
movl   $0x2c,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x15,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x15,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
jmp    143b <get_cpuname+0x2fb>
mov    -0x10(%rbp),%eax
add    $0xfffffff6,%eax
mov    %eax,%ecx
mov    %rcx,-0x48(%rbp)
sub    $0x5,%eax
ja     13f5 <get_cpuname+0x2b5>
mov    -0x48(%rbp),%rax
lea    0xd04(%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    178d <get_cpuname+0x64d>
movl   $0x15,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     13e9 <get_cpuname+0x2a9>
movl   $0x30,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x15,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
jmp    143b <get_cpuname+0x2fb>
mov    -0x10(%rbp),%eax
add    $0xfffffffb,%eax
sub    $0x1,%eax
ja     1436 <get_cpuname+0x2f6>
jmp    140e <get_cpuname+0x2ce>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     142a <get_cpuname+0x2ea>
movl   $0x30,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x15,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
jmp    143b <get_cpuname+0x2fb>
jmp    148d <get_cpuname+0x34d>
movl   $0x17,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4c(%rbp)
test   %eax,%eax
je     1470 <get_cpuname+0x330>
jmp    145f <get_cpuname+0x31f>
mov    -0x4c(%rbp),%eax
sub    $0x1,%eax
je     147c <get_cpuname+0x33c>
jmp    1488 <get_cpuname+0x348>
movl   $0x11,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x17,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
jmp    148d <get_cpuname+0x34d>
movl   $0x1,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
cmpl   $0x3,-0x14(%rbp)
jne    15c4 <get_cpuname+0x484>
mov    -0x8(%rbp),%eax
add    $0xfffffffc,%eax
mov    %eax,%ecx
mov    %rcx,-0x58(%rbp)
sub    $0xb,%eax
ja     15b8 <get_cpuname+0x478>
mov    -0x58(%rbp),%rax
lea    0xb3d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x19,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x1a,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x1b,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
mov    -0xc(%rbp),%eax
mov    %rax,-0x60(%rbp)
sub    $0xa,%rax
ja     15b3 <get_cpuname+0x473>
mov    -0x60(%rbp),%rax
lea    0xb24(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1d,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x1e,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x64(%rbp)
sub    $0x1,%eax
je     1552 <get_cpuname+0x412>
jmp    1541 <get_cpuname+0x401>
mov    -0x64(%rbp),%eax
sub    $0x2,%eax
je     157a <get_cpuname+0x43a>
jmp    15a2 <get_cpuname+0x462>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     156e <get_cpuname+0x42e>
movl   $0x2e,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x1e,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
mov    $0x0,%al
call   1050 <support_avx@plt>
cmp    $0x0,%eax
je     1596 <get_cpuname+0x456>
movl   $0x2f,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x1e,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
jmp    15b3 <get_cpuname+0x473>
movl   $0x2d,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
jmp    15b8 <get_cpuname+0x478>
movl   $0x3,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
cmpl   $0x4,-0x14(%rbp)
jne    1634 <get_cpuname+0x4f4>
mov    -0x8(%rbp),%eax
mov    %eax,-0x68(%rbp)
sub    $0x4,%eax
je     1604 <get_cpuname+0x4c4>
jmp    15e2 <get_cpuname+0x4a2>
mov    -0x68(%rbp),%eax
sub    $0x5,%eax
je     1610 <get_cpuname+0x4d0>
jmp    15f3 <get_cpuname+0x4b3>
mov    -0x68(%rbp),%eax
sub    $0x6,%eax
je     161c <get_cpuname+0x4dc>
jmp    1628 <get_cpuname+0x4e8>
movl   $0x21,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x22,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x23,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x4,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
cmpl   $0x5,-0x14(%rbp)
jne    1667 <get_cpuname+0x527>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    165b <get_cpuname+0x51b>
jmp    164f <get_cpuname+0x50f>
movl   $0x24,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x5,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
cmpl   $0x6,-0x14(%rbp)
jne    16ba <get_cpuname+0x57a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x6c(%rbp)
sub    $0x5,%eax
je     1696 <get_cpuname+0x556>
jmp    1685 <get_cpuname+0x545>
mov    -0x6c(%rbp),%eax
sub    $0x6,%eax
je     16a2 <get_cpuname+0x562>
jmp    16ae <get_cpuname+0x56e>
movl   $0x25,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x2b,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x2a,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
cmpl   $0x7,-0x14(%rbp)
jne    16ed <get_cpuname+0x5ad>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    16e1 <get_cpuname+0x5a1>
jmp    16d5 <get_cpuname+0x595>
movl   $0x26,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x7,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
cmpl   $0x8,-0x14(%rbp)
jne    1720 <get_cpuname+0x5e0>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    1714 <get_cpuname+0x5d4>
jmp    1708 <get_cpuname+0x5c8>
movl   $0x27,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x8,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
cmpl   $0x9,-0x14(%rbp)
jne    1753 <get_cpuname+0x613>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    1747 <get_cpuname+0x607>
jmp    173b <get_cpuname+0x5fb>
movl   $0x28,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0x9,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
cmpl   $0xa,-0x14(%rbp)
jne    1786 <get_cpuname+0x646>
mov    -0x8(%rbp),%eax
sub    $0x5,%eax
jne    177a <get_cpuname+0x63a>
jmp    176e <get_cpuname+0x62e>
movl   $0x29,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
movl   $0xa,-0x4(%rbp)
jmp    178d <get_cpuname+0x64d>
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     11d1 <get_cpuname+0x91>
mov    $0x4,%edi
call   1030 <get_cputype@plt>
mov    %eax,%r15d
mov    $0x1,%edi
call   1030 <get_cputype@plt>
mov    %eax,%r12d
mov    $0x5,%edi
call   1030 <get_cputype@plt>
mov    %eax,%r14d
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     11d6 <get_cpuname+0x96>
lea    0xe62(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    $0xfffffffc,%r15d
cmp    $0xb,%r15d
ja     141e <get_cpuname+0x2de>
mov    $0xc,%ebx
lea    0xec3(%rip),%rax
movslq (%rax,%r15,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0xd,%ebx
jmp    11d6 <get_cpuname+0x96>
mov    $0xb,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0xfffffffc,%r15d
cmp    $0xb,%r15d
ja     1372 <get_cpuname+0x232>
mov    $0x19,%ebx
lea    0xe2d(%rip),%rax
movslq (%rax,%r15,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0x1a,%ebx
jmp    11d6 <get_cpuname+0x96>
lea    -0x4(%r15),%eax
add    $0x1d,%r15d
cmp    $0x3,%eax
mov    $0x4,%ebx
cmovb  %r15d,%ebx
jmp    11d6 <get_cpuname+0x96>
cmp    $0x5,%r15d
mov    $0x24,%eax
mov    $0x5,%ebx
cmove  %eax,%ebx
jmp    11d6 <get_cpuname+0x96>
xor    %eax,%eax
cmp    $0x6,%r15d
sete   %al
or     $0x2a,%eax
cmp    $0x5,%r15d
mov    $0x25,%ebx
cmovne %eax,%ebx
jmp    11d6 <get_cpuname+0x96>
cmp    $0x5,%r15d
mov    $0x26,%eax
mov    $0x7,%ebx
cmove  %eax,%ebx
jmp    11d6 <get_cpuname+0x96>
cmp    $0x5,%r15d
mov    $0x27,%eax
mov    $0x8,%ebx
cmove  %eax,%ebx
jmp    11d6 <get_cpuname+0x96>
cmp    $0x5,%r15d
mov    $0x28,%eax
mov    $0x9,%ebx
cmove  %eax,%ebx
jmp    11d6 <get_cpuname+0x96>
cmp    $0x5,%r15d
mov    $0x29,%eax
mov    $0xa,%ebx
cmove  %eax,%ebx
jmp    11d6 <get_cpuname+0x96>
mov    $0x1b,%ebx
jmp    11d6 <get_cpuname+0x96>
cmp    $0xa,%r12d
ja     1372 <get_cpuname+0x232>
mov    $0x1d,%ebx
mov    %r12d,%eax
lea    0xd8f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x1e,%ebx
jmp    11d6 <get_cpuname+0x96>
cmp    $0x4,%ebp
ja     141e <get_cpuname+0x2de>
mov    %ebp,%eax
lea    0xdc6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    $0xffffffff,%r14d
cmp    $0xf,%r14d
jae    141e <get_cpuname+0x2de>
movslq %r14d,%rax
lea    0xdd1(%rip),%rcx
jmp    1394 <get_cpuname+0x254>
mov    $0x17,%ebx
jmp    11d6 <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    11d6 <get_cpuname+0x96>
mov    $0x2d,%ebx
jmp    11d6 <get_cpuname+0x96>
cmp    $0x2,%r14d
je     1428 <get_cpuname+0x2e8>
cmp    $0x1,%r14d
jne    1372 <get_cpuname+0x232>
xor    %eax,%eax
call   1050 <support_avx@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
shl    $0x4,%ebx
add    $0x1e,%ebx
jmp    11d6 <get_cpuname+0x96>
mov    $0x3,%ebx
jmp    11d6 <get_cpuname+0x96>
add    $0xfffffffa,%r14d
cmp    $0xa,%r14d
jae    141e <get_cpuname+0x2de>
movslq %r14d,%rax
lea    0xd88(%rip),%rcx
mov    (%rcx,%rax,4),%ebx
jmp    11d6 <get_cpuname+0x96>
cmp    $0xf,%r14d
ja     141e <get_cpuname+0x2de>
mov    $0x15,%ebx
mov    $0xd020,%eax
bt     %r14d,%eax
jb     11d6 <get_cpuname+0x96>
cmp    $0xa,%r14d
je     13de <get_cpuname+0x29e>
cmp    $0xd,%r14d
je     13de <get_cpuname+0x29e>
jmp    141e <get_cpuname+0x2de>
add    $0xfffffff6,%r14d
cmp    $0x5,%r14d
ja     141e <get_cpuname+0x2de>
lea    0xcf3(%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,%ebx
cmove  %eax,%ebx
jmp    11d6 <get_cpuname+0x96>
add    $0xfffffffb,%r14d
cmp    $0x1,%r14d
ja     141e <get_cpuname+0x2de>
xor    %eax,%eax
call   1050 <support_avx@plt>
test   %eax,%eax
mov    $0x15,%eax
mov    $0x30,%ebx
cmove  %eax,%ebx
jmp    11d6 <get_cpuname+0x96>
mov    $0x1,%ebx
jmp    11d6 <get_cpuname+0x96>
xor    %eax,%eax
call   1050 <support_avx@plt>
test   %eax,%eax
mov    $0x1e,%eax
mov    $0x2f,%ebx
cmove  %eax,%ebx
jmp    11d6 <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 %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 14, label %57
i32 12, label %62
i32 15, label %62
]
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 %165
61: ; preds = %57
store i32 21, i32* %1
br label %165
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 %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
i32 6, label %70
]
70: ; preds = %68, %68
%71 = call i32 (...) @support_avx()
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %74
73: ; preds = %70
store i32 48, 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 %99, 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 %99 [
i32 1, label %9
i32 3, label %50
i32 4, label %66
i32 5, label %71
i32 6, label %74
i32 7, label %79
i32 8, label %82
i32 9, label %85
i32 10, label %88
]
9: ; preds = %3
switch i32 %4, label %49 [
i32 4, label %99
i32 5, label %10
i32 6, label %11
i32 7, label %43
i32 15, label %44
]
10: ; preds = %9
br label %99
11: ; preds = %9
switch i32 %7, label %49 [
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 %91, label %49
15: ; preds = %11
%16 = add i32 %6, -6
%17 = icmp ult i32 %16, 10
br i1 %17, label %95, label %49
18: ; preds = %11
switch i32 %6, label %49 [
i32 5, label %99
i32 10, label %19
i32 12, label %99
i32 13, label %23
i32 14, label %99
i32 15, label %99
]
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 %99
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 %99
27: ; preds = %11
switch i32 %6, label %49 [
i32 10, label %28
i32 14, label %28
i32 12, label %32
i32 15, label %32
]
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 %99
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 %99
36: ; preds = %11
%37 = add i32 %6, -5
%38 = icmp ult i32 %37, 2
br i1 %38, label %39, label %49
39: ; preds = %36
%40 = tail call i32 (...) @support_avx()
%41 = icmp eq i32 %40, 0
%42 = select i1 %41, i32 21, i32 48
br label %99
43: ; preds = %9
br label %99
44: ; preds = %9
%45 = icmp eq i32 %5, 1
%46 = select i1 %45, i32 23, i32 1
%47 = icmp eq i32 %5, 0
%48 = select i1 %47, i32 17, i32 %46
br label %99
49: ; preds = %15, %12, %36, %11, %18, %27, %9
br label %99
50: ; preds = %3
switch i32 %4, label %65 [
i32 4, label %99
i32 5, label %51
i32 6, label %52
i32 15, label %53
]
51: ; preds = %50
br label %99
52: ; preds = %50
br label %99
53: ; preds = %50
switch i32 %5, label %65 [
i32 0, label %99
i32 2, label %99
i32 1, label %54
i32 10, label %54
i32 6, label %55
i32 5, label %64
]
54: ; preds = %53, %53
br label %99
55: ; preds = %53
switch i32 %6, label %65 [
i32 1, label %56
i32 2, label %60
]
56: ; preds = %55
%57 = tail call i32 (...) @support_avx()
%58 = icmp eq i32 %57, 0
%59 = select i1 %58, i32 30, i32 46
br label %99
60: ; preds = %55
%61 = tail call i32 (...) @support_avx()
%62 = icmp eq i32 %61, 0
%63 = select i1 %62, i32 30, i32 47
br label %99
64: ; preds = %53
br label %99
65: ; preds = %53, %55, %50
br label %99
66: ; preds = %3
%67 = add i32 %4, -4
%68 = icmp ult i32 %67, 3
%69 = add i32 %4, 29
%70 = select i1 %68, i32 %69, i32 4
br label %99
71: ; preds = %3
%72 = icmp eq i32 %4, 5
%73 = select i1 %72, i32 36, i32 5
br label %99
74: ; preds = %3
%75 = icmp eq i32 %4, 6
%76 = select i1 %75, i32 43, i32 42
%77 = icmp eq i32 %4, 5
%78 = select i1 %77, i32 37, i32 %76
br label %99
79: ; preds = %3
%80 = icmp eq i32 %4, 5
%81 = select i1 %80, i32 38, i32 7
br label %99
82: ; preds = %3
%83 = icmp eq i32 %4, 5
%84 = select i1 %83, i32 39, i32 8
br label %99
85: ; preds = %3
%86 = icmp eq i32 %4, 5
%87 = select i1 %86, i32 40, i32 9
br label %99
88: ; preds = %3
%89 = icmp eq i32 %4, 5
%90 = select i1 %89, i32 41, i32 10
br label %99
91: ; preds = %12
%92 = sext i32 %13 to i64
%93 = getelementptr inbounds [15 x i32], [15 x i32]* @switch.table.get_cpuname, i64 0, i64 %92
%94 = load i32, i32* %93
br label %99
95: ; preds = %15
%96 = sext i32 %16 to i64
%97 = getelementptr inbounds [10 x i32], [10 x i32]* @switch.table.get_cpuname.1, i64 0, i64 %96
%98 = load i32, i32* %97
br label %99
99: ; preds = %66, %95, %91, %3, %88, %85, %82, %79, %74, %71, %60, %56, %53, %53, %50, %44, %39, %32, %28, %18, %18, %23, %18, %19, %18, %9, %0, %65, %64, %54, %52, %51, %49, %43, %10
%100 = phi i32 [ 1, %49 ], [ 23, %43 ], [ 13, %10 ], [ 3, %65 ], [ 45, %64 ], [ 30, %54 ], [ 27, %52 ], [ 26, %51 ], [ 11, %0 ], [ 12, %9 ], [ 21, %18 ], [ %22, %19 ], [ 21, %18 ], [ %26, %23 ], [ 21, %18 ], [ 21, %18 ], [ %31, %28 ], [ %35, %32 ], [ %42, %39 ], [ %48, %44 ], [ 25, %50 ], [ 29, %53 ], [ 29, %53 ], [ %59, %56 ], [ %63, %60 ], [ %73, %71 ], [ %78, %74 ], [ %81, %79 ], [ %84, %82 ], [ %87, %85 ], [ %90, %88 ], [ 0, %3 ], [ %94, %91 ], [ %98, %95 ], [ %70, %66 ]
ret i32 %100
}