xunge/DecIR huggingface dataset:
/* Type definitions */
struct timespec {
  long long tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
scalar_t__ specinf(struct timespec *);
long long spectonsec(struct timespec *ts) {
  long long nsecs = 0;
  if (specinf(ts))
    return -1;
  nsecs = ts->tv_sec * (1000LL * 1000000LL);
  nsecs += ts->tv_nsec;
  return nsecs;
}


x86 assembly (clang, -O0):
<spectonsec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <specinf@plt>
cmp    $0x0,%rax
je     1144 <spectonsec+0x34>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    116b <spectonsec+0x5b>
mov    -0x10(%rbp),%rax
imul   $0x3b9aca00,(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spectonsec>:
push   %rbx
mov    %rdi,%rbx
call   1030 <specinf@plt>
mov    %rax,%rcx
mov    $0xffffffffffffffff,%rax
test   %rcx,%rcx
je     112a <spectonsec+0x1a>
pop    %rbx
ret
imul   $0x3b9aca00,(%rbx),%rax
add    0x8(%rbx),%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define i64 @spectonsec(%struct.timespec* %0) {
%2 = alloca i64
%3 = alloca %struct.timespec*
%4 = alloca i64
store %struct.timespec* %0, %struct.timespec** %3
store i64 0, i64* %4
%5 = load %struct.timespec*, %struct.timespec** %3
%6 = call i64 @specinf(%struct.timespec* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i64 -1, i64* %2
br label %20
9: ; preds = %1
%10 = load %struct.timespec*, %struct.timespec** %3
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %10, i32 0, i32 0
%12 = load i64, i64* %11
%13 = mul nsw i64 %12, 1000000000
store i64 %13, i64* %4
%14 = load %struct.timespec*, %struct.timespec** %3
%15 = getelementptr inbounds %struct.timespec, %struct.timespec* %14, i32 0, i32 1
%16 = load i64, i64* %15
%17 = load i64, i64* %4
%18 = add nsw i64 %17, %16
store i64 %18, i64* %4
%19 = load i64, i64* %4
store i64 %19, i64* %2
br label %20
20: ; preds = %9, %8
%21 = load i64, i64* %2
ret i64 %21
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define i64 @spectonsec(%struct.timespec* %0) {
%2 = tail call i64 @specinf(%struct.timespec* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%6 = load i64, i64* %5
%7 = mul nsw i64 %6, 1000000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
br label %11
11: ; preds = %1, %4
%12 = phi i64 [ %10, %4 ], [ -1, %1 ]
ret i64 %12
}
/* Variables and functions */
char *g_utf8_find_next_char(char const *, char const *);
char *utf8_find_next_char(const char *p, const char *end) {
  return g_utf8_find_next_char(p, end);
}


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

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

LLVM IR (-O0):
define i8* @utf8_find_next_char(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 = load i8*, i8** %4
%7 = call i8* @g_utf8_find_next_char(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @utf8_find_next_char(i8* %0, i8* %1) {
%3 = tail call i8* @g_utf8_find_next_char(i8* %0, i8* %1)
ret i8* %3
}
int foo(int predicate) {
  int x;
  {
    x = 0;
    {
      if (predicate == 0) {
        goto case_0;
      }
      if (predicate == 1) {
        goto case_1;
      }
      if (predicate == 2) {
        goto case_2;
      }
      if (predicate == 3) {
        goto case_3;
      }
      goto switch_default;
    case_0:
      return (111);
    case_1:
      x++;
    case_2:
      return (x + 3);
    case_3:
      goto switch_break;
    switch_default:
      return (222);
    switch_break:;
    }
    return (333);
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <foo+0x1d>
jmp    114f <foo+0x4f>
cmpl   $0x1,-0x8(%rbp)
jne    112c <foo+0x2c>
jmp    115b <foo+0x5b>
cmpl   $0x2,-0x8(%rbp)
jne    113b <foo+0x3b>
jmp    1164 <foo+0x64>
cmpl   $0x3,-0x8(%rbp)
jne    114a <foo+0x4a>
jmp    1172 <foo+0x72>
jmp    1177 <foo+0x77>
movl   $0x6f,-0x4(%rbp)
jmp    118a <foo+0x8a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x4(%rbp)
jmp    118a <foo+0x8a>
jmp    1183 <foo+0x83>
movl   $0xde,-0x4(%rbp)
jmp    118a <foo+0x8a>
movl   $0x14d,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x3,%edi
ja     1129 <foo+0x29>
mov    $0x3,%ecx
mov    $0x6f,%eax
mov    %edi,%edx
lea    0xee8(%rip),%rsi
movslq (%rsi,%rdx,4),%rdx
add    %rsi,%rdx
jmp    *%rdx
mov    $0x4,%ecx
mov    %ecx,%eax
ret
mov    $0xde,%eax
ret
mov    $0x14d,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %21
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %8
br label %22
12: ; preds = %8
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %16
15: ; preds = %12
br label %25
16: ; preds = %12
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 3
br i1 %18, label %19, label %20
19: ; preds = %16
br label %28
20: ; preds = %16
br label %29
21: ; preds = %7
store i32 111, i32* %2
br label %31
22: ; preds = %11
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %25
25: ; preds = %22, %15
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 3
store i32 %27, i32* %2
br label %31
28: ; preds = %19
br label %30
29: ; preds = %20
store i32 222, i32* %2
br label %31
30: ; preds = %28
store i32 333, i32* %2
br label %31
31: ; preds = %30, %29, %25, %21
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
switch i32 %0, label %5 [
i32 0, label %7
i32 1, label %2
i32 2, label %3
i32 3, label %6
]
2: ; preds = %1
br label %3
3: ; preds = %1, %2
%4 = phi i32 [ 4, %2 ], [ 3, %1 ]
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %3
%8 = phi i32 [ %4, %3 ], [ 333, %6 ], [ 222, %5 ], [ 111, %1 ]
ret i32 %8
}
char *remove_spaces(char *str) {
  char *p, *q;
  p = q = str;
  while (*p != 0)
    if ((*p) != ' ') {
      *q = *p;
      q++;
      p++;
    } else
      p++;
  *q = 0;
  return str;
}


x86 assembly (clang, -O0):
<remove_spaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116e <remove_spaces+0x6e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     115d <remove_spaces+0x5d>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1169 <remove_spaces+0x69>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1114 <remove_spaces+0x14>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_spaces>:
mov    %rdi,%rax
mov    %rdi,%rdx
mov    %rdi,%rsi
jmp    1114 <remove_spaces+0x14>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdx
movzbl (%rdx),%ecx
cmp    $0x20,%cl
je     1110 <remove_spaces+0x10>
test   %cl,%cl
je     1128 <remove_spaces+0x28>
mov    %cl,(%rsi)
add    $0x1,%rsi
jmp    1110 <remove_spaces+0x10>
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define i8* @remove_spaces(i8* returned %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i8* [ %0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %6 [
i8 0, label %11
i8 32, label %8
]
6: ; preds = %2
store i8 %5, i8* %4
%7 = getelementptr inbounds i8, i8* %4, i64 1
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
store i8 0, i8* %4
ret i8* %0
}
/* Variables and functions */
int get_version_1();
int get_version_2();
int main(void) {
  int v1 = get_version_1();
  int v2;
  v2 = get_version_2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @get_version_1()
%2 = tail call i32 (...) @get_version_2()
ret i32 0
}
int testStaticLibRequiredPrivate(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @testStaticLibRequiredPrivate() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;
typedef int int64_t;

/* Variables and functions */
int var_get_u64(int /*<<< orphan*/ *, int /*<<< orphan*/ const *, int *);
int var_get_s64(uint8_t *cp, const uint8_t *endp, int64_t *i) {
  int b = var_get_u64(cp, endp, (uint64_t *)i);
  *i = ((uint64_t)*i >> 1) ^ -(int64_t)(*i & 1);
  return b;
}


x86 assembly (clang, -O0):
<var_get_s64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <var_get_u64@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
sar    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
and    $0x1,%edx
xor    %eax,%eax
sub    %edx,%eax
xor    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<var_get_s64>:
push   %rbx
mov    %rdx,%rbx
call   1030 <var_get_u64@plt>
mov    (%rbx),%ecx
mov    %ecx,%edx
sar    %edx
and    $0x1,%ecx
neg    %ecx
xor    %edx,%ecx
mov    %ecx,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @var_get_s64(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%8 = load i32*, i32** %4
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = call i32 @var_get_u64(i32* %8, i32* %9, i32* %10)
store i32 %11, i32* %7
%12 = load i32*, i32** %6
%13 = load i32, i32* %12
%14 = ashr i32 %13, 1
%15 = load i32*, i32** %6
%16 = load i32, i32* %15
%17 = and i32 %16, 1
%18 = sub nsw i32 0, %17
%19 = xor i32 %14, %18
%20 = load i32*, i32** %6
store i32 %19, i32* %20
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @var_get_s64(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @var_get_u64(i32* %0, i32* %1, i32* %2)
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
%7 = and i32 %5, 1
%8 = sub nsw i32 0, %7
%9 = xor i32 %6, %8
store i32 %9, i32* %2
ret i32 %4
}
int isPower2(int x) { return !(!x | x >> 31 | x & x + ~0); }


x86 assembly (clang, -O0):
<isPower2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPower2>:
xor    %eax,%eax
mov    %edi,%ecx
sub    $0x1,%ecx
setb   %al
and    %edi,%ecx
sar    $0x1f,%edi
or     %eax,%edi
xor    %eax,%eax
or     %ecx,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isPower2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = load i32, i32* %2
%8 = ashr i32 %7, 31
%9 = or i32 %6, %8
%10 = load i32, i32* %2
%11 = load i32, i32* %2
%12 = add nsw i32 %11, -1
%13 = and i32 %10, %12
%14 = or i32 %9, %13
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @isPower2(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
%4 = ashr i32 %0, 31
%5 = or i32 %4, %3
%6 = add nsw i32 %0, -1
%7 = and i32 %6, %0
%8 = or i32 %5, %7
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
short tan(short);
short internal_tan_s(short value) { return tan(value); }


x86 assembly (clang, -O0):
<internal_tan_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edi
call   1030 <tan@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @internal_tan_s(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call signext i16 @tan(i16 signext %3)
ret i16 %4
}

LLVM IR (-O2):
define signext i16 @internal_tan_s(i16 signext %0) {
%2 = tail call signext i16 @tan(i16 signext %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ nrerror(char *);
void usage(void) {
  nrerror("usage:\n"
          "RNAplfold [-L span] [-W winsize] [-u size of unpaired region]\n"
          "          [-T temp] [-4] [-o] [-d[0|1|2]] [-noGU] [-noCloseGU]\n"
          "          [-noLP] [-P paramfile] [-nsp pairs] [-noconv] [-O]\n");
}


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

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

LLVM IR (-O0):
@.str = [194 x i8] c"usage:\0ARNAplfold [-L span] [-W winsize] [-u size of unpaired region]\0A [-T temp] [-4] [-o] [-d[0|1|2]] [-noGU] [-noCloseGU]\0A [-noLP] [-P paramfile] [-nsp pairs] [-noconv] [-O]\0A\00"
define void @usage() {
%1 = call i32 @nrerror(i8* getelementptr inbounds ([194 x i8], [194 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [194 x i8] c"usage:\0ARNAplfold [-L span] [-W winsize] [-u size of unpaired region]\0A [-T temp] [-4] [-o] [-d[0|1|2]] [-noGU] [-noCloseGU]\0A [-noLP] [-P paramfile] [-nsp pairs] [-noconv] [-O]\0A\00"
define void @usage() {
%1 = tail call i32 @nrerror(i8* getelementptr inbounds ([194 x i8], [194 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ is_simple_str_type(char const *);
scalar_t__ is_variabe_int_type(char const *);
int is_variable_simple_type(const char *type) {
  return is_variabe_int_type(type) || is_simple_str_type(type);
}


x86 assembly (clang, -O0):
<is_variable_simple_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <is_variabe_int_type@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    115a <is_variable_simple_type+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <is_simple_str_type@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_variable_simple_type>:
push   %rbx
mov    %rdi,%rbx
call   1040 <is_variabe_int_type@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <is_variable_simple_type+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <is_simple_str_type@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_variable_simple_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @is_variabe_int_type(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @is_simple_str_type(i8* %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_variable_simple_type(i8* %0) {
%2 = tail call i64 @is_variabe_int_type(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @is_simple_str_type(i8* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
ISR(INT1_vect) {
  DEBUG("ISR "
        "INT1"
        " occured");
}


x86 assembly (clang, -O0):
<ISR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <DEBUG@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ISR>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <DEBUG@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"ISR INT1 occured\00"
define i32 @ISR(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [17 x i8] c"ISR INT1 occured\00"
define i32 @ISR(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
void free_algo1(int side) {}


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

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

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

LLVM IR (-O2):
define void @free_algo1(i32 %0) {
ret void
}
int fltRevCmp(const void *f1, const void *f2) {
  return (*((float *)f1) > *((float *)f2)   ? 1
          : *((float *)f1) < *((float *)f2) ? -1
                                            : 0);
}


x86 assembly (clang, -O0):
<fltRevCmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomiss (%rax),%xmm0
jbe    112e <fltRevCmp+0x2e>
mov    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114e <fltRevCmp+0x4e>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomiss %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fltRevCmp>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomiss %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fltRevCmp(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 = bitcast i8* %5 to float*
%7 = load float, float* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to float*
%10 = load float, float* %9
%11 = fcmp ogt float %7, %10
br i1 %11, label %12, label %13
12: ; preds = %2
br label %23
13: ; preds = %2
%14 = load i8*, i8** %3
%15 = bitcast i8* %14 to float*
%16 = load float, float* %15
%17 = load i8*, i8** %4
%18 = bitcast i8* %17 to float*
%19 = load float, float* %18
%20 = fcmp olt float %16, %19
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 -1, i32 0
br label %23
23: ; preds = %13, %12
%24 = phi i32 [ 1, %12 ], [ %22, %13 ]
ret i32 %24
}

LLVM IR (-O2):
define i32 @fltRevCmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp ogt float %4, %6
%8 = fcmp olt float %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
scalar_t__ isspace(char);
void ltrim(char *str) {
  char *s = str;
  while (isspace(*s))
    s++;
  while ((*str++ = *s++))
    ;
}


x86 assembly (clang, -O0):
<ltrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     114b <ltrim+0x3b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <ltrim+0x14>
jmp    1150 <ltrim+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     117f <ltrim+0x6f>
jmp    1150 <ltrim+0x40>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltrim>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    -0x1(%rdi),%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <ltrim+0x10>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rbx),%eax
add    $0x1,%rbx
mov    %al,(%r14)
add    $0x1,%r14
test   %al,%al
jne    1140 <ltrim+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @ltrim(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2, %8
%9 = phi i8* [ %13, %8 ], [ %0, %2 ]
%10 = phi i8* [ %11, %8 ], [ %3, %2 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %10
%13 = getelementptr inbounds i8, i8* %9, i64 1
store i8 %12, i8* %9
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Display_Open_Ex_Analysis_Menu() {
  printf("\n1 - Open existing analysis .dat file & go to analysis\n");
  printf("2 - Return to main menu\n");
  printf("3 - Exit\n");
  printf("\nPlease enter a selection, 1 - 3:  ");
  return;
}


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

x86 assembly (clang, -O2):
<Display_Open_Ex_Analysis_Menu>:
push   %rax
lea    0xefc(%rip),%rdi
call   1030 <puts@plt>
lea    0xf27(%rip),%rdi
call   1030 <puts@plt>
lea    0xf33(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"\0A1 - Open existing analysis .dat file & go to analysis\0A\00"
@.str.1 = [25 x i8] c"2 - Return to main menu\0A\00"
@.str.2 = [10 x i8] c"3 - Exit\0A\00"
@.str.3 = [36 x i8] c"\0APlease enter a selection, 1 - 3: \00"
define void @Display_Open_Ex_Analysis_Menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.3 = [36 x i8] c"\0APlease enter a selection, 1 - 3: \00"
@str = [55 x i8] c"\0A1 - Open existing analysis .dat file & go to analysis\00"
@str.4 = [24 x i8] c"2 - Return to main menu\00"
@str.5 = [9 x i8] c"3 - Exit\00"
define void @Display_Open_Ex_Analysis_Menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ greeting(char *, char *);
int /*<<< orphan*/ printf(char *, char *, char *);
int main(int argc, char *argv[]) {
  greeting(argv[1], argv[2]);
  printf("Bye %s %s\n", argv[1], argv[2]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <greeting@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1040 <greeting@plt>
mov    0x8(%rbx),%rsi
mov    0x10(%rbx),%rdx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Bye %s %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 2
%10 = load i8*, i8** %9
%11 = call i32 @greeting(i8* %7, i8* %10)
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = load i8**, i8*** %4
%16 = getelementptr inbounds i8*, i8** %15, i64 2
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %14, i8* %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Bye %s %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @greeting(i8* %4, i8* %6)
%8 = load i8*, i8** %3
%9 = load i8*, i8** %5
%10 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
ret i32 0
}
/* Type definitions */
typedef int word;
typedef int Elf32_Word;

/* Variables and functions */
Elf32_Word read_elf_word(Elf32_Word word, bool swap) {
  return swap ? ((((word)&0x000000ff) << 24) | (((word)&0x0000ff00) << 8) |
                 (((word)&0x00ff0000) >> 8) | (((word)&0xff000000) << 24))
              : word;
}


x86 assembly (clang, -O0):
<read_elf_word>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1151 <read_elf_word+0x51>
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1157 <read_elf_word+0x57>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_elf_word>:
mov    %edi,%eax
and    $0xffffff,%eax
test   %esi,%esi
bswap  %eax
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @read_elf_word(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %23
7: ; preds = %2
%8 = load i32, i32* %3
%9 = and i32 %8, 255
%10 = shl i32 %9, 24
%11 = load i32, i32* %3
%12 = and i32 %11, 65280
%13 = shl i32 %12, 8
%14 = or i32 %10, %13
%15 = load i32, i32* %3
%16 = and i32 %15, 16711680
%17 = ashr i32 %16, 8
%18 = or i32 %14, %17
%19 = load i32, i32* %3
%20 = and i32 %19, -16777216
%21 = shl i32 %20, 24
%22 = or i32 %18, %21
br label %25
23: ; preds = %2
%24 = load i32, i32* %3
br label %25
25: ; preds = %23, %7
%26 = phi i32 [ %22, %7 ], [ %24, %23 ]
ret i32 %26
}

LLVM IR (-O2):
define i32 @read_elf_word(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = and i32 %0, 16777215
%5 = tail call i32 @llvm.bswap.i32(i32 %4)
%6 = select i1 %3, i32 %0, i32 %5
ret i32 %6
}
unsigned int airIndex(double min, double val, double max, unsigned int N) {
  unsigned int idx;
  double mnm;
  mnm = max - min;
  if (mnm) {
    idx = ((unsigned int)(N * (val - min) / mnm));
    idx -= (idx == N);
  } else {
    idx = 0;
  }
  return idx;
}


x86 assembly (clang, -O0):
<airIndex>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1142 <airIndex+0x42>
jp     1142 <airIndex+0x42>
jmp    1188 <airIndex+0x88>
mov    -0x1c(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%ecx
mov    -0x20(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x20(%rbp)
jmp    118f <airIndex+0x8f>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<airIndex>:
subsd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm2
jne    1110 <airIndex+0x10>
jnp    1135 <airIndex+0x35>
mov    %edi,%eax
xorps  %xmm3,%xmm3
cvtsi2sd %rax,%xmm3
subsd  %xmm0,%xmm1
mulsd  %xmm3,%xmm1
divsd  %xmm2,%xmm1
cvttsd2si %xmm1,%rax
xor    %ecx,%ecx
cmp    %edi,%eax
sete   %cl
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @airIndex(double %0, double %1, double %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store i32 %3, i32* %8
%11 = load double, double* %7
%12 = load double, double* %5
%13 = fsub double %11, %12
store double %13, double* %10
%14 = load double, double* %10
%15 = fcmp une double %14, 0.000000e+00
br i1 %15, label %16, label %32
16: ; preds = %4
%17 = load i32, i32* %8
%18 = uitofp i32 %17 to double
%19 = load double, double* %6
%20 = load double, double* %5
%21 = fsub double %19, %20
%22 = fmul double %18, %21
%23 = load double, double* %10
%24 = fdiv double %22, %23
%25 = fptoui double %24 to i32
store i32 %25, i32* %9
%26 = load i32, i32* %9
%27 = load i32, i32* %8
%28 = icmp eq i32 %26, %27
%29 = zext i1 %28 to i32
%30 = load i32, i32* %9
%31 = sub i32 %30, %29
store i32 %31, i32* %9
br label %33
32: ; preds = %4
store i32 0, i32* %9
br label %33
33: ; preds = %32, %16
%34 = load i32, i32* %9
ret i32 %34
}

LLVM IR (-O2):
define i32 @airIndex(double %0, double %1, double %2, i32 %3) {
%5 = fsub double %2, %0
%6 = fcmp une double %5, 0.000000e+00
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = uitofp i32 %3 to double
%9 = fsub double %1, %0
%10 = fmul double %9, %8
%11 = fdiv double %10, %5
%12 = fptoui double %11 to i32
%13 = icmp eq i32 %12, %3
%14 = sext i1 %13 to i32
%15 = add i32 %14, %12
br label %16
16: ; preds = %4, %7
%17 = phi i32 [ %15, %7 ], [ 0, %4 ]
ret i32 %17
}
int port_deny(unsigned short port) { return 0; }


x86 assembly (clang, -O0):
<port_deny>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @port_deny(i16 zeroext %0) {
ret i32 0
}
unsigned char bit_sum(unsigned char byte) {
  byte = (byte >> 4) ^ (byte & 15);
  byte = (byte >> 2) ^ (byte & 3);
  return (byte >> 1) ^ (byte & 1);
}


x86 assembly (clang, -O0):
<bit_sum>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x4,%eax
movzbl -0x1(%rbp),%ecx
and    $0xf,%ecx
xor    %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x2,%eax
movzbl -0x1(%rbp),%ecx
and    $0x3,%ecx
xor    %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x1,%eax
movzbl -0x1(%rbp),%ecx
and    $0x1,%ecx
xor    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_sum>:
mov    %edi,%eax
shr    $0x4,%al
and    $0xf,%dil
xor    %dil,%al
mov    %eax,%ecx
shr    $0x2,%cl
and    $0x3,%al
xor    %cl,%al
mov    %eax,%ecx
shr    %cl
and    $0x1,%al
xor    %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @bit_sum(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = ashr i32 %4, 4
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = and i32 %7, 15
%9 = xor i32 %5, %8
%10 = trunc i32 %9 to i8
store i8 %10, i8* %2
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = ashr i32 %12, 2
%14 = load i8, i8* %2
%15 = zext i8 %14 to i32
%16 = and i32 %15, 3
%17 = xor i32 %13, %16
%18 = trunc i32 %17 to i8
store i8 %18, i8* %2
%19 = load i8, i8* %2
%20 = zext i8 %19 to i32
%21 = ashr i32 %20, 1
%22 = load i8, i8* %2
%23 = zext i8 %22 to i32
%24 = and i32 %23, 1
%25 = xor i32 %21, %24
%26 = trunc i32 %25 to i8
ret i8 %26
}

LLVM IR (-O2):
define zeroext i8 @bit_sum(i8 zeroext %0) {
%2 = lshr i8 %0, 4
%3 = and i8 %0, 15
%4 = xor i8 %2, %3
%5 = lshr i8 %4, 2
%6 = and i8 %4, 3
%7 = xor i8 %5, %6
%8 = lshr i8 %7, 1
%9 = and i8 %7, 1
%10 = xor i8 %8, %9
ret i8 %10
}
int is_printable(const unsigned char c) { return c >= 0x20 && c < 0x80; }


x86 assembly (clang, -O0):
<is_printable>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
jl     112b <is_printable+0x2b>
movzbl -0x1(%rbp),%eax
cmp    $0x80,%eax
setl   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_printable>:
xor    %eax,%eax
cmp    $0x20,%dil
setge  %al
ret

LLVM IR (-O0):
define i32 @is_printable(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sge i32 %4, 32
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp slt i32 %8, 128
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_printable(i8 zeroext %0) {
%2 = icmp sgt i8 %0, 31
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
char *_realloc(char *, int);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
char *mon_realloc(char *buf, int size) {
  char *ret;
  monLock();
  ret = _realloc(buf, size);
  monUnlock();
  return (ret);
}


x86 assembly (clang, -O0):
<mon_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <monLock@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <_realloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <monUnlock@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_realloc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <monLock@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <_realloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <monUnlock@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @mon_realloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = call i32 (...) @monLock()
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i8* @_realloc(i8* %7, i32 %8)
store i8* %9, i8** %5
%10 = call i32 (...) @monUnlock()
%11 = load i8*, i8** %5
ret i8* %11
}

LLVM IR (-O2):
define i8* @mon_realloc(i8* %0, i32 %1) {
%3 = tail call i32 (...) @monLock()
%4 = tail call i8* @_realloc(i8* %0, i32 %1)
%5 = tail call i32 (...) @monUnlock()
ret i8* %4
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int real_utimes(char const *, struct timeval const *);
scalar_t__ smbw_path(char const *);
int smbw_utimes(char const *, struct timeval const *);
int utimes(const char *name, const struct timeval *tvp) {
  if (smbw_path(name)) {
    return smbw_utimes(name, tvp);
  }
  return real_utimes(name, tvp);
}


x86 assembly (clang, -O0):
<utimes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <smbw_path@plt>
cmp    $0x0,%rax
je     1168 <utimes+0x38>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <smbw_utimes@plt>
mov    %eax,-0x4(%rbp)
jmp    1178 <utimes+0x48>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <real_utimes@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utimes>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <smbw_path@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
test   %rax,%rax
je     1156 <utimes+0x26>
pop    %rbx
pop    %r14
jmp    1030 <smbw_utimes@plt>
pop    %rbx
pop    %r14
jmp    1040 <real_utimes@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @utimes(i8* %0, %struct.timeval* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.timeval*
store i8* %0, i8** %4
store %struct.timeval* %1, %struct.timeval** %5
%6 = load i8*, i8** %4
%7 = call i64 @smbw_path(i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = load %struct.timeval*, %struct.timeval** %5
%12 = call i32 @smbw_utimes(i8* %10, %struct.timeval* %11)
store i32 %12, i32* %3
br label %17
13: ; preds = %2
%14 = load i8*, i8** %4
%15 = load %struct.timeval*, %struct.timeval** %5
%16 = call i32 @real_utimes(i8* %14, %struct.timeval* %15)
store i32 %16, i32* %3
br label %17
17: ; preds = %13, %9
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @utimes(i8* %0, %struct.timeval* %1) {
%3 = tail call i64 @smbw_path(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @smbw_utimes(i8* %0, %struct.timeval* %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @real_utimes(i8* %0, %struct.timeval* %1)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
/* Variables and functions */
unsigned long double_to_bits(double);
int /*<<< orphan*/ fputc(unsigned int, unsigned int);
void fput_double(double d, unsigned handle) {
  unsigned long l;
  unsigned low, high;
  l = double_to_bits(d);
  low = l & 0xffffffffu;
  high = l >> 32;
  fputc(low, handle);
  fputc(high, handle);
}


x86 assembly (clang, -O0):
<fput_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <double_to_bits@plt>
mov    %rax,-0x18(%rbp)
movabs $0xffffffff,%rax
and    -0x18(%rbp),%rax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
shr    $0x20,%rax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <fputc@plt>
mov    -0x20(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <fputc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fput_double>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1030 <double_to_bits@plt>
mov    %rax,%rbx
shr    $0x20,%rbx
mov    %eax,%edi
mov    %ebp,%esi
call   1040 <fputc@plt>
mov    %ebx,%edi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fputc@plt>

LLVM IR (-O0):
define void @fput_double(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%8 = load double, double* %3
%9 = call i64 @double_to_bits(double %8)
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = and i64 %10, 4294967295
%12 = trunc i64 %11 to i32
store i32 %12, i32* %6
%13 = load i64, i64* %5
%14 = lshr i64 %13, 32
%15 = trunc i64 %14 to i32
store i32 %15, i32* %7
%16 = load i32, i32* %6
%17 = load i32, i32* %4
%18 = call i32 @fputc(i32 %16, i32 %17)
%19 = load i32, i32* %7
%20 = load i32, i32* %4
%21 = call i32 @fputc(i32 %19, i32 %20)
ret void
}

LLVM IR (-O2):
define void @fput_double(double %0, i32 %1) {
%3 = tail call i64 @double_to_bits(double %0)
%4 = trunc i64 %3 to i32
%5 = lshr i64 %3, 32
%6 = trunc i64 %5 to i32
%7 = tail call i32 @fputc(i32 %4, i32 %1)
%8 = tail call i32 @fputc(i32 %6, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _system(char *, char *);
void copyright_date_sed(char *filename) {
  _system("sed -i '/_copyright/s/2004-2006/2004-'$(date +%Y)'/' %s", filename);
}


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

x86 assembly (clang, -O2):
<copyright_date_sed>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <_system@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"sed -i '/_copyright/s/2004-2006/2004-'$(date +%Y)'/' %s\00"
define void @copyright_date_sed(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @_system(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"sed -i '/_copyright/s/2004-2006/2004-'$(date +%Y)'/' %s\00"
define void @copyright_date_sed(i8* %0) {
%2 = tail call i32 @_system(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void SIO1_registerCallback(void (*callback)(void)) {}


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

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

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

LLVM IR (-O2):
define void @SIO1_registerCallback(void ()* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
void test_range_int_ge_le(int i) {
  if (i >= 4)
    if (i <= 4)
      __analyzer_eval(i == 4);
}


x86 assembly (clang, -O0):
<test_range_int_ge_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jl     1145 <test_range_int_ge_le+0x35>
cmpl   $0x4,-0x4(%rbp)
jg     1140 <test_range_int_ge_le+0x30>
cmpl   $0x4,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
jmp    1145 <test_range_int_ge_le+0x35>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_range_int_ge_le>:
cmp    $0x4,%edi
jne    111f <test_range_int_ge_le+0xf>
mov    $0x1,%edi
jmp    1030 <__analyzer_eval@plt>
ret

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

LLVM IR (-O2):
define void @test_range_int_ge_le(i32 %0) {
%2 = icmp eq i32 %0, 4
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @__analyzer_eval(i32 1)
br label %5
5: ; preds = %3, %1
ret void
}
void senialMurioHijo(int senial) {}


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

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

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

LLVM IR (-O2):
define void @senialMurioHijo(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ clock();
clock_t LibTomClock(void) { return clock(); }


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

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

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

LLVM IR (-O2):
define i32 @LibTomClock() {
%1 = tail call i32 (...) @clock()
ret i32 %1
}