xunge/DecIR huggingface dataset:
int time_it_write_csv(const char *file_name, const char *mode) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @time_it_write_csv(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
void f(float x) {}


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

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

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

LLVM IR (-O2):
define void @f(float %0) {
ret void
}
/* Type definitions */
struct clad_sb {
  int dummy;
};

/* Variables and functions */
struct clad_sb *clad_sb_mid(struct clad_sb const *, int /*<<< orphan*/, int);
struct clad_sb *clad_sb_left(const struct clad_sb *me, int size) {
  return clad_sb_mid(me, 0, size);
}


x86 assembly (clang, -O0):
<clad_sb_left>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1030 <clad_sb_mid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clad_sb_left>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <clad_sb_mid@plt>

LLVM IR (-O0):
%struct.clad_sb = type { i32 }
define %struct.clad_sb* @clad_sb_left(%struct.clad_sb* %0, i32 %1) {
%3 = alloca %struct.clad_sb*
%4 = alloca i32
store %struct.clad_sb* %0, %struct.clad_sb** %3
store i32 %1, i32* %4
%5 = load %struct.clad_sb*, %struct.clad_sb** %3
%6 = load i32, i32* %4
%7 = call %struct.clad_sb* @clad_sb_mid(%struct.clad_sb* %5, i32 0, i32 %6)
ret %struct.clad_sb* %7
}

LLVM IR (-O2):
%struct.clad_sb = type { i32 }
define %struct.clad_sb* @clad_sb_left(%struct.clad_sb* %0, i32 %1) {
%3 = tail call %struct.clad_sb* @clad_sb_mid(%struct.clad_sb* %0, i32 0, i32 %1)
ret %struct.clad_sb* %3
}
int main() {
  if (__alignof__(char) != 1) {
    abort();
  }
  if (__alignof__(unsigned char) != 1) {
    abort();
  }
  if (__alignof__(signed char) != 1) {
    abort();
  }
  if (__alignof__(short) != 2) {
    abort();
  }
  if (__alignof__(short int) != 2) {
    abort();
  }
  if (__alignof__(signed short) != 2) {
    abort();
  }
  if (__alignof__(signed short int) != 2) {
    abort();
  }
  if (__alignof__(unsigned short) != 2) {
    abort();
  }
  if (__alignof__(unsigned short int) != 2) {
    abort();
  }
  if (__alignof__(int) != 4) {
    abort();
  }
  if (__alignof__(signed int) != 4) {
    abort();
  }
  if (__alignof__(unsigned) != 4) {
    abort();
  }
  if (__alignof__(unsigned int) != 4) {
    abort();
  }
  if (__alignof__(long) != 8) {
    abort();
  }
  if (__alignof__(float) != 4) {
    abort();
  }
  if (__alignof__(double) != 8) {
    abort();
  }
  if (__alignof__(int *) != 8) {
    abort();
  }
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int test_imm_D9int16_mem(short *val) {
  return ((*val) & (-0xD9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D9int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff27,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D9int16_mem>:
movzwl (%rdi),%eax
test   $0xff27,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D9int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -217
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct bulentry {
  int dummy;
};

/* Variables and functions */
int xfrm_pre_bu_add_bule(struct bulentry *);
int pre_bu_bul_update(struct bulentry *bule) {
  return xfrm_pre_bu_add_bule(bule);
}


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

x86 assembly (clang, -O2):
<pre_bu_bul_update>:
jmp    1030 <xfrm_pre_bu_add_bule@plt>

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

LLVM IR (-O2):
%struct.bulentry = type { i32 }
define i32 @pre_bu_bul_update(%struct.bulentry* %0) {
%2 = tail call i32 @xfrm_pre_bu_add_bule(%struct.bulentry* %0)
ret i32 %2
}
void ff_hevc_put_hevc_bi_w_pel_pixels32_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_pel_pixels32_12_sse4() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void funlockfile(FILE *stream) { (void)stream; }


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

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

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

LLVM IR (-O2):
define void @funlockfile(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int i;
  for (i = 1; i < argc; i++)
    printf("%s ", argv[i]);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1161 <main+0x51>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     1157 <main+0x37>
mov    %rsi,%r15
mov    %edi,%r12d
mov    $0x1,%ebx
lea    0xec1(%rip),%r14
nop
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %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
%14 = tail call i32 @putchar(i32 10)
ret i32 0
}
int test6(int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @test6(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ Sys_failure(char *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int bind(int, struct sockaddr *, int /*<<< orphan*/);
void Bind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen) {
  int retval;
  assert(my_addr != NULL);
  retval = bind(sockfd, my_addr, addrlen);
  if (retval == -1)
    Sys_failure("bind");
}


x86 assembly (clang, -O0):
<Bind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <bind@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    117c <Bind+0x4c>
lea    0xe89(%rip),%rdi
call   1040 <Sys_failure@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bind>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
test   %rsi,%rsi
setne  %dil
call   1030 <assert@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1050 <bind@plt>
cmp    $0xffffffff,%eax
je     1161 <Bind+0x31>
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xe98(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <Sys_failure@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@.str = [5 x i8] c"bind\00"
define void @Bind(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32 %2, i32* %6
%8 = load %struct.sockaddr*, %struct.sockaddr** %5
%9 = icmp ne %struct.sockaddr* %8, null
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %4
%13 = load %struct.sockaddr*, %struct.sockaddr** %5
%14 = load i32, i32* %6
%15 = call i32 @bind(i32 %12, %struct.sockaddr* %13, i32 %14)
store i32 %15, i32* %7
%16 = load i32, i32* %7
%17 = icmp eq i32 %16, -1
br i1 %17, label %18, label %20
18: ; preds = %3
%19 = call i32 @Sys_failure(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %20
20: ; preds = %18, %3
ret void
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@.str = [5 x i8] c"bind\00"
define void @Bind(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = icmp ne %struct.sockaddr* %1, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @bind(i32 %0, %struct.sockaddr* %1, i32 %2)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = tail call i32 @Sys_failure(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void init(void) { printf("init stuff"); }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"init stuff\00"
define void @init() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int quaddobl_Newton_power_series(int idx, int maxdeg, int nbr, int verbose) {
  int fail = 0;
  int idxnbr[3];
  double *c;
  idxnbr[0] = idx;
  idxnbr[1] = maxdeg;
  idxnbr[2] = nbr;
  fail = _ada_use_c2phc4c(696, idxnbr, &verbose, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<quaddobl_Newton_power_series>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rcx
mov    $0x2b8,%edi
lea    -0x10(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quaddobl_Newton_power_series>:
sub    $0x18,%rsp
mov    %ecx,0x8(%rsp)
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    $0x2b8,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @quaddobl_Newton_power_series(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [3 x i32]
%11 = alloca double*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 0, i32* %9
%12 = load i32, i32* %5
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
store i32 %12, i32* %13
%14 = load i32, i32* %6
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 1
store i32 %14, i32* %15
%16 = load i32, i32* %7
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 2
store i32 %16, i32* %17
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
%19 = load double*, double** %11
%20 = call i32 @_ada_use_c2phc4c(i32 696, i32* %18, i32* %8, double* %19, i32 0)
store i32 %20, i32* %9
%21 = load i32, i32* %9
ret i32 %21
}

LLVM IR (-O2):
define i32 @quaddobl_Newton_power_series(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca [3 x i32]
store i32 %3, i32* %5
%7 = bitcast [3 x i32]* %6 to i8*
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 %0, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
store i32 %1, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
store i32 %2, i32* %10
%11 = call i32 @_ada_use_c2phc4c(i32 696, i32* %8, i32* %5, double* undef, i32 0)
ret i32 %11
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBDevLPMEnable(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x40050000);
  (*((volatile uint8_t *)(ui32Base + 0x00000362))) |= 0x0000000C | 0x00000001;
}


x86 assembly (clang, -O0):
<USBDevLPMEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x362,%eax
cltq
mov    (%rax),%ecx
or     $0xd,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDevLPMEnable>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
orl    $0xd,0x362(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @USBDevLPMEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074069504
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 866
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, 13
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @USBDevLPMEnable(i32 %0) {
%2 = icmp eq i32 %0, 1074069504
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 866
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = or i32 %8, 13
store volatile i32 %9, i32* %7
ret void
}
/* Variables and functions */
char atoi(char *);
int /*<<< orphan*/ printf(char *, char);
int main(int argc, char *argv[]) {
  char a = atoi(argv[1]);
  printf("the value of a was %d\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %al,-0x11(%rbp)
lea    0xeb3(%rip),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
movsbl %al,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"the value of a was %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call signext i8 @atoi(i8* %9)
store i8 %10, i8* %6
%11 = load i8, i8* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8 signext %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"the value of a was %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call signext i8 @atoi(i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8 signext %5)
ret i32 0
}
const char test1_strings_underrun(int x) {
  const char *mystr = "mary had a little lamb";
  return mystr[-1];
}


x86 assembly (clang, -O0):
<test1_strings_underrun>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl -0x1(%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [23 x i8] c"mary had a little lamb\00"
define signext i8 @test1_strings_underrun(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = load i8, i8* %5
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @test1_strings_underrun(i32 %0) {
ret i8 undef
}
void vmlinux_entry(void) {}


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

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

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

LLVM IR (-O2):
define void @vmlinux_entry() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ writeVector(char *);
int main(int argc, char **args) {
  char *petsc_full_filename = "vec1.petsc";
  printf("starting processing %s --->\n", petsc_full_filename);
  writeVector(petsc_full_filename);
  printf("finished writing to: %s\n", petsc_full_filename);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee3(%rip),%rdi
lea    0xed1(%rip),%rbx
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <writeVector@plt>
lea    0xee2(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"vec1.petsc\00"
@.str.1 = [29 x i8] c"starting processing %s --->\0A\00"
@.str.2 = [25 x i8] c"finished writing to: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %6
%10 = call i32 @writeVector(i8* %9)
%11 = load i8*, i8** %6
%12 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"vec1.petsc\00"
@.str.1 = [29 x i8] c"starting processing %s --->\0A\00"
@.str.2 = [25 x i8] c"finished writing to: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @writeVector(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
const char *Mark_Brief(void) { return "Markable by GC"; }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Markable by GC\00"
define i8* @Mark_Brief() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [15 x i8] c"Markable by GC\00"
define i8* @Mark_Brief() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
float fxFloat(float x, float a, float b, float c) {
  return (a * x * x) + (b * x) + c;
}


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

x86 assembly (clang, -O2):
<fxFloat>:
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm2
mulss  %xmm1,%xmm0
addss  %xmm2,%xmm0
addss  %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @fxFloat(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %6
%10 = load float, float* %5
%11 = fmul float %9, %10
%12 = load float, float* %5
%13 = load float, float* %7
%14 = load float, float* %5
%15 = fmul float %13, %14
%16 = call float @llvm.fmuladd.f32(float %11, float %12, float %15)
%17 = load float, float* %8
%18 = fadd float %16, %17
ret float %18
}

LLVM IR (-O2):
define float @fxFloat(float %0, float %1, float %2, float %3) {
%5 = fmul float %0, %1
%6 = fmul float %0, %2
%7 = tail call float @llvm.fmuladd.f32(float %5, float %0, float %6)
%8 = fadd float %7, %3
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
char inverse(char base) {
  switch (base) {
  case 'A':
    return ('T');
  case 'T':
    return ('A');
  case 'U':
    return ('A');
  case 'C':
    return ('G');
  case 'G':
    return ('C');
  }
  abort();
}


x86 assembly (clang, -O0):
<inverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x14,%eax
ja     1175 <inverse+0x65>
mov    -0x10(%rbp),%rax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x54,-0x1(%rbp)
jmp    117c <inverse+0x6c>
movb   $0x41,-0x1(%rbp)
jmp    117c <inverse+0x6c>
movb   $0x41,-0x1(%rbp)
jmp    117c <inverse+0x6c>
movb   $0x47,-0x1(%rbp)
jmp    117c <inverse+0x6c>
movb   $0x43,-0x1(%rbp)
jmp    117c <inverse+0x6c>
mov    $0x0,%al
call   1030 <abort@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverse>:
push   %rax
add    $0xffffffbf,%edi
cmp    $0x14,%edi
ja     1137 <inverse+0x27>
mov    $0x54,%al
lea    0xede(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x41,%al
pop    %rcx
ret
mov    $0x47,%al
pop    %rcx
ret
mov    $0x43,%al
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define signext i8 @inverse(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %11 [
i32 65, label %6
i32 84, label %7
i32 85, label %8
i32 67, label %9
i32 71, label %10
]
6: ; preds = %1
store i8 84, i8* %2
br label %13
7: ; preds = %1
store i8 65, i8* %2
br label %13
8: ; preds = %1
store i8 65, i8* %2
br label %13
9: ; preds = %1
store i8 71, i8* %2
br label %13
10: ; preds = %1
store i8 67, i8* %2
br label %13
11: ; preds = %1
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %10, %9, %8, %7, %6
%14 = load i8, i8* %2
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @inverse(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %7 [
i32 65, label %9
i32 84, label %3
i32 85, label %4
i32 67, label %5
i32 71, label %6
]
3: ; preds = %1
br label %9
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %1, %6, %5, %4, %3
%10 = phi i8 [ 67, %6 ], [ 71, %5 ], [ 65, %4 ], [ 65, %3 ], [ 84, %1 ]
ret i8 %10
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *xmalloc(scalar_t__);
char *xstrdup(const char *str) {
  char *cp = xmalloc(strlen(str) + 1);
  strcpy(cp, str);
  return cp;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <xmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @xmalloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @xmalloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ mat3f_mult_vec3f_new(float *, float const *, float *);
void mat3f_mult_vec3f(float vector[3], const float matrix[9]) {
  mat3f_mult_vec3f_new(vector, matrix, vector);
}


x86 assembly (clang, -O0):
<mat3f_mult_vec3f>:
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    -0x8(%rbp),%rdx
call   1030 <mat3f_mult_vec3f_new@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat3f_mult_vec3f>:
mov    %rdi,%rdx
jmp    1030 <mat3f_mult_vec3f_new@plt>

LLVM IR (-O0):
define void @mat3f_mult_vec3f(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float*, float** %4
%7 = load float*, float** %3
%8 = call i32 @mat3f_mult_vec3f_new(float* %5, float* %6, float* %7)
ret void
}

LLVM IR (-O2):
define void @mat3f_mult_vec3f(float* %0, float* %1) {
%3 = tail call i32 @mat3f_mult_vec3f_new(float* %0, float* %1, float* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void globus_silent_fatal(void) { abort(); }


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

x86 assembly (clang, -O2):
<globus_silent_fatal>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @globus_silent_fatal() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @globus_silent_fatal() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_lock_t;

/* Variables and functions */
int omp_test_lock(omp_lock_t *_Lock) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @omp_test_lock(i32* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
time_t GPS_Math_Gtime_To_Utime(time_t v) { return v + 631065600; }


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

x86 assembly (clang, -O2):
<GPS_Math_Gtime_To_Utime>:
lea    0x259d4c00(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @GPS_Math_Gtime_To_Utime(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 631065600
ret i64 %4
}

LLVM IR (-O2):
define i64 @GPS_Math_Gtime_To_Utime(i64 %0) {
%2 = add nsw i64 %0, 631065600
ret i64 %2
}
void tpush() {
  asm volatile("subq $0x8, %%r11\n\t"
               "movq $0x0123456789abcdef, %%rax\n\t"
               "movq %%rax, (%%r11)\n\t" ::
                   :);
}


x86 assembly (clang, -O0):
<tpush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x8,%r11
movabs $0x123456789abcdef,%rax
45 23 01
mov    %rax,(%r11)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tpush>:
sub    $0x8,%r11
movabs $0x123456789abcdef,%rax
45 23 01
mov    %rax,(%r11)
ret

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

LLVM IR (-O2):
define void @tpush() {
tail call void asm sideeffect "subq $$0x8, %r11\0A\09movq $$0x0123456789abcdef, %rax\0A\09movq %rax, (%r11)\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, char *, int);
void print_str_and_int(char *str) {
  printf("%20s as an int: %d\n", str, atoi(str));
}


x86 assembly (clang, -O0):
<print_str_and_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_str_and_int>:
push   %rbx
mov    %rdi,%rbx
call   1040 <atoi@plt>
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"%20s as an int: %d\0A\00"
define void @print_str_and_int(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @atoi(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"%20s as an int: %d\0A\00"
define void @print_str_and_int(i8* %0) {
%2 = tail call i32 @atoi(i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %2)
ret void
}
double fabs(double n) {
  double f;
  if (n >= 0)
    f = n;
  else
    f = -n;
  return f;
}


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112a <fabs+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114b <fabs+0x4b>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @fabs(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ setPadDriveWPi(int, int);
void setPadDriveGpio(int group, int value) { setPadDriveWPi(group, value); }


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

x86 assembly (clang, -O2):
<setPadDriveGpio>:
jmp    1030 <setPadDriveWPi@plt>

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

LLVM IR (-O2):
define void @setPadDriveGpio(i32 %0, i32 %1) {
%3 = tail call i32 @setPadDriveWPi(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memory_exhausted();
void *xmalloc(size_t size) {
  void *rv = malloc(size);
  if (!rv)
    memory_exhausted();
  return rv;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114b <xmalloc+0x2b>
mov    $0x0,%al
call   1040 <memory_exhausted@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <xmalloc+0x15>
xor    %eax,%eax
call   1040 <memory_exhausted@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xmalloc(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 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 (...) @memory_exhausted()
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @memory_exhausted()
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
void glmGreaterThan3fs(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):
<glmGreaterThan3fs>:
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    1159 <glmGreaterThan3fs+0x59>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
ucomiss -0x14(%rbp),%xmm0
seta   %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 <glmGreaterThan3fs+0x19>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @glmGreaterThan3fs(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 ogt 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 @glmGreaterThan3fs(i32* nocapture writeonly %0, float* nocapture %1, float %2) {
%4 = load float, float* %1
%5 = fcmp ogt 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 ogt 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 ogt float %13, %2
%15 = zext i1 %14 to i32
%16 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %15, i32* %16
ret void
}
/* Variables and functions */
char *parse_atom(char const *, char **);
char *parse_quoted_string(char const *, char **);
const char *parse_word_simple(const char *word, char **pbuf) {
  const char *ret;
  ret = parse_quoted_string(word, pbuf);
  if (!ret)
    ret = parse_atom(word, pbuf);
  return ret;
}


x86 assembly (clang, -O0):
<parse_word_simple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <parse_quoted_string@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115d <parse_word_simple+0x3d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <parse_atom@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_word_simple>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <parse_quoted_string@plt>
test   %rax,%rax
je     113c <parse_word_simple+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <parse_atom@plt>

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

LLVM IR (-O2):
define i8* @parse_word_simple(i8* %0, i8** %1) {
%3 = tail call i8* @parse_quoted_string(i8* %0, i8** %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i8* @parse_atom(i8* %0, i8** %1)
br label %7
7: ; preds = %5, %2
%8 = phi i8* [ %3, %2 ], [ %6, %5 ]
ret i8* %8
}
/* Variables and functions */
int chacha_avx2_crypto_stream_xor(unsigned char *, unsigned char *,
                                  unsigned long long, unsigned char const *,
                                  unsigned char const *);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/,
                          unsigned long long);
int chacha_avx2_crypto_stream(unsigned char *out, unsigned long long outlen,
                              const unsigned char *n, const unsigned char *k) {
  memset(out, 0, outlen);
  return chacha_avx2_crypto_stream_xor(out, out, outlen, n, k);
}


x86 assembly (clang, -O0):
<chacha_avx2_crypto_stream>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1030 <chacha_avx2_crypto_stream_xor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chacha_avx2_crypto_stream>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
xor    %esi,%esi
mov    %r12,%rdx
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <chacha_avx2_crypto_stream_xor@plt>

LLVM IR (-O0):
define i32 @chacha_avx2_crypto_stream(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @memset(i8* %9, i32 0, i64 %10)
%12 = load i8*, i8** %5
%13 = load i8*, i8** %5
%14 = load i64, i64* %6
%15 = load i8*, i8** %7
%16 = load i8*, i8** %8
%17 = call i32 @chacha_avx2_crypto_stream_xor(i8* %12, i8* %13, i64 %14, i8* %15, i8* %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @chacha_avx2_crypto_stream(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
%6 = tail call i32 @chacha_avx2_crypto_stream_xor(i8* %0, i8* %0, i64 %1, i8* %2, i8* %3)
ret i32 %6
}
void f() {
  typedef int foo;
  typedef float bar;
}


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

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
long map(float, float, float, int /*<<< orphan*/, int);
long ind_map10_cal(float val, float val_min, float val_max, int cal_max) {
  if (cal_max > 255)
    cal_max = 255;
  return map(val * 10.0, val_min * 10.0, val_max * 10.0, 0, cal_max);
}


x86 assembly (clang, -O0):
<ind_map10_cal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
cmpl   $0xff,-0x10(%rbp)
jle    113e <ind_map10_cal+0x2e>
movl   $0xff,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb1(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe98(%rip),%xmm2
mulsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movsd  0xe7f(%rip),%xmm3
mulsd  %xmm3,%xmm2
cvtsd2ss %xmm2,%xmm2
mov    -0x10(%rbp),%esi
xor    %edi,%edi
call   1030 <map@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ind_map10_cal>:
cmp    $0xff,%edi
mov    $0xff,%esi
cmovl  %edi,%esi
movss  0xeda(%rip),%xmm3
mulss  %xmm3,%xmm0
mulss  %xmm3,%xmm1
mulss  %xmm3,%xmm2
xor    %edi,%edi
jmp    1030 <map@plt>

LLVM IR (-O0):
define i64 @ind_map10_cal(float %0, float %1, float %2, i32 %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca i32
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = icmp sgt i32 %9, 255
br i1 %10, label %11, label %12
11: ; preds = %4
store i32 255, i32* %8
br label %12
12: ; preds = %11, %4
%13 = load float, float* %5
%14 = fpext float %13 to double
%15 = fmul double %14, 1.000000e+01
%16 = fptrunc double %15 to float
%17 = load float, float* %6
%18 = fpext float %17 to double
%19 = fmul double %18, 1.000000e+01
%20 = fptrunc double %19 to float
%21 = load float, float* %7
%22 = fpext float %21 to double
%23 = fmul double %22, 1.000000e+01
%24 = fptrunc double %23 to float
%25 = load i32, i32* %8
%26 = call i64 @map(float %16, float %20, float %24, i32 0, i32 %25)
ret i64 %26
}

LLVM IR (-O2):
define i64 @ind_map10_cal(float %0, float %1, float %2, i32 %3) {
%5 = icmp slt i32 %3, 255
%6 = select i1 %5, i32 %3, i32 255
%7 = fmul float %0, 1.000000e+01
%8 = fmul float %1, 1.000000e+01
%9 = fmul float %2, 1.000000e+01
%10 = tail call i64 @map(float %7, float %8, float %9, i32 0, i32 %6)
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ a3(int);
void a2(int n) { a3(n); }


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

x86 assembly (clang, -O2):
<a2>:
jmp    1030 <a3@plt>

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

LLVM IR (-O2):
define void @a2(i32 %0) {
%2 = tail call i32 @a3(i32 %0)
ret void
}