#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 /*<<< orphan*/ CPUID(int, unsigned int *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strcmp(char *, char *);
int main() {
  unsigned int i;
  unsigned int result[4];
  char buf[20];
  CPUID(0, (unsigned int *)buf);
  for (i = 0; i < 4; i++) {
    char tmp = buf[8 + i];
    buf[8 + i] = buf[12 + i];
    buf[12 + i] = tmp;
  }
  buf[16] = '\0';
  char is_amd = 0, is_intel = 0;
  if (!strcmp(buf + 4, "AuthenticAMD"))
    is_amd = 1;
  else if (!strcmp(buf + 4, "GenuineIntel"))
    is_intel = 1;
  CPUID(1, result);
  if (result[3] & 1)
    printf("fpu ");
  if (result[3] & (1 << 15))
    printf("cmov ");
  if (result[3] & (1 << 4))
    printf("rdtsc ");
  if (result[3] & (1 << 23))
    printf("mmx ");
  if (result[3] & (1 << 25))
    printf("sse ");
  if (is_amd) {
    CPUID(1, result);
    if (result[3] & (1 << 26))
      printf("sse2 ");
    if (result[2] & 1)
      printf("ss3 ");
    if (result[3] & (1 << 28))
      printf("htt ");
    CPUID(0x80000000, result);
    if (result[0] >= 0x80000001) {
      CPUID(0x80000001, result);
      if (result[3] & (1 << 31))
        printf("3dnow ");
      if (result[3] & (1 << 30))
        printf("3dnowext ");
    }
  } else if (is_intel) {
    CPUID(1, result);
    if (result[3] & (1 << 26))
      printf("sse2 ");
    if (result[2] & 1)
      printf("sse3 ");
    if (result[3] & (1 << 28))
      printf("htt ");
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rsi
xor    %edi,%edi
call   1050 <CPUID@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jae    119f <main+0x6f>
mov    -0x8(%rbp),%eax
add    $0x8,%eax
mov    %eax,%eax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x41(%rbp)
mov    -0x8(%rbp),%eax
add    $0xc,%eax
mov    %eax,%eax
mov    -0x40(%rbp,%rax,1),%cl
mov    -0x8(%rbp),%eax
add    $0x8,%eax
mov    %eax,%eax
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x41(%rbp),%cl
mov    -0x8(%rbp),%eax
add    $0xc,%eax
mov    %eax,%eax
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1151 <main+0x21>
movb   $0x0,-0x30(%rbp)
movb   $0x0,-0x42(%rbp)
movb   $0x0,-0x43(%rbp)
lea    -0x40(%rbp),%rdi
add    $0x4,%rdi
lea    0xe46(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11d1 <main+0xa1>
movb   $0x1,-0x42(%rbp)
jmp    11f7 <main+0xc7>
lea    -0x40(%rbp),%rdi
add    $0x4,%rdi
lea    0xe2d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11f2 <main+0xc2>
movb   $0x1,-0x43(%rbp)
jmp    11f7 <main+0xc7>
lea    -0x20(%rbp),%rsi
mov    $0x1,%edi
call   1050 <CPUID@plt>
mov    -0x14(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1220 <main+0xf0>
lea    0xdff(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
je     123d <main+0x10d>
lea    0xde7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1258 <main+0x128>
lea    0xdd2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
and    $0x800000,%eax
cmp    $0x0,%eax
je     1275 <main+0x145>
lea    0xdbc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
and    $0x2000000,%eax
cmp    $0x0,%eax
je     1292 <main+0x162>
lea    0xda4(%rip),%rdi
call   1030 <printf@plt>
cmpb   $0x0,-0x42(%rbp)
je     136c <main+0x23c>
lea    -0x20(%rbp),%rsi
mov    $0x1,%edi
call   1050 <CPUID@plt>
mov    -0x14(%rbp),%eax
and    $0x4000000,%eax
cmp    $0x0,%eax
je     12c7 <main+0x197>
lea    0xd74(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     12e2 <main+0x1b2>
lea    0xd5f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
and    $0x10000000,%eax
cmp    $0x0,%eax
je     12ff <main+0x1cf>
lea    0xd47(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
mov    $0x80000000,%edi
call   1050 <CPUID@plt>
cmpl   $0x80000001,-0x20(%rbp)
jb     1367 <main+0x237>
lea    -0x20(%rbp),%rsi
mov    $0x80000001,%edi
call   1050 <CPUID@plt>
mov    -0x14(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     1345 <main+0x215>
lea    0xd06(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
and    $0x40000000,%eax
cmp    $0x0,%eax
je     1362 <main+0x232>
lea    0xcf0(%rip),%rdi
call   1030 <printf@plt>
jmp    1367 <main+0x237>
jmp    13e3 <main+0x2b3>
cmpb   $0x0,-0x43(%rbp)
je     13de <main+0x2ae>
lea    -0x20(%rbp),%rsi
mov    $0x1,%edi
call   1050 <CPUID@plt>
mov    -0x14(%rbp),%eax
and    $0x4000000,%eax
cmp    $0x0,%eax
je     13a1 <main+0x271>
lea    0xc9a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     13bc <main+0x28c>
lea    0xca0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
and    $0x10000000,%eax
cmp    $0x0,%eax
je     13d9 <main+0x2a9>
lea    0xc6d(%rip),%rdi
call   1030 <printf@plt>
jmp    13de <main+0x2ae>
jmp    13e3 <main+0x2b3>
lea    0xc73(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x30,%rsp
lea    0x10(%rsp),%rsi
xor    %edi,%edi
call   1050 <CPUID@plt>
rolq   $0x20,0x18(%rsp)
movb   $0x0,0x20(%rsp)
movabs $0x69746e6568747541,%rax
6e 74 69
xor    0x14(%rsp),%rax
movabs $0x444d416369746e,%rcx
xor    0x19(%rsp),%rcx
xor    %ebx,%ebx
or     %rax,%rcx
setne  %r14b
je     119f <main+0x6f>
movabs $0x49656e69756e6547,%rax
6e 65 49
xor    0x14(%rsp),%rax
movabs $0x6c65746e49656e,%rcx
xor    0x19(%rsp),%rcx
or     %rax,%rcx
setne  %bpl
jmp    11a2 <main+0x72>
mov    $0x1,%bpl
mov    %rsp,%rsi
mov    $0x1,%edi
call   1050 <CPUID@plt>
mov    0xc(%rsp),%eax
test   $0x1,%al
jne    123f <main+0x10f>
test   $0x8000,%eax
jne    125a <main+0x12a>
test   $0x10,%al
jne    1272 <main+0x142>
test   $0x800000,%eax
je     11e5 <main+0xb5>
lea    0xe50(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
mov    %r14b,%bl
test   $0x2000000,%eax
je     11fb <main+0xcb>
lea    0xe3b(%rip),%rdi
call   1040 <printf@plt>
test   %ebx,%ebx
je     1292 <main+0x162>
test   %bpl,%bpl
jne    1371 <main+0x241>
mov    %rsp,%rsi
mov    $0x1,%edi
call   1050 <CPUID@plt>
testb  $0x4,0xf(%rsp)
jne    133b <main+0x20b>
testb  $0x1,0x8(%rsp)
jne    1352 <main+0x222>
testb  $0x10,0xf(%rsp)
jne    1365 <main+0x235>
jmp    1371 <main+0x241>
lea    0xdd4(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
test   $0x8000,%eax
je     11c6 <main+0x96>
lea    0xdbe(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
test   $0x10,%al
je     11ce <main+0x9e>
lea    0xdac(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
test   $0x800000,%eax
jne    11d5 <main+0xa5>
jmp    11e5 <main+0xb5>
mov    %rsp,%rsi
mov    $0x1,%edi
call   1050 <CPUID@plt>
testb  $0x4,0xf(%rsp)
jne    130f <main+0x1df>
testb  $0x1,0x8(%rsp)
jne    1322 <main+0x1f2>
testb  $0x10,0xf(%rsp)
je     12c0 <main+0x190>
lea    0xd86(%rip),%rdi
call   1040 <printf@plt>
mov    %rsp,%rsi
mov    $0x80000000,%edi
call   1050 <CPUID@plt>
cmpl   $0x80000001,(%rsp)
jb     1371 <main+0x241>
mov    %rsp,%rsi
mov    $0x80000001,%edi
call   1050 <CPUID@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jns    12ff <main+0x1cf>
lea    0xd50(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
test   $0x40000000,%eax
je     1371 <main+0x241>
lea    0xd40(%rip),%rdi
jmp    136c <main+0x23c>
lea    0xd20(%rip),%rdi
call   1040 <printf@plt>
testb  $0x1,0x8(%rsp)
je     12ad <main+0x17d>
lea    0xd13(%rip),%rdi
call   1040 <printf@plt>
testb  $0x10,0xf(%rsp)
jne    12b4 <main+0x184>
jmp    12c0 <main+0x190>
lea    0xcf4(%rip),%rdi
call   1040 <printf@plt>
testb  $0x1,0x8(%rsp)
je     122f <main+0xff>
lea    0xcfe(%rip),%rdi
call   1040 <printf@plt>
testb  $0x10,0xf(%rsp)
je     1371 <main+0x241>
lea    0xcd5(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"AuthenticAMD\00"
@.str.1 = [13 x i8] c"GenuineIntel\00"
@.str.2 = [5 x i8] c"fpu \00"
@.str.3 = [6 x i8] c"cmov \00"
@.str.4 = [7 x i8] c"rdtsc \00"
@.str.5 = [5 x i8] c"mmx \00"
@.str.6 = [5 x i8] c"sse \00"
@.str.7 = [6 x i8] c"sse2 \00"
@.str.8 = [5 x i8] c"ss3 \00"
@.str.9 = [5 x i8] c"htt \00"
@.str.10 = [7 x i8] c"3dnow \00"
@.str.11 = [10 x i8] c"3dnowext \00"
@.str.12 = [6 x i8] c"sse3 \00"
@.str.13 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [4 x i32]
%4 = alloca [20 x i8]
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i32 0, i32* %1
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%9 = bitcast i8* %8 to i32*
%10 = call i32 @CPUID(i32 0, i32* %9)
store i32 0, i32* %2
br label %11
11: ; preds = %34, %0
%12 = load i32, i32* %2
%13 = icmp ult i32 %12, 4
br i1 %13, label %14, label %37
14: ; preds = %11
%15 = load i32, i32* %2
%16 = add i32 8, %15
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 %17
%19 = load i8, i8* %18
store i8 %19, i8* %5
%20 = load i32, i32* %2
%21 = add i32 12, %20
%22 = zext i32 %21 to i64
%23 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = load i32, i32* %2
%26 = add i32 8, %25
%27 = zext i32 %26 to i64
%28 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 %27
store i8 %24, i8* %28
%29 = load i8, i8* %5
%30 = load i32, i32* %2
%31 = add i32 12, %30
%32 = zext i32 %31 to i64
%33 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 %32
store i8 %29, i8* %33
br label %34
34: ; preds = %14
%35 = load i32, i32* %2
%36 = add i32 %35, 1
store i32 %36, i32* %2
br label %11
37: ; preds = %11
%38 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 16
store i8 0, i8* %38
store i8 0, i8* %6
store i8 0, i8* %7
%39 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%40 = getelementptr inbounds i8, i8* %39, i64 4
%41 = call i32 @strcmp(i8* %40, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%42 = icmp ne i32 %41, 0
br i1 %42, label %44, label %43
43: ; preds = %37
store i8 1, i8* %6
br label %51
44: ; preds = %37
%45 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%46 = getelementptr inbounds i8, i8* %45, i64 4
%47 = call i32 @strcmp(i8* %46, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%48 = icmp ne i32 %47, 0
br i1 %48, label %50, label %49
49: ; preds = %44
store i8 1, i8* %7
br label %50
50: ; preds = %49, %44
br label %51
51: ; preds = %50, %43
%52 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%53 = call i32 @CPUID(i32 1, i32* %52)
%54 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%55 = load i32, i32* %54
%56 = and i32 %55, 1
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %60
58: ; preds = %51
%59 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %60
60: ; preds = %58, %51
%61 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%62 = load i32, i32* %61
%63 = and i32 %62, 32768
%64 = icmp ne i32 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %60
%66 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %67
67: ; preds = %65, %60
%68 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%69 = load i32, i32* %68
%70 = and i32 %69, 16
%71 = icmp ne i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %67
%73 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %74
74: ; preds = %72, %67
%75 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%76 = load i32, i32* %75
%77 = and i32 %76, 8388608
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %81
79: ; preds = %74
%80 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %81
81: ; preds = %79, %74
%82 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%83 = load i32, i32* %82
%84 = and i32 %83, 33554432
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %88
86: ; preds = %81
%87 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %88
88: ; preds = %86, %81
%89 = load i8, i8* %6
%90 = icmp ne i8 %89, 0
br i1 %90, label %91, label %138
91: ; preds = %88
%92 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%93 = call i32 @CPUID(i32 1, i32* %92)
%94 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%95 = load i32, i32* %94
%96 = and i32 %95, 67108864
%97 = icmp ne i32 %96, 0
br i1 %97, label %98, label %100
98: ; preds = %91
%99 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %100
100: ; preds = %98, %91
%101 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 2
%102 = load i32, i32* %101
%103 = and i32 %102, 1
%104 = icmp ne i32 %103, 0
br i1 %104, label %105, label %107
105: ; preds = %100
%106 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %107
107: ; preds = %105, %100
%108 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%109 = load i32, i32* %108
%110 = and i32 %109, 268435456
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %114
112: ; preds = %107
%113 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
br label %114
114: ; preds = %112, %107
%115 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%116 = call i32 @CPUID(i32 -2147483648, i32* %115)
%117 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%118 = load i32, i32* %117
%119 = icmp uge i32 %118, -2147483647
br i1 %119, label %120, label %137
120: ; preds = %114
%121 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%122 = call i32 @CPUID(i32 -2147483647, i32* %121)
%123 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%124 = load i32, i32* %123
%125 = and i32 %124, -2147483648
%126 = icmp ne i32 %125, 0
br i1 %126, label %127, label %129
127: ; preds = %120
%128 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
br label %129
129: ; preds = %127, %120
%130 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%131 = load i32, i32* %130
%132 = and i32 %131, 1073741824
%133 = icmp ne i32 %132, 0
br i1 %133, label %134, label %136
134: ; preds = %129
%135 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0))
br label %136
136: ; preds = %134, %129
br label %137
137: ; preds = %136, %114
br label %166
138: ; preds = %88
%139 = load i8, i8* %7
%140 = icmp ne i8 %139, 0
br i1 %140, label %141, label %165
141: ; preds = %138
%142 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%143 = call i32 @CPUID(i32 1, i32* %142)
%144 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%145 = load i32, i32* %144
%146 = and i32 %145, 67108864
%147 = icmp ne i32 %146, 0
br i1 %147, label %148, label %150
148: ; preds = %141
%149 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %150
150: ; preds = %148, %141
%151 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 2
%152 = load i32, i32* %151
%153 = and i32 %152, 1
%154 = icmp ne i32 %153, 0
br i1 %154, label %155, label %157
155: ; preds = %150
%156 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
br label %157
157: ; preds = %155, %150
%158 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%159 = load i32, i32* %158
%160 = and i32 %159, 268435456
%161 = icmp ne i32 %160, 0
br i1 %161, label %162, label %164
162: ; preds = %157
%163 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
br label %164
164: ; preds = %162, %157
br label %165
165: ; preds = %164, %138
br label %166
166: ; preds = %165, %137
%167 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"AuthenticAMD\00"
@.str.1 = [13 x i8] c"GenuineIntel\00"
@.str.2 = [5 x i8] c"fpu \00"
@.str.3 = [6 x i8] c"cmov \00"
@.str.4 = [7 x i8] c"rdtsc \00"
@.str.5 = [5 x i8] c"mmx \00"
@.str.6 = [5 x i8] c"sse \00"
@.str.7 = [6 x i8] c"sse2 \00"
@.str.8 = [5 x i8] c"ss3 \00"
@.str.9 = [5 x i8] c"htt \00"
@.str.10 = [7 x i8] c"3dnow \00"
@.str.11 = [10 x i8] c"3dnowext \00"
@.str.12 = [6 x i8] c"sse3 \00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = alloca [20 x i8]
%3 = bitcast [4 x i32]* %1 to i8*
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = bitcast [20 x i8]* %2 to i32*
%6 = call i32 @CPUID(i32 0, i32* %5)
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 8
%8 = load i8, i8* %7
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 12
%10 = load i8, i8* %9
store i8 %10, i8* %7
store i8 %8, i8* %9
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 9
%12 = load i8, i8* %11
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 13
%14 = load i8, i8* %13
store i8 %14, i8* %11
store i8 %12, i8* %13
%15 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 10
%16 = load i8, i8* %15
%17 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 14
%18 = load i8, i8* %17
store i8 %18, i8* %15
store i8 %16, i8* %17
%19 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 11
%20 = load i8, i8* %19
%21 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 15
%22 = load i8, i8* %21
store i8 %22, i8* %19
store i8 %20, i8* %21
%23 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 16
store i8 0, i8* %23
%24 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 4
%25 = call i32 @bcmp(i8* dereferenceable(13) %24, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 13)
%26 = icmp eq i32 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %0
%28 = call i32 @bcmp(i8* dereferenceable(13) %24, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i64 13)
%29 = icmp ne i32 %28, 0
br label %30
30: ; preds = %27, %0
%31 = phi i1 [ true, %0 ], [ %29, %27 ]
%32 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%33 = call i32 @CPUID(i32 1, i32* %32)
%34 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%35 = load i32, i32* %34
%36 = and i32 %35, 1
%37 = icmp eq i32 %36, 0
br i1 %37, label %41, label %38
38: ; preds = %30
%39 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%40 = load i32, i32* %34
br label %41
41: ; preds = %38, %30
%42 = phi i32 [ %40, %38 ], [ %35, %30 ]
%43 = and i32 %42, 32768
%44 = icmp eq i32 %43, 0
br i1 %44, label %48, label %45
45: ; preds = %41
%46 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%47 = load i32, i32* %34
br label %48
48: ; preds = %45, %41
%49 = phi i32 [ %47, %45 ], [ %42, %41 ]
%50 = and i32 %49, 16
%51 = icmp eq i32 %50, 0
br i1 %51, label %55, label %52
52: ; preds = %48
%53 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%54 = load i32, i32* %34
br label %55
55: ; preds = %52, %48
%56 = phi i32 [ %54, %52 ], [ %49, %48 ]
%57 = and i32 %56, 8388608
%58 = icmp eq i32 %57, 0
br i1 %58, label %62, label %59
59: ; preds = %55
%60 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%61 = load i32, i32* %34
br label %62
62: ; preds = %59, %55
%63 = phi i32 [ %61, %59 ], [ %56, %55 ]
%64 = and i32 %63, 33554432
%65 = icmp eq i32 %64, 0
br i1 %65, label %68, label %66
66: ; preds = %62
%67 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %68
68: ; preds = %66, %62
br i1 %26, label %69, label %104
69: ; preds = %68
%70 = call i32 @CPUID(i32 1, i32* %32)
%71 = load i32, i32* %34
%72 = and i32 %71, 67108864
%73 = icmp eq i32 %72, 0
br i1 %73, label %76, label %74
74: ; preds = %69
%75 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %76
76: ; preds = %74, %69
%77 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%78 = load i32, i32* %77
%79 = and i32 %78, 1
%80 = icmp eq i32 %79, 0
br i1 %80, label %83, label %81
81: ; preds = %76
%82 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %83
83: ; preds = %81, %76
%84 = load i32, i32* %34
%85 = and i32 %84, 268435456
%86 = icmp eq i32 %85, 0
br i1 %86, label %89, label %87
87: ; preds = %83
%88 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
br label %89
89: ; preds = %87, %83
%90 = call i32 @CPUID(i32 -2147483648, i32* %32)
%91 = load i32, i32* %32
%92 = icmp ugt i32 %91, -2147483648
br i1 %92, label %93, label %126
93: ; preds = %89
%94 = call i32 @CPUID(i32 -2147483647, i32* %32)
%95 = load i32, i32* %34
%96 = icmp sgt i32 %95, -1
br i1 %96, label %100, label %97
97: ; preds = %93
%98 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%99 = load i32, i32* %34
br label %100
100: ; preds = %97, %93
%101 = phi i32 [ %99, %97 ], [ %95, %93 ]
%102 = and i32 %101, 1073741824
%103 = icmp eq i32 %102, 0
br i1 %103, label %126, label %123
104: ; preds = %68
br i1 %31, label %126, label %105
105: ; preds = %104
%106 = call i32 @CPUID(i32 1, i32* %32)
%107 = load i32, i32* %34
%108 = and i32 %107, 67108864
%109 = icmp eq i32 %108, 0
br i1 %109, label %112, label %110
110: ; preds = %105
%111 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %112
112: ; preds = %110, %105
%113 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%114 = load i32, i32* %113
%115 = and i32 %114, 1
%116 = icmp eq i32 %115, 0
br i1 %116, label %119, label %117
117: ; preds = %112
%118 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
br label %119
119: ; preds = %117, %112
%120 = load i32, i32* %34
%121 = and i32 %120, 268435456
%122 = icmp eq i32 %121, 0
br i1 %122, label %126, label %123
123: ; preds = %119, %100
%124 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), %100 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), %119 ]
%125 = call i32 @printf(i8* dereferenceable(1) %124)
br label %126
126: ; preds = %123, %104, %119, %89, %100
%127 = call i32 @putchar(i32 10)
ret i32 0
}