#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 /*<<< orphan*/ printf(char *);
void get_sse(void) {
  int features;
  features = get_cputype(11);
  if (features & (1 << 8))
    printf("HAVE_MMX=1\n");
  if (features & (1 << 0))
    printf("HAVE_SSE=1\n");
  if (features & (1 << 1))
    printf("HAVE_SSE2=1\n");
  if (features & (1 << 2))
    printf("HAVE_SSE3=1\n");
  if (features & (1 << 3))
    printf("HAVE_SSSE3=1\n");
  if (features & (1 << 4))
    printf("HAVE_SSE4_1=1\n");
  if (features & (1 << 5))
    printf("HAVE_SSE4_2=1\n");
  if (features & (1 << 6))
    printf("HAVE_SSE4A=1\n");
  if (features & (1 << 7))
    printf("HAVE_SSSE5=1\n");
  if (features & (1 << 18))
    printf("HAVE_AVX=1\n");
  if (features & (1 << 10))
    printf("HAVE_3DNOWEX=1\n");
  if (features & (1 << 9))
    printf("HAVE_3DNOW=1\n");
  if (features & (1 << 19))
    printf("HAVE_FMA4=1\n");
  if (features & (1 << 20))
    printf("HAVE_FMA3=1\n");
}


x86 assembly (clang, -O0):
<get_sse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xb,%edi
call   1030 <get_cputype@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x100,%eax
cmp    $0x0,%eax
je     1152 <get_sse+0x32>
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     116d <get_sse+0x4d>
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1188 <get_sse+0x68>
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     11a3 <get_sse+0x83>
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     11be <get_sse+0x9e>
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     11d9 <get_sse+0xb9>
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     11f4 <get_sse+0xd4>
lea    0xe60(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     120f <get_sse+0xef>
lea    0xe54(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     122c <get_sse+0x10c>
lea    0xe45(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x40000,%eax
cmp    $0x0,%eax
je     1249 <get_sse+0x129>
lea    0xe36(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x400,%eax
cmp    $0x0,%eax
je     1266 <get_sse+0x146>
lea    0xe25(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x200,%eax
cmp    $0x0,%eax
je     1283 <get_sse+0x163>
lea    0xe18(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x80000,%eax
cmp    $0x0,%eax
je     12a0 <get_sse+0x180>
lea    0xe09(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x100000,%eax
cmp    $0x0,%eax
je     12bd <get_sse+0x19d>
lea    0xdf9(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sse>:
push   %rbx
mov    $0xb,%edi
call   1030 <get_cputype@plt>
mov    %eax,%ebx
test   $0x100,%eax
jne    11be <get_sse+0x9e>
test   $0x1,%bl
jne    11d3 <get_sse+0xb3>
test   $0x2,%bl
jne    11e8 <get_sse+0xc8>
test   $0x4,%bl
jne    11fd <get_sse+0xdd>
test   $0x8,%bl
jne    1212 <get_sse+0xf2>
test   $0x10,%bl
jne    1227 <get_sse+0x107>
test   $0x20,%bl
jne    123c <get_sse+0x11c>
test   $0x40,%bl
jne    1251 <get_sse+0x131>
test   $0x80,%bl
jne    1266 <get_sse+0x146>
test   $0x40000,%ebx
jne    127e <get_sse+0x15e>
test   $0x400,%ebx
jne    1296 <get_sse+0x176>
test   $0x200,%ebx
jne    12ae <get_sse+0x18e>
test   $0x80000,%ebx
jne    12c6 <get_sse+0x1a6>
test   $0x100000,%ebx
jne    12de <get_sse+0x1be>
pop    %rbx
ret
lea    0xee0(%rip),%rdi
call   1040 <puts@plt>
test   $0x1,%bl
je     1141 <get_sse+0x21>
lea    0xec0(%rip),%rdi
call   1040 <puts@plt>
test   $0x2,%bl
je     114a <get_sse+0x2a>
lea    0xe9f(%rip),%rdi
call   1040 <puts@plt>
test   $0x4,%bl
je     1153 <get_sse+0x33>
lea    0xe7e(%rip),%rdi
call   1040 <puts@plt>
test   $0x8,%bl
je     115c <get_sse+0x3c>
lea    0xe5c(%rip),%rdi
call   1040 <puts@plt>
test   $0x10,%bl
je     1165 <get_sse+0x45>
lea    0xe39(%rip),%rdi
call   1040 <puts@plt>
test   $0x20,%bl
je     116e <get_sse+0x4e>
lea    0xe16(%rip),%rdi
call   1040 <puts@plt>
test   $0x40,%bl
je     1177 <get_sse+0x57>
lea    0xdf4(%rip),%rdi
call   1040 <puts@plt>
test   $0x80,%bl
je     1180 <get_sse+0x60>
lea    0xdd2(%rip),%rdi
call   1040 <puts@plt>
test   $0x40000,%ebx
je     118c <get_sse+0x6c>
lea    0xdaf(%rip),%rdi
call   1040 <puts@plt>
test   $0x400,%ebx
je     1198 <get_sse+0x78>
lea    0xd88(%rip),%rdi
call   1040 <puts@plt>
test   $0x200,%ebx
je     11a4 <get_sse+0x84>
lea    0xd63(%rip),%rdi
call   1040 <puts@plt>
test   $0x80000,%ebx
je     11b0 <get_sse+0x90>
lea    0xd3f(%rip),%rdi
call   1040 <puts@plt>
test   $0x100000,%ebx
je     11bc <get_sse+0x9c>
lea    0xd1b(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"HAVE_MMX=1\0A\00"
@.str.1 = [12 x i8] c"HAVE_SSE=1\0A\00"
@.str.2 = [13 x i8] c"HAVE_SSE2=1\0A\00"
@.str.3 = [13 x i8] c"HAVE_SSE3=1\0A\00"
@.str.4 = [14 x i8] c"HAVE_SSSE3=1\0A\00"
@.str.5 = [15 x i8] c"HAVE_SSE4_1=1\0A\00"
@.str.6 = [15 x i8] c"HAVE_SSE4_2=1\0A\00"
@.str.7 = [14 x i8] c"HAVE_SSE4A=1\0A\00"
@.str.8 = [14 x i8] c"HAVE_SSSE5=1\0A\00"
@.str.9 = [12 x i8] c"HAVE_AVX=1\0A\00"
@.str.10 = [16 x i8] c"HAVE_3DNOWEX=1\0A\00"
@.str.11 = [14 x i8] c"HAVE_3DNOW=1\0A\00"
@.str.12 = [13 x i8] c"HAVE_FMA4=1\0A\00"
@.str.13 = [13 x i8] c"HAVE_FMA3=1\0A\00"
define void @get_sse() {
%1 = alloca i32
%2 = call i32 @get_cputype(i32 11)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, 256
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = load i32, i32* %1
%10 = and i32 %9, 1
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %8
%15 = load i32, i32* %1
%16 = and i32 %15, 2
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %20
20: ; preds = %18, %14
%21 = load i32, i32* %1
%22 = and i32 %21, 4
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %26
26: ; preds = %24, %20
%27 = load i32, i32* %1
%28 = and i32 %27, 8
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %32
32: ; preds = %30, %26
%33 = load i32, i32* %1
%34 = and i32 %33, 16
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
br label %38
38: ; preds = %36, %32
%39 = load i32, i32* %1
%40 = and i32 %39, 32
%41 = icmp ne i32 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %38
%43 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
br label %44
44: ; preds = %42, %38
%45 = load i32, i32* %1
%46 = and i32 %45, 64
%47 = icmp ne i32 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %44
%49 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
br label %50
50: ; preds = %48, %44
%51 = load i32, i32* %1
%52 = and i32 %51, 128
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %50
%55 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
br label %56
56: ; preds = %54, %50
%57 = load i32, i32* %1
%58 = and i32 %57, 262144
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %56
%61 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0))
br label %62
62: ; preds = %60, %56
%63 = load i32, i32* %1
%64 = and i32 %63, 1024
%65 = icmp ne i32 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %62
%67 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
br label %68
68: ; preds = %66, %62
%69 = load i32, i32* %1
%70 = and i32 %69, 512
%71 = icmp ne i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %68
%73 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
br label %74
74: ; preds = %72, %68
%75 = load i32, i32* %1
%76 = and i32 %75, 524288
%77 = icmp ne i32 %76, 0
br i1 %77, label %78, label %80
78: ; preds = %74
%79 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0))
br label %80
80: ; preds = %78, %74
%81 = load i32, i32* %1
%82 = and i32 %81, 1048576
%83 = icmp ne i32 %82, 0
br i1 %83, label %84, label %86
84: ; preds = %80
%85 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
br label %86
86: ; preds = %84, %80
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"HAVE_FMA3=1\00"
@str.14 = [12 x i8] c"HAVE_FMA4=1\00"
@str.15 = [13 x i8] c"HAVE_3DNOW=1\00"
@str.16 = [15 x i8] c"HAVE_3DNOWEX=1\00"
@str.17 = [11 x i8] c"HAVE_AVX=1\00"
@str.18 = [13 x i8] c"HAVE_SSSE5=1\00"
@str.19 = [13 x i8] c"HAVE_SSE4A=1\00"
@str.20 = [14 x i8] c"HAVE_SSE4_2=1\00"
@str.21 = [14 x i8] c"HAVE_SSE4_1=1\00"
@str.22 = [13 x i8] c"HAVE_SSSE3=1\00"
@str.23 = [12 x i8] c"HAVE_SSE3=1\00"
@str.24 = [12 x i8] c"HAVE_SSE2=1\00"
@str.25 = [11 x i8] c"HAVE_SSE=1\00"
@str.26 = [11 x i8] c"HAVE_MMX=1\00"
define void @get_sse() {
%1 = tail call i32 @get_cputype(i32 11)
%2 = and i32 %1, 256
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.26, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = and i32 %1, 1
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.25, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
%12 = and i32 %1, 2
%13 = icmp eq i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %11
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.24, i64 0, i64 0))
br label %16
16: ; preds = %14, %11
%17 = and i32 %1, 4
%18 = icmp eq i32 %17, 0
br i1 %18, label %21, label %19
19: ; preds = %16
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.23, i64 0, i64 0))
br label %21
21: ; preds = %19, %16
%22 = and i32 %1, 8
%23 = icmp eq i32 %22, 0
br i1 %23, label %26, label %24
24: ; preds = %21
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.22, i64 0, i64 0))
br label %26
26: ; preds = %24, %21
%27 = and i32 %1, 16
%28 = icmp eq i32 %27, 0
br i1 %28, label %31, label %29
29: ; preds = %26
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.21, i64 0, i64 0))
br label %31
31: ; preds = %29, %26
%32 = and i32 %1, 32
%33 = icmp eq i32 %32, 0
br i1 %33, label %36, label %34
34: ; preds = %31
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.20, i64 0, i64 0))
br label %36
36: ; preds = %34, %31
%37 = and i32 %1, 64
%38 = icmp eq i32 %37, 0
br i1 %38, label %41, label %39
39: ; preds = %36
%40 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.19, i64 0, i64 0))
br label %41
41: ; preds = %39, %36
%42 = and i32 %1, 128
%43 = icmp eq i32 %42, 0
br i1 %43, label %46, label %44
44: ; preds = %41
%45 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.18, i64 0, i64 0))
br label %46
46: ; preds = %44, %41
%47 = and i32 %1, 262144
%48 = icmp eq i32 %47, 0
br i1 %48, label %51, label %49
49: ; preds = %46
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.17, i64 0, i64 0))
br label %51
51: ; preds = %49, %46
%52 = and i32 %1, 1024
%53 = icmp eq i32 %52, 0
br i1 %53, label %56, label %54
54: ; preds = %51
%55 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.16, i64 0, i64 0))
br label %56
56: ; preds = %54, %51
%57 = and i32 %1, 512
%58 = icmp eq i32 %57, 0
br i1 %58, label %61, label %59
59: ; preds = %56
%60 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.15, i64 0, i64 0))
br label %61
61: ; preds = %59, %56
%62 = and i32 %1, 524288
%63 = icmp eq i32 %62, 0
br i1 %63, label %66, label %64
64: ; preds = %61
%65 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.14, i64 0, i64 0))
br label %66
66: ; preds = %64, %61
%67 = and i32 %1, 1048576
%68 = icmp eq i32 %67, 0
br i1 %68, label %71, label %69
69: ; preds = %66
%70 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
br label %71
71: ; preds = %69, %66
ret void
}