xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _test_2(int *, int, int, int, int, int);
void soru_2(int dizi[], int N) {
  int ilk = dizi[0];
  int bastan_ucuncu = dizi[2];
  int son = dizi[N - 1];
  int sondan_ikinci = dizi[N - 2];
  _test_2(dizi, N, ilk, bastan_ucuncu, son, sondan_ikinci);
}


x86 assembly (clang, -O0):
<soru_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
call   1030 <_test_2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soru_2>:
mov    (%rdi),%edx
mov    0x8(%rdi),%ecx
movslq %esi,%rsi
mov    -0x8(%rdi,%rsi,4),%r9d
mov    -0x4(%rdi,%rsi,4),%r8d
jmp    1030 <_test_2@plt>

LLVM IR (-O0):
define void @soru_2(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
store i32 %11, i32* %5
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
store i32 %14, i32* %6
%15 = load i32*, i32** %3
%16 = load i32, i32* %4
%17 = sub nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %15, i64 %18
%20 = load i32, i32* %19
store i32 %20, i32* %7
%21 = load i32*, i32** %3
%22 = load i32, i32* %4
%23 = sub nsw i32 %22, 2
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* %21, i64 %24
%26 = load i32, i32* %25
store i32 %26, i32* %8
%27 = load i32*, i32** %3
%28 = load i32, i32* %4
%29 = load i32, i32* %5
%30 = load i32, i32* %6
%31 = load i32, i32* %7
%32 = load i32, i32* %8
%33 = call i32 @_test_2(i32* %27, i32 %28, i32 %29, i32 %30, i32 %31, i32 %32)
ret void
}

LLVM IR (-O2):
define void @soru_2(i32* %0, i32 %1) {
%3 = load i32, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 2
%5 = load i32, i32* %4
%6 = add nsw i32 %1, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = add nsw i32 %1, -2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = tail call i32 @_test_2(i32* %0, i32 %1, i32 %3, i32 %5, i32 %9, i32 %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UCH(char);
scalar_t__ isspace(int /*<<< orphan*/);
char *after_blanks(char *s) {
  while (*s != '\0' && isspace(UCH(*s)))
    ++s;
  return s;
}


x86 assembly (clang, -O0):
<after_blanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     115e <after_blanks+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <UCH@plt>
mov    %eax,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    116e <after_blanks+0x4e>
jmp    117f <after_blanks+0x5f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <after_blanks+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<after_blanks>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1150 <after_blanks+0x30>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1040 <UCH@plt>
mov    %eax,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1150 <after_blanks+0x30>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <after_blanks+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @after_blanks(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %10
%5 = phi i8 [ %12, %10 ], [ %2, %1 ]
%6 = phi i8* [ %11, %10 ], [ %0, %1 ]
%7 = tail call i32 @UCH(i8 signext %5)
%8 = tail call i64 @isspace(i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %4
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %10, %1
%15 = phi i8* [ %0, %1 ], [ %11, %10 ], [ %6, %4 ]
ret i8* %15
}
int string_length(char *s) {
  int length = 0;
  while (*s != '\0') {
    length++;
    s++;
  }
  return length;
}


x86 assembly (clang, -O0):
<string_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1139 <string_length+0x39>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <string_length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_length>:
cmpb   $0x0,(%rdi)
je     111c <string_length+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <string_length+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @string_length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = add nuw nsw i32 %5, 1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}
/* Variables and functions */
int Evt_id(void *);
int /*<<< orphan*/ Evt_setId(void *, int);
int Evt_setDataError(void *my) { Evt_setId(my, Evt_id(my) | 0x80000000UL); }


x86 assembly (clang, -O0):
<Evt_setDataError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <Evt_id@plt>
mov    -0x18(%rbp),%rdi
cltq
movabs $0x80000000,%rcx
or     %rcx,%rax
mov    %eax,%esi
call   1040 <Evt_setId@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Evt_setDataError>:
push   %rbx
mov    %rdi,%rbx
call   1030 <Evt_id@plt>
or     $0x80000000,%eax
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <Evt_setId@plt>

LLVM IR (-O0):
define i32 @Evt_setDataError(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @Evt_id(i8* %5)
%7 = sext i32 %6 to i64
%8 = or i64 %7, 2147483648
%9 = trunc i64 %8 to i32
%10 = call i32 @Evt_setId(i8* %4, i32 %9)
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @Evt_setDataError(i8* %0) {
%2 = tail call i32 @Evt_id(i8* %0)
%3 = or i32 %2, -2147483648
%4 = tail call i32 @Evt_setId(i8* %0, i32 %3)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void MMX_AND(int dst_reg, int src_reg) {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0xdb);
  addbyte(0xc0 | (dst_reg << 3) | src_reg);
}


x86 assembly (clang, -O0):
<MMX_AND>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xdb,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMX_AND>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xdb,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebp
or     %ebx,%ebp
or     $0xc0,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @MMX_AND(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 219)
%8 = load i32, i32* %3
%9 = shl i32 %8, 3
%10 = or i32 192, %9
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = call i32 @addbyte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @MMX_AND(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 15)
%5 = tail call i32 @addbyte(i32 219)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 192
%9 = tail call i32 @addbyte(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int test(long long x) {
  if (x & (0x01ULL << 60))
    foo();
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movabs $0x1000000000000000,%rax
and    -0x8(%rbp),%rax
cmp    $0x0,%rax
je     113b <test+0x2b>
mov    $0x0,%al
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
bt     $0x3c,%rdi
jae    1123 <test+0x13>
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @test(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 1152921504606846976
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @foo()
br label %8
8: ; preds = %6, %1
ret i32 0
}

LLVM IR (-O2):
define i32 @test(i64 %0) {
%2 = and i64 %0, 1152921504606846976
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @foo()
br label %6
6: ; preds = %4, %1
ret i32 0
}
int flsnz8(unsigned char x) {
  int r;
  __asm__("movzbl %%al, %%eax\n"
          "bsrl %%eax,%0\n"
          : "=r"(r)
          : "a"(x));
  return r + 1;
}


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

x86 assembly (clang, -O2):
<flsnz8>:
mov    %edi,%eax
movzbl %al,%eax
bsr    %eax,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @flsnz8(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = call i32 asm "movzbl %al, %eax\0Absrl %eax,$0\0A", "=r,{ax},~{dirflag},~{fpsr},~{flags}"(i8 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @flsnz8(i8 zeroext %0) {
%2 = tail call i32 asm "movzbl %al, %eax\0Absrl %eax,$0\0A", "=r,{ax},~{dirflag},~{fpsr},~{flags}"(i8 %0)
%3 = add nsw i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ child_pids_kill_all();
int /*<<< orphan*/ child_pids_wait_all();
void child_pids_kill_all_and_wait() {
  child_pids_kill_all();
  child_pids_wait_all();
}


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

x86 assembly (clang, -O2):
<child_pids_kill_all_and_wait>:
push   %rax
xor    %eax,%eax
call   1030 <child_pids_kill_all@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <child_pids_wait_all@plt>

LLVM IR (-O0):
define void @child_pids_kill_all_and_wait() {
%1 = call i32 (...) @child_pids_kill_all()
%2 = call i32 (...) @child_pids_wait_all()
ret void
}

LLVM IR (-O2):
define void @child_pids_kill_all_and_wait() {
%1 = tail call i32 (...) @child_pids_kill_all()
%2 = tail call i32 (...) @child_pids_wait_all()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __print_int(int);
int main() {
  int i;
  int a;
  for (i = 0; i < 5; i++) {
    int b = 5;
    a = b * 3;
  }
  __print_int(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    114c <main+0x3c>
movl   $0x5,-0x10(%rbp)
imul   $0x3,-0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0xc(%rbp),%edi
call   1030 <__print_int@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__print_int(i32 15)
ret i32 0
}
void rop3_33_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ T;
  stk1 = S | stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_33_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_33_1_0>:
mov    (%rdi),%al
xor    %al,%dl
or     %sil,%dl
not    %dl
and    %sil,%al
or     %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_33_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %5
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8*, i8** %4
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = and i32 %34, %36
%38 = or i32 %31, %37
%39 = trunc i32 %38 to i8
%40 = load i8*, i8** %4
store i8 %39, i8* %40
ret void
}

LLVM IR (-O2):
define void @rop3_33_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = or i8 %5, %1
%7 = xor i8 %6, -1
%8 = and i8 %4, %1
%9 = or i8 %8, %7
store i8 %9, i8* %0
ret void
}
/* Variables and functions */
int japi_line(int, int, int, int);
int j_line(int arg0, int arg1, int arg2, int arg3) {
  return (japi_line(arg0, arg1, arg2, arg3));
}


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

x86 assembly (clang, -O2):
<j_line>:
jmp    1030 <japi_line@plt>

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

LLVM IR (-O2):
define i32 @j_line(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @japi_line(i32 %0, i32 %1, i32 %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free_pointer(void *);
void mem_free(void *a) { free_pointer(a); }


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

x86 assembly (clang, -O2):
<mem_free>:
jmp    1030 <free_pointer@plt>

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

LLVM IR (-O2):
define void @mem_free(i8* %0) {
%2 = tail call i32 @free_pointer(i8* %0)
ret void
}
/* Variables and functions */
int mpeg_init();
int module_mpeg_init(void) { return mpeg_init(); }


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

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

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

LLVM IR (-O2):
define i32 @module_mpeg_init() {
%1 = tail call i32 (...) @mpeg_init()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void reportFile(char *path, char *name) {
  printf("<file filepath=\"%s\" filename=\"%s\" attr=\"F\" />\n", path, name);
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"<file filepath=\22%s\22 filename=\22%s\22 attr=\22F\22 />\0A\00"
define void @reportFile(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 i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"<file filepath=\22%s\22 filename=\22%s\22 attr=\22F\22 />\0A\00"
define void @reportFile(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
const char *_Locale_abbrev_dayofweek(struct _Locale_time *__DUMMY_PAR1,
                                     int __DUMMY_PAR2) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct._Locale_time = type opaque
define i8* @_Locale_abbrev_dayofweek(%struct._Locale_time* %0, i32 %1) {
%3 = alloca %struct._Locale_time*
%4 = alloca i32
store %struct._Locale_time* %0, %struct._Locale_time** %3
store i32 %1, i32* %4
ret i8* null
}

LLVM IR (-O2):
%struct._Locale_time = type opaque
define noalias i8* @_Locale_abbrev_dayofweek(%struct._Locale_time* nocapture readnone %0, i32 %1) {
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int /*<<< orphan*/ crc32_le_generic(int /*<<< orphan*/, unsigned char const *,
                                    size_t, int);
__u32 crc32_le(__u32 crc, unsigned char const *p, size_t len) {
  return crc32_le_generic(crc, p, len, 0xedb88320);
}


x86 assembly (clang, -O0):
<crc32_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0xedb88320,%ecx
call   1030 <crc32_le_generic@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc32_le>:
mov    $0xedb88320,%ecx
jmp    1030 <crc32_le_generic@plt>

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

LLVM IR (-O2):
define i32 @crc32_le(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @crc32_le_generic(i32 %0, i8* %1, i64 %2, i32 -306674912)
ret i32 %4
}
const int omp_get_thread_num() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @omp_get_thread_num() {
ret i32 0
}
int scsi_cmd_ioctl(struct file *x, struct gendisk *y, unsigned int u, void *v) {
  int a;
  return a;
}


x86 assembly (clang, -O0):
<scsi_cmd_ioctl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.file = type opaque
%struct.gendisk = type opaque
define i32 @scsi_cmd_ioctl(%struct.file* %0, %struct.gendisk* %1, i32 %2, i8* %3) {
%5 = alloca %struct.file*
%6 = alloca %struct.gendisk*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store %struct.file* %0, %struct.file** %5
store %struct.gendisk* %1, %struct.gendisk** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
%struct.file = type opaque
%struct.gendisk = type opaque
define i32 @scsi_cmd_ioctl(%struct.file* nocapture readnone %0, %struct.gendisk* nocapture readnone %1, i32 %2, i8* nocapture readnone %3) {
ret i32 undef
}
void __DELETE_java_lang_Float(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_lang_Float(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int ngram_nbuffer(int length) {
  if (length <= 0) {
    return 0;
  } else {
    return length;
  }
}


x86 assembly (clang, -O0):
<ngram_nbuffer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     111d <ngram_nbuffer+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1123 <ngram_nbuffer+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ngram_nbuffer>:
xor    %eax,%eax
test   %edi,%edi
cmovns %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @ngram_nbuffer(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i32 %0, i32 0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ output_with_tab(char *);
void gen_def_byte(void) { output_with_tab(".db "); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c".db \00"
define void @gen_def_byte() {
%1 = call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c".db \00"
define void @gen_def_byte() {
%1 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int O_RDWR;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int open(char const *, int);
int /*<<< orphan*/ stderr;
int openrw_file(const char *path) {
  int fd;
  fd = open(path, O_RDWR | (0));
  if (fd < 0) {
    fprintf(stderr, "Unable to open for rw, file %s\n", path);
    return -1;
  }
  return fd;
}


x86 assembly (clang, -O0):
<openrw_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
or     $0x0,%esi
call   1040 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1173 <openrw_file+0x53>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe9e(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <openrw_file+0x59>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openrw_file>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
test   %eax,%eax
js     1138 <openrw_file+0x18>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@O_RDWR = global i32 0
@stderr = global i32 0
@.str = [32 x i8] c"Unable to open for rw, file %s\0A\00"
define i32 @openrw_file(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_RDWR
%7 = or i32 %6, 0
%8 = call i32 @open(i8* %5, i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %3
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %13)
store i32 -1, i32* %2
br label %17
15: ; preds = %1
%16 = load i32, i32* %4
store i32 %16, i32* %2
br label %17
17: ; preds = %15, %11
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@stderr = global i32 0
@.str = [32 x i8] c"Unable to open for rw, file %s\0A\00"
define i32 @openrw_file(i8* %0) {
%2 = load i32, i32* @O_RDWR
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ -1, %5 ], [ %3, %1 ]
ret i32 %9
}
void PBISTDisable(void) {
  (*((volatile unsigned long *)(0x400FB000 + 0x00000180))) = 0x0;
}


x86 assembly (clang, -O0):
<PBISTDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fb180,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PBISTDisable>:
movq   $0x0,0x400fb180
ret

LLVM IR (-O0):
define void @PBISTDisable() {
store volatile i64 0, i64* inttoptr (i64 1074770304 to i64*)
ret void
}

LLVM IR (-O2):
define void @PBISTDisable() {
store volatile i64 0, i64* inttoptr (i64 1074770304 to i64*)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ xcb_window_t;
typedef int /*<<< orphan*/ xcb_connection_t;

/* Variables and functions */
int /*<<< orphan*/ xembed_message_send(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                       int /*<<< orphan*/, int /*<<< orphan*/,
                                       int /*<<< orphan*/, long);
void xembed_embedded_notify(xcb_connection_t *c, xcb_window_t client,
                            xcb_window_t embedder, long version) {
  xembed_message_send(c, client, 0, 0, embedder, version);
}


x86 assembly (clang, -O0):
<xembed_embedded_notify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%r8d
mov    -0x18(%rbp),%r9
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <xembed_message_send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xembed_embedded_notify>:
mov    %rcx,%r9
mov    %edx,%r8d
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <xembed_message_send@plt>

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

LLVM IR (-O2):
define void @xembed_embedded_notify(i32* %0, i32 %1, i32 %2, i64 %3) {
%5 = tail call i32 @xembed_message_send(i32* %0, i32 %1, i32 0, i32 0, i32 %2, i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("La resta de 15 y 87 es %i\n", 15 - 87);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"La resta de 15 y 87 es %i\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 -72)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"La resta de 15 y 87 es %i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 -72)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ wm_1_setter(int);
int init_wasm(int n) {
  const int max = 1000000;
  if (n > max) {
    n = max;
    fprintf(stderr, "Asking for too much, sum.wast only allows 1M elements, "
                    "setting to 1M\n");
  }
  wm_1_setter(n);
  return 1;
}


x86 assembly (clang, -O0):
<init_wasm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xf4240,-0x8(%rbp)
cmpl   $0xf4240,-0x4(%rbp)
jle    115b <init_wasm+0x3b>
movl   $0xf4240,-0x4(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <wm_1_setter@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_wasm>:
push   %rax
cmp    $0xf4241,%edi
jl     1143 <init_wasm+0x23>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xf4240,%edi
call   1040 <wm_1_setter@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [70 x i8] c"Asking for too much, sum.wast only allows 1M elements, setting to 1M\0A\00"
define i32 @init_wasm(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1000000, i32* %3
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 1000000
br i1 %5, label %6, label %9
6: ; preds = %1
store i32 1000000, i32* %2
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* %2
%11 = call i32 @wm_1_setter(i32 %10)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [70 x i8] c"Asking for too much, sum.wast only allows 1M elements, setting to 1M\0A\00"
define i32 @init_wasm(i32 %0) {
%2 = icmp sgt i32 %0, 1000000
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ 1000000, %3 ], [ %0, %1 ]
%8 = tail call i32 @wm_1_setter(i32 %7)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void usage(FILE *fp, int argc, char **argv) {
  fprintf(fp,
          "Usage: %s [options]\n\n"
          "Options:\n"
          "-c | --config        config file \n"
          "-h | --help          Print this message\n"
          "",
          argv[0]);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    (%rdx),%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [105 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-c | --config config file \0A-h | --help Print this message\0A\00"
define void @usage(i32* %0, i32 %1, i8** %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8**
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i32*, i32** %4
%8 = load i8**, i8*** %6
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [105 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-c | --config config file \0A-h | --help Print this message\0A\00"
define void @usage(i32* nocapture %0, i32 %1, i8** nocapture %2) {
%4 = load i8*, i8** %2
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
int dwc3_otg_resume(struct dwc3 *dwc) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.dwc3 = type opaque
define i32 @dwc3_otg_resume(%struct.dwc3* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ COND_LT();
int /*<<< orphan*/ EA_A7_PD_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_slt_8_pd7(void) {
  m68ki_write_8(EA_A7_PD_8(), COND_LT() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_slt_8_pd7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_A7_PD_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_LT@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_slt_8_pd7>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_A7_PD_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_LT@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_slt_8_pd7() {
%1 = call i32 (...) @EA_A7_PD_8()
%2 = call i64 (...) @COND_LT()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_slt_8_pd7() {
%1 = tail call i32 (...) @EA_A7_PD_8()
%2 = tail call i64 (...) @COND_LT()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void cpyyfree(void *ptr) { free((char *)ptr); }


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

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

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

LLVM IR (-O2):
define void @cpyyfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ skip(int);
extern void Reserved(int len) { skip(len); }


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

x86 assembly (clang, -O2):
<Reserved>:
jmp    1030 <skip@plt>

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

LLVM IR (-O2):
define void @Reserved(i32 %0) {
%2 = tail call i32 @skip(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/
__softboundcets_propagate_metadata_shadow_stack_from(int, int /*<<< orphan*/);
char *fgets(char *, int, int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) char *
softboundcets_fgets(char *s, int size, FILE *stream) {
  char *ret_ptr = fgets(s, size, stream);
  __softboundcets_propagate_metadata_shadow_stack_from(1, 0);
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundcets_fgets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <fgets@plt>
mov    %rax,-0x20(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_fgets>:
push   %rbx
call   1030 <fgets@plt>
mov    %rax,%rbx
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundcets_fgets(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32*, i32** %6
%11 = call i8* @fgets(i8* %8, i32 %9, i32* %10)
store i8* %11, i8** %7
%12 = call i32 @__softboundcets_propagate_metadata_shadow_stack_from(i32 1, i32 0)
%13 = load i8*, i8** %7
ret i8* %13
}

LLVM IR (-O2):
define weak i8* @softboundcets_fgets(i8* %0, i32 %1, i32* %2) {
%4 = tail call i8* @fgets(i8* %0, i32 %1, i32* %2)
%5 = tail call i32 @__softboundcets_propagate_metadata_shadow_stack_from(i32 1, i32 0)
ret i8* %4
}
int t_double_int(double_arg1, int_arg2)
double double_arg1;
int int_arg2;
{
  return ((double_arg1 - int_arg2) < (0.001) &&
          (double_arg1 - int_arg2) > -(0.001));
}


x86 assembly (clang, -O0):
<t_double_int>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm1
cvtsi2sdl -0xc(%rbp),%xmm0
subsd  %xmm0,%xmm1
xor    %eax,%eax
movsd  0xedc(%rip),%xmm0
ucomisd %xmm1,%xmm0
mov    %al,-0xd(%rbp)
jbe    1151 <t_double_int+0x51>
movsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  0xec1(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_double_int>:
cvtsi2sd %edi,%xmm1
subsd  %xmm1,%xmm0
movsd  0xef0(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
ucomisd 0xee9(%rip),%xmm0
seta   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @t_double_int(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load double, double* %3
%6 = load i32, i32* %4
%7 = sitofp i32 %6 to double
%8 = fsub double %5, %7
%9 = fcmp olt double %8, 1.000000e-03
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load double, double* %3
%12 = load i32, i32* %4
%13 = sitofp i32 %12 to double
%14 = fsub double %11, %13
%15 = fcmp ogt double %14, -1.000000e-03
br label %16
16: ; preds = %10, %2
%17 = phi i1 [ false, %2 ], [ %15, %10 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @t_double_int(double %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = fsub double %0, %3
%5 = fcmp olt double %4, 1.000000e-03
%6 = fcmp ogt double %4, -1.000000e-03
%7 = and i1 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void set(unsigned long addr) { *((int *)addr) = 13; }


x86 assembly (clang, -O0):
<set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xd,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set>:
movl   $0xd,(%rdi)
ret

LLVM IR (-O0):
define void @set(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i32*
store i32 13, i32* %4
ret void
}

LLVM IR (-O2):
define void @set(i64 %0) {
%2 = inttoptr i64 %0 to i32*
store i32 13, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g5_set_n(int);
void(g5_set_n_)(int *n) { g5_set_n(*n); }


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

x86 assembly (clang, -O2):
<g5_set_n_>:
mov    (%rdi),%edi
jmp    1030 <g5_set_n@plt>

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

LLVM IR (-O2):
define void @g5_set_n_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @g5_set_n(i32 %2)
ret void
}
int getBinCount(int num) {
  int ret = 0;
  while ((num >> 1) != 0) {
    ret++;
    num = num >> 1;
  }
  return ret + 1;
}


x86 assembly (clang, -O0):
<getBinCount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
cmp    $0x0,%eax
je     1134 <getBinCount+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <getBinCount+0xe>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @abort_on_misalignment(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, int const);
void prnArr(const int size, const int *const arr) {
  assert(size >= 0);
  for (int i = 0; i < size; i++) {
    printf("%d ", arr[i]);
  }
}


x86 assembly (clang, -O0):
<prnArr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1178 <prnArr+0x58>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1147 <prnArr+0x27>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prnArr>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %edi,%ebp
not    %edi
shr    $0x1f,%edi
call   1040 <assert@plt>
test   %ebp,%ebp
jle    1165 <prnArr+0x45>
mov    %ebp,%ebp
xor    %ebx,%ebx
lea    0xebb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1150 <prnArr+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @prnArr(i32 %0, i32* nocapture %1) {
%3 = xor i32 %0, -1
%4 = lshr i32 %3, 31
%5 = tail call i32 @assert(i32 %4)
%6 = icmp sgt i32 %0, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = zext i32 %0 to i64
br label %10
9: ; preds = %10, %2
ret void
10: ; preds = %7, %10
%11 = phi i64 [ 0, %7 ], [ %15, %10 ]
%12 = getelementptr inbounds i32, i32* %1, i64 %11
%13 = load i32, i32* %12
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = add nuw nsw i64 %11, 1
%16 = icmp eq i64 %15, %8
br i1 %16, label %9, label %10
}