xunge/DecIR huggingface dataset:
void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued) {}


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

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

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

LLVM IR (-O2):
%struct.rq = type opaque
%struct.task_struct = type opaque
define void @task_tick_stop(%struct.rq* nocapture %0, %struct.task_struct* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int f299(int *);
int f300(int *p) { return f299(p); }


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

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

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

LLVM IR (-O2):
define i32 @f300(i32* %0) {
%2 = tail call i32 @f299(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int doPreProcess(void) {
  printf("PreProcess running.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"PreProcess running.\0A\00"
define i32 @doPreProcess() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"PreProcess running.\00"
define i32 @doPreProcess() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int pulldown_source(int action, int bottom_field) {
  if (action == (1 << 1) || action == (1 << 2)) {
    return bottom_field;
  } else {
    return !bottom_field;
  }
}


x86 assembly (clang, -O0):
<pulldown_source>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     111e <pulldown_source+0x1e>
cmpl   $0x4,-0x8(%rbp)
jne    1129 <pulldown_source+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113a <pulldown_source+0x3a>
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pulldown_source>:
mov    %esi,%eax
cmp    $0x2,%edi
je     110c <pulldown_source+0xc>
cmp    $0x4,%edi
jne    110d <pulldown_source+0xd>
ret
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @pulldown_source(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 2
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 4
br i1 %10, label %11, label %13
11: ; preds = %8, %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %18
13: ; preds = %8
%14 = load i32, i32* %5
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
store i32 %17, i32* %3
br label %18
18: ; preds = %13, %11
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @pulldown_source(i32 %0, i32 %1) {
switch i32 %0, label %3 [
i32 4, label %6
i32 2, label %6
]
3: ; preds = %2
%4 = icmp eq i32 %1, 0
%5 = zext i1 %4 to i32
br label %6
6: ; preds = %2, %2, %3
%7 = phi i32 [ %5, %3 ], [ %1, %2 ], [ %1, %2 ]
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ XNextEvent(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *XOpenDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  Display *d;
  d = XOpenDisplay(NULL);
  if (!d) {
    printf("Can't open display\n");
    exit(1);
  }
  while (1) {
    XEvent ev;
    XNextEvent(d, &ev);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <XOpenDisplay@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1184 <main+0x44>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
jmp    1189 <main+0x49>
mov    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1050 <XNextEvent@plt>
jmp    1189 <main+0x49>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %edi,%edi
call   1040 <XOpenDisplay@plt>
test   %rax,%rax
je     116d <main+0x2d>
mov    %rax,%rbx
lea    0x4(%rsp),%r14
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <XNextEvent@plt>
jmp    1160 <main+0x20>
lea    0xe8c(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Can't open display\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32* @XOpenDisplay(i32* null)
store i32* %8, i32** %6
%9 = load i32*, i32** %6
%10 = icmp ne i32* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %2
br label %15
15: ; preds = %14, %15
%16 = load i32*, i32** %6
%17 = call i32 @XNextEvent(i32* %16, i32* %7)
br label %15
}

LLVM IR (-O2):
@str = [19 x i8] c"Can't open display\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = tail call i32* @XOpenDisplay(i32* null)
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = bitcast i32* %3 to i8*
br label %11
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %6, %11
%12 = call i32 @XNextEvent(i32* %4, i32* %3)
br label %11
}
void ff_hevc_put_hevc_epel_v12_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_v12_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void b(void) { printf(" World!\n"); }


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c" World!\00"
define void @b() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
scalar_t__ using_valgrind();
void valgrind_assert_failed(const char *file, int line) {
  printf("valgrind_assert(): failed: %s:%d\n", file, line);
  if (using_valgrind()) {
    printf("valgrind_assert(): inducing memory fault...\n");
    puts((char *)1);
  }
  abort();
}


x86 assembly (clang, -O0):
<valgrind_assert_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <using_valgrind@plt>
cmp    $0x0,%rax
je     118d <valgrind_assert_failed+0x4d>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   1040 <puts@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<valgrind_assert_failed>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xeb3(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <using_valgrind@plt>
test   %rax,%rax
je     1176 <valgrind_assert_failed+0x36>
lea    0xebb(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"valgrind_assert(): failed: %s:%d\0A\00"
@.str.1 = [45 x i8] c"valgrind_assert(): inducing memory fault...\0A\00"
define void @valgrind_assert_failed(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = call i64 (...) @using_valgrind()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @puts(i8* inttoptr (i64 1 to i8*))
br label %13
13: ; preds = %10, %2
%14 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [34 x i8] c"valgrind_assert(): failed: %s:%d\0A\00"
@str = [44 x i8] c"valgrind_assert(): inducing memory fault...\00"
define void @valgrind_assert_failed(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%4 = tail call i64 (...) @using_valgrind()
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* inttoptr (i64 1 to i8*))
br label %9
9: ; preds = %6, %2
%10 = tail call i32 (...) @abort()
unreachable
}
void wifi_unlock() {}


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

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

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

LLVM IR (-O2):
define void @wifi_unlock() {
ret void
}
/* Variables and functions */
int better_sleep(double);
int main() { return better_sleep(9.034); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
call   1030 <better_sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <better_sleep@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @better_sleep(double 9.034000e+00)
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @better_sleep(double 9.034000e+00)
ret i32 %1
}
/* Variables and functions */
int power(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a;
  for (a = 0; a <= 2010; a += 1)
    ;
  { printf("%d", power(a, 2)); }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x7da,-0x8(%rbp)
jg     1156 <main+0x36>
jmp    1148 <main+0x28>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1030 <power@plt>
mov    %eax,%esi
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 2010
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 = call i32 @power(i32 %11, i32 2)
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @power(i32 2011, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int f2(void) {
  int x = 3;
  for (;;) {
    x++;
    if (x == 12) {
      return 12;
    }
  }
  x = 12;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0xc,-0x4(%rbp)
jne    1125 <f2+0x25>
mov    $0xc,%eax
pop    %rbp
ret
jmp    110b <f2+0xb>

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

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

LLVM IR (-O2):
define i32 @f2() {
ret i32 12
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int /*<<< orphan*/ addch(char);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ refresh();
void rxWriteConsole(int32_t c) {
  if (c >= 0) {
    addch((char)c);
  } else {
    clear();
  }
  refresh();
}


x86 assembly (clang, -O0):
<rxWriteConsole>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jl     1158 <rxWriteConsole+0x28>
mov    -0x8(%rbp),%rax
movsbl %al,%edi
call   1030 <addch@plt>
jmp    115f <rxWriteConsole+0x2f>
mov    $0x0,%al
call   1050 <clear@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rxWriteConsole>:
push   %rax
test   %rdi,%rdi
js     1141 <rxWriteConsole+0x11>
movsbl %dil,%edi
call   1030 <addch@plt>
jmp    1148 <rxWriteConsole+0x18>
xor    %eax,%eax
call   1050 <clear@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <refresh@plt>

LLVM IR (-O0):
define void @rxWriteConsole(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sge i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = trunc i64 %6 to i8
%8 = call i32 @addch(i8 signext %7)
br label %11
9: ; preds = %1
%10 = call i32 (...) @clear()
br label %11
11: ; preds = %9, %5
%12 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
define void @rxWriteConsole(i64 %0) {
%2 = icmp sgt i64 %0, -1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = trunc i64 %0 to i8
%5 = tail call i32 @addch(i8 signext %4)
br label %8
6: ; preds = %1
%7 = tail call i32 (...) @clear()
br label %8
8: ; preds = %6, %3
%9 = tail call i32 (...) @refresh()
ret void
}
const char *get_lame_version(void) {
  static const char *const str = "3"
                                 "."
                                 "98"
                                 "."
                                 "2";
  return str;
}


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

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

LLVM IR (-O0):
@get_lame_version.str = internal constant i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0)
@.str = [7 x i8] c"3.98.2\00"
define i8* @get_lame_version() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"3.98.2\00"
define i8* @get_lame_version() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
int f_ble_rm2(float a1, float *a2) { return !(__builtin_islessequal(a1, *a2)); }


x86 assembly (clang, -O0):
<f_ble_rm2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_ble_rm2>:
movss  (%rdi),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setb   %al
ret

LLVM IR (-O0):
define i32 @f_ble_rm2(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
store float %0, float* %3
store float* %1, float** %4
%5 = load float, float* %3
%6 = load float*, float** %4
%7 = load float, float* %6
%8 = fcmp ole float %5, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @f_ble_rm2(float %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = fcmp ult float %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
char *strcpy1(char *s1, const char *s2) {
  char *result = s1;
  while (*s2 != '\0')
    *s1++ = *s2++;
  *s1 = '\0';
  return result;
}


x86 assembly (clang, -O0):
<strcpy1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114b <strcpy1+0x4b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1114 <strcpy1+0x14>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy1>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %rdi,%rdx
test   %cl,%cl
je     1131 <strcpy1+0x31>
add    $0x1,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %cl,(%rdx)
add    $0x1,%rdx
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <strcpy1+0x20>
movb   $0x0,(%rdx)
ret

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

LLVM IR (-O2):
define i8* @strcpy1(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %7
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: [ −AacdFfhiklnqRrSstuw1x] [file . . .]\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [49 x i8] c"Usage: [ \E2\88\92AacdFfhiklnqRrSstuw1x] [file . . .]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [49 x i8] c"Usage: [ \E2\88\92AacdFfhiklnqRrSstuw1x] [file . . .]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void foo682() {}


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

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

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

LLVM IR (-O2):
define void @foo682() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Com_Printf(char *);
int /*<<< orphan*/ Cvar_InfoString(int);
int /*<<< orphan*/ Info_Print(int /*<<< orphan*/);
void SV_Serverinfo_f(void) {
  Com_Printf("Server info settings:\n");
  Info_Print(Cvar_InfoString(4 | 8192));
}


x86 assembly (clang, -O0):
<SV_Serverinfo_f>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <Com_Printf@plt>
mov    $0x2004,%edi
call   1030 <Cvar_InfoString@plt>
mov    %eax,%edi
call   1050 <Info_Print@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SV_Serverinfo_f>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <Com_Printf@plt>
mov    $0x2004,%edi
call   1030 <Cvar_InfoString@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <Info_Print@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Server info settings:\0A\00"
define void @SV_Serverinfo_f() {
%1 = call i32 @Com_Printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @Cvar_InfoString(i32 8196)
%3 = call i32 @Info_Print(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Server info settings:\0A\00"
define void @SV_Serverinfo_f() {
%1 = tail call i32 @Com_Printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @Cvar_InfoString(i32 8196)
%3 = tail call i32 @Info_Print(i32 %2)
ret void
}
/* Variables and functions */
unsigned int completeNonBlockingBatch(void *, unsigned int);
unsigned int complete(void *rulesBinding, unsigned int replyCount) {
  return completeNonBlockingBatch(rulesBinding, replyCount);
}


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

x86 assembly (clang, -O2):
<complete>:
jmp    1030 <completeNonBlockingBatch@plt>

LLVM IR (-O0):
define i32 @complete(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @completeNonBlockingBatch(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @complete(i8* %0, i32 %1) {
%3 = tail call i32 @completeNonBlockingBatch(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ isalpha(int);
scalar_t__ isupper(int);
int tolower(int c) {
  if (isalpha(c) && isupper(c))
    return (c + 32);
  return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
je     115d <tolower+0x3d>
mov    -0x8(%rbp),%edi
call   1040 <isupper@plt>
cmp    $0x0,%rax
je     115d <tolower+0x3d>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <tolower+0x43>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalpha@plt>
test   %rax,%rax
je     113f <tolower+0x1f>
mov    %ebx,%edi
call   1040 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isalpha(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i64 @isupper(i32 %0)
%6 = icmp eq i64 %5, 0
%7 = add nsw i32 %0, 32
%8 = select i1 %6, i32 %0, i32 %7
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ %0, %1 ], [ %8, %4 ]
ret i32 %10
}
void ptrace_sandbox_permit_bind(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

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

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_bind(%struct.pt_sandbox* nocapture %0) {
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *memcpy(void *, void const *, size_t);
void *mdup(const void *src, size_t n) {
  if (n == 0) {
    return NULL;
  }
  void *dst = malloc(n);
  if (dst == NULL) {
    return NULL;
  }
  return memcpy(dst, src, n);
}


x86 assembly (clang, -O0):
<mdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1148 <mdup+0x28>
movq   $0x0,-0x8(%rbp)
jmp    118a <mdup+0x6a>
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    116d <mdup+0x4d>
movq   $0x0,-0x8(%rbp)
jmp    118a <mdup+0x6a>
mov    -0x20(%rbp),%rdi
mov    %rdi,-0x28(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdup>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1150 <mdup+0x30>
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <malloc@plt>
test   %rax,%rax
je     1150 <mdup+0x30>
mov    %rax,%r14
mov    %rax,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
jmp    1153 <mdup+0x33>
xor    %r14d,%r14d
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @mdup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i64, i64* %5
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i8* null, i8** %3
br label %20
10: ; preds = %2
%11 = load i64, i64* %5
%12 = call i8* @malloc(i64 %11)
store i8* %12, i8** %6
%13 = load i8*, i8** %6
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %16
15: ; preds = %10
store i8* null, i8** %3
br label %20
16: ; preds = %10
%17 = load i8*, i8** %6
%18 = load i8*, i8** %4
%19 = load i64, i64* %5
store i8* %17, i8** %3
br label %20
20: ; preds = %16, %15, %9
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
define noalias i8* @mdup(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i8* @malloc(i64 %1)
%6 = icmp eq i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %4
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 %0, i64 %1, i1 false)
br label %8
8: ; preds = %7, %4, %2
%9 = phi i8* [ null, %2 ], [ %5, %7 ], [ null, %4 ]
ret i8* %9
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rand31_r(uint32_t *seedp) {
  uint32_t hi, lo;
  lo = 16807 * (*seedp & 0xffff);
  hi = 16807 * (*seedp >> 16);
  lo += (hi & 0x7fff) << 16;
  lo += hi >> 15;
  if (lo > 0x7fffffff)
    lo -= 0x7fffffff;
  return (*seedp = lo);
}


x86 assembly (clang, -O0):
<rand31_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xffff,%eax
imul   $0x41a7,%eax,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sar    $0x10,%eax
imul   $0x41a7,%eax,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x7fff,%eax
shl    $0x10,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sar    $0xf,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x7fffffff,-0x10(%rbp)
jle    1163 <rand31_r+0x63>
mov    -0x10(%rbp),%eax
sub    $0x7fffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %eax,(%rcx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand31_r>:
mov    (%rdi),%ecx
movzwl %cx,%eax
imul   $0x41a7,%eax,%edx
sar    $0x10,%ecx
imul   $0x41a7,%ecx,%eax
imul   $0x41a70000,%ecx,%ecx
and    $0x7fff0000,%ecx
add    %edx,%ecx
sar    $0xf,%eax
add    %ecx,%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define i32 @rand31_r(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 65535
%4 = mul nuw nsw i32 %3, 16807
%5 = ashr i32 %2, 16
%6 = mul nsw i32 %5, 16807
%7 = mul i32 %5, 1101463552
%8 = and i32 %7, 2147418112
%9 = add nuw nsw i32 %8, %4
%10 = ashr i32 %6, 15
%11 = add nsw i32 %9, %10
store i32 %11, i32* %0
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char c;
  scanf("%c", &c);
  printf("%c:%i\n", c, c);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [7 x i8] c"%c:%i\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8 signext %3, i8 signext %3)
ret i32 0
}
/* Type definitions */
struct udev_queue {
  int dummy;
};

/* Variables and functions */
int udev_queue_get_queue_is_empty(struct udev_queue *);
__attribute__((visibility("default"))) int
udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue,
                                  unsigned long long int seqnum) {
  return udev_queue_get_queue_is_empty(udev_queue);
}


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

x86 assembly (clang, -O2):
<udev_queue_get_seqnum_is_finished>:
jmp    1030 <udev_queue_get_queue_is_empty@plt>

LLVM IR (-O0):
%struct.udev_queue = type { i32 }
define i32 @udev_queue_get_seqnum_is_finished(%struct.udev_queue* %0, i64 %1) {
%3 = alloca %struct.udev_queue*
%4 = alloca i64
store %struct.udev_queue* %0, %struct.udev_queue** %3
store i64 %1, i64* %4
%5 = load %struct.udev_queue*, %struct.udev_queue** %3
%6 = call i32 @udev_queue_get_queue_is_empty(%struct.udev_queue* %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.udev_queue = type { i32 }
define i32 @udev_queue_get_seqnum_is_finished(%struct.udev_queue* %0, i64 %1) {
%3 = tail call i32 @udev_queue_get_queue_is_empty(%struct.udev_queue* %0)
ret i32 %3
}
/* Variables and functions */
int printf(char *, int, unsigned char, unsigned char);
int unsigned_char(void) {
  unsigned char a = 0xE8u;
  char b = 2;
  return printf("%lu, %d, %d\n", sizeof(a << b), a << b, a >> b);
}


x86 assembly (clang, -O0):
<unsigned_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0xe8,-0x1(%rbp)
movb   $0x2,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
shl    %cl,%eax
mov    %al,-0x3(%rbp)
movzbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
sar    %cl,%eax
mov    -0x3(%rbp),%cl
lea    0xebf(%rip),%rdi
mov    $0x4,%esi
movzbl %cl,%edx
movzbl %al,%ecx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_char>:
lea    0xee9(%rip),%rdi
mov    $0x4,%esi
mov    $0xa0,%edx
mov    $0x3a,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%lu, %d, %d\0A\00"
define i32 @unsigned_char() {
%1 = alloca i8
%2 = alloca i8
store i8 -24, i8* %1
store i8 2, i8* %2
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = shl i32 %4, %6
%8 = trunc i32 %7 to i8
%9 = load i8, i8* %1
%10 = zext i8 %9 to i32
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = ashr i32 %10, %12
%14 = trunc i32 %13 to i8
%15 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 4, i8 zeroext %8, i8 zeroext %14)
ret i32 %15
}

LLVM IR (-O2):
@.str = [13 x i8] c"%lu, %d, %d\0A\00"
define i32 @unsigned_char() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 4, i8 zeroext -96, i8 zeroext 58)
ret i32 %1
}
void i2d_ASN1_UNIVERSALSTRING(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_ASN1_UNIVERSALSTRING() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void msim_printHasira() { printf("+"); }


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

x86 assembly (clang, -O2):
<msim_printHasira>:
mov    $0x2b,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @msim_printHasira() {
%1 = tail call i32 @putchar(i32 43)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int airStrcmp(const char *s1, const char *s2) {
  int ret;
  if (!(s1 && s2)) {
    ret = !!s1 - !!s2;
  } else {
    ret = strcmp(s1, s2);
  }
  return ret;
}


x86 assembly (clang, -O0):
<airStrcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1136 <airStrcmp+0x26>
cmpq   $0x0,-0x10(%rbp)
jne    1165 <airStrcmp+0x55>
cmpq   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmpq   $0x0,-0x10(%rbp)
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    1175 <airStrcmp+0x65>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<airStrcmp>:
test   %rdi,%rdi
je     111f <airStrcmp+0xf>
test   %rsi,%rsi
je     111f <airStrcmp+0xf>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
cmp    $0x1,%rsi
adc    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @airStrcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %23, label %11
11: ; preds = %8, %2
%12 = load i8*, i8** %3
%13 = icmp ne i8* %12, null
%14 = xor i1 %13, true
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
%17 = load i8*, i8** %4
%18 = icmp ne i8* %17, null
%19 = xor i1 %18, true
%20 = xor i1 %19, true
%21 = zext i1 %20 to i32
%22 = sub nsw i32 %16, %21
store i32 %22, i32* %5
br label %27
23: ; preds = %8
%24 = load i8*, i8** %3
%25 = load i8*, i8** %4
%26 = call i32 @strcmp(i8* %24, i8* %25)
store i32 %26, i32* %5
br label %27
27: ; preds = %23, %11
%28 = load i32, i32* %5
ret i32 %28
}

LLVM IR (-O2):
define i32 @airStrcmp(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = zext i1 %3 to i32
%8 = sext i1 %4 to i32
%9 = add nsw i32 %8, %7
br label %12
10: ; preds = %2
%11 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %12
12: ; preds = %10, %6
%13 = phi i32 [ %11, %10 ], [ %9, %6 ]
ret i32 %13
}
/* Variables and functions */
int _isalpha(int);
int isalpha(int c) { return _isalpha(c); }


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

x86 assembly (clang, -O2):
<isalpha>:
jmp    1030 <_isalpha@plt>

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

LLVM IR (-O2):
define i32 @isalpha(i32 %0) {
%2 = tail call i32 @_isalpha(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fibonacci(int /*<<< orphan*/);
void dwindle(void) { fibonacci(0); }


x86 assembly (clang, -O0):
<dwindle>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <fibonacci@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dwindle>:
xor    %edi,%edi
jmp    1030 <fibonacci@plt>

LLVM IR (-O0):
define void @dwindle() {
%1 = call i32 @fibonacci(i32 0)
ret void
}

LLVM IR (-O2):
define void @dwindle() {
%1 = tail call i32 @fibonacci(i32 0)
ret void
}
/* Variables and functions */
scalar_t__ tcdrandnd(int, int);
int myrandnd(int range) {
  int num = (int)tcdrandnd(range >> 1, range / 10);
  return (num < 0 || num >= range) ? 0 : num;
}


x86 assembly (clang, -O0):
<myrandnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x1,%edi
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
call   1030 <tcdrandnd@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     114c <myrandnd+0x3c>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     1156 <myrandnd+0x46>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    115c <myrandnd+0x4c>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrandnd>:
push   %rbx
movslq %edi,%rbx
sar    %edi
imul   $0x66666667,%rbx,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x22,%rsi
add    %eax,%esi
call   1030 <tcdrandnd@plt>
xor    %edx,%edx
cmp    %ebx,%eax
mov    $0x0,%ecx
cmovl  %eax,%ecx
test   %eax,%eax
cmovs  %edx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @myrandnd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 1
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 10
%8 = call i64 @tcdrandnd(i32 %5, i32 %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %1
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = icmp sge i32 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %12, %1
br label %19
17: ; preds = %12
%18 = load i32, i32* %3
br label %19
19: ; preds = %17, %16
%20 = phi i32 [ 0, %16 ], [ %18, %17 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @myrandnd(i32 %0) {
%2 = ashr i32 %0, 1
%3 = sdiv i32 %0, 10
%4 = tail call i64 @tcdrandnd(i32 %2, i32 %3)
%5 = trunc i64 %4 to i32
%6 = icmp slt i32 %5, 0
%7 = icmp slt i32 %5, %0
%8 = select i1 %7, i32 %5, i32 0
%9 = select i1 %6, i32 0, i32 %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ splitmerge(int *, int, int, int);
void merge(int *array, int low, int high) {
  if (low < high) {
    int m = (high + low) / 2;
    merge(array, low, m);
    merge(array, m + 1, high);
    splitmerge(array, low, m, high);
  }
}


x86 assembly (clang, -O0):
<merge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <merge+0x62>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <merge@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <merge@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <splitmerge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge>:
cmp    %edx,%esi
jge    1172 <merge+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1040 <merge@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1040 <merge@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <splitmerge@plt>
ret

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

LLVM IR (-O2):
define void @merge(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @merge(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @merge(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @splitmerge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ __rt_print_init();
__attribute__((constructor)) void __init_rtdk(void) { __rt_print_init(); }


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__init_rtdk, i8* null }]
define void @__init_rtdk() {
%1 = call i32 (...) @__rt_print_init()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__init_rtdk, i8* null }]
define void @__init_rtdk() {
%1 = tail call i32 (...) @__rt_print_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_routine(char *);
int main(int argc, char *argv[]) {
  print_routine(argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <print_routine@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    (%rsi),%rdi
call   1030 <print_routine@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @print_routine(i8* %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @print_routine(i8* %3)
ret i32 0
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *dupstr(const char *s) {
  char *result = malloc(strlen(s) + 1);
  if (result != NULL) {
    strcpy(result, s);
  }
  return result;
}


x86 assembly (clang, -O0):
<dupstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <dupstr+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dupstr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <dupstr+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @dupstr(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %8
8: ; preds = %6, %1
ret i8* %4
}