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

/* Variables and functions */
struct elmNode *treeClip(struct elmNode *);
int /*<<< orphan*/ treeSprout(struct elmNode *, struct elmNode *);
void treeBranchBefore(struct elmNode *branch, struct elmNode *node) {
  struct elmNode *parent = treeClip(node);
  treeSprout(parent, branch);
  treeSprout(branch, node);
}


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

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

LLVM IR (-O0):
%struct.elmNode = type { i32 }
define void @treeBranchBefore(%struct.elmNode* %0, %struct.elmNode* %1) {
%3 = alloca %struct.elmNode*
%4 = alloca %struct.elmNode*
%5 = alloca %struct.elmNode*
store %struct.elmNode* %0, %struct.elmNode** %3
store %struct.elmNode* %1, %struct.elmNode** %4
%6 = load %struct.elmNode*, %struct.elmNode** %4
%7 = call %struct.elmNode* @treeClip(%struct.elmNode* %6)
store %struct.elmNode* %7, %struct.elmNode** %5
%8 = load %struct.elmNode*, %struct.elmNode** %5
%9 = load %struct.elmNode*, %struct.elmNode** %3
%10 = call i32 @treeSprout(%struct.elmNode* %8, %struct.elmNode* %9)
%11 = load %struct.elmNode*, %struct.elmNode** %3
%12 = load %struct.elmNode*, %struct.elmNode** %4
%13 = call i32 @treeSprout(%struct.elmNode* %11, %struct.elmNode* %12)
ret void
}

LLVM IR (-O2):
%struct.elmNode = type { i32 }
define void @treeBranchBefore(%struct.elmNode* %0, %struct.elmNode* %1) {
%3 = tail call %struct.elmNode* @treeClip(%struct.elmNode* %1)
%4 = tail call i32 @treeSprout(%struct.elmNode* %3, %struct.elmNode* %0)
%5 = tail call i32 @treeSprout(%struct.elmNode* %0, %struct.elmNode* %1)
ret void
}
/* Variables and functions */
int LZ4_compress_HC_extStateHC(void *, char const *, char *, int, int,
                               int /*<<< orphan*/);
int LZ4_compressHC_limitedOutput_withStateHC(void *state, const char *src,
                                             char *dst, int srcSize,
                                             int maxDstSize) {
  return LZ4_compress_HC_extStateHC(state, src, dst, srcSize, maxDstSize, 0);
}


x86 assembly (clang, -O0):
<LZ4_compressHC_limitedOutput_withStateHC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
xor    %r9d,%r9d
call   1030 <LZ4_compress_HC_extStateHC@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_compressHC_limitedOutput_withStateHC>:
xor    %r9d,%r9d
jmp    1030 <LZ4_compress_HC_extStateHC@plt>

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

LLVM IR (-O2):
define i32 @LZ4_compressHC_limitedOutput_withStateHC(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = tail call i32 @LZ4_compress_HC_extStateHC(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 0)
ret i32 %6
}
/* Variables and functions */
char *strtok_r(char *, char const *, char **);
char *strtok(char *s1, const char *s2) {
  static char *next_start;
  return strtok_r(s1, s2, &next_start);
}


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

x86 assembly (clang, -O2):
<strtok>:
lea    0x2f19(%rip),%rdx
jmp    1030 <strtok_r@plt>

LLVM IR (-O0):
@strtok.next_start = internal global i8* null
define i8* @strtok(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @strtok_r(i8* %5, i8* %6, i8** @strtok.next_start)
ret i8* %7
}

LLVM IR (-O2):
@strtok.next_start = internal global i8* null
define i8* @strtok(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strtok_r(i8* %0, i8* %1, i8** @strtok.next_start)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ test_password();
int main(int argc, char **argv) {
  test_password();
  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    $0x0,%al
call   1030 <test_password@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_password@plt>
xor    %eax,%eax
pop    %rcx
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 = call i32 (...) @test_password()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_password()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ morph_dilate_uint8(unsigned char *, int *, int,
                                      int /*<<< orphan*/);
int /*<<< orphan*/ morph_erode_uint8(unsigned char *, int *, int, int);
void morph_open_uint8(unsigned char *vol, int dims[3], int niter, int th) {
  morph_erode_uint8(vol, dims, niter, th);
  morph_dilate_uint8(vol, dims, niter, 0);
}


x86 assembly (clang, -O0):
<morph_open_uint8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1040 <morph_erode_uint8@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <morph_dilate_uint8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<morph_open_uint8>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <morph_erode_uint8@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
xor    %ecx,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <morph_dilate_uint8@plt>

LLVM IR (-O0):
define void @morph_open_uint8(i8* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @morph_erode_uint8(i8* %9, i32* %10, i32 %11, i32 %12)
%14 = load i8*, i8** %5
%15 = load i32*, i32** %6
%16 = load i32, i32* %7
%17 = call i32 @morph_dilate_uint8(i8* %14, i32* %15, i32 %16, i32 0)
ret void
}

LLVM IR (-O2):
define void @morph_open_uint8(i8* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @morph_erode_uint8(i8* %0, i32* %1, i32 %2, i32 %3)
%6 = tail call i32 @morph_dilate_uint8(i8* %0, i32* %1, i32 %2, i32 0)
ret void
}
int fooM(int *A, int M, int N) { return A[M * N]; }


x86 assembly (clang, -O0):
<fooM>:
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
imul   -0x10(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fooM>:
imul   %edx,%esi
movslq %esi,%rax
mov    (%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @fooM(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = mul nsw i32 %8, %9
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %7, i64 %11
%13 = load i32, i32* %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @fooM(i32* nocapture %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
ret i32 %7
}
int test27(int a, int b, int c, int d) {
  int x = a == b;
  int y = c == 0;
  return x * y;
}


x86 assembly (clang, -O0):
<test27>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test27>:
xor    %esi,%edi
xor    %eax,%eax
or     %edx,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @test27(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = icmp eq i32 %11, %12
%14 = zext i1 %13 to i32
store i32 %14, i32* %9
%15 = load i32, i32* %7
%16 = icmp eq i32 %15, 0
%17 = zext i1 %16 to i32
store i32 %17, i32* %10
%18 = load i32, i32* %9
%19 = load i32, i32* %10
%20 = mul nsw i32 %18, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @test27(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %0, %1
%6 = icmp eq i32 %2, 0
%7 = and i1 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void Resetbufer1(unsigned char *buf, int size) {
  int i;
  for (i = 0; i < size; i++) {
    buf[i] = '0';
  }
}


x86 assembly (clang, -O0):
<Resetbufer1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1138 <Resetbufer1+0x38>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x30,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <Resetbufer1+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Resetbufer1>:
test   %esi,%esi
jle    1125 <Resetbufer1+0x15>
push   %rax
mov    %esi,%edx
mov    $0x30,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @Resetbufer1(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
int price_len(int num) {
  if (num < 4)
    return 2;
  num -= 2;
  return 1 + ((31 - __builtin_clz(num)) << 1);
}


x86 assembly (clang, -O0):
<price_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    111d <price_len+0x1d>
movl   $0x2,-0x4(%rbp)
jmp    113f <price_len+0x3f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
bsr    %eax,%ecx
xor    $0x1f,%ecx
mov    $0x1f,%eax
sub    %ecx,%eax
shl    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<price_len>:
mov    $0x2,%eax
cmp    $0x4,%edi
jl     1118 <price_len+0x18>
add    $0xfffffffe,%edi
bsr    %edi,%eax
xor    $0x1f,%eax
add    %eax,%eax
xor    $0x3f,%eax
ret

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

LLVM IR (-O2):
define i32 @price_len(i32 %0) {
%2 = icmp slt i32 %0, 4
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -2
%5 = tail call i32 @llvm.ctlz.i32(i32 %4, i1 true)
%6 = shl nuw nsw i32 %5, 1
%7 = xor i32 %6, 63
br label %8
8: ; preds = %1, %3
%9 = phi i32 [ %7, %3 ], [ 2, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *lua_getstring(int /*<<< orphan*/);
int /*<<< orphan*/ lua_lua2C(int);
int /*<<< orphan*/ stderr;
void stderrorim(void) {
  fprintf(stderr, "lua error: %s\n", lua_getstring(lua_lua2C(1)));
}


x86 assembly (clang, -O0):
<stderrorim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x1,%edi
call   1050 <lua_lua2C@plt>
mov    %eax,%edi
call   1030 <lua_getstring@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xe9e(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stderrorim>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
mov    $0x1,%edi
call   1050 <lua_lua2C@plt>
mov    %eax,%edi
call   1030 <lua_getstring@plt>
lea    0xeae(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"lua error: %s\0A\00"
define void @stderrorim() {
%1 = load i32, i32* @stderr
%2 = call i32 @lua_lua2C(i32 1)
%3 = call i8* @lua_getstring(i32 %2)
%4 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"lua error: %s\0A\00"
define void @stderrorim() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @lua_lua2C(i32 1)
%3 = tail call i8* @lua_getstring(i32 %2)
%4 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int /*<<< orphan*/ a(int, int);
int main() {
  int m = __VERIFIER_nondet_int();
  int n = __VERIFIER_nondet_int();
  if (m >= 0 && n >= 0) {
    a(m, n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1162 <main+0x42>
cmpl   $0x0,-0xc(%rbp)
jl     1162 <main+0x42>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <a@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %ebx,%ebx
js     1142 <main+0x22>
test   %eax,%eax
js     1142 <main+0x22>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <a@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = icmp sgt i32 %1, -1
%4 = icmp sgt i32 %2, -1
%5 = select i1 %3, i1 %4, i1 false
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = tail call i32 @a(i32 %1, i32 %2)
br label %8
8: ; preds = %6, %0
ret i32 0
}
int test_imm_0Cint32_mem(int *val) {
  return ((*val) & (0x0C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_0Cint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 12
%6 = icmp ne i32 %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_0Cint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 12
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
__attribute__((always_)) int MIDDLE(int a, int b, int c) {
  int bb = b;
  if (a > b) {
    bb = a;
    a = b;
  }
  if (bb > c)
    bb = c;
  if (a > bb)
    bb = a;
  return bb;
}


x86 assembly (clang, -O0):
<MIDDLE>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    112b <MIDDLE+0x2b>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    113d <MIDDLE+0x3d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    114f <MIDDLE+0x4f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIDDLE>:
cmp    %esi,%edi
mov    %edi,%eax
cmovg  %esi,%eax
cmovg  %edi,%esi
cmp    %edx,%esi
cmovg  %edx,%esi
cmp    %esi,%eax
cmovle %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @MIDDLE(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %1, i32 %0
%6 = select i1 %4, i32 %0, i32 %1
%7 = icmp sgt i32 %6, %2
%8 = select i1 %7, i32 %2, i32 %6
%9 = icmp sgt i32 %5, %8
%10 = select i1 %9, i32 %5, i32 %8
ret i32 %10
}
int atoi(const char *s) {
  int n = 0;
  for (n = 0; *s >= '0' && *s <= '9'; s++)
    n = n * 10 + *s - '0';
  return n;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0xd(%rbp)
jl     113b <atoi+0x3b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114b <atoi+0x4b>
jmp    116f <atoi+0x6f>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1116 <atoi+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <atoi+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <atoi+0x20>
ret

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %3
br label %4
4: ; preds = %24, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp sge i32 %7, 48
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 57
br label %14
14: ; preds = %9, %4
%15 = phi i1 [ false, %4 ], [ %13, %9 ]
br i1 %15, label %16, label %27
16: ; preds = %14
%17 = load i32, i32* %3
%18 = mul nsw i32 %17, 10
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = add nsw i32 %18, %21
%23 = sub nsw i32 %22, 48
store i32 %23, i32* %3
br label %24
24: ; preds = %16
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %2
br label %4
27: ; preds = %14
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i8 [ %14, %5 ], [ %2, %1 ]
%7 = phi i32 [ %12, %5 ], [ 0, %1 ]
%8 = phi i8* [ %13, %5 ], [ %0, %1 ]
%9 = zext i8 %6 to i32
%10 = mul nsw i32 %7, 10
%11 = add i32 %10, -48
%12 = add i32 %11, %9
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %13
%15 = add i8 %14, -48
%16 = icmp ult i8 %15, 10
br i1 %16, label %5, label %17
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %12, %5 ]
ret i32 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ yescrypt_bsty(int /*<<< orphan*/ const *, int,
                                 int /*<<< orphan*/ const *, int, int, int, int,
                                 int /*<<< orphan*/ *, int);
void yescrypt_hash_sp(const char *input, char *output) {
  yescrypt_bsty((const uint8_t *)input, 80, (const uint8_t *)input, 80, 2048, 8,
                1, (uint8_t *)output, 32);
}


x86 assembly (clang, -O0):
<yescrypt_hash_sp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rax
mov    $0x50,%ecx
mov    $0x800,%r8d
mov    $0x8,%r9d
mov    %ecx,%esi
movl   $0x1,(%rsp)
mov    %rax,0x8(%rsp)
movl   $0x20,0x10(%rsp)
call   1030 <yescrypt_bsty@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yescrypt_hash_sp>:
push   %rax
mov    %rsi,%rax
sub    $0x8,%rsp
mov    $0x50,%esi
mov    %rdi,%rdx
mov    $0x50,%ecx
mov    $0x800,%r8d
mov    $0x8,%r9d
push   $0x20
push   %rax
push   $0x1
call   1030 <yescrypt_bsty@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @yescrypt_hash_sp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = call i32 @yescrypt_bsty(i32* %6, i32 80, i32* %8, i32 80, i32 2048, i32 8, i32 1, i32* %10, i32 32)
ret void
}

LLVM IR (-O2):
define void @yescrypt_hash_sp(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = tail call i32 @yescrypt_bsty(i32* %3, i32 80, i32* %3, i32 80, i32 2048, i32 8, i32 1, i32* %4, i32 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LegacyGpioSetLevel(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ vGalileoRouteLEDPins();
void vGalileoLegacyGPIOInitializationForLED(void) {
  vGalileoRouteLEDPins();
  LegacyGpioSetLevel(0x24, 5, (0));
  LegacyGpioSetLevel(0x28, 5, (0));
}


x86 assembly (clang, -O0):
<vGalileoLegacyGPIOInitializationForLED>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <vGalileoRouteLEDPins@plt>
mov    $0x24,%edi
mov    $0x5,%esi
xor    %edx,%edx
call   1040 <LegacyGpioSetLevel@plt>
mov    $0x28,%edi
mov    $0x5,%esi
xor    %edx,%edx
call   1040 <LegacyGpioSetLevel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vGalileoLegacyGPIOInitializationForLED>:
push   %rax
xor    %eax,%eax
call   1030 <vGalileoRouteLEDPins@plt>
mov    $0x24,%edi
mov    $0x5,%esi
xor    %edx,%edx
call   1040 <LegacyGpioSetLevel@plt>
mov    $0x28,%edi
mov    $0x5,%esi
xor    %edx,%edx
pop    %rax
jmp    1040 <LegacyGpioSetLevel@plt>

LLVM IR (-O0):
define void @vGalileoLegacyGPIOInitializationForLED() {
%1 = call i32 (...) @vGalileoRouteLEDPins()
%2 = call i32 @LegacyGpioSetLevel(i32 36, i32 5, i32 0)
%3 = call i32 @LegacyGpioSetLevel(i32 40, i32 5, i32 0)
ret void
}

LLVM IR (-O2):
define void @vGalileoLegacyGPIOInitializationForLED() {
%1 = tail call i32 (...) @vGalileoRouteLEDPins()
%2 = tail call i32 @LegacyGpioSetLevel(i32 36, i32 5, i32 0)
%3 = tail call i32 @LegacyGpioSetLevel(i32 40, i32 5, i32 0)
ret void
}
int foo(void) { return 27; }


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

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

LLVM IR (-O0):
define i32 @foo() {
ret i32 27
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 27
}
/* Variables and functions */
int /*<<< orphan*/
UpnpResponse_RemoteIOClient_RemoteIO_ForceDisconnection(void *);
int /*<<< orphan*/ printf(char *);
void UpnpRemoteIOClient_RemoteIO_ForceDisconnection(void *upnptoken) {
  printf("Invoke: UpnpRemoteIOClient_RemoteIO_ForceDisconnection();\r\n");
  UpnpResponse_RemoteIOClient_RemoteIO_ForceDisconnection(upnptoken);
}


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

x86 assembly (clang, -O2):
<UpnpRemoteIOClient_RemoteIO_ForceDisconnection>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UpnpResponse_RemoteIOClient_RemoteIO_ForceDisconnection@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"Invoke: UpnpRemoteIOClient_RemoteIO_ForceDisconnection();\0D\0A\00"
define void @UpnpRemoteIOClient_RemoteIO_ForceDisconnection(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @UpnpResponse_RemoteIOClient_RemoteIO_ForceDisconnection(i8* %4)
ret void
}

LLVM IR (-O2):
@str = [59 x i8] c"Invoke: UpnpRemoteIOClient_RemoteIO_ForceDisconnection();\0D\00"
define void @UpnpRemoteIOClient_RemoteIO_ForceDisconnection(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @UpnpResponse_RemoteIOClient_RemoteIO_ForceDisconnection(i8* %0)
ret void
}
unsigned long long get_percent(unsigned long long src, unsigned int percent) {
  return (src * percent / 100);
}


x86 assembly (clang, -O0):
<get_percent>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
imul   %rcx,%rax
mov    $0x64,%ecx
xor    %edx,%edx
div    %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_percent>:
mov    %esi,%eax
imul   %rdi,%rax
shr    $0x2,%rax
movabs $0x28f5c28f5c28f5c3,%rcx
c2 f5 28
mul    %rcx
mov    %rdx,%rax
shr    $0x2,%rax
ret

LLVM IR (-O0):
define i64 @get_percent(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = zext i32 %6 to i64
%8 = mul i64 %5, %7
%9 = udiv i64 %8, 100
ret i64 %9
}

LLVM IR (-O2):
define i64 @get_percent(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = mul i64 %3, %0
%5 = udiv i64 %4, 100
ret i64 %5
}
/* Variables and functions */
bool is_alpha(char const c) {
  return ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z');
}


x86 assembly (clang, -O0):
<is_alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     112d <is_alpha+0x2d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    1156 <is_alpha+0x56>
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x61,%ecx
cmp    %edx,%ecx
mov    %al,-0x3(%rbp)
jg     1150 <is_alpha+0x50>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_alpha>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_alpha(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 65, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br i1 %9, label %20, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sle i32 97, %12
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 122
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @is_alpha(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
main(int riguing, char **acters) {
  puts(1 [acters - ~!(*(int *)1 [acters] % 4796 % 275 % riguing)]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%eax
mov    $0x12bc,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x113,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
cltd
idivl  -0x4(%rbp)
mov    -0x18(%rbp),%rax
cmp    $0x0,%edx
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
xor    $0xffffffff,%ecx
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
mov    0x8(%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rax
movslq (%rax),%rax
imul   $0x6d515909,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2b,%rcx
add    %edx,%ecx
imul   $0x12bc,%ecx,%ecx
sub    %ecx,%eax
movswl %ax,%ecx
imul   $0xffffee51,%ecx,%ecx
shr    $0x10,%ecx
add    %eax,%ecx
movzwl %cx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
sar    $0x8,%edx
add    %ecx,%edx
imul   $0x113,%edx,%ecx
sub    %ecx,%eax
cwtl
cltd
idiv   %edi
xor    %eax,%eax
test   %edx,%edx
sete   %al
mov    0x10(%rsi,%rax,8),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = srem i32 %10, 4796
%12 = srem i32 %11, 275
%13 = load i32, i32* %3
%14 = srem i32 %12, %13
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
%18 = xor i32 %17, -1
%19 = sext i32 %18 to i64
%20 = sub i64 0, %19
%21 = getelementptr inbounds i8*, i8** %5, i64 %20
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %23)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = bitcast i8** %3 to i32**
%5 = load i32*, i32** %4
%6 = load i32, i32* %5
%7 = srem i32 %6, 4796
%8 = trunc i32 %7 to i16
%9 = srem i16 %8, 275
%10 = sext i16 %9 to i32
%11 = srem i32 %10, %0
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i64 2, i64 1
%14 = getelementptr inbounds i8*, i8** %1, i64 %13
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %16)
ret i32 0
}
void I420Mirror() {}


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

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

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

LLVM IR (-O2):
define void @I420Mirror() {
ret void
}
void copyArr(int arr[], int dest[], int *len) {
  int i;
  for (i = 0; i <= *len; i++)
    dest[i] = arr[i];
}


x86 assembly (clang, -O0):
<copyArr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jg     114a <copyArr+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <copyArr+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copyArr>:
cmpl   $0x0,(%rdx)
js     1124 <copyArr+0x24>
mov    $0xffffffffffffffff,%rax
nopl   0x0(%rax)
mov    0x4(%rdi,%rax,4),%ecx
mov    %ecx,0x4(%rsi,%rax,4)
movslq (%rdx),%rcx
add    $0x1,%rax
cmp    %rcx,%rax
jl     1110 <copyArr+0x10>
ret

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

LLVM IR (-O2):
define void @copyArr(i32* nocapture %0, i32* nocapture writeonly %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %11, %6 ], [ 0, %3 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = getelementptr inbounds i32, i32* %1, i64 %7
store i32 %9, i32* %10
%11 = add nuw nsw i64 %7, 1
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = icmp slt i64 %7, %13
br i1 %14, label %6, label %15
15: ; preds = %6, %3
ret void
}
int test_imm_16int16_mem(short *val) {
  return ((*val) & (-0x16 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_16int16_mem>:
movzwl (%rdi),%eax
test   $0xffea,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_16int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -22
%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_16int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -22
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int *alloca(int);
int main() {
  int *x1 = alloca(sizeof(int));
  int *x2 = alloca(sizeof(int));
  while (*x1 <= 10) {
    *x2 = 1000;
    while (*x2 > 1) {
      *x2 = *x2 - 1;
    }
    *x1 = *x1 + 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x10(%rbp)
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0xa,(%rax)
jg     1187 <main+0x77>
mov    -0x18(%rbp),%rax
movl   $0x3e8,(%rax)
mov    -0x18(%rbp),%rax
cmpl   $0x1,(%rax)
jle    1173 <main+0x63>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    1152 <main+0x42>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    113b <main+0x2b>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1030 <alloca@plt>
cmpl   $0xa,(%rbx)
jg     1142 <main+0x32>
nopl   (%rax)
movl   $0x1,(%rax)
mov    (%rbx),%ecx
lea    0x1(%rcx),%edx
mov    %edx,(%rbx)
cmp    $0xa,%ecx
jl     1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @alloca(i32 4)
%2 = tail call i32* @alloca(i32 4)
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 11
br i1 %4, label %5, label %9
5: ; preds = %0, %5
store i32 1, i32* %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
%8 = icmp slt i32 %6, 10
br i1 %8, label %5, label %9
9: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage_exit(void) {
  fprintf(stderr, "Usage: eval <expression> [<expression>] ...\n");
  fflush(stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<usage_exit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage_exit>:
push   %rbx
mov    0x2ea8(%rip),%rbx
mov    (%rbx),%edi
lea    0xebf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [45 x i8] c"Usage: eval <expression> [<expression>] ...\0A\00"
define void @usage_exit() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fflush(i32 %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [45 x i8] c"Usage: eval <expression> [<expression>] ...\0A\00"
define void @usage_exit() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fflush(i32 %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  char const **gl_pathv;
};
typedef TYPE_1__ glob_t;

/* Variables and functions */
const char *chpl_glob_index(const glob_t glb, size_t i) {
  return glb.gl_pathv[i];
}


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

x86 assembly (clang, -O2):
<chpl_glob_index>:
mov    (%rdi,%rsi,8),%rax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i8** }
define i8* @chpl_glob_index(i8** %0, i64 %1) {
%3 = alloca %struct.TYPE_3__
%4 = alloca i64
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
store i8** %0, i8*** %5
store i64 %1, i64* %4
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%7 = load i8**, i8*** %6
%8 = load i64, i64* %4
%9 = getelementptr inbounds i8*, i8** %7, i64 %8
%10 = load i8*, i8** %9
ret i8* %10
}

LLVM IR (-O2):
define i8* @chpl_glob_index(i8** nocapture %0, i64 %1) {
%3 = getelementptr inbounds i8*, i8** %0, i64 %1
%4 = load i8*, i8** %3
ret i8* %4
}
void RTAvlroGCPhysRangeGet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlroGCPhysRangeGet() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int str_del_char(char *, char);
int main() {
  char str_0[] = "  I am working at     Singapore.     ";
  int counter = str_del_char(str_0, ' ');
  printf("After remove the result is: '%s', and %d characters get removed.\n",
         str_0, counter);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x26,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x20,%esi
call   1050 <str_del_char@plt>
mov    %eax,-0x34(%rbp)
lea    -0x30(%rbp),%rsi
mov    -0x34(%rbp),%edx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x20202020202e65,%rax
mov    %rax,0x1e(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1040 <str_del_char@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str_0 = [38 x i8] c" I am working at Singapore. \00"
@.str = [66 x i8] c"After remove the result is: '%s', and %d characters get removed.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [38 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [38 x i8]* %2 to i8*
%5 = getelementptr inbounds [38 x i8], [38 x i8]* %2, i64 0, i64 0
%6 = call i32 @str_del_char(i8* %5, i8 signext 32)
store i32 %6, i32* %3
%7 = getelementptr inbounds [38 x i8], [38 x i8]* %2, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str_0 = [38 x i8] c" I am working at Singapore. \00"
@.str = [66 x i8] c"After remove the result is: '%s', and %d characters get removed.\0A\00"
define i32 @main() {
%1 = alloca [38 x i8]
%2 = getelementptr inbounds [38 x i8], [38 x i8]* %1, i64 0, i64 0
%3 = call i32 @str_del_char(i8* %2, i8 signext 32)
%4 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void *my_thread(void *p_arg) {
  printf("[THREAD] Thread started.... cont = %d\n", *((int *)(p_arg)));
  return NULL;
}


x86 assembly (clang, -O0):
<my_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_thread>:
push   %rax
mov    (%rdi),%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"[THREAD] Thread started.... cont = %d\0A\00"
define i8* @my_thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i8* null
}

LLVM IR (-O2):
@.str = [39 x i8] c"[THREAD] Thread started.... cont = %d\0A\00"
define noalias i8* @my_thread(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* null
}
f() {
  unsigned b = 0;
  if (b > ~0U)
    b = ~0U;
  return b;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jbe    111c <f+0x1c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
%3 = icmp ugt i32 %2, -1
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 -1, i32* %1
br label %5
5: ; preds = %4, %0
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @f() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_init();
void arch_decomp_setup(void) { uart_init(); }


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

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

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

LLVM IR (-O2):
define void @arch_decomp_setup() {
%1 = tail call i32 (...) @uart_init()
ret void
}