xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ time_t;
struct timespec {
  scalar_t__ tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int nanosleep(struct timespec *, int /*<<< orphan*/ *);
int p_delay(unsigned int seconds) {
  struct timespec t;
  int result;
  t.tv_sec = (time_t)seconds;
  t.tv_nsec = 0;
  result = nanosleep(&t, NULL);
  return (result);
}


x86 assembly (clang, -O0):
<p_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_delay>:
sub    $0x18,%rsp
mov    %edi,%eax
mov    %rax,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define i32 @p_delay(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 %6, i64* %7
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i64 0, i64* %8
%9 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define i32 @p_delay(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = zext i32 %0 to i64
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 %4, i64* %5
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i64 0, i64* %6
%7 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fputs("Usage: fillerup [-q] filename\n", stderr);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [31 x i8] c"Usage: fillerup [-q] filename\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [31 x i8] c"Usage: fillerup [-q] filename\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int strlen(char const *);
void assignConfigChar(char *target, const char *source, const char *filter) {
  int sizeFilter = strlen(filter);
  *target = source[sizeFilter];
}


x86 assembly (clang, -O0):
<assignConfigChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assignConfigChar>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rdx,%rdi
call   1030 <strlen@plt>
cltq
mov    (%rbx,%rax,1),%al
mov    %al,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @assignConfigChar(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %7
%10 = load i8*, i8** %5
%11 = load i32, i32* %7
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = load i8*, i8** %4
store i8 %14, i8* %15
ret void
}

LLVM IR (-O2):
define void @assignConfigChar(i8* nocapture writeonly %0, i8* nocapture %1, i8* %2) {
%4 = tail call i32 @strlen(i8* %2)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %1, i64 %5
%7 = load i8, i8* %6
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
scalar_t__ getmyline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
int main() {
  char line[1000];
  while (getmyline(line, 1000) > 0) {
    reverse(line);
    printf("%s\n", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <getmyline@plt>
cmp    $0x0,%rax
jle    1181 <main+0x51>
lea    -0x3f0(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1050 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <getmyline@plt>
test   %rax,%rax
jle    1185 <main+0x55>
mov    %rsp,%rbx
lea    0xeaa(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <getmyline@plt>
test   %rax,%rax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = call i64 @getmyline(i8* %4, i32 1000)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%9 = call i32 @reverse(i8* %8)
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i64 @getmyline(i8* %2, i32 1000)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = call i32 @reverse(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = call i64 @getmyline(i8* %2, i32 1000)
%9 = icmp sgt i64 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
int tick_check_broadcast_device(struct clock_event_device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.clock_event_device = type opaque
define i32 @tick_check_broadcast_device(%struct.clock_event_device* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ zaphod32_hash_with_state(unsigned char *,
                                            unsigned char const *, int const);
int /*<<< orphan*/ zaphod32_seed_state(unsigned char const *, unsigned char *);
uint32_t zaphod32_hash(const unsigned char *seed_ch, const unsigned char *key,
                       const int key_len) {
  uint32_t state[3];
  zaphod32_seed_state(seed_ch, (unsigned char *)state);
  return zaphod32_hash_with_state((unsigned char *)state, key, key_len);
}


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

x86 assembly (clang, -O2):
<zaphod32_hash>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebp
mov    %rsi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rsi
call   1040 <zaphod32_seed_state@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <zaphod32_hash_with_state@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @zaphod32_hash(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [3 x i32]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 0
%10 = bitcast i32* %9 to i8*
%11 = call i32 @zaphod32_seed_state(i8* %8, i8* %10)
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 0
%13 = bitcast i32* %12 to i8*
%14 = load i8*, i8** %5
%15 = load i32, i32* %6
%16 = call i32 @zaphod32_hash_with_state(i8* %13, i8* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @zaphod32_hash(i8* %0, i8* %1, i32 %2) {
%4 = alloca [3 x i32]
%5 = bitcast [3 x i32]* %4 to i8*
%6 = call i32 @zaphod32_seed_state(i8* %0, i8* %5)
%7 = call i32 @zaphod32_hash_with_state(i8* %5, i8* %1, i32 %2)
ret i32 %7
}
void old_handler(int signo) {}


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

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

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

LLVM IR (-O2):
define void @old_handler(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *);
void exit(int num) { printk("Write exit()\n"); }


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

x86 assembly (clang, -O2):
<exit>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printk@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Write exit()\0A\00"
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printk(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"Write exit()\0A\00"
define void @exit(i32 %0) {
%2 = tail call i32 @printk(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int main() {
  bar();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("wabbit\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"wabbit\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned int time_diff(int ack_time_stamp, int pkt_time_stamp) {
  return ack_time_stamp - pkt_time_stamp;
}


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

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

LLVM IR (-O0):
define i32 @time_diff(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @time_diff(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
unsigned long rev(unsigned long v) {
  unsigned long s = 8 * sizeof(v);
  unsigned long mask = ~0;
  while ((s >>= 1) > 0) {
    mask ^= (mask << s);
    v = ((v >> s) & mask) | ((v << s) & ~mask);
  }
  return v;
}


x86 assembly (clang, -O0):
<rev>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x40,-0x10(%rbp)
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jbe    1175 <rev+0x75>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    %cl,%rax
xor    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    %cl,%rax
and    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
shl    %cl,%rdx
mov    %rdx,%rcx
mov    -0x18(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
and    %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1118 <rev+0x18>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev>:
bswap  %rdi
mov    %rdi,%rax
shr    $0x4,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
and    %rcx,%rdi
shl    $0x4,%rdi
or     %rax,%rdi
movabs $0x3333333333333333,%rax
33 33 33
mov    %rdi,%rcx
and    %rax,%rcx
shr    $0x2,%rdi
and    %rax,%rdi
lea    (%rdi,%rcx,4),%rax
movabs $0x5555555555555555,%rcx
55 55 55
mov    %rax,%rdx
and    %rcx,%rdx
shr    %rax
and    %rcx,%rax
lea    (%rax,%rdx,2),%rax
ret

LLVM IR (-O0):
define i64 @rev(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 64, i64* %3
store i64 -1, i64* %4
br label %5
5: ; preds = %9, %1
%6 = load i64, i64* %3
%7 = lshr i64 %6, 1
store i64 %7, i64* %3
%8 = icmp ugt i64 %7, 0
br i1 %8, label %9, label %27
9: ; preds = %5
%10 = load i64, i64* %4
%11 = load i64, i64* %3
%12 = shl i64 %10, %11
%13 = load i64, i64* %4
%14 = xor i64 %13, %12
store i64 %14, i64* %4
%15 = load i64, i64* %2
%16 = load i64, i64* %3
%17 = lshr i64 %15, %16
%18 = load i64, i64* %4
%19 = and i64 %17, %18
%20 = load i64, i64* %2
%21 = load i64, i64* %3
%22 = shl i64 %20, %21
%23 = load i64, i64* %4
%24 = xor i64 %23, -1
%25 = and i64 %22, %24
%26 = or i64 %19, %25
store i64 %26, i64* %2
br label %5
27: ; preds = %5
%28 = load i64, i64* %2
ret i64 %28
}

LLVM IR (-O2):
define i64 @rev(i64 %0) {
%2 = call i64 @llvm.bitreverse.i64(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ ArchitectureDetectionFunctionDefinitions(void *);
int /*<<< orphan*/ HardwareDetectionFunctionDefinitions(void *);
int /*<<< orphan*/ OSDetectionFunctionDefinitions(void *);
extern void PlatformDetectionFunctionDefinitions(void *theEnv) {
  ArchitectureDetectionFunctionDefinitions(theEnv);
  OSDetectionFunctionDefinitions(theEnv);
  HardwareDetectionFunctionDefinitions(theEnv);
}


x86 assembly (clang, -O0):
<PlatformDetectionFunctionDefinitions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ArchitectureDetectionFunctionDefinitions@plt>
mov    -0x8(%rbp),%rdi
call   1030 <OSDetectionFunctionDefinitions@plt>
mov    -0x8(%rbp),%rdi
call   1050 <HardwareDetectionFunctionDefinitions@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PlatformDetectionFunctionDefinitions>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ArchitectureDetectionFunctionDefinitions@plt>
mov    %rbx,%rdi
call   1030 <OSDetectionFunctionDefinitions@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <HardwareDetectionFunctionDefinitions@plt>

LLVM IR (-O0):
define void @PlatformDetectionFunctionDefinitions(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ArchitectureDetectionFunctionDefinitions(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @OSDetectionFunctionDefinitions(i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @HardwareDetectionFunctionDefinitions(i8* %7)
ret void
}

LLVM IR (-O2):
define void @PlatformDetectionFunctionDefinitions(i8* %0) {
%2 = tail call i32 @ArchitectureDetectionFunctionDefinitions(i8* %0)
%3 = tail call i32 @OSDetectionFunctionDefinitions(i8* %0)
%4 = tail call i32 @HardwareDetectionFunctionDefinitions(i8* %0)
ret void
}
void __hv_var_k_i(int *bOut, const int k) { *bOut = k; }


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

x86 assembly (clang, -O2):
<__hv_var_k_i>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @__hv_var_k_i(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
/* Variables and functions */
scalar_t__ strcpy(char *, char *);
int operatorAtmt(char *entryChar) {
  if ((*entryChar == '+') || (*entryChar == '=') ||
      (strcpy(entryChar, ":=") == 0)) {
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<operatorAtmt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     1156 <operatorAtmt+0x46>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     1156 <operatorAtmt+0x46>
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <strcpy@plt>
cmp    $0x0,%rax
jne    1162 <operatorAtmt+0x52>
movl   $0x0,-0x4(%rbp)
jmp    1169 <operatorAtmt+0x59>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<operatorAtmt>:
push   %rax
mov    (%rdi),%cl
xor    %eax,%eax
cmp    $0x2b,%cl
je     111f <operatorAtmt+0xf>
cmp    $0x3d,%cl
jne    1121 <operatorAtmt+0x11>
pop    %rcx
ret
lea    0xed8(%rip),%rsi
call   1030 <strcpy@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c":=\00"
define i32 @operatorAtmt(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 43
br i1 %7, label %17, label %8
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 61
br i1 %12, label %17, label %13
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = call i64 @strcpy(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13, %8, %1
store i32 0, i32* %2
br label %19
18: ; preds = %13
store i32 -1, i32* %2
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@.str = [3 x i8] c":=\00"
define i32 @operatorAtmt(i8* %0) {
%2 = load i8, i8* %0
switch i8 %2, label %3 [
i8 43, label %7
i8 61, label %7
]
3: ; preds = %1
%4 = tail call i64 @strcpy(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
%6 = sext i1 %5 to i32
br label %7
7: ; preds = %3, %1, %1
%8 = phi i32 [ 0, %1 ], [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
int f(int s, int c) {
  int a1, a2, a3, x1, x2, x3, x;
  a1 = 2 * s;
  x1 = a1 + c;
  a2 = 4 * s;
  x2 = c + a2;
  a3 = 6 * s;
  x3 = a3 + c;
  x = x1 + x2 + x3;
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
imul   $0x6,-0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    (%rsi,%rsi,2),%eax
lea    (%rdi,%rdi,2),%ecx
lea    (%rax,%rcx,4),%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%12 = load i32, i32* %3
%13 = mul nsw i32 2, %12
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = add nsw i32 %14, %15
store i32 %16, i32* %8
%17 = load i32, i32* %3
%18 = mul nsw i32 4, %17
store i32 %18, i32* %6
%19 = load i32, i32* %4
%20 = load i32, i32* %6
%21 = add nsw i32 %19, %20
store i32 %21, i32* %9
%22 = load i32, i32* %3
%23 = mul nsw i32 6, %22
store i32 %23, i32* %7
%24 = load i32, i32* %7
%25 = load i32, i32* %4
%26 = add nsw i32 %24, %25
store i32 %26, i32* %10
%27 = load i32, i32* %8
%28 = load i32, i32* %9
%29 = add nsw i32 %27, %28
%30 = load i32, i32* %10
%31 = add nsw i32 %29, %30
store i32 %31, i32* %11
%32 = load i32, i32* %11
ret i32 %32
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = mul i32 %1, 3
%4 = mul i32 %0, 12
%5 = add i32 %3, %4
ret i32 %5
}
int fib(int n) {
  if (n <= 1)
    return n;
  else
    return fib(n - 1) + fib(n - 2);
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1130 <fib+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fib+0x43>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@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):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jge    1120 <fib+0x10>
mov    %ebx,%ecx
jmp    1144 <fib+0x34>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1130 <fib+0x20>
add    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
unsigned long getlong(FILE *inf) {
  unsigned char buf[4];
  fread(buf, 4, 1, inf);
  return (buf[0] << 24) + (buf[1] << 16) + (buf[2] << 8) + (buf[3] << 0);
}


x86 assembly (clang, -O0):
<getlong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
movzbl -0xc(%rbp),%eax
shl    $0x18,%eax
movzbl -0xb(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
movzbl -0xa(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
movzbl -0x9(%rbp),%ecx
shl    $0x0,%ecx
add    %ecx,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getlong>:
push   %rax
mov    %rdi,%rcx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
movzbl 0x4(%rsp),%eax
shl    $0x18,%eax
movzbl 0x5(%rsp),%ecx
shl    $0x10,%rcx
cltq
or     %rcx,%rax
movzbl 0x6(%rsp),%ecx
shl    $0x8,%rcx
or     %rax,%rcx
movzbl 0x7(%rsp),%eax
or     %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @getlong(i32* %0) {
%2 = alloca i32*
%3 = alloca [4 x i8]
store i32* %0, i32** %2
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = load i32*, i32** %2
%6 = call i32 @fread(i8* %4, i32 4, i32 1, i32* %5)
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 24
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 16
%15 = add nsw i32 %10, %14
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 2
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = add nsw i32 %15, %19
%21 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = shl i32 %23, 0
%25 = add nsw i32 %20, %24
%26 = sext i32 %25 to i64
ret i64 %26
}

LLVM IR (-O2):
define i64 @getlong(i32* nocapture %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @fread(i8* %3, i32 4, i32 1, i32* %0)
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = shl nuw i32 %6, 24
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl nuw nsw i32 %10, 16
%12 = or i32 %11, %7
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = shl nuw nsw i32 %15, 8
%17 = or i32 %12, %16
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = or i32 %17, %20
%22 = sext i32 %21 to i64
ret i64 %22
}
void skip_white_space(const char **str) {
  while (**str == ' ' || **str == '\t')
    (*str)++;
}


x86 assembly (clang, -O0):
<skip_white_space>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     1133 <skip_white_space+0x33>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1143 <skip_white_space+0x43>
jmp    1156 <skip_white_space+0x56>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1108 <skip_white_space+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_white_space>:
mov    (%rdi),%rax
jmp    1113 <skip_white_space+0x13>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,(%rdi)
add    $0x1,%rax
movzbl -0x1(%rax),%ecx
cmp    $0x20,%cl
je     1110 <skip_white_space+0x10>
cmp    $0x9,%cl
je     1110 <skip_white_space+0x10>
ret

LLVM IR (-O0):
define void @skip_white_space(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
br label %3
3: ; preds = %17, %1
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 32
br i1 %8, label %15, label %9
9: ; preds = %3
%10 = load i8**, i8*** %2
%11 = load i8*, i8** %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 9
br label %15
15: ; preds = %9, %3
%16 = phi i1 [ true, %3 ], [ %14, %9 ]
br i1 %16, label %17, label %21
17: ; preds = %15
%18 = load i8**, i8*** %2
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %18
br label %3
21: ; preds = %15
ret void
}

LLVM IR (-O2):
define void @skip_white_space(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %6, %1
%4 = phi i8* [ %7, %6 ], [ %2, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 32, label %6
i8 9, label %6
]
6: ; preds = %3, %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %7, i8** %0
br label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr, "usage: %s <min temp> <max temp> <inc temp> <pe file>\n",
          progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [54 x i8] c"usage: %s <min temp> <max temp> <inc temp> <pe file>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [54 x i8] c"usage: %s <min temp> <max temp> <inc temp> <pe file>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int il_square(int value, int index) { return value * value; }


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

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

LLVM IR (-O0):
define i32 @il_square(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 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @il_square(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, %0
ret i32 %3
}
/* Variables and functions */
int fib(int);
int main(int argc, char **argv) { return fib(10); }


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    $0xa,%edi
call   1030 <fib@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xa,%edi
jmp    1030 <fib@plt>

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 @fib(i32 10)
ret i32 %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @fib(i32 10)
ret i32 %3
}
int space_contr(int ie, int star_ctr) {
  int i2;
  i2 = -1;
  while (++i2 != star_ctr)
    ie += 1;
  return (ie);
}


x86 assembly (clang, -O0):
<space_contr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmp    -0x8(%rbp),%eax
je     1131 <space_contr+0x31>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1111 <space_contr+0x11>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<space_contr>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @space_contr(i32 %0, i32 %1) {
%3 = add i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argvc) { printf("Hello World\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void MMU_InvalidateTlbInstructionEntry(void) {}


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

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

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

LLVM IR (-O2):
define void @MMU_InvalidateTlbInstructionEntry() {
ret void
}
int ft_isdigit(int c) {
  if ('0' <= c && c <= '9')
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    $0x30,%eax
cmp    -0x8(%rbp),%eax
jg     112b <ft_isdigit+0x2b>
cmpl   $0x39,-0x8(%rbp)
jg     112b <ft_isdigit+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1132 <ft_isdigit+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 48, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %11
10: ; preds = %6, %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @ft_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
double RAND_MAX;
double rand();
double rand_uniform(double a, double b) {
  return a + (b - a) * rand() / (RAND_MAX + 1.0);
}


x86 assembly (clang, -O0):
<rand_uniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm2,%xmm1
movsd  0xea5(%rip),%xmm2
mov    0x2e86(%rip),%rax
addsd  (%rax),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_uniform>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
mulsd  0x8(%rsp),%xmm0
mov    0x2eb0(%rip),%rax
movsd  (%rax),%xmm1
addsd  0xebc(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @rand_uniform(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fsub double %6, %7
%9 = call double (...) @rand()
%10 = fmul double %8, %9
%11 = load double, double* @RAND_MAX
%12 = fadd double %11, 1.000000e+00
%13 = fdiv double %10, %12
%14 = fadd double %5, %13
ret double %14
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @rand_uniform(double %0, double %1) {
%3 = fsub double %1, %0
%4 = tail call double (...) @rand()
%5 = fmul double %3, %4
%6 = load double, double* @RAND_MAX
%7 = fadd double %6, 1.000000e+00
%8 = fdiv double %5, %7
%9 = fadd double %8, %0
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_mutex_lock(int /*<<< orphan*/ *);
void pthread_lock_mutex(const pthread_mutex_t *mutex) {
  pthread_mutex_lock((pthread_mutex_t *)mutex);
}


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

x86 assembly (clang, -O2):
<pthread_lock_mutex>:
jmp    1030 <pthread_mutex_lock@plt>

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

LLVM IR (-O2):
define void @pthread_lock_mutex(i32* %0) {
%2 = tail call i32 @pthread_mutex_lock(i32* %0)
ret void
}
/* Type definitions */
struct tms {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ times(struct tms *);
void SeedRand(int Seed) {
  struct tms TimesBuffer;
  if (Seed) {
    srand(times(&TimesBuffer));
  }
}


x86 assembly (clang, -O0):
<SeedRand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1145 <SeedRand+0x25>
lea    -0x8(%rbp),%rdi
call   1040 <times@plt>
mov    %eax,%edi
call   1030 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SeedRand>:
test   %edi,%edi
je     1135 <SeedRand+0x15>
push   %rax
mov    %rsp,%rdi
call   1040 <times@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srand@plt>
ret

LLVM IR (-O0):
%struct.tms = type { i32 }
define void @SeedRand(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.tms
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @times(%struct.tms* %3)
%8 = call i32 @srand(i32 %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct.tms = type { i32 }
define void @SeedRand(i32 %0) {
%2 = alloca %struct.tms
%3 = bitcast %struct.tms* %2 to i8*
%4 = icmp eq i32 %0, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = call i32 @times(%struct.tms* %2)
%7 = tail call i32 @srand(i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}
void test45_Q_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test45_Q_targetInit__I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void usage(const char *prgm) {
  fprintf(stderr,
          "[%s] usage:\n\t"
          "%s inumber\n",
          prgm, prgm);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rcx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    %rcx,%rdx
call   1030 <fprintf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"[%s] usage:\0A\09%s inumber\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"[%s] usage:\0A\09%s inumber\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
int ft_isspace(char c) {
  if (c == ' ' || c == '\n' || c == '\t' || c == '\v' || c == '\f' ||
      c == '\r') {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<ft_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1158 <ft_isspace+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1158 <ft_isspace+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     1158 <ft_isspace+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0xb,%eax
je     1158 <ft_isspace+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0xc,%eax
je     1158 <ft_isspace+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0xd,%eax
jne    1164 <ft_isspace+0x64>
movl   $0x1,-0x4(%rbp)
jmp    116b <ft_isspace+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isspace>:
mov    $0x1,%eax
lea    -0x9(%rdi),%ecx
cmp    $0x5,%cl
jae    110e <ft_isspace+0xe>
ret
cmp    $0x20,%dil
je     110d <ft_isspace+0xd>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_isspace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 13, label %3
i8 12, label %3
i8 11, label %3
i8 10, label %3
i8 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
void *ft_memset(void *b, int c, size_t len) {
  while (len-- > 0)
    *((unsigned char *)b + len) = (unsigned char)c;
  return (b);
}


x86 assembly (clang, -O0):
<ft_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
jbe    113d <ft_memset+0x3d>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    110f <ft_memset+0xf>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memset>:
push   %rbx
mov    %rdi,%rbx
test   %rdx,%rdx
je     1121 <ft_memset+0x11>
mov    %rbx,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ft_memset(i8* returned writeonly %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %3
ret i8* %0
}
/* Type definitions */
struct dpx_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dpx_load(struct dpx_t *, char const *);
int /*<<< orphan*/ dpx_read(struct dpx_t *);
int /*<<< orphan*/ dpx_write(struct dpx_t *);
void dpx_ping(struct dpx_t *dpx, const char *msg) {
  dpx_load(dpx, msg);
  dpx_write(dpx);
  dpx_read(dpx);
}


x86 assembly (clang, -O0):
<dpx_ping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <dpx_load@plt>
mov    -0x8(%rbp),%rdi
call   1050 <dpx_write@plt>
mov    -0x8(%rbp),%rdi
call   1040 <dpx_read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dpx_ping>:
push   %rbx
mov    %rdi,%rbx
call   1030 <dpx_load@plt>
mov    %rbx,%rdi
call   1050 <dpx_write@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <dpx_read@plt>

LLVM IR (-O0):
%struct.dpx_t = type { i32 }
define void @dpx_ping(%struct.dpx_t* %0, i8* %1) {
%3 = alloca %struct.dpx_t*
%4 = alloca i8*
store %struct.dpx_t* %0, %struct.dpx_t** %3
store i8* %1, i8** %4
%5 = load %struct.dpx_t*, %struct.dpx_t** %3
%6 = load i8*, i8** %4
%7 = call i32 @dpx_load(%struct.dpx_t* %5, i8* %6)
%8 = load %struct.dpx_t*, %struct.dpx_t** %3
%9 = call i32 @dpx_write(%struct.dpx_t* %8)
%10 = load %struct.dpx_t*, %struct.dpx_t** %3
%11 = call i32 @dpx_read(%struct.dpx_t* %10)
ret void
}

LLVM IR (-O2):
%struct.dpx_t = type { i32 }
define void @dpx_ping(%struct.dpx_t* %0, i8* %1) {
%3 = tail call i32 @dpx_load(%struct.dpx_t* %0, i8* %1)
%4 = tail call i32 @dpx_write(%struct.dpx_t* %0)
%5 = tail call i32 @dpx_read(%struct.dpx_t* %0)
ret void
}
int fun477() { return 477; }


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

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

LLVM IR (-O0):
define i32 @fun477() {
ret i32 477
}

LLVM IR (-O2):
define i32 @fun477() {
ret i32 477
}