xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void _Q_qtou(void) {
  printf("Unimplemented %s called, exiting\n", "_Q_qtou");
  exit(-1);
}


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

x86 assembly (clang, -O2):
<_Q_qtou>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xef3(%rip),%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Unimplemented %s called, exiting\0A\00"
@.str.1 = [8 x i8] c"_Q_qtou\00"
define void @_Q_qtou() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [34 x i8] c"Unimplemented %s called, exiting\0A\00"
@.str.1 = [8 x i8] c"_Q_qtou\00"
define void @_Q_qtou() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
void EVP_CIPHER_CTX_free(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_CIPHER_CTX_free() {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
main() {
  int c;
  while ((c = getchar()) != EOF) {
    if (c == '\t') {
      putchar('\\');
      putchar('t');
    } else {
      putchar(c);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1178 <main+0x58>
cmpl   $0x9,-0x8(%rbp)
jne    116b <main+0x4b>
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    $0x74,%edi
call   1030 <putchar@plt>
jmp    1173 <main+0x53>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
jmp    114e <main+0x2e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
je     1168 <main+0x48>
cmp    $0x9,%eax
jne    1140 <main+0x20>
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    $0x74,%eax
jmp    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %16, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %17
7: ; preds = %3
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 9
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = call i32 @putchar(i32 92)
%12 = call i32 @putchar(i32 116)
br label %16
13: ; preds = %7
%14 = load i32, i32* %2
%15 = call i32 @putchar(i32 %14)
br label %16
16: ; preds = %13, %10
br label %3
17: ; preds = %3
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %15, label %4
4: ; preds = %0, %9
%5 = phi i32 [ %12, %9 ], [ %1, %0 ]
%6 = icmp eq i32 %5, 9
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @putchar(i32 92)
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ 116, %7 ], [ %5, %4 ]
%11 = tail call i32 @putchar(i32 %10)
%12 = tail call i32 (...) @getchar()
%13 = load i32, i32* @EOF
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %4
15: ; preds = %9, %0
ret i32 0
}
/* Variables and functions */
double trunc(double);
double nearbyint(double x) { return trunc(x); }


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

x86 assembly (clang, -O2):
<nearbyint>:
jmp    1030 <trunc@plt>

LLVM IR (-O0):
define double @nearbyint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.trunc.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @nearbyint(double %0) {
%2 = tail call double @llvm.trunc.f64(double %0)
ret double %2
}
/* Type definitions */
typedef scalar_t__ int64_t;

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


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

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

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

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_int64_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int int32_t;
typedef int const int16_t;

/* Variables and functions */
int16_t PQCLEAN_KYBER512_CLEAN_barrett_reduce(int16_t a) {
  int32_t t;
  const int32_t v = (1U << 26) / 3329 + 1;
  t = v * a;
  t >>= 26;
  t *= 3329;
  return a - (int16_t)t;
}


x86 assembly (clang, -O0):
<PQCLEAN_KYBER512_CLEAN_barrett_reduce>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x4ebf,-0xc(%rbp)
imul   $0x4ebf,-0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1a,%eax
mov    %eax,-0x8(%rbp)
imul   $0xd01,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PQCLEAN_KYBER512_CLEAN_barrett_reduce>:
imul   $0x4ebf,%edi,%eax
sar    $0x1a,%eax
imul   $0xfffff2ff,%eax,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @PQCLEAN_KYBER512_CLEAN_barrett_reduce(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 20159, i32* %4
%5 = load i32, i32* %2
%6 = mul nsw i32 20159, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = ashr i32 %7, 26
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = mul nsw i32 %9, 3329
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = sub nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @PQCLEAN_KYBER512_CLEAN_barrett_reduce(i32 %0) {
%2 = mul nsw i32 %0, 20159
%3 = ashr i32 %2, 26
%4 = mul nsw i32 %3, -3329
%5 = add i32 %4, %0
ret i32 %5
}
ISR(TIMER1_OVF_vect) {}


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

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

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

LLVM IR (-O2):
define i32 @ISR(i32 %0) {
ret i32 undef
}
int main(void) {
  int x = 0;
  x + 1;
  goto l;
  {
  l:;
    int y = 0;
    y + 1;
  }
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char const *redroid_buildinfo();
const char *module_api_redroid_buildinfo(void) { return redroid_buildinfo(); }


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

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

LLVM IR (-O0):
define i8* @module_api_redroid_buildinfo() {
%1 = call i8* (...) @redroid_buildinfo()
ret i8* %1
}

LLVM IR (-O2):
define i8* @module_api_redroid_buildinfo() {
%1 = tail call i8* (...) @redroid_buildinfo()
ret i8* %1
}
/* Variables and functions */
int INT_MIN;
int divide_power2(int x, int k) {
  int sign = x & INT_MIN;
  sign && (x = x + (1 << k) - 1);
  return (x >> k);
}


x86 assembly (clang, -O0):
<divide_power2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ed4(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     1148 <divide_power2+0x48>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide_power2>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x2ed8(%rip),%rdx
test   %edi,(%rdx)
lea    -0x1(%rdi,%rax,1),%eax
cmove  %edi,%eax
sar    %cl,%eax
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
define i32 @divide_power2(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* @INT_MIN
%8 = and i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = shl i32 1, %13
%15 = add nsw i32 %12, %14
%16 = sub nsw i32 %15, 1
store i32 %16, i32* %3
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %11, %2
%19 = phi i1 [ false, %2 ], [ %17, %11 ]
%20 = zext i1 %19 to i32
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = ashr i32 %21, %22
ret i32 %23
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define i32 @divide_power2(i32 %0, i32 %1) {
%3 = load i32, i32* @INT_MIN
%4 = and i32 %3, %0
%5 = icmp eq i32 %4, 0
%6 = shl nuw i32 1, %1
%7 = add i32 %0, -1
%8 = add i32 %7, %6
%9 = select i1 %5, i32 %0, i32 %8
%10 = ashr i32 %9, %1
ret i32 %10
}
/* Variables and functions */
bool skip_env_var(const char *envstring) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @skip_env_var(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, unsigned int);
void wipe(unsigned char *buf, unsigned int len) {
  assert(NULL != buf);
  memset(buf, 0, len);
}


x86 assembly (clang, -O0):
<wipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wipe>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @wipe(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* null, %5
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 @memset(i8* %9, i32 0, i32 %10)
ret void
}

LLVM IR (-O2):
define void @wipe(i8* %0, i32 %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @memset(i8* %0, i32 0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int one(void) {
  printf("one\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"one\0A\00"
define i32 @one() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [4 x i8] c"one\00"
define i32 @one() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 1
}
double jac_chain_nm4_sq(double x) { return x * x; }


x86 assembly (clang, -O0):
<jac_chain_nm4_sq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm4_sq>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @jac_chain_nm4_sq(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
ret double %5
}

LLVM IR (-O2):
define double @jac_chain_nm4_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Variables and functions */
scalar_t__ menu_save(int /*<<< orphan*/);
int /*<<< orphan*/ reset_all_save(int /*<<< orphan*/);
void menu_save_bar(void) {
  if (menu_save(0))
    reset_all_save(0);
}


x86 assembly (clang, -O0):
<menu_save_bar>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <menu_save@plt>
cmp    $0x0,%rax
je     113c <menu_save_bar+0x1c>
xor    %edi,%edi
call   1030 <reset_all_save@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_save_bar>:
push   %rax
xor    %edi,%edi
call   1040 <menu_save@plt>
test   %rax,%rax
je     1135 <menu_save_bar+0x15>
xor    %edi,%edi
pop    %rax
jmp    1030 <reset_all_save@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @menu_save_bar() {
%1 = call i64 @menu_save(i32 0)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @reset_all_save(i32 0)
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @menu_save_bar() {
%1 = tail call i64 @menu_save(i32 0)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @reset_all_save(i32 0)
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Halt();
int /*<<< orphan*/ MyCopy(char *, char *, int, int);
int /*<<< orphan*/ Print(char *);
void main() {
  Print("=== Modif program initiated ===\n");
  MyCopy("asdfg.txt", "def.txt", 40, 50);
  Print("=== Modif program terminated ===\n");
  Halt();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <Print@plt>
lea    0xeda(%rip),%rdi
lea    0xedd(%rip),%rsi
mov    $0x28,%edx
mov    $0x32,%ecx
call   1030 <MyCopy@plt>
lea    0xecf(%rip),%rdi
call   1040 <Print@plt>
mov    $0x0,%al
call   1050 <Halt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <Print@plt>
lea    0xedd(%rip),%rdi
lea    0xee0(%rip),%rsi
mov    $0x28,%edx
mov    $0x32,%ecx
call   1030 <MyCopy@plt>
lea    0xed2(%rip),%rdi
call   1040 <Print@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <Halt@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"=== Modif program initiated ===\0A\00"
@.str.1 = [10 x i8] c"asdfg.txt\00"
@.str.2 = [8 x i8] c"def.txt\00"
@.str.3 = [34 x i8] c"=== Modif program terminated ===\0A\00"
define void @main() {
%1 = call i32 @Print(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @MyCopy(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 40, i32 50)
%3 = call i32 @Print(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 (...) @Halt()
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"=== Modif program initiated ===\0A\00"
@.str.1 = [10 x i8] c"asdfg.txt\00"
@.str.2 = [8 x i8] c"def.txt\00"
@.str.3 = [34 x i8] c"=== Modif program terminated ===\0A\00"
define void @main() {
%1 = tail call i32 @Print(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @MyCopy(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 40, i32 50)
%3 = tail call i32 @Print(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 (...) @Halt()
ret void
}
int fun1(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fun1() {
ret i32 0
}
/* Variables and functions */
void _mm256_zeroupper();
void test_mm256_zeroupper() { return _mm256_zeroupper(); }


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

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

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

LLVM IR (-O2):
define void @test_mm256_zeroupper() {
tail call void (...) @_mm256_zeroupper()
ret void
}
int test_imm_19int8_mem(signed char *val) {
  return ((*val) & (-0x19 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_19int8_mem>:
testb  $0xe7,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_19int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -25
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
float mystery();
int libcall_float(int uno, float dos) {
  if (dos == 0.5F) {
    return 7;
  } else {
    return (int)(mystery() * dos * uno);
  }
}


x86 assembly (clang, -O0):
<libcall_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xed3(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1148 <libcall_float+0x38>
jp     1148 <libcall_float+0x38>
movl   $0x7,-0x4(%rbp)
jmp    1164 <libcall_float+0x54>
mov    $0x0,%al
call   1030 <mystery@plt>
mulss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libcall_float>:
push   %rbx
sub    $0x10,%rsp
mov    $0x7,%eax
ucomiss 0xedf(%rip),%xmm0
jne    1125 <libcall_float+0x15>
jnp    1146 <libcall_float+0x36>
mov    %edi,%ebx
xor    %eax,%eax
movss  %xmm0,0xc(%rsp)
call   1030 <mystery@plt>
cvtsi2ss %ebx,%xmm1
mulss  0xc(%rsp),%xmm0
mulss  %xmm0,%xmm1
cvttss2si %xmm1,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @libcall_float(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 %0, i32* %4
store float %1, float* %5
%6 = load float, float* %5
%7 = fcmp oeq float %6, 5.000000e-01
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 7, i32* %3
br label %17
9: ; preds = %2
%10 = call float (...) @mystery()
%11 = load float, float* %5
%12 = fmul float %10, %11
%13 = load i32, i32* %4
%14 = sitofp i32 %13 to float
%15 = fmul float %12, %14
%16 = fptosi float %15 to i32
store i32 %16, i32* %3
br label %17
17: ; preds = %9, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @libcall_float(i32 %0, float %1) {
%3 = fcmp oeq float %1, 5.000000e-01
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = tail call float (...) @mystery()
%6 = fmul float %5, %1
%7 = sitofp i32 %0 to float
%8 = fmul float %6, %7
%9 = fptosi float %8 to i32
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %9, %4 ], [ 7, %2 ]
ret i32 %11
}
/* Variables and functions */
int zero_or_ten(int /*<<< orphan*/);
int zero_to_infty() {
  int r = 0;
  for (int i = 0; i < zero_or_ten(0); i++) {
    r++;
  }
  return r;
}


x86 assembly (clang, -O0):
<zero_to_infty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
xor    %edi,%edi
call   1030 <zero_or_ten@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jge    1157 <zero_to_infty+0x47>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <zero_to_infty+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero_to_infty>:
push   %rbx
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <zero_or_ten@plt>
test   %eax,%eax
jle    112e <zero_to_infty+0x1e>
xor    %ebx,%ebx
add    $0x1,%ebx
xor    %edi,%edi
call   1030 <zero_or_ten@plt>
cmp    %eax,%ebx
jl     1120 <zero_to_infty+0x10>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @zero_to_infty() {
%1 = tail call i32 @zero_or_ten(i32 0)
%2 = icmp sgt i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %5, %0
%4 = phi i32 [ 0, %0 ], [ %7, %5 ]
ret i32 %4
5: ; preds = %0, %5
%6 = phi i32 [ %7, %5 ], [ 0, %0 ]
%7 = add nuw nsw i32 %6, 1
%8 = tail call i32 @zero_or_ten(i32 0)
%9 = icmp slt i32 %7, %8
br i1 %9, label %5, label %3
}
void foo821(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo821(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ f2();
void test13() { f2() ? (void)0 : (void)0; }


x86 assembly (clang, -O0):
<test13>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <f2@plt>
cmp    $0x0,%rax
je     112a <test13+0x1a>
jmp    112f <test13+0x1f>
jmp    112f <test13+0x1f>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test13() {
%1 = call i64 (...) @f2()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
br label %5
4: ; preds = %0
br label %5
5: ; preds = %4, %3
ret void
}

LLVM IR (-O2):
define void @test13() {
%1 = tail call i64 (...) @f2()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit_error();
int /*<<< orphan*/ print_error(char const *);
void trigger_error(const char *msg) {
  print_error(msg);
  exit_error();
}


x86 assembly (clang, -O0):
<trigger_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <print_error@plt>
mov    $0x0,%al
call   1040 <exit_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trigger_error>:
push   %rax
call   1030 <print_error@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <exit_error@plt>

LLVM IR (-O0):
define void @trigger_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @print_error(i8* %3)
%5 = call i32 (...) @exit_error()
ret void
}

LLVM IR (-O2):
define void @trigger_error(i8* %0) {
%2 = tail call i32 @print_error(i8* %0)
%3 = tail call i32 (...) @exit_error()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_cond_t;
typedef int /*<<< orphan*/ cnd_t;

/* Variables and functions */
int __private_cond_signal(int /*<<< orphan*/ *, int);
int cnd_broadcast(cnd_t *c) {
  return __private_cond_signal((pthread_cond_t *)c, -1);
}


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

x86 assembly (clang, -O2):
<cnd_broadcast>:
mov    $0xffffffff,%esi
jmp    1030 <__private_cond_signal@plt>

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

LLVM IR (-O2):
define i32 @cnd_broadcast(i32* %0) {
%2 = tail call i32 @__private_cond_signal(i32* %0, i32 -1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ StartJizdaRovne(int);
int /*<<< orphan*/ StopJizdaRovne();
int /*<<< orphan*/ wait1Msec(int);
void TrochaDopredu() {
  StartJizdaRovne(40);
  wait1Msec(250);
  StopJizdaRovne();
}


x86 assembly (clang, -O0):
<TrochaDopredu>:
push   %rbp
mov    %rsp,%rbp
mov    $0x28,%edi
call   1050 <StartJizdaRovne@plt>
mov    $0xfa,%edi
call   1040 <wait1Msec@plt>
mov    $0x0,%al
call   1030 <StopJizdaRovne@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TrochaDopredu>:
push   %rax
mov    $0x28,%edi
call   1050 <StartJizdaRovne@plt>
mov    $0xfa,%edi
call   1040 <wait1Msec@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <StopJizdaRovne@plt>

LLVM IR (-O0):
define void @TrochaDopredu() {
%1 = call i32 @StartJizdaRovne(i32 40)
%2 = call i32 @wait1Msec(i32 250)
%3 = call i32 (...) @StopJizdaRovne()
ret void
}

LLVM IR (-O2):
define void @TrochaDopredu() {
%1 = tail call i32 @StartJizdaRovne(i32 40)
%2 = tail call i32 @wait1Msec(i32 250)
%3 = tail call i32 (...) @StopJizdaRovne()
ret void
}
float fast_bias(float value, float b) {
  return value / ((1 / b - 2) * (1 - value) + 1);
}


x86 assembly (clang, -O0):
<fast_bias>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xee5(%rip),%xmm1
divss  -0x8(%rbp),%xmm1
movss  0xedc(%rip),%xmm2
subss  %xmm2,%xmm1
movss  0xecc(%rip),%xmm2
subss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm1
movss  0xebb(%rip),%xmm2
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_bias>:
movss  0xef8(%rip),%xmm2
movaps %xmm2,%xmm3
divss  %xmm1,%xmm3
addss  0xeed(%rip),%xmm3
movaps %xmm2,%xmm1
subss  %xmm0,%xmm1
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fast_bias(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fdiv float 1.000000e+00, %6
%8 = fsub float %7, 2.000000e+00
%9 = load float, float* %3
%10 = fsub float 1.000000e+00, %9
%11 = call float @llvm.fmuladd.f32(float %8, float %10, float 1.000000e+00)
%12 = fdiv float %5, %11
ret float %12
}

LLVM IR (-O2):
define float @fast_bias(float %0, float %1) {
%3 = fdiv float 1.000000e+00, %1
%4 = fadd float %3, -2.000000e+00
%5 = fsub float 1.000000e+00, %0
%6 = tail call float @llvm.fmuladd.f32(float %4, float %5, float 1.000000e+00)
%7 = fdiv float %0, %6
ret float %7
}
void g_utf8_strncpy() {}


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

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

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

LLVM IR (-O2):
define void @g_utf8_strncpy() {
ret void
}
/* Variables and functions */
float ANTweenTimingFunctionBackInOut(float, int /*<<< orphan*/, int, float);
float ANTweenProgressTimingFunctionBackInOut(float time, float duration) {
  return ANTweenTimingFunctionBackInOut(time, 0, 1, duration);
}


x86 assembly (clang, -O0):
<ANTweenProgressTimingFunctionBackInOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <ANTweenTimingFunctionBackInOut@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANTweenProgressTimingFunctionBackInOut>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <ANTweenTimingFunctionBackInOut@plt>

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

LLVM IR (-O2):
define float @ANTweenProgressTimingFunctionBackInOut(float %0, float %1) {
%3 = tail call float @ANTweenTimingFunctionBackInOut(float %0, i32 0, i32 1, float %1)
ret float %3
}
void symbolBinary(int address, int bits[16]) {
  int indexBit;
  for (indexBit = 15; indexBit >= 0; --indexBit) {
    int rest;
    rest = address % 2;
    bits[indexBit] = rest;
    address /= 2;
  }
}


x86 assembly (clang, -O0):
<symbolBinary>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xf,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1154 <symbolBinary+0x54>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <symbolBinary+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<symbolBinary>:
mov    $0xe,%r8d
cs nopw 0x0(%rax,%rax,1)
mov    %edi,%ecx
shr    $0x1f,%ecx
add    %edi,%ecx
mov    %ecx,%edx
and    $0xfffffffe,%edx
mov    %edi,%eax
sub    %edx,%eax
mov    %eax,0x4(%rsi,%r8,4)
mov    %ecx,%eax
sar    %eax
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
lea    0x3(%rdi),%ecx
test   %edi,%edi
cmovns %edi,%ecx
mov    %eax,(%rsi,%r8,4)
sar    $0x2,%ecx
add    $0xfffffffffffffffe,%r8
mov    %ecx,%edi
cmp    $0xfffffffffffffffe,%r8
jne    1110 <symbolBinary+0x10>
ret

LLVM IR (-O0):
define void @symbolBinary(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
store i32 15, i32* %5
br label %7
7: ; preds = %20, %2
%8 = load i32, i32* %5
%9 = icmp sge i32 %8, 0
br i1 %9, label %10, label %23
10: ; preds = %7
%11 = load i32, i32* %3
%12 = srem i32 %11, 2
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = load i32*, i32** %4
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
store i32 %13, i32* %17
%18 = load i32, i32* %3
%19 = sdiv i32 %18, 2
store i32 %19, i32* %3
br label %20
20: ; preds = %10
%21 = load i32, i32* %5
%22 = add nsw i32 %21, -1
store i32 %22, i32* %5
br label %7
23: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @symbolBinary(i32 %0, i32* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ 15, %2 ], [ %13, %3 ]
%5 = phi i32 [ %0, %2 ], [ %12, %3 ]
%6 = srem i32 %5, 2
%7 = getelementptr inbounds i32, i32* %1, i64 %4
store i32 %6, i32* %7
%8 = sdiv i32 %5, 2
%9 = add nsw i64 %4, -1
%10 = srem i32 %8, 2
%11 = getelementptr inbounds i32, i32* %1, i64 %9
store i32 %10, i32* %11
%12 = sdiv i32 %5, 4
%13 = add nsw i64 %4, -2
%14 = icmp eq i64 %9, 0
br i1 %14, label %15, label %3
15: ; preds = %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ res_state;

/* Variables and functions */
void __res_put_state_nothread(res_state res) {}


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

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

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

LLVM IR (-O2):
define void @__res_put_state_nothread(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ convertToPostfix(char *);
int main() {
  char express[] = "a+b*(c^d-e)^(f+g*h)-i";
  convertToPostfix(express);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xecf(%rip),%ax
mov    %ax,-0xc(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <convertToPostfix@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x692d29682a672b,%rax
mov    %rax,0xe(%rsp)
mov    %rsp,%rdi
call   1030 <convertToPostfix@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.express = [22 x i8] c"a+b*(c^d-e)^(f+g*h)-i\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [22 x i8]
store i32 0, i32* %1
%3 = bitcast [22 x i8]* %2 to i8*
%4 = getelementptr inbounds [22 x i8], [22 x i8]* %2, i64 0, i64 0
%5 = call i32 @convertToPostfix(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.express = [22 x i8] c"a+b*(c^d-e)^(f+g*h)-i\00"
define i32 @main() {
%1 = alloca [22 x i8]
%2 = getelementptr inbounds [22 x i8], [22 x i8]* %1, i64 0, i64 0
%3 = call i32 @convertToPostfix(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ test_low_voltage(int);
int /*<<< orphan*/ test_read_time(int);
int /*<<< orphan*/ test_set_time(int);
int auto_test(int fd) {
  fprintf(stderr, "\nRTC Driver Auto Test.\n\n");
  test_set_time(fd);
  test_low_voltage(fd);
  test_read_time(fd);
  return 0;
}


x86 assembly (clang, -O0):
<auto_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1050 <test_set_time@plt>
mov    -0x4(%rbp),%edi
call   1060 <test_low_voltage@plt>
mov    -0x4(%rbp),%edi
call   1040 <test_read_time@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<auto_test>:
push   %rbx
mov    %edi,%ebx
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    0xead(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1050 <test_set_time@plt>
mov    %ebx,%edi
call   1060 <test_low_voltage@plt>
mov    %ebx,%edi
call   1040 <test_read_time@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"\0ARTC Driver Auto Test.\0A\0A\00"
define i32 @auto_test(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @test_set_time(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @test_low_voltage(i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @test_read_time(i32 %9)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"\0ARTC Driver Auto Test.\0A\0A\00"
define i32 @auto_test(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @test_set_time(i32 %0)
%5 = tail call i32 @test_low_voltage(i32 %0)
%6 = tail call i32 @test_read_time(i32 %0)
ret i32 0
}
/* Type definitions */
struct input_id {
  int vendor;
  int product;
  int version;
  int /*<<< orphan*/ bustype;
};

/* Variables and functions */
int /*<<< orphan*/ BUS_VIRTUAL;
int setup_uinput_device_v1(int, char const *, struct input_id const *);
int setup_uinput_device(int uinput_fd, const char *device_name) {
  const struct input_id device_input_id = {
      .bustype = BUS_VIRTUAL, .vendor = 0x1, .product = 0x1, .version = 1};
  return setup_uinput_device_v1(uinput_fd, device_name, &device_input_id);
}


x86 assembly (clang, -O0):
<setup_uinput_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x1,-0x18(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1030 <setup_uinput_device_v1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_uinput_device>:
sub    $0x18,%rsp
movabs $0x100000001,%rax
mov    %rax,0x8(%rsp)
movl   $0x1,0x10(%rsp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x14(%rsp)
lea    0x8(%rsp),%rdx
call   1030 <setup_uinput_device_v1@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.input_id = type { i32, i32, i32, i32 }
@BUS_VIRTUAL = global i32 0
define i32 @setup_uinput_device(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.input_id
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = getelementptr inbounds %struct.input_id, %struct.input_id* %5, i32 0, i32 0
store i32 1, i32* %6
%7 = getelementptr inbounds %struct.input_id, %struct.input_id* %5, i32 0, i32 1
store i32 1, i32* %7
%8 = getelementptr inbounds %struct.input_id, %struct.input_id* %5, i32 0, i32 2
store i32 1, i32* %8
%9 = getelementptr inbounds %struct.input_id, %struct.input_id* %5, i32 0, i32 3
%10 = load i32, i32* @BUS_VIRTUAL
store i32 %10, i32* %9
%11 = load i32, i32* %3
%12 = load i8*, i8** %4
%13 = call i32 @setup_uinput_device_v1(i32 %11, i8* %12, %struct.input_id* %5)
ret i32 %13
}

LLVM IR (-O2):
%struct.input_id = type { i32, i32, i32, i32 }
@BUS_VIRTUAL = global i32 0
define i32 @setup_uinput_device(i32 %0, i8* %1) {
%3 = alloca %struct.input_id
%4 = bitcast %struct.input_id* %3 to i8*
%5 = getelementptr inbounds %struct.input_id, %struct.input_id* %3, i64 0, i32 0
store i32 1, i32* %5
%6 = getelementptr inbounds %struct.input_id, %struct.input_id* %3, i64 0, i32 1
store i32 1, i32* %6
%7 = getelementptr inbounds %struct.input_id, %struct.input_id* %3, i64 0, i32 2
store i32 1, i32* %7
%8 = getelementptr inbounds %struct.input_id, %struct.input_id* %3, i64 0, i32 3
%9 = load i32, i32* @BUS_VIRTUAL
store i32 %9, i32* %8
%10 = call i32 @setup_uinput_device_v1(i32 %0, i8* %1, %struct.input_id* %3)
ret i32 %10
}
void glMaterialfv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glMaterialfv() {
ret void
}
void RTFileMove(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileMove() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void visit(int x) { printf("%d ", x); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @visit(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
unsigned int get_be16(const unsigned char *p) { return (p[0] << 8) + p[1]; }


x86 assembly (clang, -O0):
<get_be16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_be16>:
movzwl (%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @get_be16(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = add nsw i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @get_be16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: test <options>\n options:\n"
         "\ts <seconds> - set timer to run after <seconds> seconds\n"
         "\tc           - cancel timer\n"
         "\ta <seconds> - allocate memory after <seconds> seconds\n"
         "\tp <pid>     - monitor pid\n"
         "\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [200 x i8] c"Usage: test <options>\0A options:\0A\09s <seconds> - set timer to run after <seconds> seconds\0A\09c - cancel timer\0A\09a <seconds> - allocate memory after <seconds> seconds\0A\09p <pid> - monitor pid\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [199 x i8] c"Usage: test <options>\0A options:\0A\09s <seconds> - set timer to run after <seconds> seconds\0A\09c - cancel timer\0A\09a <seconds> - allocate memory after <seconds> seconds\0A\09p <pid> - monitor pid\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([199 x i8], [199 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("cd ~/Documents/NN_compare; source activate neural101; jupyter "
         "notebook; source deactivate ");
}


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

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

LLVM IR (-O0):
@.str = [91 x i8] c"cd ~/Documents/NN_compare; source activate neural101; jupyter notebook; source deactivate \00"
define i32 @main() {
%1 = call i32 @system(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [91 x i8] c"cd ~/Documents/NN_compare; source activate neural101; jupyter notebook; source deactivate \00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct kbentry {
  int dummy;
};
typedef int /*<<< orphan*/ k;

/* Variables and functions */
int main(void) {
  struct kbentry k;
  (void)k;
  return sizeof(k);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ exponential(int, int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int x, n;
  scanf("%d%d", &x, &n);
  printf("%lf \n", exponential(x, n));
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <exponential@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [6 x i8] c"%lf \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @exponential(i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
void *malloc(size_t);
void *libc_malloc(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<libc_malloc>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @libc_malloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @libc_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}