xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __isoc99_scanf();
double add1(float);
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char *argv[], char *envp[]) {
  float local0;
  double st;
  __isoc99_scanf();
  st = add1(local0);
  printf("Sum = %ld\n", st);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1050 <__isoc99_scanf@plt>
movss  -0x1c(%rbp),%xmm0
call   1040 <add1@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <__isoc99_scanf@plt>
call   1040 <add1@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Sum = %ld\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca float
%9 = alloca double
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%10 = call i32 (...) @__isoc99_scanf()
%11 = load float, float* %8
%12 = call double @add1(float %11)
store double %12, double* %9
%13 = load double, double* %9
%14 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Sum = %ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @__isoc99_scanf()
%5 = tail call double @add1(float undef)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_utf_string_table(char *string_table) { free(string_table); }


x86 assembly (clang, -O0):
<free_utf_string_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_utf_string_table>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_utf_string_table(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
ret void
}

LLVM IR (-O2):
define void @free_utf_string_table(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int func(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i;
  long result = 0;
  for (i = 1; i < 100; i++) {
    result += i;
  }
  printf("result[1-100] = %d\n", result);
  printf("result[1-250] = %d\n", func(250));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1162 <main+0x42>
movslq -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113e <main+0x1e>
mov    -0x10(%rbp),%rax
mov    %eax,%esi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    $0xfa,%edi
call   1040 <func@plt>
mov    %eax,%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1356,%esi
call   1030 <printf@plt>
mov    $0xfa,%edi
call   1040 <func@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"result[1-100] = %d\0A\00"
@.str.1 = [20 x i8] c"result[1-250] = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %3
store i32 1, i32* %2
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = load i64, i64* %3
%11 = add nsw i64 %10, %9
store i64 %11, i64* %3
br label %12
12: ; preds = %7
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %4
15: ; preds = %4
%16 = load i64, i64* %3
%17 = trunc i64 %16 to i32
%18 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = call i32 @func(i32 250)
%20 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"result[1-100] = %d\0A\00"
@.str.1 = [20 x i8] c"result[1-250] = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 4950)
%2 = tail call i32 @func(i32 250)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
scalar_t__ ENOSYS;
scalar_t__ errno;
scalar_t__ get_mempolicy(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                         int /*<<< orphan*/, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int numa_available(void) {
  if (get_mempolicy(NULL, NULL, 0, 0, 0) < 0 && errno == ENOSYS)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<numa_available>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%esi
xor    %r8d,%r8d
mov    %rsi,%rdi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <get_mempolicy@plt>
cmp    $0x0,%rax
jge    115d <numa_available+0x4d>
mov    0x2e9a(%rip),%rax
mov    (%rax),%rax
mov    0x2ea0(%rip),%rcx
cmp    (%rcx),%rax
jne    115d <numa_available+0x4d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1164 <numa_available+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numa_available>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <get_mempolicy@plt>
test   %rax,%rax
jns    1141 <numa_available+0x31>
mov    0x2eab(%rip),%rax
mov    (%rax),%rcx
mov    0x2eb1(%rip),%rdx
mov    $0xffffffff,%eax
cmp    (%rdx),%rcx
je     1143 <numa_available+0x33>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i64 0
@ENOSYS = global i64 0
define i32 @numa_available() {
%1 = alloca i32
%2 = call i64 @get_mempolicy(i32* null, i32* null, i32 0, i32 0, i32 0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = load i64, i64* @errno
%6 = load i64, i64* @ENOSYS
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %4
store i32 -1, i32* %1
br label %10
9: ; preds = %4, %0
store i32 0, i32* %1
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@errno = global i64 0
@ENOSYS = global i64 0
define i32 @numa_available() {
%1 = tail call i64 @get_mempolicy(i32* null, i32* null, i32 0, i32 0, i32 0)
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = load i64, i64* @errno
%5 = load i64, i64* @ENOSYS
%6 = icmp eq i64 %4, %5
br i1 %6, label %8, label %7
7: ; preds = %3, %0
br label %8
8: ; preds = %3, %7
%9 = phi i32 [ 0, %7 ], [ -1, %3 ]
ret i32 %9
}
/* Variables and functions */
char *calloc(scalar_t__, int);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *cpystr(const char *str) {
  char *s = calloc(strlen(str) + 1, sizeof(char));
  if (s == NULL)
    return NULL;
  strcpy(s, str);
  return s;
}


x86 assembly (clang, -O0):
<cpystr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1172 <cpystr+0x42>
movq   $0x0,-0x8(%rbp)
jmp    1187 <cpystr+0x57>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpystr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     115d <cpystr+0x2d>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @cpystr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %6, 1
%8 = call i8* @calloc(i64 %7, i32 1)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %1
store i8* null, i8** %2
br label %17
12: ; preds = %1
%13 = load i8*, i8** %4
%14 = load i8*, i8** %3
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %4
store i8* %16, i8** %2
br label %17
17: ; preds = %12, %11
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define i8* @cpystr(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @calloc(i64 %3, i32 1)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %8
8: ; preds = %1, %6
ret i8* %4
}
int cmp(const void *a, const void *b) {
  float x = *(const float *)a;
  float y = *(const float *)b;
  if (x > y)
    return 1;
  else if (x < y)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
ucomiss -0x20(%rbp),%xmm0
jbe    1141 <cmp+0x41>
movl   $0x1,-0x4(%rbp)
jmp    1167 <cmp+0x67>
movss  -0x1c(%rbp),%xmm1
movss  -0x20(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1160 <cmp+0x60>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <cmp+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomiss %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca float
%7 = alloca float
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to float*
%10 = load float, float* %9
store float %10, float* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to float*
%13 = load float, float* %12
store float %13, float* %7
%14 = load float, float* %6
%15 = load float, float* %7
%16 = fcmp ogt float %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %24
18: ; preds = %2
%19 = load float, float* %6
%20 = load float, float* %7
%21 = fcmp olt float %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 -1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp ogt float %4, %6
%8 = fcmp olt float %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int between(uint32_t seq1, uint32_t seq2, uint32_t seq3) {
  return seq3 - seq2 >= seq1 - seq2;
}


x86 assembly (clang, -O0):
<between>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    -0x10(%rbp),%rcx
cmp    %rcx,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<between>:
xor    %eax,%eax
cmp    %rdi,%rdx
setge  %al
ret

LLVM IR (-O0):
define i32 @between(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = load i64, i64* %5
%9 = sub nsw i64 %7, %8
%10 = load i64, i64* %4
%11 = load i64, i64* %5
%12 = sub nsw i64 %10, %11
%13 = icmp sge i64 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @between(i64 %0, i64 %1, i64 %2) {
%4 = icmp sge i64 %2, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
void god_mode_resize() {}


x86 assembly (clang, -O0):
<god_mode_resize>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<god_mode_resize>:
ret

LLVM IR (-O0):
define void @god_mode_resize() {
ret void
}

LLVM IR (-O2):
define void @god_mode_resize() {
ret void
}
/* Variables and functions */
int PAPI_add_event(int, int);
void PAPIF_ADD_EVENT(int *EventSet, int *Event, int *check) {
  *check = PAPI_add_event(*EventSet, *Event);
}


x86 assembly (clang, -O0):
<PAPIF_ADD_EVENT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1030 <PAPI_add_event@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PAPIF_ADD_EVENT>:
push   %rbx
mov    %rdx,%rbx
mov    (%rdi),%edi
mov    (%rsi),%esi
call   1030 <PAPI_add_event@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @PAPIF_ADD_EVENT(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = call i32 @PAPI_add_event(i32 %8, i32 %10)
%12 = load i32*, i32** %6
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @PAPIF_ADD_EVENT(i32* nocapture %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = tail call i32 @PAPI_add_event(i32 %4, i32 %5)
store i32 %6, i32* %2
ret void
}
/* Variables and functions */
int ENOTSUP;
int cpuinfo_dump(void) { return -ENOTSUP; }


x86 assembly (clang, -O0):
<cpuinfo_dump>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    0x2edb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuinfo_dump>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOTSUP = global i32 0
define i32 @cpuinfo_dump() {
%1 = load i32, i32* @ENOTSUP
%2 = sub nsw i32 0, %1
ret i32 %2
}

LLVM IR (-O2):
@ENOTSUP = global i32 0
define i32 @cpuinfo_dump() {
%1 = load i32, i32* @ENOTSUP
%2 = sub nsw i32 0, %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello World 1\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello World 1\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello World 1\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void reg_clr_one_bit(volatile unsigned int *reg, unsigned int bit) {
  unsigned int temp, mask;
  mask = 1 << bit;
  temp = *reg;
  temp &= ~mask;
  *reg = temp;
  return;
}


x86 assembly (clang, -O0):
<reg_clr_one_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_clr_one_bit>:
mov    %esi,%ecx
mov    $0xfffffffe,%eax
rol    %cl,%eax
and    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @reg_clr_one_bit(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = shl i32 1, %7
store i32 %8, i32* %6
%9 = load i32*, i32** %3
%10 = load volatile i32, i32* %9
store i32 %10, i32* %5
%11 = load i32, i32* %6
%12 = xor i32 %11, -1
%13 = load i32, i32* %5
%14 = and i32 %13, %12
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = load i32*, i32** %3
store volatile i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
define void @reg_clr_one_bit(i32* %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = load volatile i32, i32* %0
%5 = xor i32 %3, -1
%6 = and i32 %4, %5
store volatile i32 %6, i32* %0
ret void
}
/* Type definitions */
struct katcp_dispatch {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ terminate_katcp(struct katcp_dispatch *, int);
int restart_cmd_katcp(struct katcp_dispatch *d, int argc) {
  terminate_katcp(d, 3);
  return 0;
}


x86 assembly (clang, -O0):
<restart_cmd_katcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1030 <terminate_katcp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restart_cmd_katcp>:
push   %rax
mov    $0x3,%esi
call   1030 <terminate_katcp@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.katcp_dispatch = type { i32 }
define i32 @restart_cmd_katcp(%struct.katcp_dispatch* %0, i32 %1) {
%3 = alloca %struct.katcp_dispatch*
%4 = alloca i32
store %struct.katcp_dispatch* %0, %struct.katcp_dispatch** %3
store i32 %1, i32* %4
%5 = load %struct.katcp_dispatch*, %struct.katcp_dispatch** %3
%6 = call i32 @terminate_katcp(%struct.katcp_dispatch* %5, i32 3)
ret i32 0
}

LLVM IR (-O2):
%struct.katcp_dispatch = type { i32 }
define i32 @restart_cmd_katcp(%struct.katcp_dispatch* %0, i32 %1) {
%3 = tail call i32 @terminate_katcp(%struct.katcp_dispatch* %0, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
extern void MC_free(void *p) { free(p); }


x86 assembly (clang, -O0):
<MC_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MC_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @MC_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
ret void
}

LLVM IR (-O2):
define void @MC_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void SHA224_Final(void) {}


x86 assembly (clang, -O0):
<SHA224_Final>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHA224_Final>:
ret

LLVM IR (-O0):
define void @SHA224_Final() {
ret void
}

LLVM IR (-O2):
define void @SHA224_Final() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ USPiEnvAllocInit();
int /*<<< orphan*/ USPiEnvInterruptInit();
int /*<<< orphan*/ USPiEnvTimerInit();
void USPiEnvInit(void) {
  USPiEnvAllocInit();
  USPiEnvTimerInit();
  USPiEnvInterruptInit();
}


x86 assembly (clang, -O0):
<USPiEnvInit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <USPiEnvAllocInit@plt>
mov    $0x0,%al
call   1050 <USPiEnvTimerInit@plt>
mov    $0x0,%al
call   1030 <USPiEnvInterruptInit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<USPiEnvInit>:
push   %rax
xor    %eax,%eax
call   1040 <USPiEnvAllocInit@plt>
xor    %eax,%eax
call   1050 <USPiEnvTimerInit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <USPiEnvInterruptInit@plt>

LLVM IR (-O0):
define void @USPiEnvInit() {
%1 = call i32 (...) @USPiEnvAllocInit()
%2 = call i32 (...) @USPiEnvTimerInit()
%3 = call i32 (...) @USPiEnvInterruptInit()
ret void
}

LLVM IR (-O2):
define void @USPiEnvInit() {
%1 = tail call i32 (...) @USPiEnvAllocInit()
%2 = tail call i32 (...) @USPiEnvTimerInit()
%3 = tail call i32 (...) @USPiEnvInterruptInit()
ret void
}
/* Variables and functions */
bool isBinaryOp(char c) {
  return c == '+' || c == '-' || c == '/' || c == '*' || c == '^';
}


x86 assembly (clang, -O0):
<isBinaryOp>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x2(%rbp)
je     115f <isBinaryOp+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     115f <isBinaryOp+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2f,%ecx
mov    %al,-0x2(%rbp)
je     115f <isBinaryOp+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2a,%ecx
mov    %al,-0x2(%rbp)
je     115f <isBinaryOp+0x5f>
movsbl -0x1(%rbp),%eax
cmp    $0x5e,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isBinaryOp>:
lea    -0x2a(%rdi),%eax
cmp    $0x6,%al
jae    1119 <isBinaryOp+0x19>
movzbl %al,%ecx
mov    $0x1,%eax
mov    $0x2b,%edx
bt     %ecx,%edx
jb     1122 <isBinaryOp+0x22>
xor    %eax,%eax
cmp    $0x5e,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isBinaryOp(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 43
br i1 %5, label %22, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 45
br i1 %9, label %22, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 47
br i1 %13, label %22, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 42
br i1 %17, label %22, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 94
br label %22
22: ; preds = %18, %14, %10, %6, %1
%23 = phi i1 [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %21, %18 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @isBinaryOp(i8 signext %0) {
%2 = add i8 %0, -42
%3 = icmp ult i8 %2, 6
br i1 %3, label %7, label %4
4: ; preds = %7, %1
%5 = icmp eq i8 %0, 94
%6 = zext i1 %5 to i32
br label %11
7: ; preds = %1
%8 = lshr i8 43, %2
%9 = and i8 %8, 1
%10 = icmp eq i8 %9, 0
br i1 %10, label %4, label %11
11: ; preds = %7, %4
%12 = phi i32 [ %6, %4 ], [ 1, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  if (x < 1 || x > 2 || x > 1) {
  } else
    __VERIFIER_assert(x == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     1157 <main+0x37>
cmpl   $0x2,-0x8(%rbp)
jg     1157 <main+0x37>
cmpl   $0x1,-0x8(%rbp)
jle    115c <main+0x3c>
jmp    116d <main+0x4d>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x1,%eax
jne    1137 <main+0x17>
mov    $0x1,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 1
br i1 %5, label %12, label %6
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 2
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %9, %6, %0
br label %18
13: ; preds = %9
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 1
%16 = zext i1 %15 to i32
%17 = call i32 @__VERIFIER_assert(i32 %16)
br label %18
18: ; preds = %13, %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @__VERIFIER_assert(i32 1)
br label %5
5: ; preds = %0, %3
ret i32 0
}
void start_DMA_controller() {}


x86 assembly (clang, -O0):
<start_DMA_controller>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_DMA_controller>:
ret

LLVM IR (-O0):
define void @start_DMA_controller() {
ret void
}

LLVM IR (-O2):
define void @start_DMA_controller() {
ret void
}
/* Variables and functions */
int mj_pair_count(int *, int);
int mj_pair7(int *array, int len) {
  int n;
  n = mj_pair_count(array, len);
  if (n == 7)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<mj_pair7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <mj_pair_count@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x7,-0x18(%rbp)
jne    1144 <mj_pair7+0x34>
movl   $0x1,-0x4(%rbp)
jmp    114b <mj_pair7+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mj_pair7>:
push   %rax
call   1030 <mj_pair_count@plt>
xor    %ecx,%ecx
cmp    $0x7,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mj_pair7(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = call i32 @mj_pair_count(i32* %7, i32 %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp eq i32 %10, 7
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @mj_pair7(i32* %0, i32 %1) {
%3 = tail call i32 @mj_pair_count(i32* %0, i32 %1)
%4 = icmp eq i32 %3, 7
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
char const *strerror(int);
const char *img_stdio_fstrerror(int error) { return strerror(error); }


x86 assembly (clang, -O0):
<img_stdio_fstrerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <strerror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<img_stdio_fstrerror>:
jmp    1030 <strerror@plt>

LLVM IR (-O0):
define i8* @img_stdio_fstrerror(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i8* @strerror(i32 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @img_stdio_fstrerror(i32 %0) {
%2 = tail call i8* @strerror(i32 %0)
ret i8* %2
}
void foo712() {}


x86 assembly (clang, -O0):
<foo712>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo712>:
ret

LLVM IR (-O0):
define void @foo712() {
ret void
}

LLVM IR (-O2):
define void @foo712() {
ret void
}
int characters(char input[]) { return 0; }


x86 assembly (clang, -O0):
<characters>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<characters>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @characters(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @characters(i8* nocapture readnone %0) {
ret i32 0
}
void stdio_display_clear(void) {}


x86 assembly (clang, -O0):
<stdio_display_clear>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdio_display_clear>:
ret

LLVM IR (-O0):
define void @stdio_display_clear() {
ret void
}

LLVM IR (-O2):
define void @stdio_display_clear() {
ret void
}
int getInvisibleActiveFromInvisibleElement(int element) {
  return (element == 62    ? (864 + 11)
          : element == 46  ? (864 + 12)
          : element == 316 ? (864 + 13)
                           : element);
}


x86 assembly (clang, -O0):
<getInvisibleActiveFromInvisibleElement>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x3e,-0x4(%rbp)
jne    111e <getInvisibleActiveFromInvisibleElement+0x1e>
mov    $0x36b,%eax
mov    %eax,-0x8(%rbp)
jmp    1161 <getInvisibleActiveFromInvisibleElement+0x61>
cmpl   $0x2e,-0x4(%rbp)
jne    1135 <getInvisibleActiveFromInvisibleElement+0x35>
mov    $0x36c,%eax
mov    %eax,-0xc(%rbp)
jmp    115b <getInvisibleActiveFromInvisibleElement+0x5b>
cmpl   $0x13c,-0x4(%rbp)
jne    114f <getInvisibleActiveFromInvisibleElement+0x4f>
mov    $0x36d,%eax
mov    %eax,-0x10(%rbp)
jmp    1155 <getInvisibleActiveFromInvisibleElement+0x55>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getInvisibleActiveFromInvisibleElement>:
cmp    $0x2e,%edi
je     1110 <getInvisibleActiveFromInvisibleElement+0x10>
mov    $0x36b,%eax
cmp    $0x3e,%edi
jne    1116 <getInvisibleActiveFromInvisibleElement+0x16>
ret
mov    $0x36c,%eax
ret
cmp    $0x13c,%edi
mov    $0x36d,%eax
cmovne %edi,%eax
ret

LLVM IR (-O0):
define i32 @getInvisibleActiveFromInvisibleElement(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 62
br i1 %4, label %5, label %6
5: ; preds = %1
br label %20
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 46
br i1 %8, label %9, label %10
9: ; preds = %6
br label %18
10: ; preds = %6
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 316
br i1 %12, label %13, label %14
13: ; preds = %10
br label %16
14: ; preds = %10
%15 = load i32, i32* %2
br label %16
16: ; preds = %14, %13
%17 = phi i32 [ 877, %13 ], [ %15, %14 ]
br label %18
18: ; preds = %16, %9
%19 = phi i32 [ 876, %9 ], [ %17, %16 ]
br label %20
20: ; preds = %18, %5
%21 = phi i32 [ 875, %5 ], [ %19, %18 ]
ret i32 %21
}

LLVM IR (-O2):
define i32 @getInvisibleActiveFromInvisibleElement(i32 %0) {
switch i32 %0, label %2 [
i32 62, label %6
i32 46, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 316
%4 = select i1 %3, i32 877, i32 %0
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %2
%7 = phi i32 [ 875, %1 ], [ %4, %2 ], [ 876, %5 ]
ret i32 %7
}
/* Variables and functions */
float dcn_bw_max2(float, float);
float dcn_bw_max3(float v1, float v2, float v3) {
  return v3 > dcn_bw_max2(v1, v2) ? v3 : dcn_bw_max2(v1, v2);
}


x86 assembly (clang, -O0):
<dcn_bw_max3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <dcn_bw_max2@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1160 <dcn_bw_max3+0x50>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1174 <dcn_bw_max3+0x64>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <dcn_bw_max2@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcn_bw_max3>:
sub    $0x18,%rsp
movss  %xmm2,0x14(%rsp)
movss  %xmm0,0xc(%rsp)
movss  %xmm1,0x10(%rsp)
call   1030 <dcn_bw_max2@plt>
movss  0x14(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jbe    113e <dcn_bw_max3+0x2e>
movaps %xmm1,%xmm0
add    $0x18,%rsp
ret
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
add    $0x18,%rsp
jmp    1030 <dcn_bw_max2@plt>

LLVM IR (-O0):
define float @dcn_bw_max3(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = call float @dcn_bw_max2(float %8, float %9)
%11 = fcmp ogt float %7, %10
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = load float, float* %6
br label %18
14: ; preds = %3
%15 = load float, float* %4
%16 = load float, float* %5
%17 = call float @dcn_bw_max2(float %15, float %16)
br label %18
18: ; preds = %14, %12
%19 = phi float [ %13, %12 ], [ %17, %14 ]
ret float %19
}

LLVM IR (-O2):
define float @dcn_bw_max3(float %0, float %1, float %2) {
%4 = tail call float @dcn_bw_max2(float %0, float %1)
%5 = fcmp olt float %4, %2
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call float @dcn_bw_max2(float %0, float %1)
br label %8
8: ; preds = %3, %6
%9 = phi float [ %7, %6 ], [ %2, %3 ]
ret float %9
}
int _is_ivybridge(int devid) {
  int ret = 0;
  switch (devid) {
  case 0x0156:
  case 0x0166:
  case 0x0152:
  case 0x0162:
  case 0x015a:
  case 0x016a:
    ret = 1;
    break;
  default:
    break;
  }
  return ret;
}


x86 assembly (clang, -O0):
<_is_ivybridge>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x152,%eax
je     1183 <_is_ivybridge+0x83>
jmp    1124 <_is_ivybridge+0x24>
mov    -0xc(%rbp),%eax
sub    $0x156,%eax
je     1183 <_is_ivybridge+0x83>
jmp    1137 <_is_ivybridge+0x37>
mov    -0xc(%rbp),%eax
sub    $0x15a,%eax
je     1183 <_is_ivybridge+0x83>
jmp    114a <_is_ivybridge+0x4a>
mov    -0xc(%rbp),%eax
sub    $0x162,%eax
je     1183 <_is_ivybridge+0x83>
jmp    115d <_is_ivybridge+0x5d>
mov    -0xc(%rbp),%eax
sub    $0x166,%eax
je     1183 <_is_ivybridge+0x83>
jmp    1170 <_is_ivybridge+0x70>
mov    -0xc(%rbp),%eax
sub    $0x16a,%eax
jne    118f <_is_ivybridge+0x8f>
jmp    1183 <_is_ivybridge+0x83>
movl   $0x1,-0x8(%rbp)
jmp    1194 <_is_ivybridge+0x94>
jmp    1194 <_is_ivybridge+0x94>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_ivybridge>:
add    $0xfffffeae,%edi
rol    $0x1e,%edi
xor    %eax,%eax
cmp    $0x6,%edi
ja     111d <_is_ivybridge+0x1d>
movslq %edi,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @_is_ivybridge(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %6 [
i32 342, label %5
i32 358, label %5
i32 338, label %5
i32 354, label %5
i32 346, label %5
i32 362, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1
store i32 1, i32* %3
br label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
@switch.table._is_ivybridge = [7 x i32] [i32 1, i32 1, i32 1, i32 0, i32 1, i32 1, i32 1]
define i32 @_is_ivybridge(i32 %0) {
%2 = add i32 %0, -338
%3 = tail call i32 @llvm.fshl.i32(i32 %2, i32 %2, i32 30)
%4 = icmp ult i32 %3, 7
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [7 x i32], [7 x i32]* @switch.table._is_ivybridge, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %5, %1
%10 = phi i32 [ 0, %1 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ rename_pop_registers(char *, char *, int);
void print_return(char *ret_string) {
  char buffer[200];
  rename_pop_registers(buffer, ret_string, 200);
  printf(" %s;", buffer);
}


x86 assembly (clang, -O0):
<print_return>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0xc8,%edx
call   1040 <rename_pop_registers@plt>
lea    -0xd0(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_return>:
push   %rbx
sub    $0xd0,%rsp
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xc8,%edx
call   1040 <rename_pop_registers@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c" %s;\00"
define void @print_return(i8* %0) {
%2 = alloca i8*
%3 = alloca [200 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @rename_pop_registers(i8* %4, i8* %5, i32 200)
%7 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c" %s;\00"
define void @print_return(i8* %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = call i32 @rename_pop_registers(i8* %3, i8* %0, i32 200)
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
__attribute__((no)) void foo(long long *arr) {
  for (int i = 0; i < 256; i++)
    arr[i] *= 123;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    113b <foo+0x3b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x7b,(%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <foo+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
imul   $0x7b,(%rdi,%rax,8),%rcx
mov    %rcx,(%rdi,%rax,8)
imul   $0x7b,0x8(%rdi,%rax,8),%rcx
mov    %rcx,0x8(%rdi,%rax,8)
imul   $0x7b,0x10(%rdi,%rax,8),%rcx
mov    %rcx,0x10(%rdi,%rax,8)
imul   $0x7b,0x18(%rdi,%rax,8),%rcx
mov    %rcx,0x18(%rdi,%rax,8)
add    $0x4,%rax
cmp    $0x100,%rax
jne    1110 <foo+0x10>
ret

LLVM IR (-O0):
define void @foo(i64* %0) {
%2 = alloca i64*
%3 = alloca i32
store i64* %0, i64** %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 256
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i64*, i64** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i64, i64* %8, i64 %10
%12 = load i64, i64* %11
%13 = mul nsw i64 %12, 123
store i64 %13, i64* %11
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @foo(i64* nocapture %0) {
br label %3
2: ; preds = %3
ret void
3: ; preds = %3, %1
%4 = phi i64 [ 0, %1 ], [ %20, %3 ]
%5 = getelementptr inbounds i64, i64* %0, i64 %4
%6 = load i64, i64* %5
%7 = mul nsw i64 %6, 123
store i64 %7, i64* %5
%8 = or i64 %4, 1
%9 = getelementptr inbounds i64, i64* %0, i64 %8
%10 = load i64, i64* %9
%11 = mul nsw i64 %10, 123
store i64 %11, i64* %9
%12 = or i64 %4, 2
%13 = getelementptr inbounds i64, i64* %0, i64 %12
%14 = load i64, i64* %13
%15 = mul nsw i64 %14, 123
store i64 %15, i64* %13
%16 = or i64 %4, 3
%17 = getelementptr inbounds i64, i64* %0, i64 %16
%18 = load i64, i64* %17
%19 = mul nsw i64 %18, 123
store i64 %19, i64* %17
%20 = add nuw nsw i64 %4, 4
%21 = icmp eq i64 %20, 256
br i1 %21, label %2, label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void iter(const char *key, const char *value, const void *obj) {
  printf("key: %s value: %s\n", key, value);
}


x86 assembly (clang, -O0):
<iter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iter>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"key: %s value: %s\0A\00"
define void @iter(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"key: %s value: %s\0A\00"
define void @iter(i8* %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_combination_2();
int /*<<< orphan*/ printf(char *);
int main(void) {
  print_combination_2();
  printf("\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <print_combination_2@plt>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <print_combination_2@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @print_combination_2()
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @print_combination_2()
%2 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ libDynamicTerminated();
__attribute__((destructor)) void myTerm() { libDynamicTerminated(); }


x86 assembly (clang, -O0):
<myTerm>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <libDynamicTerminated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<myTerm>:
xor    %eax,%eax
jmp    1030 <libDynamicTerminated@plt>

LLVM IR (-O0):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @myTerm, i8* null }]
define void @myTerm() {
%1 = call i32 (...) @libDynamicTerminated()
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @myTerm, i8* null }]
define void @myTerm() {
%1 = tail call i32 (...) @libDynamicTerminated()
ret void
}
f1() {
  typedef struct A A;
  struct A {
    int j;
  };
  {
    struct A {
      int i;
    };
    A a = {.j = 2};
    typedef struct A A;
    A b = {.i = 3};
  }
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    0xef6(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xef1(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
ret

LLVM IR (-O0):
%struct.A = type { i32 }
%struct.A.0 = type { i32 }
@__const.f1.a = %struct.A { i32 2 }
@__const.f1.b = %struct.A.0 { i32 3 }
define i32 @f1() {
%1 = alloca i32
%2 = alloca %struct.A
%3 = alloca %struct.A.0
%4 = bitcast %struct.A* %2 to i8*
%5 = bitcast %struct.A.0* %3 to i8*
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @f1() {
ret i32 undef
}
int next_pow_two(int x) {
  int power = 2;
  while (x >>= 1)
    power <<= 1;
  return power;
}


x86 assembly (clang, -O0):
<next_pow_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     112e <next_pow_two+0x2e>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <next_pow_two+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_pow_two>:
mov    $0x2,%eax
cmp    $0x2,%edi
jb     112b <next_pow_two+0x2b>
mov    $0x2,%eax
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    %eax,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1120 <next_pow_two+0x20>
ret

LLVM IR (-O0):
define i32 @next_pow_two(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 2, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
store i32 %6, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %3
%10 = shl i32 %9, 1
store i32 %10, i32* %3
br label %4
11: ; preds = %4
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @next_pow_two(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 2, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = shl i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 2, %1 ], [ %7, %3 ]
ret i32 %10
}
char *tgetstr(char *id, char **area) { return 0; }


x86 assembly (clang, -O0):
<tgetstr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tgetstr>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @tgetstr(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @tgetstr(i8* nocapture readnone %0, i8** nocapture readnone %1) {
ret i8* null
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c;
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  c = 0;
  while (x > 0) {
    y = 0;
    while (y < x) {
      y = y + 1;
      c = c + 1;
    }
    x = x - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    117c <main+0x6c>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    116e <main+0x5e>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114b <main+0x3b>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <main+0x2a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %4
store i32 0, i32* %2
br label %7
7: ; preds = %20, %0
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %23
10: ; preds = %7
store i32 0, i32* %4
br label %11
11: ; preds = %15, %10
%12 = load i32, i32* %4
%13 = load i32, i32* %3
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %11
20: ; preds = %11
%21 = load i32, i32* %3
%22 = sub nsw i32 %21, 1
store i32 %22, i32* %3
br label %7
23: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void f() {
  int x0[1073741824];
  int x1[1073741824 + 1];
  int x2[(unsigned)1073741824];
  int x3[(unsigned)1073741824 + 1];
  int x4[1073741824 - 1];
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movabs $0x4ffffffa0,%rax
sub    %rax,%rsp
push   %rax
movabs $0x4ffffffa8,%rax
add    %rsp,%rax
xchg   %rax,(%rsp)
mov    (%rsp),%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
ret

LLVM IR (-O0):
define void @f() {
%1 = alloca [1073741824 x i32]
%2 = alloca [1073741825 x i32]
%3 = alloca [1073741824 x i32]
%4 = alloca [1073741825 x i32]
%5 = alloca [1073741823 x i32]
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}