xunge/DecIR huggingface dataset:
/* Type definitions */
struct rq_fx_leg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rq_fx_leg_free(struct rq_fx_leg *);
void fx_single_leg_free(void *p) {
  struct rq_fx_leg *fx_leg = (struct rq_fx_leg *)p;
  rq_fx_leg_free(fx_leg);
}


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

x86 assembly (clang, -O2):
<fx_single_leg_free>:
jmp    1030 <rq_fx_leg_free@plt>

LLVM IR (-O0):
%struct.rq_fx_leg = type { i32 }
define void @fx_single_leg_free(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.rq_fx_leg*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.rq_fx_leg*
store %struct.rq_fx_leg* %5, %struct.rq_fx_leg** %3
%6 = load %struct.rq_fx_leg*, %struct.rq_fx_leg** %3
%7 = call i32 @rq_fx_leg_free(%struct.rq_fx_leg* %6)
ret void
}

LLVM IR (-O2):
%struct.rq_fx_leg = type { i32 }
define void @fx_single_leg_free(i8* %0) {
%2 = bitcast i8* %0 to %struct.rq_fx_leg*
%3 = tail call i32 @rq_fx_leg_free(%struct.rq_fx_leg* %2)
ret void
}
void gtk_container_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_container_get_type() {
ret void
}
float Remap(float value, float inputStart, float inputEnd, float outputStart,
            float outputEnd) {
  return (value - inputStart) / (inputEnd - inputStart) *
             (outputEnd - outputStart) +
         outputStart;
}


x86 assembly (clang, -O0):
<Remap>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm2
subss  -0x10(%rbp),%xmm2
movss  -0x10(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Remap>:
subss  %xmm1,%xmm0
subss  %xmm1,%xmm2
divss  %xmm2,%xmm0
subss  %xmm3,%xmm4
mulss  %xmm4,%xmm0
addss  %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @Remap(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load float, float* %6
%12 = load float, float* %7
%13 = fsub float %11, %12
%14 = load float, float* %8
%15 = load float, float* %7
%16 = fsub float %14, %15
%17 = fdiv float %13, %16
%18 = load float, float* %10
%19 = load float, float* %9
%20 = fsub float %18, %19
%21 = load float, float* %9
%22 = call float @llvm.fmuladd.f32(float %17, float %20, float %21)
ret float %22
}

LLVM IR (-O2):
define float @Remap(float %0, float %1, float %2, float %3, float %4) {
%6 = fsub float %0, %1
%7 = fsub float %2, %1
%8 = fdiv float %6, %7
%9 = fsub float %4, %3
%10 = tail call float @llvm.fmuladd.f32(float %8, float %9, float %3)
ret float %10
}
void fc198(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      goto a;
    a:
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc198(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
br label %17
17: ; preds = %1
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
ret void
}

LLVM IR (-O2):
define void @fc198(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ printw(char *);
void *loadBuffer() {
  move(30, 30);
  printw("LOAD ME");
  return 0;
}


x86 assembly (clang, -O0):
<loadBuffer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1e,%esi
mov    %esi,%edi
call   1040 <move@plt>
lea    0xec9(%rip),%rdi
call   1030 <printw@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<loadBuffer>:
push   %rax
mov    $0x1e,%edi
mov    $0x1e,%esi
call   1040 <move@plt>
lea    0xec9(%rip),%rdi
call   1030 <printw@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"LOAD ME\00"
define i8* @loadBuffer() {
%1 = call i32 @move(i32 30, i32 30)
%2 = call i32 @printw(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [8 x i8] c"LOAD ME\00"
define noalias i8* @loadBuffer() {
%1 = tail call i32 @move(i32 30, i32 30)
%2 = tail call i32 @printw(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
/* Type definitions */
struct shmid_ds {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SYS_shmctl;
int syscall(int /*<<< orphan*/, int, int, struct shmid_ds *);
int shmctl(int shmid, int cmd, struct shmid_ds *buf) {
  return syscall(SYS_shmctl, shmid, cmd, buf);
}


x86 assembly (clang, -O0):
<shmctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shmctl>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.shmid_ds = type { i32 }
@SYS_shmctl = global i32 0
define i32 @shmctl(i32 %0, i32 %1, %struct.shmid_ds* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.shmid_ds*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.shmid_ds* %2, %struct.shmid_ds** %6
%7 = load i32, i32* @SYS_shmctl
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load %struct.shmid_ds*, %struct.shmid_ds** %6
%11 = call i32 @syscall(i32 %7, i32 %8, i32 %9, %struct.shmid_ds* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.shmid_ds = type { i32 }
@SYS_shmctl = global i32 0
define i32 @shmctl(i32 %0, i32 %1, %struct.shmid_ds* %2) {
%4 = load i32, i32* @SYS_shmctl
%5 = tail call i32 @syscall(i32 %4, i32 %0, i32 %1, %struct.shmid_ds* %2)
ret i32 %5
}
/* Variables and functions */
int mangle2(void **, char *, char *, int, int, int, int);
int mangle(char *d, char *s, int size, int block_size, int uncompressed,
           int data_block) {
  static void *stream = NULL;
  return mangle2(&stream, d, s, size, block_size, uncompressed, data_block);
}


x86 assembly (clang, -O0):
<mangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    -0x20(%rbp),%eax
lea    0x2ee5(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <mangle2@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mangle>:
push   %rax
mov    %r8d,%eax
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %r9d,(%rsp)
lea    0x2f06(%rip),%rdi
mov    %eax,%r9d
call   1030 <mangle2@plt>
pop    %rcx
ret

LLVM IR (-O0):
@mangle.stream = internal global i8* null
define i32 @mangle(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @mangle2(i8** @mangle.stream, i8* %13, i8* %14, i32 %15, i32 %16, i32 %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
@mangle.stream = internal global i8* null
define i32 @mangle(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @mangle2(i8** @mangle.stream, i8* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ gmtime(int /*<<< orphan*/ const *);
int /*<<< orphan*/ strftime(char *, int, char const *, int /*<<< orphan*/);
char *stdlib_rfc1123_gmt_timestamp(char *restrict buf,
                                   const time_t *restrict t) {
  const char *fmt = "%a, %d %b %Y %T GMT";
  strftime(buf, 30, fmt, gmtime(t));
  return buf;
}


x86 assembly (clang, -O0):
<stdlib_rfc1123_gmt_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <gmtime@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
mov    $0x1e,%esi
call   1030 <strftime@plt>
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_rfc1123_gmt_timestamp>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <gmtime@plt>
lea    0xecd(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    %eax,%ecx
call   1030 <strftime@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"%a, %d %b %Y %T GMT\00"
define i8* @stdlib_rfc1123_gmt_timestamp(i8* noalias %0, i32* noalias %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i8*
store i8* %0, i8** %3
store i32* %1, i32** %4
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %3
%7 = load i8*, i8** %5
%8 = load i32*, i32** %4
%9 = call i32 @gmtime(i32* %8)
%10 = call i32 @strftime(i8* %6, i32 30, i8* %7, i32 %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [20 x i8] c"%a, %d %b %Y %T GMT\00"
define i8* @stdlib_rfc1123_gmt_timestamp(i8* noalias returned %0, i32* noalias %1) {
%3 = tail call i32 @gmtime(i32* %1)
%4 = tail call i32 @strftime(i8* %0, i32 30, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* %0
}
/* Variables and functions */
int bitcount(int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  printf("%d's bit count is: %d\n", 1023, bitcount(1023));
  printf("%d's bit count is: %d\n", 1024, bitcount(1024));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3ff,%edi
call   1040 <bitcount@plt>
mov    %eax,%edx
lea    0xec9(%rip),%rdi
mov    $0x3ff,%esi
call   1030 <printf@plt>
mov    $0x400,%edi
call   1040 <bitcount@plt>
mov    %eax,%edx
lea    0xeac(%rip),%rdi
mov    $0x400,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3ff,%edi
call   1040 <bitcount@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    $0x3ff,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x400,%edi
call   1040 <bitcount@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"%d's bit count is: %d\0A\00"
define i32 @main() {
%1 = call i32 @bitcount(i32 1023)
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 1023, i32 %1)
%3 = call i32 @bitcount(i32 1024)
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 1024, i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"%d's bit count is: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @bitcount(i32 1023)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 1023, i32 %1)
%3 = tail call i32 @bitcount(i32 1024)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 1024, i32 %3)
ret i32 0
}
/* Variables and functions */
int memcmp(void const *, void const *, int);
int int_cmp(const void *elt1, const void *elt2) {
  return memcmp(elt1, elt2, sizeof(int));
}


x86 assembly (clang, -O0):
<int_cmp>:
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    $0x4,%edx
call   1030 <memcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @int_cmp(i8* %0, i8* %1) {
%3 = tail call i32 @memcmp(i8* %0, i8* %1, i32 4)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int list_comparator_int32_t(const void *a, const void *b) {
  return (*(int32_t *)a < *(int32_t *)b) - (*(int32_t *)a > *(int32_t *)b);
}


x86 assembly (clang, -O0):
<list_comparator_int32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
mov    -0x10(%rbp),%rdx
cmp    (%rdx),%rcx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_comparator_int32_t>:
mov    (%rdi),%rcx
xor    %eax,%eax
xor    %edx,%edx
cmp    (%rsi),%rcx
setl   %al
setg   %dl
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @list_comparator_int32_t(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = icmp slt i64 %7, %10
%12 = zext i1 %11 to i32
%13 = load i8*, i8** %3
%14 = bitcast i8* %13 to i64*
%15 = load i64, i64* %14
%16 = load i8*, i8** %4
%17 = bitcast i8* %16 to i64*
%18 = load i64, i64* %17
%19 = icmp sgt i64 %15, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %12, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @list_comparator_int32_t(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp slt i64 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp sgt i64 %4, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
int fun974() { return 974; }


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

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

LLVM IR (-O0):
define i32 @fun974() {
ret i32 974
}

LLVM IR (-O2):
define i32 @fun974() {
ret i32 974
}
/* Variables and functions */
const char *BF_options(void) { return "blowfish(ptr)"; }


x86 assembly (clang, -O0):
<BF_options>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BF_options>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"blowfish(ptr)\00"
define i8* @BF_options() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"blowfish(ptr)\00"
define i8* @BF_options() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ ns2point(float, float, float, float, float, float);
void ns2point_(float *x, float *y, float *z, float *red, float *green,
               float *blue) {
  ns2point(*x, *y, *z, *red, *green, *blue);
}


x86 assembly (clang, -O0):
<ns2point_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm3
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm4
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm5
call   1030 <ns2point@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns2point_>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  (%rdx),%xmm2
movss  (%rcx),%xmm3
movss  (%r8),%xmm4
movss  (%r9),%xmm5
jmp    1030 <ns2point@plt>

LLVM IR (-O0):
define void @ns2point_(float* %0, float* %1, float* %2, float* %3, float* %4, float* %5) {
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca float*
%12 = alloca float*
store float* %0, float** %7
store float* %1, float** %8
store float* %2, float** %9
store float* %3, float** %10
store float* %4, float** %11
store float* %5, float** %12
%13 = load float*, float** %7
%14 = load float, float* %13
%15 = load float*, float** %8
%16 = load float, float* %15
%17 = load float*, float** %9
%18 = load float, float* %17
%19 = load float*, float** %10
%20 = load float, float* %19
%21 = load float*, float** %11
%22 = load float, float* %21
%23 = load float*, float** %12
%24 = load float, float* %23
%25 = call i32 @ns2point(float %14, float %16, float %18, float %20, float %22, float %24)
ret void
}

LLVM IR (-O2):
define void @ns2point_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, float* nocapture %4, float* nocapture %5) {
%7 = load float, float* %0
%8 = load float, float* %1
%9 = load float, float* %2
%10 = load float, float* %3
%11 = load float, float* %4
%12 = load float, float* %5
%13 = tail call i32 @ns2point(float %7, float %8, float %9, float %10, float %11, float %12)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t set_lowest_cleared_bit(uint32_t x) {
  x ^= (uint32_t)-1;
  x = x & (x - 1);
  x ^= (uint32_t)-1;
  return x;
}


x86 assembly (clang, -O0):
<set_lowest_cleared_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_lowest_cleared_bit>:
lea    0x1(%rdi),%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @set_lowest_cleared_bit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = sub nsw i32 %6, 1
%8 = and i32 %5, %7
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = xor i32 %9, -1
store i32 %10, i32* %2
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @set_lowest_cleared_bit(i32 %0) {
%2 = add i32 %0, 1
%3 = or i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int main(int argc, char *argv[]) {
  const char *VERSION = "6.01";
  printf("%s\n", VERSION);
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"6.01\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int gui() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @gui() {
ret i32 0
}
void test_add(void) {}


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

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

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

LLVM IR (-O2):
define void @test_add() {
ret void
}
void foo_1_1_2_2_1_1_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_2_2_1_1_1_1_1() {
ret void
}
int COMPARE(int coef1, int coef2) {
  if (coef1 < coef2)
    return -1;
  else if (coef1 == coef2)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<COMPARE>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1122 <COMPARE+0x22>
movl   $0xffffffff,-0x4(%rbp)
jmp    1141 <COMPARE+0x41>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    113a <COMPARE+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1141 <COMPARE+0x41>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<COMPARE>:
xor    %ecx,%ecx
cmp    %esi,%edi
setne  %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @COMPARE(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 slt i32 %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 i32, i32* %4
%12 = load i32, i32* %5
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 0, i32* %3
br label %16
15: ; preds = %10
store i32 1, i32* %3
br label %16
16: ; preds = %15, %14, %9
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @COMPARE(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = icmp ne i32 %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
int elevar(int n) {
  if (n == 1) {
    return n;
  } else {
    return (n * n * n) + elevar(n - 1);
  }
}


x86 assembly (clang, -O0):
<elevar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1130 <elevar+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <elevar+0x43>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <elevar@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):
<elevar>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     117f <elevar+0x7f>
mov    %edi,%eax
imul   %edi,%eax
lea    -0x3(%rdi),%r10d
mov    %r10d,%ecx
imul   %edi,%ecx
add    $0x3,%ecx
imul   %edi,%ecx
add    $0xffffffff,%ecx
lea    -0x2(%rdi),%r9d
imul   %r9d,%ecx
lea    (%rdi,%rdi,2),%r8d
mov    $0x9,%esi
sub    %r8d,%esi
imul   %edi,%esi
add    $0xfffffff9,%esi
imul   %r9,%r10
lea    -0x4(%rdi),%edx
imul   %r10,%rdx
shr    %r10
imul   %esi,%r10d
add    %r8d,%r8d
add    $0xfffffff4,%r8d
lea    -0x5(%rdi),%esi
imul   %rdx,%rsi
shr    %rdx
imul   %r8d,%edx
imul   $0xaaaaaaab,%edx,%edx
shr    $0x2,%rsi
and    $0xfffffffe,%esi
imul   %edi,%eax
add    %ecx,%eax
add    %r10d,%eax
add    %edx,%eax
sub    %esi,%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @elevar(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %48, label %3
3: ; preds = %1
%4 = mul i32 %0, %0
%5 = add i32 %0, -3
%6 = mul i32 %5, %0
%7 = add i32 %6, 3
%8 = mul i32 %7, %0
%9 = add i32 %8, -1
%10 = add i32 %0, -2
%11 = mul i32 %9, %10
%12 = mul i32 %0, -3
%13 = add i32 %12, 9
%14 = mul i32 %13, %0
%15 = add i32 %14, -7
%16 = zext i32 %10 to i33
%17 = zext i32 %5 to i33
%18 = mul i33 %16, %17
%19 = lshr i33 %18, 1
%20 = trunc i33 %19 to i32
%21 = mul i32 %15, %20
%22 = mul i32 %0, 6
%23 = add i32 %22, -12
%24 = add i32 %0, -4
%25 = zext i32 %24 to i33
%26 = mul i33 %18, %25
%27 = lshr i33 %26, 1
%28 = trunc i33 %27 to i32
%29 = mul i32 %23, %28
%30 = mul i32 %29, -1431655765
%31 = zext i32 %10 to i35
%32 = zext i32 %5 to i35
%33 = mul i35 %31, %32
%34 = zext i32 %24 to i35
%35 = mul i35 %33, %34
%36 = add i32 %0, -5
%37 = zext i32 %36 to i35
%38 = mul i35 %35, %37
%39 = lshr i35 %38, 2
%40 = trunc i35 %39 to i32
%41 = and i32 %40, -2
%42 = mul i32 %4, %0
%43 = add i32 %42, %11
%44 = add i32 %43, %21
%45 = add i32 %30, %44
%46 = sub i32 %45, %41
%47 = add i32 %46, 1
br label %48
48: ; preds = %3, %1
%49 = phi i32 [ 1, %1 ], [ %47, %3 ]
ret i32 %49
}
/* Variables and functions */
double pow(int, double);
double getNextCenter(double from, int frac) {
  return from * pow(10, 3.0 / (10.0 * frac));
}


x86 assembly (clang, -O0):
<getNextCenter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xebd(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    $0xa,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNextCenter>:
push   %rax
movsd  %xmm0,(%rsp)
cvtsi2sd %edi,%xmm1
mulsd  0xede(%rip),%xmm1
movsd  0xede(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    $0xa,%edi
call   1030 <pow@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @getNextCenter(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load double, double* %3
%6 = load i32, i32* %4
%7 = sitofp i32 %6 to double
%8 = fmul double 1.000000e+01, %7
%9 = fdiv double 3.000000e+00, %8
%10 = call double @pow(i32 10, double %9)
%11 = fmul double %5, %10
ret double %11
}

LLVM IR (-O2):
define double @getNextCenter(double %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = fmul double %3, 1.000000e+01
%5 = fdiv double 3.000000e+00, %4
%6 = tail call double @pow(i32 10, double %5)
%7 = fmul double %6, %0
ret double %7
}
/* Variables and functions */
float __ocml_len3_f32(float, float, float);
float norm3df(float x, float y, float z) { return __ocml_len3_f32(x, y, z); }


x86 assembly (clang, -O0):
<norm3df>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <__ocml_len3_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<norm3df>:
jmp    1030 <__ocml_len3_f32@plt>

LLVM IR (-O0):
define float @norm3df(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = call float @__ocml_len3_f32(float %7, float %8, float %9)
ret float %10
}

LLVM IR (-O2):
define float @norm3df(float %0, float %1, float %2) {
%4 = tail call float @__ocml_len3_f32(float %0, float %1, float %2)
ret float %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ chars;
};
typedef TYPE_1__ XmbTextItem;

/* Variables and functions */
void *get_XmbTextItem_chars(void *_p) {
  return (void *)((XmbTextItem *)_p)->chars;
}


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

x86 assembly (clang, -O2):
<get_XmbTextItem_chars>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @get_XmbTextItem_chars(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
void yy_1_TableInlineCellPlus(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_TableInlineCellPlus(i8* nocapture %0, i32 %1) {
ret void
}
int comp2v(int *v1, int *v2, int vec_length) {
  int i;
  int sameornot = 1;
  i = 0;
  while (i < vec_length) {
    i++;
    if (v1[i] != v2[i]) {
      sameornot = 0;
      i = vec_length + 1;
    }
  }
  return sameornot;
}


x86 assembly (clang, -O0):
<comp2v>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1163 <comp2v+0x63>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     115e <comp2v+0x5e>
movl   $0x0,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111d <comp2v+0x1d>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp2v>:
test   %edx,%edx
jle    1143 <comp2v+0x43>
lea    0x1(%rdx),%r8d
xor    %r9d,%r9d
mov    $0x1,%eax
jmp    112a <comp2v+0x2a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r8d,%r9d
xor    %eax,%eax
cmp    %edx,%r9d
jge    1142 <comp2v+0x42>
movslq %r9d,%r10
mov    0x4(%rdi,%r10,4),%ecx
cmp    0x4(%rsi,%r10,4),%ecx
jne    1120 <comp2v+0x20>
add    $0x1,%r9d
cmp    %edx,%r9d
jl     112a <comp2v+0x2a>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @comp2v(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %20
5: ; preds = %3
%6 = add nuw nsw i32 %2, 1
br label %7
7: ; preds = %5, %7
%8 = phi i32 [ 1, %5 ], [ %18, %7 ]
%9 = phi i32 [ 0, %5 ], [ %17, %7 ]
%10 = add nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = getelementptr inbounds i32, i32* %1, i64 %11
%15 = load i32, i32* %14
%16 = icmp eq i32 %13, %15
%17 = select i1 %16, i32 %10, i32 %6
%18 = select i1 %16, i32 %8, i32 0
%19 = icmp slt i32 %17, %2
br i1 %19, label %7, label %20
20: ; preds = %7, %3
%21 = phi i32 [ 1, %3 ], [ %18, %7 ]
ret i32 %21
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int echo() {
  printf("this is a log from lib\n");
  ;
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"this is a log from lib\0A\00"
define i32 @echo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"this is a log from lib\00"
define i32 @echo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void xxx1(void) { printf("MAIN1\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"MAIN1\00"
define void @xxx1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
int _cpy_strcmp(const char *s1, const char *s2) {
  int i;
  int diff;
  for (i = 0;; i++) {
    diff = ((unsigned char *)s1)[i] - ((unsigned char *)s2)[i];
    if (diff != 0 || s1[i] == '\0')
      return diff;
  }
}


x86 assembly (clang, -O0):
<_cpy_strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    114f <_cpy_strcmp+0x4f>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1154 <_cpy_strcmp+0x54>
mov    -0x18(%rbp),%eax
pop    %rbp
ret
jmp    1159 <_cpy_strcmp+0x59>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <_cpy_strcmp+0x13>

x86 assembly (clang, -O2):
<_cpy_strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rcx,1),%edx
movzbl (%rsi,%rcx,1),%r8d
mov    %edx,%eax
sub    %r8d,%eax
jne    1128 <_cpy_strcmp+0x28>
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <_cpy_strcmp+0x10>
ret

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

LLVM IR (-O2):
define i32 @_cpy_strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %15, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = getelementptr inbounds i8, i8* %1, i64 %4
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = sub nsw i32 %7, %10
%12 = icmp ne i32 %11, 0
%13 = icmp eq i8 %6, 0
%14 = select i1 %12, i1 true, i1 %13
%15 = add nuw i64 %4, 1
br i1 %14, label %16, label %3
16: ; preds = %3
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printLoop(int array[], int length) {
  int i;
  for (i = 0; i < length; i++) {
    printf("%d\n", array[i]);
  }
}


x86 assembly (clang, -O0):
<printLoop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <printLoop+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printLoop+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printLoop>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printLoop+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printLoop+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @printLoop(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 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @printLoop(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
int lessThan(int lhs, int rhs) { return lhs < rhs; }


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

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

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

LLVM IR (-O2):
define i32 @lessThan(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
long generate_id(char *str) {
  long sum = 0, i;
  for (i = 0; str[i] != '\0'; i++) {
    sum = (sum + str[i]) % 32768;
  }
  return sum % 32768;
}


x86 assembly (clang, -O0):
<generate_id>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1160 <generate_id+0x60>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%rdx
movsbq (%rcx,%rdx,1),%rcx
add    %rcx,%rax
mov    $0x8000,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <generate_id+0x18>
mov    -0x10(%rbp),%rax
mov    $0x8000,%ecx
cqto
idiv   %rcx
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_id>:
mov    (%rdi),%cl
test   %cl,%cl
je     113c <generate_id+0x3c>
add    $0x1,%rdi
xor    %edx,%edx
mov    %rdx,%rax
nop
movsbq %cl,%rcx
add    %rcx,%rax
lea    0x7fff(%rdx,%rcx,1),%rcx
cmovns %rax,%rcx
and    $0xffffffffffff8000,%rcx
sub    %rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %rax,%rdx
test   %cl,%cl
jne    1110 <generate_id+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @generate_id(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i64 [ %11, %4 ], [ 0, %1 ]
%7 = phi i64 [ %10, %4 ], [ 0, %1 ]
%8 = sext i8 %5 to i64
%9 = add nsw i64 %7, %8
%10 = srem i64 %9, 32768
%11 = add nuw nsw i64 %6, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i64 [ 0, %1 ], [ %10, %4 ]
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void sigcatcher(int sig) {
  fprintf(stderr, "osmfilter: output has been terminated.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<sigcatcher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigcatcher>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"osmfilter: output has been terminated.\0A\00"
define void @sigcatcher(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"osmfilter: output has been terminated.\0A\00"
define void @sigcatcher(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ loggerf(char *, unsigned long long);
void *malloc(size_t);
void *util_malloc(size_t size) {
  void *m;
  if ((m = malloc(size)) == NULL) {
    loggerf("ooops, not enough memory (%llu)", ((unsigned long long)(size)));
    abort();
  };
  return m;
}


x86 assembly (clang, -O0):
<util_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    116a <util_malloc+0x3a>
mov    -0x8(%rbp),%rsi
lea    0xea2(%rip),%rdi
call   1050 <loggerf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_malloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <util_malloc+0x10>
pop    %rbx
ret
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1050 <loggerf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"ooops, not enough memory (%llu)\00"
define i8* @util_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i64, i64* %2
%9 = call i32 @loggerf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 %8)
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [32 x i8] c"ooops, not enough memory (%llu)\00"
define noalias i8* @util_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @loggerf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 %0)
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int fpcompare(double, double, int, int);
int islessequal(double x, double y) { return fpcompare(x, y, 0x0100, 0x4000); }


x86 assembly (clang, -O0):
<islessequal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    $0x100,%edi
mov    $0x4000,%esi
call   1030 <fpcompare@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<islessequal>:
mov    $0x100,%edi
mov    $0x4000,%esi
jmp    1030 <fpcompare@plt>

LLVM IR (-O0):
define i32 @islessequal(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 = call i32 @fpcompare(double %5, double %6, i32 256, i32 16384)
ret i32 %7
}

LLVM IR (-O2):
define i32 @islessequal(double %0, double %1) {
%3 = tail call i32 @fpcompare(double %0, double %1, i32 256, i32 16384)
ret i32 %3
}
void __attribute__((weak)) dma2_ch2_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<dma2_ch2_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dma2_ch2_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.dma2_ch2_isr = [13 x i8] c"dma2_ch2_isr\00"
define weak void @dma2_ch2_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.dma2_ch2_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.dma2_ch2_isr = [13 x i8] c"dma2_ch2_isr\00"
define weak void @dma2_ch2_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.dma2_ch2_isr, i64 0, i64 0))
ret void
}