xunge/DecIR huggingface dataset:
int foo(int v[], int a) {
  int r, i;
  for (i = 0; i < 64; i++)
    r = v[i] + a;
  return r;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jge    113b <foo+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <foo+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %esi,%eax
add    0xfc(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 63
%4 = load i32, i32* %3
%5 = add nsw i32 %4, %1
ret i32 %5
}
int ifunc(void) { return 0xbadbeef; }


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

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

LLVM IR (-O0):
define i32 @ifunc() {
ret i32 195935983
}

LLVM IR (-O2):
define i32 @ifunc() {
ret i32 195935983
}
/* Variables and functions */
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void mdbm_log_core_stderr(const char *file, int line, int level, char *msg,
                          int msglen) {
  fwrite(msg, msglen, 1, stderr);
}


x86 assembly (clang, -O0):
<mdbm_log_core_stderr>:
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    %r8d,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    0x2ea8(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%edx
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdbm_log_core_stderr>:
mov    %r8d,%esi
mov    0x2ec6(%rip),%rax
mov    (%rax),%eax
mov    %rcx,%rdi
mov    $0x1,%edx
mov    %eax,%ecx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
define void @mdbm_log_core_stderr(i8* nocapture readnone %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = load i32, i32* @stderr
%7 = tail call i32 @fwrite(i8* %3, i32 %4, i32 1, i32 %6)
ret void
}
/* Type definitions */
struct timespec {
  unsigned long tv_sec;
  unsigned long tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
unsigned long now(void) {
  struct timespec ts;
  clock_gettime(CLOCK_REALTIME, &ts);
  return ts.tv_sec * 1000000000ul + ts.tv_nsec;
}


x86 assembly (clang, -O0):
<now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,-0x10(%rbp),%rax
3b
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<now>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,0x8(%rsp),%rax
9a 3b
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_REALTIME = global i32 0
define i64 @now() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = add i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_REALTIME = global i32 0
define i64 @now() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = mul i64 %6, 1000000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add i64 %7, %9
ret i64 %10
}
/* Variables and functions */
double __ocml_j0_f64(double);
double j0(double x) { return __ocml_j0_f64(x); }


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

x86 assembly (clang, -O2):
<j0>:
jmp    1030 <__ocml_j0_f64@plt>

LLVM IR (-O0):
define double @j0(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @__ocml_j0_f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @j0(double %0) {
%2 = tail call double @__ocml_j0_f64(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x70() {
  Assert_real((isalnum(112)),
              "/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_isalnum.c",
              565, ("isalnum should be 1 for p"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x70>:
push   %rbp
mov    %rsp,%rbp
mov    $0x70,%edi
call   1030 <isalnum@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x235,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x70>:
push   %rax
mov    $0x70,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x235,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for p\00"
define void @t_isalnum_0x70() {
%1 = call i32 @isalnum(i32 112)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 565, i8* getelementptr inbounds ([26 x i8], [26 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for p\00"
define void @t_isalnum_0x70() {
%1 = tail call i32 @isalnum(i32 112)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 565, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ is_upalpha(char const);
char *__skip_upalpha(const char *s) {
  while (is_upalpha(*s))
    s++;
  return (char *)s;
}


x86 assembly (clang, -O0):
<__skip_upalpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_upalpha@plt>
cmp    $0x0,%rax
je     1143 <__skip_upalpha+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <__skip_upalpha+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__skip_upalpha>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <is_upalpha@plt>
test   %rax,%rax
jne    1120 <__skip_upalpha+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @__skip_upalpha(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @is_upalpha(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Type definitions */
struct feed_line {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ feed_line_cleanup(struct feed_line *const);
void feed_line_cleanup_cb(void *const p_object) {
  struct feed_line *const p_line = (struct feed_line *)(p_object);
  feed_line_cleanup(p_line);
}


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

x86 assembly (clang, -O2):
<feed_line_cleanup_cb>:
jmp    1030 <feed_line_cleanup@plt>

LLVM IR (-O0):
%struct.feed_line = type { i32 }
define void @feed_line_cleanup_cb(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.feed_line*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.feed_line*
store %struct.feed_line* %5, %struct.feed_line** %3
%6 = load %struct.feed_line*, %struct.feed_line** %3
%7 = call i32 @feed_line_cleanup(%struct.feed_line* %6)
ret void
}

LLVM IR (-O2):
%struct.feed_line = type { i32 }
define void @feed_line_cleanup_cb(i8* %0) {
%2 = bitcast i8* %0 to %struct.feed_line*
%3 = tail call i32 @feed_line_cleanup(%struct.feed_line* %2)
ret void
}
long double log2l(long double x) {
  long double r;
  if (!x)
    return __pole_error(1);
  __asm__ __volatile__("fld1; fyl2x" : "=t"(r) : "0"(x));
  return r;
}


x86 assembly (clang, -O0):
<log2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1154 <log2l+0x44>
jp     1154 <log2l+0x44>
jmp    113a <log2l+0x2a>
xor    %eax,%eax
mov    $0x1,%edi
call   1030 <__pole_error@plt>
mov    %eax,-0x34(%rbp)
fildl  -0x34(%rbp)
fstpt  -0x10(%rbp)
jmp    1164 <log2l+0x54>
fldt   -0x20(%rbp)
fld1
fyl2x
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2l>:
push   %rax
fldt   0x10(%rsp)
fldz
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jne    1121 <log2l+0x11>
jnp    1127 <log2l+0x17>
fld1
fyl2x
pop    %rax
ret
fstp   %st(0)
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <__pole_error@plt>
mov    %eax,0x4(%rsp)
fildl  0x4(%rsp)
pop    %rax
ret

LLVM IR (-O0):
define x86_fp80 @log2l(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
%5 = load x86_fp80, x86_fp80* %3
%6 = fcmp une x86_fp80 %5, 0xK00000000000000000000
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = call i32 (i32, ...) bitcast (i32 (...)* @__pole_error to i32 (i32, ...)*)(i32 1)
%9 = sitofp i32 %8 to x86_fp80
store x86_fp80 %9, x86_fp80* %2
br label %14
10: ; preds = %1
%11 = load x86_fp80, x86_fp80* %3
%12 = call x86_fp80 asm sideeffect "fld1; fyl2x", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %11)
store x86_fp80 %12, x86_fp80* %4
%13 = load x86_fp80, x86_fp80* %4
store x86_fp80 %13, x86_fp80* %2
br label %14
14: ; preds = %10, %7
%15 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %15
}

LLVM IR (-O2):
define x86_fp80 @log2l(x86_fp80 %0) {
%2 = fcmp une x86_fp80 %0, 0xK00000000000000000000
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @__pole_error to i32 (i32, ...)*)(i32 1)
%5 = sitofp i32 %4 to x86_fp80
br label %8
6: ; preds = %1
%7 = tail call x86_fp80 asm sideeffect "fld1; fyl2x", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %0)
br label %8
8: ; preds = %6, %3
%9 = phi x86_fp80 [ %7, %6 ], [ %5, %3 ]
ret x86_fp80 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void catch (int dummy) { printf("Złapano:%d\n", dummy); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Z\C5\82apano:%d\0A\00"
define void @catch(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Z\C5\82apano:%d\0A\00"
define void @catch(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
unsigned xrop3_9_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D ^ S;
  stk1 = T | stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_9_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_9_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
and    $0xffffff00,%eax
or     %edi,%esi
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_9_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %4, %6
%8 = or i32 %7, 255
%9 = xor i32 %8, -1
%10 = or i8 %1, %0
%11 = zext i8 %10 to i32
%12 = or i32 %11, %9
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void fprint_clr(FILE *stream) {
  fprintf(stream, "CLR   A                         ");
}


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

x86 assembly (clang, -O2):
<fprint_clr>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"CLR A \00"
define void @fprint_clr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"CLR A \00"
define void @fprint_clr(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 32, i64 1, i32* %0)
ret void
}
void freeAppList(char **list) {
  int i = -1;
  while (list[++i])
    free(list[i]);
  free(list);
}


x86 assembly (clang, -O0):
<freeAppList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1154 <freeAppList+0x44>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    1123 <freeAppList+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeAppList>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <freeAppList+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <freeAppList+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeAppList(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %9, %4 ], [ %2, %1 ]
tail call void @free(i8* %6)
%7 = add nuw nsw i64 %5, 1
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = bitcast i8** %0 to i8*
tail call void @free(i8* %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_OpcodeArgumentMustBeHandler(long p_position) {
  _Error(p_position, "Opcode argument must be a handler id");
}


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

x86 assembly (clang, -O2):
<Error_OpcodeArgumentMustBeHandler>:
lea    0xee9(%rip),%rsi
jmp    1030 <_Error@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"Opcode argument must be a handler id\00"
define void @Error_OpcodeArgumentMustBeHandler(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"Opcode argument must be a handler id\00"
define void @Error_OpcodeArgumentMustBeHandler(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ putchar(int);
main() {
  int c;
  c = getchar() != EOF;
  printf("%d\n", c);
  putchar(c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <getchar@plt>
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2ea9(%rip),%rcx
xor    %ebx,%ebx
cmp    (%rcx),%rax
setne  %bl
lea    0xeb2(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
mov    %ebx,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i64 (...) @getchar()
%3 = load i64, i64* @EOF
%4 = icmp ne i64 %2, %3
%5 = zext i1 %4 to i32
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %1
%9 = call i32 @putchar(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp ne i64 %1, %2
%4 = zext i1 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 @putchar(i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ph_free(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<ph_free>:
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):
<ph_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @ph_free(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 @ph_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
unsigned char CFV2PrefixExtractorInDomain(void *state, const char *key,
                                          size_t length) {
  return 1;
}


x86 assembly (clang, -O0):
<CFV2PrefixExtractorInDomain>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @CFV2PrefixExtractorInDomain(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
ret i8 1
}

LLVM IR (-O2):
define zeroext i8 @CFV2PrefixExtractorInDomain(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
ret i8 1
}
unsigned xrop3_207_0_0(unsigned char s, unsigned char t) {
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = ~T;
  stk1 = S | stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_207_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_207_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
not    %eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_207_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
store i32 %14, i32* %5
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 8
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
store i32 %20, i32* %6
%21 = load i32, i32* %6
%22 = xor i32 %21, -1
store i32 %22, i32* %8
%23 = load i32, i32* %5
%24 = load i32, i32* %8
%25 = or i32 %23, %24
store i32 %25, i32* %7
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @xrop3_207_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, -1
%8 = or i32 %4, %7
ret i32 %8
}
/* Variables and functions */
size_t CombinationRipetitionR(int /*<<< orphan*/, int *, int *, size_t, size_t,
                              int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(size_t);
size_t CombinationRipetition(int *val, size_t n, size_t k) {
  size_t count;
  int *sol = (int *)malloc(k * sizeof(int));
  count = CombinationRipetitionR(0, val, sol, n, k, 0, 0);
  free(sol);
  return (count);
}


x86 assembly (clang, -O0):
<CombinationRipetition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
xor    %r9d,%r9d
mov    %r9d,%edi
movl   $0x0,(%rsp)
call   1050 <CombinationRipetitionR@plt>
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CombinationRipetition>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x0(,%rdx,4),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,(%rsp)
xor    %edi,%edi
mov    %r15,%rsi
mov    %rax,%rdx
mov    %r14,%rcx
mov    %r12,%r8
xor    %r9d,%r9d
call   1050 <CombinationRipetitionR@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @CombinationRipetition(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%9 = load i64, i64* %6
%10 = mul i64 %9, 4
%11 = call i64 @malloc(i64 %10)
%12 = inttoptr i64 %11 to i32*
store i32* %12, i32** %8
%13 = load i32*, i32** %4
%14 = load i32*, i32** %8
%15 = load i64, i64* %5
%16 = load i64, i64* %6
%17 = call i64 @CombinationRipetitionR(i32 0, i32* %13, i32* %14, i64 %15, i64 %16, i32 0, i32 0)
store i64 %17, i64* %7
%18 = load i32*, i32** %8
%19 = call i32 @free(i32* %18)
%20 = load i64, i64* %7
ret i64 %20
}

LLVM IR (-O2):
define i64 @CombinationRipetition(i32* %0, i64 %1, i64 %2) {
%4 = shl i64 %2, 2
%5 = tail call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i32*
%7 = tail call i64 @CombinationRipetitionR(i32 0, i32* %0, i32* %6, i64 %1, i64 %2, i32 0, i32 0)
%8 = tail call i32 @free(i32* %6)
ret i64 %7
}
double pressure_from_sensor(unsigned pressure) {
  const double bias = -470.734;
  const double gain = 44.549779924087175;
  return (pressure - bias) / gain;
}


x86 assembly (clang, -O0):
<pressure_from_sensor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movabs $0xc07d6bbe76c8b439,%rax
6b 7d c0
mov    %rax,-0x10(%rbp)
movabs $0x4046465f3044f9d4,%rax
46 46 40
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  0xed5(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xec1(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pressure_from_sensor>:
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
addsd  0xef1(%rip),%xmm0
divsd  0xef1(%rip),%xmm0
ret

LLVM IR (-O0):
define double @pressure_from_sensor(i32 %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store i32 %0, i32* %2
store double -4.707340e+02, double* %3
store double 0x4046465F3044F9D4, double* %4
%5 = load i32, i32* %2
%6 = uitofp i32 %5 to double
%7 = fsub double %6, -4.707340e+02
%8 = fdiv double %7, 0x4046465F3044F9D4
ret double %8
}

LLVM IR (-O2):
define double @pressure_from_sensor(i32 %0) {
%2 = uitofp i32 %0 to double
%3 = fadd double %2, 4.707340e+02
%4 = fdiv double %3, 0x4046465F3044F9D4
ret double %4
}
int test_imm_53uint8_reg(unsigned char val) {
  return ((val) & (0x53 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_53uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x53,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_53uint8_reg>:
test   $0x53,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_53uint8_reg(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, 83
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_53uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 83
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int jomp() { return 3; }


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

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

LLVM IR (-O0):
define i32 @jomp() {
ret i32 3
}

LLVM IR (-O2):
define i32 @jomp() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ Fish001();
int /*<<< orphan*/ Fish002();
int /*<<< orphan*/ Fish003();
int /*<<< orphan*/ Fish004();
int /*<<< orphan*/ Fish005();
int /*<<< orphan*/ Fish006();
int /*<<< orphan*/ Fish007();
int /*<<< orphan*/ Fish008();
int /*<<< orphan*/ Fish009();
void Fish_6(void) {
  Fish009();
  Fish006();
  Fish008();
  Fish001();
  Fish002();
  Fish007();
  Fish003();
  Fish004();
  Fish005();
}


x86 assembly (clang, -O0):
<Fish_6>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <Fish009@plt>
mov    $0x0,%al
call   1090 <Fish006@plt>
mov    $0x0,%al
call   10b0 <Fish008@plt>
mov    $0x0,%al
call   1050 <Fish001@plt>
mov    $0x0,%al
call   1080 <Fish002@plt>
mov    $0x0,%al
call   1060 <Fish007@plt>
mov    $0x0,%al
call   1040 <Fish003@plt>
mov    $0x0,%al
call   10a0 <Fish004@plt>
mov    $0x0,%al
call   1030 <Fish005@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fish_6>:
push   %rax
xor    %eax,%eax
call   1070 <Fish009@plt>
xor    %eax,%eax
call   1090 <Fish006@plt>
xor    %eax,%eax
call   10b0 <Fish008@plt>
xor    %eax,%eax
call   1050 <Fish001@plt>
xor    %eax,%eax
call   1080 <Fish002@plt>
xor    %eax,%eax
call   1060 <Fish007@plt>
xor    %eax,%eax
call   1040 <Fish003@plt>
xor    %eax,%eax
call   10a0 <Fish004@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <Fish005@plt>

LLVM IR (-O0):
define void @Fish_6() {
%1 = call i32 (...) @Fish009()
%2 = call i32 (...) @Fish006()
%3 = call i32 (...) @Fish008()
%4 = call i32 (...) @Fish001()
%5 = call i32 (...) @Fish002()
%6 = call i32 (...) @Fish007()
%7 = call i32 (...) @Fish003()
%8 = call i32 (...) @Fish004()
%9 = call i32 (...) @Fish005()
ret void
}

LLVM IR (-O2):
define void @Fish_6() {
%1 = tail call i32 (...) @Fish009()
%2 = tail call i32 (...) @Fish006()
%3 = tail call i32 (...) @Fish008()
%4 = tail call i32 (...) @Fish001()
%5 = tail call i32 (...) @Fish002()
%6 = tail call i32 (...) @Fish007()
%7 = tail call i32 (...) @Fish003()
%8 = tail call i32 (...) @Fish004()
%9 = tail call i32 (...) @Fish005()
ret void
}
void tdefault_check_pending_interrupt(struct target_ops *self) {}


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

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

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

LLVM IR (-O2):
%struct.target_ops = type opaque
define void @tdefault_check_pending_interrupt(%struct.target_ops* nocapture %0) {
ret void
}
void handle_IO(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_IO(i32 %0) {
ret void
}
int f3(void) {
  int v3i = 6, v3j = 7, v3k = 9;
#pragma omp parallel
  {
#pragma omp master
    v3i++;
#pragma omp single private(v3i) firstprivate(v3k)
    {
      int v3l = v3j + v3k;
      v3i = 8;
      v3k = 10;
      v3j = v3l + v3i;
    }
#pragma omp atomic
    v3k++;
  }
  return v3i + v3j;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
movl   $0x6,-0x4(%rbp)
movl   $0x7,-0x8(%rbp)
movl   $0x9,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x8,-0x4(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f3() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 6, i32* %1
store i32 7, i32* %2
store i32 9, i32* %3
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
store i32 %6, i32* %1
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
store i32 %9, i32* %4
store i32 8, i32* %1
store i32 10, i32* %3
%10 = load i32, i32* %4
%11 = load i32, i32* %1
%12 = add nsw i32 %10, %11
store i32 %12, i32* %2
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = add nsw i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @f3() {
ret i32 32
}
void foo267(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo267(i32 %0) {
ret void
}
int main() {
  int a = 6;
  for (a = 0; a < 6; ++a) {
  }
  if (!(a == 6)) {
  ERROR:
    goto ERROR;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    1136 <main+0x36>
jmp    1128 <main+0x28>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
cmpl   $0x6,-0x8(%rbp)
je     114a <main+0x4a>
jmp    1145 <main+0x45>
jmp    1145 <main+0x45>
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
__attribute__((always_)) void l1_cache_find_range(unsigned addr, unsigned size,
                                                  unsigned *cur_addr,
                                                  unsigned *end_addr) {
  const unsigned inc_addr = (((1 << (4)) - 1) + 1);
  unsigned addr_0 = addr + size;
  unsigned addr_1 = addr_0 & ~((1 << (4)) - 1);
  *cur_addr = addr & ~((1 << (4)) - 1);
  *end_addr = addr_1 + inc_addr;
  *end_addr += (addr_0 > addr_1) ? inc_addr : 0;
}


x86 assembly (clang, -O0):
<l1_cache_find_range>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x10,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
and    $0xfffffff0,%eax
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%ecx
and    $0xfffffff0,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%ecx
add    $0x10,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%edx
mov    -0x24(%rbp),%esi
xor    %ecx,%ecx
mov    $0x10,%eax
cmp    %esi,%edx
cmova  %eax,%ecx
mov    -0x18(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<l1_cache_find_range>:
add    %edi,%esi
mov    %esi,%r8d
and    $0xfffffff0,%r8d
and    $0xfffffff0,%edi
xor    %eax,%eax
cmp    %r8d,%esi
seta   %al
mov    %edi,(%rdx)
shl    $0x4,%eax
add    %r8d,%eax
add    $0x10,%eax
mov    %eax,(%rcx)
ret

LLVM IR (-O0):
define void @l1_cache_find_range(i32 %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
store i32 16, i32* %9
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = add i32 %12, %13
store i32 %14, i32* %10
%15 = load i32, i32* %10
%16 = and i32 %15, -16
store i32 %16, i32* %11
%17 = load i32, i32* %5
%18 = and i32 %17, -16
%19 = load i32*, i32** %7
store i32 %18, i32* %19
%20 = load i32, i32* %11
%21 = add i32 %20, 16
%22 = load i32*, i32** %8
store i32 %21, i32* %22
%23 = load i32, i32* %10
%24 = load i32, i32* %11
%25 = icmp ugt i32 %23, %24
%26 = zext i1 %25 to i64
%27 = select i1 %25, i32 16, i32 0
%28 = load i32*, i32** %8
%29 = load i32, i32* %28
%30 = add i32 %29, %27
store i32 %30, i32* %28
ret void
}

LLVM IR (-O2):
define void @l1_cache_find_range(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = add i32 %1, %0
%6 = and i32 %5, -16
%7 = and i32 %0, -16
store i32 %7, i32* %2
%8 = add i32 %6, 16
%9 = icmp ugt i32 %5, %6
%10 = select i1 %9, i32 16, i32 0
%11 = add i32 %8, %10
store i32 %11, i32* %3
ret void
}
/* Variables and functions */
short DDSLittleShort(short src) { return src; }


x86 assembly (clang, -O0):
<DDSLittleShort>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @DDSLittleShort(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
ret i16 %3
}

LLVM IR (-O2):
define signext i16 @DDSLittleShort(i16 returned signext %0) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int x, y;
  scanf("%d\n", &x);
  scanf("%d", &y);
  printf("%d", x + y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%esi
add    -0x8(%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   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
lea    0xec7(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
add    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%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* %1
%6 = load i32, i32* %2
%7 = add nsw i32 %5, %6
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, %7
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
unsigned char b_input_get_key(void) {
  unsigned char chr;
  asm volatile("call 0x00100030" : "=a"(chr));
  return chr;
}


x86 assembly (clang, -O0):
<b_input_get_key>:
push   %rbp
mov    %rsp,%rbp
call   100030 <completed.0+0xfc010>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_input_get_key>:
call   100030 <completed.0+0xfc010>
ret

LLVM IR (-O0):
define zeroext i8 @b_input_get_key() {
%1 = alloca i8
%2 = call i8 asm sideeffect "call 0x00100030", "={ax},~{dirflag},~{fpsr},~{flags}"()
store i8 %2, i8* %1
%3 = load i8, i8* %1
ret i8 %3
}

LLVM IR (-O2):
define zeroext i8 @b_input_get_key() {
%1 = tail call i8 asm sideeffect "call 0x00100030", "={ax},~{dirflag},~{fpsr},~{flags}"()
ret i8 %1
}
char GMUpper(char c) {
  char d;
  if ((c >= 'a') && (c <= 'z'))
    d = c & 0x5f;
  else
    d = c;
  return (d);
}


x86 assembly (clang, -O0):
<GMUpper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1133 <GMUpper+0x33>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     1133 <GMUpper+0x33>
movsbl -0x1(%rbp),%eax
and    $0x5f,%eax
mov    %al,-0x2(%rbp)
jmp    1139 <GMUpper+0x39>
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GMUpper>:
lea    -0x61(%rdi),%eax
mov    %edi,%ecx
and    $0x5f,%cl
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @GMUpper(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = and i32 %13, 95
%15 = trunc i32 %14 to i8
store i8 %15, i8* %3
br label %18
16: ; preds = %7, %1
%17 = load i8, i8* %2
store i8 %17, i8* %3
br label %18
18: ; preds = %16, %11
%19 = load i8, i8* %3
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @GMUpper(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = and i8 %0, 95
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
void startNotNull() {}


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

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

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

LLVM IR (-O2):
define void @startNotNull() {
ret void
}
void free_imatrix(int **m, int minx, int maxx, int miny, int maxy) {
  int i;
  int *p;
  m += minx;
  p = m[0] + miny;
  free(p);
  free(m);
}


x86 assembly (clang, -O0):
<free_imatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x14(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_imatrix>:
push   %rbx
movslq %esi,%rdx
lea    (%rdi,%rdx,8),%rbx
movslq %ecx,%rax
shl    $0x2,%rax
add    (%rdi,%rdx,8),%rax
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_imatrix(i32** %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32**
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
store i32** %0, i32*** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%13 = load i32, i32* %7
%14 = load i32**, i32*** %6
%15 = sext i32 %13 to i64
%16 = getelementptr inbounds i32*, i32** %14, i64 %15
store i32** %16, i32*** %6
%17 = load i32**, i32*** %6
%18 = getelementptr inbounds i32*, i32** %17, i64 0
%19 = load i32*, i32** %18
%20 = load i32, i32* %9
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %19, i64 %21
store i32* %22, i32** %12
%23 = load i32*, i32** %12
%24 = bitcast i32* %23 to i8*
%25 = load i32**, i32*** %6
%26 = bitcast i32** %25 to i8*
ret void
}

LLVM IR (-O2):
define void @free_imatrix(i32** nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i32*, i32** %0, i64 %6
%8 = load i32*, i32** %7
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds i32, i32* %8, i64 %9
%11 = bitcast i32* %10 to i8*
tail call void @free(i8* %11)
%12 = bitcast i32** %7 to i8*
tail call void @free(i8* %12)
ret void
}
/* Variables and functions */
int g(int);
f(int i) { return g(i) + 2; }


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

x86 assembly (clang, -O2):
<f>:
push   %rax
call   1030 <g@plt>
add    $0x2,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = tail call i32 @g(i32 %0)
%3 = add nsw i32 %2, 2
ret i32 %3
}