xunge/DecIR huggingface dataset:
/* Variables and functions */
void glmLessThanEqual3fs(bool out[3], const float x[3], float y) {
  for (size_t i = 0; i < 3; ++i)
    out[i] = x[i] <= y;
}


x86 assembly (clang, -O0):
<glmLessThanEqual3fs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x3,-0x20(%rbp)
jae    115d <glmLessThanEqual3fs+0x5d>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%edx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1119 <glmLessThanEqual3fs+0x19>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmLessThanEqual3fs>:
xor    %eax,%eax
ucomiss (%rsi),%xmm0
setae  %al
mov    %eax,(%rdi)
xor    %eax,%eax
ucomiss 0x4(%rsi),%xmm0
setae  %al
mov    %eax,0x4(%rdi)
xor    %eax,%eax
ucomiss 0x8(%rsi),%xmm0
setae  %al
mov    %eax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @glmLessThanEqual3fs(i32* %0, float* %1, float %2) {
%4 = alloca i32*
%5 = alloca float*
%6 = alloca float
%7 = alloca i64
store i32* %0, i32** %4
store float* %1, float** %5
store float %2, float* %6
store i64 0, i64* %7
br label %8
8: ; preds = %22, %3
%9 = load i64, i64* %7
%10 = icmp ult i64 %9, 3
br i1 %10, label %11, label %25
11: ; preds = %8
%12 = load float*, float** %5
%13 = load i64, i64* %7
%14 = getelementptr inbounds float, float* %12, i64 %13
%15 = load float, float* %14
%16 = load float, float* %6
%17 = fcmp ole float %15, %16
%18 = zext i1 %17 to i32
%19 = load i32*, i32** %4
%20 = load i64, i64* %7
%21 = getelementptr inbounds i32, i32* %19, i64 %20
store i32 %18, i32* %21
br label %22
22: ; preds = %11
%23 = load i64, i64* %7
%24 = add i64 %23, 1
store i64 %24, i64* %7
br label %8
25: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @glmLessThanEqual3fs(i32* nocapture writeonly %0, float* nocapture %1, float %2) {
%4 = load float, float* %1
%5 = fcmp ole float %4, %2
%6 = zext i1 %5 to i32
store i32 %6, i32* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fcmp ole float %8, %2
%10 = zext i1 %9 to i32
%11 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %10, i32* %11
%12 = getelementptr inbounds float, float* %1, i64 2
%13 = load float, float* %12
%14 = fcmp ole float %13, %2
%15 = zext i1 %14 to i32
%16 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %15, i32* %16
ret void
}
int ptr_compare(const void *a, const void *b) {
  if (a < b) {
    return -1;
  }
  if (a > b) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<ptr_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1126 <ptr_compare+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    1147 <ptr_compare+0x47>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1140 <ptr_compare+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1147 <ptr_compare+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr_compare>:
xor    %ecx,%ecx
cmp    %rsi,%rdi
seta   %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ptr_compare(i8* readnone %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
%4 = icmp ugt i8* %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
/* Type definitions */
struct forf_env {
  int dummy;
};

/* Variables and functions */
long forf_pop_num(struct forf_env *);
int /*<<< orphan*/ forf_push_num(struct forf_env *, long);
void forf_proc_mul(struct forf_env *env) {
  long a = forf_pop_num(env);
  long b = forf_pop_num(env);
  forf_push_num(env, b * a);
}


x86 assembly (clang, -O0):
<forf_proc_mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <forf_pop_num@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <forf_pop_num@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
imul   -0x10(%rbp),%rsi
call   1040 <forf_push_num@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forf_proc_mul>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <forf_pop_num@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <forf_pop_num@plt>
imul   %rax,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <forf_push_num@plt>

LLVM IR (-O0):
%struct.forf_env = type { i32 }
define void @forf_proc_mul(%struct.forf_env* %0) {
%2 = alloca %struct.forf_env*
%3 = alloca i64
%4 = alloca i64
store %struct.forf_env* %0, %struct.forf_env** %2
%5 = load %struct.forf_env*, %struct.forf_env** %2
%6 = call i64 @forf_pop_num(%struct.forf_env* %5)
store i64 %6, i64* %3
%7 = load %struct.forf_env*, %struct.forf_env** %2
%8 = call i64 @forf_pop_num(%struct.forf_env* %7)
store i64 %8, i64* %4
%9 = load %struct.forf_env*, %struct.forf_env** %2
%10 = load i64, i64* %4
%11 = load i64, i64* %3
%12 = mul nsw i64 %10, %11
%13 = call i32 @forf_push_num(%struct.forf_env* %9, i64 %12)
ret void
}

LLVM IR (-O2):
%struct.forf_env = type { i32 }
define void @forf_proc_mul(%struct.forf_env* %0) {
%2 = tail call i64 @forf_pop_num(%struct.forf_env* %0)
%3 = tail call i64 @forf_pop_num(%struct.forf_env* %0)
%4 = mul nsw i64 %3, %2
%5 = tail call i32 @forf_push_num(%struct.forf_env* %0, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int funcReturnValue() {
  printf("This is a function that returns\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"This is a function that returns\0A\00"
define i32 @funcReturnValue() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [32 x i8] c"This is a function that returns\00"
define i32 @funcReturnValue() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ MD5_CTX;

/* Variables and functions */
int /*<<< orphan*/ MD5_Init(int /*<<< orphan*/ *);
void ssl_md5_clear(void *md5_info) { MD5_Init((MD5_CTX *)md5_info); }


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

x86 assembly (clang, -O2):
<ssl_md5_clear>:
jmp    1030 <MD5_Init@plt>

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

LLVM IR (-O2):
define void @ssl_md5_clear(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @MD5_Init(i32* %2)
ret void
}
int ad7887_scan_from_ring(struct ad7887_state *st, int channum) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ad7887_state = type opaque
define i32 @ad7887_scan_from_ring(%struct.ad7887_state* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ update();
int /*<<< orphan*/ verify_updates();
int main(void) {
  while (1) {
    update();
    verify_updates();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <update@plt>
mov    $0x0,%al
call   1040 <verify_updates@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <update@plt>
xor    %eax,%eax
call   1040 <verify_updates@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @update()
%4 = call i32 (...) @verify_updates()
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @update()
%3 = tail call i32 (...) @verify_updates()
br label %1
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ computeFibonacci(int /*<<< orphan*/);
int /*<<< orphan*/ getInt();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  printf("%lld", computeFibonacci(getInt()));
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getInt@plt>
mov    %eax,%edi
call   1040 <computeFibonacci@plt>
mov    %eax,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <getInt@plt>
mov    %eax,%edi
call   1040 <computeFibonacci@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getInt()
%3 = call i32 @computeFibonacci(i32 %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getInt()
%2 = tail call i32 @computeFibonacci(i32 %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
void INI_CfgDepBase_set_ctx() {}


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

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

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

LLVM IR (-O2):
define void @INI_CfgDepBase_set_ctx() {
ret void
}
/* Variables and functions */
char *normalize_path(char const *);
char *libio_realpath_chk(const char *buf, char *resolved, size_t resolvedlen) {
  resolved = normalize_path(buf);
  if (resolved)
    return resolved;
  return NULL;
}


x86 assembly (clang, -O0):
<libio_realpath_chk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <normalize_path@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1149 <libio_realpath_chk+0x39>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1151 <libio_realpath_chk+0x41>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libio_realpath_chk>:
jmp    1030 <normalize_path@plt>

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

LLVM IR (-O2):
define i8* @libio_realpath_chk(i8* %0, i8* nocapture readnone %1, i64 %2) {
%4 = tail call i8* @normalize_path(i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void check_stack_top(int top) {
  if (top < 0) {
    printf("ERROR: stack underflow\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<check_stack_top>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    114b <check_stack_top+0x2b>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_stack_top>:
test   %edi,%edi
js     1125 <check_stack_top+0x5>
ret
push   %rax
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"ERROR: stack underflow\0A\00"
define void @check_stack_top(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"ERROR: stack underflow\00"
define void @check_stack_top(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
scalar_t__ localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *datestring(void) {
  static char timebuf[32];
  time_t now;
  now = time(NULL);
  strftime(timebuf, 31, "%d/%m/%y %H:%M:%S", (struct tm *)localtime(&now));
  return timebuf;
}


x86 assembly (clang, -O0):
<datestring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,%rcx
lea    0x2ef9(%rip),%rdi
mov    $0x1f,%esi
lea    0xe9d(%rip),%rdx
call   1050 <strftime@plt>
lea    0x2ee1(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<datestring>:
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
lea    0x2eff(%rip),%rbx
lea    0xea8(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1f,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@datestring.timebuf = internal global [32 x i8] zeroinitializer
@.str = [18 x i8] c"%d/%m/%y %H:%M:%S\00"
define i8* @datestring() {
%1 = alloca i32
%2 = call i32 @time(i32* null)
store i32 %2, i32* %1
%3 = call i64 @localtime(i32* %1)
%4 = inttoptr i64 %3 to %struct.tm*
%5 = call i32 @strftime(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @datestring.timebuf, i64 0, i64 0), i32 31, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @datestring.timebuf, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@datestring.timebuf = internal global [32 x i8] zeroinitializer
@.str = [18 x i8] c"%d/%m/%y %H:%M:%S\00"
define i8* @datestring() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call i64 @localtime(i32* %1)
%5 = inttoptr i64 %4 to %struct.tm*
%6 = call i32 @strftime(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @datestring.timebuf, i64 0, i64 0), i32 31, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @datestring.timebuf, i64 0, i64 0)
}
void euxcNoSockets() {}


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

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

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

LLVM IR (-O2):
define void @euxcNoSockets() {
ret void
}
void PWM_EM_IRQHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @PWM_EM_IRQHandler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ readstab(char *);
int /*<<< orphan*/ usage(char *);
int main(int argc, char *argv[]) {
  if (argc != 2)
    usage(argv[0]);
  readstab(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     114c <main+0x2c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <readstab@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
je     1131 <main+0x11>
mov    (%rbx),%rdi
call   1030 <usage@plt>
mov    0x8(%rbx),%rdi
call   1040 <readstab@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @usage(i8* %5)
br label %7
7: ; preds = %4, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @readstab(i8* %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ generateSequences(int);
int /*<<< orphan*/ getchar();
int main() {
  generateSequences(3);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <generateSequences@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1030 <generateSequences@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @generateSequences(i32 3)
%2 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @generateSequences(i32 3)
%2 = tail call i32 (...) @getchar()
ret i32 0
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
int16_t eq_int16_t(int16_t a, int16_t b) { return a == b; }


x86 assembly (clang, -O0):
<eq_int16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq_int16_t>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @eq_int16_t(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 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @eq_int16_t(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int os_set_tos(int fd, int tos) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @os_set_tos(i32 %0, i32 %1) {
ret i32 1
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
void reverse(int n) {
  char c;
  if (1 == n) {
    c = getchar();
    printf("\n");
    putchar(c);
  } else {
    c = getchar();
    reverse(n - 1);
    putchar(c);
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%eax
cmp    -0x4(%rbp),%eax
jne    117d <reverse+0x3d>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %al,-0x5(%rbp)
lea    0xe96(%rip),%rdi
call   1050 <printf@plt>
movsbl -0x5(%rbp),%edi
call   1040 <putchar@plt>
jmp    119b <reverse+0x5b>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <reverse@plt>
movsbl -0x5(%rbp),%edi
call   1040 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
cmp    $0x1,%ebp
jne    114f <reverse+0x1f>
mov    $0xa,%edi
call   1040 <putchar@plt>
jmp    1159 <reverse+0x29>
add    $0xffffffff,%ebp
mov    %ebp,%edi
call   1030 <reverse@plt>
movsbl %bl,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @reverse(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 1, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = call signext i8 (...) @getchar()
store i8 %7, i8* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = load i8, i8* %3
%10 = call i32 @putchar(i8 signext %9)
br label %17
11: ; preds = %1
%12 = call signext i8 (...) @getchar()
store i8 %12, i8* %3
%13 = load i32, i32* %2
%14 = sub nsw i32 %13, 1
%15 = load i8, i8* %3
%16 = call i32 @putchar(i8 signext %15)
br label %17
17: ; preds = %11, %6
ret void
}

LLVM IR (-O2):
define void @reverse(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = tail call signext i8 (...) @getchar()
br i1 %2, label %4, label %8
4: ; preds = %1
%5 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
br label %6
6: ; preds = %4, %8
%7 = tail call i32 @putchar(i8 signext %3)
ret void
8: ; preds = %1
%9 = add nsw i32 %0, -1
tail call void @reverse(i32 %9)
br label %6
}
double days2secs(double d) { return d * 86400.; }


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

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

LLVM IR (-O0):
define double @days2secs(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 8.640000e+04
ret double %4
}

LLVM IR (-O2):
define double @days2secs(double %0) {
%2 = fmul double %0, 8.640000e+04
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
void signal(pid_t pid) { pid++; }


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

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

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

LLVM IR (-O2):
define void @signal(i32 %0) {
ret void
}
/* Variables and functions */
double exp(double);
double func(double x) {
  const double delta = (double)256 / 7.0;
  double d;
  if (x < -256) {
    x = -256;
  } else if (x > 256) {
    x = 256;
  }
  d = 1.0 / (1.0 + exp(-x / delta));
  return d;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xece(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    114f <func+0x3f>
movsd  0xebb(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1178 <func+0x68>
movsd  -0x8(%rbp),%xmm0
movsd  0xeb4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1173 <func+0x63>
movsd  0xea2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1178 <func+0x68>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe6c(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xe6b(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xe5f(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
push   %rax
movapd %xmm0,%xmm1
movsd  0xee3(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     1139 <func+0x29>
ucomisd 0xedd(%rip),%xmm1
movapd %xmm1,%xmm0
jbe    1139 <func+0x29>
movsd  0xecf(%rip),%xmm0
divsd  0xecf(%rip),%xmm0
call   1030 <exp@plt>
movsd  0xeca(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @func(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 0x4042492492492492, double* %3
%5 = load double, double* %2
%6 = fcmp olt double %5, -2.560000e+02
br i1 %6, label %7, label %8
7: ; preds = %1
store double -2.560000e+02, double* %2
br label %13
8: ; preds = %1
%9 = load double, double* %2
%10 = fcmp ogt double %9, 2.560000e+02
br i1 %10, label %11, label %12
11: ; preds = %8
store double 2.560000e+02, double* %2
br label %12
12: ; preds = %11, %8
br label %13
13: ; preds = %12, %7
%14 = load double, double* %2
%15 = fneg double %14
%16 = fdiv double %15, 0x4042492492492492
%17 = call double @exp(double %16)
%18 = fadd double 1.000000e+00, %17
%19 = fdiv double 1.000000e+00, %18
store double %19, double* %4
%20 = load double, double* %4
ret double %20
}

LLVM IR (-O2):
define double @func(double %0) {
%2 = fcmp olt double %0, -2.560000e+02
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = fcmp ogt double %0, 2.560000e+02
br i1 %4, label %5, label %6
5: ; preds = %3
br label %6
6: ; preds = %1, %3, %5
%7 = phi double [ 2.560000e+02, %5 ], [ %0, %3 ], [ -2.560000e+02, %1 ]
%8 = fdiv double %7, 0xC042492492492492
%9 = tail call double @exp(double %8)
%10 = fadd double %9, 1.000000e+00
%11 = fdiv double 1.000000e+00, %10
ret double %11
}
/* Type definitions */
struct city {
  int dummy;
};
struct ai_city {
  int dummy;
};

/* Variables and functions */
scalar_t__ city_ai_data(struct city const *, int /*<<< orphan*/);
int /*<<< orphan*/ default_ai_get_self();
struct ai_city *def_ai_city_data(const struct city *pcity) {
  return (struct ai_city *)city_ai_data(pcity, default_ai_get_self());
}


x86 assembly (clang, -O0):
<def_ai_city_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <default_ai_get_self@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <city_ai_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_ai_city_data>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <default_ai_get_self@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <city_ai_data@plt>

LLVM IR (-O0):
%struct.ai_city = type { i32 }
%struct.city = type { i32 }
define %struct.ai_city* @def_ai_city_data(%struct.city* %0) {
%2 = alloca %struct.city*
store %struct.city* %0, %struct.city** %2
%3 = load %struct.city*, %struct.city** %2
%4 = call i32 (...) @default_ai_get_self()
%5 = call i64 @city_ai_data(%struct.city* %3, i32 %4)
%6 = inttoptr i64 %5 to %struct.ai_city*
ret %struct.ai_city* %6
}

LLVM IR (-O2):
%struct.ai_city = type { i32 }
%struct.city = type { i32 }
define %struct.ai_city* @def_ai_city_data(%struct.city* %0) {
%2 = tail call i32 (...) @default_ai_get_self()
%3 = tail call i64 @city_ai_data(%struct.city* %0, i32 %2)
%4 = inttoptr i64 %3 to %struct.ai_city*
ret %struct.ai_city* %4
}
/* Variables and functions */
int pthread_kill(int /*<<< orphan*/, int);
int /*<<< orphan*/ pthread_self();
int raise(int sig) { return (pthread_kill(pthread_self(), sig)); }


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

x86 assembly (clang, -O2):
<raise>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <pthread_self@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <pthread_kill@plt>

LLVM IR (-O0):
define i32 @raise(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @pthread_self()
%4 = load i32, i32* %2
%5 = call i32 @pthread_kill(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @raise(i32 %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @pthread_kill(i32 %2, i32 %0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned char getc(int /*<<< orphan*/ *);
int read_long(FILE *fp) {
  unsigned char b0, b1, b2, b3;
  b0 = getc(fp);
  b1 = getc(fp);
  b2 = getc(fp);
  b3 = getc(fp);
  return ((int)(((((b3 << 8) | b2) << 8) | b1) << 8) | b0);
}


x86 assembly (clang, -O0):
<read_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
shl    $0x8,%eax
movzbl -0xb(%rbp),%ecx
or     %ecx,%eax
shl    $0x8,%eax
movzbl -0xa(%rbp),%ecx
or     %ecx,%eax
shl    $0x8,%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_long>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <getc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <getc@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1030 <getc@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
call   1030 <getc@plt>
movzbl %al,%eax
movzbl %r15b,%ecx
shl    $0x10,%eax
shl    $0x8,%ecx
or     %eax,%ecx
movzbl %r14b,%edx
or     %ecx,%edx
shl    $0x8,%edx
movzbl %bpl,%eax
or     %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read_long(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i32* %0, i32** %2
%7 = load i32*, i32** %2
%8 = call zeroext i8 @getc(i32* %7)
store i8 %8, i8* %3
%9 = load i32*, i32** %2
%10 = call zeroext i8 @getc(i32* %9)
store i8 %10, i8* %4
%11 = load i32*, i32** %2
%12 = call zeroext i8 @getc(i32* %11)
store i8 %12, i8* %5
%13 = load i32*, i32** %2
%14 = call zeroext i8 @getc(i32* %13)
store i8 %14, i8* %6
%15 = load i8, i8* %6
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 8
%18 = load i8, i8* %5
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = shl i32 %20, 8
%22 = load i8, i8* %4
%23 = zext i8 %22 to i32
%24 = or i32 %21, %23
%25 = shl i32 %24, 8
%26 = load i8, i8* %3
%27 = zext i8 %26 to i32
%28 = or i32 %25, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @read_long(i32* nocapture %0) {
%2 = tail call zeroext i8 @getc(i32* %0)
%3 = tail call zeroext i8 @getc(i32* %0)
%4 = tail call zeroext i8 @getc(i32* %0)
%5 = tail call zeroext i8 @getc(i32* %0)
%6 = zext i8 %5 to i32
%7 = zext i8 %4 to i32
%8 = shl nuw nsw i32 %6, 16
%9 = shl nuw nsw i32 %7, 8
%10 = or i32 %8, %9
%11 = zext i8 %3 to i32
%12 = or i32 %10, %11
%13 = shl nuw i32 %12, 8
%14 = zext i8 %2 to i32
%15 = or i32 %13, %14
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ MON_11;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_mon_11() { return nl_langinfo(MON_11); }


x86 assembly (clang, -O0):
<langinfo_mon_11>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@MON_11 = global i32 0
define i8* @langinfo_mon_11() {
%1 = load i32, i32* @MON_11
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@MON_11 = global i32 0
define i8* @langinfo_mon_11() {
%1 = load i32, i32* @MON_11
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ dump(int *);
int /*<<< orphan*/ reorder_list(int *);
int main(int argc, char **argv) {
  int unsorted[10 + 1] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1};
  dump(unsorted);
  reorder_list(unsorted);
  dump(unsorted);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x2c,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rdi
call   1030 <dump@plt>
lea    -0x40(%rbp),%rdi
call   1050 <reorder_list@plt>
lea    -0x40(%rbp),%rdi
call   1030 <dump@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
movups 0xef0(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <dump@plt>
mov    %rbx,%rdi
call   1040 <reorder_list@plt>
mov    %rbx,%rdi
call   1030 <dump@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.unsorted = [11 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 -1]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [11 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [11 x i32]* %6 to i8*
%8 = getelementptr inbounds [11 x i32], [11 x i32]* %6, i64 0, i64 0
%9 = call i32 @dump(i32* %8)
%10 = getelementptr inbounds [11 x i32], [11 x i32]* %6, i64 0, i64 0
%11 = call i32 @reorder_list(i32* %10)
%12 = getelementptr inbounds [11 x i32], [11 x i32]* %6, i64 0, i64 0
%13 = call i32 @dump(i32* %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.unsorted = [11 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 -1]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [11 x i32]
%4 = bitcast [11 x i32]* %3 to i8*
%5 = getelementptr inbounds [11 x i32], [11 x i32]* %3, i64 0, i64 0
%6 = call i32 @dump(i32* %5)
%7 = call i32 @reorder_list(i32* %5)
%8 = call i32 @dump(i32* %5)
ret i32 0
}
/* Variables and functions */
double FLA_Clock_helper();
double FLA_Clock(void) { return FLA_Clock_helper(); }


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

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

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

LLVM IR (-O2):
define double @FLA_Clock() {
%1 = tail call double (...) @FLA_Clock_helper()
ret double %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *prog) {
  printf("%s -m <IP>\n", prog);
  return;
}


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"%s -m <IP>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
double pow(double, double);
double root(double x, double y) { return pow(y, 1.0 / x); }


x86 assembly (clang, -O0):
<root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
divsd  -0x8(%rbp),%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<root>:
movaps %xmm1,%xmm2
movsd  0xee5(%rip),%xmm1
divsd  %xmm0,%xmm1
movaps %xmm2,%xmm0
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @root(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = fdiv double 1.000000e+00, %6
%8 = call double @pow(double %5, double %7)
ret double %8
}

LLVM IR (-O2):
define double @root(double %0, double %1) {
%3 = fdiv double 1.000000e+00, %0
%4 = tail call double @pow(double %1, double %3)
ret double %4
}
void RTIsoFsClose(void) {}


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

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

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

LLVM IR (-O2):
define void @RTIsoFsClose() {
ret void
}
int execl(const char *path, const char *arg0, ...) {
  anvil_syslog(0, "%s unimplemented\n", __FUNCTION__);
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<execl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
lea    0xed7(%rip),%rsi
lea    0xee2(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
jmp    1137 <execl+0x27>

x86 assembly (clang, -O2):
<execl>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef3(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <anvil_syslog@plt>
nopl   0x0(%rax,%rax,1)
jmp    1130 <execl+0x20>

LLVM IR (-O0):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.execl = [6 x i8] c"execl\00"
define i32 @execl(i8* %0, i8* %1, ...) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.execl, i64 0, i64 0))
br label %6
6: ; preds = %2, %6
br label %6
}

LLVM IR (-O2):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.execl = [6 x i8] c"execl\00"
define i32 @execl(i8* nocapture readnone %0, i8* nocapture readnone %1, ...) {
%3 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.execl, i64 0, i64 0))
br label %4
4: ; preds = %2, %4
br label %4
}
int max(int s, int t) {
  if (s > t) {
    return s;
  } else {
    return t;
  }
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <max+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <max+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @max(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* %4
%7 = load i32, i32* %5
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void err_sys(const char *str) {
  perror(str);
  exit(1);
}


x86 assembly (clang, -O0):
<err_sys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err_sys>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @err_sys(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @err_sys(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ read_faces(int /*<<< orphan*/ *);
int /*<<< orphan*/ read_header(int /*<<< orphan*/ *);
int /*<<< orphan*/ read_vertices(int /*<<< orphan*/ *);
int /*<<< orphan*/ *safe_fopen(char const *, char *);
void read_rst(const char *fn) {
  FILE *fd;
  fd = safe_fopen(fn, "r");
  read_header(fd);
  read_vertices(fd);
  read_faces(fd);
  fclose(fd);
}


x86 assembly (clang, -O0):
<read_rst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1070 <safe_fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <read_header@plt>
mov    -0x10(%rbp),%rdi
call   1050 <read_vertices@plt>
mov    -0x10(%rbp),%rdi
call   1030 <read_faces@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_rst>:
push   %rbx
lea    0xea8(%rip),%rsi
call   1070 <safe_fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <read_header@plt>
mov    %rbx,%rdi
call   1050 <read_vertices@plt>
mov    %rbx,%rdi
call   1030 <read_faces@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define void @read_rst(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @safe_fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @read_header(i32* %6)
%8 = load i32*, i32** %3
%9 = call i32 @read_vertices(i32* %8)
%10 = load i32*, i32** %3
%11 = call i32 @read_faces(i32* %10)
%12 = load i32*, i32** %3
%13 = call i32 @fclose(i32* %12)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define void @read_rst(i8* %0) {
%2 = tail call i32* @safe_fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @read_header(i32* %2)
%4 = tail call i32 @read_vertices(i32* %2)
%5 = tail call i32 @read_faces(i32* %2)
%6 = tail call i32 @fclose(i32* %2)
ret void
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ printf(char *, int);
scalar_t__ remove(char *);
int main() {
  if (remove("")) {
    printf("%d\n", errno);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <remove@plt>
cmp    $0x0,%rax
je     115a <main+0x3a>
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
call   1030 <remove@plt>
test   %rax,%rax
je     1147 <main+0x27>
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"%d\0A\00"
@errno = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @remove(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* @errno
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %4, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"%d\0A\00"
@errno = global i32 0
define i32 @main() {
%1 = tail call i64 @remove(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i32, i32* @errno
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int f(long long);
main() {
  if (f(10000000000LL) != 1 || f(100000000000LL) != 10)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movabs $0x2540be400,%rdi
call   1040 <f@plt>
cmp    $0x1,%eax
jne    116f <main+0x3f>
movabs $0x174876e800,%rdi
call   1040 <f@plt>
cmp    $0xa,%eax
je     1176 <main+0x46>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x2540be400,%rdi
call   1040 <f@plt>
cmp    $0x1,%eax
jne    1160 <main+0x30>
movabs $0x174876e800,%rdi
call   1040 <f@plt>
cmp    $0xa,%eax
jne    1160 <main+0x30>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i64 10000000000)
%3 = icmp ne i32 %2, 1
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = call i32 @f(i64 100000000000)
%6 = icmp ne i32 %5, 10
br i1 %6, label %7, label %9
7: ; preds = %4, %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %4
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i64 10000000000)
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @f(i64 100000000000)
%5 = icmp eq i32 %4, 10
br i1 %5, label %8, label %6
6: ; preds = %3, %0
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %3
%9 = tail call i32 @exit(i32 0)
unreachable
}
void clean_animation(void) {}


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

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

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

LLVM IR (-O2):
define void @clean_animation() {
ret void
}
void asctoe24(s, y) char *s;
unsigned short *y;
{ asctoeg(s, y, 24); }


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

x86 assembly (clang, -O2):
<asctoe24>:
mov    $0x18,%edx
xor    %eax,%eax
jmp    1030 <asctoeg@plt>

LLVM IR (-O0):
define void @asctoe24(i8* %0, i16* %1) {
%3 = alloca i8*
%4 = alloca i16*
store i8* %0, i8** %3
store i16* %1, i16** %4
%5 = load i8*, i8** %3
%6 = load i16*, i16** %4
%7 = call i32 (i8*, i16*, i32, ...) bitcast (i32 (...)* @asctoeg to i32 (i8*, i16*, i32, ...)*)(i8* %5, i16* %6, i32 24)
ret void
}

LLVM IR (-O2):
define void @asctoe24(i8* %0, i16* %1) {
%3 = tail call i32 (i8*, i16*, i32, ...) bitcast (i32 (...)* @asctoeg to i32 (i8*, i16*, i32, ...)*)(i8* %0, i16* %1, i32 24)
ret void
}