xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
int f(int);
main() {
  if (f(0) != 2)
    abort();
  if (f(1) != 5)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <f@plt>
cmp    $0x2,%eax
je     1146 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x1,%edi
call   1040 <f@plt>
cmp    $0x5,%eax
je     1160 <main+0x40>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <f@plt>
cmp    $0x2,%eax
jne    1140 <main+0x20>
mov    $0x1,%edi
call   1040 <f@plt>
cmp    $0x5,%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 0)
%3 = icmp ne i32 %2, 2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @f(i32 1)
%8 = icmp ne i32 %7, 5
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 0)
%2 = icmp eq i32 %1, 2
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @f(i32 1)
%7 = icmp eq i32 %6, 5
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
ret i32 0
}
/* Variables and functions */
unsigned int __blcs_u32(unsigned int);
unsigned int test__blcs_u32(unsigned int a) { return __blcs_u32(a); }


x86 assembly (clang, -O0):
<test__blcs_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <__blcs_u32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test__blcs_u32>:
jmp    1030 <__blcs_u32@plt>

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

LLVM IR (-O2):
define i32 @test__blcs_u32(i32 %0) {
%2 = tail call i32 @__blcs_u32(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void MPURegionSet(uint32_t ui32Region, uint32_t ui32Addr, uint32_t ui32Flags) {
  ;

  ;
  (*((volatile uint32_t *)(0xE000ED9C))) = ui32Addr | ui32Region | 0x00000010;
  (*((volatile uint32_t *)(0xE000EDA0))) =
      ((ui32Flags & ~(0x00380000 | 0x00020000)) | 0x00040000 | 0x00010000);
}


x86 assembly (clang, -O0):
<MPURegionSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
or     -0x4(%rbp),%ecx
or     $0x10,%ecx
mov    $0xe000ed9c,%eax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
and    $0xffc5ffff,%ecx
or     $0x40000,%ecx
or     $0x10000,%ecx
mov    $0xe000eda0,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPURegionSet>:
or     %esi,%edi
or     $0x10,%edi
mov    $0xe000ed9c,%eax
mov    %edi,(%rax)
and    $0xffc0ffff,%edx
or     $0x50000,%edx
mov    %edx,0x4(%rax)
ret

LLVM IR (-O0):
define void @MPURegionSet(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = or i32 %7, %8
%10 = or i32 %9, 16
store volatile i32 %10, i32* inttoptr (i64 3758157212 to i32*)
%11 = load i32, i32* %6
%12 = and i32 %11, -3801089
%13 = or i32 %12, 262144
%14 = or i32 %13, 65536
store volatile i32 %14, i32* inttoptr (i64 3758157216 to i32*)
ret void
}

LLVM IR (-O2):
define void @MPURegionSet(i32 %0, i32 %1, i32 %2) {
%4 = or i32 %0, %1
%5 = or i32 %4, 16
store volatile i32 %5, i32* inttoptr (i64 3758157212 to i32*)
%6 = and i32 %2, -4128769
%7 = or i32 %6, 327680
store volatile i32 %7, i32* inttoptr (i64 3758157216 to i32*)
ret void
}
void destroy_key(const char *e) {
  _mc_free((void *)e, __FUNCTION__,
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/hdijkema/elementals/refs/heads/master/"
           "src/set.c",
           23);
}


x86 assembly (clang, -O0):
<destroy_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    0xede(%rip),%rdx
mov    $0x17,%ecx
mov    $0x0,%al
call   1030 <_mc_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_key>:
lea    0xee9(%rip),%rsi
lea    0xeee(%rip),%rdx
mov    $0x17,%ecx
xor    %eax,%eax
jmp    1030 <_mc_free@plt>

LLVM IR (-O0):
@__FUNCTION__.destroy_key = [12 x i8] c"destroy_key\00"
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hdijkema/elementals/refs/heads/master/src/set.c\00"
define void @destroy_key(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @_mc_free to i32 (i8*, i8*, i8*, i32, ...)*)(i8* %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.destroy_key, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 23)
ret void
}

LLVM IR (-O2):
@__FUNCTION__.destroy_key = [12 x i8] c"destroy_key\00"
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hdijkema/elementals/refs/heads/master/src/set.c\00"
define void @destroy_key(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @_mc_free to i32 (i8*, i8*, i8*, i32, ...)*)(i8* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.destroy_key, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 23)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int i = 10000000;
  int prev = i - 1;
  while (i > prev) {
    assert(i == prev + 1);
    prev = i;
    i = (++i) & ~0x80000000;
  }
  printf("Number: %d(%x), %d", i, i, i & ~0x80000000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x989680,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    117f <main+0x5f>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
and    $0x7fffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    113f <main+0x1f>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
and    $0x7fffffff,%ecx
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <assert@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [19 x i8] c"Number: %d(%x), %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10000000, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 1
store i32 %5, i32* %3
br label %6
6: ; preds = %10, %0
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
%14 = icmp eq i32 %11, %13
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i32, i32* %2
store i32 %17, i32* %3
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
%20 = and i32 %19, 2147483647
store i32 %20, i32* %2
br label %6
21: ; preds = %6
%22 = load i32, i32* %2
%23 = load i32, i32* %2
%24 = load i32, i32* %2
%25 = and i32 %24, 2147483647
%26 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %22, i32 %23, i32 %25)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @assert(i32 1)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ read(int, char *, int);
int main(int argc, char *argv[]) {
  int fd;
  fd = open("/proc/meminfo", O_RDONLY);
  char *buf;
  read(fd, buf, 1024);
  close(fd);
  printf("%s", buf);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
lea    0xea1(%rip),%rdi
call   1060 <open@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    $0x400,%edx
call   1050 <read@plt>
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
mov    -0x20(%rbp),%rsi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
lea    0xeaf(%rip),%rdi
call   1060 <open@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x400,%edx
call   1050 <read@plt>
mov    %ebx,%edi
call   1040 <close@plt>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/proc/meminfo\00"
@O_RDONLY = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i32, i32* @O_RDONLY
%8 = call i32 @open(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = call i32 @read(i32 %9, i8* %10, i32 1024)
%12 = load i32, i32* %5
%13 = call i32 @close(i32 %12)
%14 = load i8*, i8** %6
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"/proc/meminfo\00"
@O_RDONLY = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @O_RDONLY
%4 = tail call i32 @open(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @read(i32 %4, i8* undef, i32 1024)
%6 = tail call i32 @close(i32 %4)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Timemark(short *);
long _Today(void) {
  short v[7];
  Timemark(v);
  return 10000L * (long)v[0] + 100L * (long)v[1] + (long)v[2];
}


x86 assembly (clang, -O0):
<_Today>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xe(%rbp),%rdi
call   1030 <Timemark@plt>
movswq -0xe(%rbp),%rax
imul   $0x2710,%rax,%rax
movswq -0xc(%rbp),%rcx
imul   $0x64,%rcx,%rcx
add    %rcx,%rax
movswq -0xa(%rbp),%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Today>:
sub    $0x18,%rsp
lea    0xa(%rsp),%rdi
call   1030 <Timemark@plt>
movswq 0xa(%rsp),%rax
imul   $0x2710,%rax,%rax
movswq 0xc(%rsp),%rcx
imul   $0x64,%rcx,%rcx
add    %rax,%rcx
movswq 0xe(%rsp),%rax
add    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i64 @_Today() {
%1 = alloca [7 x i16]
%2 = getelementptr inbounds [7 x i16], [7 x i16]* %1, i64 0, i64 0
%3 = call i32 @Timemark(i16* %2)
%4 = getelementptr inbounds [7 x i16], [7 x i16]* %1, i64 0, i64 0
%5 = load i16, i16* %4
%6 = sext i16 %5 to i64
%7 = mul nsw i64 10000, %6
%8 = getelementptr inbounds [7 x i16], [7 x i16]* %1, i64 0, i64 1
%9 = load i16, i16* %8
%10 = sext i16 %9 to i64
%11 = mul nsw i64 100, %10
%12 = add nsw i64 %7, %11
%13 = getelementptr inbounds [7 x i16], [7 x i16]* %1, i64 0, i64 2
%14 = load i16, i16* %13
%15 = sext i16 %14 to i64
%16 = add nsw i64 %12, %15
ret i64 %16
}

LLVM IR (-O2):
define i64 @_Today() {
%1 = alloca [7 x i16]
%2 = bitcast [7 x i16]* %1 to i8*
%3 = getelementptr inbounds [7 x i16], [7 x i16]* %1, i64 0, i64 0
%4 = call i32 @Timemark(i16* %3)
%5 = load i16, i16* %3
%6 = sext i16 %5 to i64
%7 = mul nsw i64 %6, 10000
%8 = getelementptr inbounds [7 x i16], [7 x i16]* %1, i64 0, i64 1
%9 = load i16, i16* %8
%10 = sext i16 %9 to i64
%11 = mul nsw i64 %10, 100
%12 = add nsw i64 %11, %7
%13 = getelementptr inbounds [7 x i16], [7 x i16]* %1, i64 0, i64 2
%14 = load i16, i16* %13
%15 = sext i16 %14 to i64
%16 = add nsw i64 %12, %15
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ arp_monitor();
int main(int argc, char **argv) {
  arp_monitor();
  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 <arp_monitor@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <arp_monitor@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 (...) @arp_monitor()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @arp_monitor()
ret i32 0
}
int dddd() { int g667h, ttt; }


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

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

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

LLVM IR (-O2):
define i32 @dddd() {
ret i32 undef
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *__asan_dummy_calloc(size_t nmemb, size_t size) {
  return calloc(nmemb, size);
}


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

x86 assembly (clang, -O2):
<__asan_dummy_calloc>:
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @__asan_dummy_calloc(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 = call i8* @calloc(i64 %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @__asan_dummy_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
ret i8* %3
}
int strcmp(const char *s1, const char *s2) {
  char c1, c2;
  while ((c1 = *s1++) == (c2 = *s2++) && c1)
    ;
  return c1 - c2;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movsbl %al,%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x12(%rbp)
movsbl %al,%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x13(%rbp)
jne    1154 <strcmp+0x54>
movsbl -0x11(%rbp),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x13(%rbp)
mov    -0x13(%rbp),%al
test   $0x1,%al
jne    1164 <strcmp+0x64>
jmp    1169 <strcmp+0x69>
jmp    110c <strcmp+0xc>
movsbl -0x11(%rbp),%eax
movsbl -0x12(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi,%rcx,1),%eax
movzbl (%rsi,%rcx,1),%edx
test   %eax,%eax
je     1124 <strcmp+0x24>
add    $0x1,%rcx
cmp    %dl,%al
je     1110 <strcmp+0x10>
movsbl %dl,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %8, %3 ]
%5 = phi i8* [ %0, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = load i8, i8* %4
%10 = icmp eq i8 %7, %9
%11 = icmp ne i8 %7, 0
%12 = and i1 %11, %10
br i1 %12, label %3, label %13
13: ; preds = %3
%14 = sext i8 %7 to i32
%15 = sext i8 %9 to i32
%16 = sub nsw i32 %14, %15
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ OPL_Reset();
void OPL_Close(void) { OPL_Reset(); }


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

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

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

LLVM IR (-O2):
define void @OPL_Close() {
%1 = tail call i32 (...) @OPL_Reset()
ret void
}
int abs(int n) {
  if (n >= 0)
    return n;
  else
    return -n;
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     111c <abs+0x1c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <abs+0x24>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
struct FB {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fb_close(struct FB *);
void fb_destory(struct FB *fb) { fb_close(fb); }


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

x86 assembly (clang, -O2):
<fb_destory>:
jmp    1030 <fb_close@plt>

LLVM IR (-O0):
%struct.FB = type { i32 }
define void @fb_destory(%struct.FB* %0) {
%2 = alloca %struct.FB*
store %struct.FB* %0, %struct.FB** %2
%3 = load %struct.FB*, %struct.FB** %2
%4 = call i32 @fb_close(%struct.FB* %3)
ret void
}

LLVM IR (-O2):
%struct.FB = type { i32 }
define void @fb_destory(%struct.FB* %0) {
%2 = tail call i32 @fb_close(%struct.FB* %0)
ret void
}
const char *pa_get_library_version(void) {
  ;
  return "5.0.0";
}


x86 assembly (clang, -O0):
<pa_get_library_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pa_get_library_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"5.0.0\00"
define i8* @pa_get_library_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"5.0.0\00"
define i8* @pa_get_library_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
int batadv_bla_init(struct batadv_priv *bat_priv) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.batadv_priv = type opaque
define i32 @batadv_bla_init(%struct.batadv_priv* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printi(int k) { printf("%d", k); }


x86 assembly (clang, -O0):
<printi>:
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):
<printi>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @printi(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int test_imm_49uint8_mem(unsigned char *val) {
  return ((*val) & (0x49 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_49uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 73
%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_49uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 73
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int int64_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t aeron_logbuffer_term_id(int64_t raw_tail) {
  return (int32_t)(raw_tail >> 32);
}


x86 assembly (clang, -O0):
<aeron_logbuffer_term_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @aeron_logbuffer_term_id(i32 %0) {
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, double);
void print_name_and_dvalue(char *name, double value) {
  printf("# %-28s = %12.7lf\n", name, value);
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"# %-28s = %12.7lf\0A\00"
define void @print_name_and_dvalue(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load i8*, i8** %3
%6 = load double, double* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %5, double %6)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"# %-28s = %12.7lf\0A\00"
define void @print_name_and_dvalue(i8* %0, double %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0, double %1)
ret void
}
void XtCvtColorToPixel() {}


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

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

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

LLVM IR (-O2):
define void @XtCvtColorToPixel() {
ret void
}
/* Variables and functions */
int EthernetPHYRead(unsigned long, int);
int /*<<< orphan*/ EthernetPHYWrite(unsigned long, int, int);
void EthernetPHYPowerOff(unsigned long ulBase) {
  EthernetPHYWrite(ulBase, 0x00000000,
                   (EthernetPHYRead(ulBase, 0x00000000) & ~0x00001000) |
                       0x00000800);
}


x86 assembly (clang, -O0):
<EthernetPHYPowerOff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <EthernetPHYRead@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%edx
and    $0xffffefff,%edx
or     $0x800,%edx
xor    %esi,%esi
call   1040 <EthernetPHYWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EthernetPHYPowerOff>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <EthernetPHYRead@plt>
and    $0xffffe7ff,%eax
lea    0x800(%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <EthernetPHYWrite@plt>

LLVM IR (-O0):
define void @EthernetPHYPowerOff(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = call i32 @EthernetPHYRead(i64 %4, i32 0)
%6 = and i32 %5, -4097
%7 = or i32 %6, 2048
%8 = call i32 @EthernetPHYWrite(i64 %3, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @EthernetPHYPowerOff(i64 %0) {
%2 = tail call i32 @EthernetPHYRead(i64 %0, i32 0)
%3 = and i32 %2, -6145
%4 = or i32 %3, 2048
%5 = tail call i32 @EthernetPHYWrite(i64 %0, i32 0, i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_set1_epi16(short);
__m128i test_mm_set1_epi16(short A) { return _mm_set1_epi16(A); }


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

x86 assembly (clang, -O2):
<test_mm_set1_epi16>:
jmp    1030 <_mm_set1_epi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_set1_epi16(i16 signext %0) {
%2 = tail call i32 @_mm_set1_epi16(i16 signext %0)
ret i32 %2
}
/* Variables and functions */
int open(char const *, int);
int /*<<< orphan*/ perror(char *);
int file_open(const char *path, int flags) {
  int fd = open(path, flags);
  if (fd < 0) {
    perror("libsoc-file-debug");
    return -1;
  }
  return fd;
}


x86 assembly (clang, -O0):
<file_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <open@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1160 <file_open+0x40>
lea    0xeb1(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <file_open+0x46>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_open>:
push   %rax
call   1030 <open@plt>
test   %eax,%eax
js     112c <file_open+0xc>
pop    %rcx
ret
lea    0xecd(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"libsoc-file-debug\00"
define i32 @file_open(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = call i32 @open(i8* %7, i32 %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %16
14: ; preds = %2
%15 = load i32, i32* %6
store i32 %15, i32* %3
br label %16
16: ; preds = %14, %12
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str = [18 x i8] c"libsoc-file-debug\00"
define i32 @file_open(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @open(i8* %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ -1, %5 ], [ %3, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ CNFGSetup(char const *, int, int);
void CNFGSetupFullscreen(const char *WindowName, int screen_no) {
  CNFGSetup(WindowName, 640, 480);
}


x86 assembly (clang, -O0):
<CNFGSetupFullscreen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x280,%esi
mov    $0x1e0,%edx
call   1030 <CNFGSetup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CNFGSetupFullscreen>:
mov    $0x280,%esi
mov    $0x1e0,%edx
jmp    1030 <CNFGSetup@plt>

LLVM IR (-O0):
define void @CNFGSetupFullscreen(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 = call i32 @CNFGSetup(i8* %5, i32 640, i32 480)
ret void
}

LLVM IR (-O2):
define void @CNFGSetupFullscreen(i8* %0, i32 %1) {
%3 = tail call i32 @CNFGSetup(i8* %0, i32 640, i32 480)
ret void
}
void TemplateSample(x) int x;
{ printf("You just called the template sample function: %d\n", x); }


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"You just called the template sample function: %d\0A\00"
define void @TemplateSample(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"You just called the template sample function: %d\0A\00"
define void @TemplateSample(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ print_help(int);
int /*<<< orphan*/ printf(char *);
void exit_with_error(char *message) {
  printf("Error: ");
  printf(message);
  printf("\n");
  print_help(false);
  exit(-1);
}


x86 assembly (clang, -O0):
<exit_with_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <print_help@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<exit_with_error>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1050 <print_help@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"Error: \00"
define void @exit_with_error(i8* nocapture %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) %0)
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @print_help(i32 0)
%6 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printHeader() {
  printf("Regula falsi - Nullstellenannaeherung\n");
  printf("Danish Shahid 2015\n");
}


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

x86 assembly (clang, -O2):
<printHeader>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Regula falsi - Nullstellenannaeherung\0A\00"
@.str.1 = [20 x i8] c"Danish Shahid 2015\0A\00"
define void @printHeader() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [38 x i8] c"Regula falsi - Nullstellenannaeherung\00"
@str.2 = [19 x i8] c"Danish Shahid 2015\00"
define void @printHeader() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.2, i64 0, i64 0))
ret void
}
struct device_node *of_create_node(struct device_node *root, const char *path) {
  return ((void *)0);
}


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

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

LLVM IR (-O0):
%struct.device_node = type opaque
define %struct.device_node* @of_create_node(%struct.device_node* %0, i8* %1) {
%3 = alloca %struct.device_node*
%4 = alloca i8*
store %struct.device_node* %0, %struct.device_node** %3
store i8* %1, i8** %4
ret %struct.device_node* null
}

LLVM IR (-O2):
%struct.device_node = type opaque
define noalias %struct.device_node* @of_create_node(%struct.device_node* nocapture readnone %0, i8* nocapture readnone %1) {
ret %struct.device_node* null
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void fatal(const char *msg) {
  fprintf(stderr, "ERROR: %s", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [10 x i8] c"ERROR: %s\00"
@EXIT_FAILURE = global i32 0
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [10 x i8] c"ERROR: %s\00"
@EXIT_FAILURE = global i32 0
define void @fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
float _sinf(float);
float cosf(float);
void sincosf(float x, float *s, float *c) {
  *s = _sinf(x);
  *c = cosf(x);
}


x86 assembly (clang, -O0):
<sincosf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <_sinf@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x4(%rbp),%xmm0
call   1030 <cosf@plt>
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sincosf>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movss  %xmm0,0x4(%rsp)
call   1040 <_sinf@plt>
movss  %xmm0,(%rbx)
movss  0x4(%rsp),%xmm0
call   1030 <cosf@plt>
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @sincosf(float %0, float* %1, float* %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca float*
store float %0, float* %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float, float* %4
%8 = call float @_sinf(float %7)
%9 = load float*, float** %5
store float %8, float* %9
%10 = load float, float* %4
%11 = call float @cosf(float %10)
%12 = load float*, float** %6
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @sincosf(float %0, float* nocapture writeonly %1, float* nocapture writeonly %2) {
%4 = tail call float @_sinf(float %0)
store float %4, float* %1
%5 = tail call float @cosf(float %0)
store float %5, float* %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p434_from_bytes(uintptr_t, uintptr_t);
void fiat_p434_from_bytes(uint64_t out1[7], const uint8_t arg1[55]) {
  internal_fiat_p434_from_bytes((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p434_from_bytes>:
jmp    1030 <internal_fiat_p434_from_bytes@plt>

LLVM IR (-O0):
define void @fiat_p434_from_bytes(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p434_from_bytes(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p434_from_bytes(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p434_from_bytes(i64 %3, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CyEEPROM_Start();
void EEPROM_1_Enable(void) { CyEEPROM_Start(); }


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

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

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

LLVM IR (-O2):
define void @EEPROM_1_Enable() {
%1 = tail call i32 (...) @CyEEPROM_Start()
ret void
}
void rop3_188_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D & S;
  stk3 = ~stk3;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_188_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_188_1_0>:
mov    (%rdi),%al
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_188_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = and i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = xor i32 %18, -1
%20 = trunc i32 %19 to i8
store i8 %20, i8* %9
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = load i8, i8* %9
%24 = zext i8 %23 to i32
%25 = and i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %8
%27 = load i8, i8* %5
%28 = zext i8 %27 to i32
%29 = load i8, i8* %8
%30 = zext i8 %29 to i32
%31 = xor i32 %28, %30
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = xor i32 %36, -1
%38 = and i32 %34, %37
%39 = load i8*, i8** %4
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = load i8, i8* %5
%43 = zext i8 %42 to i32
%44 = and i32 %41, %43
%45 = or i32 %38, %44
%46 = trunc i32 %45 to i8
%47 = load i8*, i8** %4
store i8 %46, i8* %47
ret void
}

LLVM IR (-O2):
define void @rop3_188_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
%6 = xor i8 %1, -1
%7 = and i8 %6, %2
%8 = or i8 %5, %7
store i8 %8, i8* %0
ret void
}
get_str(string, buffer) char *string, *buffer;
{
  while (*string && !isspace(*string))
    *buffer++ = *string++;
  *buffer = '\0';
}


x86 assembly (clang, -O0):
<get_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     114c <get_str+0x3c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    115c <get_str+0x4c>
jmp    1183 <get_str+0x73>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1120 <get_str+0x10>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_str>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    (%rdi),%bpl
test   %bpl,%bpl
je     1150 <get_str+0x40>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
movsbl %bpl,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1150 <get_str+0x40>
mov    %bpl,(%r14)
add    $0x1,%r14
movzbl (%rbx),%ebp
add    $0x1,%rbx
test   %bpl,%bpl
jne    1130 <get_str+0x20>
movb   $0x0,(%r14)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @get_str(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %2, %12
%6 = phi i8 [ %15, %12 ], [ %3, %2 ]
%7 = phi i8* [ %14, %12 ], [ %1, %2 ]
%8 = phi i8* [ %13, %12 ], [ %0, %2 ]
%9 = sext i8 %6 to i32
%10 = tail call i32 @isspace(i32 %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %5
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %7
%15 = load i8, i8* %13
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %5
17: ; preds = %5, %12, %2
%18 = phi i8* [ %1, %2 ], [ %14, %12 ], [ %7, %5 ]
store i8 0, i8* %18
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ RSA;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *ASN1_item_d2i_fp(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ **);
int /*<<< orphan*/ RSAPublicKey_it;
RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa) {
  return ASN1_item_d2i_fp(&RSAPublicKey_it, fp, rsa);
}


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

x86 assembly (clang, -O2):
<d2i_RSAPublicKey_fp>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rdi
jmp    1030 <ASN1_item_d2i_fp@plt>

LLVM IR (-O0):
@RSAPublicKey_it = global i32 0
define i32* @d2i_RSAPublicKey_fp(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* @ASN1_item_d2i_fp(i32* @RSAPublicKey_it, i32* %5, i32** %6)
ret i32* %7
}

LLVM IR (-O2):
@RSAPublicKey_it = global i32 0
define i32* @d2i_RSAPublicKey_fp(i32* %0, i32** %1) {
%3 = tail call i32* @ASN1_item_d2i_fp(i32* @RSAPublicKey_it, i32* %0, i32** %1)
ret i32* %3
}