xunge/DecIR huggingface dataset:
/* Type definitions */
union bpf_attr {
  int target_fd;
  int attach_bpf_fd;
  int attach_type;
};
typedef enum bpf_attach_type {
  ____Placeholder_bpf_attach_type
} bpf_attach_type;
typedef int /*<<< orphan*/ attr;

/* Variables and functions */
int /*<<< orphan*/ BPF_PROG_DETACH;
int /*<<< orphan*/ bzero(union bpf_attr *, int);
int sys_bpf(int /*<<< orphan*/, union bpf_attr *, int);
int bpf_prog_detach2(int prog_fd, int target_fd, enum bpf_attach_type type) {
  union bpf_attr attr;
  bzero(&attr, sizeof(attr));
  attr.target_fd = target_fd;
  attr.attach_bpf_fd = prog_fd;
  attr.attach_type = type;
  return sys_bpf(BPF_PROG_DETACH, &attr, sizeof(attr));
}


x86 assembly (clang, -O0):
<bpf_prog_detach2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x4,%esi
call   1040 <bzero@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <sys_bpf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_prog_detach2>:
push   %rax
mov    %edx,(%rsp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1030 <sys_bpf@plt>
pop    %rcx
ret

LLVM IR (-O0):
%union.bpf_attr = type { i32 }
@BPF_PROG_DETACH = global i32 0
define i32 @bpf_prog_detach2(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %union.bpf_attr
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = call i32 @bzero(%union.bpf_attr* %7, i32 4)
%9 = load i32, i32* %5
%10 = bitcast %union.bpf_attr* %7 to i32*
store i32 %9, i32* %10
%11 = load i32, i32* %4
%12 = bitcast %union.bpf_attr* %7 to i32*
store i32 %11, i32* %12
%13 = load i32, i32* %6
%14 = bitcast %union.bpf_attr* %7 to i32*
store i32 %13, i32* %14
%15 = load i32, i32* @BPF_PROG_DETACH
%16 = call i32 @sys_bpf(i32 %15, %union.bpf_attr* %7, i32 4)
ret i32 %16
}

LLVM IR (-O2):
%union.bpf_attr = type { i32 }
@BPF_PROG_DETACH = global i32 0
define i32 @bpf_prog_detach2(i32 %0, i32 %1, i32 %2) {
%4 = alloca %union.bpf_attr
%5 = bitcast %union.bpf_attr* %4 to i8*
%6 = getelementptr inbounds %union.bpf_attr, %union.bpf_attr* %4, i64 0, i32 0
store i32 %2, i32* %6
%7 = load i32, i32* @BPF_PROG_DETACH
%8 = call i32 @sys_bpf(i32 %7, %union.bpf_attr* %4, i32 4)
ret i32 %8
}
int test_imm_EAint16_mem(short *val) {
  return ((*val) & (-0xEA << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_EAint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -234
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void EVP_EncodeFinal(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_EncodeFinal() {
ret void
}
/* Variables and functions */
scalar_t__ isnan(float);
float fminf(float x, float y) {
  if (isnan(x))
    return y;
  if (isnan(y))
    return x;
  return x < y ? x : y;
}


x86 assembly (clang, -O0):
<fminf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     1145 <fminf+0x35>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    119e <fminf+0x8e>
movss  -0xc(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     1168 <fminf+0x58>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    119e <fminf+0x8e>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    118a <fminf+0x7a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1194 <fminf+0x84>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fminf>:
push   %rax
movss  %xmm1,(%rsp)
movss  %xmm0,0x4(%rsp)
call   1030 <isnan@plt>
test   %rax,%rax
je     112d <fminf+0x1d>
movss  (%rsp),%xmm0
pop    %rax
ret
movss  (%rsp),%xmm0
call   1030 <isnan@plt>
test   %rax,%rax
je     1144 <fminf+0x34>
movss  0x4(%rsp),%xmm0
pop    %rax
ret
movss  0x4(%rsp),%xmm0
minss  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fminf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = call i64 @isnan(float %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %5
store float %10, float* %3
br label %27
11: ; preds = %2
%12 = load float, float* %5
%13 = call i64 @isnan(float %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load float, float* %4
store float %16, float* %3
br label %27
17: ; preds = %11
%18 = load float, float* %4
%19 = load float, float* %5
%20 = fcmp olt float %18, %19
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = load float, float* %4
br label %25
23: ; preds = %17
%24 = load float, float* %5
br label %25
25: ; preds = %23, %21
%26 = phi float [ %22, %21 ], [ %24, %23 ]
store float %26, float* %3
br label %27
27: ; preds = %25, %15, %9
%28 = load float, float* %3
ret float %28
}

LLVM IR (-O2):
define float @fminf(float %0, float %1) {
%3 = tail call i64 @isnan(float %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = tail call i64 @isnan(float %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = fcmp olt float %0, %1
%10 = select i1 %9, float %0, float %1
br label %11
11: ; preds = %5, %2, %8
%12 = phi float [ %10, %8 ], [ %1, %2 ], [ %0, %5 ]
ret float %12
}
unsigned long llsqrt(unsigned long long x) {
  unsigned long long prev;
  unsigned long long s;
  s = x;
  if (s) {
    prev = ~((unsigned long long)1 << 63);
    while (s < prev) {
      prev = s;
      s = (s + (x / s)) / 2;
    }
  }
  return (unsigned long)s;
}


x86 assembly (clang, -O0):
<llsqrt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116f <llsqrt+0x6f>
movabs $0x7fffffffffffffff,%rax
ff ff 7f
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    116a <llsqrt+0x6a>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
add    %rcx,%rax
shr    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1129 <llsqrt+0x29>
jmp    116f <llsqrt+0x6f>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<llsqrt>:
test   %rdi,%rdi
je     114a <llsqrt+0x4a>
movabs $0x7ffffffffffffffe,%rax
ff ff 7f
cmp    %rax,%rdi
ja     114d <llsqrt+0x4d>
mov    %rdi,%rcx
jmp    1136 <llsqrt+0x36>
nopl   0x0(%rax)
mov    %rdi,%rax
xor    %edx,%edx
div    %rcx
add    %rcx,%rax
shr    %rax
cmp    %rcx,%rax
mov    %rax,%rcx
jae    1150 <llsqrt+0x50>
mov    %rdi,%rax
or     %rcx,%rax
shr    $0x20,%rax
jne    1120 <llsqrt+0x20>
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
jmp    1128 <llsqrt+0x28>
xor    %eax,%eax
ret
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @llsqrt(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = icmp ult i64 %0, 9223372036854775807
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i64 [ %9, %5 ], [ %0, %3 ]
%7 = udiv i64 %0, %6
%8 = add i64 %7, %6
%9 = lshr i64 %8, 1
%10 = icmp ult i64 %9, %6
br i1 %10, label %5, label %11
11: ; preds = %5, %3, %1
%12 = phi i64 [ 0, %1 ], [ %0, %3 ], [ %9, %5 ]
ret i64 %12
}
int iscntrl(int c) {}


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

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

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

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
ret i32 undef
}
int exact_square(int n) {
  int a;
  for (a = 0; a <= n; a++) {
    if (n == a * a) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<exact_square>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     114b <exact_square+0x4b>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jne    1138 <exact_square+0x38>
movl   $0x1,-0x4(%rbp)
jmp    1152 <exact_square+0x52>
jmp    113d <exact_square+0x3d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <exact_square+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_square>:
test   %edi,%edi
js     1120 <exact_square+0x20>
lea    0x1(%rdi),%eax
xor    %ecx,%ecx
nopl   0x0(%rax)
mov    %ecx,%edx
imul   %ecx,%edx
cmp    %edi,%edx
je     1123 <exact_square+0x23>
add    $0x1,%ecx
cmp    %ecx,%eax
jne    1110 <exact_square+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @exact_square(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %10, label %6
3: ; preds = %6
%4 = add nuw i32 %7, 1
%5 = icmp eq i32 %7, %0
br i1 %5, label %10, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %4, %3 ], [ 0, %1 ]
%8 = mul nsw i32 %7, %7
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %6, %3, %1
%11 = phi i32 [ 0, %1 ], [ 0, %3 ], [ 1, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ bf10(int);
int /*<<< orphan*/ bf50(int);
int /*<<< orphan*/ printf(char *);
void bf255(int c) {
  int i, d, r, m;
  r = c % 6;
  printf(">");
  bf50(c / 6);
  printf("[<++++++>-]<");
  bf10(r);
}


x86 assembly (clang, -O0):
<bf255>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1050 <bf50@plt>
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%edi
call   1030 <bf10@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bf255>:
push   %rbx
mov    %edi,%ebx
mov    $0x3e,%edi
call   1030 <putchar@plt>
movslq %ebx,%rbx
imul   $0x2aaaaaab,%rbx,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
shr    $0x20,%rdi
add    %eax,%edi
lea    (%rdi,%rdi,1),%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%ebx
call   1060 <bf50@plt>
lea    0xe88(%rip),%rdi
call   1050 <printf@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <bf10@plt>

LLVM IR (-O0):
@.str = [2 x i8] c">\00"
@.str.1 = [13 x i8] c"[<++++++>-]<\00"
define void @bf255(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
%7 = load i32, i32* %2
%8 = srem i32 %7, 6
store i32 %8, i32* %5
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 6
%12 = call i32 @bf50(i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%14 = load i32, i32* %5
%15 = call i32 @bf10(i32 %14)
ret void
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"[<++++++>-]<\00"
define void @bf255(i32 %0) {
%2 = srem i32 %0, 6
%3 = tail call i32 @putchar(i32 62)
%4 = sdiv i32 %0, 6
%5 = tail call i32 @bf50(i32 %4)
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @bf10(i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ new_v;

/* Variables and functions */
float *gp_realloc(float *, int, char *);
float *extend_vector(float *vec, int old_nl, int new_nh) {
  float *new_v =
      gp_realloc((vec + old_nl), (new_nh - old_nl + 1) * sizeof(new_v[0]),
                 "extend/retract vector");
  return new_v - old_nl;
}


x86 assembly (clang, -O0):
<extend_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x2,%rax
mov    %eax,%esi
lea    0xeb7(%rip),%rdx
call   1030 <gp_realloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extend_vector>:
push   %rbx
movslq %esi,%rax
lea    (%rdi,%rax,4),%rdi
lea    0x0(,%rax,4),%rbx
sub    %eax,%edx
lea    0x4(,%rdx,4),%esi
lea    0xed0(%rip),%rdx
call   1030 <gp_realloc@plt>
sub    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"extend/retract vector\00"
define float* @extend_vector(float* %0, i32 %1, i32 %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca i32
%7 = alloca float*
store float* %0, float** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load float*, float** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds float, float* %8, i64 %10
%12 = load i32, i32* %6
%13 = load i32, i32* %5
%14 = sub nsw i32 %12, %13
%15 = add nsw i32 %14, 1
%16 = sext i32 %15 to i64
%17 = mul i64 %16, 4
%18 = trunc i64 %17 to i32
%19 = call float* @gp_realloc(float* %11, i32 %18, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store float* %19, float** %7
%20 = load float*, float** %7
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = sub i64 0, %22
%24 = getelementptr inbounds float, float* %20, i64 %23
ret float* %24
}

LLVM IR (-O2):
@.str = [22 x i8] c"extend/retract vector\00"
define float* @extend_vector(float* %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds float, float* %0, i64 %4
%6 = sub nsw i32 %2, %1
%7 = shl i32 %6, 2
%8 = add i32 %7, 4
%9 = tail call float* @gp_realloc(float* %5, i32 %8, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%10 = sub nsw i64 0, %4
%11 = getelementptr inbounds float, float* %9, i64 %10
ret float* %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, char *);
void print_help_text_and_exit(char *program_name, int error_code) {
  printf("Usage: %s [-h]\n"
         "       %s [-use_gc [-print_gc_info]]\n"
         "                              [-log_max_mem_usage log_file]\n"
         "                              [(( -f | -frec | -fnoauto | -fextenal) "
         "function_name)...\n"
         "                               [-output_file_name output_file]\n"
         "                               [-header_file_name header_file]\n"
         "                               [-debug]\n"
         "                               [-only_yielding_funs]\n"
         "                               [-static_aux_funs]\n"
         "                               input_c_file]]\n"
         "\n"
         "Please see the README.md file for more details.\n",
         program_name, program_name);
  exit(0);
}


x86 assembly (clang, -O0):
<print_help_text_and_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_help_text_and_exit>:
push   %rax
mov    %rdi,%rdx
lea    0xed5(%rip),%rdi
mov    %rdx,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [564 x i8] c"Usage: %s [-h]\0A %s [-use_gc [-print_gc_info]]\0A [-log_max_mem_usage log_file]\0A [(( -f | -frec | -fnoauto | -fextenal) function_name)...\0A [-output_file_name output_file]\0A [-header_file_name header_file]\0A [-debug]\0A [-only_yielding_funs]\0A [-static_aux_funs]\0A input_c_file]]\0A\0APlease see the README.md file for more details.\0A\00"
define void @print_help_text_and_exit(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 i8*, i8** %3
%7 = call i32 @printf(i8* getelementptr inbounds ([564 x i8], [564 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [564 x i8] c"Usage: %s [-h]\0A %s [-use_gc [-print_gc_info]]\0A [-log_max_mem_usage log_file]\0A [(( -f | -frec | -fnoauto | -fextenal) function_name)...\0A [-output_file_name output_file]\0A [-header_file_name header_file]\0A [-debug]\0A [-only_yielding_funs]\0A [-static_aux_funs]\0A input_c_file]]\0A\0APlease see the README.md file for more details.\0A\00"
define void @print_help_text_and_exit(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([564 x i8], [564 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ mvaddch(int, int, char);
void printCline(int start, int line, int num, char c) {
  int i = start;
  for (; i < num; i++) {
    mvaddch(line, i, c);
  }
}


x86 assembly (clang, -O0):
<printCline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1155 <printCline+0x45>
mov    -0x8(%rbp),%edi
mov    -0x14(%rbp),%esi
movsbl -0xd(%rbp),%edx
call   1030 <mvaddch@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112c <printCline+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printCline>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%edi
jge    1144 <printCline+0x34>
mov    %edx,%r15d
mov    %esi,%r14d
mov    %edi,%ebp
movsbl %cl,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <mvaddch@plt>
add    $0x1,%ebp
cmp    %ebp,%r15d
jne    1130 <printCline+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @printCline(i32 %0, i32 %1, i32 %2, i8 signext %3) {
%5 = icmp slt i32 %0, %2
br i1 %5, label %6, label %11
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %0, %4 ]
%8 = tail call i32 @mvaddch(i32 %1, i32 %7, i8 signext %3)
%9 = add i32 %7, 1
%10 = icmp eq i32 %9, %2
br i1 %10, label %11, label %6
11: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
rev(char *s) {
  if (*s != '\0') {
    rev((s + 1));
    printf("%c", *(s));
  }
}


x86 assembly (clang, -O0):
<rev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115c <rev+0x3c>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1030 <rev@plt>
mov    -0x10(%rbp),%rax
lea    0xeac(%rip),%rdi
movsbl (%rax),%esi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @rev(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 i32 undef
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = tail call i32 @rev(i8* %6)
%8 = load i8, i8* %0
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %8)
br label %4
}
void FillArray(char *arrayval, int size, char val) {
  int index = 0;
  for (index = 0; index < size; index++) {
    *(arrayval + index) = val;
  }
}


x86 assembly (clang, -O0):
<FillArray>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1146 <FillArray+0x46>
mov    -0xd(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111e <FillArray+0x1e>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FillArray>:
test   %esi,%esi
jle    1126 <FillArray+0x16>
push   %rax
mov    %esi,%eax
movzbl %dl,%esi
mov    %rax,%rdx
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @FillArray(i8* nocapture writeonly %0, i32 %1, i8 signext %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
double __ocml_cos_f64(double);
double cos(double x) { return __ocml_cos_f64(x); }


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

x86 assembly (clang, -O2):
<cos>:
jmp    1030 <__ocml_cos_f64@plt>

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

LLVM IR (-O2):
define double @cos(double %0) {
%2 = tail call double @__ocml_cos_f64(double %0)
ret double %2
}
/* Variables and functions */
char *idOfInstance(int);
int /*<<< orphan*/ output(char *);
int /*<<< orphan*/ say(int);
int /*<<< orphan*/ sprintf(char *, char *, int, char *);
void sayInstanceNumberAndName(int ins) {
  char buf[1000];
  sprintf(buf, "[%d] %s (\"$$", ins, idOfInstance(ins));
  output(buf);
  say(ins);
  output("$$\")");
}


x86 assembly (clang, -O0):
<sayInstanceNumberAndName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x3f0(%rbp),%rax
mov    %rax,-0x400(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x3f4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <idOfInstance@plt>
mov    -0x400(%rbp),%rdi
mov    -0x3f4(%rbp),%edx
mov    %rax,%rcx
lea    0xe7c(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x3f0(%rbp),%rdi
call   1030 <output@plt>
mov    -0x4(%rbp),%edi
call   1060 <say@plt>
lea    0xe69(%rip),%rdi
call   1030 <output@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sayInstanceNumberAndName>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %edi,%ebx
call   1040 <idOfInstance@plt>
lea    0xea8(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %ebx,%edx
mov    %rax,%rcx
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1030 <output@plt>
mov    %ebx,%edi
call   1060 <say@plt>
lea    0xe8f(%rip),%rdi
call   1030 <output@plt>
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"[%d] %s (\22$$\00"
@.str.1 = [5 x i8] c"$$\22)\00"
define void @sayInstanceNumberAndName(i32 %0) {
%2 = alloca i32
%3 = alloca [1000 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i8* @idOfInstance(i32 %6)
%8 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %7)
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%10 = call i32 @output(i8* %9)
%11 = load i32, i32* %2
%12 = call i32 @say(i32 %11)
%13 = call i32 @output(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"[%d] %s (\22$$\00"
@.str.1 = [5 x i8] c"$$\22)\00"
define void @sayInstanceNumberAndName(i32 %0) {
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%4 = tail call i8* @idOfInstance(i32 %0)
%5 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %4)
%6 = call i32 @output(i8* %3)
%7 = call i32 @say(i32 %0)
%8 = call i32 @output(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double exp(double);
double iacum_exp(double F, double lambda) { return 1 - exp(-lambda * F); }


x86 assembly (clang, -O0):
<iacum_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xead(%rip),%xmm0
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iacum_exp>:
push   %rax
xorpd  0xee7(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xee6(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @iacum_exp(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fneg double %5
%7 = load double, double* %3
%8 = fmul double %6, %7
%9 = call double @exp(double %8)
%10 = fsub double 1.000000e+00, %9
ret double %10
}

LLVM IR (-O2):
define double @iacum_exp(double %0, double %1) {
%3 = fneg double %1
%4 = fmul double %3, %0
%5 = tail call double @exp(double %4)
%6 = fsub double 1.000000e+00, %5
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
unsigned short getshortel(FILE *inf) {
  unsigned char buf[2];
  fread(buf, 2, 1, inf);
  return ((buf[0] << 0) + (buf[1] << 8));
}


x86 assembly (clang, -O0):
<getshortel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xa(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
movzbl -0xa(%rbp),%eax
shl    $0x0,%eax
movzbl -0x9(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getshortel>:
push   %rax
mov    %rdi,%rcx
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
movzwl 0x6(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @getshortel(i32* %0) {
%2 = alloca i32*
%3 = alloca [2 x i8]
store i32* %0, i32** %2
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = load i32*, i32** %2
%6 = call i32 @fread(i8* %4, i32 2, i32 1, i32* %5)
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 0
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = add nsw i32 %10, %14
%16 = trunc i32 %15 to i16
ret i16 %16
}

LLVM IR (-O2):
define zeroext i16 @getshortel(i32* nocapture %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = call i32 @fread(i8* %3, i32 2, i32 1, i32* %0)
%5 = load i8, i8* %3
%6 = zext i8 %5 to i16
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i16
%10 = shl nuw i16 %9, 8
%11 = or i16 %10, %6
ret i16 %11
}
/* Variables and functions */
int /*<<< orphan*/ KeccakF200_StateExtractLanes(void *, unsigned char *,
                                                unsigned int);
int /*<<< orphan*/ KeccakF200_StatePermute(void *);
int /*<<< orphan*/ KeccakF200_StateXORLanes(void *, unsigned char const *,
                                            unsigned int);
void KeccakF200_StateXORPermuteExtract(void *state, const unsigned char *inData,
                                       unsigned int inLaneCount,
                                       unsigned char *outData,
                                       unsigned int outLaneCount) {
  KeccakF200_StateXORLanes(state, inData, inLaneCount);
  KeccakF200_StatePermute(state);
  KeccakF200_StateExtractLanes(state, outData, outLaneCount);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <KeccakF200_StateXORLanes@plt>
mov    -0x8(%rbp),%rdi
call   1050 <KeccakF200_StatePermute@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1040 <KeccakF200_StateExtractLanes@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %r14
push   %rbx
mov    %r8d,%r14d
mov    %rcx,%rbx
mov    %rdi,%rbp
call   1030 <KeccakF200_StateXORLanes@plt>
mov    %rbp,%rdi
call   1050 <KeccakF200_StatePermute@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <KeccakF200_StateExtractLanes@plt>

LLVM IR (-O0):
define void @KeccakF200_StateXORPermuteExtract(i8* %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = call i32 @KeccakF200_StateXORLanes(i8* %11, i8* %12, i32 %13)
%15 = load i8*, i8** %6
%16 = call i32 @KeccakF200_StatePermute(i8* %15)
%17 = load i8*, i8** %6
%18 = load i8*, i8** %9
%19 = load i32, i32* %10
%20 = call i32 @KeccakF200_StateExtractLanes(i8* %17, i8* %18, i32 %19)
ret void
}

LLVM IR (-O2):
define void @KeccakF200_StateXORPermuteExtract(i8* %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @KeccakF200_StateXORLanes(i8* %0, i8* %1, i32 %2)
%7 = tail call i32 @KeccakF200_StatePermute(i8* %0)
%8 = tail call i32 @KeccakF200_StateExtractLanes(i8* %0, i8* %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void initfrand() { srand(time(NULL)); }


x86 assembly (clang, -O0):
<initfrand>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initfrand>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @initfrand() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srand(i32 %1)
ret void
}

LLVM IR (-O2):
define void @initfrand() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
ret void
}
int py_c_access_test(void *void_ptr, int array_size) {
  int *array_ptr = (int *)void_ptr;
  int i = 0;
  for (i = 0; i < array_size; i++) {
    if (array_ptr[i] != i)
      return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<py_c_access_test>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1160 <py_c_access_test+0x60>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x24(%rbp),%eax
je     114d <py_c_access_test+0x4d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <py_c_access_test+0x67>
jmp    1152 <py_c_access_test+0x52>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1121 <py_c_access_test+0x21>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<py_c_access_test>:
test   %esi,%esi
jle    1121 <py_c_access_test+0x21>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    (%rdi,%rcx,4),%edx
cmp    %rdx,%rcx
jne    1124 <py_c_access_test+0x24>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <py_c_access_test+0x10>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @py_c_access_test(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %16
5: ; preds = %2
%6 = zext i32 %1 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %15, %6
br i1 %8, label %16, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %15, %7 ]
%11 = getelementptr inbounds i32, i32* %3, i64 %10
%12 = load i32, i32* %11
%13 = zext i32 %12 to i64
%14 = icmp eq i64 %10, %13
%15 = add nuw nsw i64 %10, 1
br i1 %14, label %7, label %16
16: ; preds = %9, %7, %2
%17 = phi i32 [ 0, %2 ], [ 0, %7 ], [ -1, %9 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ LC_NUMERIC;
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
void Set_Locale(void) {
  setlocale(LC_ALL, "");
  setlocale(LC_NUMERIC, "C");
}


x86 assembly (clang, -O0):
<Set_Locale>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
call   1030 <setlocale@plt>
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <setlocale@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Set_Locale>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
call   1030 <setlocale@plt>
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
pop    %rax
jmp    1030 <setlocale@plt>

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@LC_NUMERIC = global i32 0
@.str.1 = [2 x i8] c"C\00"
define void @Set_Locale() {
%1 = load i32, i32* @LC_ALL
%2 = call i32 @setlocale(i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @LC_NUMERIC
%4 = call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@LC_NUMERIC = global i32 0
@.str.1 = [2 x i8] c"C\00"
define void @Set_Locale() {
%1 = load i32, i32* @LC_ALL
%2 = tail call i32 @setlocale(i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @LC_NUMERIC
%4 = tail call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strlen(char *);
int libc_strlen(char *s) { return strlen(s); }


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

x86 assembly (clang, -O2):
<libc_strlen>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i32 @libc_strlen(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 %2
}
float limit(float value, float limit) {
  if (value > limit) {
    return limit;
  }
  if (value < -limit) {
    return -limit;
  }
  return value;
}


x86 assembly (clang, -O0):
<limit>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    112c <limit+0x2c>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1172 <limit+0x72>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
ucomiss %xmm1,%xmm0
jbe    1168 <limit+0x68>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1172 <limit+0x72>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<limit>:
movaps 0xef9(%rip),%xmm3
xorps  %xmm1,%xmm3
maxss  %xmm0,%xmm3
movaps %xmm1,%xmm2
cmpltss %xmm0,%xmm2
movaps %xmm2,%xmm0
andnps %xmm3,%xmm0
andps  %xmm1,%xmm2
orps   %xmm0,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @limit(float %0, float %1) {
%3 = alloca float
%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 ogt float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %5
store float %10, float* %3
br label %21
11: ; preds = %2
%12 = load float, float* %4
%13 = load float, float* %5
%14 = fneg float %13
%15 = fcmp olt float %12, %14
br i1 %15, label %16, label %19
16: ; preds = %11
%17 = load float, float* %5
%18 = fneg float %17
store float %18, float* %3
br label %21
19: ; preds = %11
%20 = load float, float* %4
store float %20, float* %3
br label %21
21: ; preds = %19, %16, %9
%22 = load float, float* %3
ret float %22
}

LLVM IR (-O2):
define float @limit(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = fneg float %1
%5 = fcmp ogt float %4, %0
%6 = select i1 %5, float %4, float %0
%7 = select i1 %3, float %1, float %6
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/
__softboundmpx_propagate_metadata_shadow_stack_from(int, int /*<<< orphan*/);
char *strncat(char *, char const *, size_t);
__attribute__((__weak__, __always___)) char *
softboundmpx_strncat(char *dest, const char *src, size_t n) {
  char *ret_ptr = strncat(dest, src, n);
  __softboundmpx_propagate_metadata_shadow_stack_from(1, 0);
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundmpx_strncat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <strncat@plt>
mov    %rax,-0x20(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <__softboundmpx_propagate_metadata_shadow_stack_from@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_strncat>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strncat@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <__softboundmpx_propagate_metadata_shadow_stack_from@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundmpx_strncat(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i8* @strncat(i8* %8, i8* %9, i64 %10)
store i8* %11, i8** %7
%12 = call i32 @__softboundmpx_propagate_metadata_shadow_stack_from(i32 1, i32 0)
%13 = load i8*, i8** %7
ret i8* %13
}

LLVM IR (-O2):
define weak i8* @softboundmpx_strncat(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @strncat(i8* dereferenceable(1) %0, i8* %1, i64 %2)
%5 = tail call i32 @__softboundmpx_propagate_metadata_shadow_stack_from(i32 1, i32 0)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ bitmap_size(int);
int /*<<< orphan*/ memset(unsigned long *, int, int /*<<< orphan*/);
void bitmap_set(unsigned long *addr, int nr_bits) {
  memset(addr, 0xff, bitmap_size(nr_bits));
}


x86 assembly (clang, -O0):
<bitmap_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <bitmap_size@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
mov    $0xff,%esi
call   1030 <memset@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_set>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1040 <bitmap_size@plt>
mov    %rbx,%rdi
mov    $0xff,%esi
mov    %eax,%edx
pop    %rbx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @bitmap_set(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i64*, i64** %3
%6 = load i32, i32* %4
%7 = call i32 @bitmap_size(i32 %6)
%8 = call i32 @memset(i64* %5, i32 255, i32 %7)
ret void
}

LLVM IR (-O2):
define void @bitmap_set(i64* %0, i32 %1) {
%3 = tail call i32 @bitmap_size(i32 %1)
%4 = tail call i32 @memset(i64* %0, i32 255, i32 %3)
ret void
}
int div(int dividend, int divisor) {
  int result = 0;
  int remainder = dividend;
  while (remainder >= divisor) {
    result++;
    remainder -= divisor;
  }
  return result;
}


x86 assembly (clang, -O0):
<div>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     113c <div+0x3c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    1117 <div+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div>:
xor    %eax,%eax
cmp    %esi,%edi
jl     1119 <div+0x19>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
sub    %esi,%edi
cmp    %esi,%edi
jge    1110 <div+0x10>
ret

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

LLVM IR (-O2):
define i32 @div(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ 0, %2 ]
%7 = add nuw nsw i32 %6, 1
%8 = sub nsw i32 %5, %1
%9 = icmp slt i32 %8, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
%11 = phi i32 [ 0, %2 ], [ %7, %4 ]
ret i32 %11
}
void cancel_work_sync(struct work_struct *work) {}


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

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

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

LLVM IR (-O2):
%struct.work_struct = type opaque
define void @cancel_work_sync(%struct.work_struct* nocapture %0) {
ret void
}