xunge/DecIR huggingface dataset:
__attribute__((no, noclone)) signed __int128 t110_3sub(signed __int128 y) {
  signed __int128 r;
  if (__builtin_sub_overflow((signed __int128)(2), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t110_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rax
xor    %ecx,%ecx
mov    $0x2,%edx
sub    %rsi,%rdx
sbb    %rax,%rcx
seto   %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    115d <t110_3sub+0x4d>
jmp    1164 <t110_3sub+0x54>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t110_3sub>:
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
mov    $0x2,%ebx
sub    %rdi,%rbx
sbb    %rsi,%r14
jno    112b <t110_3sub+0x1b>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t110_3sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 2, i128 %11)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t110_3sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 2, i128 %6)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
any(c, str) register int c;
register char *str;
{
  while (*str)
    if (c == *str++)
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<any>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <any+0x46>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1141 <any+0x41>
movl   $0x1,-0x4(%rbp)
jmp    114d <any+0x4d>
jmp    110b <any+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<any>:
movsbl (%rsi),%eax
test   %eax,%eax
je     1115 <any+0x15>
add    $0x1,%rsi
cmp    %edi,%eax
jne    1100 <any>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @any(i32 %0, i8* nocapture %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %1, %2 ], [ %8, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = sext i8 %5 to i32
%10 = icmp eq i32 %9, %0
br i1 %10, label %11, label %3
11: ; preds = %3, %7
%12 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %12
}
int search(char *p, char c) {
  while (*p != '\0') {
    if (*p == c)
      return 1;
    p++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114e <search+0x4e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    113d <search+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1155 <search+0x55>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110e <search+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1120 <search+0x20>
add    $0x1,%rdi
nopl   0x0(%rax)
cmp    %sil,%cl
je     1121 <search+0x21>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <search+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @search(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = load i8, i8* %12
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %2, %5
%9 = phi i8 [ %6, %5 ], [ %3, %2 ]
%10 = phi i8* [ %12, %5 ], [ %0, %2 ]
%11 = icmp eq i8 %9, %1
%12 = getelementptr inbounds i8, i8* %10, i64 1
br i1 %11, label %13, label %5
13: ; preds = %8, %5, %2
%14 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %14
}
XRotateBuffers() {}


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

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

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

LLVM IR (-O2):
define i32 @XRotateBuffers() {
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_EQUALS_int64_t(int64_t const k1, int64_t const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_EQUALS_int64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_EQUALS_int64_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_EQUALS_int64_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_EQUALS_int64_t(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int cmatch(char c, char mstr[]) {
  int e;
  int value = 0;
  for (e = 0; mstr[e] != '\0'; ++e) {
    if (c == mstr[e]) {
      value = 1;
    }
  }
  return value;
}


x86 assembly (clang, -O0):
<cmatch>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1163 <cmatch+0x63>
movsbl -0x1(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1150 <cmatch+0x50>
movl   $0x1,-0x18(%rbp)
jmp    1155 <cmatch+0x55>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111c <cmatch+0x1c>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmatch>:
mov    (%rsi),%cl
test   %cl,%cl
je     1132 <cmatch+0x32>
add    $0x1,%rsi
xor    %eax,%eax
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    %dil,%cl
cmove  %edx,%eax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <cmatch+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @cmatch(i8 signext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %3
store i8* %1, i8** %4
store i32 0, i32* %6
store i32 0, i32* %5
br label %7
7: ; preds = %27, %2
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %30
15: ; preds = %7
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%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 = sext i8 %22 to i32
%24 = icmp eq i32 %17, %23
br i1 %24, label %25, label %26
25: ; preds = %15
store i32 1, i32* %6
br label %26
26: ; preds = %25, %15
br label %27
27: ; preds = %26
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %7
30: ; preds = %7
%31 = load i32, i32* %6
ret i32 %31
}

LLVM IR (-O2):
define i32 @cmatch(i8 signext %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %11, %5 ], [ 0, %2 ]
%7 = phi i8 [ %13, %5 ], [ %3, %2 ]
%8 = phi i32 [ %10, %5 ], [ 0, %2 ]
%9 = icmp eq i8 %7, %0
%10 = select i1 %9, i32 1, i32 %8
%11 = add nuw nsw i64 %6, 1
%12 = getelementptr inbounds i8, i8* %1, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %10, %5 ]
ret i32 %16
}
_Inodg(ch) char ch;
{
  if (_Idigt(ch, 10) >= 0)
    return (0);
  switch (ch) {
  case 'E':
  case 'e':
  case '.':
  case '+':
  case '-':
    return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<_Inodg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
mov    $0xa,%esi
mov    $0x0,%al
call   1030 <_Idigt@plt>
cmp    $0x0,%eax
jl     1143 <_Inodg+0x33>
movl   $0x0,-0x4(%rbp)
jmp    11a1 <_Inodg+0x91>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2b,%eax
je     118e <_Inodg+0x7e>
jmp    1158 <_Inodg+0x48>
mov    -0xc(%rbp),%eax
add    $0xffffffd3,%eax
sub    $0x2,%eax
jb     118e <_Inodg+0x7e>
jmp    116c <_Inodg+0x5c>
mov    -0xc(%rbp),%eax
sub    $0x45,%eax
je     118e <_Inodg+0x7e>
jmp    117d <_Inodg+0x6d>
mov    -0xc(%rbp),%eax
sub    $0x65,%eax
jne    119a <_Inodg+0x8a>
jmp    118e <_Inodg+0x7e>
movl   $0x0,-0x4(%rbp)
jmp    11a1 <_Inodg+0x91>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Inodg>:
push   %rbp
push   %rbx
push   %rax
movsbl %dil,%ebx
xor    %ebp,%ebp
mov    %ebx,%edi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <_Idigt@plt>
test   %eax,%eax
jns    1143 <_Inodg+0x33>
add    $0xffffffd5,%ebx
cmp    $0x3a,%ebx
ja     114c <_Inodg+0x3c>
movabs $0x40000000400000d,%rax
bt     %rbx,%rax
jae    114c <_Inodg+0x3c>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    $0x1,%ebp
jmp    1143 <_Inodg+0x33>

LLVM IR (-O0):
define i32 @_Inodg(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = call i32 (i32, i32, ...) bitcast (i32 (...)* @_Idigt to i32 (i32, i32, ...)*)(i32 %6, i32 10)
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %15
10: ; preds = %1
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
switch i32 %12, label %14 [
i32 69, label %13
i32 101, label %13
i32 46, label %13
i32 43, label %13
i32 45, label %13
]
13: ; preds = %10, %10, %10, %10, %10
store i32 0, i32* %2
br label %15
14: ; preds = %10
store i32 1, i32* %2
br label %15
15: ; preds = %14, %13, %9
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @_Inodg(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @_Idigt to i32 (i32, i32, ...)*)(i32 %3, i32 10)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %8, label %6
6: ; preds = %1
switch i32 %3, label %7 [
i32 69, label %8
i32 101, label %8
i32 46, label %8
i32 43, label %8
i32 45, label %8
]
7: ; preds = %6
br label %8
8: ; preds = %6, %6, %6, %6, %6, %1, %7
%9 = phi i32 [ 1, %7 ], [ 0, %1 ], [ 0, %6 ], [ 0, %6 ], [ 0, %6 ], [ 0, %6 ], [ 0, %6 ]
ret i32 %9
}
int bar(int i) { return (11 - i); }


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

x86 assembly (clang, -O2):
<bar>:
mov    $0xb,%eax
sub    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = sub nsw i32 11, %0
ret i32 %2
}
double foo05(double a, double b, double c) { return (a + b * c); }


x86 assembly (clang, -O0):
<foo05>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo05>:
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @foo05(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 = load double, double* %6
%10 = call double @llvm.fmuladd.f64(double %8, double %9, double %7)
ret double %10
}

LLVM IR (-O2):
define double @foo05(double %0, double %1, double %2) {
%4 = tail call double @llvm.fmuladd.f64(double %1, double %2, double %0)
ret double %4
}
void mtime_set_events(int e) {}


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

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

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

LLVM IR (-O2):
define void @mtime_set_events(i32 %0) {
ret void
}
/* Variables and functions */
double exp(double);
double sqrt(double);
double pl_gau(double x, double mu, double sigma) {
  return (1.0 / sqrt(2.0 * 3.1415) * sigma) *
         exp(-0.5 * ((x - mu) * (x - mu)) / (sigma * sigma));
}


x86 assembly (clang, -O0):
<pl_gau>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xed1(%rip),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xeb9(%rip),%xmm0
divsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe83(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl_gau>:
push   %rax
movsd  0xee7(%rip),%xmm3
mulsd  %xmm2,%xmm3
movsd  %xmm3,(%rsp)
subsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm0
mulsd  0xed6(%rip),%xmm0
mulsd  %xmm2,%xmm2
divsd  %xmm2,%xmm0
call   1030 <exp@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @pl_gau(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 = call double @sqrt(double 6.283000e+00)
%8 = fdiv double 1.000000e+00, %7
%9 = load double, double* %6
%10 = fmul double %8, %9
%11 = load double, double* %4
%12 = load double, double* %5
%13 = fsub double %11, %12
%14 = load double, double* %4
%15 = load double, double* %5
%16 = fsub double %14, %15
%17 = fmul double %13, %16
%18 = fmul double -5.000000e-01, %17
%19 = load double, double* %6
%20 = load double, double* %6
%21 = fmul double %19, %20
%22 = fdiv double %18, %21
%23 = call double @exp(double %22)
%24 = fmul double %10, %23
ret double %24
}

LLVM IR (-O2):
define double @pl_gau(double %0, double %1, double %2) {
%4 = fmul double %2, 0x3FD9885DE0B2E04B
%5 = fsub double %0, %1
%6 = fmul double %5, %5
%7 = fmul double %6, -5.000000e-01
%8 = fmul double %2, %2
%9 = fdiv double %7, %8
%10 = tail call double @exp(double %9)
%11 = fmul double %4, %10
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ work();
int main(void) {
  freopen("toy.in", "r", stdin);
  freopen("toy.out", "w", stdout);
  work();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
lea    0xec1(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edx
lea    0xeae(%rip),%rdi
lea    0xeaf(%rip),%rsi
call   1040 <freopen@plt>
mov    $0x0,%al
call   1030 <work@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
lea    0xecf(%rip),%rdi
lea    0xecf(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edx
lea    0xebc(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1040 <freopen@plt>
xor    %eax,%eax
call   1030 <work@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"toy.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [8 x i8] c"toy.out\00"
@.str.3 = [2 x i8] c"w\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdin
%3 = call i32 @freopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stdout
%5 = call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @work()
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"toy.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [8 x i8] c"toy.out\00"
@.str.3 = [2 x i8] c"w\00"
@stdout = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @freopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stdout
%4 = tail call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @work()
ret i32 0
}
tcapcres() { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @tcapcres() {
ret i32 1
}
void fn395A() { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ cl_rhash_move_higher(struct cl_rhash *);
scalar_t__ cl_rhash_should_move_higher(struct cl_rhash *);
void cl_rhash_check_move_higher(struct cl_rhash *hash) {
  if (cl_rhash_should_move_higher(hash))
    cl_rhash_move_higher(hash);
}


x86 assembly (clang, -O0):
<cl_rhash_check_move_higher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cl_rhash_should_move_higher@plt>
cmp    $0x0,%rax
je     1148 <cl_rhash_check_move_higher+0x28>
mov    -0x8(%rbp),%rdi
call   1040 <cl_rhash_move_higher@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cl_rhash_check_move_higher>:
push   %rbx
mov    %rdi,%rbx
call   1030 <cl_rhash_should_move_higher@plt>
test   %rax,%rax
je     1137 <cl_rhash_check_move_higher+0x17>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <cl_rhash_move_higher@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.cl_rhash = type { i32 }
define void @cl_rhash_check_move_higher(%struct.cl_rhash* %0) {
%2 = alloca %struct.cl_rhash*
store %struct.cl_rhash* %0, %struct.cl_rhash** %2
%3 = load %struct.cl_rhash*, %struct.cl_rhash** %2
%4 = call i64 @cl_rhash_should_move_higher(%struct.cl_rhash* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load %struct.cl_rhash*, %struct.cl_rhash** %2
%8 = call i32 @cl_rhash_move_higher(%struct.cl_rhash* %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct.cl_rhash = type { i32 }
define void @cl_rhash_check_move_higher(%struct.cl_rhash* %0) {
%2 = tail call i64 @cl_rhash_should_move_higher(%struct.cl_rhash* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @cl_rhash_move_higher(%struct.cl_rhash* %0)
br label %6
6: ; preds = %4, %1
ret void
}
int execute_pivot_root() { return 0; }


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

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

LLVM IR (-O0):
define i32 @execute_pivot_root() {
ret i32 0
}

LLVM IR (-O2):
define i32 @execute_pivot_root() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ execve(char *, char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main() {
  char *array[2];
  array[0] = "/bin/sh";
  array[1] = NULL;
  execve(array[0], array, NULL);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <execve@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
mov    %rdi,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <execve@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/sh\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i8*]
store i32 0, i32* %1
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 1
store i8* null, i8** %4
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
%6 = load i8*, i8** %5
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
%8 = call i32 @execve(i8* %6, i8** %7, i32* null)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/sh\00"
define i32 @main() {
%1 = alloca [2 x i8*]
%2 = bitcast [2 x i8*]* %1 to i8*
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
store i8* null, i8** %4
%5 = call i32 @execve(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3, i32* null)
%6 = call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void safe_close(FILE *file) {
  if (file != NULL) {
    fclose(file);
  }
}


x86 assembly (clang, -O0):
<safe_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <safe_close+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_close>:
test   %rdi,%rdi
je     111a <safe_close+0xa>
jmp    1030 <fclose@plt>
ret

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

LLVM IR (-O2):
define void @safe_close(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @fclose(i32* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
float getCompassAngleFromApi();
int /*<<< orphan*/ printf(char *, float);
int main(int argc, char **argv) {
  float angle;
  angle = getCompassAngleFromApi();
  printf("angle=%0.1f\n", angle);
  return 0;
}


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)
mov    $0x0,%al
call   1040 <getCompassAngleFromApi@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getCompassAngleFromApi@plt>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"angle=%0.1f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call float (...) @getCompassAngleFromApi()
store float %7, float* %6
%8 = load float, float* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"angle=%0.1f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call float (...) @getCompassAngleFromApi()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Print(char *);
int /*<<< orphan*/ nap(int);
void nomore(void) {
  Print("Sorry man, I ain't got no more of that stuff.");
  nap(2200);
}


x86 assembly (clang, -O0):
<nomore>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <Print@plt>
mov    $0x898,%edi
call   1030 <nap@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nomore>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <Print@plt>
mov    $0x898,%edi
pop    %rax
jmp    1030 <nap@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Sorry man, I ain't got no more of that stuff.\00"
define void @nomore() {
%1 = call i32 @Print(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @nap(i32 2200)
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"Sorry man, I ain't got no more of that stuff.\00"
define void @nomore() {
%1 = tail call i32 @Print(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @nap(i32 2200)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ClrTCLK();
int /*<<< orphan*/ DR_Shift16(int);
int /*<<< orphan*/ IR_Shift(int);
int /*<<< orphan*/ SetInstrFetch();
int /*<<< orphan*/ SetTCLK();
void HaltCPU(void) {
  SetInstrFetch();
  IR_Shift(0x82);
  DR_Shift16(0x3FFF);
  ClrTCLK();
  IR_Shift(0xC8);
  DR_Shift16(0x2409);
  SetTCLK();
}


x86 assembly (clang, -O0):
<HaltCPU>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <SetInstrFetch@plt>
mov    $0x82,%edi
call   1070 <IR_Shift@plt>
mov    $0x3fff,%edi
call   1040 <DR_Shift16@plt>
mov    $0x0,%al
call   1050 <ClrTCLK@plt>
mov    $0xc8,%edi
call   1070 <IR_Shift@plt>
mov    $0x2409,%edi
call   1040 <DR_Shift16@plt>
mov    $0x0,%al
call   1030 <SetTCLK@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HaltCPU>:
push   %rax
xor    %eax,%eax
call   1060 <SetInstrFetch@plt>
mov    $0x82,%edi
call   1070 <IR_Shift@plt>
mov    $0x3fff,%edi
call   1040 <DR_Shift16@plt>
xor    %eax,%eax
call   1050 <ClrTCLK@plt>
mov    $0xc8,%edi
call   1070 <IR_Shift@plt>
mov    $0x2409,%edi
call   1040 <DR_Shift16@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <SetTCLK@plt>

LLVM IR (-O0):
define void @HaltCPU() {
%1 = call i32 (...) @SetInstrFetch()
%2 = call i32 @IR_Shift(i32 130)
%3 = call i32 @DR_Shift16(i32 16383)
%4 = call i32 (...) @ClrTCLK()
%5 = call i32 @IR_Shift(i32 200)
%6 = call i32 @DR_Shift16(i32 9225)
%7 = call i32 (...) @SetTCLK()
ret void
}

LLVM IR (-O2):
define void @HaltCPU() {
%1 = tail call i32 (...) @SetInstrFetch()
%2 = tail call i32 @IR_Shift(i32 130)
%3 = tail call i32 @DR_Shift16(i32 16383)
%4 = tail call i32 (...) @ClrTCLK()
%5 = tail call i32 @IR_Shift(i32 200)
%6 = tail call i32 @DR_Shift16(i32 9225)
%7 = tail call i32 (...) @SetTCLK()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int open(char *, int /*<<< orphan*/);
int InitIoctlInterface(void) { return open("/dev/iomtr_kstat", O_RDONLY); }


x86 assembly (clang, -O0):
<InitIoctlInterface>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <open@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitIoctlInterface>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <open@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"/dev/iomtr_kstat\00"
@O_RDONLY = global i32 0
define i32 @InitIoctlInterface() {
%1 = load i32, i32* @O_RDONLY
%2 = call i32 @open(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [17 x i8] c"/dev/iomtr_kstat\00"
@O_RDONLY = global i32 0
define i32 @InitIoctlInterface() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @open(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ Sys_failure(char *);
int sigemptyset(int /*<<< orphan*/ *);
void Sigemptyset(sigset_t *set) {
  int retval;
  retval = sigemptyset(set);
  if (retval == -1)
    Sys_failure("sigemptyset");
}


x86 assembly (clang, -O0):
<Sigemptyset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sigemptyset@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    114e <Sigemptyset+0x2e>
lea    0xeb7(%rip),%rdi
call   1040 <Sys_failure@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sigemptyset>:
push   %rax
call   1030 <sigemptyset@plt>
cmp    $0xffffffff,%eax
je     112d <Sigemptyset+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <Sys_failure@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"sigemptyset\00"
define void @Sigemptyset(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @sigemptyset(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @Sys_failure(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"sigemptyset\00"
define void @Sigemptyset(i32* %0) {
%2 = tail call i32 @sigemptyset(i32* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @Sys_failure(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
int test_imm_98int8_mem(signed char *val) {
  return ((*val) & (-0x98 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_98int8_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, -152
%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_98int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -152
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Variables and functions */
int yahoo_M1ObfuscatedTableCommon(int, int, unsigned char *);
int yahoo_f01_38(int Salt, int Parameter) {
  static unsigned char LUT[32] = {
      0x00, 0x1C, 0x0E, 0x0C, 0x06, 0x16, 0x09, 0x12, 0x01, 0x13, 0x0B,
      0x14, 0x11, 0x08, 0x04, 0x18, 0x10, 0x1B, 0x15, 0x03, 0x02, 0x19,
      0x1A, 0x17, 0x1E, 0x1F, 0x0F, 0x07, 0x0D, 0x05, 0x1D, 0x0A,
  };
  return yahoo_M1ObfuscatedTableCommon(Salt, Parameter, LUT);
}


x86 assembly (clang, -O0):
<yahoo_f01_38>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    0x2f05(%rip),%rdx
call   1030 <yahoo_M1ObfuscatedTableCommon@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_38>:
lea    0x2f19(%rip),%rdx
jmp    1030 <yahoo_M1ObfuscatedTableCommon@plt>

LLVM IR (-O0):
@yahoo_f01_38.LUT = internal global [32 x i8] c"\00\1C\0E\0C\06\16\09\12\01\13\0B\14\11\08\04\18\10\1B\15\03\02\19\1A\17\1E\1F\0F\07\0D\05\1D\0A"
define i32 @yahoo_f01_38(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 @yahoo_M1ObfuscatedTableCommon(i32 %5, i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_38.LUT, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@yahoo_f01_38.LUT = internal global [32 x i8] c"\00\1C\0E\0C\06\16\09\12\01\13\0B\14\11\08\04\18\10\1B\15\03\02\19\1A\17\1E\1F\0F\07\0D\05\1D\0A"
define i32 @yahoo_f01_38(i32 %0, i32 %1) {
%3 = tail call i32 @yahoo_M1ObfuscatedTableCommon(i32 %0, i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_38.LUT, i64 0, i64 0))
ret i32 %3
}
void ENGINE_load_cryptodev(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ENGINE_load_cryptodev() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int dobldobl_diagonal_homotopy(int a, int b) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(289, &a, &b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<dobldobl_diagonal_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x18(%rbp),%rcx
mov    $0x121,%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dobldobl_diagonal_homotopy>:
push   %rax
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x121,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dobldobl_diagonal_homotopy(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load double*, double** %6
%8 = call i32 @_ada_use_c2phc4c(i32 289, i32* %3, i32* %4, double* %7, i32 0)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @dobldobl_diagonal_homotopy(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @_ada_use_c2phc4c(i32 289, i32* %3, i32* %4, double* undef, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void TDB_cmd_help_print_control() { printf("control help goes here.\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"control help goes here.\0A\00"
define void @TDB_cmd_help_print_control() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"control help goes here.\00"
define void @TDB_cmd_help_print_control() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned short int kern_ntons(x)
unsigned short int x;
{ return ((((x) >> 8) | ((x) << 8)) & 0xffff); }


x86 assembly (clang, -O0):
<kern_ntons>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
movzwl -0x2(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
and    $0xffff,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kern_ntons>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @kern_ntons(i32 %0) {
%2 = alloca i16
%3 = trunc i32 %0 to i16
store i16 %3, i16* %2
%4 = load i16, i16* %2
%5 = zext i16 %4 to i32
%6 = ashr i32 %5, 8
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = shl i32 %8, 8
%10 = or i32 %6, %9
%11 = and i32 %10, 65535
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define zeroext i16 @kern_ntons(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
ret i16 %3
}
/* Variables and functions */
int /*<<< orphan*/ machine_restart(char *);
void machine_emergency_restart(void) { machine_restart("panic"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"panic\00"
define void @machine_emergency_restart() {
%1 = tail call i32 @machine_restart(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a();
void dummy(void) { a(); }


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

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

LLVM IR (-O0):
define void @dummy() {
%1 = call i32 (...) @a()
ret void
}

LLVM IR (-O2):
define void @dummy() {
%1 = tail call i32 (...) @a()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int syscall(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
            int /*<<< orphan*/ *);
int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid) {
  return syscall(209, ruid, euid, suid);
}


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

x86 assembly (clang, -O2):
<getresuid>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xd1,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @getresuid(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i32*, i32** %6
%10 = call i32 @syscall(i32 209, i32* %7, i32* %8, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @getresuid(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @syscall(i32 209, i32* %0, i32* %1, i32* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ cleanup();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ setup();
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ test_simple_file();
int main() {
  int r = 0;
  setup();
  do {
    if (!(test_simple_file()))
      fprintf(stderr, "test_simple_file"
                      " passed\n");
    else
      r = 1;
  } while (0);
  ;
  cleanup();
  return r;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1060 <setup@plt>
mov    $0x0,%al
call   1030 <test_simple_file@plt>
cmp    $0x0,%eax
jne    1187 <main+0x47>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
lea    0xe83(%rip),%rsi
call   1040 <fprintf@plt>
jmp    118e <main+0x4e>
movl   $0x1,-0x8(%rbp)
jmp    1193 <main+0x53>
mov    $0x0,%al
call   1050 <cleanup@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1060 <setup@plt>
xor    %eax,%eax
call   1030 <test_simple_file@plt>
mov    $0x1,%ebx
test   %eax,%eax
jne    116f <main+0x2f>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
lea    0xe98(%rip),%rsi
call   1040 <fprintf@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <cleanup@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"test_simple_file passed\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @setup()
br label %4
4: ; preds = %0
%5 = call i32 (...) @test_simple_file()
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %11
10: ; preds = %4
store i32 1, i32* %2
br label %11
11: ; preds = %10, %7
br label %12
12: ; preds = %11
%13 = call i32 (...) @cleanup()
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"test_simple_file passed\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @setup()
%2 = tail call i32 (...) @test_simple_file()
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %0, %4
%8 = phi i32 [ 0, %4 ], [ 1, %0 ]
%9 = tail call i32 (...) @cleanup()
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int soln, a = 90, b = 35, c = 20;
  soln = (a > b) + (c < 15);
  printf("%d\n", soln);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5a,-0xc(%rbp)
movl   $0x23,-0x10(%rbp)
movl   $0x14,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0xf,-0x14(%rbp)
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 90, i32* %3
store i32 35, i32* %4
store i32 20, i32* %5
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp sgt i32 %6, %7
%9 = zext i1 %8 to i32
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 15
%12 = zext i1 %11 to i32
%13 = add nsw i32 %9, %12
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ showCookTimeForTurkey(int);
int main(int argc, const char *argv[]) {
  int totalWeight = 10;
  int gibletsWeight = 1;
  int turkeyWeight = totalWeight - gibletsWeight;
  showCookTimeForTurkey(turkeyWeight);
  return 0;
}


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   $0xa,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <showCookTimeForTurkey@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x9,%edi
call   1030 <showCookTimeForTurkey@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @showCookTimeForTurkey(i32 9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ atomic_fetch_and_add(int *, int);
void atomic_inc(int *pw) { atomic_fetch_and_add(pw, 1); }


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

x86 assembly (clang, -O2):
<atomic_inc>:
mov    $0x1,%esi
jmp    1030 <atomic_fetch_and_add@plt>

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

LLVM IR (-O2):
define void @atomic_inc(i32* %0) {
%2 = tail call i32 @atomic_fetch_and_add(i32* %0, i32 1)
ret void
}
void gtk_icon_theme_get_default() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_theme_get_default() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lookNarray(char *, unsigned int);
void lookpointer4array(char *x, int n) {
  lookNarray((char *)x, (unsigned int)(n * 4));
}


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

x86 assembly (clang, -O2):
<lookpointer4array>:
shl    $0x2,%esi
jmp    1030 <lookNarray@plt>

LLVM IR (-O0):
define void @lookpointer4array(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 = mul nsw i32 %6, 4
%8 = call i32 @lookNarray(i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @lookpointer4array(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 2
%4 = tail call i32 @lookNarray(i8* %0, i32 %3)
ret void
}