xunge/DecIR huggingface dataset:
double rand_() {
  double drand48();
  return drand48();
}


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

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

LLVM IR (-O0):
define double @rand_() {
%1 = call double (...) @drand48()
ret double %1
}

LLVM IR (-O2):
define double @rand_() {
%1 = tail call double (...) @drand48()
ret double %1
}
/* Variables and functions */
int /*<<< orphan*/ fracture();
int /*<<< orphan*/ isDivisor();
int /*<<< orphan*/ isNaturalNumber();
int /*<<< orphan*/ isWholeNumber();
int main(int argc, char *argv[]) {
  isWholeNumber();
  isNaturalNumber();
  isDivisor();
  fracture();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <isWholeNumber@plt>
xor    %eax,%eax
call   1060 <isNaturalNumber@plt>
xor    %eax,%eax
call   1050 <isDivisor@plt>
xor    %eax,%eax
call   1030 <fracture@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @isWholeNumber()
%7 = call i32 (...) @isNaturalNumber()
%8 = call i32 (...) @isDivisor()
%9 = call i32 (...) @fracture()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @isWholeNumber()
%4 = tail call i32 (...) @isNaturalNumber()
%5 = tail call i32 (...) @isDivisor()
%6 = tail call i32 (...) @fracture()
ret i32 0
}
main() { return _Generic('a', default : 2, char : 5); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ string_append_n(void *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void string_append(void *self, const char *chars) {
  string_append_n(self, chars, strlen(chars));
}


x86 assembly (clang, -O0):
<string_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <string_append_n@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_append>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <string_append_n@plt>

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

LLVM IR (-O2):
define void @string_append(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @string_append_n(i8* %0, i8* %1, i32 %3)
ret void
}
char *strchr(const char *s, char ch) {
  for (; *s != '\0'; s++) {
    if (*s == ch)
      return (char *)s;
  }
  return ((void *)0);
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1154 <strchr+0x54>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    113e <strchr+0x3e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115c <strchr+0x5c>
jmp    1143 <strchr+0x43>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110e <strchr+0xe>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1121 <strchr+0x21>
mov    %rdi,%rax
nopl   0x0(%rax)
cmp    %sil,%cl
je     1123 <strchr+0x23>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %9
%6 = phi i8 [ %11, %9 ], [ %3, %2 ]
%7 = phi i8* [ %10, %9 ], [ %0, %2 ]
%8 = icmp eq i8 %6, %1
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %9, %2
%14 = phi i8* [ null, %2 ], [ null, %9 ], [ %7, %5 ]
ret i8* %14
}
/* Variables and functions */
double WVal(int, int);
double get_state(int i, int j) { return WVal(i, j); }


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

x86 assembly (clang, -O2):
<get_state>:
jmp    1030 <WVal@plt>

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

LLVM IR (-O2):
define double @get_state(i32 %0, i32 %1) {
%3 = tail call double @WVal(i32 %0, i32 %1)
ret double %3
}
/* Variables and functions */
int setOffSet(int, int);
int getExistingBips(int mask, int offset, int bvecs_deletedBips) {
  mask = setOffSet(mask, offset);
  mask = mask & ~bvecs_deletedBips;
  return mask;
}


x86 assembly (clang, -O0):
<getExistingBips>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <setOffSet@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getExistingBips>:
push   %rbx
mov    %edx,%ebx
call   1030 <setOffSet@plt>
not    %ebx
and    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getExistingBips(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 @setOffSet(i32 %7, i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = load i32, i32* %6
%12 = xor i32 %11, -1
%13 = and i32 %10, %12
store i32 %13, i32* %4
%14 = load i32, i32* %4
ret i32 %14
}

LLVM IR (-O2):
define i32 @getExistingBips(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @setOffSet(i32 %0, i32 %1)
%5 = xor i32 %2, -1
%6 = and i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void help_exit() {
  printf("Usage:\n"
         "CChat --nick yourname [--conn (ip:port|name)] [--help]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<help_exit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help_exit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [63 x i8] c"Usage:\0ACChat --nick yourname [--conn (ip:port|name)] [--help]\0A\00"
define void @help_exit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [62 x i8] c"Usage:\0ACChat --nick yourname [--conn (ip:port|name)] [--help]\00"
define void @help_exit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ output_line(char *);
void gen_logical_negation(void) { output_line("lneg r1"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"lneg r1\00"
define void @gen_logical_negation() {
%1 = call i32 @output_line(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"lneg r1\00"
define void @gen_logical_negation() {
%1 = tail call i32 @output_line(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int /*<<< orphan*/, char *, void *);
char *getsym(void *addr) {
  char *retstr = NULL;
  snprintf(retstr, 0, "%p", addr);
  return retstr;
}


x86 assembly (clang, -O0):
<getsym>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
xor    %esi,%esi
lea    0xecb(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getsym>:
push   %rax
mov    %rdi,%rcx
lea    0xee5(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <snprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%p\00"
define i8* @getsym(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %3
%5 = load i8*, i8** %2
%6 = call i32 @snprintf(i8* %4, i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %3
ret i8* %7
}

LLVM IR (-O2):
@.str = [3 x i8] c"%p\00"
define noalias i8* @getsym(i8* %0) {
%2 = tail call i32 @snprintf(i8* null, i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ D();
int /*<<< orphan*/ N();
int NP() {
  D();
  N();
}


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

x86 assembly (clang, -O2):
<NP>:
push   %rax
xor    %eax,%eax
call   1030 <D@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <N@plt>

LLVM IR (-O0):
define i32 @NP() {
%1 = alloca i32
%2 = call i32 (...) @D()
%3 = call i32 (...) @N()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @NP() {
%1 = tail call i32 (...) @D()
%2 = tail call i32 (...) @N()
ret i32 undef
}
/* Type definitions */
struct array {
  int dummy;
};

/* Variables and functions */
int array_fulldestroy(struct array *);
int queue_fulldestroy(struct array *q) { return array_fulldestroy(q); }


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

x86 assembly (clang, -O2):
<queue_fulldestroy>:
jmp    1030 <array_fulldestroy@plt>

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

LLVM IR (-O2):
%struct.array = type { i32 }
define i32 @queue_fulldestroy(%struct.array* %0) {
%2 = tail call i32 @array_fulldestroy(%struct.array* %0)
ret i32 %2
}
/* Variables and functions */
int japi_choice(int);
int j_choice(int arg0) { return (japi_choice(arg0)); }


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

x86 assembly (clang, -O2):
<j_choice>:
jmp    1030 <japi_choice@plt>

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

LLVM IR (-O2):
define i32 @j_choice(i32 %0) {
%2 = tail call i32 @japi_choice(i32 %0)
ret i32 %2
}
int test_imm_13uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x13 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_13uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x13,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_13uint64_midword_reg>:
test   $0x130000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_13uint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 19
%6 = icmp ne i64 %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_13uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 1245184
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void do_nothing_e(struct expr *e, struct traversal_algorithm *algo) {
  (void)(e);
  (void)(algo);
}


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

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

LLVM IR (-O0):
%struct.expr = type opaque
%struct.traversal_algorithm = type opaque
define void @do_nothing_e(%struct.expr* %0, %struct.traversal_algorithm* %1) {
%3 = alloca %struct.expr*
%4 = alloca %struct.traversal_algorithm*
store %struct.expr* %0, %struct.expr** %3
store %struct.traversal_algorithm* %1, %struct.traversal_algorithm** %4
%5 = load %struct.expr*, %struct.expr** %3
%6 = load %struct.traversal_algorithm*, %struct.traversal_algorithm** %4
ret void
}

LLVM IR (-O2):
%struct.expr = type opaque
%struct.traversal_algorithm = type opaque
define void @do_nothing_e(%struct.expr* nocapture %0, %struct.traversal_algorithm* nocapture %1) {
ret void
}
int test_imm_2Aint64_lowword_reg(long long val) {
  return ((val) & (0x2A << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_2Aint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 42
%5 = icmp ne i64 %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_2Aint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 42
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int (*xSleep)(TYPE_1__ *, int);
  scalar_t__ pAppData;
};
typedef TYPE_1__ sqlite3_vfs;

/* Variables and functions */
int stub1(TYPE_1__ *, int);
int memSleep(sqlite3_vfs *pVfs, int nMicro) {
  return ((sqlite3_vfs *)((pVfs)->pAppData))
      ->xSleep(((sqlite3_vfs *)((pVfs)->pAppData)), nMicro);
}


x86 assembly (clang, -O0):
<memSleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rdi
mov    -0xc(%rbp),%esi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memSleep>:
mov    0x8(%rdi),%rdi
mov    (%rdi),%rax
jmp    *%rax

LLVM IR (-O0):
%struct.TYPE_4__ = type { {}*, i64 }
define i32 @memSleep(%struct.TYPE_4__* %0, i32 %1) {
%3 = alloca %struct.TYPE_4__*
%4 = alloca i32
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %3
store i32 %1, i32* %4
%5 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 1
%7 = load i64, i64* %6
%8 = inttoptr i64 %7 to %struct.TYPE_4__*
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = bitcast {}** %9 to i32 (%struct.TYPE_4__*, i32)**
%11 = load i32 (%struct.TYPE_4__*, i32)*, i32 (%struct.TYPE_4__*, i32)** %10
%12 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%13 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %12, i32 0, i32 1
%14 = load i64, i64* %13
%15 = inttoptr i64 %14 to %struct.TYPE_4__*
%16 = load i32, i32* %4
%17 = call i32 %11(%struct.TYPE_4__* %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { {}*, i64 }
define i32 @memSleep(%struct.TYPE_4__* nocapture %0, i32 %1) {
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 1
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to %struct.TYPE_4__*
%6 = inttoptr i64 %4 to i32 (%struct.TYPE_4__*, i32)**
%7 = load i32 (%struct.TYPE_4__*, i32)*, i32 (%struct.TYPE_4__*, i32)** %6
%8 = tail call i32 %7(%struct.TYPE_4__* %5, i32 %1)
ret i32 %8
}
void INT_Excep_USB0_D1FIFO0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_USB0_D1FIFO0() {
ret void
}
unsigned xrop3_238_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned stk1;
  stk1 = D | S;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_238_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_238_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = or i32 %14, %15
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = load i32, i32* %6
%19 = xor i32 %18, -1
%20 = and i32 %17, %19
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = and i32 %21, %22
%24 = or i32 %20, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @xrop3_238_1_0(i8 zeroext %0, i8 zeroext %1) {
ret i32 255
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
__attribute__((always_)) int64_t min_int64_t(int64_t a, int64_t b) {
  return a < b ? a : b;
}


x86 assembly (clang, -O0):
<min_int64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <min_int64_t+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <min_int64_t+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_int64_t>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @min_int64_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void avcodec_default_execute2() {}


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

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

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

LLVM IR (-O2):
define void @avcodec_default_execute2() {
ret void
}
struct ab5500_btemp *ab5500_btemp_get(void) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.ab5500_btemp = type opaque
define %struct.ab5500_btemp* @ab5500_btemp_get() {
ret %struct.ab5500_btemp* null
}

LLVM IR (-O2):
%struct.ab5500_btemp = type opaque
define noalias %struct.ab5500_btemp* @ab5500_btemp_get() {
ret %struct.ab5500_btemp* null
}
/* Variables and functions */
int clearenv();
int main() { return clearenv(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @clearenv()
ret i32 %1
}
/* Type definitions */
typedef int nbits;

/* Variables and functions */
int /*<<< orphan*/ memset(unsigned long *, int /*<<< orphan*/, int);
void bitmap_set_all(unsigned long *bitmap, unsigned int nbits) {
  memset(bitmap, ~0,
         (((nbits) + (sizeof(long) * 8) - 1) / (sizeof(long) * 8)) *
             sizeof(*bitmap));
}


x86 assembly (clang, -O0):
<bitmap_set_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
add    $0x40,%rax
sub    $0x1,%rax
shr    $0x6,%rax
shl    $0x3,%rax
mov    %eax,%edx
mov    $0xffffffff,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_set_all>:
mov    %esi,%edx
add    $0x3f,%rdx
shr    $0x3,%rdx
and    $0xfffffff8,%edx
mov    $0xffffffff,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @bitmap_set_all(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i64*, i64** %3
%6 = load i32, i32* %4
%7 = zext i32 %6 to i64
%8 = add i64 %7, 64
%9 = sub i64 %8, 1
%10 = udiv i64 %9, 64
%11 = mul i64 %10, 8
%12 = trunc i64 %11 to i32
%13 = call i32 @memset(i64* %5, i32 -1, i32 %12)
ret void
}

LLVM IR (-O2):
define void @bitmap_set_all(i64* %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = add nuw nsw i64 %3, 63
%5 = lshr i64 %4, 3
%6 = trunc i64 %5 to i32
%7 = and i32 %6, 1073741816
%8 = tail call i32 @memset(i64* %0, i32 -1, i32 %7)
ret void
}
short return_short(short s) { return (s); }


x86 assembly (clang, -O0):
<return_short>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i16 @return_short(i16 returned signext %0) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ drawExitPopUpButtons();
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glutSwapBuffers();
void popUpExitDisplay(void) {
  glClear(GL_COLOR_BUFFER_BIT);
  drawExitPopUpButtons();
  glutSwapBuffers();
}


x86 assembly (clang, -O0):
<popUpExitDisplay>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <glClear@plt>
mov    $0x0,%al
call   1030 <drawExitPopUpButtons@plt>
mov    $0x0,%al
call   1050 <glutSwapBuffers@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<popUpExitDisplay>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <glClear@plt>
xor    %eax,%eax
call   1030 <drawExitPopUpButtons@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glutSwapBuffers@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @popUpExitDisplay() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = call i32 (...) @drawExitPopUpButtons()
%4 = call i32 (...) @glutSwapBuffers()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @popUpExitDisplay() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = tail call i32 (...) @drawExitPopUpButtons()
%4 = tail call i32 (...) @glutSwapBuffers()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vecNd_scalarMult_new(double *, double const *, double const,
                                        int);
void vec4d_scalarMult_new(double result[4], const double v[4],
                          const double scalar) {
  vecNd_scalarMult_new(result, v, scalar, 4);
}


x86 assembly (clang, -O0):
<vec4d_scalarMult_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  -0x18(%rbp),%xmm0
mov    $0x4,%edx
call   1030 <vecNd_scalarMult_new@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec4d_scalarMult_new>:
mov    $0x4,%edx
jmp    1030 <vecNd_scalarMult_new@plt>

LLVM IR (-O0):
define void @vec4d_scalarMult_new(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 = load double*, double** %5
%9 = load double, double* %6
%10 = call i32 @vecNd_scalarMult_new(double* %7, double* %8, double %9, i32 4)
ret void
}

LLVM IR (-O2):
define void @vec4d_scalarMult_new(double* %0, double* %1, double %2) {
%4 = tail call i32 @vecNd_scalarMult_new(double* %0, double* %1, double %2, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void printAbout() {
  fputs("\nUbuntuPaste (aka ubuntupaste)\n\nis a micro plugin which enables "
        "command line interface (cli-interface) for pastebin.ubuntu.com.Also "
        "ubuntupaste is open source plugin you can modify ,submit bug, add "
        "your features to its source on Github.Lisense Deailts on Github. "
        "\nAuthor : flouthoc (https://github.com/flouthoc) and "
        "Contributers\nSource : https://github.com/flouthoc/ubuntupaste\n\n",
        stdout);
}


x86 assembly (clang, -O0):
<printAbout>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printAbout>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [380 x i8] c"\0AUbuntuPaste (aka ubuntupaste)\0A\0Ais a micro plugin which enables command line interface (cli-interface) for pastebin.ubuntu.com.Also ubuntupaste is open source plugin you can modify ,submit bug, add your features to its source on Github.Lisense Deailts on Github. \0AAuthor : flouthoc (https://github.com/flouthoc) and Contributers\0ASource : https://github.com/flouthoc/ubuntupaste\0A\0A\00"
@stdout = global i32 0
define void @printAbout() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([380 x i8], [380 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [380 x i8] c"\0AUbuntuPaste (aka ubuntupaste)\0A\0Ais a micro plugin which enables command line interface (cli-interface) for pastebin.ubuntu.com.Also ubuntupaste is open source plugin you can modify ,submit bug, add your features to its source on Github.Lisense Deailts on Github. \0AAuthor : flouthoc (https://github.com/flouthoc) and Contributers\0ASource : https://github.com/flouthoc/ubuntupaste\0A\0A\00"
@stdout = global i32 0
define void @printAbout() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([380 x i8], [380 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
char to_upper(char c) {
  if (c >= 'a' && c <= 'z')
    return c - 'a' + 'A';
  else
    return c;
}


x86 assembly (clang, -O0):
<to_upper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     1136 <to_upper+0x36>
movsbl -0x2(%rbp),%eax
cmp    $0x7a,%eax
jg     1136 <to_upper+0x36>
movsbl -0x2(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    113c <to_upper+0x3c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_upper>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @to_upper(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 97
%15 = add nsw i32 %14, 65
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %19
17: ; preds = %7, %1
%18 = load i8, i8* %3
store i8 %18, i8* %2
br label %19
19: ; preds = %17, %11
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @to_upper(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ succ(int *, int);
int main(void) {
  int myarray[] = {24, 37, 142, 205};
  succ(myarray, 1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <succ@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.myarray = [4 x i32] [i32 24, i32 37, i32 142, i32 205]
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
store i32 0, i32* %1
%3 = bitcast [4 x i32]* %2 to i8*
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%5 = call i32 @succ(i32* %4, i32 1)
ret i32 0
}

LLVM IR (-O2):
@__const.main.myarray = [4 x i32] [i32 24, i32 37, i32 142, i32 205]
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @succ(i32* %3, i32 1)
ret i32 0
}
/* Variables and functions */
double pow(double, double);
double f(double d) { return pow(d, 3.0) - pow(d, 2.0) - 3.0 * d + 1.8; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeee(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xecf(%rip),%xmm1
call   1030 <pow@plt>
movsd  -0x10(%rbp),%xmm1
subsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xeac(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe94(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movsd  %xmm0,(%rsp)
movsd  0xee2(%rip),%xmm1
call   1030 <pow@plt>
movsd  (%rsp),%xmm2
movapd %xmm2,%xmm1
mulsd  %xmm2,%xmm1
mulsd  0xed0(%rip),%xmm2
subsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
addsd  0xec8(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, double 3.000000e+00)
%5 = load double, double* %2
%6 = call double @pow(double %5, double 2.000000e+00)
%7 = fsub double %4, %6
%8 = load double, double* %2
%9 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %8, double %7)
%10 = fadd double %9, 1.800000e+00
ret double %10
}

LLVM IR (-O2):
define double @f(double %0) {
%2 = tail call double @pow(double %0, double 3.000000e+00)
%3 = fmul double %0, %0
%4 = fsub double %2, %3
%5 = tail call double @llvm.fmuladd.f64(double %0, double -3.000000e+00, double %4)
%6 = fadd double %5, 1.800000e+00
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
scalar_t__ sqrt(double);
void arith_self_test(void) { printf("sqrt(25.0)=%d\n", (int)sqrt(25.0)); }


x86 assembly (clang, -O0):
<arith_self_test>:
push   %rbp
mov    %rsp,%rbp
movsd  0xed4(%rip),%xmm0
call   1040 <sqrt@plt>
mov    %eax,%esi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arith_self_test>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <sqrt@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"sqrt(25.0)=%d\0A\00"
define void @arith_self_test() {
%1 = call i64 @sqrt(double 2.500000e+01)
%2 = trunc i64 %1 to i32
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"sqrt(25.0)=%d\0A\00"
define void @arith_self_test() {
%1 = tail call i64 @sqrt(double 2.500000e+01)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scuClockControl(unsigned int const);
int /*<<< orphan*/ scuResetControl(int);
unsigned int scuResetReason();
unsigned int scuPostReset(const unsigned int clkcr) {
  unsigned int reason = scuResetReason();
  scuResetControl(((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3)));
  scuClockControl(clkcr);
  return reason;
}


x86 assembly (clang, -O0):
<scuPostReset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <scuResetReason@plt>
mov    %eax,-0x8(%rbp)
mov    $0xf,%edi
call   1030 <scuResetControl@plt>
mov    -0x4(%rbp),%edi
call   1040 <scuClockControl@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scuPostReset>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <scuResetReason@plt>
mov    %eax,%ebp
mov    $0xf,%edi
call   1030 <scuResetControl@plt>
mov    %ebx,%edi
call   1040 <scuClockControl@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @scuPostReset(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @scuResetReason()
store i32 %4, i32* %3
%5 = call i32 @scuResetControl(i32 15)
%6 = load i32, i32* %2
%7 = call i32 @scuClockControl(i32 %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @scuPostReset(i32 %0) {
%2 = tail call i32 (...) @scuResetReason()
%3 = tail call i32 @scuResetControl(i32 15)
%4 = tail call i32 @scuClockControl(i32 %0)
ret i32 %2
}
/* Variables and functions */
char *get_date();
int /*<<< orphan*/ printf(char *, char *);
void display_date() { printf("%s\n", get_date()); }


x86 assembly (clang, -O0):
<display_date>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <get_date@plt>
mov    %rax,%rsi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_date>:
push   %rax
xor    %eax,%eax
call   1040 <get_date@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @display_date() {
%1 = call i8* (...) @get_date()
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @display_date() {
%1 = tail call i8* (...) @get_date()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
double spb(double bpm) { return 60 / bpm; }


x86 assembly (clang, -O0):
<spb>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<spb>:
movsd  0xef8(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @spb(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double 6.000000e+01, %3
ret double %4
}

LLVM IR (-O2):
define double @spb(double %0) {
%2 = fdiv double 6.000000e+01, %0
ret double %2
}
int sunxi_audio_stop(int mode) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sunxi_audio_stop(i32 %0) {
ret i32 0
}
double fabs(double f) {
  if (f < 0)
    return f * -1.0;
  else
    return f;
}


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112e <fabs+0x2e>
movsd  0xee1(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1138 <fabs+0x38>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fabs(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fmul double %7, -1.000000e+00
store double %8, double* %2
br label %11
9: ; preds = %1
%10 = load double, double* %3
store double %10, double* %2
br label %11
11: ; preds = %9, %6
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @fabs(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
void ff_hevc_put_hevc_bi_qpel_h64_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h64_8_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void utils_printf_color(char *code_couleur) {
  printf("\033[%sm", code_couleur);
}


x86 assembly (clang, -O0):
<utils_printf_color>:
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):
<utils_printf_color>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%sm\00"
define void @utils_printf_color(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;
typedef int /*<<< orphan*/ fileofs;

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, int, int, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  off_t fileofs;
  int minsize = atoi(argv[1]);
  memset(&fileofs, 0, sizeof(fileofs));
  printf("%d:%d:%ld\n", sizeof(off_t), (sizeof(off_t) >= minsize), fileofs);
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x18(%rbp)
lea    -0x14(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
movslq -0x18(%rbp),%rcx
mov    $0x4,%eax
cmp    %rcx,%rax
setae  %al
and    $0x1,%al
movzbl %al,%edx
mov    -0x14(%rbp),%ecx
lea    0xe7c(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
lea    0xc(%rsp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
xor    %edx,%edx
cmp    $0x5,%ebx
setb   %dl
mov    0xc(%rsp),%ecx
lea    0xe9c(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%d:%d:%ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @atoi(i8* %10)
store i32 %11, i32* %7
%12 = call i32 @memset(i32* %6, i32 0, i32 4)
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = icmp uge i64 4, %14
%16 = zext i1 %15 to i32
%17 = load i32, i32* %6
%18 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 4, i32 %16, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%d:%d:%ld\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = call i32 @memset(i32* %3, i32 0, i32 4)
%9 = icmp ult i32 %7, 5
%10 = zext i1 %9 to i32
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 4, i32 %10, i32 %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ subunit_send_event(char *, char const *const,
                                      int /*<<< orphan*/ *);
void subunit_test_pass(char const *const name) {
  subunit_send_event("success", name, NULL);
}


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

x86 assembly (clang, -O2):
<subunit_test_pass>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %edx,%edx
jmp    1030 <subunit_send_event@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"success\00"
define void @subunit_test_pass(i8* %0) {
%2 = tail call i32 @subunit_send_event(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i32* null)
ret void
}
int is_alphabetic(char c) { return c >= 'a' && c <= 'z'; }


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

x86 assembly (clang, -O2):
<is_alphabetic>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_alphabetic(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, 97
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, 122
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_alphabetic(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
int smin1(int a, int b) { return a ^ ((a ^ b) & -(a > b)); }


x86 assembly (clang, -O0):
<smin1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
xor    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%edx
cmp    -0x8(%rbp),%edx
setg   %dl
and    $0x1,%dl
movzbl %dl,%esi
xor    %edx,%edx
sub    %esi,%edx
and    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smin1>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

LLVM IR (-O0):
define i32 @smin1(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* %3
%7 = load i32, i32* %4
%8 = xor i32 %6, %7
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = icmp sgt i32 %9, %10
%12 = zext i1 %11 to i32
%13 = sub nsw i32 0, %12
%14 = and i32 %8, %13
%15 = xor i32 %5, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @smin1(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}