xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ srand(int);
int /*<<< orphan*/ test_basic();
int /*<<< orphan*/ test_copy();
int /*<<< orphan*/ test_input();
int /*<<< orphan*/ test_subset();
int main() {
  srand(42);
  test_basic();
  test_input();
  test_copy();
  test_subset();
  printf("success\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2a,%edi
call   1050 <srand@plt>
mov    $0x0,%al
call   1080 <test_basic@plt>
mov    $0x0,%al
call   1060 <test_input@plt>
mov    $0x0,%al
call   1030 <test_copy@plt>
mov    $0x0,%al
call   1070 <test_subset@plt>
lea    0xe64(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2a,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1080 <test_basic@plt>
xor    %eax,%eax
call   1060 <test_input@plt>
xor    %eax,%eax
call   1040 <test_copy@plt>
xor    %eax,%eax
call   1070 <test_subset@plt>
lea    0xe72(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"success\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @srand(i32 42)
%3 = call i32 (...) @test_basic()
%4 = call i32 (...) @test_input()
%5 = call i32 (...) @test_copy()
%6 = call i32 (...) @test_subset()
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [8 x i8] c"success\00"
define i32 @main() {
%1 = tail call i32 @srand(i32 42)
%2 = tail call i32 (...) @test_basic()
%3 = tail call i32 (...) @test_input()
%4 = tail call i32 (...) @test_copy()
%5 = tail call i32 (...) @test_subset()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ write(int, char *, int);
int replay(char *buf, int fd) {
  int len = 0;
  if ((len = strlen(buf)) != 0)
    write(fd, buf, len);
  return 1;
}


x86 assembly (clang, -O0):
<replay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     115a <replay+0x3a>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%edx
call   1030 <write@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<replay>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <strlen@plt>
test   %eax,%eax
je     113d <replay+0x1d>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @replay(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @write(i32 %1, i8* %0, i32 %3)
br label %7
7: ; preds = %5, %2
ret i32 1
}
void foo679() {}


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

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

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

LLVM IR (-O2):
define void @foo679() {
ret void
}
int *test() { return 0; }


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

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

LLVM IR (-O0):
define i32* @test() {
ret i32* null
}

LLVM IR (-O2):
define noalias i32* @test() {
ret i32* null
}
int do_while_independent_of_p(int p) {
  int a = 0;
  do {
    if (p == 15) {
      p = p + 1;
    }
    a++;
  } while (a < 25);
  return 0;
}


x86 assembly (clang, -O0):
<do_while_independent_of_p>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xf,-0x4(%rbp)
jne    1121 <do_while_independent_of_p+0x21>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x19,-0x8(%rbp)
jl     110e <do_while_independent_of_p+0xe>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @do_while_independent_of_p(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ r;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int);
uint32_t U8TO32_LITTLE(const uint8_t *p) {
  uint32_t r;
  memcpy(&r, p, sizeof(r));
  return r;
}


x86 assembly (clang, -O0):
<U8TO32_LITTLE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U8TO32_LITTLE>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @U8TO32_LITTLE(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i32* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int __cxa_atexit(void (*)(void *), void *, void *);
int __aeabi_atexit(void *object, void (*dtor)(void *this), void *handle) {
  return __cxa_atexit(dtor, object, handle);
}


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

x86 assembly (clang, -O2):
<__aeabi_atexit>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <__cxa_atexit@plt>

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

LLVM IR (-O2):
define i32 @__aeabi_atexit(i8* %0, void (i8*)* %1, i8* %2) {
%4 = tail call i32 @__cxa_atexit(void (i8*)* %1, i8* %0, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int age = 10;
  int height = 72;
  printf("I am %d years old.\n", age);
  printf("I am %d inches tall\n", height);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [21 x i8] c"I am %d inches tall\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 72, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [21 x i8] c"I am %d inches tall\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 72)
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ close();
int /*<<< orphan*/ init();
int /*<<< orphan*/ loop();
int main(int argc, char *argv[]) {
  init();
  loop();
  close();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <init@plt>
mov    $0x0,%al
call   1030 <loop@plt>
mov    $0x0,%al
call   1040 <close@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <init@plt>
xor    %eax,%eax
call   1030 <loop@plt>
xor    %eax,%eax
call   1040 <close@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @init()
%7 = call i32 (...) @loop()
%8 = call i32 (...) @close()
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init()
%4 = tail call i32 (...) @loop()
%5 = tail call i32 (...) @close()
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
void f0r_deinit() {}


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

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

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

LLVM IR (-O2):
define void @f0r_deinit() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_hour;
  int tm_min;
  int tm_sec;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ sprintf(char *, char *, int, int, int);
char *convtime(time_t utime, char *chartim) {
  struct tm *tt;
  tt = localtime(&utime);
  sprintf(chartim, "%02d:%02d:%02d", tt->tm_hour, tt->tm_min, tt->tm_sec);
  return chartim;
}


x86 assembly (clang, -O0):
<convtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%r8d
lea    0xea4(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convtime>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%edx
mov    0x4(%rax),%ecx
mov    0x8(%rax),%r8d
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
@.str = [15 x i8] c"%02d:%02d:%02d\00"
define i8* @convtime(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.tm*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = call %struct.tm* @localtime(i32* %3)
store %struct.tm* %6, %struct.tm** %5
%7 = load i8*, i8** %4
%8 = load %struct.tm*, %struct.tm** %5
%9 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = load %struct.tm*, %struct.tm** %5
%12 = getelementptr inbounds %struct.tm, %struct.tm* %11, i32 0, i32 1
%13 = load i32, i32* %12
%14 = load %struct.tm*, %struct.tm** %5
%15 = getelementptr inbounds %struct.tm, %struct.tm* %14, i32 0, i32 2
%16 = load i32, i32* %15
%17 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %13, i32 %16)
%18 = load i8*, i8** %4
ret i8* %18
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
@.str = [15 x i8] c"%02d:%02d:%02d\00"
define i8* @convtime(i32 %0, i8* returned writeonly %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call %struct.tm* @localtime(i32* %3)
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 1
%8 = load i32, i32* %7
%9 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 2
%10 = load i32, i32* %9
%11 = call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8, i32 %10)
ret i8* %1
}
int num_count(int num) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @num_count(i32 %0) {
ret i32 0
}
unsigned long create_zero_mask(unsigned long bits) {
  bits = (bits - 1) & ~bits;
  return bits >> 7;
}


x86 assembly (clang, -O0):
<create_zero_mask>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
mov    -0x8(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
and    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x7,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_zero_mask>:
lea    -0x1(%rdi),%rax
not    %rdi
and    %rdi,%rax
shr    $0x7,%rax
ret

LLVM IR (-O0):
define i64 @create_zero_mask(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub i64 %3, 1
%5 = load i64, i64* %2
%6 = xor i64 %5, -1
%7 = and i64 %4, %6
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = lshr i64 %8, 7
ret i64 %9
}

LLVM IR (-O2):
define i64 @create_zero_mask(i64 %0) {
%2 = add i64 %0, -1
%3 = xor i64 %0, -1
%4 = and i64 %2, %3
%5 = lshr i64 %4, 7
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ run_test();
int main(int argc, char **argv) {
  run_test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @run_test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fake_acquire_cpu(int /*<<< orphan*/);
int /*<<< orphan*/ fake_release_cpu(int /*<<< orphan*/);
int /*<<< orphan*/ get_cpu();
int /*<<< orphan*/ rcu_note_context_switch(int /*<<< orphan*/);
int cond_resched(void) {
  rcu_note_context_switch(get_cpu());
  fake_release_cpu(get_cpu());
  fake_acquire_cpu(get_cpu());
  return 0;
}


x86 assembly (clang, -O0):
<cond_resched>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <get_cpu@plt>
mov    %eax,%edi
call   1030 <rcu_note_context_switch@plt>
mov    $0x0,%al
call   1060 <get_cpu@plt>
mov    %eax,%edi
call   1040 <fake_release_cpu@plt>
mov    $0x0,%al
call   1060 <get_cpu@plt>
mov    %eax,%edi
call   1050 <fake_acquire_cpu@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cond_resched>:
push   %rax
xor    %eax,%eax
call   1060 <get_cpu@plt>
mov    %eax,%edi
call   1030 <rcu_note_context_switch@plt>
xor    %eax,%eax
call   1060 <get_cpu@plt>
mov    %eax,%edi
call   1040 <fake_release_cpu@plt>
xor    %eax,%eax
call   1060 <get_cpu@plt>
mov    %eax,%edi
call   1050 <fake_acquire_cpu@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cond_resched() {
%1 = call i32 (...) @get_cpu()
%2 = call i32 @rcu_note_context_switch(i32 %1)
%3 = call i32 (...) @get_cpu()
%4 = call i32 @fake_release_cpu(i32 %3)
%5 = call i32 (...) @get_cpu()
%6 = call i32 @fake_acquire_cpu(i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @cond_resched() {
%1 = tail call i32 (...) @get_cpu()
%2 = tail call i32 @rcu_note_context_switch(i32 %1)
%3 = tail call i32 (...) @get_cpu()
%4 = tail call i32 @fake_release_cpu(i32 %3)
%5 = tail call i32 (...) @get_cpu()
%6 = tail call i32 @fake_acquire_cpu(i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int hd_nation(FILE *f) {
  static int count = 0;
  if (!count++)
    printf("No header has been defined for the nation table\n");
  return (0);
}


x86 assembly (clang, -O0):
<hd_nation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2f0a(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2eff(%rip)
cmp    $0x0,%eax
jne    1142 <hd_nation+0x32>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hd_nation>:
push   %rax
mov    0x2f15(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f0c(%rip)
test   %eax,%eax
jne    1130 <hd_nation+0x20>
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@hd_nation.count = internal global i32 0
@.str = [49 x i8] c"No header has been defined for the nation table\0A\00"
define i32 @hd_nation(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @hd_nation.count
%4 = add nsw i32 %3, 1
store i32 %4, i32* @hd_nation.count
%5 = icmp ne i32 %3, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret i32 0
}

LLVM IR (-O2):
@hd_nation.count = internal unnamed_addr global i32 0
@str = [48 x i8] c"No header has been defined for the nation table\00"
define i32 @hd_nation(i32* nocapture readnone %0) {
%2 = load i32, i32* @hd_nation.count
%3 = add nsw i32 %2, 1
store i32 %3, i32* @hd_nation.count
%4 = icmp eq i32 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret i32 0
}
cbuf34(f, n) { return (cbuf(f, n, 34)); }


x86 assembly (clang, -O0):
<cbuf34>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x22,%edx
mov    $0x0,%al
call   1030 <cbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf34>:
mov    $0x22,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf34(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %5, i32 %6, i32 34)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cbuf34(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 34)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  puts("Hello");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
float fast_mexp2f(const float x) {
  const float i1 = (float)0x3f800000u;
  const float i2 = (float)0x3f000000u;
  const float k0 = i1 + x * (i2 - i1);
  union {
    float f;
    int i;
  } k;
  k.i = k0 >= (float)0x800000u ? k0 : 0;
  return k.f;
}


x86 assembly (clang, -O0):
<fast_mexp2f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef7(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeee(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed4(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xecc(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  0xeae(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     116a <fast_mexp2f+0x6a>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1177 <fast_mexp2f+0x77>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1177 <fast_mexp2f+0x77>
movss  -0x1c(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_mexp2f>:
mulss  0xef8(%rip),%xmm0
addss  0xef4(%rip),%xmm0
movss  0xef0(%rip),%xmm1
cmpless %xmm0,%xmm1
andps  %xmm0,%xmm1
cvttss2si %xmm1,%eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { float }
define float @fast_mexp2f(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca %union.anon
store float %0, float* %2
store float 0x41CFC00000000000, float* %3
store float 0x41CF800000000000, float* %4
%7 = load float, float* %2
%8 = call float @llvm.fmuladd.f32(float %7, float 0xC160000000000000, float 0x41CFC00000000000)
store float %8, float* %5
%9 = load float, float* %5
%10 = fcmp oge float %9, 0x4160000000000000
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load float, float* %5
br label %14
13: ; preds = %1
br label %14
14: ; preds = %13, %11
%15 = phi float [ %12, %11 ], [ 0.000000e+00, %13 ]
%16 = fptosi float %15 to i32
%17 = bitcast %union.anon* %6 to i32*
store i32 %16, i32* %17
%18 = bitcast %union.anon* %6 to float*
%19 = load float, float* %18
ret float %19
}

LLVM IR (-O2):
define float @fast_mexp2f(float %0) {
%2 = tail call float @llvm.fmuladd.f32(float %0, float 0xC160000000000000, float 0x41CFC00000000000)
%3 = fcmp oge float %2, 0x4160000000000000
%4 = select i1 %3, float %2, float 0.000000e+00
%5 = fptosi float %4 to i32
%6 = bitcast i32 %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ execl(char *, char *, char *, char *, char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Before exec\n");
  execl("./test", "param1", "param2", "param3", (char *)NULL);
  printf("After exec\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
lea    0xec4(%rip),%rsi
lea    0xec4(%rip),%rdx
lea    0xec4(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
call   1040 <execl@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef4(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
lea    0xecc(%rip),%rsi
lea    0xecc(%rip),%rdx
lea    0xecc(%rip),%rcx
xor    %r8d,%r8d
call   1040 <execl@plt>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Before exec\0A\00"
@.str.1 = [7 x i8] c"./test\00"
@.str.2 = [7 x i8] c"param1\00"
@.str.3 = [7 x i8] c"param2\00"
@.str.4 = [7 x i8] c"param3\00"
@.str.5 = [12 x i8] c"After exec\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @execl(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* null)
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"./test\00"
@.str.2 = [7 x i8] c"param1\00"
@.str.3 = [7 x i8] c"param2\00"
@.str.4 = [7 x i8] c"param3\00"
@str = [12 x i8] c"Before exec\00"
@str.6 = [11 x i8] c"After exec\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @execl(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* null)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ nop_sec();
void wait_seconds(uint8_t seconds) {
  for (int i = 1; i <= seconds; i++) {
    nop_sec();
  }
}


x86 assembly (clang, -O0):
<wait_seconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1143 <wait_seconds+0x33>
mov    $0x0,%al
call   1030 <nop_sec@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <wait_seconds+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_seconds>:
push   %rbx
test   %edi,%edi
jle    112c <wait_seconds+0x1c>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <nop_sec@plt>
add    $0xffffffff,%ebx
jne    1120 <wait_seconds+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @wait_seconds(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %4
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 1, %1 ]
%6 = tail call i32 (...) @nop_sec()
%7 = add nuw i32 %5, 1
%8 = icmp eq i32 %5, %0
br i1 %8, label %3, label %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
__attribute__((always_)) void u32_store_aligned(void *p, uint32_t a) {
  *((uint32_t *)p) = a;
}


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

x86 assembly (clang, -O2):
<u32_store_aligned>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @u32_store_aligned(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @u32_store_aligned(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x51() {
  Assert_real((islower(81) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              410, ("islower should be 0 for Q"));
}


x86 assembly (clang, -O0):
<t_islower_0x51>:
push   %rbp
mov    %rsp,%rbp
mov    $0x51,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x19a,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x51>:
push   %rax
mov    $0x51,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x19a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for Q\00"
define void @t_islower_0x51() {
%1 = call i64 @islower(i32 81)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 410, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for Q\00"
define void @t_islower_0x51() {
%1 = tail call i64 @islower(i32 81)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 410, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef unsigned int uint8_t;
typedef unsigned int uint16_t;

/* Variables and functions */
void PUT_BE16(uint8_t *buff, uint16_t size) {
  buff[0] = (size >> 8U) & 0xFFU;
  buff[1] = size & 0xFFU;
}


x86 assembly (clang, -O0):
<PUT_BE16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PUT_BE16>:
mov    %esi,%eax
movzbl %ah,%ecx
mov    %ecx,(%rdi)
movzbl %al,%eax
mov    %eax,0x4(%rdi)
ret

LLVM IR (-O0):
define void @PUT_BE16(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 = lshr i32 %5, 8
%7 = and i32 %6, 255
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
%10 = load i32, i32* %4
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
ret void
}

LLVM IR (-O2):
define void @PUT_BE16(i32* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = and i32 %3, 255
store i32 %4, i32* %0
%5 = and i32 %1, 255
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
ret void
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
char *util_concatenate(const char *first, const char *second) {
  char *buffer = malloc(sizeof(strlen(first) + strlen(second) + 1));
  strcpy(buffer, first);
  strcat(buffer, second);
  return buffer;
}


x86 assembly (clang, -O0):
<util_concatenate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_concatenate>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @util_concatenate(i8* %0, i8* %1) {
%3 = tail call dereferenceable_or_null(8) i8* @malloc(i32 8)
%4 = tail call i32 @strcpy(i8* %3, i8* %0)
%5 = tail call i32 @strcat(i8* %3, i8* %1)
ret i8* %3
}
void XBEE_UART_SCB_IRQ_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @XBEE_UART_SCB_IRQ_Interrupt() {
ret void
}
char *_strcpy(char *dest, const char *src) {
  asm volatile("1:\tlodsb\n\t"
               "stosb\n\t"
               "testb %%al,%%al\n\t"
               "jne 1b"
               :
               : "S"(src), "D"(dest)
               : "memory", "%eax");
  return dest;
}


x86 assembly (clang, -O0):
<_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdi
lods   %ds:(%rsi),%al
stos   %al,%es:(%rdi)
test   %al,%al
jne    1114 <_strcpy+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strcpy>:
lods   %ds:(%rsi),%al
stos   %al,%es:(%rdi)
test   %al,%al
jne    1100 <_strcpy>
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @_strcpy(i8* returned %0, i8* %1) {
tail call void asm sideeffect "1:\09lodsb\0A\09stosb\0A\09testb %al,%al\0A\09jne 1b", "{si},{di},~{memory},~{eax},~{dirflag},~{fpsr},~{flags}"(i8* %1, i8* %0)
ret i8* %0
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void AESIntClear(uint32_t intFlags) {

  ;
  (*((volatile unsigned long *)(0x40024000 + 0x00000788))) = intFlags;
}


x86 assembly (clang, -O0):
<AESIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x40024788,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESIntClear>:
mov    %rdi,0x40024788
40
ret

LLVM IR (-O0):
define void @AESIntClear(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1073891208 to i64*)
ret void
}

LLVM IR (-O2):
define void @AESIntClear(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1073891208 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_char(int, char, char, char, char, char);
int /*<<< orphan*/ print_int(int, char, char, char, char, char);
int main(int argc, char *argv[]) {
  print_int(5, 1, 2, 3, 4, 5);
  print_int(5, 'a', 'b', 'c', 'd', 'e');
  print_char(5, 'a', 'b', 'c', 'd', 'e');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x5,%r9d
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    %r9d,%edi
call   1030 <print_int@plt>
mov    $0x5,%edi
mov    $0x61,%esi
mov    $0x62,%edx
mov    $0x63,%ecx
mov    $0x64,%r8d
mov    $0x65,%r9d
call   1030 <print_int@plt>
mov    $0x5,%edi
mov    $0x61,%esi
mov    $0x62,%edx
mov    $0x63,%ecx
mov    $0x64,%r8d
mov    $0x65,%r9d
call   1040 <print_char@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
call   1030 <print_int@plt>
mov    $0x5,%edi
mov    $0x61,%esi
mov    $0x62,%edx
mov    $0x63,%ecx
mov    $0x64,%r8d
mov    $0x65,%r9d
call   1030 <print_int@plt>
mov    $0x5,%edi
mov    $0x61,%esi
mov    $0x62,%edx
mov    $0x63,%ecx
mov    $0x64,%r8d
mov    $0x65,%r9d
call   1040 <print_char@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @print_int(i32 5, i8 signext 1, i8 signext 2, i8 signext 3, i8 signext 4, i8 signext 5)
%7 = call i32 @print_int(i32 5, i8 signext 97, i8 signext 98, i8 signext 99, i8 signext 100, i8 signext 101)
%8 = call i32 @print_char(i32 5, i8 signext 97, i8 signext 98, i8 signext 99, i8 signext 100, i8 signext 101)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @print_int(i32 5, i8 signext 1, i8 signext 2, i8 signext 3, i8 signext 4, i8 signext 5)
%4 = tail call i32 @print_int(i32 5, i8 signext 97, i8 signext 98, i8 signext 99, i8 signext 100, i8 signext 101)
%5 = tail call i32 @print_char(i32 5, i8 signext 97, i8 signext 98, i8 signext 99, i8 signext 100, i8 signext 101)
ret i32 0
}
unsigned invert(unsigned x, int p, int n) {
  int mask;
  mask = (~(~0U << n)) << (p - n + 1);
  return mask ^ x;
}


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
sub    %edx,%esi
lea    0x1(%rsi),%ecx
shl    %cl,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = shl i32 -1, %8
%10 = xor i32 %9, -1
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = sub nsw i32 %11, %12
%14 = add nsw i32 %13, 1
%15 = shl i32 %10, %14
store i32 %15, i32* %7
%16 = load i32, i32* %7
%17 = load i32, i32* %4
%18 = xor i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = shl nsw i32 -1, %2
%5 = xor i32 %4, -1
%6 = add i32 %1, 1
%7 = sub i32 %6, %2
%8 = shl i32 %5, %7
%9 = xor i32 %8, %0
ret i32 %9
}
unsigned int is_digit(unsigned char ch) { return (('0' <= ch) && (ch <= '9')); }


x86 assembly (clang, -O0):
<is_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
jg     112d <is_digit+0x2d>
movzbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_digit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_digit(i8 zeroext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ errno;
scalar_t__ fstat(int, struct stat *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ svz_log(int, char *, int /*<<< orphan*/);
int svz_fstat(int fd, struct stat *buf) {
  if (fstat(fd, buf) < 0) {
    svz_log(1, "fstat: %s\n", strerror(errno));
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<svz_fstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <fstat@plt>
cmp    $0x0,%rax
jge    1182 <svz_fstat+0x52>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1030 <strerror@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xe8f(%rip),%rsi
call   1040 <svz_log@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1189 <svz_fstat+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svz_fstat>:
push   %rax
call   1050 <fstat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     1142 <svz_fstat+0x12>
pop    %rcx
ret
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1030 <strerror@plt>
lea    0xea9(%rip),%rsi
mov    $0x1,%edi
mov    %eax,%edx
call   1040 <svz_log@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [11 x i8] c"fstat: %s\0A\00"
@errno = global i32 0
define i32 @svz_fstat(i32 %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.stat*
store i32 %0, i32* %4
store %struct.stat* %1, %struct.stat** %5
%6 = load i32, i32* %4
%7 = load %struct.stat*, %struct.stat** %5
%8 = call i64 @fstat(i32 %6, %struct.stat* %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* @errno
%12 = call i32 @strerror(i32 %11)
%13 = call i32 @svz_log(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %12)
store i32 -1, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %10
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [11 x i8] c"fstat: %s\0A\00"
@errno = global i32 0
define i32 @svz_fstat(i32 %0, %struct.stat* nocapture %1) {
%3 = tail call i64 @fstat(i32 %0, %struct.stat* %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @errno
%7 = tail call i32 @strerror(i32 %6)
%8 = tail call i32 @svz_log(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %2, %5
%10 = phi i32 [ -1, %5 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fun(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int ret = 0;
  fun(1);
  printf("RETURNED %d\n", ret);
  if (ret != 4) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x1,%edi
call   1030 <fun@plt>
mov    -0x14(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x4,-0x14(%rbp)
je     116c <main+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1173 <main+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"RETURNED %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @fun(i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 1
}
void avpriv_init_lls() {}


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

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

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

LLVM IR (-O2):
define void @avpriv_init_lls() {
ret void
}
int main(int argc, const char *argv[]) {
  struct my_struct {
    int a;
    float b;
    double c;
  } x;
  struct my_struct y = {.a = 1, .b = -78.9, .c = 7.9};
  x.a = y.a;
  x.b = y.b;
  x.c = y.c;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xee7(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xee4(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x20(%rbp)
movss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.my_struct = type { i32, float, double }
@__const.main.y = %struct.my_struct { i32 1, float 0xC053B999A0000000, double 7.900000e+00 }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.my_struct
%7 = alloca %struct.my_struct
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast %struct.my_struct* %7 to i8*
%9 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %7, i32 0, i32 0
%10 = load i32, i32* %9
%11 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %6, i32 0, i32 0
store i32 %10, i32* %11
%12 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %7, i32 0, i32 1
%13 = load float, float* %12
%14 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %6, i32 0, i32 1
store float %13, float* %14
%15 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %7, i32 0, i32 2
%16 = load double, double* %15
%17 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %6, i32 0, i32 2
store double %16, double* %17
ret i32 0
}

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


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

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

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

LLVM IR (-O2):
define void @foo236() {
ret void
}
void foo(void) {
  int i;
#pragma acc kernels
  { i = 1; }
}


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

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

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

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