xunge/DecIR huggingface dataset:
/* Variables and functions */
void *mapping(unsigned long);
void *emapping(unsigned long page_addr) {
  void *result;
  result = mapping(page_addr - 1);
  result = ((unsigned char *)result) + 0xffc;
  return result;
}


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

x86 assembly (clang, -O2):
<emapping>:
push   %rax
add    $0xffffffffffffffff,%rdi
call   1030 <mapping@plt>
add    $0xffc,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @emapping(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = sub i64 %4, 1
%6 = call i8* @mapping(i64 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 4092
store i8* %8, i8** %3
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @emapping(i64 %0) {
%2 = add i64 %0, -1
%3 = tail call i8* @mapping(i64 %2)
%4 = getelementptr inbounds i8, i8* %3, i64 4092
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ st_InitDeltaTrash();
int /*<<< orphan*/ st_InitDeltaWall();
void st_InitDelta(void) {
  st_InitDeltaTrash();
  st_InitDeltaWall();
}


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

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

LLVM IR (-O0):
define void @st_InitDelta() {
%1 = call i32 (...) @st_InitDeltaTrash()
%2 = call i32 (...) @st_InitDeltaWall()
ret void
}

LLVM IR (-O2):
define void @st_InitDelta() {
%1 = tail call i32 (...) @st_InitDeltaTrash()
%2 = tail call i32 (...) @st_InitDeltaWall()
ret void
}
char *B64Pdecode(char *str) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @B64Pdecode(i8* nocapture readnone %0) {
ret i8* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int read_defect_data_10_len(int /*<<< orphan*/ *);
bool read_defect_data_10_hdr_is_valid(uint8_t *data, unsigned data_len) {
  if (data_len < 4)
    return false;
  if ((read_defect_data_10_len(data) % 4) != 0)
    return false;
  return true;
}


x86 assembly (clang, -O0):
<read_defect_data_10_hdr_is_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jae    1135 <read_defect_data_10_hdr_is_valid+0x25>
movl   $0x0,-0x4(%rbp)
jmp    1162 <read_defect_data_10_hdr_is_valid+0x52>
mov    -0x10(%rbp),%rdi
call   1030 <read_defect_data_10_len@plt>
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     115b <read_defect_data_10_hdr_is_valid+0x4b>
movl   $0x0,-0x4(%rbp)
jmp    1162 <read_defect_data_10_hdr_is_valid+0x52>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_defect_data_10_hdr_is_valid>:
xor    %eax,%eax
cmp    $0x4,%esi
jb     112b <read_defect_data_10_hdr_is_valid+0x1b>
push   %rax
call   1030 <read_defect_data_10_len@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   $0x3,%cl
sete   %al
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @read_defect_data_10_hdr_is_valid(i32* %0, i32 %1) {
%3 = icmp ult i32 %1, 4
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = tail call i32 @read_defect_data_10_len(i32* %0)
%6 = and i32 %5, 3
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %4, %2
%10 = phi i32 [ 0, %2 ], [ %8, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_usage() {
  puts("Histogram equalization, P. Getreuer 2011\n");
  puts("Usage: histeq [options] <input file> <output file>\n"
       "Only "
       "BMP"
       ""
       ""
       ""
       " images are supported.\n");
  puts("Options:\n");
  puts("   -b <number>     number of histogram bins (default 256)");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf48(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [42 x i8] c"Histogram equalization, P. Getreuer 2011\0A\00"
@.str.1 = [83 x i8] c"Usage: histeq [options] <input file> <output file>\0AOnly BMP images are supported.\0A\00"
@.str.2 = [10 x i8] c"Options:\0A\00"
@.str.3 = [58 x i8] c" -b <number> number of histogram bins (default 256)\00"
define void @print_usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Histogram equalization, P. Getreuer 2011\0A\00"
@.str.1 = [83 x i8] c"Usage: histeq [options] <input file> <output file>\0AOnly BMP images are supported.\0A\00"
@.str.2 = [10 x i8] c"Options:\0A\00"
@.str.3 = [58 x i8] c" -b <number> number of histogram bins (default 256)\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.3, i64 0, i64 0))
ret void
}
function1() {}


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

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

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

LLVM IR (-O2):
define i32 @function1() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ HalSerialPutcRtl8195a(int /*<<< orphan*/);
int puts(const char *s) {
  while (*s) {
    HalSerialPutcRtl8195a(*s++);
  }
  return 0;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <HalSerialPutcRtl8195a@plt>
jmp    111c <puts+0xc>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <HalSerialPutcRtl8195a@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
%12 = call i32 @HalSerialPutcRtl8195a(i32 %11)
br label %3
13: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @HalSerialPutcRtl8195a(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret i32 0
}
/* Variables and functions */
int GetInt();
int /*<<< orphan*/ printf(char *);
int getPositiveInt() {
  int n;
  do {
    printf("minutes: ");
    n = GetInt();
  } while (n < 1);
  return n;
}


x86 assembly (clang, -O0):
<getPositiveInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <GetInt@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jl     1128 <getPositiveInt+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPositiveInt>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <GetInt@plt>
test   %eax,%eax
jle    1130 <getPositiveInt+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"minutes: \00"
define i32 @getPositiveInt() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @GetInt()
%4 = icmp slt i32 %3, 1
br i1 %4, label %1, label %5
5: ; preds = %1
ret i32 %3
}
void leave_command(const struct message *message, int socket_fd) {}


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

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

LLVM IR (-O0):
%struct.message = type opaque
define void @leave_command(%struct.message* %0, i32 %1) {
%3 = alloca %struct.message*
%4 = alloca i32
store %struct.message* %0, %struct.message** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.message = type opaque
define void @leave_command(%struct.message* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int foo();
int main() {
  switch (foo()) {
  case 1:
    assert(foo() == 1);
    break;
  case 2:
    assert(foo() == 2);
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
call   1040 <foo@plt>
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
sub    $0x1,%eax
je     115a <main+0x3a>
jmp    1149 <main+0x29>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     1176 <main+0x56>
jmp    118d <main+0x6d>
mov    $0x0,%al
call   1040 <foo@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    118d <main+0x6d>
mov    $0x0,%al
call   1040 <foo@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <foo@plt>
mov    %eax,%ebx
cmp    $0x1,%eax
je     1139 <main+0x19>
cmp    $0x2,%ebx
jne    114d <main+0x2d>
mov    $0x2,%ebx
xor    %eax,%eax
call   1040 <foo@plt>
xor    %edi,%edi
cmp    %ebx,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @foo()
switch i32 %2, label %13 [
i32 1, label %3
i32 2, label %8
]
3: ; preds = %0
%4 = call i32 (...) @foo()
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
br label %13
8: ; preds = %0
%9 = call i32 (...) @foo()
%10 = icmp eq i32 %9, 2
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
br label %13
13: ; preds = %0, %8, %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
switch i32 %1, label %9 [
i32 1, label %3
i32 2, label %2
]
2: ; preds = %0
br label %3
3: ; preds = %0, %2
%4 = phi i32 [ 2, %2 ], [ %1, %0 ]
%5 = tail call i32 (...) @foo()
%6 = icmp eq i32 %5, %4
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
br label %9
9: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ l64a_r(long, char *, int);
char *l64a(long value) {
  static char buf[7];
  (void)l64a_r(value, buf, sizeof(buf));
  return (buf);
}


x86 assembly (clang, -O0):
<l64a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x2f02(%rip),%rsi
mov    $0x7,%edx
call   1030 <l64a_r@plt>
lea    0x2ef1(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l64a>:
push   %rbx
lea    0x2f11(%rip),%rbx
mov    %rbx,%rsi
mov    $0x7,%edx
call   1030 <l64a_r@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@l64a.buf = internal global [7 x i8] zeroinitializer
define i8* @l64a(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @l64a_r(i64 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @l64a.buf, i64 0, i64 0), i32 7)
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @l64a.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@l64a.buf = internal global [7 x i8] zeroinitializer
define i8* @l64a(i64 %0) {
%2 = tail call i32 @l64a_r(i64 %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @l64a.buf, i64 0, i64 0), i32 7)
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @l64a.buf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ sh(int /*<<< orphan*/);
void op_sh() { sh(0); }


x86 assembly (clang, -O0):
<op_sh>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <sh@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_sh>:
xor    %edi,%edi
jmp    1030 <sh@plt>

LLVM IR (-O0):
define void @op_sh() {
%1 = call i32 @sh(i32 0)
ret void
}

LLVM IR (-O2):
define void @op_sh() {
%1 = tail call i32 @sh(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ CMAC_CTX;

/* Variables and functions */
int /*<<< orphan*/ CMAC_CTX_cleanup(int /*<<< orphan*/ *);
int /*<<< orphan*/ OPENSSL_free(int /*<<< orphan*/ *);
void CMAC_CTX_free(CMAC_CTX *ctx) {
  CMAC_CTX_cleanup(ctx);
  OPENSSL_free(ctx);
}


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

x86 assembly (clang, -O2):
<CMAC_CTX_free>:
push   %rbx
mov    %rdi,%rbx
call   1030 <CMAC_CTX_cleanup@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <OPENSSL_free@plt>

LLVM IR (-O0):
define void @CMAC_CTX_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @CMAC_CTX_cleanup(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @OPENSSL_free(i32* %5)
ret void
}

LLVM IR (-O2):
define void @CMAC_CTX_free(i32* %0) {
%2 = tail call i32 @CMAC_CTX_cleanup(i32* %0)
%3 = tail call i32 @OPENSSL_free(i32* %0)
ret void
}
int isValidWordChar(int c) {
  if ((c >= 65 && c <= 90) || (c >= 97 && c <= 122) || (c >= 192 && c <= 214) ||
      (c >= 217 && c <= 246) || (c >= 249 && c <= 255))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isValidWordChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     111b <isValidWordChar+0x1b>
cmpl   $0x5a,-0x8(%rbp)
jle    117d <isValidWordChar+0x7d>
cmpl   $0x61,-0x8(%rbp)
jl     112f <isValidWordChar+0x2f>
cmpl   $0x7a,-0x8(%rbp)
jle    117d <isValidWordChar+0x7d>
cmpl   $0xc0,-0x8(%rbp)
jl     1149 <isValidWordChar+0x49>
cmpl   $0xd6,-0x8(%rbp)
jle    117d <isValidWordChar+0x7d>
cmpl   $0xd9,-0x8(%rbp)
jl     1163 <isValidWordChar+0x63>
cmpl   $0xf6,-0x8(%rbp)
jle    117d <isValidWordChar+0x7d>
cmpl   $0xf9,-0x8(%rbp)
jl     1189 <isValidWordChar+0x89>
cmpl   $0xff,-0x8(%rbp)
jg     1189 <isValidWordChar+0x89>
movl   $0x1,-0x4(%rbp)
jmp    1190 <isValidWordChar+0x90>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValidWordChar>:
movd   %edi,%xmm0
and    $0xffffffdf,%edi
movd   %edi,%xmm1
punpckldq %xmm1,%xmm0
pshufd $0x40,%xmm0,%xmm0
paddd  0xee4(%rip),%xmm0
pxor   0xeec(%rip),%xmm0
movdqa 0xef4(%rip),%xmm1
pcmpgtd %xmm0,%xmm1
movmskps %xmm1,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
ret

LLVM IR (-O0):
define i32 @isValidWordChar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %33, label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 97
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sle i32 %13, 122
br i1 %14, label %33, label %15
15: ; preds = %12, %9
%16 = load i32, i32* %3
%17 = icmp sge i32 %16, 192
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp sle i32 %19, 214
br i1 %20, label %33, label %21
21: ; preds = %18, %15
%22 = load i32, i32* %3
%23 = icmp sge i32 %22, 217
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = load i32, i32* %3
%26 = icmp sle i32 %25, 246
br i1 %26, label %33, label %27
27: ; preds = %24, %21
%28 = load i32, i32* %3
%29 = icmp sge i32 %28, 249
br i1 %29, label %30, label %34
30: ; preds = %27
%31 = load i32, i32* %3
%32 = icmp sle i32 %31, 255
br i1 %32, label %33, label %34
33: ; preds = %30, %24, %18, %12, %6
store i32 1, i32* %2
br label %35
34: ; preds = %30, %27
store i32 0, i32* %2
br label %35
35: ; preds = %34, %33
%36 = load i32, i32* %2
ret i32 %36
}

LLVM IR (-O2):
define i32 @isValidWordChar(i32 %0) {
%2 = and i32 %0, -33
%3 = insertelement <4 x i32> poison, i32 %0, i64 0
%4 = insertelement <4 x i32> %3, i32 %2, i64 1
%5 = shufflevector <4 x i32> %4, <4 x i32> poison, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
%6 = add <4 x i32> %5, <i32 -249, i32 -217, i32 -192, i32 -65>
%7 = icmp ult <4 x i32> %6, <i32 7, i32 30, i32 23, i32 26>
%8 = bitcast <4 x i1> %7 to i4
%9 = icmp ne i4 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
struct Dlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct Dlist *);
void DlistFree(struct Dlist *list) { free(list); }


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

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

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

LLVM IR (-O2):
%struct.Dlist = type { i32 }
define void @DlistFree(%struct.Dlist* nocapture %0) {
%2 = tail call i32 @free(%struct.Dlist* %0)
ret void
}
int test_imm_42uint8_reg(unsigned char val) {
  return ((val) & (-0x42 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_42uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffbe,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_42uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -66
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
fibonacci(int n) {
  if (n == 0)
    return 0;
  else if (n == 1)
    return 1;
  else
    return fibonacci(n - 1) + fibonacci(n - 2);
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <fibonacci+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116a <fibonacci+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <fibonacci+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116a <fibonacci+0x5a>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%ebx
jb     1132 <fibonacci+0x22>
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fibonacci@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x2,%ebx
jae    1120 <fibonacci+0x10>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibonacci(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i32 [ 0, %1 ], [ %10, %6 ]
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = icmp ult i32 %4, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = add nsw i32 %4, -1
%8 = tail call i32 @fibonacci(i32 %7)
%9 = add nsw i32 %4, -2
%10 = add nsw i32 %8, %3
br label %2
11: ; preds = %2
%12 = add nsw i32 %4, %3
ret i32 %12
}
int xPos(int v) { return v; }


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

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

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

LLVM IR (-O2):
define i32 @xPos(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int f();
int /*<<< orphan*/ g(int);
int main() {
  int x;
  if (x = f(), g(x)) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <g@plt>
cmp    $0x0,%eax
je     114f <main+0x2f>
jmp    114f <main+0x2f>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 @g(i32 %1)
ret i32 0
}
int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.brcmf_pub = type opaque
define i32 @brcmf_proto_msgbuf_attach(%struct.brcmf_pub* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
float length(float *);
void normalize(float *v) {
  float d = length(v);
  if (d == 0)
    return;
  v[0] /= d;
  v[1] /= d;
  v[2] /= d;
}


x86 assembly (clang, -O0):
<normalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <length@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1146 <normalize+0x36>
jp     1146 <normalize+0x36>
jmp    1189 <normalize+0x79>
movss  -0xc(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,(%rax)
movss  -0xc(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,0x4(%rax)
movss  -0xc(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,0x8(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalize>:
push   %rbx
mov    %rdi,%rbx
call   1030 <length@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1125 <normalize+0x15>
jp     1125 <normalize+0x15>
pop    %rbx
ret
movss  (%rbx),%xmm1
movss  0x4(%rbx),%xmm2
divss  %xmm0,%xmm1
movss  %xmm1,(%rbx)
divss  %xmm0,%xmm2
movss  %xmm2,0x4(%rbx)
movss  0x8(%rbx),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,0x8(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @normalize(float* %0) {
%2 = alloca float*
%3 = alloca float
store float* %0, float** %2
%4 = load float*, float** %2
%5 = call float @length(float* %4)
store float %5, float* %3
%6 = load float, float* %3
%7 = fcmp oeq float %6, 0.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %1
br label %25
9: ; preds = %1
%10 = load float, float* %3
%11 = load float*, float** %2
%12 = getelementptr inbounds float, float* %11, i64 0
%13 = load float, float* %12
%14 = fdiv float %13, %10
store float %14, float* %12
%15 = load float, float* %3
%16 = load float*, float** %2
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = fdiv float %18, %15
store float %19, float* %17
%20 = load float, float* %3
%21 = load float*, float** %2
%22 = getelementptr inbounds float, float* %21, i64 2
%23 = load float, float* %22
%24 = fdiv float %23, %20
store float %24, float* %22
br label %25
25: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @normalize(float* %0) {
%2 = tail call float @length(float* %0)
%3 = fcmp oeq float %2, 0.000000e+00
br i1 %3, label %13, label %4
4: ; preds = %1
%5 = load float, float* %0
%6 = fdiv float %5, %2
store float %6, float* %0
%7 = getelementptr inbounds float, float* %0, i64 1
%8 = load float, float* %7
%9 = fdiv float %8, %2
store float %9, float* %7
%10 = getelementptr inbounds float, float* %0, i64 2
%11 = load float, float* %10
%12 = fdiv float %11, %2
store float %12, float* %10
br label %13
13: ; preds = %1, %4
ret void
}
int atoi(const char *str) {
  int k = 0;
  for (int i = 0; str[i] != '\0'; ++i)
    k = (k << 3) + (k << 1) + (str[i]) - '0';
  return k;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115b <atoi+0x5b>
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <atoi+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <atoi+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <atoi+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %1
%5 = phi i32 [ 0, %1 ], [ %13, %6 ]
ret i32 %5
6: ; preds = %1, %6
%7 = phi i64 [ %14, %6 ], [ 0, %1 ]
%8 = phi i8 [ %16, %6 ], [ %2, %1 ]
%9 = phi i32 [ %13, %6 ], [ 0, %1 ]
%10 = sext i8 %8 to i32
%11 = mul i32 %9, 10
%12 = add i32 %11, -48
%13 = add i32 %12, %10
%14 = add nuw nsw i64 %7, 1
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %4, label %6
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_write_dobldobl_random_coefficient_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(462, a, b, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<celcon_write_dobldobl_random_coefficient_system>:
mov    $0x1ce,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @celcon_write_dobldobl_random_coefficient_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 462, i32* undef, i32* undef, double* undef)
ret i32 %1
}
int MUSIC_GetContext(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @MUSIC_GetContext() {
ret i32 0
}
void threat_classifier(char *datacfg, char *cfgfile, char *weightfile,
                       int cam_index, const char *filename) {}


x86 assembly (clang, -O0):
<threat_classifier>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @threat_classifier(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
define void @threat_classifier(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2, i32 %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
double sqrt(double);
double area(double a1, double a2, double a3) {
  double s = (a1 + a2 + a3) / 2.0;
  return sqrt(s * (s - a1) * (s - a2) * (s - a3));
}


x86 assembly (clang, -O0):
<area>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xec2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<area>:
movapd %xmm0,%xmm3
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
mulsd  0xedc(%rip),%xmm0
movapd %xmm0,%xmm4
subsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm0,%xmm3
subsd  %xmm1,%xmm3
mulsd  %xmm4,%xmm3
subsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1153 <area+0x43>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @area(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %4
%9 = load double, double* %5
%10 = fadd double %8, %9
%11 = load double, double* %6
%12 = fadd double %10, %11
%13 = fdiv double %12, 2.000000e+00
store double %13, double* %7
%14 = load double, double* %7
%15 = load double, double* %7
%16 = load double, double* %4
%17 = fsub double %15, %16
%18 = fmul double %14, %17
%19 = load double, double* %7
%20 = load double, double* %5
%21 = fsub double %19, %20
%22 = fmul double %18, %21
%23 = load double, double* %7
%24 = load double, double* %6
%25 = fsub double %23, %24
%26 = fmul double %22, %25
%27 = call double @sqrt(double %26)
ret double %27
}

LLVM IR (-O2):
define double @area(double %0, double %1, double %2) {
%4 = fadd double %0, %1
%5 = fadd double %4, %2
%6 = fmul double %5, 5.000000e-01
%7 = fsub double %6, %0
%8 = fmul double %6, %7
%9 = fsub double %6, %1
%10 = fmul double %9, %8
%11 = fsub double %6, %2
%12 = fmul double %11, %10
%13 = tail call double @sqrt(double %12)
ret double %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_proplist_contains() {
  printf("NOT IMPLEMENTED:"
         "pa_proplist_contains"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"NOT IMPLEMENTED:pa_proplist_contains\0A\00"
define i32 @pa_proplist_contains() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [37 x i8] c"NOT IMPLEMENTED:pa_proplist_contains\00"
define i32 @pa_proplist_contains() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void Delay_int(unsigned int n) {
  while (n) {
    asm("nop");
    n -= 1;
  }
}


x86 assembly (clang, -O0):
<Delay_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1120 <Delay_int+0x20>
nop
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <Delay_int+0x7>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Delay_int>:
test   %edi,%edi
je     1116 <Delay_int+0x16>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
nop
add    $0xffffffff,%edi
jne    1110 <Delay_int+0x10>
ret

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

LLVM IR (-O2):
define void @Delay_int(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
%5 = add i32 %4, -1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, long, char *, char);
void err(long row, long col, char msg[], char c) {
  printf("%ld:%ld: error: %s: %c\n", row, col, msg, c);
}


x86 assembly (clang, -O0):
<err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec4(%rip),%rdi
movsbl -0x19(%rbp),%r8d
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"%ld:%ld: error: %s: %c\0A\00"
define void @err(i64 %0, i64 %1, i8* %2, i8 signext %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8
store i64 %0, i64* %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i8 %3, i8* %8
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = load i8, i8* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 %9, i64 %10, i8* %11, i8 signext %12)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"%ld:%ld: error: %s: %c\0A\00"
define void @err(i64 %0, i64 %1, i8* %2, i8 signext %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1, i8* %2, i8 signext %3)
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ number_sys_conversion(int, int);
int main(int argc, char *argv[]) {
  int val = atoi(argv[1]);
  int sys = atoi(argv[2]);
  number_sys_conversion(val, sys);
  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   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <number_sys_conversion@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1040 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <number_sys_conversion@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
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* %6
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 2
%14 = load i8*, i8** %13
%15 = call i32 @atoi(i8* %14)
store i32 %15, i32* %7
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = call i32 @number_sys_conversion(i32 %16, i32 %17)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = tail call i32 @number_sys_conversion(i32 %5, i32 %8)
ret i32 0
}
/* Variables and functions */
scalar_t__ pow(double, double);
int power(int a, int b) { return (int)pow((double)a, (double)b); }


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

x86 assembly (clang, -O2):
<power>:
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define i32 @power(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 = sitofp i32 %5 to double
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = call i64 @pow(double %6, double %8)
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @power(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = sitofp i32 %1 to double
%5 = tail call i64 @pow(double %3, double %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ motor(int, int);
int /*<<< orphan*/ msleep(int);
int /*<<< orphan*/ off(int);
void forward(int dist) {
  motor(3, 120);
  motor(1, 160);
  msleep(dist);
  off(3);
  off(1);
}


x86 assembly (clang, -O0):
<forward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x78,%esi
call   1030 <motor@plt>
mov    $0x1,%edi
mov    $0xa0,%esi
call   1030 <motor@plt>
mov    -0x4(%rbp),%edi
call   1050 <msleep@plt>
mov    $0x3,%edi
call   1040 <off@plt>
mov    $0x1,%edi
call   1040 <off@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forward>:
push   %rbx
mov    %edi,%ebx
mov    $0x3,%edi
mov    $0x78,%esi
call   1030 <motor@plt>
mov    $0x1,%edi
mov    $0xa0,%esi
call   1030 <motor@plt>
mov    %ebx,%edi
call   1050 <msleep@plt>
mov    $0x3,%edi
call   1040 <off@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1040 <off@plt>

LLVM IR (-O0):
define void @forward(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @motor(i32 3, i32 120)
%4 = call i32 @motor(i32 1, i32 160)
%5 = load i32, i32* %2
%6 = call i32 @msleep(i32 %5)
%7 = call i32 @off(i32 3)
%8 = call i32 @off(i32 1)
ret void
}

LLVM IR (-O2):
define void @forward(i32 %0) {
%2 = tail call i32 @motor(i32 3, i32 120)
%3 = tail call i32 @motor(i32 1, i32 160)
%4 = tail call i32 @msleep(i32 %0)
%5 = tail call i32 @off(i32 3)
%6 = tail call i32 @off(i32 1)
ret void
}
int get_parent_index(int child_index) { return (child_index - 1) / 2; }


x86 assembly (clang, -O0):
<get_parent_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_parent_index>:
mov    %edi,%eax
add    $0xffffffff,%eax
shr    $0x1f,%eax
add    %edi,%eax
add    $0xffffffff,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @get_parent_index(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = sdiv i32 %2, 2
ret i32 %3
}
/* Variables and functions */
scalar_t__ foo();
int main() {
  int i = 0;
  double sum = 0;
  for (i = 0; i < 5; i++) {
    sum += foo();
  }
  return sum;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1163 <main+0x53>
mov    $0x0,%al
call   1030 <foo@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <main+0x25>
cvttsd2si -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <foo@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <foo@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <foo@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <foo@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
store i32 0, i32* %2
store double 0.000000e+00, double* %3
store i32 0, i32* %2
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = call i64 (...) @foo()
%9 = sitofp i64 %8 to double
%10 = load double, double* %3
%11 = fadd double %10, %9
store double %11, double* %3
br label %12
12: ; preds = %7
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %4
15: ; preds = %4
%16 = load double, double* %3
%17 = fptosi double %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @foo()
%2 = sitofp i64 %1 to double
%3 = tail call i64 (...) @foo()
%4 = sitofp i64 %3 to double
%5 = fadd double %2, %4
%6 = tail call i64 (...) @foo()
%7 = sitofp i64 %6 to double
%8 = fadd double %5, %7
%9 = tail call i64 (...) @foo()
%10 = sitofp i64 %9 to double
%11 = fadd double %8, %10
%12 = tail call i64 (...) @foo()
%13 = sitofp i64 %12 to double
%14 = fadd double %11, %13
%15 = fptosi double %14 to i32
ret i32 %15
}
/* Type definitions */
struct feature_pair {
  int dummy;
};
struct CovariateAnalysis {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void _emitJSONUniProbR(const struct feature_pair *pair,
                       const struct CovariateAnalysis *covan, FILE *fp) {}


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

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

LLVM IR (-O0):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONUniProbR(%struct.feature_pair* %0, %struct.CovariateAnalysis* %1, i32* %2) {
%4 = alloca %struct.feature_pair*
%5 = alloca %struct.CovariateAnalysis*
%6 = alloca i32*
store %struct.feature_pair* %0, %struct.feature_pair** %4
store %struct.CovariateAnalysis* %1, %struct.CovariateAnalysis** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONUniProbR(%struct.feature_pair* nocapture %0, %struct.CovariateAnalysis* nocapture %1, i32* nocapture %2) {
ret void
}