xunge/DecIR huggingface dataset:
int foo_mul(const unsigned char *tmp, int i, int val) {
  return (unsigned char)(((tmp[i] * val) > 0xFF)
                             ? 0xFF
                             : (((tmp[i] * val) < 0) ? 0 : (tmp[i] * val)));
}


x86 assembly (clang, -O0):
<foo_mul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
imul   -0x10(%rbp),%eax
cmp    $0xff,%eax
jle    1136 <foo_mul+0x36>
mov    $0xff,%eax
mov    %eax,-0x14(%rbp)
jmp    1172 <foo_mul+0x72>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
imul   -0x10(%rbp),%eax
cmp    $0x0,%eax
jge    1159 <foo_mul+0x59>
xor    %eax,%eax
mov    %eax,-0x18(%rbp)
jmp    116c <foo_mul+0x6c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_mul>:
movslq %esi,%rax
movzbl (%rdi,%rax,1),%eax
imul   %edx,%eax
xor    %ecx,%ecx
test   %eax,%eax
movzbl %al,%edx
cmovs  %ecx,%edx
cmp    $0x100,%eax
mov    $0xff,%eax
cmovl  %edx,%eax
ret

LLVM IR (-O0):
define i32 @foo_mul(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i32, i32* %6
%14 = mul nsw i32 %12, %13
%15 = icmp sgt i32 %14, 255
br i1 %15, label %16, label %17
16: ; preds = %3
br label %39
17: ; preds = %3
%18 = load i8*, i8** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = load i32, i32* %6
%25 = mul nsw i32 %23, %24
%26 = icmp slt i32 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %17
br label %37
28: ; preds = %17
%29 = load i8*, i8** %4
%30 = load i32, i32* %5
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = load i32, i32* %6
%36 = mul nsw i32 %34, %35
br label %37
37: ; preds = %28, %27
%38 = phi i32 [ 0, %27 ], [ %36, %28 ]
br label %39
39: ; preds = %37, %16
%40 = phi i32 [ 255, %16 ], [ %38, %37 ]
%41 = trunc i32 %40 to i8
%42 = zext i8 %41 to i32
ret i32 %42
}

LLVM IR (-O2):
define i32 @foo_mul(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = mul nsw i32 %7, %2
%9 = icmp sgt i32 %8, 255
%10 = icmp slt i32 %8, 0
%11 = and i32 %8, 255
%12 = select i1 %10, i32 0, i32 %11
%13 = select i1 %9, i32 255, i32 %12
ret i32 %13
}
/* Variables and functions */
int port_access(unsigned short);
int port_access_multiple(unsigned short port, unsigned short count) {
  return port_access(port);
}


x86 assembly (clang, -O0):
<port_access_multiple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <port_access@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @port_access_multiple(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = call i32 @port_access(i16 zeroext %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @port_access_multiple(i16 zeroext %0, i16 zeroext %1) {
%3 = tail call i32 @port_access(i16 zeroext %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ csolve_assert(int);
int nondet();
void main() {
  int x;
  int a;
  int b;
  x = nondet();
  if (x < 0) {
    x = -x;
  }
  a = (x >= 0);
  a = 999;
  csolve_assert(x >= 0);
  csolve_assert(x >= 0);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <nondet@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1144 <main+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
movl   $0x3e7,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <csolve_assert@plt>
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <csolve_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <nondet@plt>
mov    $0x1,%edi
call   1040 <csolve_assert@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <csolve_assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @nondet()
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %1
%9 = sub nsw i32 0, %8
store i32 %9, i32* %1
br label %10
10: ; preds = %7, %0
%11 = load i32, i32* %1
%12 = icmp sge i32 %11, 0
%13 = zext i1 %12 to i32
store i32 %13, i32* %2
store i32 999, i32* %2
%14 = load i32, i32* %1
%15 = icmp sge i32 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @csolve_assert(i32 %16)
%18 = load i32, i32* %1
%19 = icmp sge i32 %18, 0
%20 = zext i1 %19 to i32
%21 = call i32 @csolve_assert(i32 %20)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @nondet()
%2 = tail call i32 @csolve_assert(i32 1)
%3 = tail call i32 @csolve_assert(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int testPalindrome(char *);
int main(int argc, char const *argv[]) {
  char str[30] = "";
  scanf("%s", str);
  printf("**%d\n", testPalindrome(str));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x1e,%edx
call   1040 <memset@plt>
lea    -0x30(%rbp),%rsi
lea    0xe8f(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x30(%rbp),%rdi
call   1060 <testPalindrome@plt>
mov    %eax,%esi
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0xe(%rsp)
movaps %xmm0,(%rsp)
lea    0xeb8(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1050 <testPalindrome@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [6 x i8] c"**%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [30 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [30 x i8]* %6 to i8*
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%11 = call i32 @testPalindrome(i8* %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [6 x i8] c"**%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [30 x i8]
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @testPalindrome(i8* %4)
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int asuint64(double);
uint32_t top32(double x) { return asuint64(x) >> 32; }


x86 assembly (clang, -O0):
<top32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <asuint64@plt>
mov    $0x20,%ecx
sar    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @top32(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @asuint64(double %3)
%5 = ashr i32 %4, 32
ret i32 %5
}

LLVM IR (-O2):
define i32 @top32(double %0) {
%2 = tail call i32 @asuint64(double %0)
ret i32 poison
}
/* Type definitions */
typedef int uint_fast32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint_fast32_t mod_add(uint_fast32_t a, uint_fast32_t b) {
  uint_fast32_t x;
  assert(a <= 0x7FFFFFFE);
  assert(b <= 0x7FFFFFFE);
  x = a + b;
  x = (x >= 0x7FFFFFFF) ? (x - 0x7FFFFFFF) : x;
  return x;
}


x86 assembly (clang, -O0):
<mod_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x7ffffffe,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x7ffffffe,-0x8(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x7fffffff,-0xc(%rbp)
jl     116c <mod_add+0x5c>
mov    -0xc(%rbp),%eax
sub    $0x7fffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1172 <mod_add+0x62>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod_add>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x7fffffff,%ebp
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%ebx
setne  %dil
call   1030 <assert@plt>
add    %ebp,%ebx
xor    %eax,%eax
cmp    $0x7fffffff,%ebx
cmovne %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mod_add(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 = icmp sle i32 %6, 2147483646
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i32, i32* %4
%11 = icmp sle i32 %10, 2147483646
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = add nsw i32 %14, %15
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = icmp sge i32 %17, 2147483647
br i1 %18, label %19, label %22
19: ; preds = %2
%20 = load i32, i32* %5
%21 = sub nsw i32 %20, 2147483647
br label %24
22: ; preds = %2
%23 = load i32, i32* %5
br label %24
24: ; preds = %22, %19
%25 = phi i32 [ %21, %19 ], [ %23, %22 ]
store i32 %25, i32* %5
%26 = load i32, i32* %5
ret i32 %26
}

LLVM IR (-O2):
define i32 @mod_add(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 2147483647
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i32 %1, 2147483647
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = add nsw i32 %1, %0
%10 = icmp eq i32 %9, 2147483647
%11 = select i1 %10, i32 0, i32 %9
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ show_opcode(int);
int dump_opcode(void *ctx, int opcode, const void *data, size_t size) {
  (void)ctx;
  (void)data;
  (void)size;
  show_opcode(opcode);
  return 0;
}


x86 assembly (clang, -O0):
<dump_opcode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <show_opcode@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_opcode>:
push   %rax
mov    %esi,%edi
call   1030 <show_opcode@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dump_opcode(i8* %0, i32 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %7
%11 = load i64, i64* %8
%12 = load i32, i32* %6
%13 = call i32 @show_opcode(i32 %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @dump_opcode(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i64 %3) {
%5 = tail call i32 @show_opcode(i32 %1)
ret i32 0
}
char Files_HasDir(unsigned char *name, long long name__len) {
  char _o_result;
  int i;
  unsigned char ch;
  i = 0;
  ch = name[0];
  while ((ch != 0x00 && ch != '/')) {
    i += 1;
    ch = name[i];
  }
  _o_result = ch == '/';
  return _o_result;
}


x86 assembly (clang, -O0):
<Files_HasDir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
movzbl -0x19(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1a(%rbp)
je     113b <Files_HasDir+0x3b>
movzbl -0x19(%rbp),%eax
cmp    $0x2f,%eax
setne  %al
mov    %al,-0x1a(%rbp)
mov    -0x1a(%rbp),%al
test   $0x1,%al
jne    114b <Files_HasDir+0x4b>
jmp    1167 <Files_HasDir+0x67>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x19(%rbp)
jmp    111c <Files_HasDir+0x1c>
movzbl -0x19(%rbp),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Files_HasDir>:
movzbl (%rdi),%eax
test   %al,%al
je     1111 <Files_HasDir+0x11>
cmp    $0x2f,%al
je     1111 <Files_HasDir+0x11>
add    $0x1,%rdi
jmp    1100 <Files_HasDir>
cmp    $0x2f,%al
sete   %al
ret

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

LLVM IR (-O2):
define signext i8 @Files_HasDir(i8* nocapture %0, i64 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64 [ %8, %7 ], [ 0, %2 ]
%5 = phi i8* [ %9, %7 ], [ %0, %2 ]
%6 = load i8, i8* %5
switch i8 %6, label %7 [
i8 47, label %10
i8 0, label %10
]
7: ; preds = %3
%8 = add nuw i64 %4, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
br label %3
10: ; preds = %3, %3
%11 = icmp eq i8 %6, 47
%12 = zext i1 %11 to i8
ret i8 %12
}
double mind(double a, double b) {
  if (a < b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<mind>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <mind+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <mind+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mind>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @mind(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @mind(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ set_ime(int);
void op0xFB(void) { set_ime(1); }


x86 assembly (clang, -O0):
<op0xFB>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <set_ime@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op0xFB>:
mov    $0x1,%edi
jmp    1030 <set_ime@plt>

LLVM IR (-O0):
define void @op0xFB() {
%1 = call i32 @set_ime(i32 1)
ret void
}

LLVM IR (-O2):
define void @op0xFB() {
%1 = tail call i32 @set_ime(i32 1)
ret void
}
/* Variables and functions */
int eg_indirect_table_get(unsigned int, int /*<<< orphan*/, unsigned int, int,
                          unsigned int *);
int eg_ctl_filt_table_get(unsigned int dev_id, unsigned int index,
                          unsigned int *pentry) {
  if ((index < 0) || (index > 23)) {
    return -1;
  }
  return eg_indirect_table_get(dev_id, 0, index, 3, pentry);
}


x86 assembly (clang, -O0):
<eg_ctl_filt_table_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jb     1136 <eg_ctl_filt_table_get+0x26>
cmpl   $0x17,-0xc(%rbp)
jbe    1142 <eg_ctl_filt_table_get+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <eg_ctl_filt_table_get+0x4b>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%r8
xor    %esi,%esi
mov    $0x3,%ecx
call   1030 <eg_indirect_table_get@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eg_ctl_filt_table_get>:
cmp    $0x17,%esi
jbe    111b <eg_ctl_filt_table_get+0xb>
mov    $0xffffffff,%eax
ret
mov    %rdx,%r8
mov    %esi,%edx
xor    %esi,%esi
mov    $0x3,%ecx
jmp    1030 <eg_indirect_table_get@plt>

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

LLVM IR (-O2):
define i32 @eg_ctl_filt_table_get(i32 %0, i32 %1, i32* %2) {
%4 = icmp ugt i32 %1, 23
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @eg_indirect_table_get(i32 %0, i32 0, i32 %1, i32 3, i32* %2)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ %6, %5 ], [ -1, %3 ]
ret i32 %8
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t MirrorBytes32(uint32_t x) {
  uint32_t n = (uint8_t)x;
  n <<= 8;
  n |= (uint8_t)(x >> 8);
  n <<= 8;
  n |= (uint8_t)(x >> 16);
  return (n << 8) | (uint8_t)(x >> 24);
}


x86 assembly (clang, -O0):
<MirrorBytes32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    -0x4(%rbp),%ecx
sar    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MirrorBytes32>:
mov    %edi,%eax
shl    $0x10,%eax
mov    %edi,%ecx
and    $0xffff00,%ecx
or     %eax,%ecx
mov    %edi,%eax
sar    $0x10,%eax
or     %ecx,%eax
shl    $0x8,%eax
sar    $0x18,%edi
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @MirrorBytes32(i32 %0) {
%2 = shl i32 %0, 16
%3 = and i32 %0, 16776960
%4 = or i32 %2, %3
%5 = ashr i32 %0, 16
%6 = or i32 %4, %5
%7 = shl i32 %6, 8
%8 = ashr i32 %0, 24
%9 = or i32 %7, %8
ret i32 %9
}
double c_to_F(double t) { return t * 9 / 5 + 32; }


x86 assembly (clang, -O0):
<c_to_F>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeff(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xed6(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_to_F>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @c_to_F(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 9.000000e+00
%5 = fdiv double %4, 5.000000e+00
%6 = fadd double %5, 3.200000e+01
ret double %6
}

LLVM IR (-O2):
define double @c_to_F(double %0) {
%2 = fmul double %0, 9.000000e+00
%3 = fdiv double %2, 5.000000e+00
%4 = fadd double %3, 3.200000e+01
ret double %4
}
int ataribasic_getdigit(int *pbytes, int digit) {
  int result;
  result = pbytes[(digit >> 1) + 1];
  if (!(digit & 0x01))
    result = result >> 4;
  return (result & 0x0F);
}


x86 assembly (clang, -O0):
<ataribasic_getdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sar    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1139 <ataribasic_getdigit+0x39>
mov    -0x10(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0xf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ataribasic_getdigit>:
mov    %esi,%eax
sar    %eax
cltq
mov    0x4(%rdi,%rax,4),%ecx
mov    %ecx,%eax
shr    $0x4,%eax
test   $0x1,%sil
cmovne %ecx,%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @ataribasic_getdigit(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 = ashr i32 %7, 1
%9 = add nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %6, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %5
%13 = load i32, i32* %4
%14 = and i32 %13, 1
%15 = icmp ne i32 %14, 0
br i1 %15, label %19, label %16
16: ; preds = %2
%17 = load i32, i32* %5
%18 = ashr i32 %17, 4
store i32 %18, i32* %5
br label %19
19: ; preds = %16, %2
%20 = load i32, i32* %5
%21 = and i32 %20, 15
ret i32 %21
}

LLVM IR (-O2):
define i32 @ataribasic_getdigit(i32* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 1
%4 = add nsw i32 %3, 1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = and i32 %1, 1
%9 = icmp eq i32 %8, 0
%10 = lshr i32 %7, 4
%11 = select i1 %9, i32 %10, i32 %7
%12 = and i32 %11, 15
ret i32 %12
}
/* Variables and functions */
void *memchr(void const *, int, unsigned int);
unsigned int byte_chr(const void *s, unsigned int n, int c) {
  const void *p;
  return (p = memchr(s, c, n)) == 0 ? n : (p - s);
}


x86 assembly (clang, -O0):
<byte_chr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <memchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    114b <byte_chr+0x3b>
mov    -0xc(%rbp),%eax
mov    %rax,-0x20(%rbp)
jmp    115a <byte_chr+0x4a>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<byte_chr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %edx,%esi
mov    %ebp,%edx
call   1030 <memchr@plt>
mov    %eax,%ecx
sub    %ebx,%ecx
test   %rax,%rax
cmove  %ebp,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @byte_chr(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = call i8* @memchr(i8* %8, i32 %9, i32 %10)
store i8* %11, i8** %7
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = load i32, i32* %5
%15 = zext i32 %14 to i64
br label %22
16: ; preds = %3
%17 = load i8*, i8** %7
%18 = load i8*, i8** %4
%19 = ptrtoint i8* %17 to i64
%20 = ptrtoint i8* %18 to i64
%21 = sub i64 %19, %20
br label %22
22: ; preds = %16, %13
%23 = phi i64 [ %15, %13 ], [ %21, %16 ]
%24 = trunc i64 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @byte_chr(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @memchr(i8* %0, i32 %2, i32 %1)
%5 = icmp eq i8* %4, null
%6 = zext i32 %1 to i64
%7 = ptrtoint i8* %4 to i64
%8 = ptrtoint i8* %0 to i64
%9 = sub i64 %7, %8
%10 = select i1 %5, i64 %6, i64 %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
/* Variables and functions */
double log10(int);
double hz2erb(double hz) { return (21.4 * log10(1. + hz / 229.)); }


x86 assembly (clang, -O0):
<hz2erb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xee6(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <log10@plt>
movaps %xmm0,%xmm1
movsd  0xeb2(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hz2erb>:
push   %rax
divsd  0xee7(%rip),%xmm0
addsd  0xee7(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <log10@plt>
mulsd  0xede(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @hz2erb(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 2.290000e+02
%5 = fadd double 1.000000e+00, %4
%6 = fptosi double %5 to i32
%7 = call double @log10(i32 %6)
%8 = fmul double 2.140000e+01, %7
ret double %8
}

LLVM IR (-O2):
define double @hz2erb(double %0) {
%2 = fdiv double %0, 2.290000e+02
%3 = fadd double %2, 1.000000e+00
%4 = fptosi double %3 to i32
%5 = tail call double @log10(i32 %4)
%6 = fmul double %5, 2.140000e+01
ret double %6
}
/* Variables and functions */
double fabs(double);
int close_enough(double a, double b, double epsilon) {
  return (fabs(a - b) < epsilon);
}


x86 assembly (clang, -O0):
<close_enough>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movaps 0xedc(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_enough>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
xor    %eax,%eax
ucomisd %xmm0,%xmm2
seta   %al
ret

LLVM IR (-O0):
define i32 @close_enough(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fsub double %7, %8
%10 = call double @llvm.fabs.f64(double %9)
%11 = load double, double* %6
%12 = fcmp olt double %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @close_enough(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = tail call double @llvm.fabs.f64(double %4)
%6 = fcmp olt double %5, %2
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
extern uint8_t gf_sub(uint8_t lhs, uint8_t rhs) { return lhs ^ rhs; }


x86 assembly (clang, -O0):
<gf_sub>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @gf_sub(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
unsigned ROR(unsigned word, int i) {
  asm("rorl %%cl, %0" : "=r"(word) : "0"(word), "c"(i));
  return word;
}


x86 assembly (clang, -O0):
<ROR>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
ror    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROR>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @ROR(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 asm "rorl %cl, $0", "=r,0,{cx},~{dirflag},~{fpsr},~{flags}"(i32 %5, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @ROR(i32 %0, i32 %1) {
%3 = tail call i32 asm "rorl %cl, $0", "=r,0,{cx},~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int __wrap_chmod(const char *pathname, mode_t mode) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__wrap_chmod(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
void genbeql() {}


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

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

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

LLVM IR (-O2):
define void @genbeql() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addRoundKey(unsigned char *, unsigned char *);
int /*<<< orphan*/ mixColumns(unsigned char *);
int /*<<< orphan*/ shiftRows(unsigned char *);
int /*<<< orphan*/ subBytes(unsigned char *);
void aes_round(unsigned char *state, unsigned char *roundKey) {
  subBytes(state);
  shiftRows(state);
  mixColumns(state);
  addRoundKey(state, roundKey);
}


x86 assembly (clang, -O0):
<aes_round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <subBytes@plt>
mov    -0x8(%rbp),%rdi
call   1030 <shiftRows@plt>
mov    -0x8(%rbp),%rdi
call   1060 <mixColumns@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <addRoundKey@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_round>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <subBytes@plt>
mov    %rbx,%rdi
call   1030 <shiftRows@plt>
mov    %rbx,%rdi
call   1060 <mixColumns@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <addRoundKey@plt>

LLVM IR (-O0):
define void @aes_round(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @subBytes(i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @shiftRows(i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 @mixColumns(i8* %9)
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = call i32 @addRoundKey(i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
define void @aes_round(i8* %0, i8* %1) {
%3 = tail call i32 @subBytes(i8* %0)
%4 = tail call i32 @shiftRows(i8* %0)
%5 = tail call i32 @mixColumns(i8* %0)
%6 = tail call i32 @addRoundKey(i8* %0, i8* %1)
ret void
}
int Fibonacci(int n) {
  int x, y;
  if (n < 2)
    return n;
  else {
    x = Fibonacci(n - 1);
    y = Fibonacci(n - 2);
    return (x + y);
  }
}


x86 assembly (clang, -O0):
<Fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1130 <Fibonacci+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <Fibonacci+0x45>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <Fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <Fibonacci@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jge    1120 <Fibonacci+0x10>
mov    %ebx,%ecx
jmp    1144 <Fibonacci+0x34>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <Fibonacci@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1130 <Fibonacci+0x20>
add    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @Fibonacci(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @Fibonacci(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
/* Variables and functions */
int NLMSG_HDRLEN;
int nlmsg_msg_size(int payload) { return NLMSG_HDRLEN + payload; }


x86 assembly (clang, -O0):
<nlmsg_msg_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2ee2(%rip),%rax
mov    (%rax),%eax
add    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlmsg_msg_size>:
mov    %edi,%eax
mov    0x2ee7(%rip),%rcx
add    (%rcx),%eax
ret

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

LLVM IR (-O2):
@NLMSG_HDRLEN = global i32 0
define i32 @nlmsg_msg_size(i32 %0) {
%2 = load i32, i32* @NLMSG_HDRLEN
%3 = add nsw i32 %2, %0
ret i32 %3
}
void initGPUCounters(void) {}


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

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

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

LLVM IR (-O2):
define void @initGPUCounters() {
ret void
}
int test_imm_A9int8_mem(signed char *val) {
  return ((*val) & (-0xA9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A9int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffff57,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A9int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff57,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A9int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -169
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
void glDisableVertexAttribArray(unsigned int index) {}


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

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

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

LLVM IR (-O2):
define void @glDisableVertexAttribArray(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_openat();
int /*<<< orphan*/ my_openat2();
int /*<<< orphan*/ my_openat3();
int main() {
  my_openat();
  my_openat2();
  my_openat3();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <my_openat@plt>
mov    $0x0,%al
call   1030 <my_openat2@plt>
mov    $0x0,%al
call   1050 <my_openat3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @my_openat()
%3 = call i32 (...) @my_openat2()
%4 = call i32 (...) @my_openat3()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @my_openat()
%2 = tail call i32 (...) @my_openat2()
%3 = tail call i32 (...) @my_openat3()
ret i32 0
}
int netState() {}


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

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

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

LLVM IR (-O2):
define i32 @netState() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ g();
unsigned short f(unsigned short a, unsigned short b) {
  if (a == b)
    g();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movzwl -0x4(%rbp),%eax
movzwl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jne    113d <f+0x2d>
mov    $0x0,%al
call   1030 <g@plt>
movzwl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    %si,%di
jne    1121 <f+0x11>
push   %rax
xor    %eax,%eax
call   1030 <g@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define zeroext i16 @f(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
%6 = load i16, i16* %4
%7 = zext i16 %6 to i32
%8 = load i16, i16* %5
%9 = zext i16 %8 to i32
%10 = icmp eq i32 %7, %9
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (...) @g()
br label %13
13: ; preds = %11, %2
%14 = load i16, i16* %3
ret i16 %14
}

LLVM IR (-O2):
define zeroext i16 @f(i16 zeroext %0, i16 zeroext %1) {
%3 = icmp eq i16 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @g()
br label %6
6: ; preds = %4, %2
ret i16 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void func_intptr(int *i) { printf("%d\n", *i); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @func_intptr(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int div_u32_by_10(scalar_t__);
uint32_t div_u32_mod_10(uint32_t n) { return n - (div_u32_by_10(n) * 10); }


x86 assembly (clang, -O0):
<div_u32_mod_10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <div_u32_by_10@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
imul   $0xa,%ecx,%ecx
movslq %ecx,%rcx
sub    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_u32_mod_10>:
push   %rbx
mov    %rdi,%rbx
call   1030 <div_u32_by_10@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%eax
cltq
sub    %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @div_u32_mod_10(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = call i32 @div_u32_by_10(i64 %4)
%6 = mul nsw i32 %5, 10
%7 = sext i32 %6 to i64
%8 = sub nsw i64 %3, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @div_u32_mod_10(i64 %0) {
%2 = tail call i32 @div_u32_by_10(i64 %0)
%3 = mul nsw i32 %2, 10
%4 = sext i32 %3 to i64
%5 = sub nsw i64 %0, %4
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ __infer_nondet_int();
wint_t ungetwc(wint_t c, FILE *stream) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @ungetwc(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = call i32 (...) @__infer_nondet_int()
ret i32 %5
}

LLVM IR (-O2):
define i32 @ungetwc(i32 %0, i32* nocapture readnone %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
ret i32 %3
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ doubletimeval(double, struct timeval *);
double timevaldouble(struct timeval *);
void sqtime(struct timeval *Time, struct timeval *SqTime) {
  double sec;
  sec = timevaldouble(Time);
  sec *= sec;
  doubletimeval(sec, SqTime);
}


x86 assembly (clang, -O0):
<sqtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <timevaldouble@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
call   1040 <doubletimeval@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqtime>:
push   %rbx
mov    %rsi,%rbx
call   1030 <timevaldouble@plt>
mulsd  %xmm0,%xmm0
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <doubletimeval@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define void @sqtime(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
%5 = alloca double
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%6 = load %struct.timeval*, %struct.timeval** %3
%7 = call double @timevaldouble(%struct.timeval* %6)
store double %7, double* %5
%8 = load double, double* %5
%9 = load double, double* %5
%10 = fmul double %9, %8
store double %10, double* %5
%11 = load double, double* %5
%12 = load %struct.timeval*, %struct.timeval** %4
%13 = call i32 @doubletimeval(double %11, %struct.timeval* %12)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @sqtime(%struct.timeval* %0, %struct.timeval* %1) {
%3 = tail call double @timevaldouble(%struct.timeval* %0)
%4 = fmul double %3, %3
%5 = tail call i32 @doubletimeval(double %4, %struct.timeval* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cdgsum2d(int, char *, char *, int, int, double *, int, int,
                            int);
void wcc_Cdgsum2d(int ConTxt, char *scope, char *top, int m, int n, char *A,
                  int lda, int rdest, int cdest) {
  Cdgsum2d(ConTxt, scope, top, m, n, (double *)A, lda, rdest, cdest);
}


x86 assembly (clang, -O0):
<wcc_Cdgsum2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <Cdgsum2d@plt>
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @wcc_Cdgsum2d(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i8* %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %10
store i8* %1, i8** %11
store i8* %2, i8** %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i8* %5, i8** %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%19 = load i32, i32* %10
%20 = load i8*, i8** %11
%21 = load i8*, i8** %12
%22 = load i32, i32* %13
%23 = load i32, i32* %14
%24 = load i8*, i8** %15
%25 = bitcast i8* %24 to double*
%26 = load i32, i32* %16
%27 = load i32, i32* %17
%28 = load i32, i32* %18
%29 = call i32 @Cdgsum2d(i32 %19, i8* %20, i8* %21, i32 %22, i32 %23, double* %25, i32 %26, i32 %27, i32 %28)
ret void
}

LLVM IR (-O2):
define void @wcc_Cdgsum2d(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i8* %5, i32 %6, i32 %7, i32 %8) {
%10 = bitcast i8* %5 to double*
%11 = tail call i32 @Cdgsum2d(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, double* %10, i32 %6, i32 %7, i32 %8)
ret void
}