xunge/DecIR huggingface dataset:
void rop3_184_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D ^ T;
  stk2 = S & stk3;
  stk1 = T ^ stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


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

x86 assembly (clang, -O2):
<rop3_184_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_184_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
void print() { float j; }


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

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

LLVM IR (-O0):
define void @print() {
%1 = alloca float
ret void
}

LLVM IR (-O2):
define void @print() {
ret void
}
int mp_notify_viewers_func(const struct cmd_info *ci) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.cmd_info = type opaque
define i32 @mp_notify_viewers_func(%struct.cmd_info* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int getcns(int);
int cmd_gps_satellites(int argc, char **argv) { return getcns(0x0F1F); }


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

x86 assembly (clang, -O2):
<cmd_gps_satellites>:
mov    $0xf1f,%edi
jmp    1030 <getcns@plt>

LLVM IR (-O0):
define i32 @cmd_gps_satellites(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @getcns(i32 3871)
ret i32 %5
}

LLVM IR (-O2):
define i32 @cmd_gps_satellites(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @getcns(i32 3871)
ret i32 %3
}
void ff_hevc_put_hevc_qpel_v16_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_v16_10_avx2() {
ret void
}
int main() {
  int arg1 = 42;
  int inc = 0;
  __asm__("incl %%eax;" : "=a"(inc) : "a"(arg1));
  return inc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
inc    %eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 42, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 asm "incl %eax;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "incl %eax;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 42)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ output(char *);
void printFanStateInfo(const char *cmd) {
  (void)cmd;
  output("Fan status\t0\t1\tboolean\n");
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Fan status\090\091\09boolean\0A\00"
define void @printFanStateInfo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @output(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Fan status\090\091\09boolean\0A\00"
define void @printFanStateInfo(i8* nocapture readnone %0) {
%2 = tail call i32 @output(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int frame_2();
int frame_1(void) { return frame_2(); }


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

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

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

LLVM IR (-O2):
define i32 @frame_1() {
%1 = tail call i32 (...) @frame_2()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ raw();
int /*<<< orphan*/ stdscr;
void show_ncurs() {
  int row, col;
  initscr();
  raw();
  keypad(stdscr, true);
  noecho();
  getmaxyx(stdscr, row, col);
}


x86 assembly (clang, -O0):
<show_ncurs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <initscr@plt>
mov    $0x0,%al
call   1050 <raw@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1030 <keypad@plt>
mov    $0x0,%al
call   1070 <noecho@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1060 <getmaxyx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_ncurs>:
push   %rbx
xor    %eax,%eax
call   1040 <initscr@plt>
xor    %eax,%eax
call   1050 <raw@plt>
mov    0x2e82(%rip),%rbx
mov    (%rbx),%edi
mov    $0x1,%esi
call   1030 <keypad@plt>
xor    %eax,%eax
call   1070 <noecho@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1060 <getmaxyx@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define void @show_ncurs() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @initscr()
%4 = call i32 (...) @raw()
%5 = load i32, i32* @stdscr
%6 = call i32 @keypad(i32 %5, i32 1)
%7 = call i32 (...) @noecho()
%8 = load i32, i32* @stdscr
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = call i32 @getmaxyx(i32 %8, i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @show_ncurs() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @raw()
%3 = load i32, i32* @stdscr
%4 = tail call i32 @keypad(i32 %3, i32 1)
%5 = tail call i32 (...) @noecho()
%6 = load i32, i32* @stdscr
%7 = tail call i32 @getmaxyx(i32 %6, i32 undef, i32 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void address() { printf("14 Mystic St\nBedford, LA 03456-1234"); }


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"14 Mystic St\0ABedford, LA 03456-1234\00"
define void @address() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"14 Mystic St\0ABedford, LA 03456-1234\00"
define void @address() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}
void flip_short(void *w) {
  unsigned char *v = (unsigned char *)w;
  unsigned char x;
  x = v[0];
  v[0] = v[1];
  v[1] = x;
}


x86 assembly (clang, -O0):
<flip_short>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<flip_short>:
rolw   $0x8,(%rdi)
ret

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

LLVM IR (-O2):
define void @flip_short(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
store i8 %4, i8* %0
store i8 %2, i8* %3
ret void
}
/* Variables and functions */
void **malloc(int);
int main() {
  void **v = malloc(sizeof(*v));
  *v = NULL;
  v = malloc(sizeof(*v));
  if (v)
    *v = NULL;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115c <main+0x4c>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1030 <malloc@plt>
movq   $0x0,(%rax)
mov    $0x8,%edi
call   1030 <malloc@plt>
test   %rax,%rax
je     1138 <main+0x28>
movq   $0x0,(%rax)
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8** @malloc(i32 8)
store i8* null, i8** %1
%2 = tail call i8** @malloc(i32 8)
%3 = icmp eq i8** %2, null
br i1 %3, label %5, label %4
4: ; preds = %0
store i8* null, i8** %2
br label %5
5: ; preds = %4, %0
ret i32 0
}
int max_int(int a, int b) { return (((a) > (b)) ? (a) : (b)); }


x86 assembly (clang, -O0):
<max_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <max_int+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max_int+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @max_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @max_int(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void glcDeleteGLObjects() {}


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

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

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

LLVM IR (-O2):
define void @glcDeleteGLObjects() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foobar(int, int, int);
void testTortureExecute(void) { foobar(1, 2, 3); }


x86 assembly (clang, -O0):
<testTortureExecute>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <foobar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testTortureExecute>:
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
jmp    1030 <foobar@plt>

LLVM IR (-O0):
define void @testTortureExecute() {
%1 = call i32 @foobar(i32 1, i32 2, i32 3)
ret void
}

LLVM IR (-O2):
define void @testTortureExecute() {
%1 = tail call i32 @foobar(i32 1, i32 2, i32 3)
ret void
}
int foo(int a) { return __atomic_is_lock_free(2, a); }


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

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 1
}
/* Variables and functions */
int f();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Will overflow stack.\n");
  return f();
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Will overflow stack.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @f()
ret i32 %3
}

LLVM IR (-O2):
@str = [21 x i8] c"Will overflow stack.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @f()
ret i32 %2
}
int sys$ssvexc(struct _fab *fab, void *err, void *suc) {
  return ({
    unsigned long resultvar;
    register long int _a3 asm("rdx") = (long)(suc);
    register long int _a2 asm("rsi") = (long)(err);
    register long int _a1 asm("rdi") = (long)(fab);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x82\n\t"
                 : "=a"(resultvar)
                 : "i"(33), "r"(_a1), "r"(_a2), "r"(_a3)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$ssvexc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    $0x21,%rax
int    $0x82
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$ssvexc>:
mov    $0x21,%rax
int    $0x82
ret

LLVM IR (-O0):
%struct._fab = type opaque
define i32 @"sys$ssvexc"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = alloca %struct._fab*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store %struct._fab* %0, %struct._fab** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%12 = load i8*, i8** %6
%13 = ptrtoint i8* %12 to i64
store i64 %13, i64* %8
%14 = load i8*, i8** %5
%15 = ptrtoint i8* %14 to i64
store i64 %15, i64* %9
%16 = load %struct._fab*, %struct._fab** %4
%17 = ptrtoint %struct._fab* %16 to i64
store i64 %17, i64* %10
%18 = load i64, i64* %10
%19 = load i64, i64* %9
%20 = load i64, i64* %8
%21 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 33, i64 %18, i64 %19, i64 %20)
store i64 %21, i64* %7
%22 = load i64, i64* %7
store i64 %22, i64* %11
%23 = load i64, i64* %11
%24 = trunc i64 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
%struct._fab = type opaque
define i32 @"sys$ssvexc"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = ptrtoint i8* %2 to i64
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint %struct._fab* %0 to i64
%7 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 33, i64 %6, i64 %5, i64 %4)
%8 = trunc i64 %7 to i32
ret i32 %8
}
int __attribute__((target("sse4.2"))) redef(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @redef() {
ret i32 1
}
/* Variables and functions */
float floor(float x) {
  float rgv;
  if (x < 0)
    rgv = (int)x - 1;
  else
    rgv = (int)x;
  return rgv;
}


x86 assembly (clang, -O0):
<floor>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    112c <floor+0x2c>
cvttss2si -0x4(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    113a <floor+0x3a>
cvttss2si -0x4(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
cvttss2si %xmm0,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
ret

LLVM IR (-O0):
define float @floor(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fcmp olt float %4, 0.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load float, float* %2
%8 = fptosi float %7 to i32
%9 = sub nsw i32 %8, 1
%10 = sitofp i32 %9 to float
store float %10, float* %3
br label %15
11: ; preds = %1
%12 = load float, float* %2
%13 = fptosi float %12 to i32
%14 = sitofp i32 %13 to float
store float %14, float* %3
br label %15
15: ; preds = %11, %6
%16 = load float, float* %3
ret float %16
}

LLVM IR (-O2):
define float @floor(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fptosi float %0 to i32
%4 = sext i1 %2 to i32
%5 = add nsw i32 %4, %3
%6 = sitofp i32 %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_cdp(int, int, int, int, int, int);
void cdp() { __builtin_arm_cdp(1, 2, 3, 4, 5, 6); }


x86 assembly (clang, -O0):
<cdp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
call   1030 <__builtin_arm_cdp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdp>:
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
jmp    1030 <__builtin_arm_cdp@plt>

LLVM IR (-O0):
define void @cdp() {
%1 = call i32 @__builtin_arm_cdp(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6)
ret void
}

LLVM IR (-O2):
define void @cdp() {
%1 = tail call i32 @__builtin_arm_cdp(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hollowed17() { printf("YAKISOBA, SUSHI, PANDA!\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"YAKISOBA, SUSHI, PANDA!\0A\00"
define void @hollowed17() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"YAKISOBA, SUSHI, PANDA!\00"
define void @hollowed17() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
void StopSoundEffect(int param) {}


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

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

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

LLVM IR (-O2):
define void @StopSoundEffect(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage(void) {
  fprintf(stderr, "usage : squashfs-info <squashfs_img|device>\n"
                  "Options:\n"
                  "\t-v\tversion\n"
                  "\t-h\tprint this help message\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [94 x i8] c"usage : squashfs-info <squashfs_img|device>\0AOptions:\0A\09-v\09version\0A\09-h\09print this help message\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [94 x i8] c"usage : squashfs-info <squashfs_img|device>\0AOptions:\0A\09-v\09version\0A\09-h\09print this help message\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void dump_glxinfo(void) { system("glxinfo -v 2> /dev/null > glxinfo.txt"); }


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"glxinfo -v 2> /dev/null > glxinfo.txt\00"
define void @dump_glxinfo() {
%1 = call i32 @system(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"glxinfo -v 2> /dev/null > glxinfo.txt\00"
define void @dump_glxinfo() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PUT32(int, int);
int /*<<< orphan*/ i2c_start();
int /*<<< orphan*/ i2c_stop();
scalar_t__ i2c_write_byte(unsigned int);
void send_data(unsigned int data) {
  PUT32(0x2020001C, 1 << 25);
  i2c_start();
  if (i2c_write_byte(0x78)) {
  }
  if (i2c_write_byte(0x40)) {
  }
  if (i2c_write_byte(data)) {
  }
  i2c_stop();
}


x86 assembly (clang, -O0):
<send_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2020001c,%edi
mov    $0x2000000,%esi
call   1030 <PUT32@plt>
mov    $0x0,%al
call   1050 <i2c_start@plt>
mov    $0x78,%edi
call   1060 <i2c_write_byte@plt>
cmp    $0x0,%rax
je     117a <send_data+0x3a>
jmp    117a <send_data+0x3a>
mov    $0x40,%edi
call   1060 <i2c_write_byte@plt>
cmp    $0x0,%rax
je     1193 <send_data+0x53>
jmp    1193 <send_data+0x53>
mov    -0x4(%rbp),%edi
call   1060 <i2c_write_byte@plt>
cmp    $0x0,%rax
je     11aa <send_data+0x6a>
jmp    11aa <send_data+0x6a>
mov    $0x0,%al
call   1040 <i2c_stop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_data>:
push   %rbx
mov    %edi,%ebx
mov    $0x2020001c,%edi
mov    $0x2000000,%esi
call   1030 <PUT32@plt>
xor    %eax,%eax
call   1050 <i2c_start@plt>
mov    $0x78,%edi
call   1060 <i2c_write_byte@plt>
mov    $0x40,%edi
call   1060 <i2c_write_byte@plt>
mov    %ebx,%edi
call   1060 <i2c_write_byte@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <i2c_stop@plt>

LLVM IR (-O0):
define void @send_data(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @PUT32(i32 538968092, i32 33554432)
%4 = call i32 (...) @i2c_start()
%5 = call i64 @i2c_write_byte(i32 120)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %1
%9 = call i64 @i2c_write_byte(i32 64)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8
br label %12
12: ; preds = %11, %8
%13 = load i32, i32* %2
%14 = call i64 @i2c_write_byte(i32 %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
br label %17
17: ; preds = %16, %12
%18 = call i32 (...) @i2c_stop()
ret void
}

LLVM IR (-O2):
define void @send_data(i32 %0) {
%2 = tail call i32 @PUT32(i32 538968092, i32 33554432)
%3 = tail call i32 (...) @i2c_start()
%4 = tail call i64 @i2c_write_byte(i32 120)
%5 = tail call i64 @i2c_write_byte(i32 64)
%6 = tail call i64 @i2c_write_byte(i32 %0)
%7 = tail call i32 (...) @i2c_stop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outstr(char *);
void outstackreg() { outstr("S"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"S\00"
define void @outstackreg() {
%1 = tail call i32 @outstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
icount(i) int i;
{ return (i + 1); }


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

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

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

LLVM IR (-O2):
define i32 @icount(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ check_bar();
int /*<<< orphan*/ check_foo();
int /*<<< orphan*/ printf(char *);
int main(void) {
  check_foo();
  check_bar();
  printf("OK\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"OK\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @check_foo()
%3 = call i32 (...) @check_bar()
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [3 x i8] c"OK\00"
define i32 @main() {
%1 = tail call i32 (...) @check_foo()
%2 = tail call i32 (...) @check_bar()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ sig_unblock(int /*<<< orphan*/);
extern void sig_quit_unblock(void) { sig_unblock(SIGQUIT); }


x86 assembly (clang, -O0):
<sig_quit_unblock>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <sig_unblock@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_quit_unblock>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sig_unblock@plt>

LLVM IR (-O0):
@SIGQUIT = global i32 0
define void @sig_quit_unblock() {
%1 = load i32, i32* @SIGQUIT
%2 = call i32 @sig_unblock(i32 %1)
ret void
}

LLVM IR (-O2):
@SIGQUIT = global i32 0
define void @sig_quit_unblock() {
%1 = load i32, i32* @SIGQUIT
%2 = tail call i32 @sig_unblock(i32 %1)
ret void
}
void clnttcp_abort() {}


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

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

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

LLVM IR (-O2):
define void @clnttcp_abort() {
ret void
}
void SetScratchWindowTitle(char *title) {}


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

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

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

LLVM IR (-O2):
define void @SetScratchWindowTitle(i8* nocapture %0) {
ret void
}
void print$Int(char *label, int i, int shouldBe) {
  printf("%s: decimal %d, octal 0%o, hex 0x%X, shouldBe %d (decimal)\n", label,
         i, i, i, shouldBe);
  if (i != shouldBe) {
    printf("this is wrong\n");
    exit(2);
  }
}


x86 assembly (clang, -O0):
<print$Int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x10(%rbp),%r9d
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1176 <print$Int+0x56>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print$Int>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%rsi
lea    0xebf(%rip),%rdi
mov    %ebp,%edx
mov    %ebp,%ecx
mov    %ebp,%r8d
mov    %ebx,%r9d
xor    %eax,%eax
call   1040 <printf@plt>
cmp    %ebx,%ebp
jne    115d <print$Int+0x2d>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"%s: decimal %d, octal 0%o, hex 0x%X, shouldBe %d (decimal)\0A\00"
@.str.1 = [15 x i8] c"this is wrong\0A\00"
define void @"print$Int"(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i32 %9, i32 %10, i32 %11)
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = icmp ne i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %3
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
unreachable
18: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [60 x i8] c"%s: decimal %d, octal 0%o, hex 0x%X, shouldBe %d (decimal)\0A\00"
@str = [14 x i8] c"this is wrong\00"
define void @"print$Int"(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i32 %1, i32 %1, i32 %2)
%5 = icmp eq i32 %1, %2
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
tail call void @exit(i32 2)
unreachable
8: ; preds = %3
ret void
}
/* Variables and functions */
int getHeight();
int getWidth();
int belowX(int x) {
  int b = x + getWidth(), min = 0, max = getWidth() * getHeight() - 1;
  return (x >= min && x <= max) ? (b) : (-1);
}


x86 assembly (clang, -O0):
<belowX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <getWidth@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getWidth@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <getHeight@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     118b <belowX+0x6b>
mov    -0x4(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     118b <belowX+0x6b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1198 <belowX+0x78>
mov    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1198 <belowX+0x78>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<belowX>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <getWidth@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <getWidth@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1040 <getHeight@plt>
imul   %r14d,%eax
add    %ebx,%ebp
cmp    %ebx,%eax
mov    $0xffffffff,%eax
cmovle %eax,%ebp
test   %ebx,%ebx
cmovs  %eax,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @belowX(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = call i32 (...) @getWidth()
%8 = add nsw i32 %6, %7
store i32 %8, i32* %3
store i32 0, i32* %4
%9 = call i32 (...) @getWidth()
%10 = call i32 (...) @getHeight()
%11 = mul nsw i32 %9, %10
%12 = sub nsw i32 %11, 1
store i32 %12, i32* %5
%13 = load i32, i32* %2
%14 = load i32, i32* %4
%15 = icmp sge i32 %13, %14
br i1 %15, label %16, label %22
16: ; preds = %1
%17 = load i32, i32* %2
%18 = load i32, i32* %5
%19 = icmp sle i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = load i32, i32* %3
br label %23
22: ; preds = %16, %1
br label %23
23: ; preds = %22, %20
%24 = phi i32 [ %21, %20 ], [ -1, %22 ]
ret i32 %24
}

LLVM IR (-O2):
define i32 @belowX(i32 %0) {
%2 = tail call i32 (...) @getWidth()
%3 = tail call i32 (...) @getWidth()
%4 = tail call i32 (...) @getHeight()
%5 = icmp sgt i32 %0, -1
%6 = mul nsw i32 %4, %3
%7 = add nsw i32 %2, %0
%8 = icmp sgt i32 %6, %0
%9 = select i1 %5, i1 %8, i1 false
%10 = select i1 %9, i32 %7, i32 -1
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_secp256k1_to_bytes(uintptr_t, uintptr_t);
void fiat_secp256k1_to_bytes(uint8_t out1[32], const uint64_t arg1[4]) {
  internal_fiat_secp256k1_to_bytes((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_secp256k1_to_bytes>:
jmp    1030 <internal_fiat_secp256k1_to_bytes@plt>

LLVM IR (-O0):
define void @fiat_secp256k1_to_bytes(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_secp256k1_to_bytes(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_secp256k1_to_bytes(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_secp256k1_to_bytes(i64 %3, i64 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
int RIFF_ReadInt32(FILE *fd) {
  int i;
  i = fgetc(fd);
  i += fgetc(fd) << 8;
  i += fgetc(fd) << 16;
  i += fgetc(fd) << 24;
  return (i);
}


x86 assembly (clang, -O0):
<RIFF_ReadInt32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
shl    $0x8,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
shl    $0x10,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
shl    $0x18,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RIFF_ReadInt32>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
call   1030 <fgetc@plt>
mov    %eax,%r14d
mov    %r15,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
add    %r14d,%ebp
mov    %r15,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebx
shl    $0x10,%ebx
add    %ebp,%ebx
mov    %r15,%rdi
call   1030 <fgetc@plt>
shl    $0x18,%eax
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @RIFF_ReadInt32(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fgetc(i32* %4)
store i32 %5, i32* %3
%6 = load i32*, i32** %2
%7 = call i32 @fgetc(i32* %6)
%8 = shl i32 %7, 8
%9 = load i32, i32* %3
%10 = add nsw i32 %9, %8
store i32 %10, i32* %3
%11 = load i32*, i32** %2
%12 = call i32 @fgetc(i32* %11)
%13 = shl i32 %12, 16
%14 = load i32, i32* %3
%15 = add nsw i32 %14, %13
store i32 %15, i32* %3
%16 = load i32*, i32** %2
%17 = call i32 @fgetc(i32* %16)
%18 = shl i32 %17, 24
%19 = load i32, i32* %3
%20 = add nsw i32 %19, %18
store i32 %20, i32* %3
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @RIFF_ReadInt32(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = tail call i32 @fgetc(i32* %0)
%4 = shl i32 %3, 8
%5 = add nsw i32 %4, %2
%6 = tail call i32 @fgetc(i32* %0)
%7 = shl i32 %6, 16
%8 = add nsw i32 %5, %7
%9 = tail call i32 @fgetc(i32* %0)
%10 = shl i32 %9, 24
%11 = add nsw i32 %8, %10
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ tfputc(unsigned char, int /*<<< orphan*/ *);
void tfputs(char *string, FILE *file) {
  while (*string) {
    tfputc((unsigned char)*string, file);
    string++;
  }
}


x86 assembly (clang, -O0):
<tfputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1150 <tfputs+0x40>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <tfputc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <tfputs+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tfputs>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1146 <tfputs+0x36>
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl %al,%edi
mov    %r14,%rsi
call   1030 <tfputc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <tfputs+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @tfputs(i8* nocapture %0, i32* %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %10, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = tail call i32 @tfputc(i8 zeroext %6, i32* %1)
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
long expAvg(long value, long reading) {
  return (36 * reading + 220 * value) / 256;
}


x86 assembly (clang, -O0):
<expAvg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
imul   $0x24,-0x10(%rbp),%rax
imul   $0xdc,-0x8(%rbp),%rcx
add    %rcx,%rax
mov    $0x100,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<expAvg>:
lea    (%rsi,%rsi,8),%rax
imul   $0xdc,%rdi,%rcx
lea    (%rcx,%rax,4),%rdx
lea    (%rcx,%rax,4),%rax
add    $0xff,%rax
test   %rdx,%rdx
cmovns %rdx,%rax
sar    $0x8,%rax
ret

LLVM IR (-O0):
define i64 @expAvg(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = mul nsw i64 36, %5
%7 = load i64, i64* %3
%8 = mul nsw i64 220, %7
%9 = add nsw i64 %6, %8
%10 = sdiv i64 %9, 256
ret i64 %10
}

LLVM IR (-O2):
define i64 @expAvg(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, 36
%4 = mul nsw i64 %0, 220
%5 = add nsw i64 %3, %4
%6 = sdiv i64 %5, 256
ret i64 %6
}
void ftdf_set_link_quality_mode(void) {}


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

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

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

LLVM IR (-O2):
define void @ftdf_set_link_quality_mode() {
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
__attribute__((__unused__)) bool exists(const char *pathname) {
  struct stat buf;
  return (stat(pathname, &buf) == 0);
}


x86 assembly (clang, -O0):
<exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ c(char *);
int /*<<< orphan*/ mark_forward();
void Ahead() {
  c("branch");
  mark_forward();
}


x86 assembly (clang, -O0):
<Ahead>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <c@plt>
mov    $0x0,%al
call   1040 <mark_forward@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ahead>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <c@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <mark_forward@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"branch\00"
define void @Ahead() {
%1 = call i32 @c(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @mark_forward()
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"branch\00"
define void @Ahead() {
%1 = tail call i32 @c(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @mark_forward()
ret void
}
void FP_prune_alias_exp_Ok(int x) {
  int a[1];
  if (x + 1 != 1 + x) {
    a[1] = 0;
  }
}


x86 assembly (clang, -O0):
<FP_prune_alias_exp_Ok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
je     1122 <FP_prune_alias_exp_Ok+0x22>
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @FP_prune_alias_exp_Ok(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
%6 = load i32, i32* %2
%7 = add nsw i32 1, %6
%8 = icmp ne i32 %5, %7
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 1
store i32 0, i32* %10
br label %11
11: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
define void @FP_prune_alias_exp_Ok(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ notYet(char *);
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basFormat() {
  notYet("Format");
  pushNumber(0);
}


x86 assembly (clang, -O0):
<basFormat>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <notYet@plt>
xor    %edi,%edi
call   1040 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basFormat>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <notYet@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Format\00"
define void @basFormat() {
%1 = call i32 @notYet(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @pushNumber(i32 0)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Format\00"
define void @basFormat() {
%1 = tail call i32 @notYet(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @pushNumber(i32 0)
ret void
}