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

/* Variables and functions */
int /*<<< orphan*/ list_add_tail(struct list_head *, struct list_head *);
int /*<<< orphan*/ list_del(struct list_head *);
void list_move_tail(struct list_head *node, struct list_head *head) {
  list_del(node);
  list_add_tail(node, head);
}


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

x86 assembly (clang, -O2):
<list_move_tail>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <list_del@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <list_add_tail@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_move_tail(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = call i32 @list_del(%struct.list_head* %5)
%7 = load %struct.list_head*, %struct.list_head** %3
%8 = load %struct.list_head*, %struct.list_head** %4
%9 = call i32 @list_add_tail(%struct.list_head* %7, %struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_move_tail(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_del(%struct.list_head* %0)
%4 = tail call i32 @list_add_tail(%struct.list_head* %0, %struct.list_head* %1)
ret void
}
void save_wizlist(void) {}


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

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

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

LLVM IR (-O2):
define void @save_wizlist() {
ret void
}
/* Type definitions */
typedef unsigned long long uint64_t;

/* Variables and functions */
uint64_t F_dict_fnv64_s(const char *str) {
  register uint64_t hash = 14695981039346656037ULL;
  while (*str) {
    hash ^= *str++;
    hash *= 1099511628211ULL;
  }
  return hash;
}


x86 assembly (clang, -O0):
<F_dict_fnv64_s>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xcbf29ce484222325,%rax
9c f2 cb
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <F_dict_fnv64_s+0x56>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbq (%rax),%rax
xor    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
movabs $0x100000001b3,%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1116 <F_dict_fnv64_s+0x16>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<F_dict_fnv64_s>:
movabs $0xcbf29ce484222325,%rsi
9c f2 cb
mov    (%rdi),%cl
test   %cl,%cl
je     113a <F_dict_fnv64_s+0x3a>
add    $0x1,%rdi
movabs $0x100000001b3,%rdx
xchg   %ax,%ax
movsbq %cl,%rax
xor    %rsi,%rax
imul   %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %rax,%rsi
test   %cl,%cl
jne    1120 <F_dict_fnv64_s+0x20>
ret
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @F_dict_fnv64_s(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store i64 -3750763034362895579, i64* %3
br label %4
4: ; preds = %8, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = sext i8 %11 to i64
%13 = load i64, i64* %3
%14 = xor i64 %13, %12
store i64 %14, i64* %3
%15 = load i64, i64* %3
%16 = mul i64 %15, 1099511628211
store i64 %16, i64* %3
br label %4
17: ; preds = %4
%18 = load i64, i64* %3
ret i64 %18
}

LLVM IR (-O2):
define i64 @F_dict_fnv64_s(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i64 [ %11, %4 ], [ -3750763034362895579, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %5 to i64
%10 = xor i64 %6, %9
%11 = mul i64 %10, 1099511628211
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ -3750763034362895579, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_file;

/* Variables and functions */
int SQLITE_READONLY;
int memSync(sqlite3_file *pFile, int flags) { return SQLITE_READONLY; }


x86 assembly (clang, -O0):
<memSync>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memSync>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@SQLITE_READONLY = global i32 0
define i32 @memSync(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* @SQLITE_READONLY
ret i32 %5
}

LLVM IR (-O2):
@SQLITE_READONLY = global i32 0
define i32 @memSync(i32* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @SQLITE_READONLY
ret i32 %3
}
short mus_char_to_bshort(const unsigned char *inp) {
  short o;
  unsigned char *outp;
  outp = (unsigned char *)&o;
  outp[0] = inp[0];
  outp[1] = inp[1];
  return (o);
}


x86 assembly (clang, -O0):
<mus_char_to_bshort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0xa(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
movswl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_char_to_bshort>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define signext i16 @mus_char_to_bshort(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
%4 = alloca i8*
store i8* %0, i8** %2
%5 = bitcast i16* %3 to i8*
store i8* %5, i8** %4
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8, i8* %12
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i16, i16* %3
ret i16 %16
}

LLVM IR (-O2):
define signext i16 @mus_char_to_bshort(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = zext i8 %4 to i16
%6 = shl nuw i16 %5, 8
%7 = zext i8 %2 to i16
%8 = or i16 %6, %7
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ scanfile(char *);
int main(int argc, char **argv) {
  for (argc--, argv++; argc; argc--, argv++)
    scanfile(*argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     116b <main+0x5b>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <scanfile@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    113b <main+0x2b>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x1,%edi
je     1142 <main+0x32>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <scanfile@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = add nsw i32 %0, -1
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8** [ %8, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @scanfile(i8* %9)
%11 = add nsw i32 %6, -1
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret i32 0
}
const char *elm_version() { return "elm0-  0.  7.  1."; }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"elm0- 0. 7. 1.\00"
define i8* @elm_version() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [18 x i8] c"elm0- 0. 7. 1.\00"
define i8* @elm_version() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}
int in_renamed(int a) { return a - 10; }


x86 assembly (clang, -O0):
<in_renamed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_renamed>:
lea    -0xa(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @in_renamed(i32 %0) {
%2 = add nsw i32 %0, -10
ret i32 %2
}
h(int i) { return i + 2; }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
lea    0x2(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @h(i32 %0) {
%2 = add nsw i32 %0, 2
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ __dump_alloc_info();
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ malloc(int);
void *realloc(int /*<<< orphan*/ *, int);
int main(void) {
  malloc(100505);
  void *p = realloc(NULL, 405);
  free(p);
  __dump_alloc_info();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x18899,%edi
call   1050 <malloc@plt>
xor    %eax,%eax
mov    %eax,%edi
mov    $0x195,%esi
call   1060 <realloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    $0x0,%al
call   1040 <__dump_alloc_info@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x18899,%edi
call   1050 <malloc@plt>
xor    %edi,%edi
mov    $0x195,%esi
call   1060 <realloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
xor    %eax,%eax
call   1040 <__dump_alloc_info@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i32 @malloc(i32 100505)
%4 = call i8* @realloc(i32* null, i32 405)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @free(i8* %5)
%7 = call i32 (...) @__dump_alloc_info()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @malloc(i32 100505)
%2 = tail call i8* @realloc(i32* null, i32 405)
%3 = tail call i32 @free(i8* %2)
%4 = tail call i32 (...) @__dump_alloc_info()
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int bits_getb(const uint8_t *vec, size_t size, uint8_t bit) {
  if (size <= (bit >> 3)) {
    return -1;
  }
  return (*(vec + (bit >> 3)) & (1 << (bit & 0x07))) != 0;
}


x86 assembly (clang, -O0):
<bits_getb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
ja     1131 <bits_getb+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <bits_getb+0x60>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x1c(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits_getb>:
mov    %edx,%eax
sar    $0x3,%eax
movslq %eax,%rcx
mov    $0xffffffff,%eax
cmp    %rsi,%rcx
jae    111f <bits_getb+0x1f>
mov    (%rdi,%rcx,4),%eax
and    $0x7,%dl
mov    %edx,%ecx
shr    %cl,%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @bits_getb(i32* nocapture %0, i64 %1, i32 %2) {
%4 = ashr i32 %2, 3
%5 = sext i32 %4 to i64
%6 = icmp ult i64 %5, %1
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = getelementptr inbounds i32, i32* %0, i64 %5
%9 = load i32, i32* %8
%10 = and i32 %2, 7
%11 = lshr i32 %9, %10
%12 = and i32 %11, 1
br label %13
13: ; preds = %3, %7
%14 = phi i32 [ %12, %7 ], [ -1, %3 ]
ret i32 %14
}
int test_imm_3Euint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x3E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Euint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0x3e,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Euint64_highword_reg>:
movabs $0x3e00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_3Euint64_highword_reg(i64 %0) {
%2 = and i64 %0, 266287972352
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
const char *read_while(const char *start, const char *end, int(func)(int)) {
  while (start < end && func((unsigned char)*start))
    start++;
  return start;
}


x86 assembly (clang, -O0):
<read_while>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmp    -0x10(%rbp),%rcx
mov    %al,-0x19(%rbp)
jae    113d <read_while+0x3d>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%edi
call   *%rax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    114d <read_while+0x4d>
jmp    115e <read_while+0x5e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <read_while+0x14>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_while>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r12
cmp    %rsi,%rdi
jae    1139 <read_while+0x39>
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rsi,%rbx
sub    %r12,%rbx
nopl   0x0(%rax)
movzbl (%r12),%edi
call   *%r15
test   %eax,%eax
je     1139 <read_while+0x39>
add    $0x1,%r12
add    $0xffffffffffffffff,%rbx
jne    1120 <read_while+0x20>
mov    %r14,%r12
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @read_while(i8* %0, i8* %1, i32 (i32)* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32 (i32)*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 (i32)* %2, i32 (i32)** %6
br label %7
7: ; preds = %20, %3
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = icmp ult i8* %8, %9
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load i32 (i32)*, i32 (i32)** %6
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = call i32 %12(i32 %15)
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %11, %7
%19 = phi i1 [ false, %7 ], [ %17, %11 ]
br i1 %19, label %20, label %23
20: ; preds = %18
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %4
br label %7
23: ; preds = %18
%24 = load i8*, i8** %4
ret i8* %24
}

LLVM IR (-O2):
define i8* @read_while(i8* %0, i8* readnone %1, i32 (i32)* nocapture %2) {
%4 = icmp ult i8* %0, %1
br i1 %4, label %5, label %19
5: ; preds = %3
%6 = ptrtoint i8* %1 to i64
%7 = ptrtoint i8* %0 to i64
%8 = sub i64 %6, %7
%9 = getelementptr i8, i8* %0, i64 %8
br label %10
10: ; preds = %5, %16
%11 = phi i8* [ %17, %16 ], [ %0, %5 ]
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = tail call i32 %2(i32 %13)
%15 = icmp eq i32 %14, 0
br i1 %15, label %19, label %16
16: ; preds = %10
%17 = getelementptr inbounds i8, i8* %11, i64 1
%18 = icmp eq i8* %17, %9
br i1 %18, label %19, label %10
19: ; preds = %10, %16, %3
%20 = phi i8* [ %0, %3 ], [ %9, %16 ], [ %11, %10 ]
ret i8* %20
}
void wx11pi() {}


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

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

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

LLVM IR (-O2):
define void @wx11pi() {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(void) {
  int c;
  do {
    c = getchar();
    putchar(c);
  } while (c != EOF);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
mov    0x2e9d(%rip),%rcx
cmp    (%rcx),%eax
jne    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <putchar@plt>
cmp    (%r14),%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @putchar(i32 %5)
br label %7
7: ; preds = %3
%8 = load i32, i32* %2
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br i1 %10, label %3, label %11
11: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @getchar()
%3 = tail call i32 @putchar(i32 %2)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %2, %4
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void foo051() {}


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

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

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

LLVM IR (-O2):
define void @foo051() {
ret void
}
int predec_arg_ptr(int *p) {
  int *q;
  q = p - 1;
  __builtin_prefetch(--p, 0, 0);
  return p == q;
}


x86 assembly (clang, -O0):
<predec_arg_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x8(%rbp)
prefetchnta (%rax)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<predec_arg_ptr>:
prefetchnta -0x4(%rdi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @predec_arg_ptr(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 -1
store i32* %5, i32** %3
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i32 -1
store i32* %7, i32** %2
%8 = bitcast i32* %7 to i8*
%9 = load i32*, i32** %2
%10 = load i32*, i32** %3
%11 = icmp eq i32* %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @predec_arg_ptr(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 -1
%3 = bitcast i32* %2 to i8*
tail call void @llvm.prefetch.p0i8(i8* %3, i32 0, i32 0, i32 1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Putb(int, int);
extern void DoBresenhamLine(void) { Putb(0x24, 4); }


x86 assembly (clang, -O0):
<DoBresenhamLine>:
push   %rbp
mov    %rsp,%rbp
mov    $0x24,%edi
mov    $0x4,%esi
call   1030 <Putb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoBresenhamLine>:
mov    $0x24,%edi
mov    $0x4,%esi
jmp    1030 <Putb@plt>

LLVM IR (-O0):
define void @DoBresenhamLine() {
%1 = call i32 @Putb(i32 36, i32 4)
ret void
}

LLVM IR (-O2):
define void @DoBresenhamLine() {
%1 = tail call i32 @Putb(i32 36, i32 4)
ret void
}
/* Variables and functions */
double fmod(double, double);
double ma_sun(double t) {
  return fmod(357.52910918 + t * (35999.05029113889 +
                                  t * (1.0 / -6507.592190889371 +
                                       t * (1.0 / 26470588.235294115 +
                                            t * (1.0 / -313315926.8929504)))),
              360.0) *
         0.017453292519943295769236907684886;
}


x86 assembly (clang, -O0):
<ma_sun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm3
movsd  0xeef(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xeeb(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xecb(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeb3(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9b(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe87(%rip),%xmm1
call   1030 <fmod@plt>
movsd  0xe72(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ma_sun>:
push   %rax
movsd  0xee7(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee3(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xedf(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xedb(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
call   1030 <fmod@plt>
mulsd  0xed2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ma_sun(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = call double @llvm.fmuladd.f64(double %6, double 0xBE2B6A8C99F12DE6, double 0x3E64482363D88470)
%8 = call double @llvm.fmuladd.f64(double %5, double %7, double 0xBF2424329D9A6885)
%9 = call double @llvm.fmuladd.f64(double %4, double %8, double 0x40E193E19BFC299A)
%10 = call double @llvm.fmuladd.f64(double %3, double %9, double 0x407658773B3001D0)
%11 = call double @fmod(double %10, double 3.600000e+02)
%12 = fmul double %11, 0x3F91DF46A2529D39
ret double %12
}

LLVM IR (-O2):
define double @ma_sun(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 0xBE2B6A8C99F12DE6, double 0x3E64482363D88470)
%3 = tail call double @llvm.fmuladd.f64(double %0, double %2, double 0xBF2424329D9A6885)
%4 = tail call double @llvm.fmuladd.f64(double %0, double %3, double 0x40E193E19BFC299A)
%5 = tail call double @llvm.fmuladd.f64(double %0, double %4, double 0x407658773B3001D0)
%6 = tail call double @fmod(double %5, double 3.600000e+02)
%7 = fmul double %6, 0x3F91DF46A2529D39
ret double %7
}
int ft_multiply(int a, int b) { return (a * b); }


x86 assembly (clang, -O0):
<ft_multiply>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_multiply>:
mov    %edi,%eax
imul   %esi,%eax
ret

LLVM IR (-O0):
define i32 @ft_multiply(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 = load i32, i32* %4
%7 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @ft_multiply(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ file2_func2();
void file2_func1(void) { file2_func2(); }


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

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

LLVM IR (-O0):
define void @file2_func1() {
%1 = call i32 (...) @file2_func2()
ret void
}

LLVM IR (-O2):
define void @file2_func1() {
%1 = tail call i32 (...) @file2_func2()
ret void
}
int expr_get_op_precedence(const char op) {
  if (op == '+' || op == '-') {
    return 0;
  }
  if (op == '*' || op == '/') {
    return 1;
  }
  return -1;
}


x86 assembly (clang, -O0):
<expr_get_op_precedence>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
je     1124 <expr_get_op_precedence+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
jne    1130 <expr_get_op_precedence+0x30>
movl   $0x0,-0x4(%rbp)
jmp    115d <expr_get_op_precedence+0x5d>
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     114a <expr_get_op_precedence+0x4a>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    1156 <expr_get_op_precedence+0x56>
movl   $0x1,-0x4(%rbp)
jmp    115d <expr_get_op_precedence+0x5d>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<expr_get_op_precedence>:
add    $0xd6,%dil
mov    $0xffffffff,%eax
cmp    $0x5,%dil
ja     111d <expr_get_op_precedence+0x1d>
movsbq %dil,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

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

LLVM IR (-O2):
@switch.table.expr_get_op_precedence = [6 x i32] [i32 1, i32 0, i32 -1, i32 0, i32 -1, i32 1]
define i32 @expr_get_op_precedence(i8 signext %0) {
%2 = add i8 %0, -42
%3 = icmp ult i8 %2, 6
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.expr_get_op_precedence, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ -1, %1 ]
ret i32 %9
}
char *strcpy(char *d, const char *s) {
  char *dest = d;
  while (*d++ = *s++)
    ;
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1143 <strcpy+0x43>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
__attribute__((always_)) char bfunc(char x) { return x + 1; }


x86 assembly (clang, -O0):
<bfunc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfunc>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @bfunc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, 1
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @bfunc(i8 signext %0) {
%2 = add i8 %0, 1
ret i8 %2
}
/* Variables and functions */
int listen(int, int);
int apr_listen(int sock, int count) { return listen(sock, count); }


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

x86 assembly (clang, -O2):
<apr_listen>:
jmp    1030 <listen@plt>

LLVM IR (-O0):
define i32 @apr_listen(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 = load i32, i32* %4
%7 = call i32 @listen(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @apr_listen(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_SIGN_ENVELOPE;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_SIGN_ENVELOPE_it;
PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void) {
  return (PKCS7_SIGN_ENVELOPE *)ASN1_item_new(&PKCS7_SIGN_ENVELOPE_it);
}


x86 assembly (clang, -O0):
<PKCS7_SIGN_ENVELOPE_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS7_SIGN_ENVELOPE_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@PKCS7_SIGN_ENVELOPE_it = global i32 0
define i32* @PKCS7_SIGN_ENVELOPE_new() {
%1 = call i64 @ASN1_item_new(i32* @PKCS7_SIGN_ENVELOPE_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@PKCS7_SIGN_ENVELOPE_it = global i32 0
define i32* @PKCS7_SIGN_ENVELOPE_new() {
%1 = tail call i64 @ASN1_item_new(i32* @PKCS7_SIGN_ENVELOPE_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void win() {
  printf(
      "Congratulations, you win!!! You successfully changed the code flow\n");
}


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

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

LLVM IR (-O0):
@.str = [68 x i8] c"Congratulations, you win!!! You successfully changed the code flow\0A\00"
define void @win() {
%1 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [67 x i8] c"Congratulations, you win!!! You successfully changed the code flow\00"
define void @win() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ assert(char const *);
scalar_t__ lstat(char const *, struct stat *);
int is_dir(const char *fname) {
  assert(fname);
  struct stat s;
  if (lstat(fname, &s) == 0) {
    if (S_ISDIR(s.st_mode))
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <lstat@plt>
cmp    $0x0,%rax
jne    117f <is_dir+0x4f>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
je     117a <is_dir+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1186 <is_dir+0x56>
jmp    117f <is_dir+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dir>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1050 <assert@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <lstat@plt>
test   %rax,%rax
jne    1165 <is_dir+0x35>
mov    0x8(%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    1167 <is_dir+0x37>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @assert(i8* %5)
%7 = load i8*, i8** %3
%8 = call i64 @lstat(i8* %7, %struct.stat* %4)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %1
%11 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%12 = load i32, i32* %11
%13 = call i64 @S_ISDIR(i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 1, i32* %2
br label %18
16: ; preds = %10
br label %17
17: ; preds = %16, %1
store i32 0, i32* %2
br label %18
18: ; preds = %17, %15
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca %struct.stat
%3 = tail call i32 @assert(i8* %0)
%4 = bitcast %struct.stat* %2 to i8*
%5 = call i64 @lstat(i8* %0, %struct.stat* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%9 = load i32, i32* %8
%10 = tail call i64 @S_ISDIR(i32 %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7, %1
br label %13
13: ; preds = %7, %12
%14 = phi i32 [ 0, %12 ], [ 1, %7 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_SETMASK;
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
void clrsigmask(void) {
  sigset_t empty;
  sigemptyset(&empty);
  sigprocmask(SIG_SETMASK, &empty, NULL);
}


x86 assembly (clang, -O0):
<clrsigmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clrsigmask>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIG_SETMASK = global i32 0
define void @clrsigmask() {
%1 = alloca i32
%2 = call i32 @sigemptyset(i32* %1)
%3 = load i32, i32* @SIG_SETMASK
%4 = call i32 @sigprocmask(i32 %3, i32* %1, i32* null)
ret void
}

LLVM IR (-O2):
@SIG_SETMASK = global i32 0
define void @clrsigmask() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = load i32, i32* @SIG_SETMASK
%5 = call i32 @sigprocmask(i32 %4, i32* %1, i32* null)
ret void
}
/* Type definitions */
typedef scalar_t__ const int64_t;

/* Variables and functions */
extern int64_t add64(const int64_t a, const int64_t b) { return a + b; }


x86 assembly (clang, -O0):
<add64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add64>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @add64(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 = add nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @add64(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
ret i64 %3
}
/* Variables and functions */
int LZ4_decompress_fast(char const *, char *, int);
int LZ4_decompress_fast_withPrefix64k(const char *source, char *dest,
                                      int originalSize) {
  return LZ4_decompress_fast(source, dest, originalSize);
}


x86 assembly (clang, -O0):
<LZ4_decompress_fast_withPrefix64k>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <LZ4_decompress_fast@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_decompress_fast_withPrefix64k>:
jmp    1030 <LZ4_decompress_fast@plt>

LLVM IR (-O0):
define i32 @LZ4_decompress_fast_withPrefix64k(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @LZ4_decompress_fast(i8* %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @LZ4_decompress_fast_withPrefix64k(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @LZ4_decompress_fast(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rotl_32d(short dummy, uint32_t x) { return (x << 24) | (x >> 8); }


x86 assembly (clang, -O0):
<rotl_32d>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotl_32d>:
mov    %esi,%eax
shl    $0x18,%eax
sar    $0x8,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @rotl_32d(i16 signext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 24
%7 = load i32, i32* %4
%8 = ashr i32 %7, 8
%9 = or i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @rotl_32d(i16 signext %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr i32 %1, 8
%5 = or i32 %3, %4
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void mp2vseqdx_set_format(uint8_t *p_mp2vseqdx, uint8_t i_format) {
  p_mp2vseqdx[4] &= 0xf1;
  p_mp2vseqdx[4] |= (i_format << 1) & 0xe;
}


x86 assembly (clang, -O0):
<mp2vseqdx_set_format>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
and    $0xf1,%ecx
mov    %ecx,0x10(%rax)
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
and    $0xe,%ecx
mov    -0x8(%rbp),%rax
or     0x10(%rax),%ecx
mov    %ecx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vseqdx_set_format>:
mov    $0xf1,%eax
and    0x10(%rdi),%eax
and    $0x7,%esi
lea    (%rax,%rsi,2),%eax
mov    %eax,0x10(%rdi)
ret

LLVM IR (-O0):
define void @mp2vseqdx_set_format(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 = getelementptr inbounds i32, i32* %5, i64 4
%7 = load i32, i32* %6
%8 = and i32 %7, 241
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = shl i32 %9, 1
%11 = and i32 %10, 14
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 4
%14 = load i32, i32* %13
%15 = or i32 %14, %11
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @mp2vseqdx_set_format(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 4
%4 = load i32, i32* %3
%5 = and i32 %4, 241
%6 = shl i32 %1, 1
%7 = and i32 %6, 14
%8 = or i32 %5, %7
store i32 %8, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Primeiro programa em C!\n");
  return (0);
}


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

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

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

LLVM IR (-O2):
@str = [24 x i8] c"Primeiro programa em C!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int GetKFromGrowthFxn(int *growthFxn) {
  int i, k = 0;
  for (i = 0; i < 6; i++)
    if (growthFxn[i] > k)
      k = growthFxn[i];
  return k + 1;
}


x86 assembly (clang, -O0):
<GetKFromGrowthFxn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    1155 <GetKFromGrowthFxn+0x55>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x10(%rbp),%eax
jle    1142 <GetKFromGrowthFxn+0x42>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <GetKFromGrowthFxn+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <GetKFromGrowthFxn+0x16>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetKFromGrowthFxn>:
mov    (%rdi),%ecx
mov    0x4(%rdi),%edx
xor    %eax,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
cmp    %eax,%edx
cmovg  %edx,%eax
mov    0x8(%rdi),%ecx
cmp    %eax,%ecx
cmovg  %ecx,%eax
mov    0xc(%rdi),%ecx
cmp    %eax,%ecx
cmovg  %ecx,%eax
mov    0x10(%rdi),%ecx
cmp    %eax,%ecx
cmovg  %ecx,%eax
mov    0x14(%rdi),%ecx
cmp    %eax,%ecx
cmovg  %ecx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @GetKFromGrowthFxn(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %23, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 6
br i1 %7, label %8, label %26
8: ; preds = %5
%9 = load i32*, i32** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
%14 = load i32, i32* %4
%15 = icmp sgt i32 %13, %14
br i1 %15, label %16, label %22
16: ; preds = %8
%17 = load i32*, i32** %2
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
store i32 %21, i32* %4
br label %22
22: ; preds = %16, %8
br label %23
23: ; preds = %22
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %5
26: ; preds = %5
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
ret i32 %28
}

LLVM IR (-O2):
define i32 @GetKFromGrowthFxn(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp sgt i32 %2, 0
%4 = select i1 %3, i32 %2, i32 0
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = icmp sgt i32 %6, %4
%8 = select i1 %7, i32 %6, i32 %4
%9 = getelementptr inbounds i32, i32* %0, i64 2
%10 = load i32, i32* %9
%11 = icmp sgt i32 %10, %8
%12 = select i1 %11, i32 %10, i32 %8
%13 = getelementptr inbounds i32, i32* %0, i64 3
%14 = load i32, i32* %13
%15 = icmp sgt i32 %14, %12
%16 = select i1 %15, i32 %14, i32 %12
%17 = getelementptr inbounds i32, i32* %0, i64 4
%18 = load i32, i32* %17
%19 = icmp sgt i32 %18, %16
%20 = select i1 %19, i32 %18, i32 %16
%21 = getelementptr inbounds i32, i32* %0, i64 5
%22 = load i32, i32* %21
%23 = icmp sgt i32 %22, %20
%24 = select i1 %23, i32 %22, i32 %20
%25 = add nuw nsw i32 %24, 1
ret i32 %25
}
/* Variables and functions */
void Default_PDM_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Default_PDM_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_PDM_IRQHandler+0x9>
jmp    1109 <Default_PDM_IRQHandler+0x9>

x86 assembly (clang, -O2):
<Default_PDM_IRQHandler>:
jmp    1100 <Default_PDM_IRQHandler>

LLVM IR (-O0):
define void @Default_PDM_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_PDM_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __builtin_rdctl(int);
uint32_t _Nios2_Get_ctlreg_cpuid(void) { return (uint32_t)__builtin_rdctl(5); }


x86 assembly (clang, -O0):
<_Nios2_Get_ctlreg_cpuid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <__builtin_rdctl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Nios2_Get_ctlreg_cpuid>:
mov    $0x5,%edi
jmp    1030 <__builtin_rdctl@plt>

LLVM IR (-O0):
define i32 @_Nios2_Get_ctlreg_cpuid() {
%1 = call i32 @__builtin_rdctl(i32 5)
ret i32 %1
}

LLVM IR (-O2):
define i32 @_Nios2_Get_ctlreg_cpuid() {
%1 = tail call i32 @__builtin_rdctl(i32 5)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ V_CopyRect(int /*<<< orphan*/, int /*<<< orphan*/, int, int,
                              int, int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/);
void WI_slamBackground(void) { V_CopyRect(0, 0, 1, 320, 200, 0, 0, 0); }


x86 assembly (clang, -O0):
<WI_slamBackground>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %r9d,%r9d
mov    $0x1,%edx
mov    $0x140,%ecx
mov    $0xc8,%r8d
mov    %r9d,%edi
mov    %r9d,%esi
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <V_CopyRect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WI_slamBackground>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x140,%ecx
mov    $0xc8,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1030 <V_CopyRect@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @WI_slamBackground() {
%1 = call i32 @V_CopyRect(i32 0, i32 0, i32 1, i32 320, i32 200, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @WI_slamBackground() {
%1 = tail call i32 @V_CopyRect(i32 0, i32 0, i32 1, i32 320, i32 200, i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int __builtin_is_constant_evaluated();
int test_cxx_builtin() { return __builtin_is_constant_evaluated(); }


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

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

LLVM IR (-O0):
define i32 @test_cxx_builtin() {
%1 = call i32 (...) @__builtin_is_constant_evaluated()
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_cxx_builtin() {
%1 = tail call i32 (...) @__builtin_is_constant_evaluated()
ret i32 %1
}