#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
scalar_t__ cpu_has_feature(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  char cflags[1000], ldflags[1000], buf[1000];
  FILE *file;
  char sse_found = 0;
  if (argc != 2)
    usage();
  sprintf(cflags, "CFLAGS = -O3");
  sprintf(ldflags, "LDFLAGS = -O3");
  if (cpu_has_feature((0x2000 | 20))) {
    sprintf(buf, "%s sse_test.c -o sse4 -msse4 -DSSE4 2> /dev/null", argv[1]);
    system(buf);
    if (file = fopen("sse4", "r")) {
      fclose(file);
      system("./sse4 > temp.txt 2> /dev/null");
      system("diff sse4_test.txt temp.txt > diff.txt 2> /dev/null");
      file = fopen("diff.txt", "r");
      if (fgetc(file) == EOF) {
        strcat(cflags, " -msse4 -DINTEL_SSE4");
        strcat(ldflags, " -msse4");
        sse_found = 1;
      }
      fclose(file);
    }
  }
  if (cpu_has_feature((0x2000 | 9)) && !sse_found) {
    sprintf(buf, "%s sse_test.c -o ssse3 -mssse3 -DSSSE3 2> /dev/null",
            argv[1]);
    system(buf);
    if (file = fopen("ssse3", "r")) {
      fclose(file);
      system("./ssse3 > temp.txt 2> /dev/null");
      system("diff ssse3_test.txt temp.txt > diff.txt 2> /dev/null");
      file = fopen("diff.txt", "r");
      if (fgetc(file) == EOF) {
        strcat(cflags, " -mssse3 -DINTEL_SSSE3");
        strcat(ldflags, " -mssse3");
        sse_found = 1;
      }
      fclose(file);
    }
  }
  if (cpu_has_feature((0x1000 | 26)) && !sse_found) {
    sprintf(buf, "%s sse_test.c -o sse2 -msse2 -DSSE2 2> /dev/null", argv[1]);
    system(buf);
    if (file = fopen("sse2", "r")) {
      fclose(file);
      system("./sse2 > temp.txt 2> /dev/null");
      system("diff sse2_test.txt temp.txt > diff.txt 2> /dev/null");
      file = fopen("diff.txt", "r");
      if (fgetc(file) == EOF) {
        strcat(cflags, " -msse2 -DINTEL_SSE2");
        strcat(ldflags, " -msse2");
        sse_found = 1;
      }
      fclose(file);
    }
  }
  if (cpu_has_feature((0x2000 | 1)) && sse_found) {
    sprintf(buf, "%s pclmul_test.c -o pclmul -maes -mpclmul 2> /dev/null",
            argv[1]);
    system(buf);
    if (file = fopen("pclmul", "r")) {
      fclose(file);
      system("./pclmul > temp.txt 2> /dev/null");
      system("diff pclmul_test.txt temp.txt > diff.txt 2> /dev/null");
      file = fopen("diff.txt", "r");
      if (fgetc(file) == EOF) {
        strcat(cflags, " -maes -mpclmul -DINTEL_PCLMUL");
        strcat(ldflags, " -maes -mpclmul");
      }
      fclose(file);
    }
  }
  printf("%s\n%s\n", cflags, ldflags);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xbf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0xbe9(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11c1 <main+0x31>
mov    $0x0,%al
call   1080 <usage@plt>
lea    -0x400(%rbp),%rdi
lea    0xe31(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
lea    -0x7f0(%rbp),%rdi
lea    0xe29(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
mov    $0x2014,%edi
call   1070 <cpu_has_feature@plt>
cmp    $0x0,%rax
je     12e4 <main+0x154>
lea    -0xbe0(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe06(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
lea    -0xbe0(%rbp),%rdi
call   1040 <system@plt>
lea    0xe93(%rip),%rdi
lea    0xe16(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0xbe8(%rbp)
cmp    $0x0,%rax
je     12df <main+0x14f>
mov    -0xbe8(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xdef(%rip),%rdi
call   1040 <system@plt>
lea    0xe02(%rip),%rdi
call   1040 <system@plt>
lea    0xe2a(%rip),%rdi
lea    0xdce(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0xbe8(%rbp)
mov    -0xbe8(%rbp),%rdi
call   1060 <fgetc@plt>
mov    0x2d4b(%rip),%rcx
cmp    (%rcx),%rax
jne    12d3 <main+0x143>
lea    -0x400(%rbp),%rdi
lea    0xdf6(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x7f0(%rbp),%rdi
lea    0xdf8(%rip),%rsi
call   10a0 <strcat@plt>
movb   $0x1,-0xbe9(%rbp)
mov    -0xbe8(%rbp),%rdi
call   1030 <fclose@plt>
jmp    12e4 <main+0x154>
mov    $0x2009,%edi
call   1070 <cpu_has_feature@plt>
cmp    $0x0,%rax
je     13ea <main+0x25a>
cmpb   $0x0,-0xbe9(%rbp)
jne    13ea <main+0x25a>
lea    -0xbe0(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xdac(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
lea    -0xbe0(%rbp),%rdi
call   1040 <system@plt>
lea    0xe35(%rip),%rdi
lea    0xd10(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0xbe8(%rbp)
cmp    $0x0,%rax
je     13e5 <main+0x255>
mov    -0xbe8(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xd96(%rip),%rdi
call   1040 <system@plt>
lea    0xdaa(%rip),%rdi
call   1040 <system@plt>
lea    0xd24(%rip),%rdi
lea    0xcc8(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0xbe8(%rbp)
mov    -0xbe8(%rbp),%rdi
call   1060 <fgetc@plt>
mov    0x2c45(%rip),%rcx
cmp    (%rcx),%rax
jne    13d9 <main+0x249>
lea    -0x400(%rbp),%rdi
lea    0xd96(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x7f0(%rbp),%rdi
lea    0xd9a(%rip),%rsi
call   10a0 <strcat@plt>
movb   $0x1,-0xbe9(%rbp)
mov    -0xbe8(%rbp),%rdi
call   1030 <fclose@plt>
jmp    13ea <main+0x25a>
mov    $0x101a,%edi
call   1070 <cpu_has_feature@plt>
cmp    $0x0,%rax
je     14f0 <main+0x360>
cmpb   $0x0,-0xbe9(%rbp)
jne    14f0 <main+0x360>
lea    -0xbe0(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd4f(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
lea    -0xbe0(%rbp),%rdi
call   1040 <system@plt>
lea    0xdd1(%rip),%rdi
lea    0xc0a(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0xbe8(%rbp)
cmp    $0x0,%rax
je     14eb <main+0x35b>
mov    -0xbe8(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xd36(%rip),%rdi
call   1040 <system@plt>
lea    0xd49(%rip),%rdi
call   1040 <system@plt>
lea    0xc1e(%rip),%rdi
lea    0xbc2(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0xbe8(%rbp)
mov    -0xbe8(%rbp),%rdi
call   1060 <fgetc@plt>
mov    0x2b3f(%rip),%rcx
cmp    (%rcx),%rax
jne    14df <main+0x34f>
lea    -0x400(%rbp),%rdi
lea    0xd34(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x7f0(%rbp),%rdi
lea    0xd36(%rip),%rsi
call   10a0 <strcat@plt>
movb   $0x1,-0xbe9(%rbp)
mov    -0xbe8(%rbp),%rdi
call   1030 <fclose@plt>
jmp    14f0 <main+0x360>
mov    $0x2001,%edi
call   1070 <cpu_has_feature@plt>
cmp    $0x0,%rax
je     15f2 <main+0x462>
movsbl -0xbe9(%rbp),%eax
cmp    $0x0,%eax
je     15f2 <main+0x462>
lea    -0xbe0(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xce7(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
lea    -0xbe0(%rbp),%rdi
call   1040 <system@plt>
lea    0xd83(%rip),%rdi
lea    0xb01(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0xbe8(%rbp)
cmp    $0x0,%rax
je     15ed <main+0x45d>
mov    -0xbe8(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xcd4(%rip),%rdi
call   1040 <system@plt>
lea    0xce9(%rip),%rdi
call   1040 <system@plt>
lea    0xb15(%rip),%rdi
lea    0xab9(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0xbe8(%rbp)
mov    -0xbe8(%rbp),%rdi
call   1060 <fgetc@plt>
mov    0x2a36(%rip),%rcx
cmp    (%rcx),%rax
jne    15e1 <main+0x451>
lea    -0x400(%rbp),%rdi
lea    0xcd6(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x7f0(%rbp),%rdi
lea    0xce2(%rip),%rsi
call   10a0 <strcat@plt>
mov    -0xbe8(%rbp),%rdi
call   1030 <fclose@plt>
jmp    15f2 <main+0x462>
lea    -0x400(%rbp),%rsi
lea    -0x7f0(%rbp),%rdx
lea    0xcc7(%rip),%rdi
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xbf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0xbd0,%rsp
mov    %rsi,%r14
cmp    $0x2,%edi
je     11aa <main+0x1a>
xor    %eax,%eax
call   1080 <usage@plt>
movabs $0x334f2d203d2053,%rax
mov    %rax,0x3f5(%rsp)
movabs $0x3d205347414c4643,%rcx
53 20 3d
mov    %rcx,0x3f0(%rsp)
movabs $0x205347414c46444c,%rcx
47 53 20
mov    %rcx,(%rsp)
mov    %rax,0x6(%rsp)
mov    $0x2014,%edi
call   1070 <cpu_has_feature@plt>
test   %rax,%rax
je     12a9 <main+0x119>
mov    0x8(%r14),%rdx
lea    0xe1c(%rip),%rsi
xor    %ebp,%ebp
lea    0x7e0(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   10b0 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xea0(%rip),%rdi
lea    0xe23(%rip),%rsi
call   1090 <fopen@plt>
test   %rax,%rax
je     12b7 <main+0x127>
mov    %rax,%rdi
call   1030 <fclose@plt>
lea    0xe08(%rip),%rdi
call   1040 <system@plt>
lea    0xe1b(%rip),%rdi
call   1040 <system@plt>
lea    0xe43(%rip),%rdi
lea    0xde7(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <fgetc@plt>
mov    0x2d6c(%rip),%rcx
cmp    (%rcx),%rax
jne    12ad <main+0x11d>
lea    0xe22(%rip),%rsi
lea    0x3f0(%rsp),%rdi
call   10a0 <strcat@plt>
lea    0xe23(%rip),%rsi
mov    %rsp,%rdi
call   10a0 <strcat@plt>
mov    $0x1,%bpl
jmp    12af <main+0x11f>
xor    %ebp,%ebp
jmp    12b7 <main+0x127>
xor    %ebp,%ebp
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    $0x2009,%edi
call   1070 <cpu_has_feature@plt>
test   %bpl,%bpl
jne    138e <main+0x1fe>
test   %rax,%rax
je     138e <main+0x1fe>
mov    0x8(%r14),%rdx
lea    0xde9(%rip),%rsi
xor    %ebp,%ebp
lea    0x7e0(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   10b0 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xe69(%rip),%rdi
lea    0xd44(%rip),%rsi
call   1090 <fopen@plt>
test   %rax,%rax
je     138e <main+0x1fe>
mov    %rax,%rdi
call   1030 <fclose@plt>
lea    0xdda(%rip),%rdi
call   1040 <system@plt>
lea    0xdee(%rip),%rdi
call   1040 <system@plt>
lea    0xd68(%rip),%rdi
lea    0xd0c(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <fgetc@plt>
mov    0x2c91(%rip),%rcx
cmp    (%rcx),%rax
jne    1384 <main+0x1f4>
lea    0xded(%rip),%rsi
lea    0x3f0(%rsp),%rdi
call   10a0 <strcat@plt>
lea    0xdf0(%rip),%rsi
mov    %rsp,%rdi
call   10a0 <strcat@plt>
mov    $0x1,%bpl
jmp    1386 <main+0x1f6>
xor    %ebp,%ebp
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    $0x101a,%edi
call   1070 <cpu_has_feature@plt>
test   %bpl,%bpl
jne    1465 <main+0x2d5>
test   %rax,%rax
je     1465 <main+0x2d5>
mov    0x8(%r14),%rdx
lea    0xdbb(%rip),%rsi
xor    %ebp,%ebp
lea    0x7e0(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   10b0 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xe34(%rip),%rdi
lea    0xc6d(%rip),%rsi
call   1090 <fopen@plt>
test   %rax,%rax
je     1465 <main+0x2d5>
mov    %rax,%rdi
call   1030 <fclose@plt>
lea    0xda9(%rip),%rdi
call   1040 <system@plt>
lea    0xdbc(%rip),%rdi
call   1040 <system@plt>
lea    0xc91(%rip),%rdi
lea    0xc35(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <fgetc@plt>
mov    0x2bba(%rip),%rcx
cmp    (%rcx),%rax
jne    145b <main+0x2cb>
lea    0xdba(%rip),%rsi
lea    0x3f0(%rsp),%rdi
call   10a0 <strcat@plt>
lea    0xdbb(%rip),%rsi
mov    %rsp,%rdi
call   10a0 <strcat@plt>
mov    $0x1,%bpl
jmp    145d <main+0x2cd>
xor    %ebp,%ebp
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    $0x2001,%edi
call   1070 <cpu_has_feature@plt>
test   %bpl,%bpl
je     1533 <main+0x3a3>
test   %rax,%rax
je     1533 <main+0x3a3>
mov    0x8(%r14),%rdx
lea    0xd85(%rip),%rsi
lea    0x7e0(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   10b0 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xe1a(%rip),%rdi
lea    0xb98(%rip),%rsi
call   1090 <fopen@plt>
test   %rax,%rax
je     1533 <main+0x3a3>
mov    %rax,%rdi
call   1030 <fclose@plt>
lea    0xd7b(%rip),%rdi
call   1040 <system@plt>
lea    0xd90(%rip),%rdi
call   1040 <system@plt>
lea    0xbbc(%rip),%rdi
lea    0xb60(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <fgetc@plt>
mov    0x2ae5(%rip),%rcx
cmp    (%rcx),%rax
jne    152b <main+0x39b>
lea    0xd90(%rip),%rsi
lea    0x3f0(%rsp),%rdi
call   10a0 <strcat@plt>
lea    0xd9b(%rip),%rsi
mov    %rsp,%rdi
call   10a0 <strcat@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0xd94(%rip),%rdi
lea    0x3f0(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xbd0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"CFLAGS = -O3\00"
@.str.1 = [14 x i8] c"LDFLAGS = -O3\00"
@.str.2 = [49 x i8] c"%s sse_test.c -o sse4 -msse4 -DSSE4 2> /dev/null\00"
@.str.3 = [5 x i8] c"sse4\00"
@.str.4 = [2 x i8] c"r\00"
@.str.5 = [31 x i8] c"./sse4 > temp.txt 2> /dev/null\00"
@.str.6 = [52 x i8] c"diff sse4_test.txt temp.txt > diff.txt 2> /dev/null\00"
@.str.7 = [9 x i8] c"diff.txt\00"
@EOF = global i64 0
@.str.8 = [21 x i8] c" -msse4 -DINTEL_SSE4\00"
@.str.9 = [8 x i8] c" -msse4\00"
@.str.10 = [52 x i8] c"%s sse_test.c -o ssse3 -mssse3 -DSSSE3 2> /dev/null\00"
@.str.11 = [6 x i8] c"ssse3\00"
@.str.12 = [32 x i8] c"./ssse3 > temp.txt 2> /dev/null\00"
@.str.13 = [53 x i8] c"diff ssse3_test.txt temp.txt > diff.txt 2> /dev/null\00"
@.str.14 = [23 x i8] c" -mssse3 -DINTEL_SSSE3\00"
@.str.15 = [9 x i8] c" -mssse3\00"
@.str.16 = [49 x i8] c"%s sse_test.c -o sse2 -msse2 -DSSE2 2> /dev/null\00"
@.str.17 = [5 x i8] c"sse2\00"
@.str.18 = [31 x i8] c"./sse2 > temp.txt 2> /dev/null\00"
@.str.19 = [52 x i8] c"diff sse2_test.txt temp.txt > diff.txt 2> /dev/null\00"
@.str.20 = [21 x i8] c" -msse2 -DINTEL_SSE2\00"
@.str.21 = [8 x i8] c" -msse2\00"
@.str.22 = [55 x i8] c"%s pclmul_test.c -o pclmul -maes -mpclmul 2> /dev/null\00"
@.str.23 = [7 x i8] c"pclmul\00"
@.str.24 = [33 x i8] c"./pclmul > temp.txt 2> /dev/null\00"
@.str.25 = [54 x i8] c"diff pclmul_test.txt temp.txt > diff.txt 2> /dev/null\00"
@.str.26 = [31 x i8] c" -maes -mpclmul -DINTEL_PCLMUL\00"
@.str.27 = [16 x i8] c" -maes -mpclmul\00"
@.str.28 = [7 x i8] c"%s\0A%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1000 x i8]
%7 = alloca [1000 x i8]
%8 = alloca [1000 x i8]
%9 = alloca i32*
%10 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 0, i8* %10
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 2
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 (...) @usage()
br label %15
15: ; preds = %13, %2
%16 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%17 = call i32 (i8*, i8*, ...) @sprintf(i8* %16, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%18 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%19 = call i32 (i8*, i8*, ...) @sprintf(i8* %18, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%20 = call i64 @cpu_has_feature(i32 8212)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %51
22: ; preds = %15
%23 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 (i8*, i8*, ...) @sprintf(i8* %23, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i8* %26)
%28 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%29 = call i32 @system(i8* %28)
%30 = call i32* @fopen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %30, i32** %9
%31 = icmp ne i32* %30, null
br i1 %31, label %32, label %50
32: ; preds = %22
%33 = load i32*, i32** %9
%34 = call i32 @fclose(i32* %33)
%35 = call i32 @system(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%36 = call i32 @system(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
%37 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %37, i32** %9
%38 = load i32*, i32** %9
%39 = call i64 @fgetc(i32* %38)
%40 = load i64, i64* @EOF
%41 = icmp eq i64 %39, %40
br i1 %41, label %42, label %47
42: ; preds = %32
%43 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%44 = call i32 @strcat(i8* %43, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%45 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%46 = call i32 @strcat(i8* %45, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
store i8 1, i8* %10
br label %47
47: ; preds = %42, %32
%48 = load i32*, i32** %9
%49 = call i32 @fclose(i32* %48)
br label %50
50: ; preds = %47, %22
br label %51
51: ; preds = %50, %15
%52 = call i64 @cpu_has_feature(i32 8201)
%53 = icmp ne i64 %52, 0
br i1 %53, label %54, label %86
54: ; preds = %51
%55 = load i8, i8* %10
%56 = icmp ne i8 %55, 0
br i1 %56, label %86, label %57
57: ; preds = %54
%58 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%59 = load i8**, i8*** %5
%60 = getelementptr inbounds i8*, i8** %59, i64 1
%61 = load i8*, i8** %60
%62 = call i32 (i8*, i8*, ...) @sprintf(i8* %58, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0), i8* %61)
%63 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%64 = call i32 @system(i8* %63)
%65 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %65, i32** %9
%66 = icmp ne i32* %65, null
br i1 %66, label %67, label %85
67: ; preds = %57
%68 = load i32*, i32** %9
%69 = call i32 @fclose(i32* %68)
%70 = call i32 @system(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0))
%71 = call i32 @system(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.13, i64 0, i64 0))
%72 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %72, i32** %9
%73 = load i32*, i32** %9
%74 = call i64 @fgetc(i32* %73)
%75 = load i64, i64* @EOF
%76 = icmp eq i64 %74, %75
br i1 %76, label %77, label %82
77: ; preds = %67
%78 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%79 = call i32 @strcat(i8* %78, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
%80 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%81 = call i32 @strcat(i8* %80, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0))
store i8 1, i8* %10
br label %82
82: ; preds = %77, %67
%83 = load i32*, i32** %9
%84 = call i32 @fclose(i32* %83)
br label %85
85: ; preds = %82, %57
br label %86
86: ; preds = %85, %54, %51
%87 = call i64 @cpu_has_feature(i32 4122)
%88 = icmp ne i64 %87, 0
br i1 %88, label %89, label %121
89: ; preds = %86
%90 = load i8, i8* %10
%91 = icmp ne i8 %90, 0
br i1 %91, label %121, label %92
92: ; preds = %89
%93 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%94 = load i8**, i8*** %5
%95 = getelementptr inbounds i8*, i8** %94, i64 1
%96 = load i8*, i8** %95
%97 = call i32 (i8*, i8*, ...) @sprintf(i8* %93, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.16, i64 0, i64 0), i8* %96)
%98 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%99 = call i32 @system(i8* %98)
%100 = call i32* @fopen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %100, i32** %9
%101 = icmp ne i32* %100, null
br i1 %101, label %102, label %120
102: ; preds = %92
%103 = load i32*, i32** %9
%104 = call i32 @fclose(i32* %103)
%105 = call i32 @system(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0))
%106 = call i32 @system(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.19, i64 0, i64 0))
%107 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %107, i32** %9
%108 = load i32*, i32** %9
%109 = call i64 @fgetc(i32* %108)
%110 = load i64, i64* @EOF
%111 = icmp eq i64 %109, %110
br i1 %111, label %112, label %117
112: ; preds = %102
%113 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%114 = call i32 @strcat(i8* %113, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0))
%115 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%116 = call i32 @strcat(i8* %115, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0))
store i8 1, i8* %10
br label %117
117: ; preds = %112, %102
%118 = load i32*, i32** %9
%119 = call i32 @fclose(i32* %118)
br label %120
120: ; preds = %117, %92
br label %121
121: ; preds = %120, %89, %86
%122 = call i64 @cpu_has_feature(i32 8193)
%123 = icmp ne i64 %122, 0
br i1 %123, label %124, label %157
124: ; preds = %121
%125 = load i8, i8* %10
%126 = sext i8 %125 to i32
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %157
128: ; preds = %124
%129 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%130 = load i8**, i8*** %5
%131 = getelementptr inbounds i8*, i8** %130, i64 1
%132 = load i8*, i8** %131
%133 = call i32 (i8*, i8*, ...) @sprintf(i8* %129, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.22, i64 0, i64 0), i8* %132)
%134 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%135 = call i32 @system(i8* %134)
%136 = call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %136, i32** %9
%137 = icmp ne i32* %136, null
br i1 %137, label %138, label %156
138: ; preds = %128
%139 = load i32*, i32** %9
%140 = call i32 @fclose(i32* %139)
%141 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.24, i64 0, i64 0))
%142 = call i32 @system(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.25, i64 0, i64 0))
%143 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %143, i32** %9
%144 = load i32*, i32** %9
%145 = call i64 @fgetc(i32* %144)
%146 = load i64, i64* @EOF
%147 = icmp eq i64 %145, %146
br i1 %147, label %148, label %153
148: ; preds = %138
%149 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%150 = call i32 @strcat(i8* %149, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.26, i64 0, i64 0))
%151 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%152 = call i32 @strcat(i8* %151, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.27, i64 0, i64 0))
br label %153
153: ; preds = %148, %138
%154 = load i32*, i32** %9
%155 = call i32 @fclose(i32* %154)
br label %156
156: ; preds = %153, %128
br label %157
157: ; preds = %156, %124, %121
%158 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%159 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%160 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.28, i64 0, i64 0), i8* %158, i8* %159)
%161 = load i32, i32* %3
ret i32 %161
}

LLVM IR (-O2):
@.str = [13 x i8] c"CFLAGS = -O3\00"
@.str.1 = [14 x i8] c"LDFLAGS = -O3\00"
@.str.2 = [49 x i8] c"%s sse_test.c -o sse4 -msse4 -DSSE4 2> /dev/null\00"
@.str.3 = [5 x i8] c"sse4\00"
@.str.4 = [2 x i8] c"r\00"
@.str.5 = [31 x i8] c"./sse4 > temp.txt 2> /dev/null\00"
@.str.6 = [52 x i8] c"diff sse4_test.txt temp.txt > diff.txt 2> /dev/null\00"
@.str.7 = [9 x i8] c"diff.txt\00"
@EOF = global i64 0
@.str.8 = [21 x i8] c" -msse4 -DINTEL_SSE4\00"
@.str.9 = [8 x i8] c" -msse4\00"
@.str.10 = [52 x i8] c"%s sse_test.c -o ssse3 -mssse3 -DSSSE3 2> /dev/null\00"
@.str.11 = [6 x i8] c"ssse3\00"
@.str.12 = [32 x i8] c"./ssse3 > temp.txt 2> /dev/null\00"
@.str.13 = [53 x i8] c"diff ssse3_test.txt temp.txt > diff.txt 2> /dev/null\00"
@.str.14 = [23 x i8] c" -mssse3 -DINTEL_SSSE3\00"
@.str.15 = [9 x i8] c" -mssse3\00"
@.str.16 = [49 x i8] c"%s sse_test.c -o sse2 -msse2 -DSSE2 2> /dev/null\00"
@.str.17 = [5 x i8] c"sse2\00"
@.str.18 = [31 x i8] c"./sse2 > temp.txt 2> /dev/null\00"
@.str.19 = [52 x i8] c"diff sse2_test.txt temp.txt > diff.txt 2> /dev/null\00"
@.str.20 = [21 x i8] c" -msse2 -DINTEL_SSE2\00"
@.str.21 = [8 x i8] c" -msse2\00"
@.str.22 = [55 x i8] c"%s pclmul_test.c -o pclmul -maes -mpclmul 2> /dev/null\00"
@.str.23 = [7 x i8] c"pclmul\00"
@.str.24 = [33 x i8] c"./pclmul > temp.txt 2> /dev/null\00"
@.str.25 = [54 x i8] c"diff pclmul_test.txt temp.txt > diff.txt 2> /dev/null\00"
@.str.26 = [31 x i8] c" -maes -mpclmul -DINTEL_PCLMUL\00"
@.str.27 = [16 x i8] c" -maes -mpclmul\00"
@.str.28 = [7 x i8] c"%s\0A%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1000 x i8]
%4 = alloca [1000 x i8]
%5 = alloca [1000 x i8]
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%9 = icmp eq i32 %0, 2
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = tail call i32 (...) @usage()
br label %12
12: ; preds = %10, %2
%13 = tail call i64 @cpu_has_feature(i32 8212)
%14 = icmp eq i64 %13, 0
br i1 %14, label %36, label %15
15: ; preds = %12
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i8* %17)
%19 = call i32 @system(i8* %8)
%20 = tail call i32* @fopen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%21 = icmp eq i32* %20, null
br i1 %21, label %36, label %22
22: ; preds = %15
%23 = tail call i32 @fclose(i32* %20)
%24 = tail call i32 @system(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%25 = tail call i32 @system(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
%26 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%27 = tail call i64 @fgetc(i32* %26)
%28 = load i64, i64* @EOF
%29 = icmp eq i64 %27, %28
br i1 %29, label %30, label %33
30: ; preds = %22
%31 = call i32 @strcat(i8* %6, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%32 = call i32 @strcat(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
br label %33
33: ; preds = %30, %22
%34 = phi i8 [ 1, %30 ], [ 0, %22 ]
%35 = call i32 @fclose(i32* %26)
br label %36
36: ; preds = %15, %33, %12
%37 = phi i8 [ %34, %33 ], [ 0, %15 ], [ 0, %12 ]
%38 = call i64 @cpu_has_feature(i32 8201)
%39 = icmp eq i64 %38, 0
%40 = icmp ne i8 %37, 0
%41 = or i1 %40, %39
br i1 %41, label %63, label %42
42: ; preds = %36
%43 = getelementptr inbounds i8*, i8** %1, i64 1
%44 = load i8*, i8** %43
%45 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0), i8* %44)
%46 = call i32 @system(i8* %8)
%47 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%48 = icmp eq i32* %47, null
br i1 %48, label %63, label %49
49: ; preds = %42
%50 = call i32 @fclose(i32* %47)
%51 = call i32 @system(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0))
%52 = call i32 @system(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.13, i64 0, i64 0))
%53 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%54 = call i64 @fgetc(i32* %53)
%55 = load i64, i64* @EOF
%56 = icmp eq i64 %54, %55
br i1 %56, label %57, label %60
57: ; preds = %49
%58 = call i32 @strcat(i8* %6, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
%59 = call i32 @strcat(i8* %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0))
br label %60
60: ; preds = %57, %49
%61 = phi i8 [ 1, %57 ], [ 0, %49 ]
%62 = call i32 @fclose(i32* %53)
br label %63
63: ; preds = %42, %60, %36
%64 = phi i8 [ %37, %36 ], [ %61, %60 ], [ 0, %42 ]
%65 = call i64 @cpu_has_feature(i32 4122)
%66 = icmp eq i64 %65, 0
%67 = icmp ne i8 %64, 0
%68 = or i1 %67, %66
br i1 %68, label %90, label %69
69: ; preds = %63
%70 = getelementptr inbounds i8*, i8** %1, i64 1
%71 = load i8*, i8** %70
%72 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.16, i64 0, i64 0), i8* %71)
%73 = call i32 @system(i8* %8)
%74 = call i32* @fopen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%75 = icmp eq i32* %74, null
br i1 %75, label %90, label %76
76: ; preds = %69
%77 = call i32 @fclose(i32* %74)
%78 = call i32 @system(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0))
%79 = call i32 @system(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.19, i64 0, i64 0))
%80 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%81 = call i64 @fgetc(i32* %80)
%82 = load i64, i64* @EOF
%83 = icmp eq i64 %81, %82
br i1 %83, label %84, label %87
84: ; preds = %76
%85 = call i32 @strcat(i8* %6, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0))
%86 = call i32 @strcat(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0))
br label %87
87: ; preds = %84, %76
%88 = phi i8 [ 1, %84 ], [ 0, %76 ]
%89 = call i32 @fclose(i32* %80)
br label %90
90: ; preds = %69, %87, %63
%91 = phi i8 [ %64, %63 ], [ %88, %87 ], [ 0, %69 ]
%92 = call i64 @cpu_has_feature(i32 8193)
%93 = icmp ne i64 %92, 0
%94 = icmp ne i8 %91, 0
%95 = and i1 %94, %93
br i1 %95, label %96, label %116
96: ; preds = %90
%97 = getelementptr inbounds i8*, i8** %1, i64 1
%98 = load i8*, i8** %97
%99 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.22, i64 0, i64 0), i8* %98)
%100 = call i32 @system(i8* %8)
%101 = call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%102 = icmp eq i32* %101, null
br i1 %102, label %116, label %103
103: ; preds = %96
%104 = call i32 @fclose(i32* %101)
%105 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.24, i64 0, i64 0))
%106 = call i32 @system(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.25, i64 0, i64 0))
%107 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%108 = call i64 @fgetc(i32* %107)
%109 = load i64, i64* @EOF
%110 = icmp eq i64 %108, %109
br i1 %110, label %111, label %114
111: ; preds = %103
%112 = call i32 @strcat(i8* %6, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.26, i64 0, i64 0))
%113 = call i32 @strcat(i8* %7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.27, i64 0, i64 0))
br label %114
114: ; preds = %111, %103
%115 = call i32 @fclose(i32* %107)
br label %116
116: ; preds = %96, %114, %90
%117 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.28, i64 0, i64 0), i8* %6, i8* %7)
ret i32 0
}