xunge/DecIR huggingface dataset:
int rangeIntersectOrTouch64(unsigned long long start1, unsigned long long end1,
                            unsigned long long start2,
                            unsigned long long end2) {
  unsigned long long s = ((start1) > (start2) ? (start1) : (start2));
  unsigned long long e = ((end1) < (end2) ? (end1) : (end2));
  return e >= s;
}


x86 assembly (clang, -O0):
<rangeIntersectOrTouch64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    112f <rangeIntersectOrTouch64+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    1137 <rangeIntersectOrTouch64+0x37>
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    115a <rangeIntersectOrTouch64+0x5a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
jmp    1162 <rangeIntersectOrTouch64+0x62>
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rangeIntersectOrTouch64>:
cmp    %rdx,%rdi
cmova  %rdi,%rdx
cmp    %rcx,%rsi
cmovb  %rsi,%rcx
xor    %eax,%eax
cmp    %rdx,%rcx
setae  %al
ret

LLVM IR (-O0):
define i32 @rangeIntersectOrTouch64(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%11 = load i64, i64* %5
%12 = load i64, i64* %7
%13 = icmp ugt i64 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %4
%15 = load i64, i64* %5
br label %18
16: ; preds = %4
%17 = load i64, i64* %7
br label %18
18: ; preds = %16, %14
%19 = phi i64 [ %15, %14 ], [ %17, %16 ]
store i64 %19, i64* %9
%20 = load i64, i64* %6
%21 = load i64, i64* %8
%22 = icmp ult i64 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %18
%24 = load i64, i64* %6
br label %27
25: ; preds = %18
%26 = load i64, i64* %8
br label %27
27: ; preds = %25, %23
%28 = phi i64 [ %24, %23 ], [ %26, %25 ]
store i64 %28, i64* %10
%29 = load i64, i64* %10
%30 = load i64, i64* %9
%31 = icmp uge i64 %29, %30
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @rangeIntersectOrTouch64(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = icmp ugt i64 %0, %2
%6 = select i1 %5, i64 %0, i64 %2
%7 = icmp ult i64 %1, %3
%8 = select i1 %7, i64 %1, i64 %3
%9 = icmp uge i64 %8, %6
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
__gettimeofday_syscall_is_not_implemented_without_vtimer_or_rtc_module();
int _gettimeofday(struct timeval *tp, void *restrict tzp) {
  (void)tzp;
  (void)tp;
  __gettimeofday_syscall_is_not_implemented_without_vtimer_or_rtc_module();
  return 0;
}


x86 assembly (clang, -O0):
<_gettimeofday>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__gettimeofday_syscall_is_not_implemented_without_vtimer_or_rtc_module@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @_gettimeofday(%struct.timeval* %0, i8* noalias %1) {
%3 = alloca %struct.timeval*
%4 = alloca i8*
store %struct.timeval* %0, %struct.timeval** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load %struct.timeval*, %struct.timeval** %3
%7 = call i32 (...) @__gettimeofday_syscall_is_not_implemented_without_vtimer_or_rtc_module()
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @_gettimeofday(%struct.timeval* nocapture readnone %0, i8* noalias nocapture readnone %1) {
%3 = tail call i32 (...) @__gettimeofday_syscall_is_not_implemented_without_vtimer_or_rtc_module()
ret i32 0
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int posixStrCaseCmp(const char *s1, const char *s2) {
  return strcasecmp(s1, s2);
}


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

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

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

LLVM IR (-O2):
define i32 @posixStrCaseCmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
double aa_tf_sinc_series2(double);
double aa_tf_sinc_series(double theta) {
  return aa_tf_sinc_series2(theta * theta);
}


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

x86 assembly (clang, -O2):
<aa_tf_sinc_series>:
mulsd  %xmm0,%xmm0
jmp    1030 <aa_tf_sinc_series2@plt>

LLVM IR (-O0):
define double @aa_tf_sinc_series(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = call double @aa_tf_sinc_series2(double %5)
ret double %6
}

LLVM IR (-O2):
define double @aa_tf_sinc_series(double %0) {
%2 = fmul double %0, %0
%3 = tail call double @aa_tf_sinc_series2(double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void dbg(char *msg) {
  printf("%s", msg);
  exit(0);
}


x86 assembly (clang, -O0):
<dbg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<dbg>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @dbg(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
int fun207() { return 207; }


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

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

LLVM IR (-O0):
define i32 @fun207() {
ret i32 207
}

LLVM IR (-O2):
define i32 @fun207() {
ret i32 207
}
/* Type definitions */
typedef int /*<<< orphan*/ read_buf_cmd;

/* Variables and functions */
int /*<<< orphan*/ read(int, char *, int);
int read_byte_com(int sfd) {
  char read_buf_cmd[1];
  char data_byte;
  read(sfd, read_buf_cmd, sizeof(read_buf_cmd));
  data_byte = read_buf_cmd[0];
  return data_byte;
}


x86 assembly (clang, -O0):
<read_byte_com>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
mov    -0x5(%rbp),%al
mov    %al,-0x6(%rbp)
movsbl -0x6(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_byte_com>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
movsbl 0x7(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @read_byte_com(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x i8]
%4 = alloca i8
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%7 = call i32 @read(i32 %5, i8* %6, i32 1)
%8 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%9 = load i8, i8* %8
store i8 %9, i8* %4
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @read_byte_com(i32 %0) {
%2 = alloca [1 x i8]
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
%4 = call i32 @read(i32 %0, i8* %3, i32 1)
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
ret i32 %6
}
/* Variables and functions */
bool nrf52_errata_143(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_143() {
ret i32 0
}
/* Variables and functions */
int binarySearchHelp(int *, int /*<<< orphan*/, int, int);
int binarySearch(int *arr, int len, int key) {
  return binarySearchHelp(arr, 0, len - 1, key);
}


x86 assembly (clang, -O0):
<binarySearch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
mov    -0x10(%rbp),%ecx
xor    %esi,%esi
call   1030 <binarySearchHelp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binarySearch>:
mov    %edx,%ecx
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <binarySearchHelp@plt>

LLVM IR (-O0):
define i32 @binarySearch(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 = sub nsw i32 %8, 1
%10 = load i32, i32* %6
%11 = call i32 @binarySearchHelp(i32* %7, i32 0, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @binarySearch(i32* %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, -1
%5 = tail call i32 @binarySearchHelp(i32* %0, i32 0, i32 %4, i32 %2)
ret i32 %5
}
int div(x, y)
int x, y;
{
  int result = x / y;
  return result;
}


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

x86 assembly (clang, -O2):
<div>:
mov    %edi,%eax
cltd
idiv   %esi
ret

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

LLVM IR (-O2):
define i32 @div(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void exitfunc16(void) {
  printf("Executing exitfunc16.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<exitfunc16>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc16>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Executing exitfunc16.\0A\00"
define void @exitfunc16() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [22 x i8] c"Executing exitfunc16.\00"
define void @exitfunc16() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void TimerSynchronize(uint32_t ui32Base, uint32_t ui32Timers) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000010))) = ui32Timers;
}


x86 assembly (clang, -O0):
<TimerSynchronize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerSynchronize>:
mov    %rsi,0x10(%rdi)
ret

LLVM IR (-O0):
define void @TimerSynchronize(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 %6, 16
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @TimerSynchronize(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 16
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
main() {
  foo(30);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 30)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int rand_initialize() {
  srand((unsigned int)time(NULL));
  return 0;
}


x86 assembly (clang, -O0):
<rand_initialize>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_initialize>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rand_initialize() {
%1 = call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = call i32 @srand(i32 %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @rand_initialize() {
%1 = tail call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @srand(i32 %2)
ret i32 0
}
double floating_point(long long a, int b) {
  if (a > 1LL << 55) {
    double r = a;
    return r;
  } else if (b > 1 << 25) {
    float f = b;
    return f;
  }
  return 137;
}


x86 assembly (clang, -O0):
<floating_point>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movabs $0x80000000000000,%rax
cmp    %rax,-0x10(%rbp)
jle    1139 <floating_point+0x39>
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1175 <floating_point+0x75>
cmpl   $0x2000000,-0x14(%rbp)
jle    1163 <floating_point+0x63>
cvtsi2ssl -0x14(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1175 <floating_point+0x75>
jmp    1168 <floating_point+0x68>
movsd  0xe90(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floating_point>:
movabs $0x80000000000001,%rax
cmp    %rax,%rdi
jl     1115 <floating_point+0x15>
cvtsi2sd %rdi,%xmm0
ret
cmp    $0x2000001,%esi
jl     1126 <floating_point+0x26>
cvtsi2ss %esi,%xmm0
cvtss2sd %xmm0,%xmm0
ret
movsd  0xed2(%rip),%xmm0
ret

LLVM IR (-O0):
define double @floating_point(i64 %0, i32 %1) {
%3 = alloca double
%4 = alloca i64
%5 = alloca i32
%6 = alloca double
%7 = alloca float
store i64 %0, i64* %4
store i32 %1, i32* %5
%8 = load i64, i64* %4
%9 = icmp sgt i64 %8, 36028797018963968
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i64, i64* %4
%12 = sitofp i64 %11 to double
store double %12, double* %6
%13 = load double, double* %6
store double %13, double* %3
br label %24
14: ; preds = %2
%15 = load i32, i32* %5
%16 = icmp sgt i32 %15, 33554432
br i1 %16, label %17, label %22
17: ; preds = %14
%18 = load i32, i32* %5
%19 = sitofp i32 %18 to float
store float %19, float* %7
%20 = load float, float* %7
%21 = fpext float %20 to double
store double %21, double* %3
br label %24
22: ; preds = %14
br label %23
23: ; preds = %22
store double 1.370000e+02, double* %3
br label %24
24: ; preds = %23, %17, %10
%25 = load double, double* %3
ret double %25
}

LLVM IR (-O2):
define double @floating_point(i64 %0, i32 %1) {
%3 = icmp sgt i64 %0, 36028797018963968
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = sitofp i64 %0 to double
br label %11
6: ; preds = %2
%7 = icmp sgt i32 %1, 33554432
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = sitofp i32 %1 to float
%10 = fpext float %9 to double
br label %11
11: ; preds = %6, %8, %4
%12 = phi double [ %5, %4 ], [ %10, %8 ], [ 1.370000e+02, %6 ]
ret double %12
}
/* Variables and functions */
scalar_t__ pow(float, int);
float sqrt(scalar_t__);
float euclidean_distance(float x1, float y1, float x2, float y2) {
  return sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
}


x86 assembly (clang, -O0):
<euclidean_distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %rax,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<euclidean_distance>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm3,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
subss  %xmm2,%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %rax,%rbx
movss  0x8(%rsp),%xmm0
subss  0xc(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define float @euclidean_distance(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %7
%11 = fsub float %9, %10
%12 = call i64 @pow(float %11, i32 2)
%13 = load float, float* %6
%14 = load float, float* %8
%15 = fsub float %13, %14
%16 = call i64 @pow(float %15, i32 2)
%17 = add nsw i64 %12, %16
%18 = call float @sqrt(i64 %17)
ret float %18
}

LLVM IR (-O2):
define float @euclidean_distance(float %0, float %1, float %2, float %3) {
%5 = fsub float %0, %2
%6 = tail call i64 @pow(float %5, i32 2)
%7 = fsub float %1, %3
%8 = tail call i64 @pow(float %7, i32 2)
%9 = add nsw i64 %8, %6
%10 = tail call float @sqrt(i64 %9)
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ state_change_fire(int, int *, int);
void state_change_fire3(int event_type, int data0, int data1, int data2) {
  int data[3];
  data[0] = data0;
  data[1] = data1;
  data[2] = data2;
  state_change_fire(event_type, data, 3);
}


x86 assembly (clang, -O0):
<state_change_fire3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x1c(%rbp),%rsi
mov    $0x3,%edx
call   1030 <state_change_fire@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<state_change_fire3>:
sub    $0x18,%rsp
mov    %esi,0xc(%rsp)
mov    %edx,0x10(%rsp)
mov    %ecx,0x14(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x3,%edx
call   1030 <state_change_fire@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @state_change_fire3(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [3 x i32]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %6
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %7
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 1
store i32 %12, i32* %13
%14 = load i32, i32* %8
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 2
store i32 %14, i32* %15
%16 = load i32, i32* %5
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
%18 = call i32 @state_change_fire(i32 %16, i32* %17, i32 3)
ret void
}

LLVM IR (-O2):
define void @state_change_fire3(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [3 x i32]
%6 = bitcast [3 x i32]* %5 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
store i32 %1, i32* %7
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
store i32 %2, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
store i32 %3, i32* %9
%10 = call i32 @state_change_fire(i32 %0, i32* %7, i32 3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ Ttl_TPM_ForceClear();
uint32_t TtlForceClear(void) {
  do {
  } while (0);
  return Ttl_TPM_ForceClear();
}


x86 assembly (clang, -O0):
<TtlForceClear>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <TtlForceClear+0x9>
jmp    111e <TtlForceClear+0xe>
mov    $0x0,%al
call   1030 <Ttl_TPM_ForceClear@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @TtlForceClear() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
%3 = call i32 (...) @Ttl_TPM_ForceClear()
ret i32 %3
}

LLVM IR (-O2):
define i32 @TtlForceClear() {
%1 = tail call i32 (...) @Ttl_TPM_ForceClear()
ret i32 %1
}
void setbit(unsigned int *w, unsigned int flags) { *w |= flags; }


x86 assembly (clang, -O0):
<setbit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbit>:
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @setbit(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 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = or i32 %7, %5
store i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @setbit(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = or i32 %3, %1
store i32 %4, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pcomp_version(int *, int *);
int main(void) {
  int major, minor;
  pcomp_version(&major, &minor);
  return (major == 1 && minor == 0) ? 0 : 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <pcomp_version@plt>
xor    %eax,%eax
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jne    1145 <main+0x35>
cmpl   $0x0,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%dl
mov    $0x1,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <pcomp_version@plt>
mov    0x4(%rsp),%ecx
xor    $0x1,%ecx
xor    %eax,%eax
or     (%rsp),%ecx
setne  %al
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 @pcomp_version(i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br label %10
10: ; preds = %7, %0
%11 = phi i1 [ false, %0 ], [ %9, %7 ]
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 0, i32 1
ret i32 %13
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @pcomp_version(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = icmp ne i32 %6, 1
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 0
%10 = select i1 %7, i1 true, i1 %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
main() {
  int a;
  int b;
  a = 12;
  b = 33;
  printf("a=%d, b=%d\n", a, b);
  a = a + b;
  b = a - b;
  a = a - b;
  printf("a=%d, b=%d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xc,-0x8(%rbp)
movl   $0x21,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"a=%d, b=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 12, i32 33)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 33, i32 12)
ret i32 0
}
/* Variables and functions */
double sinh(double);
double intr_wrap_069(double p1) { return sinh(p1); }


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

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

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

LLVM IR (-O2):
define double @intr_wrap_069(double %0) {
%2 = tail call double @sinh(double %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void ps(FILE *fp, int len) {
  int i;
  for (i = 0; i < len; i++) {
    (fp, "  ");
  }
}


x86 assembly (clang, -O0):
<ps>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    112c <ps+0x2c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <ps+0x12>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c" \00"
define void @ps(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %12, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i32*, i32** %3
br label %12
12: ; preds = %10
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
store i32 %14, i32* %5
br label %6
15: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @ps(i32* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void set_def_signal(void) {
  signal(SIGINT, SIG_DFL);
  signal(SIGQUIT, SIG_DFL);
}


x86 assembly (clang, -O0):
<set_def_signal>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_def_signal>:
push   %rbx
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rbx
mov    (%rbx),%esi
call   1030 <signal@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
pop    %rbx
jmp    1030 <signal@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@SIG_DFL = global i32 0
@SIGQUIT = global i32 0
define void @set_def_signal() {
%1 = load i32, i32* @SIGINT
%2 = load i32, i32* @SIG_DFL
%3 = call i32 @signal(i32 %1, i32 %2)
%4 = load i32, i32* @SIGQUIT
%5 = load i32, i32* @SIG_DFL
%6 = call i32 @signal(i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIG_DFL = global i32 0
@SIGQUIT = global i32 0
define void @set_def_signal() {
%1 = load i32, i32* @SIGINT
%2 = load i32, i32* @SIG_DFL
%3 = tail call i32 @signal(i32 %1, i32 %2)
%4 = load i32, i32* @SIGQUIT
%5 = load i32, i32* @SIG_DFL
%6 = tail call i32 @signal(i32 %4, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printXmlNull(unsigned int offset, const char *name) {
  if (offset > 0) {
    printf("%*c", offset, ' ');
  }
  printf("<%s />\n", name);
}


x86 assembly (clang, -O0):
<printXmlNull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    113f <printXmlNull+0x2f>
mov    -0x4(%rbp),%esi
lea    0xecd(%rip),%rdi
mov    $0x20,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printXmlNull>:
push   %rbx
mov    %rsi,%rbx
test   %edi,%edi
je     112d <printXmlNull+0x1d>
mov    %edi,%esi
lea    0xedf(%rip),%rdi
mov    $0x20,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%*c\00"
@.str.1 = [8 x i8] c"<%s />\0A\00"
define void @printXmlNull(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0, i32 32)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret void
}
void nez_VM_PrintProfile(const char *file_type) {}


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

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

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

LLVM IR (-O2):
define void @nez_VM_PrintProfile(i8* nocapture %0) {
ret void
}
int l3mdev_master_ifindex_rcu(struct net_device *dev) { return 0; }


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

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

LLVM IR (-O0):
%struct.net_device = type opaque
define i32 @l3mdev_master_ifindex_rcu(%struct.net_device* %0) {
%2 = alloca %struct.net_device*
store %struct.net_device* %0, %struct.net_device** %2
ret i32 0
}

LLVM IR (-O2):
%struct.net_device = type opaque
define i32 @l3mdev_master_ifindex_rcu(%struct.net_device* nocapture readnone %0) {
ret i32 0
}
int _isTerminator(char ch) { return (ch == '|' || ch == '&' || ch == ';'); }


x86 assembly (clang, -O0):
<_isTerminator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7c,%ecx
mov    %al,-0x2(%rbp)
je     113b <_isTerminator+0x3b>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x26,%ecx
mov    %al,-0x2(%rbp)
je     113b <_isTerminator+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0x3b,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_isTerminator>:
mov    $0x1,%eax
cmp    $0x26,%dil
je     1111 <_isTerminator+0x11>
cmp    $0x7c,%dil
jne    1112 <_isTerminator+0x12>
ret
xor    %eax,%eax
cmp    $0x3b,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @_isTerminator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 124
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 38
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 59
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @_isTerminator(i8 signext %0) {
switch i8 %0, label %2 [
i8 124, label %5
i8 38, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 59
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
char *index(char *, int);
int /*<<< orphan*/ memmove(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void FilterCR(char *s) {
  if (!s)
    return;
  char *p = s;
  while ((p = index(p, 13)) != NULL)
    memmove(p, p + 1, strlen(p));
}


x86 assembly (clang, -O0):
<FilterCR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    114c <FilterCR+0x1c>
jmp    11a1 <FilterCR+0x71>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xd,%esi
call   1040 <index@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     11a1 <FilterCR+0x71>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1050 <memmove@plt>
jmp    1154 <FilterCR+0x24>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FilterCR>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     117e <FilterCR+0x4e>
mov    $0xd,%esi
call   1040 <index@plt>
test   %rax,%rax
je     117e <FilterCR+0x4e>
mov    %rax,%rbx
nopl   0x0(%rax,%rax,1)
lea    0x1(%rbx),%r14
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1050 <memmove@plt>
mov    %rbx,%rdi
mov    $0xd,%esi
call   1040 <index@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1150 <FilterCR+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @FilterCR(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = tail call i8* @index(i8* %0, i32 13)
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %11, %6 ], [ %4, %3 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = tail call i32 @strlen(i8* %7)
%10 = tail call i32 @memmove(i8* %7, i8* %8, i32 %9)
%11 = tail call i8* @index(i8* %7, i32 13)
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
ret void
}
void Msg_AppendVobContext(void) {}


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

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

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

LLVM IR (-O2):
define void @Msg_AppendVobContext() {
ret void
}
unsigned int ulog2(unsigned int x) {
  unsigned int i;
  for (i = 0; x != 0; i++)
    x >>= 1;
  return i;
}


x86 assembly (clang, -O0):
<ulog2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <ulog2+0x2f>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <ulog2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulog2>:
xor    %eax,%eax
test   %edi,%edi
je     111c <ulog2+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <ulog2+0x10>
ret

LLVM IR (-O0):
define i32 @ulog2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %2
%9 = lshr i32 %8, 1
store i32 %9, i32* %2
br label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @ulog2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printBin(int);
int /*<<< orphan*/ printf(char *, char);
void printBin2(int n) {
  if (n > 1) {
    int i = n >> 0x1;
    printBin(i);
  }
  printf("%c", (n & 0x01) ? '1' : '0');
}


x86 assembly (clang, -O0):
<printBin2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1146 <printBin2+0x26>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <printBin@plt>
mov    -0x4(%rbp),%edx
and    $0x1,%edx
mov    $0x30,%eax
mov    $0x31,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
lea    0xe9d(%rip),%rdi
movsbl %al,%esi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printBin2>:
push   %rbx
mov    %edi,%ebx
cmp    $0x2,%edi
jl     1131 <printBin2+0x11>
mov    %ebx,%edi
shr    %edi
call   1030 <printBin@plt>
and    $0x1,%bl
or     $0x30,%bl
movzbl %bl,%esi
lea    0xebf(%rip),%rdi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @printBin2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 1
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = ashr i32 %7, 1
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @printBin(i32 %9)
br label %11
11: ; preds = %6, %1
%12 = load i32, i32* %2
%13 = and i32 %12, 1
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 49, i32 48
%17 = trunc i32 %16 to i8
%18 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %17)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @printBin2(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = lshr i32 %0, 1
%5 = tail call i32 @printBin(i32 %4)
br label %6
6: ; preds = %3, %1
%7 = trunc i32 %0 to i8
%8 = and i8 %7, 1
%9 = or i8 %8, 48
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %9)
ret void
}
double TH_lerp(double a, double b, double weight) {
  return a + weight * (b - a);
}


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

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

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

LLVM IR (-O2):
define double @TH_lerp(double %0, double %1, double %2) {
%4 = fsub double %1, %0
%5 = tail call double @llvm.fmuladd.f64(double %2, double %4, double %0)
ret double %5
}
void prune_sub2(unsigned int x) {
  int a[10];
  if (10 > x - 1) {
    a[x] = 0;
  }
}


x86 assembly (clang, -O0):
<prune_sub2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
mov    $0xa,%eax
cmp    %ecx,%eax
jbe    1125 <prune_sub2+0x25>
mov    -0x4(%rbp),%eax
movl   $0x0,-0x30(%rbp,%rax,4)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @prune_sub2(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub i32 %4, 1
%6 = icmp ugt i32 10, %5
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %9
store i32 0, i32* %10
br label %11
11: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @prune_sub2(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ getpid();
scalar_t__ getppid();
int /*<<< orphan*/ printf(char *, long);
int child_fn() {
  printf("PID: %ld\n", (long)getpid());
  printf("Parent PID: %ld\n", (long)getppid());
  return 0;
}


x86 assembly (clang, -O0):
<child_fn>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,%rsi
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getppid@plt>
mov    %rax,%rsi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<child_fn>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xec8(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getppid@plt>
lea    0xeab(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"PID: %ld\0A\00"
@.str.1 = [17 x i8] c"Parent PID: %ld\0A\00"
define i32 @child_fn() {
%1 = call i64 (...) @getpid()
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 %1)
%3 = call i64 (...) @getppid()
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"PID: %ld\0A\00"
@.str.1 = [17 x i8] c"Parent PID: %ld\0A\00"
define i32 @child_fn() {
%1 = tail call i64 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 %1)
%3 = tail call i64 (...) @getppid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PKCS5_PBKDF2_HMAC_SHA1(char const *, int, unsigned char *,
                                          int, int, int, unsigned char *);
void hash_proto_pbkdf2_len(const char *pass, int passlen, unsigned char *salt,
                           int saltlen, int iter, int keylen,
                           unsigned char *out) {
  (void)PKCS5_PBKDF2_HMAC_SHA1(pass, passlen, salt, saltlen, iter, keylen, out);
}


x86 assembly (clang, -O0):
<hash_proto_pbkdf2_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <PKCS5_PBKDF2_HMAC_SHA1@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @hash_proto_pbkdf2_len(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
store i8* %0, i8** %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i8* %6, i8** %14
%15 = load i8*, i8** %8
%16 = load i32, i32* %9
%17 = load i8*, i8** %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = load i32, i32* %13
%21 = load i8*, i8** %14
%22 = call i32 @PKCS5_PBKDF2_HMAC_SHA1(i8* %15, i32 %16, i8* %17, i32 %18, i32 %19, i32 %20, i8* %21)
ret void
}

LLVM IR (-O2):
define void @hash_proto_pbkdf2_len(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 %5, i8* %6) {
%8 = tail call i32 @PKCS5_PBKDF2_HMAC_SHA1(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 %5, i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void cmp_reg32_m32(int reg32, void *_m32) {
  unsigned long *m32 = (unsigned long *)_m32;
  put8(0x3B);
  put8((reg32 << 3) | 5);
  put32((unsigned int)(m32));
}


x86 assembly (clang, -O0):
<cmp_reg32_m32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x3b,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0x5,%edi
call   1030 <put8@plt>
mov    -0x18(%rbp),%rax
mov    %eax,%edi
call   1040 <put32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_reg32_m32>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebx
mov    $0x3b,%edi
call   1030 <put8@plt>
lea    0x5(,%rbx,8),%edi
call   1030 <put8@plt>
mov    %r14d,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @cmp_reg32_m32(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i64*
store i64* %7, i64** %5
%8 = call i32 @put8(i32 59)
%9 = load i32, i32* %3
%10 = shl i32 %9, 3
%11 = or i32 %10, 5
%12 = call i32 @put8(i32 %11)
%13 = load i64*, i64** %5
%14 = ptrtoint i64* %13 to i32
%15 = call i32 @put32(i32 %14)
ret void
}

LLVM IR (-O2):
define void @cmp_reg32_m32(i32 %0, i8* %1) {
%3 = tail call i32 @put8(i32 59)
%4 = shl i32 %0, 3
%5 = or i32 %4, 5
%6 = tail call i32 @put8(i32 %5)
%7 = ptrtoint i8* %1 to i64
%8 = trunc i64 %7 to i32
%9 = tail call i32 @put32(i32 %8)
ret void
}