xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_resource {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_resource_post_event(struct wl_resource *, int,
                                          int /*<<< orphan*/,
                                          struct wl_resource *);
void wl_keyboard_send_leave(struct wl_resource *resource_, uint32_t serial,
                            struct wl_resource *surface) {
  wl_resource_post_event(resource_, 2, serial, surface);
}


x86 assembly (clang, -O0):
<wl_keyboard_send_leave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x2,%esi
call   1030 <wl_resource_post_event@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_keyboard_send_leave>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    $0x2,%esi
jmp    1030 <wl_resource_post_event@plt>

LLVM IR (-O0):
%struct.wl_resource = type { i32 }
define void @wl_keyboard_send_leave(%struct.wl_resource* %0, i32 %1, %struct.wl_resource* %2) {
%4 = alloca %struct.wl_resource*
%5 = alloca i32
%6 = alloca %struct.wl_resource*
store %struct.wl_resource* %0, %struct.wl_resource** %4
store i32 %1, i32* %5
store %struct.wl_resource* %2, %struct.wl_resource** %6
%7 = load %struct.wl_resource*, %struct.wl_resource** %4
%8 = load i32, i32* %5
%9 = load %struct.wl_resource*, %struct.wl_resource** %6
%10 = call i32 @wl_resource_post_event(%struct.wl_resource* %7, i32 2, i32 %8, %struct.wl_resource* %9)
ret void
}

LLVM IR (-O2):
%struct.wl_resource = type { i32 }
define void @wl_keyboard_send_leave(%struct.wl_resource* %0, i32 %1, %struct.wl_resource* %2) {
%4 = tail call i32 @wl_resource_post_event(%struct.wl_resource* %0, i32 2, i32 %1, %struct.wl_resource* %2)
ret void
}
int arch_get_random_long(unsigned long *v) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @arch_get_random_long(i64* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  if (sizeof(short) == 2 && sizeof(int) == 4 && sizeof(long int) == 8 &&
      sizeof(long long int) == 8 && sizeof(void *) == 8) {
    (void)printf("Ok\n");
  } else {
    (void)printf("KO __LP64__\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
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 = [4 x i8] c"Ok\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [3 x i8] c"Ok\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void print_mod_uint64_t(uint64_t m) { printf("K:=GF(%lu);\n", m); }


x86 assembly (clang, -O0):
<print_mod_uint64_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_mod_uint64_t>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"K:=GF(%lu);\0A\00"
define void @print_mod_uint64_t(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"K:=GF(%lu);\0A\00"
define void @print_mod_uint64_t(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
struct tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ failure(char *, size_t);
size_t tree_size(struct tree *);
void test_size(struct tree *tree, size_t size) {
  if (tree_size(tree) != size)
    failure("size should have been %zu", size);
}


x86 assembly (clang, -O0):
<test_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <tree_size@plt>
cmp    -0x10(%rbp),%rax
je     1153 <test_size+0x33>
mov    -0x10(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <failure@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_size>:
push   %rbx
mov    %rsi,%rbx
call   1040 <tree_size@plt>
cmp    %rbx,%rax
jne    1130 <test_size+0x10>
pop    %rbx
ret
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <failure@plt>

LLVM IR (-O0):
%struct.tree = type { i32 }
@.str = [26 x i8] c"size should have been %zu\00"
define void @test_size(%struct.tree* %0, i64 %1) {
%3 = alloca %struct.tree*
%4 = alloca i64
store %struct.tree* %0, %struct.tree** %3
store i64 %1, i64* %4
%5 = load %struct.tree*, %struct.tree** %3
%6 = call i64 @tree_size(%struct.tree* %5)
%7 = load i64, i64* %4
%8 = icmp ne i64 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i64, i64* %4
%11 = call i32 @failure(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %10)
br label %12
12: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
%struct.tree = type { i32 }
@.str = [26 x i8] c"size should have been %zu\00"
define void @test_size(%struct.tree* %0, i64 %1) {
%3 = tail call i64 @tree_size(%struct.tree* %0)
%4 = icmp eq i64 %3, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @failure(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int kbhit(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @kbhit() {
ret i32 0
}
void genlwu() {}


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

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

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

LLVM IR (-O2):
define void @genlwu() {
ret void
}
char plugin_format() { return 'i'; }


x86 assembly (clang, -O0):
<plugin_format>:
push   %rbp
mov    %rsp,%rbp
mov    $0x69,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_format>:
mov    $0x69,%al
ret

LLVM IR (-O0):
define signext i8 @plugin_format() {
ret i8 105
}

LLVM IR (-O2):
define signext i8 @plugin_format() {
ret i8 105
}
/* Variables and functions */
int /*<<< orphan*/ vp8_variance(unsigned char *, int, unsigned char *, int, int,
                                int, unsigned int *, int *);
unsigned int vp8_variance4x4_c(unsigned char *src_ptr, int source_stride,
                               unsigned char *ref_ptr, int recon_stride,
                               unsigned int *sse) {
  unsigned int var;
  int avg;
  vp8_variance(src_ptr, source_stride, ref_ptr, recon_stride, 4, 4, &var, &avg);
  *sse = var;
  return (var - ((avg * avg) >> 4));
}


x86 assembly (clang, -O0):
<vp8_variance4x4_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x4,%r9d
lea    -0x2c(%rbp),%r10
lea    -0x30(%rbp),%rax
mov    %r9d,%r8d
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <vp8_variance@plt>
mov    -0x2c(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x2c(%rbp),%eax
mov    -0x30(%rbp),%ecx
imul   -0x30(%rbp),%ecx
sar    $0x4,%ecx
sub    %ecx,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vp8_variance4x4_c>:
push   %rbx
sub    $0x10,%rsp
mov    %r8,%rbx
lea    0x8(%rsp),%rax
lea    0xc(%rsp),%r10
mov    $0x4,%r8d
mov    $0x4,%r9d
push   %rax
push   %r10
call   1030 <vp8_variance@plt>
add    $0x10,%rsp
mov    0xc(%rsp),%eax
mov    %eax,(%rbx)
mov    0x8(%rsp),%ecx
imul   %ecx,%ecx
shr    $0x4,%ecx
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @vp8_variance4x4_c(i8* %0, i32 %1, i8* %2, i32 %3, i32* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%13 = load i8*, i8** %6
%14 = load i32, i32* %7
%15 = load i8*, i8** %8
%16 = load i32, i32* %9
%17 = call i32 @vp8_variance(i8* %13, i32 %14, i8* %15, i32 %16, i32 4, i32 4, i32* %11, i32* %12)
%18 = load i32, i32* %11
%19 = load i32*, i32** %10
store i32 %18, i32* %19
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = load i32, i32* %12
%23 = mul nsw i32 %21, %22
%24 = ashr i32 %23, 4
%25 = sub i32 %20, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @vp8_variance4x4_c(i8* %0, i32 %1, i8* %2, i32 %3, i32* nocapture writeonly %4) {
%6 = alloca i32
%7 = alloca i32
%8 = bitcast i32* %6 to i8*
%9 = bitcast i32* %7 to i8*
%10 = call i32 @vp8_variance(i8* %0, i32 %1, i8* %2, i32 %3, i32 4, i32 4, i32* %6, i32* %7)
%11 = load i32, i32* %6
store i32 %11, i32* %4
%12 = load i32, i32* %7
%13 = mul nsw i32 %12, %12
%14 = lshr i32 %13, 4
%15 = sub i32 %11, %14
ret i32 %15
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t xorshift64star(uint64_t x) {
  x ^= x >> 12;
  x ^= x << 25;
  x ^= x >> 27;
  return x * 2685821657736338717ULL;
}


x86 assembly (clang, -O0):
<xorshift64star>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xc,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x19,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1b,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0x2545f4914f6cdd1d,%rcx
f4 45 25
imul   %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xorshift64star>:
mov    %edi,%eax
sar    $0xc,%eax
xor    %edi,%eax
mov    %eax,%ecx
shl    $0x19,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
sar    $0x1b,%eax
xor    %ecx,%eax
imul   $0x4f6cdd1d,%eax,%eax
ret

LLVM IR (-O0):
define i32 @xorshift64star(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 12
%5 = load i32, i32* %2
%6 = xor i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = shl i32 %7, 25
%9 = load i32, i32* %2
%10 = xor i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = ashr i32 %11, 27
%13 = load i32, i32* %2
%14 = xor i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = sext i32 %15 to i64
%17 = mul i64 %16, 2685821657736338717
%18 = trunc i64 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @xorshift64star(i32 %0) {
%2 = ashr i32 %0, 12
%3 = xor i32 %2, %0
%4 = shl i32 %3, 25
%5 = xor i32 %4, %3
%6 = ashr i32 %5, 27
%7 = xor i32 %6, %5
%8 = mul i32 %7, 1332534557
ret i32 %8
}
int test12(int x) { return x / 10 >= 0; }


x86 assembly (clang, -O0):
<test12>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test12>:
xor    %eax,%eax
cmp    $0xfffffff7,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @test12(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 10
%5 = icmp sge i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test12(i32 %0) {
%2 = icmp sgt i32 %0, -10
%3 = zext i1 %2 to i32
ret i32 %3
}
int foo(int *p, int i) { return ((i < 0 && *p == 1) || (i > 0 && *p == 2)); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1127 <foo+0x27>
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmpl   $0x1,(%rcx)
mov    %al,-0xd(%rbp)
je     1149 <foo+0x49>
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xe(%rbp)
jle    1143 <foo+0x43>
mov    -0x8(%rbp),%rax
cmpl   $0x2,(%rax)
sete   %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   %esi,%esi
js     110e <foo+0xe>
mov    $0x2,%ecx
jne    1113 <foo+0x13>
xor    %eax,%eax
ret
mov    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @foo(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 = icmp slt i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = icmp eq i32 %9, 1
br i1 %10, label %20, label %11
11: ; preds = %7, %2
%12 = load i32, i32* %4
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load i32*, i32** %3
%16 = load i32, i32* %15
%17 = icmp eq i32 %16, 2
br label %18
18: ; preds = %14, %11
%19 = phi i1 [ false, %11 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %7
%21 = phi i1 [ true, %7 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0, i32 %1) {
%3 = icmp slt i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = icmp eq i32 %1, 0
br i1 %5, label %11, label %6
6: ; preds = %4, %2
%7 = phi i32 [ 1, %2 ], [ 2, %4 ]
%8 = load i32, i32* %0
%9 = icmp eq i32 %8, %7
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %6, %4
%12 = phi i32 [ 0, %4 ], [ %10, %6 ]
ret i32 %12
}
/* Variables and functions */
void *realloc(void *, int);
void *luaHelper_ReallocFunction(void *ptr, int oldsize, int size, void *data,
                                const char *allocName,
                                unsigned int allocFlags) {
  ((void)(oldsize));
  ((void)(data));
  ((void)(allocName));
  ((void)(allocFlags));
  return realloc(ptr, size);
}


x86 assembly (clang, -O0):
<luaHelper_ReallocFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <realloc@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luaHelper_ReallocFunction>:
mov    %edx,%esi
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @luaHelper_ReallocFunction(i8* %0, i32 %1, i32 %2, i8* %3, i8* %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%13 = load i32, i32* %8
%14 = load i8*, i8** %10
%15 = load i8*, i8** %11
%16 = load i32, i32* %12
%17 = load i8*, i8** %7
%18 = load i32, i32* %9
%19 = call i8* @realloc(i8* %17, i32 %18)
ret i8* %19
}

LLVM IR (-O2):
define i8* @luaHelper_ReallocFunction(i8* %0, i32 %1, i32 %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i32 %5) {
%7 = tail call i8* @realloc(i8* %0, i32 %2)
ret i8* %7
}
unsigned int get_parent(unsigned int index) {
  if (index == 0)
    return 0;
  return (index - 1) / 2;
}


x86 assembly (clang, -O0):
<get_parent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <get_parent+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1129 <get_parent+0x29>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_parent>:
lea    -0x1(%rdi),%ecx
shr    %ecx
xor    %eax,%eax
cmp    $0x1,%edi
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @get_parent(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = add i32 %0, -1
%4 = lshr i32 %3, 1
%5 = select i1 %2, i32 0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ DSF();
int main() {
  DSF();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @DSF()
ret i32 0
}
void wait_little_field_exchange(const int mu) { return; }


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

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

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

LLVM IR (-O2):
define void @wait_little_field_exchange(i32 %0) {
ret void
}
/* Type definitions */
struct skt_buf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ skt_buf_set(struct skt_buf *, char const *, size_t);
void skt_translit_identity(struct skt_buf *buf, const char *str, size_t len) {
  skt_buf_set(buf, str, len);
}


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

x86 assembly (clang, -O2):
<skt_translit_identity>:
jmp    1030 <skt_buf_set@plt>

LLVM IR (-O0):
%struct.skt_buf = type { i32 }
define void @skt_translit_identity(%struct.skt_buf* %0, i8* %1, i64 %2) {
%4 = alloca %struct.skt_buf*
%5 = alloca i8*
%6 = alloca i64
store %struct.skt_buf* %0, %struct.skt_buf** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load %struct.skt_buf*, %struct.skt_buf** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @skt_buf_set(%struct.skt_buf* %7, i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
%struct.skt_buf = type { i32 }
define void @skt_translit_identity(%struct.skt_buf* %0, i8* %1, i64 %2) {
%4 = tail call i32 @skt_buf_set(%struct.skt_buf* %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int test[] = {1, 2, 3, 4, 5};
  for (int i = 0; i < 5; ++i) {
    printf("%d\n", test[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x5,-0x24(%rbp)
jge    1171 <main+0x61>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1145 <main+0x35>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
void pari_err() {}


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

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

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

LLVM IR (-O2):
define void @pari_err() {
ret void
}
/* Variables and functions */
double swe_sidtime0(double, double, double);
double sidtime(double jd_ad, double ecl, double nuta) {
  return swe_sidtime0(jd_ad + 2433282.0, ecl, nuta);
}


x86 assembly (clang, -O0):
<sidtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xed1(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <swe_sidtime0@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sidtime>:
addsd  0xee8(%rip),%xmm0
jmp    1030 <swe_sidtime0@plt>

LLVM IR (-O0):
define double @sidtime(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = fadd double %7, 0x4142908100000000
%9 = load double, double* %5
%10 = load double, double* %6
%11 = call double @swe_sidtime0(double %8, double %9, double %10)
ret double %11
}

LLVM IR (-O2):
define double @sidtime(double %0, double %1, double %2) {
%4 = fadd double %0, 0x4142908100000000
%5 = tail call double @swe_sidtime0(double %4, double %1, double %2)
ret double %5
}
int pil_desc_init(struct pil_desc *desc) { return 0; }


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

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

LLVM IR (-O0):
%struct.pil_desc = type opaque
define i32 @pil_desc_init(%struct.pil_desc* %0) {
%2 = alloca %struct.pil_desc*
store %struct.pil_desc* %0, %struct.pil_desc** %2
ret i32 0
}

LLVM IR (-O2):
%struct.pil_desc = type opaque
define i32 @pil_desc_init(%struct.pil_desc* nocapture readnone %0) {
ret i32 0
}
void mpool_calloc() {}


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

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

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

LLVM IR (-O2):
define void @mpool_calloc() {
ret void
}
int main() {
  while (0) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    111a <main+0x1a>
jmp    111f <main+0x1f>
jmp    110b <main+0xb>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %3, %0
br i1 false, label %3, label %4
3: ; preds = %2
br label %2
4: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LOG_CRIT;
int /*<<< orphan*/ _log(int /*<<< orphan*/, char *, char, int, char const *);
void index__checkstring(const char *str) {
  int i;
  for (i = 0; str[i]; i++) {
    int ch = str[i];
    if (ch >= 128)
      _log(LOG_CRIT,
           "Module index: bad character '%c'=0x%x - only 7-bit ASCII is "
           "supported:"
           "\n%s\n",
           (char)ch, (int)ch, str);
  }
}


x86 assembly (clang, -O0):
<index__checkstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1186 <index__checkstring+0x76>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x80,-0x10(%rbp)
jl     1173 <index__checkstring+0x63>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%eax
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%r8
lea    0xe95(%rip),%rsi
movsbl %al,%edx
call   1030 <_log@plt>
jmp    1178 <index__checkstring+0x68>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <index__checkstring+0x13>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@LOG_CRIT = global i32 0
@.str = [75 x i8] c"Module index: bad character '%c'=0x%x - only 7-bit ASCII is supported:\0A%s\0A\00"
define void @index__checkstring(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %5
5: ; preds = %29, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %32
12: ; preds = %5
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
store i32 %18, i32* %4
%19 = load i32, i32* %4
%20 = icmp sge i32 %19, 128
br i1 %20, label %21, label %28
21: ; preds = %12
%22 = load i32, i32* @LOG_CRIT
%23 = load i32, i32* %4
%24 = trunc i32 %23 to i8
%25 = load i32, i32* %4
%26 = load i8*, i8** %2
%27 = call i32 @_log(i32 %22, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i8 signext %24, i32 %25, i8* %26)
br label %28
28: ; preds = %21, %12
br label %29
29: ; preds = %28
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %5
32: ; preds = %5
ret void
}

LLVM IR (-O2):
@LOG_CRIT = global i32 0
define void @index__checkstring(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
uint64_t uint64_diff(uint64_t ts1, uint64_t ts2) {
  return (ts1 < ts2) ? (ts2 - ts1) : (ts1 - ts2);
}


x86 assembly (clang, -O0):
<uint64_diff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    112b <uint64_diff+0x2b>
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1137 <uint64_diff+0x37>
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint64_diff>:
mov    %rdi,%rax
sub    %rsi,%rax
neg    %rax
sub    %rsi,%rdi
cmovge %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @uint64_diff(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = sub nsw i64 %1, %0
%5 = sub nsw i64 %0, %1
%6 = select i1 %3, i64 %4, i64 %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main() {
  int a, b, c, d;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  printf("%d\n", a + b + c + d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
add    -0x10(%rbp),%esi
add    -0x14(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
add    0x14(%rsp),%esi
add    0xc(%rsp),%esi
add    0x8(%rsp),%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = add nsw i32 %11, %10
%13 = load i32, i32* %3
%14 = add nsw i32 %12, %13
%15 = load i32, i32* %4
%16 = add nsw i32 %14, %15
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}
void OSSleep(int ms) {}


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

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

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

LLVM IR (-O2):
define void @OSSleep(i32 %0) {
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t weak_block_encrypt(uint64_t block, uint64_t subkey) {
  block = 2 * block * subkey + block + subkey;
  block = (block << 1) | (block >> 63);
  block ^= 0x3CAB470ADB580357;
  return block;
}


x86 assembly (clang, -O0):
<weak_block_encrypt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
imul   -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%edx
mov    $0x3f,%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0x3cab470adb580357,%rcx
47 ab 3c
xor    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @weak_block_encrypt(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = mul nsw i32 2, %5
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %4
%12 = add nsw i32 %10, %11
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = shl i32 %13, 1
%15 = load i32, i32* %3
%16 = ashr i32 %15, 63
%17 = or i32 %14, %16
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = xor i64 %19, 4371665975248421719
%21 = trunc i64 %20 to i32
store i32 %21, i32* %3
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @weak_block_encrypt(i32 %0, i32 %1) {
ret i32 poison
}
void _bitcpy_test_setbit(void *ptr, int n, int value) {
  unsigned char *q = ((unsigned char *)ptr) + (n >> 3);
  unsigned char mask = 1 << (n & 7);
  if (value) {
    *q |= mask;
  } else {
    *q &= ~mask;
  }
}


x86 assembly (clang, -O0):
<_bitcpy_test_setbit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %al,-0x19(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1150 <_bitcpy_test_setbit+0x50>
movzbl -0x19(%rbp),%edx
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
or     %edx,%ecx
mov    %cl,(%rax)
jmp    1162 <_bitcpy_test_setbit+0x62>
movzbl -0x19(%rbp),%edx
xor    $0xffffffff,%edx
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_bitcpy_test_setbit>:
mov    %esi,%ecx
mov    %esi,%eax
and    $0x7,%cl
mov    $0x1,%esi
shl    %cl,%esi
sar    $0x3,%eax
movslq %eax,%r8
mov    (%rdi,%r8,1),%cl
mov    %esi,%eax
not    %al
and    %cl,%al
or     %sil,%cl
test   %edx,%edx
movzbl %cl,%ecx
movzbl %al,%eax
cmovne %ecx,%eax
mov    %al,(%rdi,%r8,1)
ret

LLVM IR (-O0):
define void @_bitcpy_test_setbit(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = ashr i32 %10, 3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
store i8* %13, i8** %7
%14 = load i32, i32* %5
%15 = and i32 %14, 7
%16 = shl i32 1, %15
%17 = trunc i32 %16 to i8
store i8 %17, i8* %8
%18 = load i32, i32* %6
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %28
20: ; preds = %3
%21 = load i8, i8* %8
%22 = zext i8 %21 to i32
%23 = load i8*, i8** %7
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = or i32 %25, %22
%27 = trunc i32 %26 to i8
store i8 %27, i8* %23
br label %37
28: ; preds = %3
%29 = load i8, i8* %8
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = load i8*, i8** %7
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = and i32 %34, %31
%36 = trunc i32 %35 to i8
store i8 %36, i8* %32
br label %37
37: ; preds = %28, %20
ret void
}

LLVM IR (-O2):
define void @_bitcpy_test_setbit(i8* nocapture %0, i32 %1, i32 %2) {
%4 = ashr i32 %1, 3
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = and i32 %1, 7
%8 = shl nuw nsw i32 1, %7
%9 = icmp eq i32 %2, 0
%10 = load i8, i8* %6
%11 = trunc i32 %8 to i8
%12 = xor i8 %11, -1
%13 = and i8 %10, %12
%14 = or i8 %10, %11
%15 = select i1 %9, i8 %13, i8 %14
store i8 %15, i8* %6
ret void
}
const char *c4_get_version(void) {
  return "$Id: c4.c,v 3.11 2009/11/03 14:42:01 pomakis Exp pomakis $";
}


x86 assembly (clang, -O0):
<c4_get_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c4_get_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [59 x i8] c"$Id: c4.c,v 3.11 2009/11/03 14:42:01 pomakis Exp pomakis $\00"
define i8* @c4_get_version() {
ret i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [59 x i8] c"$Id: c4.c,v 3.11 2009/11/03 14:42:01 pomakis Exp pomakis $\00"
define i8* @c4_get_version() {
ret i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0)
}
int fun492() { return 492; }


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

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

LLVM IR (-O0):
define i32 @fun492() {
ret i32 492
}

LLVM IR (-O2):
define i32 @fun492() {
ret i32 492
}
int wpas_wps_init(struct wpa_supplicant *wpa_s) { return 0; }


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

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

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
define i32 @wpas_wps_init(%struct.wpa_supplicant* %0) {
%2 = alloca %struct.wpa_supplicant*
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %2
ret i32 0
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define i32 @wpas_wps_init(%struct.wpa_supplicant* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ compnum(int /*<<< orphan*/);
int /*<<< orphan*/ compword(char *);
int /*<<< orphan*/ popc();
void until() {
  compword("0bra");
  compnum(popc());
}


x86 assembly (clang, -O0):
<until>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <compword@plt>
mov    $0x0,%al
call   1050 <popc@plt>
mov    %eax,%edi
call   1040 <compnum@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<until>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <compword@plt>
xor    %eax,%eax
call   1050 <popc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <compnum@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"0bra\00"
define void @until() {
%1 = call i32 @compword(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @popc()
%3 = call i32 @compnum(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"0bra\00"
define void @until() {
%1 = tail call i32 @compword(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @popc()
%3 = tail call i32 @compnum(i32 %2)
ret void
}
int do_657() { return 657; }


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

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

LLVM IR (-O0):
define i32 @do_657() {
ret i32 657
}

LLVM IR (-O2):
define i32 @do_657() {
ret i32 657
}
void users_close_devices(void) {}


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

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

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

LLVM IR (-O2):
define void @users_close_devices() {
ret void
}
int test_imm_4Cuint8_mem(unsigned char *val) {
  return ((*val) & (0x4C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Cuint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x4c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Cuint8_mem>:
testb  $0x4c,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_4Cuint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 76
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_4Cuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 76
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int main() {
  int a, b, c;
  a = funcA();
  b = funcA;
  c = a * b;
  assert(c != a * b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <funcA@plt>
mov    %eax,-0x4(%rbp)
mov    0x2eb7(%rip),%rax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
imul   -0x8(%rbp),%ecx
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @funcA()
store i32 %4, i32* %1
store i32 ptrtoint (i32 (...)* @funcA to i32), i32* %2
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = mul nsw i32 %5, %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = mul nsw i32 %9, %10
%12 = icmp ne i32 %8, %11
%13 = zext i1 %12 to i32
%14 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @funcA()
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 0)
ret i32 0
}
int isE(int c) { return c == 'e' || c == 'E'; }


x86 assembly (clang, -O0):
<isE>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x65,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <isE+0x20>
cmpl   $0x45,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isE>:
and    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x45,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isE(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 101
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 69
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isE(i32 %0) {
%2 = and i32 %0, -33
%3 = icmp eq i32 %2, 69
%4 = zext i1 %3 to i32
ret i32 %4
}
void SPI_LEDS_RestoreConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @SPI_LEDS_RestoreConfig() {
ret void
}
int fetestexcept(int mask) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fetestexcept(i32 %0) {
ret i32 0
}
void foo020() {}


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

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

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

LLVM IR (-O2):
define void @foo020() {
ret void
}
int func1() {
#pragma critTer : 2 :../../ test / resources / functionNumber.c:
  return 0;
#pragma critTer : 3 :../../ test / resources / functionNumber.c:
}


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

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

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

LLVM IR (-O2):
define i32 @func1() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
void sleepms(unsigned int millisec) { usleep(millisec * 1000); }


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

x86 assembly (clang, -O2):
<sleepms>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @sleepms(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @sleepms(i32 %0) {
%2 = mul i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
void SteamAPI_ISteamHTMLSurface_ExecuteJavascript(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamHTMLSurface_ExecuteJavascript>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamHTMLSurface_ExecuteJavascript>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_ExecuteJavascript = [45 x i8] c"SteamAPI_ISteamHTMLSurface_ExecuteJavascript\00"
define void @SteamAPI_ISteamHTMLSurface_ExecuteJavascript(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_ExecuteJavascript, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_ExecuteJavascript = [45 x i8] c"SteamAPI_ISteamHTMLSurface_ExecuteJavascript\00"
define void @SteamAPI_ISteamHTMLSurface_ExecuteJavascript(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_ExecuteJavascript, i64 0, i64 0), i8* %0)
ret void
}
void armPortDelay(unsigned int ms) {}


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

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

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

LLVM IR (-O2):
define void @armPortDelay(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_stream_new_with_proplist() {
  printf("NOT IMPLEMENTED:"
         "pa_stream_new_with_proplist"
         "\n");
}


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

x86 assembly (clang, -O2):
<pa_stream_new_with_proplist>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [44 x i8] c"NOT IMPLEMENTED:pa_stream_new_with_proplist\00"
define i32 @pa_stream_new_with_proplist() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret i32 undef
}