xunge/DecIR huggingface dataset:
int isdialstr(char *arg) {
  return (arg[0] == '-' && (arg[1] == 'a' || arg[1] == 'A') &&
          (arg[2] == 't' || arg[2] == 'T'));
}


x86 assembly (clang, -O0):
<isdialstr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1171 <isdialstr+0x71>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x61,%eax
je     1144 <isdialstr+0x44>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x9(%rbp)
jne    1171 <isdialstr+0x71>
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%ecx
mov    $0x1,%al
cmp    $0x74,%ecx
mov    %al,-0xa(%rbp)
je     116b <isdialstr+0x6b>
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x54,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdialstr>:
xor    %eax,%eax
cmpb   $0x2d,(%rdi)
jne    1127 <isdialstr+0x27>
mov    0x1(%rdi),%cl
or     $0x20,%cl
cmp    $0x61,%cl
jne    1127 <isdialstr+0x27>
mov    0x2(%rdi),%cl
mov    $0x1,%eax
cmp    $0x74,%cl
je     1127 <isdialstr+0x27>
xor    %eax,%eax
cmp    $0x54,%cl
sete   %al
ret

LLVM IR (-O0):
define i32 @isdialstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 45
br i1 %7, label %8, label %34
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 97
br i1 %13, label %20, label %14
14: ; preds = %8
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 65
br i1 %19, label %20, label %34
20: ; preds = %14, %8
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 2
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 116
br i1 %25, label %32, label %26
26: ; preds = %20
%27 = load i8*, i8** %2
%28 = getelementptr inbounds i8, i8* %27, i64 2
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 84
br label %32
32: ; preds = %26, %20
%33 = phi i1 [ true, %20 ], [ %31, %26 ]
br label %34
34: ; preds = %32, %14, %1
%35 = phi i1 [ false, %14 ], [ false, %1 ], [ %33, %32 ]
%36 = zext i1 %35 to i32
ret i32 %36
}

LLVM IR (-O2):
define i32 @isdialstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 45
br i1 %3, label %4, label %14
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
switch i8 %6, label %14 [
i8 97, label %7
i8 65, label %7
]
7: ; preds = %4, %4
%8 = getelementptr inbounds i8, i8* %0, i64 2
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 116
br i1 %10, label %14, label %11
11: ; preds = %7
%12 = icmp eq i8 %9, 84
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %4, %7, %11, %1
%15 = phi i32 [ 0, %1 ], [ 1, %7 ], [ %13, %11 ], [ 0, %4 ]
ret i32 %15
}
int mul(int x, int y) {
  int t;
  t = x * y;
  return (t + 8192 / 2) / 8192;
}


x86 assembly (clang, -O0):
<mul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1000,%eax
mov    $0x2000,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul>:
imul   %esi,%edi
lea    0x1000(%rdi),%ecx
lea    0x2fff(%rdi),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0xd,%eax
ret

LLVM IR (-O0):
define i32 @mul(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 4096
%11 = sdiv i32 %10, 8192
ret i32 %11
}

LLVM IR (-O2):
define i32 @mul(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = add nsw i32 %3, 4096
%5 = sdiv i32 %4, 8192
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  if (argc >= 2) {
    printf("Hello, %s!\n", argv[1]);
  } else {
    printf("Hello!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     114b <main+0x3b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1159 <main+0x49>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     113a <main+0x1a>
mov    0x8(%rsi),%rsi
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1146 <main+0x26>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"Hello, %s!\0A\00"
@str = [7 x i8] c"Hello!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %10
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fp_platform_init();
int fp_mp_init() {
  fp_platform_init();
  return 0;
}


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

x86 assembly (clang, -O2):
<fp_mp_init>:
push   %rax
xor    %eax,%eax
call   1030 <fp_platform_init@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fp_mp_init() {
%1 = call i32 (...) @fp_platform_init()
ret i32 0
}

LLVM IR (-O2):
define i32 @fp_mp_init() {
%1 = tail call i32 (...) @fp_platform_init()
ret i32 0
}
int main(void) {
  int \U000000c0 = 1;
  int \U000000c1 = 2;
  int \U000000c2 = 3;
  int wh\U000000ff = 4;
  int a\U000000c4b\U00000441\U000003b4e = 5;
  if (\U000000c0 != 1)
    abort();
  if (\U000000c1 != 2)
    abort();
  if (\U000000c2 != 3)
    abort();
  if (wh\U000000ff != 4)
    abort();
  if (a\U000000c4b\U00000441\U000003b4e != 5)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
movl   $0x5,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1151 <main+0x41>
call   1030 <abort@plt>
cmpl   $0x2,-0xc(%rbp)
je     1160 <main+0x50>
call   1030 <abort@plt>
cmpl   $0x3,-0x10(%rbp)
je     116f <main+0x5f>
call   1030 <abort@plt>
cmpl   $0x4,-0x14(%rbp)
je     117e <main+0x6e>
call   1030 <abort@plt>
cmpl   $0x5,-0x18(%rbp)
je     118d <main+0x7d>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ApplyTargetVDD();
int /*<<< orphan*/ Delay(int);
int /*<<< orphan*/ RemoveTargetVDD();
int /*<<< orphan*/ SetSCLKHiZ();
int /*<<< orphan*/ SetSDATAHiZ();
void ReStartTarget(void) {
  SetSCLKHiZ();
  SetSDATAHiZ();
  RemoveTargetVDD();
  Delay(150);
  ApplyTargetVDD();
}


x86 assembly (clang, -O0):
<ReStartTarget>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <SetSCLKHiZ@plt>
mov    $0x0,%al
call   1050 <SetSDATAHiZ@plt>
mov    $0x0,%al
call   1030 <RemoveTargetVDD@plt>
mov    $0x96,%edi
call   1040 <Delay@plt>
mov    $0x0,%al
call   1070 <ApplyTargetVDD@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReStartTarget>:
push   %rax
xor    %eax,%eax
call   1060 <SetSCLKHiZ@plt>
xor    %eax,%eax
call   1050 <SetSDATAHiZ@plt>
xor    %eax,%eax
call   1030 <RemoveTargetVDD@plt>
mov    $0x96,%edi
call   1040 <Delay@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <ApplyTargetVDD@plt>

LLVM IR (-O0):
define void @ReStartTarget() {
%1 = call i32 (...) @SetSCLKHiZ()
%2 = call i32 (...) @SetSDATAHiZ()
%3 = call i32 (...) @RemoveTargetVDD()
%4 = call i32 @Delay(i32 150)
%5 = call i32 (...) @ApplyTargetVDD()
ret void
}

LLVM IR (-O2):
define void @ReStartTarget() {
%1 = tail call i32 (...) @SetSCLKHiZ()
%2 = tail call i32 (...) @SetSDATAHiZ()
%3 = tail call i32 (...) @RemoveTargetVDD()
%4 = tail call i32 @Delay(i32 150)
%5 = tail call i32 (...) @ApplyTargetVDD()
ret void
}
/* Variables and functions */
int SocketUartServerStart();
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int ret = -1;
  ret = SocketUartServerStart();
  if (ret < 0) {
    printf("start server error\n");
  }
  return ret;
}


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)
movl   $0xffffffff,-0x14(%rbp)
mov    $0x0,%al
call   1030 <SocketUartServerStart@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    115d <main+0x3d>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <SocketUartServerStart@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    113a <main+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"start server error\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %6
%7 = call i32 (...) @SocketUartServerStart()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
%13 = load i32, i32* %6
ret i32 %13
}

LLVM IR (-O2):
@str = [19 x i8] c"start server error\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @SocketUartServerStart()
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i32 %3
}
/* Variables and functions */
int sqrt(double);
double MexicanHat_Cpsi() { return ((4. / 3.) * sqrt(3.14159265358979328)); }


x86 assembly (clang, -O0):
<MexicanHat_Cpsi>:
push   %rbp
mov    %rsp,%rbp
movsd  0xeec(%rip),%xmm0
call   1030 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xed3(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MexicanHat_Cpsi>:
push   %rax
movsd  0xee7(%rip),%xmm0
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xedb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @MexicanHat_Cpsi() {
%1 = call i32 @sqrt(double 0x400921FB54442D18)
%2 = sitofp i32 %1 to double
%3 = fmul double 0x3FF5555555555555, %2
ret double %3
}

LLVM IR (-O2):
define double @MexicanHat_Cpsi() {
%1 = tail call i32 @sqrt(double 0x400921FB54442D18)
%2 = sitofp i32 %1 to double
%3 = fmul double %2, 0x3FF5555555555555
ret double %3
}
int eap_peer_method_load(const char *so) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @eap_peer_method_load(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int dlink_get_first();
int front() { return dlink_get_first(); }


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

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

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

LLVM IR (-O2):
define i32 @front() {
%1 = tail call i32 (...) @dlink_get_first()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Puzzle();
int main() {
  int i;
  for (i = 0; i < 5; i++)
    Puzzle();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1145 <main+0x35>
mov    $0x0,%al
call   1030 <Puzzle@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Puzzle()
%2 = tail call i32 (...) @Puzzle()
%3 = tail call i32 (...) @Puzzle()
%4 = tail call i32 (...) @Puzzle()
%5 = tail call i32 (...) @Puzzle()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
Usage() {
  fprintf(stderr, "Usage: wc [-lwc] [name ...]\n");
  exit(1);
}


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    $0x1,%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    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"Usage: wc [-lwc] [name ...]\0A\00"
define i32 @Usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Usage: wc [-lwc] [name ...]\0A\00"
define i32 @Usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int EOF;
int read(int, unsigned char *, int);
unsigned char dvl_waitByte(int fd) {
  unsigned char rxb;
  int temp;
  while ((temp = read(fd, &rxb, 1)) != 1 && temp != EOF)
    ;
  return rxb;
}


x86 assembly (clang, -O0):
<dvl_waitByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
mov    %eax,%ecx
mov    %ecx,-0xc(%rbp)
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0xd(%rbp)
je     1151 <dvl_waitByte+0x41>
mov    -0xc(%rbp),%eax
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1161 <dvl_waitByte+0x51>
jmp    1166 <dvl_waitByte+0x56>
jmp    111b <dvl_waitByte+0xb>
movzbl -0x5(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dvl_waitByte>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xf(%rsp),%r14
mov    0x2ec1(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
je     1149 <dvl_waitByte+0x39>
cmp    (%r15),%eax
jne    1130 <dvl_waitByte+0x20>
mov    0xf(%rsp),%al
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define zeroext i8 @dvl_waitByte(i32 %0) {
%2 = alloca i8
br label %3
3: ; preds = %3, %1
%4 = call i32 @read(i32 %0, i8* %2, i32 1)
%5 = icmp ne i32 %4, 1
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %4, %6
%8 = select i1 %5, i1 %7, i1 false
br i1 %8, label %3, label %9
9: ; preds = %3
%10 = load i8, i8* %2
ret i8 %10
}
/* Variables and functions */
double rglmut_gv_scale_back_f(double const);
int rint(double);
int rglmut_gv_scale_back_i(const double v) {
  return 2 * rint(rglmut_gv_scale_back_f(v) * 0.5);
}


x86 assembly (clang, -O0):
<rglmut_gv_scale_back_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <rglmut_gv_scale_back_f@plt>
movsd  0xec1(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <rint@plt>
shl    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rglmut_gv_scale_back_i>:
push   %rax
call   1040 <rglmut_gv_scale_back_f@plt>
mulsd  0xed2(%rip),%xmm0
call   1030 <rint@plt>
add    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rglmut_gv_scale_back_i(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @rglmut_gv_scale_back_f(double %3)
%5 = fmul double %4, 5.000000e-01
%6 = call i32 @rint(double %5)
%7 = mul nsw i32 2, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rglmut_gv_scale_back_i(double %0) {
%2 = tail call double @rglmut_gv_scale_back_f(double %0)
%3 = fmul double %2, 5.000000e-01
%4 = tail call i32 @rint(double %3)
%5 = shl nsw i32 %4, 1
ret i32 %5
}
/* Variables and functions */
double fabs(double const);
int Util_close_to(const double tar, const double x) {
  if (tar == 0 && x == 0)
    return 1;
  return fabs(x - tar) < 1.0e-10;
}


x86 assembly (clang, -O0):
<Util_close_to>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    114a <Util_close_to+0x4a>
jp     114a <Util_close_to+0x4a>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    114a <Util_close_to+0x4a>
jp     114a <Util_close_to+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1176 <Util_close_to+0x76>
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movaps 0xeb5(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xe99(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Util_close_to>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jne    111a <Util_close_to+0x1a>
jp     111a <Util_close_to+0x1a>
mov    $0x1,%eax
ucomisd %xmm2,%xmm1
jne    111a <Util_close_to+0x1a>
jp     111a <Util_close_to+0x1a>
ret
subsd  %xmm0,%xmm1
andpd  0xeda(%rip),%xmm1
movsd  0xee2(%rip),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @Util_close_to(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = fcmp oeq double %6, 0.000000e+00
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load double, double* %5
%10 = fcmp oeq double %9, 0.000000e+00
br i1 %10, label %11, label %12
11: ; preds = %8
store i32 1, i32* %3
br label %19
12: ; preds = %8, %2
%13 = load double, double* %5
%14 = load double, double* %4
%15 = fsub double %13, %14
%16 = call double @llvm.fabs.f64(double %15)
%17 = fcmp olt double %16, 1.000000e-10
%18 = zext i1 %17 to i32
store i32 %18, i32* %3
br label %19
19: ; preds = %12, %11
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @Util_close_to(double %0, double %1) {
%3 = fcmp oeq double %0, 0.000000e+00
%4 = fcmp oeq double %1, 0.000000e+00
%5 = and i1 %3, %4
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = fsub double %1, %0
%8 = tail call double @llvm.fabs.f64(double %7)
%9 = fcmp olt double %8, 1.000000e-10
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %2, %6
%12 = phi i32 [ %10, %6 ], [ 1, %2 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void main(void) {
  puts("hello,world\n");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
jmp    1120 <main+0x10>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [13 x i8] c"hello,world\0A\00"
define void @main() {
%1 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello,world\0A\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ perror(char *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int iw_open() {
  int sock;
  sock = socket(AF_INET, SOCK_DGRAM, 0);
  if (sock < 0) {
    perror("socket() failed");
    return -1;
  }
  return sock;
}


x86 assembly (clang, -O0):
<iw_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <socket@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1166 <iw_open+0x46>
lea    0xeab(%rip),%rdi
call   1030 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <iw_open+0x4c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iw_open>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <socket@plt>
test   %eax,%eax
js     1140 <iw_open+0x20>
pop    %rcx
ret
lea    0xeb9(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@.str = [16 x i8] c"socket() failed\00"
define i32 @iw_open() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @AF_INET
%4 = load i32, i32* @SOCK_DGRAM
%5 = call i32 @socket(i32 %3, i32 %4, i32 0)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %1
br label %12
10: ; preds = %0
%11 = load i32, i32* %2
store i32 %11, i32* %1
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@.str = [16 x i8] c"socket() failed\00"
define i32 @iw_open() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_DGRAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %0, %5
%8 = phi i32 [ -1, %5 ], [ %3, %0 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ isalpha(char);
scalar_t__ isdigit(char);
int numDigits(char ch, int count) {
  int tempCount = count;
  if (!isalpha(ch) && isdigit(ch)) {
    tempCount++;
  }
  return tempCount;
}


x86 assembly (clang, -O0):
<numDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%eax
jne    1165 <numDigits+0x45>
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1165 <numDigits+0x45>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numDigits>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <isalpha@plt>
test   %eax,%eax
jne    1140 <numDigits+0x20>
movsbl %bpl,%edi
call   1030 <isdigit@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @numDigits(i8 signext %0, i32 %1) {
%3 = tail call i32 @isalpha(i8 signext %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i64 @isdigit(i8 signext %0)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
%9 = add nsw i32 %8, %1
br label %10
10: ; preds = %5, %2
%11 = phi i32 [ %1, %2 ], [ %9, %5 ]
ret i32 %11
}
/* Type definitions */
struct _reent {
  int dummy;
};

/* Variables and functions */
void *realloc(void *, size_t);
void *_realloc_r(struct _reent *r, void *ptr, size_t size) {
  return realloc(ptr, size);
}


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

x86 assembly (clang, -O2):
<_realloc_r>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <realloc@plt>

LLVM IR (-O0):
%struct._reent = type { i32 }
define i8* @_realloc_r(%struct._reent* %0, i8* %1, i64 %2) {
%4 = alloca %struct._reent*
%5 = alloca i8*
%6 = alloca i64
store %struct._reent* %0, %struct._reent** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i64, i64* %6
%9 = call i8* @realloc(i8* %7, i64 %8)
ret i8* %9
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define noalias i8* @_realloc_r(%struct._reent* nocapture readnone %0, i8* nocapture %1, i64 %2) {
%4 = tail call i8* @realloc(i8* %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char *);
void key_5_handler(void) {
  uart_puts("\nkey_5_handler");
  return;
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"\0Akey_5_handler\00"
define void @key_5_handler() {
%1 = tail call i32 @uart_puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
int calculate(int height, int speed, int burn, int gravity) {
  return (speed + gravity - burn);
}


x86 assembly (clang, -O0):
<calculate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate>:
sub    %edx,%esi
lea    (%rsi,%rcx,1),%eax
ret

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

LLVM IR (-O2):
define i32 @calculate(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub i32 %1, %2
%6 = add i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ MacMsg(char *, char *, int /*<<< orphan*/);
void WarnMsgAbnormal(void) {
  MacMsg("Abnormal Situation",
         "The emulated computer is attempting an operation that wasn;}t "
         "expected to happen in normal use.",
         0);
}


x86 assembly (clang, -O0):
<WarnMsgAbnormal>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef1(%rip),%rsi
xor    %edx,%edx
call   1030 <MacMsg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<WarnMsgAbnormal>:
lea    0xee9(%rip),%rdi
lea    0xef5(%rip),%rsi
xor    %edx,%edx
jmp    1030 <MacMsg@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Abnormal Situation\00"
@.str.1 = [96 x i8] c"The emulated computer is attempting an operation that wasn;}t expected to happen in normal use.\00"
define void @WarnMsgAbnormal() {
%1 = call i32 @MacMsg(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Abnormal Situation\00"
@.str.1 = [96 x i8] c"The emulated computer is attempting an operation that wasn;}t expected to happen in normal use.\00"
define void @WarnMsgAbnormal() {
%1 = tail call i32 @MacMsg(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
int main() { return 1 * 2; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(unsigned int);
int /*<<< orphan*/ time(scalar_t__ *);
int randomheight() {
  time_t t;
  time(&t);
  srand((unsigned int)t);
  return (rand() % 15000 + 4000);
}


x86 assembly (clang, -O0):
<randomheight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1040 <time@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x3a98,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0xfa0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomheight>:
push   %rax
mov    %rsp,%rdi
call   1040 <time@plt>
mov    (%rsp),%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x45e7b273,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2c,%rcx
add    %edx,%ecx
imul   $0x3a98,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xfa0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @randomheight() {
%1 = alloca i64
%2 = call i32 @time(i64* %1)
%3 = load i64, i64* %1
%4 = trunc i64 %3 to i32
%5 = call i32 @srand(i32 %4)
%6 = call i32 (...) @rand()
%7 = srem i32 %6, 15000
%8 = add nsw i32 %7, 4000
ret i32 %8
}

LLVM IR (-O2):
define i32 @randomheight() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @time(i64* %1)
%4 = load i64, i64* %1
%5 = trunc i64 %4 to i32
%6 = call i32 @srand(i32 %5)
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 15000
%9 = add nsw i32 %8, 4000
ret i32 %9
}
void IN_DeactivateMouse(void) {}


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

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

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

LLVM IR (-O2):
define void @IN_DeactivateMouse() {
ret void
}
/* Variables and functions */
float asinhf(float);
void __hv_asinh_f(float bIn, float *bOut) { *bOut = asinhf(bIn); }


x86 assembly (clang, -O0):
<__hv_asinh_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <asinhf@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hv_asinh_f>:
push   %rbx
mov    %rdi,%rbx
call   1030 <asinhf@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @__hv_asinh_f(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 = call float @asinhf(float %5)
%7 = load float*, float** %4
store float %6, float* %7
ret void
}

LLVM IR (-O2):
define void @__hv_asinh_f(float %0, float* nocapture writeonly %1) {
%3 = tail call float @asinhf(float %0)
store float %3, float* %1
ret void
}
int fun121() { return 121; }


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

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

LLVM IR (-O0):
define i32 @fun121() {
ret i32 121
}

LLVM IR (-O2):
define i32 @fun121() {
ret i32 121
}
/* Type definitions */
typedef int /*<<< orphan*/ pucCommand1;

/* Variables and functions */
int /*<<< orphan*/ OSRAMWriteCommand(unsigned char const *, int);
void OSRAM128x64x4DisplayOff(void) {
  static const unsigned char pucCommand1[] = {0xAE, 0xAD, 0x02};
  OSRAMWriteCommand(pucCommand1, sizeof(pucCommand1));
}


x86 assembly (clang, -O0):
<OSRAM128x64x4DisplayOff>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x3,%esi
call   1030 <OSRAMWriteCommand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSRAM128x64x4DisplayOff>:
lea    0xee9(%rip),%rdi
mov    $0x3,%esi
jmp    1030 <OSRAMWriteCommand@plt>

LLVM IR (-O0):
@OSRAM128x64x4DisplayOff.pucCommand1 = internal constant [3 x i8] c"\AE\AD\02"
define void @OSRAM128x64x4DisplayOff() {
%1 = call i32 @OSRAMWriteCommand(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @OSRAM128x64x4DisplayOff.pucCommand1, i64 0, i64 0), i32 3)
ret void
}

LLVM IR (-O2):
@OSRAM128x64x4DisplayOff.pucCommand1 = internal constant [3 x i8] c"\AE\AD\02"
define void @OSRAM128x64x4DisplayOff() {
%1 = tail call i32 @OSRAMWriteCommand(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @OSRAM128x64x4DisplayOff.pucCommand1, i64 0, i64 0), i32 3)
ret void
}
void purge_asimage_registry() {}


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

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

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

LLVM IR (-O2):
define void @purge_asimage_registry() {
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_bus_track_add_sender(void *track,
                                                                   void *m) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_track_add_sender>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_track_add_sender>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_track_add_sender(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_track_add_sender(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int stcli_d(char *, unsigned int);
int stcu_d(char *string, unsigned int u) { return stcli_d(string, u); }


x86 assembly (clang, -O0):
<stcu_d>:
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 <stcli_d@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @stcu_d(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 @stcli_d(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @stcu_d(i8* %0, i32 %1) {
%3 = tail call i32 @stcli_d(i8* %0, i32 %1)
ret i32 %3
}
void sorry_to_exit() {}


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

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

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

LLVM IR (-O2):
define void @sorry_to_exit() {
ret void
}
/* Variables and functions */
unsigned long gfx_pci_config_read(int);
int /*<<< orphan*/ gfx_pci_config_write(int, unsigned long);
int gfx_enable_softvga(void) {
  unsigned long reg_val;
  reg_val = gfx_pci_config_read(0x80009444);
  gfx_pci_config_write(0x80009444, reg_val & 0xfffffffel);
  reg_val = gfx_pci_config_read(0x80009444);
  if ((reg_val & 0x1) == 0)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<gfx_enable_softvga>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x80009444,%edi
call   1040 <gfx_pci_config_read@plt>
mov    %rax,-0x10(%rbp)
movabs $0xfffffffe,%rsi
and    -0x10(%rbp),%rsi
mov    $0x80009444,%edi
call   1030 <gfx_pci_config_write@plt>
mov    $0x80009444,%edi
call   1040 <gfx_pci_config_read@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    117a <gfx_enable_softvga+0x5a>
movl   $0x1,-0x4(%rbp)
jmp    1181 <gfx_enable_softvga+0x61>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfx_enable_softvga>:
push   %rax
mov    $0x80009444,%edi
call   1040 <gfx_pci_config_read@plt>
and    $0xfffffffe,%eax
mov    $0x80009444,%edi
mov    %rax,%rsi
call   1030 <gfx_pci_config_write@plt>
mov    $0x80009444,%edi
call   1040 <gfx_pci_config_read@plt>
not    %eax
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gfx_enable_softvga() {
%1 = alloca i32
%2 = alloca i64
%3 = call i64 @gfx_pci_config_read(i32 -2147445692)
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = and i64 %4, 4294967294
%6 = call i32 @gfx_pci_config_write(i32 -2147445692, i64 %5)
%7 = call i64 @gfx_pci_config_read(i32 -2147445692)
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = and i64 %8, 1
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %0
store i32 1, i32* %1
br label %13
12: ; preds = %0
store i32 0, i32* %1
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @gfx_enable_softvga() {
%1 = tail call i64 @gfx_pci_config_read(i32 -2147445692)
%2 = and i64 %1, 4294967294
%3 = tail call i32 @gfx_pci_config_write(i32 -2147445692, i64 %2)
%4 = tail call i64 @gfx_pci_config_read(i32 -2147445692)
%5 = trunc i64 %4 to i32
%6 = and i32 %5, 1
%7 = xor i32 %6, 1
ret i32 %7
}
/* Type definitions */
struct activity {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ stub_print_queue_stats(struct activity *, int, int,
                                          unsigned long long, int);
void print_avg_queue_stats(struct activity *a, int prev, int curr,
                           unsigned long long itv) {
  stub_print_queue_stats(a, prev, curr, itv, 1);
}


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

x86 assembly (clang, -O2):
<print_avg_queue_stats>:
mov    $0x1,%r8d
jmp    1030 <stub_print_queue_stats@plt>

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

LLVM IR (-O2):
%struct.activity = type { i32 }
define void @print_avg_queue_stats(%struct.activity* %0, i32 %1, i32 %2, i64 %3) {
%5 = tail call i32 @stub_print_queue_stats(%struct.activity* %0, i32 %1, i32 %2, i64 %3, i32 1)
ret void
}
int GetSectorSize(int N) {
  if (N <= 5)
    return (1 << N) << 7;
  else
    return 0x01800;
}


x86 assembly (clang, -O0):
<GetSectorSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     1126 <GetSectorSize+0x26>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
shl    $0x7,%eax
mov    %eax,-0x4(%rbp)
jmp    112d <GetSectorSize+0x2d>
movl   $0x1800,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetSectorSize>:
mov    %edi,%ecx
mov    $0x80,%edx
shl    %cl,%edx
cmp    $0x6,%edi
mov    $0x1800,%eax
cmovl  %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @GetSectorSize(i32 %0) {
%2 = icmp slt i32 %0, 6
%3 = shl i32 128, %0
%4 = select i1 %2, i32 %3, i32 6144
ret i32 %4
}
void setval_384(unsigned *p) { *p = 3229929857U; }


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

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

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

LLVM IR (-O2):
define void @setval_384(i32* nocapture writeonly %0) {
store i32 -1065037439, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memchr(char *, char, int);
int is_unix(char *socket_name, int len) {
  return !memchr(socket_name, ':', len);
}


x86 assembly (clang, -O0):
<is_unix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x3a,%esi
call   1030 <memchr@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_unix>:
push   %rax
mov    %esi,%edx
mov    $0x3a,%esi
call   1030 <memchr@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_unix(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 @memchr(i8* %5, i8 signext 58, i32 %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_unix(i8* %0, i32 %1) {
%3 = tail call i32 @memchr(i8* %0, i8 signext 58, i32 %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int64_t in_gettimeUs(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
}


x86 assembly (clang, -O0):
<in_gettimeUs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%rax
imul   $0xf4240,%eax,%eax
add    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_gettimeUs>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%eax
add    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i32 @in_gettimeUs() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = mul nsw i32 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i32, i32* %7
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i32 @in_gettimeUs() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = add nsw i32 %7, %9
ret i32 %10
}
double f4_sum_pre_int_float(int v0, float v) {
  return (double)v0 + ((double)(v));
}


x86 assembly (clang, -O0):
<f4_sum_pre_int_float>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_sum_pre_int_float>:
cvtsi2sd %edi,%xmm1
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f4_sum_pre_int_float(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca float
store i32 %0, i32* %3
store float %1, float* %4
%5 = load i32, i32* %3
%6 = sitofp i32 %5 to double
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = fadd double %6, %8
ret double %9
}

LLVM IR (-O2):
define double @f4_sum_pre_int_float(i32 %0, float %1) {
%3 = sitofp i32 %0 to double
%4 = fpext float %1 to double
%5 = fadd double %3, %4
ret double %5
}