xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *r = malloc(size);
  if (r == NULL) {
    fprintf(stderr, "Failed to allocate memory\n");
    exit(1);
  }
  return r;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <xmalloc+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Failed to allocate memory\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Failed to allocate memory\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_composite_call_credentials_create() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_composite_call_credentials_create>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<grpcsharp_composite_call_credentials_create>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_composite_call_credentials_create() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_composite_call_credentials_create() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
float ortalamaBul(int *, int);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ sayilariOku(int *, int);
int main() {
  int sayilar[10];
  sayilariOku(sayilar, 10);
  float sonuc = ortalamaBul(sayilar, 10);
  printf("%f", sonuc);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <sayilariOku@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1050 <ortalamaBul@plt>
movss  %xmm0,-0x34(%rbp)
movss  -0x34(%rbp),%xmm0
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <sayilariOku@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <ortalamaBul@plt>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca float
store i32 0, i32* %1
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = call i32 @sayilariOku(i32* %4, i32 10)
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%7 = call float @ortalamaBul(i32* %6, i32 10)
store float %7, float* %3
%8 = load float, float* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @sayilariOku(i32* %3, i32 10)
%5 = call float @ortalamaBul(i32* %3, i32 10)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ili9325_set_window(int /*<<< orphan*/, int /*<<< orphan*/,
                                      int, int);
void ili9325_clear(int c) {
  int i;
  ili9325_set_window(0, 0, (240), (320));
  { *(unsigned short *)0x70000000 = 0x22; };
  for (i = 0; i < ((240) * (320)); i++) {
    { *(unsigned short *)0x78000000 = c; };
  }
}


x86 assembly (clang, -O0):
<ili9325_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %esi,%esi
mov    $0xf0,%edx
mov    $0x140,%ecx
mov    %esi,%edi
call   1030 <ili9325_set_window@plt>
mov    $0x70000000,%eax
movw   $0x22,(%rax)
movl   $0x0,-0x8(%rbp)
cmpl   $0x12c00,-0x8(%rbp)
jge    1168 <ili9325_clear+0x58>
mov    -0x4(%rbp),%eax
mov    %ax,%cx
mov    $0x78000000,%eax
mov    %cx,(%rax)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113f <ili9325_clear+0x2f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ili9325_clear>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
xor    %esi,%esi
mov    $0xf0,%edx
mov    $0x140,%ecx
call   1030 <ili9325_set_window@plt>
movw   $0x22,0x70000000
mov    %bx,0x78000000
78
pop    %rbx
ret

LLVM IR (-O0):
define void @ili9325_clear(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @ili9325_set_window(i32 0, i32 0, i32 240, i32 320)
store i16 34, i16* inttoptr (i64 1879048192 to i16*)
store i32 0, i32* %3
br label %5
5: ; preds = %11, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 76800
br i1 %7, label %8, label %14
8: ; preds = %5
%9 = load i32, i32* %2
%10 = trunc i32 %9 to i16
store i16 %10, i16* inttoptr (i64 2013265920 to i16*)
br label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %5
14: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @ili9325_clear(i32 %0) {
%2 = tail call i32 @ili9325_set_window(i32 0, i32 0, i32 240, i32 320)
store i16 34, i16* inttoptr (i64 1879048192 to i16*)
%3 = trunc i32 %0 to i16
store i16 %3, i16* inttoptr (i64 2013265920 to i16*)
ret void
}
long __ccaprice_syscall_args_3(long A0, long A1, long A2, long A3) {
  unsigned long R;
  __asm__ __volatile__("syscall"
                       : "=a"(R)
                       : "a"(A0), "D"(A1), "S"(A2), "d"(A3)
                       : "rcx", "r11", "memory");
  return R;
}


x86 assembly (clang, -O0):
<__ccaprice_syscall_args_3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
syscall
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ccaprice_syscall_args_3>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
syscall
ret

LLVM IR (-O0):
define i64 @__ccaprice_syscall_args_3(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%10 = load i64, i64* %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = call i64 asm sideeffect "syscall", "={ax},{ax},{di},{si},{dx},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %10, i64 %11, i64 %12, i64 %13)
store i64 %14, i64* %9
%15 = load i64, i64* %9
ret i64 %15
}

LLVM IR (-O2):
define i64 @__ccaprice_syscall_args_3(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i64 asm sideeffect "syscall", "={ax},{ax},{di},{si},{dx},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2, i64 %3)
ret i64 %5
}
void deterministic_cleanup(void) { return; }


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

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

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

LLVM IR (-O2):
define void @deterministic_cleanup() {
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int equal_string(void *s1, void *s2) {
  int x = strcmp((char *)s1, (char *)s2);
  return (x == 0);
}


x86 assembly (clang, -O0):
<equal_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal_string>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @equal_string(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintRTF(char *);
void CmdQuad(int kk) {
  int z;
  fprintRTF("{");
  for (z = 0; z <= kk; z++)
    fprintRTF("  ");
  fprintRTF("}");
}


x86 assembly (clang, -O0):
<CmdQuad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <fprintRTF@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1154 <CmdQuad+0x44>
lea    0xec1(%rip),%rdi
call   1030 <fprintRTF@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112e <CmdQuad+0x1e>
lea    0xeaa(%rip),%rdi
call   1030 <fprintRTF@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdQuad>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xee3(%rip),%rdi
call   1030 <fprintRTF@plt>
test   %ebx,%ebx
js     113d <CmdQuad+0x2d>
add    $0x1,%ebx
lea    0xed2(%rip),%r14
mov    %r14,%rdi
call   1030 <fprintRTF@plt>
add    $0xffffffff,%ebx
jne    1130 <CmdQuad+0x20>
lea    0xec1(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintRTF@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"{\00"
@.str.1 = [3 x i8] c" \00"
@.str.2 = [2 x i8] c"}\00"
define void @CmdQuad(i32 %0) {
%2 = tail call i32 @fprintRTF(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp slt i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @fprintRTF(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = add nuw i32 %5, 1
%8 = icmp eq i32 %5, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
%10 = tail call i32 @fprintRTF(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("wah test\n");
  printf("wah test\n");
  return 1;
}


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    0xed3(%rip),%rdi
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"wah test\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 ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str.1 = [9 x i8] c"wah test\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.1, i64 0, i64 0))
ret i32 1
}
int GLUE_POP_VALUE_TO_ADDR(unsigned char *buf, void *destptr) {
  if (buf) {
    *buf++ = 0x48;
    *buf++ = 0xB9;
    *(void **)buf = destptr;
    buf += 8;
    *buf++ = 0x8f;
    *buf++ = 0x01;
    *buf++ = 0x5F;
  }
  return 1 + 10 + 2;
}


x86 assembly (clang, -O0):
<GLUE_POP_VALUE_TO_ADDR>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1188 <GLUE_POP_VALUE_TO_ADDR+0x88>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x48,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0xb9,(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x8f,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x1,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x5f,(%rax)
mov    $0xd,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLUE_POP_VALUE_TO_ADDR>:
test   %rdi,%rdi
je     1118 <GLUE_POP_VALUE_TO_ADDR+0x18>
movw   $0xb948,(%rdi)
mov    %rsi,0x2(%rdi)
movw   $0x18f,0xa(%rdi)
movb   $0x5f,0xc(%rdi)
mov    $0xd,%eax
ret

LLVM IR (-O0):
define i32 @GLUE_POP_VALUE_TO_ADDR(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %23
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
store i8 72, i8* %8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
store i8 -71, i8* %10
%12 = load i8*, i8** %4
%13 = load i8*, i8** %3
%14 = bitcast i8* %13 to i8**
store i8* %12, i8** %14
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 8
store i8* %16, i8** %3
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %3
store i8 -113, i8* %17
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
store i8 1, i8* %19
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
store i8 95, i8* %21
br label %23
23: ; preds = %7, %2
ret i32 13
}

LLVM IR (-O2):
define i32 @GLUE_POP_VALUE_TO_ADDR(i8* writeonly %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 72, i8* %0
%6 = getelementptr inbounds i8, i8* %0, i64 2
store i8 -71, i8* %5
%7 = bitcast i8* %6 to i8**
store i8* %1, i8** %7
%8 = getelementptr inbounds i8, i8* %0, i64 10
%9 = getelementptr inbounds i8, i8* %0, i64 11
store i8 -113, i8* %8
%10 = getelementptr inbounds i8, i8* %0, i64 12
store i8 1, i8* %9
store i8 95, i8* %10
br label %11
11: ; preds = %4, %2
ret i32 13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void prool_version() {
  printf("Built by Prool %s %s "
         "proolix@gmail.com\nhttp://calculix.kharkov.org\nUse PROOL command in "
         "CGX main window for additional info\n",
         "Mar 18 2022", "23:12:36");
}


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

x86 assembly (clang, -O2):
<prool_version>:
lea    0xee9(%rip),%rdi
lea    0xf5f(%rip),%rsi
lea    0xf64(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [125 x i8] c"Built by Prool %s %s proolix@gmail.com\0Ahttp://calculix.kharkov.org\0AUse PROOL command in CGX main window for additional info\0A\00"
@.str.1 = [12 x i8] c"Mar 18 2022\00"
@.str.2 = [9 x i8] c"23:12:36\00"
define void @prool_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [125 x i8] c"Built by Prool %s %s proolix@gmail.com\0Ahttp://calculix.kharkov.org\0AUse PROOL command in CGX main window for additional info\0A\00"
@.str.1 = [12 x i8] c"Mar 18 2022\00"
@.str.2 = [9 x i8] c"23:12:36\00"
define void @prool_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void t4() {}


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

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

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

LLVM IR (-O2):
define void @t4() {
ret void
}
void fc54(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    goto a;
  a : {
    typedef int(*d)[n];
    0;
  };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc54(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %1
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = load i32, i32* %2
%13 = zext i32 %12 to i64
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
ret void
}

LLVM IR (-O2):
define void @fc54(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setTilt(float);
void lowerArm() {
  float angle = 180;
  while (angle >= 75) {
    angle = angle - 0.01;
    setTilt(angle);
  }
}


x86 assembly (clang, -O0):
<lowerArm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xee0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed2(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1168 <lowerArm+0x58>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xebc(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <setTilt@plt>
jmp    1125 <lowerArm+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lowerArm>:
push   %rax
movss  0xee7(%rip),%xmm0
nopl   0x0(%rax)
cvtss2sd %xmm0,%xmm0
addsd  0xedc(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
call   1030 <setTilt@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xebc(%rip),%xmm0
jae    1120 <lowerArm+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @lowerArm() {
%1 = alloca float
store float 1.800000e+02, float* %1
br label %2
2: ; preds = %5, %0
%3 = load float, float* %1
%4 = fcmp oge float %3, 7.500000e+01
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = fsub double %7, 1.000000e-02
%9 = fptrunc double %8 to float
store float %9, float* %1
%10 = load float, float* %1
%11 = call i32 @setTilt(float %10)
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @lowerArm() {
br label %1
1: ; preds = %0, %1
%2 = phi float [ 1.800000e+02, %0 ], [ %5, %1 ]
%3 = fpext float %2 to double
%4 = fadd double %3, -1.000000e-02
%5 = fptrunc double %4 to float
%6 = tail call i32 @setTilt(float %5)
%7 = fcmp ult float %5, 7.500000e+01
br i1 %7, label %8, label %1
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printFields();
void processListFieldsOption(const char *const option __attribute__((unused)),
                             const char *const parameter
                             __attribute__((unused))) {
  printFields();
  exit(0);
}


x86 assembly (clang, -O0):
<processListFieldsOption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <printFields@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<processListFieldsOption>:
push   %rax
xor    %eax,%eax
call   1030 <printFields@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @processListFieldsOption(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (...) @printFields()
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @processListFieldsOption(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @printFields()
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
double CDelta_delta(double);
double CDelta_3d_delta(double x[3]) {
  double ans = 1.;
  int d;
  for (d = 0; d < 3; d++) {
    ans *= CDelta_delta(x[d]);
  }
  return ans;
}


x86 assembly (clang, -O0):
<CDelta_3d_delta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  0xedc(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1164 <CDelta_3d_delta+0x54>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <CDelta_delta@plt>
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1130 <CDelta_3d_delta+0x20>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CDelta_3d_delta>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
call   1030 <CDelta_delta@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x8(%rbx),%xmm0
call   1030 <CDelta_delta@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rbx),%xmm0
call   1030 <CDelta_delta@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @CDelta_3d_delta(double* %0) {
%2 = alloca double*
%3 = alloca double
%4 = alloca i32
store double* %0, double** %2
store double 1.000000e+00, double* %3
store i32 0, i32* %4
br label %5
5: ; preds = %17, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = load double*, double** %2
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds double, double* %9, i64 %11
%13 = load double, double* %12
%14 = call double @CDelta_delta(double %13)
%15 = load double, double* %3
%16 = fmul double %15, %14
store double %16, double* %3
br label %17
17: ; preds = %8
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %5
20: ; preds = %5
%21 = load double, double* %3
ret double %21
}

LLVM IR (-O2):
define double @CDelta_3d_delta(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call double @CDelta_delta(double %2)
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %4
%6 = tail call double @CDelta_delta(double %5)
%7 = fmul double %3, %6
%8 = getelementptr inbounds double, double* %0, i64 2
%9 = load double, double* %8
%10 = tail call double @CDelta_delta(double %9)
%11 = fmul double %7, %10
ret double %11
}
void pt_pkt_decoder_fini(struct pt_packet_decoder *decoder) {}


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

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

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

LLVM IR (-O2):
%struct.pt_packet_decoder = type opaque
define void @pt_pkt_decoder_fini(%struct.pt_packet_decoder* nocapture %0) {
ret void
}
int map_parameter_oceanographic_subsurface(int center, int disc, int param_cat,
                                           int param_num) {
  (void)(disc);
  (void)(center);
  (void)(param_cat);
  switch (param_num) {
  case 0:
    return 69;
  case 1:
    return 70;
  case 2:
    return 68;
  case 3:
    return 88;
  default:
    break;
  }
  return -1;
}


x86 assembly (clang, -O0):
<map_parameter_oceanographic_subsurface>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %rax,-0x20(%rbp)
sub    $0x3,%rax
ja     1165 <map_parameter_oceanographic_subsurface+0x65>
mov    -0x20(%rbp),%rax
lea    0xed4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x45,-0x4(%rbp)
jmp    1171 <map_parameter_oceanographic_subsurface+0x71>
movl   $0x46,-0x4(%rbp)
jmp    1171 <map_parameter_oceanographic_subsurface+0x71>
movl   $0x44,-0x4(%rbp)
jmp    1171 <map_parameter_oceanographic_subsurface+0x71>
movl   $0x58,-0x4(%rbp)
jmp    1171 <map_parameter_oceanographic_subsurface+0x71>
jmp    116a <map_parameter_oceanographic_subsurface+0x6a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_parameter_oceanographic_subsurface>:
mov    $0xffffffff,%eax
cmp    $0x3,%ecx
ja     1117 <map_parameter_oceanographic_subsurface+0x17>
movslq %ecx,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @map_parameter_oceanographic_subsurface(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %7
%11 = load i32, i32* %6
%12 = load i32, i32* %8
%13 = load i32, i32* %9
switch i32 %13, label %18 [
i32 0, label %14
i32 1, label %15
i32 2, label %16
i32 3, label %17
]
14: ; preds = %4
store i32 69, i32* %5
br label %20
15: ; preds = %4
store i32 70, i32* %5
br label %20
16: ; preds = %4
store i32 68, i32* %5
br label %20
17: ; preds = %4
store i32 88, i32* %5
br label %20
18: ; preds = %4
br label %19
19: ; preds = %18
store i32 -1, i32* %5
br label %20
20: ; preds = %19, %17, %16, %15, %14
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
@switch.table.map_parameter_oceanographic_subsurface = [4 x i32] [i32 69, i32 70, i32 68, i32 88]
define i32 @map_parameter_oceanographic_subsurface(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp ult i32 %3, 4
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.map_parameter_oceanographic_subsurface, i64 0, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %4, %6
%11 = phi i32 [ %9, %6 ], [ -1, %4 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ usage(char *);
void help(char *argv0) {
  usage(argv0);
  fprintf(stderr, "-u\t--usage\tshow usage message\n"
                  "-h\t--help\tshow this help message\n"
                  "-e\t--encrypt\tperform encription rather than decription\n"
                  "-d\t--decrypt\tperform decription rather than encription\n"
                  "-k\t--ofile <key_str>\tset key_str>\n"
                  "-i\t--ifile <input file>\tset input file>\n"
                  "-o\t--ofile <output file>\tset output file>\n"
                  "\t\t--128\tuse 128-bit key_str\n"
                  "\t\t--192\tuse 192-bit key_str\n"
                  "\t\t--256\tuse 256-bit key_str\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <usage@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
call   1040 <usage@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
pop    %rax
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [374 x i8] c"-u\09--usage\09show usage message\0A-h\09--help\09show this help message\0A-e\09--encrypt\09perform encription rather than decription\0A-d\09--decrypt\09perform decription rather than encription\0A-k\09--ofile <key_str>\09set key_str>\0A-i\09--ifile <input file>\09set input file>\0A-o\09--ofile <output file>\09set output file>\0A\09\09--128\09use 128-bit key_str\0A\09\09--192\09use 192-bit key_str\0A\09\09--256\09use 256-bit key_str\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @usage(i8* %3)
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([374 x i8], [374 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [374 x i8] c"-u\09--usage\09show usage message\0A-h\09--help\09show this help message\0A-e\09--encrypt\09perform encription rather than decription\0A-d\09--decrypt\09perform decription rather than encription\0A-k\09--ofile <key_str>\09set key_str>\0A-i\09--ifile <input file>\09set input file>\0A-o\09--ofile <output file>\09set output file>\0A\09\09--128\09use 128-bit key_str\0A\09\09--192\09use 192-bit key_str\0A\09\09--256\09use 256-bit key_str\0A\00"
define void @help(i8* %0) {
%2 = tail call i32 @usage(i8* %0)
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([374 x i8], [374 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
long double __ieee754_logl(long double x) {
  fputs("__ieee754_logl not implemented\n", stderr);
  __set_errno(ENOSYS);
  return 0.0;
}


x86 assembly (clang, -O0):
<__ieee754_logl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ieee754_logl>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
pop    %rax
ret

LLVM IR (-O0):
@.str = [32 x i8] c"__ieee754_logl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__ieee754_logl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret x86_fp80 0xK00000000000000000000
}

LLVM IR (-O2):
@.str = [32 x i8] c"__ieee754_logl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__ieee754_logl(x86_fp80 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret x86_fp80 0xK00000000000000000000
}
void vp9_init_quant_tables(void) {}


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

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

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

LLVM IR (-O2):
define void @vp9_init_quant_tables() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
extern void xfree(void *ptr) {
  free(ptr);
  return;
}


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

x86 assembly (clang, -O2):
<xfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @xfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
bool systemeBigEndian(void) {
  const short testArchitectureBig = 0x000F;
  return (*((char *)&testArchitectureBig) == 0x00);
}


x86 assembly (clang, -O0):
<systemeBigEndian>:
push   %rbp
mov    %rsp,%rbp
movw   $0xf,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @systemeBigEndian() {
%1 = alloca i16
store i16 15, i16* %1
%2 = bitcast i16* %1 to i8*
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @systemeBigEndian() {
ret i32 0
}
/* Variables and functions */
int system(char *);
int drop_caches(void) {
  int ret;
  ret = system("echo 3 > /proc/sys/vm/drop_caches");
  return ret;
}


x86 assembly (clang, -O0):
<drop_caches>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <system@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [34 x i8] c"echo 3 > /proc/sys/vm/drop_caches\00"
define i32 @drop_caches() {
%1 = alloca i32
%2 = call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [34 x i8] c"echo 3 > /proc/sys/vm/drop_caches\00"
define i32 @drop_caches() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
float *Vector3Subtract(const float v1[3], const float v2[3], float result[3]) {
  result[0] = v1[0] - v2[0];
  result[1] = v1[1] - v2[1];
  result[2] = v1[2] - v2[2];
  return result;
}


x86 assembly (clang, -O0):
<Vector3Subtract>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vector3Subtract>:
mov    %rdx,%rax
movss  (%rdi),%xmm0
subss  (%rsi),%xmm0
movss  %xmm0,(%rdx)
movss  0x4(%rdi),%xmm0
subss  0x4(%rsi),%xmm0
movss  %xmm0,0x4(%rdx)
movss  0x8(%rdi),%xmm0
subss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdx)
ret

LLVM IR (-O0):
define float* @Vector3Subtract(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 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %5
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fsub float %9, %12
%14 = load float*, float** %6
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %4
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %5
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fsub float %18, %21
%23 = load float*, float** %6
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %4
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = load float*, float** %5
%29 = getelementptr inbounds float, float* %28, i64 2
%30 = load float, float* %29
%31 = fsub float %27, %30
%32 = load float*, float** %6
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
%34 = load float*, float** %6
ret float* %34
}

LLVM IR (-O2):
define float* @Vector3Subtract(float* nocapture %0, float* nocapture %1, float* returned writeonly %2) {
%4 = load float, float* %0
%5 = load float, float* %1
%6 = fsub float %4, %5
store float %6, float* %2
%7 = getelementptr inbounds float, float* %0, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %1, i64 1
%10 = load float, float* %9
%11 = fsub float %8, %10
%12 = getelementptr inbounds float, float* %2, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %0, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %1, i64 2
%16 = load float, float* %15
%17 = fsub float %14, %16
%18 = getelementptr inbounds float, float* %2, i64 2
store float %17, float* %18
ret float* %2
}
/* Variables and functions */
int /*<<< orphan*/ api_end();
int /*<<< orphan*/ api_putchar(char);
void HariMain(void) {
  for (;;)
    api_putchar('a');
  api_end();
}


x86 assembly (clang, -O0):
<HariMain>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <HariMain+0x9>
mov    $0x61,%edi
call   1030 <api_putchar@plt>
jmp    1119 <HariMain+0x9>

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

LLVM IR (-O0):
define void @HariMain() {
br label %1
1: ; preds = %1, %0
%2 = call i32 @api_putchar(i8 signext 97)
br label %1
}

LLVM IR (-O2):
define void @HariMain() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @api_putchar(i8 signext 97)
br label %1
}
/* Variables and functions */
int EXIT_SUCCESS;
double *malloc(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  double *dptr = 0;
  while (1)
    dptr = malloc(100 * sizeof(double));
  printf("Speicherfehler\n");
  int b;
  scanf("%d", &b);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x320,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
jmp    1127 <main+0x17>

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

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca double*
%3 = alloca i32
store i32 0, i32* %1
store double* null, double** %2
br label %4
4: ; preds = %0, %4
%5 = call double* @malloc(i32 800)
store double* %5, double** %2
br label %4
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call double* @malloc(i32 800)
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ *conn(char *);
int /*<<< orphan*/ init();
int main() {
  init();
  BIO *bio = conn("localhost:10443");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"localhost:10443\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32 (...) @init()
%4 = call i32* @conn(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32* %4, i32** %2
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"localhost:10443\00"
define i32 @main() {
%1 = tail call i32 (...) @init()
%2 = tail call i32* @conn(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void gtk_tree_model_filter_clear_cache() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_filter_clear_cache() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLUE_SET_WTP_FROM_R8;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned int const *, int);
int GLUE_RESET_WTP(unsigned char *out, void *ptr) {
  const static unsigned int GLUE_SET_WTP_FROM_R8 = 0xe1a05008;
  if (out)
    memcpy(out, &GLUE_SET_WTP_FROM_R8, sizeof(GLUE_SET_WTP_FROM_R8));
  return sizeof(GLUE_SET_WTP_FROM_R8);
}


x86 assembly (clang, -O0):
<GLUE_RESET_WTP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <GLUE_RESET_WTP+0x30>
mov    -0x8(%rbp),%rdi
lea    0xeca(%rip),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    $0x4,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLUE_RESET_WTP>:
test   %rdi,%rdi
je     112b <GLUE_RESET_WTP+0x1b>
push   %rax
lea    0xee3(%rip),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x8,%rsp
mov    $0x4,%eax
ret

LLVM IR (-O0):
@GLUE_RESET_WTP.GLUE_SET_WTP_FROM_R8 = internal constant i32 -509587448
define i32 @GLUE_RESET_WTP(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @memcpy(i8* %8, i32* @GLUE_RESET_WTP.GLUE_SET_WTP_FROM_R8, i32 4)
br label %10
10: ; preds = %7, %2
ret i32 4
}

LLVM IR (-O2):
@GLUE_RESET_WTP.GLUE_SET_WTP_FROM_R8 = internal constant i32 -509587448
define i32 @GLUE_RESET_WTP(i8* %0, i8* nocapture readnone %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @memcpy(i8* %0, i32* @GLUE_RESET_WTP.GLUE_SET_WTP_FROM_R8, i32 4)
br label %6
6: ; preds = %4, %2
ret i32 4
}
void kmain() {}


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

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

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

LLVM IR (-O2):
define void @kmain() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
char *pmallocc(int);
int strlen(char *);
char *pstrdup(char *str) {
  int size = strlen(str) + 1;
  char *ret = pmallocc(size);
  if (!ret)
    return ret;
  memcpy(ret, str, size);
  return ret;
}


x86 assembly (clang, -O0):
<pstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <pmallocc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    116f <pstrdup+0x3f>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1187 <pstrdup+0x57>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pstrdup>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %eax,%ebp
add    $0x1,%ebp
mov    %ebp,%edi
call   1050 <pmallocc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     115d <pstrdup+0x2d>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @pstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = add nsw i32 %7, 1
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = call i8* @pmallocc(i32 %9)
store i8* %10, i8** %5
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
br i1 %12, label %15, label %13
13: ; preds = %1
%14 = load i8*, i8** %5
store i8* %14, i8** %2
br label %21
15: ; preds = %1
%16 = load i8*, i8** %5
%17 = load i8*, i8** %3
%18 = load i32, i32* %4
%19 = call i32 @memcpy(i8* %16, i8* %17, i32 %18)
%20 = load i8*, i8** %5
store i8* %20, i8** %2
br label %21
21: ; preds = %15, %13
%22 = load i8*, i8** %2
ret i8* %22
}

LLVM IR (-O2):
define i8* @pstrdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @pmallocc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @memcpy(i8* %4, i8* %0, i32 %3)
br label %8
8: ; preds = %1, %6
ret i8* %4
}