xunge/DecIR huggingface dataset:
/* Variables and functions */
char *strchr(char *, char);
int strncasecmp(char *, char *, int);
int cmp_base(char *file, char *base) {
  return strncasecmp(file, base, strchr(file, '.') - file - 1);
}


x86 assembly (clang, -O0):
<cmp_base>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strchr@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
mov    %eax,%edx
call   1040 <strncasecmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_base>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1030 <strchr@plt>
mov    %ebx,%edx
not    %edx
add    %eax,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strncasecmp@plt>

LLVM IR (-O0):
define i32 @cmp_base(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 = load i8*, i8** %3
%8 = call i8* @strchr(i8* %7, i8 signext 46)
%9 = load i8*, i8** %3
%10 = ptrtoint i8* %8 to i64
%11 = ptrtoint i8* %9 to i64
%12 = sub i64 %10, %11
%13 = sub nsw i64 %12, 1
%14 = trunc i64 %13 to i32
%15 = call i32 @strncasecmp(i8* %5, i8* %6, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @cmp_base(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 46)
%4 = ptrtoint i8* %3 to i64
%5 = ptrtoint i8* %0 to i64
%6 = xor i64 %5, -1
%7 = add i64 %4, %6
%8 = trunc i64 %7 to i32
%9 = tail call i32 @strncasecmp(i8* %0, i8* %1, i32 %8)
ret i32 %9
}
void _TFC4Blog5Assetg6heightCSo8NSNumber() {}


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

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

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

LLVM IR (-O2):
define void @_TFC4Blog5Assetg6heightCSo8NSNumber() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float);
int main() {
  float fahr, celsius;
  int lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  fahr = lower;
  while (celsius <= upper) {
    fahr = celsius * (9.0 / 5.0) + 32.0;
    printf("%3.0f %6.0f\n", celsius, fahr);
    celsius = celsius + step;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x12c,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
cvtsi2ssl -0x10(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm1
cvtsi2ssl -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11a9 <main+0x99>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe9e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9a(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113e <main+0x2e>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"%3.0f %6.0f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 300, i32* %5
store i32 20, i32* %6
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to float
store float %8, float* %2
br label %9
9: ; preds = %14, %0
%10 = load float, float* %3
%11 = load i32, i32* %5
%12 = sitofp i32 %11 to float
%13 = fcmp ole float %10, %12
br i1 %13, label %14, label %26
14: ; preds = %9
%15 = load float, float* %3
%16 = fpext float %15 to double
%17 = call double @llvm.fmuladd.f64(double %16, double 1.800000e+00, double 3.200000e+01)
%18 = fptrunc double %17 to float
store float %18, float* %2
%19 = load float, float* %3
%20 = load float, float* %2
%21 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %19, float %20)
%22 = load float, float* %3
%23 = load i32, i32* %6
%24 = sitofp i32 %23 to float
%25 = fadd float %22, %24
store float %25, float* %3
br label %9
26: ; preds = %9
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ test_assert(int);
int main(int argc, char *argv[]) {
  if (argc == 0) {
  }
  test_assert(1);
  argc;
  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)
cmpl   $0x0,-0x8(%rbp)
jne    1135 <main+0x25>
jmp    1135 <main+0x25>
mov    $0x1,%edi
call   1030 <test_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <test_assert@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 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
br label %9
9: ; preds = %8, %2
%10 = call i32 @test_assert(i32 1)
%11 = load i32, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test_assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x83() {
  Assert_real((isprint(131) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              660, ("isprint should be 0 for 0x83"));
}


x86 assembly (clang, -O0):
<t_isprint_0x83>:
push   %rbp
mov    %rsp,%rbp
mov    $0x83,%edi
call   1030 <isprint@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x294,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x83>:
push   %rax
mov    $0x83,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x294,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x83\00"
define void @t_isprint_0x83() {
%1 = call i64 @isprint(i32 131)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 660, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x83\00"
define void @t_isprint_0x83() {
%1 = tail call i64 @isprint(i32 131)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 660, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void warning(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @warning(i8* nocapture %0, ...) {
ret void
}
void XQueryKeymap() {}


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

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

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

LLVM IR (-O2):
define void @XQueryKeymap() {
ret void
}
int f(int *p) { return *p; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x44() {
  Assert_real((isbdigit(68) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              345, ("isbdigit should be 0 for D"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x44>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x159,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x44>:
push   %rax
mov    $0x44,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x159,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for D\00"
define void @t_isbdigit_0x44() {
%1 = call i64 @isbdigit(i32 68)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 345, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for D\00"
define void @t_isbdigit_0x44() {
%1 = tail call i64 @isbdigit(i32 68)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 345, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exact_square(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number;
  printf("Enter number: ");
  scanf("%d", &number);
  exact_square(number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <exact_square@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <exact_square@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter number: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @exact_square(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter number: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @exact_square(i32 %5)
ret i32 0
}
/* Variables and functions */
short printNumber_L(long, int);
short printNumber_I(int n, int base) { return printNumber_L((long)n, base); }


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

x86 assembly (clang, -O2):
<printNumber_I>:
movslq %edi,%rdi
jmp    1030 <printNumber_L@plt>

LLVM IR (-O0):
define signext i16 @printNumber_I(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = load i32, i32* %4
%8 = call signext i16 @printNumber_L(i64 %6, i32 %7)
ret i16 %8
}

LLVM IR (-O2):
define signext i16 @printNumber_I(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = tail call signext i16 @printNumber_L(i64 %3, i32 %1)
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ nl();
int /*<<< orphan*/ ot(char *);
int /*<<< orphan*/ outstr(char *);
int /*<<< orphan*/ printlabel(int);
void opjumpr(char *cc, int label) {
  ot("jr\t");
  outstr(cc);
  printlabel(label);
  nl();
}


x86 assembly (clang, -O0):
<opjumpr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeaa(%rip),%rdi
call   1050 <ot@plt>
mov    -0x8(%rbp),%rdi
call   1040 <outstr@plt>
mov    -0xc(%rbp),%edi
call   1060 <printlabel@plt>
mov    $0x0,%al
call   1030 <nl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opjumpr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xeb1(%rip),%rdi
call   1050 <ot@plt>
mov    %rbx,%rdi
call   1040 <outstr@plt>
mov    %ebp,%edi
call   1060 <printlabel@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <nl@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"jr\09\00"
define void @opjumpr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @ot(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = call i32 @outstr(i8* %6)
%8 = load i32, i32* %4
%9 = call i32 @printlabel(i32 %8)
%10 = call i32 (...) @nl()
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"jr\09\00"
define void @opjumpr(i8* %0, i32 %1) {
%3 = tail call i32 @ot(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @outstr(i8* %0)
%5 = tail call i32 @printlabel(i32 %1)
%6 = tail call i32 (...) @nl()
ret void
}
void test(int (*a)[6]) {}


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

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

LLVM IR (-O0):
define void @test([6 x i32]* %0) {
%2 = alloca [6 x i32]*
store [6 x i32]* %0, [6 x i32]** %2
ret void
}

LLVM IR (-O2):
define void @test([6 x i32]* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ m68ki_get_ea_pcix();
int /*<<< orphan*/ m68ki_jump(int /*<<< orphan*/);
void m68k_op_jmp_32_pcix(void) { m68ki_jump(m68ki_get_ea_pcix()); }


x86 assembly (clang, -O0):
<m68k_op_jmp_32_pcix>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <m68ki_get_ea_pcix@plt>
mov    %eax,%edi
call   1030 <m68ki_jump@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_jmp_32_pcix>:
push   %rax
xor    %eax,%eax
call   1040 <m68ki_get_ea_pcix@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <m68ki_jump@plt>

LLVM IR (-O0):
define void @m68k_op_jmp_32_pcix() {
%1 = call i32 (...) @m68ki_get_ea_pcix()
%2 = call i32 @m68ki_jump(i32 %1)
ret void
}

LLVM IR (-O2):
define void @m68k_op_jmp_32_pcix() {
%1 = tail call i32 (...) @m68ki_get_ea_pcix()
%2 = tail call i32 @m68ki_jump(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  union {
    float a[2];
    int b[2];
  } u;
  u.a[0] = 0.0 / 0.0;
  u.a[1] = ((*u.b & 0x7FC00000) != 0x7FC00000);
  printf("%f\n", u.a[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xed2(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
and    $0x7fc00000,%eax
cmp    $0x7fc00000,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x14(%rbp)
cvttss2si -0x14(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { [2 x float] }
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %union.anon
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast %union.anon* %6 to [2 x float]*
%8 = getelementptr inbounds [2 x float], [2 x float]* %7, i64 0, i64 0
store float 0x7FF8000000000000, float* %8
%9 = bitcast %union.anon* %6 to [2 x i32]*
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
%11 = load i32, i32* %10
%12 = and i32 %11, 2143289344
%13 = icmp ne i32 %12, 2143289344
%14 = zext i1 %13 to i32
%15 = sitofp i32 %14 to float
%16 = bitcast %union.anon* %6 to [2 x float]*
%17 = getelementptr inbounds [2 x float], [2 x float]* %16, i64 0, i64 1
store float %15, float* %17
%18 = bitcast %union.anon* %6 to [2 x float]*
%19 = getelementptr inbounds [2 x float], [2 x float]* %18, i64 0, i64 1
%20 = load float, float* %19
%21 = fptosi float %20 to i32
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void username() { printf("liao17 likes to eat korean bbq.\n"); }


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"liao17 likes to eat korean bbq.\0A\00"
define void @username() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"liao17 likes to eat korean bbq.\00"
define void @username() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M27_f(char *s) {
  debug("M27_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M27_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M27_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"M27_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M27_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"M27_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M27_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Init_Col_PG_addrs(int, int, int, int);
int /*<<< orphan*/ transfer();
void Display() {
  Init_Col_PG_addrs(0x00, (128 - 1), 0x00, 7);
  transfer();
}


x86 assembly (clang, -O0):
<Display>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x7f,%esi
mov    $0x7,%ecx
mov    %edx,%edi
call   1030 <Init_Col_PG_addrs@plt>
mov    $0x0,%al
call   1040 <transfer@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Display>:
push   %rax
xor    %edi,%edi
mov    $0x7f,%esi
xor    %edx,%edx
mov    $0x7,%ecx
call   1030 <Init_Col_PG_addrs@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <transfer@plt>

LLVM IR (-O0):
define void @Display() {
%1 = call i32 @Init_Col_PG_addrs(i32 0, i32 127, i32 0, i32 7)
%2 = call i32 (...) @transfer()
ret void
}

LLVM IR (-O2):
define void @Display() {
%1 = tail call i32 @Init_Col_PG_addrs(i32 0, i32 127, i32 0, i32 7)
%2 = tail call i32 (...) @transfer()
ret void
}
char const *pubnub_sdk_name(void) { return "FreeRTOS"; }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"FreeRTOS\00"
define i8* @pubnub_sdk_name() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"FreeRTOS\00"
define i8* @pubnub_sdk_name() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct eeprom {
  int dummy;
};
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
void eeprom_writeb(struct eeprom *ee, unsigned address, __u8 data) {}


x86 assembly (clang, -O0):
<eeprom_writeb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.eeprom = type { i32 }
define void @eeprom_writeb(%struct.eeprom* %0, i32 %1, i32 %2) {
%4 = alloca %struct.eeprom*
%5 = alloca i32
%6 = alloca i32
store %struct.eeprom* %0, %struct.eeprom** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.eeprom = type { i32 }
define void @eeprom_writeb(%struct.eeprom* nocapture %0, i32 %1, i32 %2) {
ret void
}
int count_space(char line[]) {
  char *ptr;
  int num_spaces;
  num_spaces = 0;
  for (ptr = &line[0]; *ptr != '\0'; ptr++) {
    if (*ptr == ' ')
      num_spaces++;
  }
  return num_spaces;
}


x86 assembly (clang, -O0):
<count_space>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1156 <count_space+0x56>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1140 <count_space+0x40>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1145 <count_space+0x45>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1117 <count_space+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_space>:
xor    %eax,%eax
jmp    1117 <count_space+0x17>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x20,%cl
je     1110 <count_space+0x10>
test   %cl,%cl
jne    1113 <count_space+0x13>
ret

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

LLVM IR (-O2):
define i32 @count_space(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i32 [ 0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %11
i8 32, label %6
]
6: ; preds = %2
%7 = add nsw i32 %4, 1
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
ret i32 %4
}
int sha2_self_test(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @sha2_self_test() {
ret i32 0
}
unsigned char reverse(unsigned char b) {
  b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
  b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
  b = (b & 0xAA) >> 1 | (b & 0x55) << 1;
  return b;
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
movzbl -0x1(%rbp),%ecx
and    $0xf,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xcc,%eax
sar    $0x2,%eax
movzbl -0x1(%rbp),%ecx
and    $0x33,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xaa,%eax
sar    $0x1,%eax
movzbl -0x1(%rbp),%ecx
and    $0x55,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %dil,%al
mov    %eax,%ecx
and    $0x55,%cl
add    %cl,%cl
shr    %al
and    $0x55,%al
or     %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @reverse(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 240
%6 = ashr i32 %5, 4
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = and i32 %8, 15
%10 = shl i32 %9, 4
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
%13 = load i8, i8* %2
%14 = zext i8 %13 to i32
%15 = and i32 %14, 204
%16 = ashr i32 %15, 2
%17 = load i8, i8* %2
%18 = zext i8 %17 to i32
%19 = and i32 %18, 51
%20 = shl i32 %19, 2
%21 = or i32 %16, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %2
%23 = load i8, i8* %2
%24 = zext i8 %23 to i32
%25 = and i32 %24, 170
%26 = ashr i32 %25, 1
%27 = load i8, i8* %2
%28 = zext i8 %27 to i32
%29 = and i32 %28, 85
%30 = shl i32 %29, 1
%31 = or i32 %26, %30
%32 = trunc i32 %31 to i8
store i8 %32, i8* %2
%33 = load i8, i8* %2
ret i8 %33
}

LLVM IR (-O2):
define zeroext i8 @reverse(i8 zeroext %0) {
%2 = tail call i8 @llvm.bitreverse.i8(i8 %0)
ret i8 %2
}
/* Variables and functions */
int DIV_ROUND_UP(int, int);
int mal_tx_chunks(int len) { return DIV_ROUND_UP(len, 4080); }


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

x86 assembly (clang, -O2):
<mal_tx_chunks>:
mov    $0xff0,%esi
jmp    1030 <DIV_ROUND_UP@plt>

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

LLVM IR (-O2):
define i32 @mal_tx_chunks(i32 %0) {
%2 = tail call i32 @DIV_ROUND_UP(i32 %0, i32 4080)
ret i32 %2
}
/* Variables and functions */
int array_add(char ***, char *);
int /*<<< orphan*/ array_item_contains(char **, char *, int);
int /*<<< orphan*/ xfree(char *);
int array_add_check(char ***array, char *string, int casesensitive) {
  if (!array_item_contains(*array, string, casesensitive))
    return array_add(array, string);
  else
    xfree(string);
  return 0;
}


x86 assembly (clang, -O0):
<array_add_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <array_item_contains@plt>
cmp    $0x0,%eax
jne    1174 <array_add_check+0x44>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <array_add@plt>
mov    %eax,-0x4(%rbp)
jmp    1184 <array_add_check+0x54>
mov    -0x18(%rbp),%rdi
call   1050 <xfree@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_add_check>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rdi),%rdi
call   1040 <array_item_contains@plt>
test   %eax,%eax
je     1158 <array_add_check+0x28>
mov    %rbx,%rdi
call   1050 <xfree@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <array_add@plt>

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

LLVM IR (-O2):
define i32 @array_add_check(i8*** %0, i8* %1, i32 %2) {
%4 = load i8**, i8*** %0
%5 = tail call i32 @array_item_contains(i8** %4, i8* %1, i32 %2)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @array_add(i8*** %0, i8* %1)
br label %11
9: ; preds = %3
%10 = tail call i32 @xfree(i8* %1)
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ 0, %9 ], [ %8, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int number1, number2, PROD;
  scanf("%d %d", &number1, &number2);
  PROD = number1 * number2;
  printf("PROD = %d", PROD);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
imul   0x4(%rsp),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [10 x i8] c"PROD = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = mul nsw i32 %7, %6
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glutPostRedisplay();
int /*<<< orphan*/ glutTimerFunc(int, void (*)(int), int /*<<< orphan*/);
void nextFrame(int x) {
  glutPostRedisplay();
  glutTimerFunc(20, nextFrame, 0);
}


x86 assembly (clang, -O0):
<nextFrame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <glutPostRedisplay@plt>
mov    $0x14,%edi
mov    0x2eaa(%rip),%rsi
xor    %edx,%edx
call   1030 <glutTimerFunc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextFrame>:
push   %rax
xor    %eax,%eax
call   1040 <glutPostRedisplay@plt>
mov    0x2eb9(%rip),%rsi
mov    $0x14,%edi
xor    %edx,%edx
pop    %rax
jmp    1030 <glutTimerFunc@plt>

LLVM IR (-O0):
define void @nextFrame(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @glutPostRedisplay()
%4 = call i32 @glutTimerFunc(i32 20, void (i32)* @nextFrame, i32 0)
ret void
}

LLVM IR (-O2):
define void @nextFrame(i32 %0) {
%2 = tail call i32 (...) @glutPostRedisplay()
%3 = tail call i32 @glutTimerFunc(i32 20, void (i32)* @nextFrame, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PRGM_GetKey_OS(unsigned char *);
int PRGM_GetKey() {
  unsigned char buffer[12];
  PRGM_GetKey_OS(buffer);
  return ((buffer[1] & 0x0F) * 10 + ((buffer[2] & 0xF0) >> 4));
}


x86 assembly (clang, -O0):
<PRGM_GetKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xc(%rbp),%rdi
call   1030 <PRGM_GetKey_OS@plt>
movzbl -0xb(%rbp),%eax
and    $0xf,%eax
imul   $0xa,%eax,%eax
movzbl -0xa(%rbp),%ecx
and    $0xf0,%ecx
sar    $0x4,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRGM_GetKey>:
sub    $0x18,%rsp
lea    0xc(%rsp),%rdi
call   1030 <PRGM_GetKey_OS@plt>
movzbl 0xd(%rsp),%eax
and    $0xf,%eax
lea    (%rax,%rax,4),%eax
movzbl 0xe(%rsp),%ecx
shr    $0x4,%ecx
lea    (%rcx,%rax,2),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @PRGM_GetKey() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @PRGM_GetKey_OS(i8* %2)
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = and i32 %6, 15
%8 = mul nsw i32 %7, 10
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = and i32 %11, 240
%13 = ashr i32 %12, 4
%14 = add nsw i32 %8, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @PRGM_GetKey() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @PRGM_GetKey_OS(i8* %2)
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 1
%5 = load i8, i8* %4
%6 = and i8 %5, 15
%7 = mul nuw i8 %6, 10
%8 = zext i8 %7 to i32
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 2
%10 = load i8, i8* %9
%11 = lshr i8 %10, 4
%12 = zext i8 %11 to i32
%13 = add nuw nsw i32 %8, %12
ret i32 %13
}
/* Variables and functions */
unsigned int DEKHash(unsigned char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strlen(unsigned char *);
int main(int argc, char *argv[]) {
  unsigned char *str = argv[1];
  unsigned int hash = DEKHash(str, strlen(str));
  if (hash == 0xde4363b7)
    printf("You win!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
call   1030 <DEKHash@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xde4363b7,-0x1c(%rbp)
jne    118a <main+0x5a>
lea    0xe7b(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <DEKHash@plt>
cmp    $0xde4363b7,%eax
jne    115a <main+0x2a>
lea    0xeab(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"You win!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = load i8*, i8** %6
%13 = call i32 @strlen(i8* %12)
%14 = call i32 @DEKHash(i8* %11, i32 %13)
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = icmp eq i32 %15, -566008905
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %2
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"You win!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @strlen(i8* %4)
%6 = tail call i32 @DEKHash(i8* %4, i32 %5)
%7 = icmp eq i32 %6, -566008905
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *program) {
  printf("Usage:\t%s <profile>\n", program);
  printf("\toption\n");
  printf("\t-r<int>	specify LOWESS fitting radius (default = npts/2)\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage:\09%s <profile>\0A\00"
@.str.1 = [9 x i8] c"\09option\0A\00"
@.str.2 = [59 x i8] c"\09-r<int>\09specify LOWESS fitting radius (default = npts/2)\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage:\09%s <profile>\0A\00"
@str = [8 x i8] c"\09option\00"
@str.3 = [58 x i8] c"\09-r<int>\09specify LOWESS fitting radius (default = npts/2)\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_8Dint64_midword_reg(long long val) {
  return ((val >> 16) & (0x8D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_8Dint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x8d,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_8Dint64_midword_reg>:
test   $0x8d0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_8Dint64_midword_reg(i64 %0) {
%2 = and i64 %0, 9240576
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int is_limb() { return 1; }


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

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

LLVM IR (-O0):
define i32 @is_limb() {
ret i32 1
}

LLVM IR (-O2):
define i32 @is_limb() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ abnormal();
int /*<<< orphan*/ deep_copy();
int /*<<< orphan*/ empty_append();
int /*<<< orphan*/ equality();
int /*<<< orphan*/ normal();
int main(void) {
  normal();
  empty_append();
  equality();
  deep_copy();
  abnormal();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <normal@plt>
mov    $0x0,%al
call   1030 <empty_append@plt>
mov    $0x0,%al
call   1050 <equality@plt>
mov    $0x0,%al
call   1070 <deep_copy@plt>
mov    $0x0,%al
call   1040 <abnormal@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <normal@plt>
xor    %eax,%eax
call   1030 <empty_append@plt>
xor    %eax,%eax
call   1050 <equality@plt>
xor    %eax,%eax
call   1070 <deep_copy@plt>
xor    %eax,%eax
call   1040 <abnormal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @normal()
%3 = call i32 (...) @empty_append()
%4 = call i32 (...) @equality()
%5 = call i32 (...) @deep_copy()
%6 = call i32 (...) @abnormal()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @normal()
%2 = tail call i32 (...) @empty_append()
%3 = tail call i32 (...) @equality()
%4 = tail call i32 (...) @deep_copy()
%5 = tail call i32 (...) @abnormal()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ waitpid(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
void child_handler(int sig) {
  while (waitpid(-1, NULL, WNOHANG) > 0) {
  }
}


x86 assembly (clang, -O0):
<child_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <waitpid@plt>
cmp    $0x0,%rax
jle    1141 <child_handler+0x31>
jmp    111b <child_handler+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child_handler>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1120 <child_handler+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @child_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* @WNOHANG
%5 = call i64 @waitpid(i32 -1, i32* null, i32 %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @child_handler(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @WNOHANG
%4 = tail call i64 @waitpid(i32 -1, i32* null, i32 %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int EOF;
int /*<<< orphan*/ _doprnt_ansi(char const *, int /*<<< orphan*/,
                                int /*<<< orphan*/);
scalar_t__ ferror(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int vprintf(const char *fmt, va_list args) {
  _doprnt_ansi(fmt, args, stdout);
  return (ferror(stdout) ? EOF : 0);
}


x86 assembly (clang, -O0):
<vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
call   1030 <_doprnt_ansi@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1040 <ferror@plt>
cmp    $0x0,%rax
je     116d <vprintf+0x4d>
mov    0x2e85(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
jmp    1177 <vprintf+0x57>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    1177 <vprintf+0x57>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vprintf>:
push   %rbx
mov    0x2eb0(%rip),%rbx
mov    (%rbx),%edx
call   1030 <_doprnt_ansi@plt>
mov    (%rbx),%edi
call   1040 <ferror@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1149 <vprintf+0x29>
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@EOF = global i32 0
define i32 @vprintf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = load i32, i32* @stdout
%8 = call i32 @_doprnt_ansi(i8* %5, i32 %6, i32 %7)
%9 = load i32, i32* @stdout
%10 = call i64 @ferror(i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* @EOF
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %12
%16 = phi i32 [ %13, %12 ], [ 0, %14 ]
ret i32 %16
}

LLVM IR (-O2):
@stdout = global i32 0
@EOF = global i32 0
define i32 @vprintf(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @_doprnt_ansi(i8* %0, i32 %1, i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i64 @ferror(i32 %5)
%7 = icmp eq i64 %6, 0
%8 = load i32, i32* @EOF
%9 = select i1 %7, i32 0, i32 %8
ret i32 %9
}