xunge/DecIR huggingface dataset:
void mvMatScale3(float *r, float factor) {
  int i;
  for (i = 0; i < 9; i++)
    r[i] *= factor;
}


x86 assembly (clang, -O0):
<mvMatScale3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jge    1143 <mvMatScale3+0x43>
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <mvMatScale3+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvMatScale3>:
movaps %xmm0,%xmm1
shufps $0x0,%xmm0,%xmm1
movups (%rdi),%xmm2
movups 0x10(%rdi),%xmm3
mulps  %xmm1,%xmm2
movups %xmm2,(%rdi)
mulps  %xmm1,%xmm3
movups %xmm3,0x10(%rdi)
mulss  0x20(%rdi),%xmm0
movss  %xmm0,0x20(%rdi)
ret

LLVM IR (-O0):
define void @mvMatScale3(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
%5 = alloca i32
store float* %0, float** %3
store float %1, float* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 9
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = load float, float* %4
%11 = load float*, float** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds float, float* %11, i64 %13
%15 = load float, float* %14
%16 = fmul float %15, %10
store float %16, float* %14
br label %17
17: ; preds = %9
%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):
define void @mvMatScale3(float* nocapture %0, float %1) {
%3 = bitcast float* %0 to <4 x float>*
%4 = load <4 x float>, <4 x float>* %3
%5 = insertelement <4 x float> poison, float %1, i64 0
%6 = shufflevector <4 x float> %5, <4 x float> poison, <4 x i32> zeroinitializer
%7 = fmul <4 x float> %4, %6
%8 = bitcast float* %0 to <4 x float>*
store <4 x float> %7, <4 x float>* %8
%9 = getelementptr inbounds float, float* %0, i64 4
%10 = bitcast float* %9 to <4 x float>*
%11 = load <4 x float>, <4 x float>* %10
%12 = fmul <4 x float> %11, %6
%13 = bitcast float* %9 to <4 x float>*
store <4 x float> %12, <4 x float>* %13
%14 = getelementptr inbounds float, float* %0, i64 8
%15 = load float, float* %14
%16 = fmul float %15, %1
store float %16, float* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, double *);
int main(void) {
  double *dptr;
  printf("Enter ^D: ");
  printf("%d\n", scanf("%lf", dptr));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
call   1040 <scanf@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Enter ^D: \00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [4 x i8] c"%lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double*
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = load double*, double** %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Enter ^D: \00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [4 x i8] c"%lf\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* undef)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
int /*<<< orphan*/ free_logarea();
void log_close(void) {
  free_logarea();
  closelog();
  return;
}


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

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

LLVM IR (-O0):
define void @log_close() {
%1 = call i32 (...) @free_logarea()
%2 = call i32 (...) @closelog()
ret void
}

LLVM IR (-O2):
define void @log_close() {
%1 = tail call i32 (...) @free_logarea()
%2 = tail call i32 (...) @closelog()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
void remove_tmp_file(char *tmp_file_name) {
  char sys_str[512];
  sprintf(sys_str, "/bin/rm -f %s", tmp_file_name);
  system(sys_str);
}


x86 assembly (clang, -O0):
<remove_tmp_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x210(%rbp),%rdi
call   1030 <system@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_tmp_file>:
push   %rbx
sub    $0x200,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/bin/rm -f %s\00"
define void @remove_tmp_file(i8* %0) {
%2 = alloca i8*
%3 = alloca [512 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%8 = call i32 @system(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"/bin/rm -f %s\00"
define void @remove_tmp_file(i8* %0) {
%2 = alloca [512 x i8]
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @system(i8* %3)
ret void
}
void pcmciaFreeDrivers(void) {}


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

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

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

LLVM IR (-O2):
define void @pcmciaFreeDrivers() {
ret void
}
/* Variables and functions */
int _lw6dat_flag(int);
int _lw6dat_not_flag(int index) { return (0x3fffffff ^ _lw6dat_flag(index)); }


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

x86 assembly (clang, -O2):
<_lw6dat_not_flag>:
push   %rax
call   1030 <_lw6dat_flag@plt>
xor    $0x3fffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_lw6dat_not_flag(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_lw6dat_flag(i32 %3)
%5 = xor i32 1073741823, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @_lw6dat_not_flag(i32 %0) {
%2 = tail call i32 @_lw6dat_flag(i32 %0)
%3 = xor i32 %2, 1073741823
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ pack_test();
int /*<<< orphan*/ unpack_test();
int main(int argc, char const *argv[]) {
  pack_test();
  unpack_test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @pack_test()
%4 = tail call i32 (...) @unpack_test()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p384_set_one(uintptr_t);
void fiat_p384_set_one(uint64_t out1[6]) {
  internal_fiat_p384_set_one((uintptr_t)out1);
}


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

x86 assembly (clang, -O2):
<fiat_p384_set_one>:
jmp    1030 <internal_fiat_p384_set_one@plt>

LLVM IR (-O0):
define void @fiat_p384_set_one(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i64
%5 = call i32 @internal_fiat_p384_set_one(i64 %4)
ret void
}

LLVM IR (-O2):
define void @fiat_p384_set_one(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = tail call i32 @internal_fiat_p384_set_one(i64 %2)
ret void
}
/* Variables and functions */
int error(int, char *);
int b_label(int argc, char *argv[]) {
  if (argc > 1)
    return error(1, argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<b_label>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1142 <b_label+0x32>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    $0x1,%edi
call   1030 <error@plt>
mov    %eax,-0x4(%rbp)
jmp    1149 <b_label+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_label>:
cmp    $0x2,%edi
jl     1122 <b_label+0x12>
mov    (%rsi),%rsi
mov    $0x1,%edi
jmp    1030 <error@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @b_label(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @error(i32 1, i8* %5)
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ %6, %4 ], [ 0, %2 ]
ret i32 %8
}
void X509_NAME_get_index_by_OBJ(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_NAME_get_index_by_OBJ() {
ret void
}
/* Type definitions */
struct ascii85 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _ascii85_write_tile_lines(struct ascii85 *, unsigned int);
void ascii85_write_tile_lines(void *ctx, unsigned int zl) {
  _ascii85_write_tile_lines((struct ascii85 *)ctx, zl);
}


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

x86 assembly (clang, -O2):
<ascii85_write_tile_lines>:
jmp    1030 <_ascii85_write_tile_lines@plt>

LLVM IR (-O0):
%struct.ascii85 = type { i32 }
define void @ascii85_write_tile_lines(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to %struct.ascii85*
%7 = load i32, i32* %4
%8 = call i32 @_ascii85_write_tile_lines(%struct.ascii85* %6, i32 %7)
ret void
}

LLVM IR (-O2):
%struct.ascii85 = type { i32 }
define void @ascii85_write_tile_lines(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to %struct.ascii85*
%4 = tail call i32 @_ascii85_write_tile_lines(%struct.ascii85* %3, i32 %1)
ret void
}
int max(float x, float y) {
  if (x < y) {
    return y;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    112e <max+0x2e>
cvttss2si -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <max+0x36>
cvttss2si -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
maxss  %xmm0,%xmm1
cvttss2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @max(float %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp olt float %6, %7
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load float, float* %5
%11 = fptosi float %10 to i32
store i32 %11, i32* %3
br label %15
12: ; preds = %2
%13 = load float, float* %4
%14 = fptosi float %13 to i32
store i32 %14, i32* %3
br label %15
15: ; preds = %12, %9
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @max(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %1, float %0
%5 = fptosi float %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ print_it(void *);
int print_routine(const char *salutation, const char *name) {
  const char *strings[] = {salutation, name};
  print_it((void *)strings);
  return 0;
}


x86 assembly (clang, -O0):
<print_routine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <print_it@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_routine>:
sub    $0x18,%rsp
mov    %rdi,(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rsp,%rdi
call   1030 <print_it@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @print_routine(i8* %0, i8* %1) {
%3 = alloca [2 x i8*]
%4 = bitcast [2 x i8*]* %3 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
store i8* %0, i8** %5
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 1
store i8* %1, i8** %6
%7 = call i32 @print_it(i8* %4)
ret i32 0
}
unsigned long FS__CLIB_strlen(const char *s) {
  const char *sc;
  for (sc = s; *sc != '\0'; ++sc) {
  }
  return (sc - s);
}


x86 assembly (clang, -O0):
<FS__CLIB_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1136 <FS__CLIB_strlen+0x36>
jmp    1125 <FS__CLIB_strlen+0x25>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <FS__CLIB_strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FS__CLIB_strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <FS__CLIB_strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @FS__CLIB_strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
/* Variables and functions */
double asinh(double);
double c_asinh(double arg0) { return asinh(arg0); }


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

x86 assembly (clang, -O2):
<c_asinh>:
jmp    1030 <asinh@plt>

LLVM IR (-O0):
define double @c_asinh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @asinh(double %3)
ret double %4
}

LLVM IR (-O2):
define double @c_asinh(double %0) {
%2 = tail call double @asinh(double %0)
ret double %2
}
void set_up_operators(const struct Simulation *const simulation) {
  (void)(simulation);
}


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

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

LLVM IR (-O0):
%struct.Simulation = type opaque
define void @set_up_operators(%struct.Simulation* %0) {
%2 = alloca %struct.Simulation*
store %struct.Simulation* %0, %struct.Simulation** %2
%3 = load %struct.Simulation*, %struct.Simulation** %2
ret void
}

LLVM IR (-O2):
%struct.Simulation = type opaque
define void @set_up_operators(%struct.Simulation* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ callFunction();
int main() {
  int i;
  int sum = 0;
  for (i = 0; i < 1000; i++) {
    sum += callFunction();
  }
  return sum == 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    115c <main+0x4c>
mov    $0x0,%al
call   1030 <callFunction@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x3e8,%ebp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <callFunction@plt>
add    %eax,%ebx
add    $0xffffffff,%ebp
jne    1120 <main+0x10>
xor    %eax,%eax
test   %ebx,%ebx
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 0, i32* %2
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 1000
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = call i64 (...) @callFunction()
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = add nsw i64 %10, %8
%12 = trunc i64 %11 to i32
store i32 %12, i32* %3
br label %13
13: ; preds = %7
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %4
16: ; preds = %4
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 0
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = phi i32 [ 0, %0 ], [ %7, %1 ]
%4 = tail call i64 (...) @callFunction()
%5 = trunc i64 %4 to i32
%6 = add i32 %2, %5
%7 = add nuw nsw i32 %3, 1
%8 = icmp eq i32 %7, 1000
br i1 %8, label %9, label %1
9: ; preds = %1
%10 = icmp eq i32 %6, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ getcns(int);
int cmd_gps_ip(int argc, char **argv) {
  return !getcns(0x0F13) && !getcns(0x0F16);
}


x86 assembly (clang, -O0):
<cmd_gps_ip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xf13,%edi
call   1030 <getcns@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
jne    114e <cmd_gps_ip+0x3e>
mov    $0xf16,%edi
call   1030 <getcns@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_gps_ip>:
push   %rax
mov    $0xf13,%edi
call   1030 <getcns@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1125 <cmd_gps_ip+0x15>
pop    %rcx
ret
mov    $0xf16,%edi
call   1030 <getcns@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cmd_gps_ip(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @getcns(i32 3859)
%6 = icmp ne i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = call i32 @getcns(i32 3862)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %7, %2
%12 = phi i1 [ false, %2 ], [ %10, %7 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @cmd_gps_ip(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @getcns(i32 3859)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @getcns(i32 3862)
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(char *, int, scalar_t__, int /*<<< orphan*/ *);
int /*<<< orphan*/ print(int /*<<< orphan*/ *, char const *);
scalar_t__ strlen(char *);
void print_arg(FILE *fp, const char *arg) {
  print(fp, arg);
  fwrite("", sizeof(char), strlen("") + 1, fp);
}


x86 assembly (clang, -O0):
<print_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <print@plt>
lea    0xeac(%rip),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdx
add    $0x1,%rdx
mov    -0x8(%rbp),%rcx
lea    0xe95(%rip),%rdi
mov    $0x1,%esi
call   1050 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_arg>:
push   %rbx
mov    %rdi,%rbx
call   1040 <print@plt>
xor    %edi,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <fputc@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @print_arg(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 @print(i32* %5, i8* %6)
%8 = call i64 @strlen(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%9 = add nsw i64 %8, 1
%10 = load i32*, i32** %3
%11 = call i32 @fwrite(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 1, i64 %9, i32* %10)
ret void
}

LLVM IR (-O2):
define void @print_arg(i32* %0, i8* %1) {
%3 = tail call i32 @print(i32* %0, i8* %1)
%4 = tail call i32 @fputc(i32 0, i32* %0)
ret void
}
/* Variables and functions */
char *calloc(unsigned int, unsigned int);
int /*<<< orphan*/ no_space();
char *allocate(unsigned n) {
  char *p;
  p = NULL;
  if (n) {
    p = (calloc((unsigned)(1), (unsigned)(n)));
    if (!p)
      no_space();
  }
  return (p);
}


x86 assembly (clang, -O0):
<allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1165 <allocate+0x45>
mov    -0x4(%rbp),%esi
mov    $0x1,%edi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1160 <allocate+0x40>
mov    $0x0,%al
call   1030 <no_space@plt>
jmp    1165 <allocate+0x45>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocate>:
push   %rbx
test   %edi,%edi
je     1144 <allocate+0x24>
mov    %edi,%esi
mov    $0x1,%edi
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <allocate+0x26>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <no_space@plt>
jmp    1146 <allocate+0x26>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @allocate(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @calloc(i32 1, i32 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (...) @no_space()
br label %8
8: ; preds = %3, %6, %1
%9 = phi i8* [ %4, %3 ], [ null, %6 ], [ null, %1 ]
ret i8* %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int mkdir(char const *, int /*<<< orphan*/);
int mg_mkdir(const char *path, uint32_t mode) { return mkdir(path, mode); }


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

x86 assembly (clang, -O2):
<mg_mkdir>:
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @mg_mkdir(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @mkdir(i8* %0, i32 %1)
ret i32 %3
}
char *procprt_NOTAVAIL_7(struct tstat *curstat, int avgval, int nsecs) {
  return "      ?";
}


x86 assembly (clang, -O0):
<procprt_NOTAVAIL_7>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xeeb(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tstat = type opaque
@.str = [8 x i8] c" ?\00"
define i8* @procprt_NOTAVAIL_7(%struct.tstat* %0, i32 %1, i32 %2) {
%4 = alloca %struct.tstat*
%5 = alloca i32
%6 = alloca i32
store %struct.tstat* %0, %struct.tstat** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tstat = type opaque
@.str = [8 x i8] c" ?\00"
define i8* @procprt_NOTAVAIL_7(%struct.tstat* nocapture readnone %0, i32 %1, i32 %2) {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ timer_t;
struct itimerspec {
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int timer_settime(int /*<<< orphan*/ *, int /*<<< orphan*/, struct itimerspec *,
                  struct itimerspec *);
int main(void) {
  timer_t timerid = 0;
  struct itimerspec new = {0};
  struct itimerspec old = {0};
  return timer_settime(&timerid, 0, &new, &old);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
lea    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1030 <timer_settime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0x8(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
xor    %esi,%esi
call   1030 <timer_settime@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.itimerspec = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.itimerspec
%4 = alloca %struct.itimerspec
store i32 0, i32* %1
store i32 0, i32* %2
%5 = bitcast %struct.itimerspec* %3 to i8*
%6 = bitcast %struct.itimerspec* %4 to i8*
%7 = call i32 @timer_settime(i32* %2, i32 0, %struct.itimerspec* %3, %struct.itimerspec* %4)
ret i32 %7
}

LLVM IR (-O2):
%struct.itimerspec = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.itimerspec
%3 = alloca %struct.itimerspec
%4 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%5 = bitcast %struct.itimerspec* %2 to i8*
%6 = getelementptr inbounds %struct.itimerspec, %struct.itimerspec* %2, i64 0, i32 0
store i32 0, i32* %6
%7 = bitcast %struct.itimerspec* %3 to i8*
%8 = getelementptr inbounds %struct.itimerspec, %struct.itimerspec* %3, i64 0, i32 0
store i32 0, i32* %8
%9 = call i32 @timer_settime(i32* %1, i32 0, %struct.itimerspec* %2, %struct.itimerspec* %3)
ret i32 %9
}
void g_io_channel_get_buffer_condition() {}


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

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

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

LLVM IR (-O2):
define void @g_io_channel_get_buffer_condition() {
ret void
}
/* Type definitions */
struct Fd {
  int dummy;
};

/* Variables and functions */
struct Fd *fd2data(struct Fd *);
int sys_page_unmap(int /*<<< orphan*/, struct Fd *);
int devpipe_close(struct Fd *fd) {
  (void)sys_page_unmap(0, fd);
  return sys_page_unmap(0, fd2data(fd));
}


x86 assembly (clang, -O0):
<devpipe_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1030 <sys_page_unmap@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fd2data@plt>
mov    %rax,%rsi
xor    %edi,%edi
call   1030 <sys_page_unmap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<devpipe_close>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <sys_page_unmap@plt>
mov    %rbx,%rdi
call   1040 <fd2data@plt>
xor    %edi,%edi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <sys_page_unmap@plt>

LLVM IR (-O0):
%struct.Fd = type { i32 }
define i32 @devpipe_close(%struct.Fd* %0) {
%2 = alloca %struct.Fd*
store %struct.Fd* %0, %struct.Fd** %2
%3 = load %struct.Fd*, %struct.Fd** %2
%4 = call i32 @sys_page_unmap(i32 0, %struct.Fd* %3)
%5 = load %struct.Fd*, %struct.Fd** %2
%6 = call %struct.Fd* @fd2data(%struct.Fd* %5)
%7 = call i32 @sys_page_unmap(i32 0, %struct.Fd* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.Fd = type { i32 }
define i32 @devpipe_close(%struct.Fd* %0) {
%2 = tail call i32 @sys_page_unmap(i32 0, %struct.Fd* %0)
%3 = tail call %struct.Fd* @fd2data(%struct.Fd* %0)
%4 = tail call i32 @sys_page_unmap(i32 0, %struct.Fd* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ add(int, int);
int /*<<< orphan*/ echo(int /*<<< orphan*/, char *);
main() { echo(add(1, 2), "Hello World!"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <add@plt>
mov    %eax,%edi
lea    0xec4(%rip),%rsi
call   1030 <echo@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <add@plt>
lea    0xec9(%rip),%rsi
mov    %eax,%edi
call   1030 <echo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = call i32 @add(i32 1, i32 2)
%2 = call i32 @echo(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32 @add(i32 1, i32 2)
%2 = tail call i32 @echo(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int foo(unsigned x) {
  if (x == 0)
    __builtin_unreachable();
  return __builtin_ffs(x) - 1;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1111 <foo+0x11>
mov    -0x4(%rbp),%edx
bsf    %edx,%eax
add    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
bsf    %edi,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
unreachable
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @llvm.cttz.i32(i32 %7, i1 true)
%9 = add i32 %8, 1
%10 = icmp eq i32 %7, 0
%11 = select i1 %10, i32 0, i32 %9
%12 = sub nsw i32 %11, 1
ret i32 %12
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp ne i32 %0, 0
tail call void @llvm.assume(i1 %2)
%3 = tail call i32 @llvm.cttz.i32(i32 %0, i1 true)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int startup(int check) {
  int yesno = 1;
  if (check < 2) {
    puts("No arguments.  New environment.");
    yesno = 0;
  }
  return (yesno);
}


x86 assembly (clang, -O0):
<startup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    113f <startup+0x2f>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startup>:
mov    $0x1,%eax
cmp    $0x1,%edi
jg     112d <startup+0x1d>
push   %rax
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
@.str = [32 x i8] c"No arguments. New environment.\00"
define i32 @startup(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = phi i32 [ 0, %3 ], [ 1, %1 ]
ret i32 %6
}
void func9(void) {}


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

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

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

LLVM IR (-O2):
define void @func9() {
ret void
}
void CRSetCrashLogMessage2(const char *path) {}


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

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

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

LLVM IR (-O2):
define void @CRSetCrashLogMessage2(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void USART2_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @USART2_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @USART2_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
int dns_v_rel(void) { return 0x20150630; }


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

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

LLVM IR (-O0):
define i32 @dns_v_rel() {
ret i32 538248752
}

LLVM IR (-O2):
define i32 @dns_v_rel() {
ret i32 538248752
}
/* Type definitions */
struct stat {
  int st_blocks;
};

/* Variables and functions */
int fstat(int, struct stat *);
int /*<<< orphan*/ perror(char *);
int get_nr_blocks(int fd) {
  struct stat buf;
  int ret;
  ret = fstat(fd, &buf);
  if (ret < 0) {
    perror("fstat");
    return -1;
  }
  return buf.st_blocks;
}


x86 assembly (clang, -O0):
<get_nr_blocks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1040 <fstat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    115c <get_nr_blocks+0x3c>
lea    0xeb5(%rip),%rdi
call   1030 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <get_nr_blocks+0x42>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_nr_blocks>:
push   %rax
mov    %rsp,%rsi
call   1040 <fstat@plt>
test   %eax,%eax
js     1132 <get_nr_blocks+0x12>
mov    (%rsp),%eax
pop    %rcx
ret
lea    0xec7(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [6 x i8] c"fstat\00"
define i32 @get_nr_blocks(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.stat
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @fstat(i32 %6, %struct.stat* %4)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %15
12: ; preds = %1
%13 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%14 = load i32, i32* %13
store i32 %14, i32* %2
br label %15
15: ; preds = %12, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [6 x i8] c"fstat\00"
define i32 @get_nr_blocks(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @fstat(i32 %0, %struct.stat* %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %11
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%10 = load i32, i32* %9
br label %11
11: ; preds = %8, %6
%12 = phi i32 [ -1, %6 ], [ %10, %8 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const);
void imprimirInverso(const char *str) {
  if (str[0] == '\0') {
    return;
  } else {
    imprimirInverso(str + 1);
    printf("%c", str[0]);
  }
}


x86 assembly (clang, -O0):
<imprimirInverso>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1141 <imprimirInverso+0x21>
jmp    1161 <imprimirInverso+0x41>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1030 <imprimirInverso@plt>
mov    -0x8(%rbp),%rax
lea    0xea7(%rip),%rdi
movsbl (%rax),%esi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimirInverso>:
push   %rbx
cmpb   $0x0,(%rdi)
je     1142 <imprimirInverso+0x22>
mov    %rdi,%rbx
add    $0x1,%rdi
call   1030 <imprimirInverso@plt>
movsbl (%rbx),%esi
lea    0xec4(%rip),%rdi
pop    %rbx
jmp    1040 <printf@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @imprimirInverso(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1, %5
ret void
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
tail call void @imprimirInverso(i8* %6)
%7 = load i8, i8* %0
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %7)
br label %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fclose(int /*<<< orphan*/ *);
int close_dcd_write(FILE *fd) {
  int result;
  result = fclose(fd);
  return result;
}


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

x86 assembly (clang, -O2):
<close_dcd_write>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define i32 @close_dcd_write(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret i32 %2
}
int ppc_cannot_store_register(int regno) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ppc_cannot_store_register(i32 %0) {
ret i32 0
}
int main() {
  int a = 5;
  int b = 7;
  int c = 3;
  if (a > c || b > c) {
  }
  if (a > c) {
  } else if (b > c) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1138 <main+0x38>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113d <main+0x3d>
jmp    113d <main+0x3d>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    114e <main+0x4e>
jmp    1164 <main+0x64>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    115f <main+0x5f>
jmp    115f <main+0x5f>
jmp    1164 <main+0x64>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 7, i32* %3
store i32 3, i32* %4
%5 = load i32, i32* %2
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
br i1 %7, label %12, label %8
8: ; preds = %0
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %8, %0
br label %13
13: ; preds = %12, %8
%14 = load i32, i32* %2
%15 = load i32, i32* %4
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %13
br label %24
18: ; preds = %13
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
br label %23
23: ; preds = %22, %18
br label %24
24: ; preds = %23, %17
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int foo(int i) {
  static const void *const table[] = {&&begin, &&end};
  goto *(table[i]);
begin:
  bar();
end:
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
lea    0x2cea(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x10(%rbp)
jmp    1142 <foo+0x32>
mov    $0x0,%al
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret
mov    -0x10(%rbp),%rax
jmp    *%rax

x86 assembly (clang, -O2):
<foo>:
push   %rax
movslq %edi,%rax
lea    0x2cf5(%rip),%rcx
jmp    *(%rcx,%rax,8)
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@foo.table = internal constant [2 x i8*] [i8* blockaddress(@foo, %7), i8* blockaddress(@foo, %9)]
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* @foo.table, i64 0, i64 %4
%6 = load i8*, i8** %5
br label %10
7: ; preds = %10
%8 = call i32 (...) @bar()
br label %9
9: ; preds = %7, %10
ret i32 0
10: ; preds = %1
%11 = phi i8* [ %6, %1 ]
indirectbr i8* %11, [label %7, label %9]
}

LLVM IR (-O2):
@foo.table = internal unnamed_addr constant [2 x i8*] [i8* blockaddress(@foo, %5), i8* blockaddress(@foo, %7)]
define i32 @foo(i32 %0) {
%2 = sext i32 %0 to i64
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* @foo.table, i64 0, i64 %2
%4 = load i8*, i8** %3
indirectbr i8* %4, [label %5, label %7]
5: ; preds = %1
%6 = tail call i32 (...) @bar()
br label %7
7: ; preds = %5, %1
ret i32 0
}
void gtk_combo_box_insert_text() {}


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

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

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

LLVM IR (-O2):
define void @gtk_combo_box_insert_text() {
ret void
}
char *Server_status(int d) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @Server_status(i32 %0) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main(int argc, char *argv[]) {
  int x, y, *p, *q;
  int havoc;
  p = &x;
  x = 0;
  y = 1;
  assert(*p == 0);
  if (havoc) {
    q = &x;
  } else {
    q = &y;
  }
  assert(*q == 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x20(%rbp),%rax
cmpl   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x2c(%rbp)
je     1167 <main+0x57>
lea    -0x14(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    116f <main+0x5f>
lea    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmpl   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* %6, i32** %8
store i32 0, i32* %6
store i32 1, i32* %7
%11 = load i32*, i32** %8
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load i32, i32* %10
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %2
store i32* %6, i32** %9
br label %20
19: ; preds = %2
store i32* %7, i32** %9
br label %20
20: ; preds = %19, %18
%21 = load i32*, i32** %9
%22 = load i32, i32* %21
%23 = icmp eq i32 %22, 0
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 0)
ret i32 0
}