xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ generate_intl(char *, char *, char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int i;
  if (argc < 3) {
    printf("too few arguments\n");
    exit(1);
  }
  generate_intl(argv[1], argv[2], argv[3]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1166 <main+0x36>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdx
call   1040 <generate_intl@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jle    114e <main+0x1e>
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rax
mov    0x18(%rsi),%rdx
mov    %rax,%rsi
call   1040 <generate_intl@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"too few arguments\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 2
%18 = load i8*, i8** %17
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 3
%21 = load i8*, i8** %20
%22 = call i32 @generate_intl(i8* %15, i8* %18, i8* %21)
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"too few arguments\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %1, i64 3
%13 = load i8*, i8** %12
%14 = tail call i32 @generate_intl(i8* %9, i8* %11, i8* %13)
ret i32 0
}
/* Variables and functions */
int rand_interval(int /*<<< orphan*/, int);
int gira_chance() {
  int resultado = rand_interval(0, 2);
  return resultado;
}


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

x86 assembly (clang, -O2):
<gira_chance>:
xor    %edi,%edi
mov    $0x2,%esi
jmp    1030 <rand_interval@plt>

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

LLVM IR (-O2):
define i32 @gira_chance() {
%1 = tail call i32 @rand_interval(i32 0, i32 2)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glClearIndex(double);
void Init(void) {
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glClearIndex(0.0);
}


x86 assembly (clang, -O0):
<Init>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1040 <glClearColor@plt>
xorps  %xmm0,%xmm0
call   1030 <glClearIndex@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1040 <glClearColor@plt>
xorps  %xmm0,%xmm0
pop    %rax
jmp    1030 <glClearIndex@plt>

LLVM IR (-O0):
define void @Init() {
%1 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = call i32 @glClearIndex(double 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @Init() {
%1 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = tail call i32 @glClearIndex(double 0.000000e+00)
ret void
}
/* Variables and functions */
void YabThreadWait(unsigned int id) {}


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

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

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

LLVM IR (-O2):
define void @YabThreadWait(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *name) { printf("usage: %s [-f -V -h] [-c <file>]\n", name); }


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"usage: %s [-f -V -h] [-c <file>]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"usage: %s [-f -V -h] [-c <file>]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOENT;
int _stub(int /*<<< orphan*/);
int __wrap_open(const char *name, int flags, int mode) { return _stub(ENOENT); }


x86 assembly (clang, -O0):
<__wrap_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
call   1030 <_stub@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_open>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <_stub@plt>

LLVM IR (-O0):
@ENOENT = global i32 0
define i32 @__wrap_open(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
%7 = load i32, i32* @ENOENT
%8 = call i32 @_stub(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@ENOENT = global i32 0
define i32 @__wrap_open(i8* nocapture readnone %0, i32 %1, i32 %2) {
%4 = load i32, i32* @ENOENT
%5 = tail call i32 @_stub(i32 %4)
ret i32 %5
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i;
  int j;
  i = __VERIFIER_nondet_int();
  j = __VERIFIER_nondet_int();
  while (i * j > 0) {
    i = i - 1;
    j = j - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    $0x0,%eax
jle    115a <main+0x4a>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %11, %0
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = mul nsw i32 %7, %8
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %6
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %2
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %3
br label %6
16: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
int /*<<< orphan*/ foo(char const);
void test5(const char *c) {
  foo(c[0]);
  if (!c) {
    bar(1);
  }
}


x86 assembly (clang, -O0):
<test5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <foo@plt>
cmpq   $0x0,-0x8(%rbp)
jne    114d <test5+0x2d>
mov    $0x1,%edi
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test5>:
movsbl (%rdi),%edi
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @test5(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = call i32 @foo(i8 signext %5)
%7 = load i8*, i8** %2
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @bar(i32 1)
br label %11
11: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
define void @test5(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @foo(i8 signext %2)
ret void
}
/* Type definitions */
struct ebt_u_replace {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ iterate_entries(struct ebt_u_replace *, int /*<<< orphan*/);
void decrease_chain_jumps(struct ebt_u_replace *replace) {
  iterate_entries(replace, 0);
}


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

x86 assembly (clang, -O2):
<decrease_chain_jumps>:
xor    %esi,%esi
jmp    1030 <iterate_entries@plt>

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

LLVM IR (-O2):
%struct.ebt_u_replace = type { i32 }
define void @decrease_chain_jumps(%struct.ebt_u_replace* %0) {
%2 = tail call i32 @iterate_entries(%struct.ebt_u_replace* %0, i32 0)
ret void
}
/* Variables and functions */
char *getfname(char const *);
char *strrchr(char *, char);
char *getfext(const char *path) {
  char *fname;
  char *fext;
  fname = getfname(path);
  fext = strrchr(fname, '.');
  if (fext == NULL || fext == fname)
    return (NULL);
  return (fext);
}


x86 assembly (clang, -O0):
<getfext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <getfname@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1164 <getfext+0x44>
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1171 <getfext+0x51>
movq   $0x0,-0x8(%rbp)
jmp    1179 <getfext+0x59>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getfext>:
push   %rbx
call   1040 <getfname@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
cmovne %rax,%rcx
test   %rax,%rax
cmovne %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @getfext(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @getfname(i8* %6)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = call i8* @strrchr(i8* %8, i8 signext 46)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp eq i8* %10, null
br i1 %11, label %16, label %12
12: ; preds = %1
%13 = load i8*, i8** %5
%14 = load i8*, i8** %4
%15 = icmp eq i8* %13, %14
br i1 %15, label %16, label %17
16: ; preds = %12, %1
store i8* null, i8** %2
br label %19
17: ; preds = %12
%18 = load i8*, i8** %5
store i8* %18, i8** %2
br label %19
19: ; preds = %17, %16
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @getfext(i8* %0) {
%2 = tail call i8* @getfname(i8* %0)
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %2, i8 signext 46)
%4 = icmp eq i8* %3, null
%5 = icmp eq i8* %3, %2
%6 = or i1 %4, %5
%7 = select i1 %6, i8* null, i8* %3
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ expand(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char s1[] = "-a-c-kke0-9p-z-";
  char s2[100];
  expand(s1, s2);
  printf("%s\n", s2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1040 <expand@plt>
lea    -0x90(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
movaps 0xed1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <expand@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s1 = [16 x i8] c"-a-c-kke0-9p-z-\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i8]
%3 = alloca [100 x i8]
store i32 0, i32* %1
%4 = bitcast [16 x i8]* %2 to i8*
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = call i32 @expand(i8* %5, i8* %6)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [16 x i8] c"-a-c-kke0-9p-z-\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @expand(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
int sgs_decchar(char c) { return c >= '0' && c <= '9'; }


x86 assembly (clang, -O0):
<sgs_decchar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <sgs_decchar+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @sgs_decchar(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_license(void) {
  printf("OpenCLI %s, Copyright (C) 2005 Christian Hentschel\n"
         "OpenCLI comes with ABSOLUTELY NO WARRANTY; see COPYING.\n"
         "This is free software, and you are welcome to redistribute\n"
         "it under certain conditions; see COPYING for details.\n",
         "0.1");
}


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

x86 assembly (clang, -O2):
<print_license>:
lea    0xee9(%rip),%rdi
lea    0xfbf(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [221 x i8] c"OpenCLI %s, Copyright (C) 2005 Christian Hentschel\0AOpenCLI comes with ABSOLUTELY NO WARRANTY; see COPYING.\0AThis is free software, and you are welcome to redistribute\0Ait under certain conditions; see COPYING for details.\0A\00"
@.str.1 = [4 x i8] c"0.1\00"
define void @print_license() {
%1 = call i32 @printf(i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [221 x i8] c"OpenCLI %s, Copyright (C) 2005 Christian Hentschel\0AOpenCLI comes with ABSOLUTELY NO WARRANTY; see COPYING.\0AThis is free software, and you are welcome to redistribute\0Ait under certain conditions; see COPYING for details.\0A\00"
@.str.1 = [4 x i8] c"0.1\00"
define void @print_license() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __cxa_demangle(char *, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) {
  __cxa_demangle("_Z1fv", 0, 0, 0);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"_Z1fv\00"
define i32 @main() {
%1 = tail call i32 @__cxa_demangle(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char);
int isnum(char *s) {
  for (; *s; s++)
    if (!isdigit(*s))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1160 <isnum+0x50>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    114a <isnum+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1167 <isnum+0x57>
jmp    114f <isnum+0x3f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <isnum+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnum>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <isnum+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1149 <isnum+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <isnum+0x20>
jmp    114b <isnum+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @isnum(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isdigit(i8 signext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Variables and functions */
float __ocml_tgamma_f32(float);
float tgammaf(float x) { return __ocml_tgamma_f32(x); }


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

x86 assembly (clang, -O2):
<tgammaf>:
jmp    1030 <__ocml_tgamma_f32@plt>

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

LLVM IR (-O2):
define float @tgammaf(float %0) {
%2 = tail call float @__ocml_tgamma_f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void demo(void) {
  int x = 88, y = 99;
  printf("\nWithin demo(), x = %d and y = %d.", x, y);
}


x86 assembly (clang, -O0):
<demo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x58,-0x4(%rbp)
movl   $0x63,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<demo>:
lea    0xee9(%rip),%rdi
mov    $0x58,%esi
mov    $0x63,%edx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [35 x i8] c"\0AWithin demo(), x = %d and y = %d.\00"
define void @demo() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 88, i32 99)
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char *, struct stat *);
int isdirectory(char *pathname) {
  struct stat st;
  if (stat(pathname, &st) != 0 || !S_ISDIR(st.st_mode))
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<isdirectory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jne    1154 <isdirectory+0x34>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%eax
jne    1160 <isdirectory+0x40>
movl   $0x0,-0x4(%rbp)
jmp    1167 <isdirectory+0x47>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdirectory>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <isdirectory+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @isdirectory(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @S_ISDIR(i32 %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %8, %1
store i32 0, i32* %2
br label %15
14: ; preds = %8
store i32 1, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @isdirectory(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISDIR(i32 %8)
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
double IMC(double weight, double height) {
  return (weight) / (height * height);
}


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

x86 assembly (clang, -O2):
<IMC>:
mulsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @IMC(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = load double, double* %4
%8 = fmul double %6, %7
%9 = fdiv double %5, %8
ret double %9
}

LLVM IR (-O2):
define double @IMC(double %0, double %1) {
%3 = fmul double %1, %1
%4 = fdiv double %0, %3
ret double %4
}
void ff_hevc_put_hevc_bi_qpel_hv8_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv8_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sum(int, int);
int main() {
  printf("%d\n", sum(39, 3));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x27,%edi
mov    $0x3,%esi
call   1040 <sum@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @sum(i32 39, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
signed int signedint_ignoring_signedlongint(signed int x, signed long int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i32 @signedint_ignoring_signedlongint(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
ret i32 %5
}

LLVM IR (-O2):
define i32 @signedint_ignoring_signedlongint(i32 returned %0, i64 %1) {
ret i32 %0
}
/* Variables and functions */
int j(int);
int k(int x) { return j(x + 1); }


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

x86 assembly (clang, -O2):
<k>:
add    $0x1,%edi
jmp    1030 <j@plt>

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

LLVM IR (-O2):
define i32 @k(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i32 @j(i32 %2)
ret i32 %3
}
/* Variables and functions */
double sub(double);
double clip(double x, double y, double z) { return sub(x) * sub(y) * sub(z); }


x86 assembly (clang, -O0):
<clip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sub@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sub@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sub@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clip>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,(%rsp)
call   1030 <sub@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1030 <sub@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sub@plt>
mulsd  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @clip(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = call double @sub(double %7)
%9 = load double, double* %5
%10 = call double @sub(double %9)
%11 = fmul double %8, %10
%12 = load double, double* %6
%13 = call double @sub(double %12)
%14 = fmul double %11, %13
ret double %14
}

LLVM IR (-O2):
define double @clip(double %0, double %1, double %2) {
%4 = tail call double @sub(double %0)
%5 = tail call double @sub(double %1)
%6 = fmul double %4, %5
%7 = tail call double @sub(double %2)
%8 = fmul double %6, %7
ret double %8
}
/* Type definitions */
struct ns_connection {
  int dummy;
};

/* Variables and functions */
scalar_t__ ns_out(struct ns_connection *, void const *, int);
int ns_send(struct ns_connection *conn, const void *buf, int len) {
  return (int)ns_out(conn, buf, len);
}


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

x86 assembly (clang, -O2):
<ns_send>:
jmp    1030 <ns_out@plt>

LLVM IR (-O0):
%struct.ns_connection = type { i32 }
define i32 @ns_send(%struct.ns_connection* %0, i8* %1, i32 %2) {
%4 = alloca %struct.ns_connection*
%5 = alloca i8*
%6 = alloca i32
store %struct.ns_connection* %0, %struct.ns_connection** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.ns_connection*, %struct.ns_connection** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i64 @ns_out(%struct.ns_connection* %7, i8* %8, i32 %9)
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
%struct.ns_connection = type { i32 }
define i32 @ns_send(%struct.ns_connection* %0, i8* %1, i32 %2) {
%4 = tail call i64 @ns_out(%struct.ns_connection* %0, i8* %1, i32 %2)
%5 = trunc i64 %4 to i32
ret i32 %5
}
__attribute__((always_)) int unregister_one_node(int nid) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @unregister_one_node(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ TriMessage(char *);
scalar_t__ malloc(unsigned int);
int /*<<< orphan*/ triexit(int);
void *trimalloc(int size) {
  void *memptr;
  memptr = (void *)malloc((unsigned int)size);
  if (memptr == (void *)NULL) {
    TriMessage("Error:  Out of memory.\n");
    triexit(1);
  }
  return (memptr);
}


x86 assembly (clang, -O0):
<trimalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1168 <trimalloc+0x38>
lea    0xea7(%rip),%rdi
call   1040 <TriMessage@plt>
mov    $0x1,%edi
call   1030 <triexit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trimalloc>:
push   %rbx
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1154 <trimalloc+0x24>
lea    0xebb(%rip),%rdi
call   1040 <TriMessage@plt>
mov    $0x1,%edi
call   1030 <triexit@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Error: Out of memory.\0A\00"
define i8* @trimalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = call i32 @TriMessage(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @triexit(i32 1)
br label %12
12: ; preds = %9, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [24 x i8] c"Error: Out of memory.\0A\00"
define i8* @trimalloc(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @TriMessage(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @triexit(i32 1)
br label %7
7: ; preds = %4, %1
%8 = inttoptr i64 %2 to i8*
ret i8* %8
}
int bar() {
  int x, y;
  y = (x = 1) > 1 ? (++x) : (x--);
  return (0 + ((3 > 4 ? 1 : 2) > 1 ? (x = 1) : 0));
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    111a <bar+0x1a>
jmp    112b <bar+0x2b>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    %eax,-0xc(%rbp)
jmp    1139 <bar+0x39>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x1,-0x4(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bar() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
br i1 false, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
br label %9
6: ; preds = %0
%7 = load i32, i32* %1
%8 = add nsw i32 %7, -1
store i32 %8, i32* %1
br label %9
9: ; preds = %6, %3
%10 = phi i32 [ %5, %3 ], [ %7, %6 ]
store i32 %10, i32* %2
store i32 1, i32* %1
ret i32 1
}

LLVM IR (-O2):
define i32 @bar() {
ret i32 1
}
/* Variables and functions */
bool nrf51_errata_65(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf51_errata_65() {
ret i32 0
}
/* Variables and functions */
scalar_t__ rand();
void *nextInt(void *env) { return (void *)rand(); }


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

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

LLVM IR (-O0):
define i8* @nextInt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 (...) @rand()
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}

LLVM IR (-O2):
define i8* @nextInt(i8* nocapture readnone %0) {
%2 = tail call i64 (...) @rand()
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
void g_vsprintf() {}


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

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

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

LLVM IR (-O2):
define void @g_vsprintf() {
ret void
}
int test_imm_51int32_reg(int val) { return ((val) & (0x51 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_51int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x51,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_51int32_reg>:
test   $0x51,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_51int32_reg(i32 %0) {
%2 = and i32 %0, 81
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ GenerateFastRandom();
int PRANDInt6(void) {
  int x = (int)GenerateFastRandom() & 0x07;
  return ((x < 6) ? x : x - 6);
}


x86 assembly (clang, -O0):
<PRANDInt6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <GenerateFastRandom@plt>
and    $0x7,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x6,-0x4(%rbp)
jge    113a <PRANDInt6+0x2a>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1143 <PRANDInt6+0x33>
mov    -0x4(%rbp),%eax
sub    $0x6,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRANDInt6>:
push   %rax
xor    %eax,%eax
call   1030 <GenerateFastRandom@plt>
and    $0x7,%eax
mov    %eax,%ecx
sub    $0x6,%ecx
cmovae %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @PRANDInt6() {
%1 = alloca i32
%2 = call i64 (...) @GenerateFastRandom()
%3 = trunc i64 %2 to i32
%4 = and i32 %3, 7
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = load i32, i32* %1
br label %12
9: ; preds = %0
%10 = load i32, i32* %1
%11 = sub nsw i32 %10, 6
br label %12
12: ; preds = %9, %7
%13 = phi i32 [ %8, %7 ], [ %11, %9 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @PRANDInt6() {
%1 = tail call i64 (...) @GenerateFastRandom()
%2 = trunc i64 %1 to i32
%3 = and i32 %2, 7
%4 = icmp ult i32 %3, 6
%5 = add nsw i32 %3, -6
%6 = select i1 %4, i32 %3, i32 %5
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int memcmp(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int __attribute__((unused)) cmp_le16(uint16_t *ledata, uint16_t *cpudata) {
  uint16_t tmp = (*ledata);
  return memcmp(&tmp, cpudata, sizeof(*cpudata));
}


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

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

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

LLVM IR (-O2):
define i32 @cmp_le16(i32* nocapture %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* %0
store i32 %5, i32* %3
%6 = call i32 @memcmp(i32* %3, i32* %1, i32 4)
ret i32 %6
}
void ScaleFilterCols_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ScaleFilterCols_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *);
int main() {
  char a[100];
  sprintf(a, "555555");
  sprintf(a, "1");
  printf("%s", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rdi
lea    0xecd(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xec4(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
movl   $0x35353535,(%rsp)
movl   $0x353535,0x3(%rsp)
movw   $0x31,(%rsp)
lea    0xed7(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"555555\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = bitcast [100 x i8]* %1 to i16*
store i16 49, i16* %3
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}
void circpr_(prec) int *prec;
{ circleprecision(*prec); }


x86 assembly (clang, -O0):
<circpr_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x0,%al
call   1030 <circleprecision@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circpr_>:
mov    (%rdi),%edi
xor    %eax,%eax
jmp    1030 <circleprecision@plt>

LLVM IR (-O0):
define void @circpr_(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 (i32, ...) bitcast (i32 (...)* @circleprecision to i32 (i32, ...)*)(i32 %4)
ret void
}

LLVM IR (-O2):
define void @circpr_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @circleprecision to i32 (i32, ...)*)(i32 %2)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ type;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
int get_XCrossingEvent_type(void *_p) {
  return (int)((XCrossingEvent *)_p)->type;
}


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

x86 assembly (clang, -O2):
<get_XCrossingEvent_type>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XCrossingEvent_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XCrossingEvent_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void glGenerateMipmap(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGenerateMipmap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug_printf(char *, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void signal_handler(int sign) {
  debug_printf("signal_handler(): Received signal %d. Shutting down...\n",
               sign);
  exit(0);
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <debug_printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<signal_handler>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <debug_printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"signal_handler(): Received signal %d. Shutting down...\0A\00"
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @debug_printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [56 x i8] c"signal_handler(): Received signal %d. Shutting down...\0A\00"
define void @signal_handler(i32 %0) {
%2 = tail call i32 @debug_printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
int xmlUCSIsUgaritic(int code) {
  return (((code >= 0x10380) && (code <= 0x1039F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsUgaritic>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x10380,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsUgaritic+0x26>
cmpl   $0x1039f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsUgaritic>:
and    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x10380,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @xmlUCSIsUgaritic(i32 %0) {
%2 = and i32 %0, -32
%3 = icmp eq i32 %2, 66432
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct Node {
  int dummy;
};

/* Variables and functions */
int isUserPointerValid(struct Node **cursor) {
  return (cursor != NULL && *cursor != NULL);
}


x86 assembly (clang, -O0):
<isUserPointerValid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1126 <isUserPointerValid+0x26>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isUserPointerValid>:
xor    %eax,%eax
test   %rdi,%rdi
je     110e <isUserPointerValid+0xe>
cmpq   $0x0,(%rdi)
setne  %al
ret

LLVM IR (-O0):
%struct.Node = type { i32 }
define i32 @isUserPointerValid(%struct.Node** %0) {
%2 = alloca %struct.Node**
store %struct.Node** %0, %struct.Node*** %2
%3 = load %struct.Node**, %struct.Node*** %2
%4 = icmp ne %struct.Node** %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load %struct.Node**, %struct.Node*** %2
%7 = load %struct.Node*, %struct.Node** %6
%8 = icmp ne %struct.Node* %7, null
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ false, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
%struct.Node = type { i32 }
define i32 @isUserPointerValid(%struct.Node** %0) {
%2 = icmp eq %struct.Node** %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load %struct.Node*, %struct.Node** %0
%5 = icmp ne %struct.Node* %4, null
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}