xunge/DecIR huggingface dataset:
void __sulong_fp80_mul(long double *out, long double *x, long double *y) {
  *out = *x * *y;
}


x86 assembly (clang, -O0):
<__sulong_fp80_mul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
fldt   (%rax)
mov    -0x18(%rbp),%rax
fldt   (%rax)
fmulp  %st,%st(1)
mov    -0x8(%rbp),%rax
fstpt  (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_fp80_mul>:
fldt   (%rsi)
fldt   (%rdx)
fmulp  %st,%st(1)
fstpt  (%rdi)
ret

LLVM IR (-O0):
define void @__sulong_fp80_mul(x86_fp80* %0, x86_fp80* %1, x86_fp80* %2) {
%4 = alloca x86_fp80*
%5 = alloca x86_fp80*
%6 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %4
store x86_fp80* %1, x86_fp80** %5
store x86_fp80* %2, x86_fp80** %6
%7 = load x86_fp80*, x86_fp80** %5
%8 = load x86_fp80, x86_fp80* %7
%9 = load x86_fp80*, x86_fp80** %6
%10 = load x86_fp80, x86_fp80* %9
%11 = fmul x86_fp80 %8, %10
%12 = load x86_fp80*, x86_fp80** %4
store x86_fp80 %11, x86_fp80* %12
ret void
}

LLVM IR (-O2):
define void @__sulong_fp80_mul(x86_fp80* nocapture writeonly %0, x86_fp80* nocapture %1, x86_fp80* nocapture %2) {
%4 = load x86_fp80, x86_fp80* %1
%5 = load x86_fp80, x86_fp80* %2
%6 = fmul x86_fp80 %4, %5
store x86_fp80 %6, x86_fp80* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *simplifyPath(char *);
int main(int argc, char *argv[]) {
  if (argc == 2) {
    printf("%s\n", simplifyPath(argv[1]));
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1168 <main+0x48>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <simplifyPath@plt>
mov    %rax,%rsi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    116f <main+0x4f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x2,%edi
jne    1149 <main+0x29>
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <simplifyPath@plt>
lea    0xec5(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i8* @simplifyPath(i8* %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %10
}
/* Type definitions */
struct lk_list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_LK_LIST_HEAD(struct lk_list_head *);
int /*<<< orphan*/ __lk_list_del_entry(struct lk_list_head *);
void lk_list_del_init(struct lk_list_head *entry) {
  __lk_list_del_entry(entry);
  INIT_LK_LIST_HEAD(entry);
}


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

x86 assembly (clang, -O2):
<lk_list_del_init>:
push   %rbx
mov    %rdi,%rbx
call   1030 <__lk_list_del_entry@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <INIT_LK_LIST_HEAD@plt>

LLVM IR (-O0):
%struct.lk_list_head = type { i32 }
define void @lk_list_del_init(%struct.lk_list_head* %0) {
%2 = alloca %struct.lk_list_head*
store %struct.lk_list_head* %0, %struct.lk_list_head** %2
%3 = load %struct.lk_list_head*, %struct.lk_list_head** %2
%4 = call i32 @__lk_list_del_entry(%struct.lk_list_head* %3)
%5 = load %struct.lk_list_head*, %struct.lk_list_head** %2
%6 = call i32 @INIT_LK_LIST_HEAD(%struct.lk_list_head* %5)
ret void
}

LLVM IR (-O2):
%struct.lk_list_head = type { i32 }
define void @lk_list_del_init(%struct.lk_list_head* %0) {
%2 = tail call i32 @__lk_list_del_entry(%struct.lk_list_head* %0)
%3 = tail call i32 @INIT_LK_LIST_HEAD(%struct.lk_list_head* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_macro_2(void) { puts("Hello, "); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"Hello, \00"
define void @print_macro_2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int _puts_default(const char *s) { return fputs(s, stdout); }


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

x86 assembly (clang, -O2):
<_puts_default>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @_puts_default(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdout
%5 = call i32 @fputs(i8* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @_puts_default(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int __is_transparent(int bitdepth, uint32_t color) {
  if (bitdepth == 2) {
    if ((color & 0x1) == 0x0) {
      return 1;
    }
  } else {
    if ((color & 0xFF) == 0x00) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<__is_transparent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1134 <__is_transparent+0x34>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    112f <__is_transparent+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    115d <__is_transparent+0x5d>
jmp    1156 <__is_transparent+0x56>
mov    -0xc(%rbp),%eax
and    $0xff,%eax
cmp    $0x0,%eax
jne    1151 <__is_transparent+0x51>
movl   $0x1,-0x4(%rbp)
jmp    115d <__is_transparent+0x5d>
jmp    1156 <__is_transparent+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__is_transparent>:
cmp    $0x2,%edi
jne    1111 <__is_transparent+0x11>
mov    $0x1,%eax
test   $0x1,%sil
jne    1116 <__is_transparent+0x16>
ret
test   %sil,%sil
je     1119 <__is_transparent+0x19>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @__is_transparent(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = and i32 %1, 1
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %10
7: ; preds = %2
%8 = and i32 %1, 255
%9 = icmp eq i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %7, %4
br label %11
11: ; preds = %7, %4, %10
%12 = phi i32 [ 0, %10 ], [ 1, %4 ], [ 1, %7 ]
ret i32 %12
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int next_dobldobl_solution(int k) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc4c(507, &k, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<next_dobldobl_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1fb,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_dobldobl_solution>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1fb,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @next_dobldobl_solution(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %4
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 507, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @next_dobldobl_solution(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 507, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("usage: ./rw [input file] [output file] [sleep time of fill] [sleep "
         "time of drain]]\n");
  printf("The range of sleep time of fill and drain must be [0, 0,1000000]\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2f(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [84 x i8] c"usage: ./rw [input file] [output file] [sleep time of fill] [sleep time of drain]]\0A\00"
@.str.1 = [66 x i8] c"The range of sleep time of fill and drain must be [0, 0,1000000]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [83 x i8] c"usage: ./rw [input file] [output file] [sleep time of fill] [sleep time of drain]]\00"
@str.2 = [65 x i8] c"The range of sleep time of fill and drain must be [0, 0,1000000]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.2, i64 0, i64 0))
ret void
}
void notification_backend_show(const char *title, const char *text) {}


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

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

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

LLVM IR (-O2):
define void @notification_backend_show(i8* nocapture %0, i8* nocapture %1) {
ret void
}
float inches2metres(float feet, float inches) {
  float c;
  c = (feet * 12) + inches;
  c = (c * 2.54) / 100;
  return c;
}


x86 assembly (clang, -O0):
<inches2metres>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xef0(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeca(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb6(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<inches2metres>:
mulss  0xef8(%rip),%xmm0
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xef0(%rip),%xmm0
divsd  0xef0(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @inches2metres(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = call float @llvm.fmuladd.f32(float %6, float 1.200000e+01, float %7)
store float %8, float* %5
%9 = load float, float* %5
%10 = fpext float %9 to double
%11 = fmul double %10, 2.540000e+00
%12 = fdiv double %11, 1.000000e+02
%13 = fptrunc double %12 to float
store float %13, float* %5
%14 = load float, float* %5
ret float %14
}

LLVM IR (-O2):
define float @inches2metres(float %0, float %1) {
%3 = tail call float @llvm.fmuladd.f32(float %0, float 1.200000e+01, float %1)
%4 = fpext float %3 to double
%5 = fmul double %4, 2.540000e+00
%6 = fdiv double %5, 1.000000e+02
%7 = fptrunc double %6 to float
ret float %7
}
unsigned int i_to_I(unsigned int i, unsigned int I_size, unsigned int D_size) {
  unsigned long int regions = I_size + 1;
  unsigned long int hi = D_size;
  unsigned long int j = i;
  unsigned int r = ((j + 1) * hi - (regions - (j + 1))) / (regions);
  return r;
}


x86 assembly (clang, -O0):
<i_to_I>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
imul   -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    -0x28(%rbp),%rdx
add    $0x1,%rdx
sub    %rdx,%rcx
sub    %rcx,%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_to_I>:
add    $0x1,%esi
mov    %edx,%ecx
mov    %edi,%eax
add    $0x1,%rax
imul   %rax,%rcx
sub    %rsi,%rax
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x20,%rcx
je     1124 <i_to_I+0x24>
xor    %edx,%edx
div    %rsi
ret
xor    %edx,%edx
div    %esi
ret

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

LLVM IR (-O2):
define i32 @i_to_I(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %1, 1
%5 = zext i32 %4 to i64
%6 = zext i32 %2 to i64
%7 = zext i32 %0 to i64
%8 = add nuw nsw i64 %7, 1
%9 = mul nuw i64 %8, %6
%10 = sub nsw i64 %8, %5
%11 = add i64 %10, %9
%12 = udiv i64 %11, %5
%13 = trunc i64 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ assertInt(int, int);
int /*<<< orphan*/ assertIntDescription(int, int, char *);
int finishTestCase();
int /*<<< orphan*/ initTestCase(char *);
int test2(void) {
  initTestCase("Test something else");
  assertInt(10, 10);
  assertIntDescription(5, 5, "Simple calculation");
  return finishTestCase();
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1030 <initTestCase@plt>
mov    $0xa,%esi
mov    %esi,%edi
call   1060 <assertInt@plt>
mov    $0x5,%esi
lea    0xeac(%rip),%rdx
mov    %esi,%edi
call   1040 <assertIntDescription@plt>
mov    $0x0,%al
call   1050 <finishTestCase@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <initTestCase@plt>
mov    $0xa,%edi
mov    $0xa,%esi
call   1060 <assertInt@plt>
lea    0xeb1(%rip),%rdx
mov    $0x5,%edi
mov    $0x5,%esi
call   1040 <assertIntDescription@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <finishTestCase@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Test something else\00"
@.str.1 = [19 x i8] c"Simple calculation\00"
define i32 @test2() {
%1 = call i32 @initTestCase(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @assertInt(i32 10, i32 10)
%3 = call i32 @assertIntDescription(i32 5, i32 5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @finishTestCase()
ret i32 %4
}

LLVM IR (-O2):
@.str = [20 x i8] c"Test something else\00"
@.str.1 = [19 x i8] c"Simple calculation\00"
define i32 @test2() {
%1 = tail call i32 @initTestCase(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @assertInt(i32 10, i32 10)
%3 = tail call i32 @assertIntDescription(i32 5, i32 5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @finishTestCase()
ret i32 %4
}
f(a) { return a; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 returned %0) {
ret i32 %0
}
int space_or_null(char c) {
  return (c == ' ' || c == '\t' || c == '\n' || c == '\0');
}


x86 assembly (clang, -O0):
<space_or_null>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <space_or_null+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <space_or_null+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114d <space_or_null+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<space_or_null>:
cmp    $0x20,%dil
ja     1120 <space_or_null+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <space_or_null+0x20>
ret
xor    %eax,%eax
test   %dil,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @space_or_null(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 0
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
void foo122(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo122(i32 %0) {
ret void
}
unsigned int openpgp_packet_tag(const unsigned char buf) {
  if ((buf & 0x80) == 0)
    return 0;
  return ((buf & 0x40) == 0 ? ((buf >> 2) & 0x0f) : (buf & 0x3f));
}


x86 assembly (clang, -O0):
<openpgp_packet_tag>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
jne    1128 <openpgp_packet_tag+0x28>
movl   $0x0,-0x4(%rbp)
jmp    115a <openpgp_packet_tag+0x5a>
movzbl -0x5(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
jne    114a <openpgp_packet_tag+0x4a>
movzbl -0x5(%rbp),%eax
sar    $0x2,%eax
and    $0xf,%eax
mov    %eax,-0xc(%rbp)
jmp    1154 <openpgp_packet_tag+0x54>
movzbl -0x5(%rbp),%eax
and    $0x3f,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<openpgp_packet_tag>:
xor    %eax,%eax
test   $0x80,%dil
je     111c <openpgp_packet_tag+0x1c>
mov    %edi,%ecx
shr    $0x2,%ecx
and    $0xf,%ecx
mov    %edi,%eax
and    $0x3f,%eax
test   $0x40,%dil
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @openpgp_packet_tag(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 128
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %25
9: ; preds = %1
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = and i32 %11, 64
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %9
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = ashr i32 %16, 2
%18 = and i32 %17, 15
br label %23
19: ; preds = %9
%20 = load i8, i8* %3
%21 = zext i8 %20 to i32
%22 = and i32 %21, 63
br label %23
23: ; preds = %19, %14
%24 = phi i32 [ %18, %14 ], [ %22, %19 ]
store i32 %24, i32* %2
br label %25
25: ; preds = %23, %8
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @openpgp_packet_tag(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = and i32 %2, 128
%4 = icmp eq i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %1
%6 = and i32 %2, 64
%7 = icmp eq i32 %6, 0
%8 = lshr i32 %2, 2
%9 = and i32 %8, 15
%10 = and i32 %2, 63
%11 = select i1 %7, i32 %9, i32 %10
br label %12
12: ; preds = %1, %5
%13 = phi i32 [ %11, %5 ], [ 0, %1 ]
ret i32 %13
}
zero(s, n) float *s;
int n;
{
  while (n--) {
    s[0] = 0.0;
    s++;
  }
}


x86 assembly (clang, -O0):
<zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     113b <zero+0x3b>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <zero+0xb>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero>:
test   %esi,%esi
je     1126 <zero+0x16>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @zero(float* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = bitcast float* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void mostra(int v[5]) {
  for (int i = 0; i < 5; i++)
    printf("%d\n", v[i]);
}


x86 assembly (clang, -O0):
<mostra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1152 <mostra+0x42>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <mostra+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mostra>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%esi
lea    0xee0(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0x4(%rbx),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0x8(%rbx),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0xc(%rbx),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0x10(%rbx),%esi
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @mostra(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds i32, i32* %0, i64 3
%11 = load i32, i32* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds i32, i32* %0, i64 4
%14 = load i32, i32* %13
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alr_cc_0();
int /*<<< orphan*/ alr_cc_1();
int /*<<< orphan*/ alr_cc_2();
int /*<<< orphan*/ alr_cc_3();
int main() {
  alr_cc_0();
  alr_cc_1();
  alr_cc_2();
  alr_cc_3();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <alr_cc_0@plt>
xor    %eax,%eax
call   1030 <alr_cc_1@plt>
xor    %eax,%eax
call   1060 <alr_cc_2@plt>
xor    %eax,%eax
call   1040 <alr_cc_3@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @alr_cc_0()
%3 = call i32 (...) @alr_cc_1()
%4 = call i32 (...) @alr_cc_2()
%5 = call i32 (...) @alr_cc_3()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @alr_cc_0()
%2 = tail call i32 (...) @alr_cc_1()
%3 = tail call i32 (...) @alr_cc_2()
%4 = tail call i32 (...) @alr_cc_3()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rem_on();
void v6() {
  *(volatile unsigned long *)((void *)0xfffff400 + 0x30) =
      (1 << (1)) | (1 << (0));
  rem_on();
}


x86 assembly (clang, -O0):
<v6>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffff400,%eax
movq   $0x3,0x30(%rax)
mov    $0x0,%al
call   1030 <rem_on@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<v6>:
mov    $0xfffff430,%eax
movq   $0x3,(%rax)
xor    %eax,%eax
jmp    1030 <rem_on@plt>

LLVM IR (-O0):
define void @v6() {
store volatile i64 3, i64* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 4294964224 to i8*), i64 48) to i64*)
%1 = call i32 (...) @rem_on()
ret void
}

LLVM IR (-O2):
define void @v6() {
store volatile i64 3, i64* inttoptr (i64 4294964272 to i64*)
%1 = tail call i32 (...) @rem_on()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ write(int, char *, int);
void alarmhandler(int sig) {
  write(1, "timeout\n", 8);
  _exit(1);
}


x86 assembly (clang, -O0):
<alarmhandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
lea    0xec9(%rip),%rsi
mov    $0x8,%edx
call   1040 <write@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<alarmhandler>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
mov    $0x8,%edx
call   1040 <write@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"timeout\0A\00"
define void @alarmhandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
%4 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [9 x i8] c"timeout\0A\00"
define void @alarmhandler(i32 %0) {
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
%3 = tail call i32 @_exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ return_sense(int, int /*<<< orphan*/, int /*<<< orphan*/ *,
                                int /*<<< orphan*/ *);
void sam_data_protect(uint16_t ascq, uint8_t *sam_stat) {
  return_sense(0x07, ascq, NULL, sam_stat);
}


x86 assembly (clang, -O0):
<sam_data_protect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rcx
mov    $0x7,%edi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <return_sense@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sam_data_protect>:
mov    %rsi,%rcx
mov    %edi,%esi
mov    $0x7,%edi
xor    %edx,%edx
jmp    1030 <return_sense@plt>

LLVM IR (-O0):
define void @sam_data_protect(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 @return_sense(i32 7, i32 %5, i32* null, i32* %6)
ret void
}

LLVM IR (-O2):
define void @sam_data_protect(i32 %0, i32* %1) {
%3 = tail call i32 @return_sense(i32 7, i32 %0, i32* null, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aes128(unsigned char *, void const *, unsigned char *);
int /*<<< orphan*/ transpose44(char *, char *);
void aes128_cipher(const void *plain, const void *key, void *cipher) {
  char in[16], out[16];
  transpose44(in, plain);
  aes128((unsigned char *)in, key, (unsigned char *)out);
  transpose44((char *)cipher, out);
}


x86 assembly (clang, -O0):
<aes128_cipher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <transpose44@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   1030 <aes128@plt>
mov    -0x18(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1040 <transpose44@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes128_cipher>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0x10(%rsp),%r15
mov    %r15,%rdi
call   1040 <transpose44@plt>
mov    %rsp,%r12
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1030 <aes128@plt>
mov    %r14,%rdi
mov    %r12,%rsi
call   1040 <transpose44@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @aes128_cipher(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [16 x i8]
%8 = alloca [16 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %4
%11 = call i32 @transpose44(i8* %9, i8* %10)
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%13 = load i8*, i8** %5
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%15 = call i32 @aes128(i8* %12, i8* %13, i8* %14)
%16 = load i8*, i8** %6
%17 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%18 = call i32 @transpose44(i8* %16, i8* %17)
ret void
}

LLVM IR (-O2):
define void @aes128_cipher(i8* %0, i8* %1, i8* %2) {
%4 = alloca [16 x i8]
%5 = alloca [16 x i8]
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%8 = call i32 @transpose44(i8* %6, i8* %0)
%9 = call i32 @aes128(i8* %6, i8* %1, i8* %7)
%10 = call i32 @transpose44(i8* %2, i8* %7)
ret void
}
/* Variables and functions */
int get_ticks();
void milli_delay(int milli_sec) {
  int t = get_ticks();
  while (((get_ticks() - t) * 1000 / 100) < milli_sec) {
  }
}


x86 assembly (clang, -O0):
<milli_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <get_ticks@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <get_ticks@plt>
sub    -0x8(%rbp),%eax
imul   $0x3e8,%eax,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    -0x4(%rbp),%eax
jge    114b <milli_delay+0x3b>
jmp    1125 <milli_delay+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<milli_delay>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <get_ticks@plt>
mov    %eax,%ebp
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <get_ticks@plt>
sub    %ebp,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
cmp    %ebx,%eax
jl     1120 <milli_delay+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @milli_delay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @get_ticks()
store i32 %4, i32* %3
br label %5
5: ; preds = %13, %1
%6 = call i32 (...) @get_ticks()
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = mul nsw i32 %8, 1000
%10 = sdiv i32 %9, 100
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %5
br label %5
14: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @milli_delay(i32 %0) {
%2 = tail call i32 (...) @get_ticks()
br label %3
3: ; preds = %3, %1
%4 = tail call i32 (...) @get_ticks()
%5 = sub nsw i32 %4, %2
%6 = mul nsw i32 %5, 10
%7 = icmp slt i32 %6, %0
br i1 %7, label %3, label %8
8: ; preds = %3
ret void
}
double pdfUniform(double a, double b, double x) { return (1.0 / (b - a)); }


x86 assembly (clang, -O0):
<pdfUniform>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  0xedb(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdfUniform>:
subsd  %xmm0,%xmm1
movsd  0xef4(%rip),%xmm0
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @pdfUniform(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = fdiv double 1.000000e+00, %9
ret double %10
}

LLVM IR (-O2):
define double @pdfUniform(double %0, double %1, double %2) {
%4 = fsub double %1, %0
%5 = fdiv double 1.000000e+00, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ gen_systypes();
int main() {
  gen_systypes();
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <gen_systypes@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <gen_systypes@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @gen_systypes()
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @gen_systypes()
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ drv_generic_serial_write(char *, int);
void drv_WN_clear(void) {
  drv_generic_serial_write("\033"
                           "[2J",
                           4);
}


x86 assembly (clang, -O0):
<drv_WN_clear>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x4,%esi
call   1030 <drv_generic_serial_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_WN_clear>:
lea    0xee9(%rip),%rdi
mov    $0x4,%esi
jmp    1030 <drv_generic_serial_write@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
define void @drv_WN_clear() {
%1 = call i32 @drv_generic_serial_write(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define void @drv_WN_clear() {
%1 = tail call i32 @drv_generic_serial_write(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outOfMemory();
void *realloc(void *, size_t);
void *safe_realloc(void *ptr, size_t size) {
  if ((ptr = realloc(ptr, size)) == NULL)
    outOfMemory();
  return ptr;
}


x86 assembly (clang, -O0):
<safe_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    1152 <safe_realloc+0x32>
mov    $0x0,%al
call   1040 <outOfMemory@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @safe_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
store i8* %7, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @outOfMemory()
br label %11
11: ; preds = %9, %2
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define noalias i8* @safe_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @outOfMemory()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void error(char *string) {
  fputs("JSMIN Error: ", stderr);
  fputs(string, stderr);
  fputc('\n', stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
lea    0xeb4(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e84(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea2(%rip),%r14
mov    (%r14),%esi
lea    0xeb8(%rip),%rdi
call   1030 <fputs@plt>
mov    (%r14),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
mov    (%r14),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"JSMIN Error: \00"
@stderr = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i8*, i8** %2
%6 = load i32, i32* @stderr
%7 = call i32 @fputs(i8* %5, i32 %6)
%8 = load i32, i32* @stderr
%9 = call i32 @fputc(i8 signext 10, i32 %8)
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"JSMIN Error: \00"
@stderr = global i32 0
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* %0, i32 %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fputc(i8 signext 10, i32 %6)
%8 = tail call i32 @exit(i32 1)
unreachable
}
int separator(unsigned char c) {
  if (c < 0x30 || (c > 0x39 && c < 0x41) ||
      (c > 0x5A && c < 0x61 && c != '_') || c > 0x7A)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<separator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1165 <separator+0x65>
movzbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jle    1131 <separator+0x31>
movzbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1165 <separator+0x65>
movzbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jle    1158 <separator+0x58>
movzbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jge    1158 <separator+0x58>
movzbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
jne    1165 <separator+0x65>
movzbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jle    1171 <separator+0x71>
movl   $0x1,-0x4(%rbp)
jmp    1178 <separator+0x78>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<separator>:
mov    $0x1,%eax
cmp    $0x30,%dil
jb     1130 <separator+0x30>
lea    -0x3a(%rdi),%ecx
cmp    $0x7,%cl
jb     1130 <separator+0x30>
lea    -0x5b(%rdi),%eax
cmp    $0x6,%al
setb   %al
cmp    $0x5f,%dil
setne  %cl
and    %al,%cl
cmp    $0x7b,%dil
setae  %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @separator(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp slt i32 %5, 48
br i1 %6, label %31, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp sgt i32 %9, 57
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = icmp slt i32 %13, 65
br i1 %14, label %31, label %15
15: ; preds = %11, %7
%16 = load i8, i8* %3
%17 = zext i8 %16 to i32
%18 = icmp sgt i32 %17, 90
br i1 %18, label %19, label %27
19: ; preds = %15
%20 = load i8, i8* %3
%21 = zext i8 %20 to i32
%22 = icmp slt i32 %21, 97
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i8, i8* %3
%25 = zext i8 %24 to i32
%26 = icmp ne i32 %25, 95
br i1 %26, label %31, label %27
27: ; preds = %23, %19, %15
%28 = load i8, i8* %3
%29 = zext i8 %28 to i32
%30 = icmp sgt i32 %29, 122
br i1 %30, label %31, label %32
31: ; preds = %27, %23, %11, %1
store i32 1, i32* %2
br label %33
32: ; preds = %27
store i32 0, i32* %2
br label %33
33: ; preds = %32, %31
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @separator(i8 zeroext %0) {
%2 = icmp ult i8 %0, 48
%3 = add i8 %0, -58
%4 = icmp ult i8 %3, 7
%5 = or i1 %2, %4
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = add i8 %0, -91
%8 = icmp ult i8 %7, 6
%9 = icmp ne i8 %0, 95
%10 = and i1 %9, %8
%11 = icmp ugt i8 %0, 122
%12 = or i1 %11, %10
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %6, %1
%15 = phi i32 [ 1, %1 ], [ %13, %6 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swapNum(int *, int *);
int main() {
  int x = 2;
  int y = 7;
  printf("Before swapNum():\n x:%d y:%d \n", x, y);
  swapNum(&x, &y);
  printf("After swapNum():\n x:%d y:%d \n", x, y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x7,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <swapNum@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x2,0x4(%rsp)
movl   $0x7,(%rsp)
lea    0xec9(%rip),%rdi
mov    $0x2,%esi
mov    $0x7,%edx
call   1030 <printf@plt>
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <swapNum@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Before swapNum():\0A x:%d y:%d \0A\00"
@.str.1 = [30 x i8] c"After swapNum():\0A x:%d y:%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 2, i32* %1
store i32 7, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = call i32 @swapNum(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"Before swapNum():\0A x:%d y:%d \0A\00"
@.str.1 = [30 x i8] c"After swapNum():\0A x:%d y:%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 2, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 7, i32* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 2, i32 7)
%6 = call i32 @swapNum(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mb();
extern void outw(unsigned short b, unsigned long addr) {
  *(volatile unsigned int *)((addr << 7) +
                             ((0xfffffc0000000000UL) + 0x300000000UL) + 0x20) =
      b * 0x00010001;
  mb();
}


x86 assembly (clang, -O0):
<outw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
imul   $0x10001,%eax,%ecx
mov    -0x10(%rbp),%rax
shl    $0x7,%rax
movabs $0xfffffc0300000000,%rdx
fc ff ff
add    %rdx,%rax
mov    %ecx,0x20(%rax)
mov    $0x0,%al
call   1030 <mb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outw>:
mov    %edi,%eax
shl    $0x10,%eax
or     %edi,%eax
shl    $0x7,%rsi
movabs $0xfffffc0300000020,%rcx
fc ff ff
mov    %eax,(%rsi,%rcx,1)
xor    %eax,%eax
jmp    1030 <mb@plt>

LLVM IR (-O0):
define void @outw(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = mul nsw i32 %6, 65537
%8 = load i64, i64* %4
%9 = shl i64 %8, 7
%10 = add i64 %9, -4385161609216
%11 = add i64 %10, 32
%12 = inttoptr i64 %11 to i32*
store volatile i32 %7, i32* %12
%13 = call i32 (...) @mb()
ret void
}

LLVM IR (-O2):
define void @outw(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = mul nuw nsw i32 %3, 65537
%5 = shl i64 %1, 7
%6 = add i64 %5, -4385161609184
%7 = inttoptr i64 %6 to i32*
store volatile i32 %4, i32* %7
%8 = tail call i32 (...) @mb()
ret void
}