xunge/DecIR huggingface dataset:
/* Variables and functions */
int PAPI_set_granularity(int);
void papif_set_granularity_(int *granularity, int *check) {
  *check = PAPI_set_granularity(*granularity);
}


x86 assembly (clang, -O0):
<papif_set_granularity_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <PAPI_set_granularity@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_set_granularity_>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_set_granularity@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @papif_set_granularity_(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @PAPI_set_granularity(i32 %3)
store i32 %4, i32* %1
ret void
}
void destroy(int *x) { x = 0; }


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

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

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

LLVM IR (-O2):
define void @destroy(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strncasecmp(char *, char *, int);
void strncasecmp_diff_length_3() {
  char *x = "aBc";
  char *y = "abcde";
  clang_analyzer_eval(strncasecmp(x, y, 5) == -1);
}


x86 assembly (clang, -O0):
<strncasecmp_diff_length_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncasecmp@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncasecmp_diff_length_3>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncasecmp@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"aBc\00"
@.str.1 = [6 x i8] c"abcde\00"
define void @strncasecmp_diff_length_3() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strncasecmp(i8* %3, i8* %4, i32 5)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"aBc\00"
@.str.1 = [6 x i8] c"abcde\00"
define void @strncasecmp_diff_length_3() {
%1 = tail call i32 @strncasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = icmp eq i32 %1, -1
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
scalar_t__ strcmp(char *, void *);
extern int CompareSomePointer(void *ptr) {
  int x = strcmp("Got passed back the pointer I returned", ptr) == 0;
  free(ptr);
  return x;
}


x86 assembly (clang, -O0):
<CompareSomePointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CompareSomePointer>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed3(%rip),%rdi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Got passed back the pointer I returned\00"
define i32 @CompareSomePointer(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strcmp(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
store i32 %7, i32* %3
%8 = load i8*, i8** %2
%9 = call i32 @free(i8* %8)
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@.str = [39 x i8] c"Got passed back the pointer I returned\00"
define i32 @CompareSomePointer(i8* %0) {
%2 = tail call i64 @strcmp(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @free(i8* %0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf_vga_tk(char *);
int /*<<< orphan*/ test_vfs_initrd();
void test_vfs(void) {
  printf_vga_tk("Test vfs:\n");
  test_vfs_initrd();
  printf_vga_tk("Test vfs ................ OK.\n");
}


x86 assembly (clang, -O0):
<test_vfs>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf_vga_tk@plt>
mov    $0x0,%al
call   1040 <test_vfs_initrd@plt>
lea    0xecd(%rip),%rdi
call   1030 <printf_vga_tk@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vfs>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf_vga_tk@plt>
xor    %eax,%eax
call   1040 <test_vfs_initrd@plt>
lea    0xed0(%rip),%rdi
pop    %rax
jmp    1030 <printf_vga_tk@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Test vfs:\0A\00"
@.str.1 = [31 x i8] c"Test vfs ................ OK.\0A\00"
define void @test_vfs() {
%1 = call i32 @printf_vga_tk(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @test_vfs_initrd()
%3 = call i32 @printf_vga_tk(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Test vfs:\0A\00"
@.str.1 = [31 x i8] c"Test vfs ................ OK.\0A\00"
define void @test_vfs() {
%1 = tail call i32 @printf_vga_tk(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test_vfs_initrd()
%3 = tail call i32 @printf_vga_tk(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int);
int main() {
  foo(0, 0);
  foo(1, 1);
  foo(2, 2);
  foo(3, 3);
  foo(3, 2);
  foo(3, 1);
  foo(3, 0);
  foo(3, 4);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0, i32 0)
%2 = tail call i32 @foo(i32 1, i32 1)
%3 = tail call i32 @foo(i32 2, i32 2)
%4 = tail call i32 @foo(i32 3, i32 3)
%5 = tail call i32 @foo(i32 3, i32 2)
%6 = tail call i32 @foo(i32 3, i32 1)
%7 = tail call i32 @foo(i32 3, i32 0)
%8 = tail call i32 @foo(i32 3, i32 4)
ret i32 0
}
void wake_up_nohz_cpu(int cpu) {}


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

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

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

LLVM IR (-O2):
define void @wake_up_nohz_cpu(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void pch_iter_end(void *iter) {
  if (iter)
    free(iter);
}


x86 assembly (clang, -O0):
<pch_iter_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <pch_iter_end+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pch_iter_end>:
test   %rdi,%rdi
je     111a <pch_iter_end+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @pch_iter_end(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @pch_iter_end(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execl(char *, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ setuid(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ wait(int /*<<< orphan*/);
int main(int n, char *argv[]) {
  setuid(0);
  if (1) {
    system("./lxcweb");
  } else {
    if (fork() == 0) {
      execl("./lxcweb", 0);
      exit(0);
    } else {
      wait(0);
    }
  }
  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)
xor    %edi,%edi
call   1040 <setuid@plt>
lea    0xebc(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"./lxcweb\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 @setuid(i32 0)
%7 = call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"./lxcweb\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @setuid(i32 0)
%4 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int divide_by_zero(int i) { return i / 0; }


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

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

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

LLVM IR (-O2):
define i32 @divide_by_zero(i32 %0) {
ret i32 poison
}
double func(void) { return 3.14; }


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @func() {
ret double 3.140000e+00
}

LLVM IR (-O2):
define double @func() {
ret double 3.140000e+00
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void _f_i_f(int a, float b) { printf("a:int,   b:float\n"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"a:int, b:float\0A\00"
define void @_f_i_f(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca float
store i32 %0, i32* %3
store float %1, float* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"a:int, b:float\00"
define void @_f_i_f(i32 %0, float %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char, unsigned char);
int main() {
  typedef char STYLE2;
  char x;
  STYLE2 y;
  x = 255;
  y = 255;
  printf("%d %d\n", x, y);
  unsigned char a, b;
  a = 255;
  b = 255;
  printf("%d %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0xff,-0x5(%rbp)
movb   $0xff,-0x6(%rbp)
mov    -0x5(%rbp),%al
lea    0xecf(%rip),%rdi
movzbl %al,%esi
movzbl -0x6(%rbp),%edx
call   1030 <printf@plt>
movb   $0xff,-0x7(%rbp)
movb   $0xff,-0x8(%rbp)
mov    -0x7(%rbp),%al
lea    0xeb1(%rip),%rdi
movzbl %al,%esi
movzbl -0x8(%rbp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 zeroext -1, i8 zeroext -1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 zeroext -1, i8 zeroext -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_pmalloc();
int main(void) {
  test_pmalloc();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_pmalloc()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ printf(char *);
void entry_name_free(void *e) {
  if (e)
    free(e);
  else
    printf("!?\n");
}


x86 assembly (clang, -O0):
<entry_name_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1145 <entry_name_free+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
jmp    1151 <entry_name_free+0x31>
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<entry_name_free>:
test   %rdi,%rdi
je     112a <entry_name_free+0xa>
jmp    1030 <free@plt>
lea    0xecf(%rip),%rdi
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"!?\0A\00"
define void @entry_name_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %10
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@str = [3 x i8] c"!?\00"
define void @entry_name_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %7
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int circlemod1();
int circlemod2();
int circlemod3a(void) { return circlemod1() + circlemod2(); }


x86 assembly (clang, -O0):
<circlemod3a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <circlemod1@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <circlemod2@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circlemod3a>:
push   %rbx
xor    %eax,%eax
call   1030 <circlemod1@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <circlemod2@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @circlemod3a() {
%1 = call i32 (...) @circlemod1()
%2 = call i32 (...) @circlemod2()
%3 = add nsw i32 %1, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @circlemod3a() {
%1 = tail call i32 (...) @circlemod1()
%2 = tail call i32 (...) @circlemod2()
%3 = add nsw i32 %2, %1
ret i32 %3
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn91() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn91");
  return result;
}


x86 assembly (clang, -O0):
<fn91>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn91>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn91\00"
define i8* @fn91() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn91\00"
define i8* @fn91() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
OP(ed, c1) { illegal_2(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
void __DELETE_java_util_AbstractSequentialList(void *me, void *client_data) {}


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

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

LLVM IR (-O0):
define void @__DELETE_java_util_AbstractSequentialList(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @__DELETE_java_util_AbstractSequentialList(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ io_hlt();
int /*<<< orphan*/ write_mem8(int, int);
void HariMain(void) {
  int i;
  for (i = 0xa0000; i <= 0xaffff; i++) {
    write_mem8(i, i & 0x0f);
  }
  for (;;) {
    io_hlt();
  }
}


x86 assembly (clang, -O0):
<HariMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa0000,-0x4(%rbp)
cmpl   $0xaffff,-0x4(%rbp)
jg     1158 <HariMain+0x38>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
and    $0xf,%esi
call   1040 <write_mem8@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <HariMain+0xf>
jmp    115d <HariMain+0x3d>
mov    $0x0,%al
call   1030 <io_hlt@plt>
jmp    115d <HariMain+0x3d>

x86 assembly (clang, -O2):
<HariMain>:
push   %rbx
mov    $0xa0000,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%esi
and    $0xf,%esi
mov    %ebx,%edi
call   1040 <write_mem8@plt>
add    $0x1,%ebx
cmp    $0xb0000,%ebx
jne    1130 <HariMain+0x10>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <io_hlt@plt>
jmp    1150 <HariMain+0x30>

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

LLVM IR (-O2):
define void @HariMain() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 655360, %0 ], [ %5, %1 ]
%3 = and i32 %2, 15
%4 = tail call i32 @write_mem8(i32 %2, i32 %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 720896
br i1 %6, label %7, label %1
7: ; preds = %1, %7
%8 = tail call i32 (...) @io_hlt()
br label %7
}
/* Variables and functions */
char *malloc(size_t);
char *memcpy(char *, char const *, size_t);
int strlen(char const *);
char *strdup(const char *s) {
  char *p;
  size_t l = strlen(s) + 1;
  p = malloc(l);
  if (!p)
    return NULL;
  return memcpy(p, s, l);
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1173 <strdup+0x43>
movq   $0x0,-0x8(%rbp)
jmp    1188 <strdup+0x58>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <memcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1161 <strdup+0x31>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias i8* @strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 %0, i64 %4, i1 false)
br label %8
8: ; preds = %1, %7
ret i8* %5
}
float formatScale(float scale) {
  if (scale >= 0)
    return 0;
  if (scale <= -1)
    return 1;
  return -scale;
}


x86 assembly (clang, -O0):
<formatScale>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1127 <formatScale+0x27>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1162 <formatScale+0x62>
movss  0xed1(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     114b <formatScale+0x4b>
movss  0xec3(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1162 <formatScale+0x62>
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<formatScale>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jae    111f <formatScale+0x1f>
movss  0xef4(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1123 <formatScale+0x23>
xorps  0xef4(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm1,%xmm0
ret
movss  0xed5(%rip),%xmm0
ret

LLVM IR (-O0):
define float @formatScale(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp oge float %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store float 0.000000e+00, float* %2
br label %14
7: ; preds = %1
%8 = load float, float* %3
%9 = fcmp ole float %8, -1.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
store float 1.000000e+00, float* %2
br label %14
11: ; preds = %7
%12 = load float, float* %3
%13 = fneg float %12
store float %13, float* %2
br label %14
14: ; preds = %11, %10, %6
%15 = load float, float* %2
ret float %15
}

LLVM IR (-O2):
define float @formatScale(float %0) {
%2 = fcmp ult float %0, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fcmp ugt float %0, -1.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = fneg float %0
br label %7
7: ; preds = %3, %1, %5
%8 = phi float [ %6, %5 ], [ 0.000000e+00, %1 ], [ 1.000000e+00, %3 ]
ret float %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void md_table_td_beg(FILE *fw, int term) {
  switch (term) {
  case 0:
    fprintf(fw, " ");
    break;
  case 1:
    fprintf(fw, "<td>");
    break;
  case 2:
    fprintf(fw, " ");
    break;
  }
}


x86 assembly (clang, -O0):
<md_table_td_beg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     1154 <md_table_td_beg+0x44>
jmp    1132 <md_table_td_beg+0x22>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     1169 <md_table_td_beg+0x59>
jmp    1143 <md_table_td_beg+0x33>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     117e <md_table_td_beg+0x6e>
jmp    118e <md_table_td_beg+0x7e>
mov    -0x8(%rbp),%rdi
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
jmp    118e <md_table_td_beg+0x7e>
mov    -0x8(%rbp),%rdi
lea    0xe8e(%rip),%rsi
call   1030 <fprintf@plt>
jmp    118e <md_table_td_beg+0x7e>
mov    -0x8(%rbp),%rdi
lea    0xe77(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md_table_td_beg>:
mov    %rdi,%rcx
cmp    $0x2,%esi
je     1131 <md_table_td_beg+0x11>
cmp    $0x1,%esi
je     113e <md_table_td_beg+0x1e>
test   %esi,%esi
jne    1154 <md_table_td_beg+0x34>
mov    $0x20,%edi
mov    %rcx,%rsi
jmp    1030 <fputc@plt>
lea    0xebb(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
jmp    1040 <fwrite@plt>
ret

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

LLVM IR (-O2):
@.str.1 = [5 x i8] c"<td>\00"
define void @md_table_td_beg(i32* nocapture %0, i32 %1) {
switch i32 %1, label %9 [
i32 0, label %3
i32 1, label %5
i32 2, label %7
]
3: ; preds = %2
%4 = tail call i32 @fputc(i32 32, i32* %0)
br label %9
5: ; preds = %2
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 4, i64 1, i32* %0)
br label %9
7: ; preds = %2
%8 = tail call i32 @fputc(i32 32, i32* %0)
br label %9
9: ; preds = %2, %7, %5, %3
ret void
}
int cache_geninit(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @cache_geninit() {
ret i32 0
}
void _set_ok(unsigned char *u) { u[1] |= (1 << 7); }


x86 assembly (clang, -O0):
<_set_ok>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
or     $0x80,%ecx
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_set_ok>:
orb    $0x80,0x1(%rdi)
ret

LLVM IR (-O0):
define void @_set_ok(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = or i32 %6, 128
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
ret void
}

LLVM IR (-O2):
define void @_set_ok(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = or i8 %3, -128
store i8 %4, i8* %2
ret void
}
void __backtrace_symbols_fd(void *__const *__array, int __size, int __fd) {
  return;
}


x86 assembly (clang, -O0):
<__backtrace_symbols_fd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @__backtrace_symbols_fd(i8** %0, i32 %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @__backtrace_symbols_fd(i8** nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void timeout(int signum) { exit(EXIT_FAILURE); }


x86 assembly (clang, -O0):
<timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<timeout>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @timeout(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @timeout(i32 %0) {
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Type definitions */
struct test_entry {
  int dummy;
};
struct atom {
  int dummy;
};

/* Variables and functions */
int parse_expr_argX(struct test_entry *, struct atom *, int /*<<< orphan*/);
int parse_expr_arg0(struct test_entry *test, struct atom *atom) {
  return parse_expr_argX(test, atom, 0);
}


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

x86 assembly (clang, -O2):
<parse_expr_arg0>:
xor    %edx,%edx
jmp    1030 <parse_expr_argX@plt>

LLVM IR (-O0):
%struct.test_entry = type { i32 }
%struct.atom = type { i32 }
define i32 @parse_expr_arg0(%struct.test_entry* %0, %struct.atom* %1) {
%3 = alloca %struct.test_entry*
%4 = alloca %struct.atom*
store %struct.test_entry* %0, %struct.test_entry** %3
store %struct.atom* %1, %struct.atom** %4
%5 = load %struct.test_entry*, %struct.test_entry** %3
%6 = load %struct.atom*, %struct.atom** %4
%7 = call i32 @parse_expr_argX(%struct.test_entry* %5, %struct.atom* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct.test_entry = type { i32 }
%struct.atom = type { i32 }
define i32 @parse_expr_arg0(%struct.test_entry* %0, %struct.atom* %1) {
%3 = tail call i32 @parse_expr_argX(%struct.test_entry* %0, %struct.atom* %1, i32 0)
ret i32 %3
}
void ARGBAddRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGBAddRow_Any_NEON() {
ret void
}
unsigned long ffz(unsigned long word) {
  asm volatile("rep; bsf %1,%0" : "=r"(word) : "r"(~word));
  return word;
}


x86 assembly (clang, -O0):
<ffz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
tzcnt  %rax,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffz>:
not    %rdi
tzcnt  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @ffz(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = xor i64 %3, -1
%5 = call i64 asm sideeffect "rep; bsf $1,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i64 %4)
store i64 %5, i64* %2
%6 = load i64, i64* %2
ret i64 %6
}

LLVM IR (-O2):
define i64 @ffz(i64 %0) {
%2 = xor i64 %0, -1
%3 = tail call i64 asm sideeffect "rep; bsf $1,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i64 %2)
ret i64 %3
}
void gtk_tool_item_set_use_drag_window() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @rct_turn_off_usbp_pll() {
ret void
}
int test_imm_22uint32_mem(unsigned int *val) {
  return ((*val) & (0x22 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_22uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 34
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_degree_of_multprec_polynomial(int k, int *d) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(449, &k, d, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_degree_of_multprec_polynomial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1c1,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_degree_of_multprec_polynomial>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1c1,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_degree_of_multprec_polynomial(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 449, i32* %3, i32* %7, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_degree_of_multprec_polynomial(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 449, i32* %3, i32* %1, double* undef)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ readPWM(int);
void PWM_ISR_3() { readPWM(3); }


x86 assembly (clang, -O0):
<PWM_ISR_3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <readPWM@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWM_ISR_3>:
mov    $0x3,%edi
jmp    1030 <readPWM@plt>

LLVM IR (-O0):
define void @PWM_ISR_3() {
%1 = call i32 @readPWM(i32 3)
ret void
}

LLVM IR (-O2):
define void @PWM_ISR_3() {
%1 = tail call i32 @readPWM(i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgpop2(void) { gen("pop\tcx"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"pop\09cx\00"
define void @cgpop2() {
%1 = call i32 @gen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"pop\09cx\00"
define void @cgpop2() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
void func1(int x) {
  x++;
  return;
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @func1(i32 %0) {
ret void
}
int __sigaction(sig, act, oact)
int sig;
const struct sigaction *act;
struct sigaction *oact;
{
  return _sigaction(sig, act, oact);
}


x86 assembly (clang, -O0):
<__sigaction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1030 <_sigaction@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sigaction = type opaque
define i32 @__sigaction(i32 %0, %struct.sigaction* %1, %struct.sigaction* %2) {
%4 = alloca i32
%5 = alloca %struct.sigaction*
%6 = alloca %struct.sigaction*
store i32 %0, i32* %4
store %struct.sigaction* %1, %struct.sigaction** %5
store %struct.sigaction* %2, %struct.sigaction** %6
%7 = load i32, i32* %4
%8 = load %struct.sigaction*, %struct.sigaction** %5
%9 = load %struct.sigaction*, %struct.sigaction** %6
%10 = call i32 (i32, %struct.sigaction*, %struct.sigaction*, ...) bitcast (i32 (...)* @_sigaction to i32 (i32, %struct.sigaction*, %struct.sigaction*, ...)*)(i32 %7, %struct.sigaction* %8, %struct.sigaction* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.sigaction = type opaque
define i32 @__sigaction(i32 %0, %struct.sigaction* %1, %struct.sigaction* %2) {
%4 = tail call i32 (i32, %struct.sigaction*, %struct.sigaction*, ...) bitcast (i32 (...)* @_sigaction to i32 (i32, %struct.sigaction*, %struct.sigaction*, ...)*)(i32 %0, %struct.sigaction* %1, %struct.sigaction* %2)
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void CANDisable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000000))) |= 0x00000001;
}


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

x86 assembly (clang, -O2):
<CANDisable>:
orq    $0x1,(%rdi)
ret

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

LLVM IR (-O2):
define void @CANDisable(i64 %0) {
%2 = inttoptr i64 %0 to i64*
%3 = load volatile i64, i64* %2
%4 = or i64 %3, 1
store volatile i64 %4, i64* %2
ret void
}
void ft_striteri(char *s, void (*f)(unsigned int, char *)) {
  int i;
  i = 0;
  if (s && f) {
    while (*s)
      (*f)(i++, s++);
  }
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1169 <ft_striteri+0x69>
cmpq   $0x0,-0x10(%rbp)
je     1169 <ft_striteri+0x69>
jmp    1132 <ft_striteri+0x32>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1164 <ft_striteri+0x64>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
mov    %edi,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    %rsi,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
call   *%rax
jmp    1132 <ft_striteri+0x32>
jmp    1169 <ft_striteri+0x69>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1135 <ft_striteri+0x35>
mov    %rsi,%r14
test   %rsi,%rsi
je     1135 <ft_striteri+0x35>
mov    %rdi,%r15
cmpb   $0x0,(%rdi)
je     1135 <ft_striteri+0x35>
xor    %ebx,%ebx
nopl   0x0(%rax)
lea    (%r15,%rbx,1),%rsi
mov    %ebx,%edi
call   *%r14
cmpb   $0x0,0x1(%r15,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1120 <ft_striteri+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne void (i32, i8*)* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %16
6: ; preds = %2
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %6, %9
%10 = phi i32 [ %12, %9 ], [ 0, %6 ]
%11 = phi i8* [ %13, %9 ], [ %0, %6 ]
%12 = add nuw nsw i32 %10, 1
%13 = getelementptr inbounds i8, i8* %11, i64 1
tail call void %1(i32 %10, i8* %11)
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %9
16: ; preds = %9, %6, %2
ret void
}
int gcd(long int p, long int q) {
  long int x;
  x = p % q;
  while (x != 0) {
    p = q;
    q = x;
    x = p % q;
  }
  return q;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1148 <gcd+0x48>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,-0x18(%rbp)
jmp    111a <gcd+0x1a>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     111b <gcd+0x1b>
cqto
idiv   %rsi
test   %rdx,%rdx
jne    1140 <gcd+0x40>
jmp    1124 <gcd+0x24>
xor    %edx,%edx
div    %esi
test   %rdx,%rdx
jne    1140 <gcd+0x40>
mov    %rsi,%rcx
mov    %ecx,%eax
ret
nopw   0x0(%rax,%rax,1)
mov    %rsi,%rax
cqto
idiv   %rcx
mov    %rcx,%rsi
test   %rdx,%rdx
je     1157 <gcd+0x57>
mov    %rdx,%rcx
mov    %rsi,%rax
or     %rdx,%rax
shr    $0x20,%rax
jne    1130 <gcd+0x30>
mov    %esi,%eax
xor    %edx,%edx
div    %ecx
jmp    1138 <gcd+0x38>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i64 %0, i64 %1) {
%3 = srem i64 %0, %1
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %8, %5 ], [ %3, %2 ]
%7 = phi i64 [ %6, %5 ], [ %1, %2 ]
%8 = srem i64 %7, %6
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
%11 = phi i64 [ %1, %2 ], [ %6, %5 ]
%12 = trunc i64 %11 to i32
ret i32 %12
}