xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, char *, size_t);
void swap(void *a, void *b, size_t size) {
  char tmp[size];
  memcpy(tmp, a, size);
  memcpy(a, b, size);
  memcpy(b, tmp, size);
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x30(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x30(%rbp),%rsi
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsp,%rbx
lea    0xf(%rdx),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <memcpy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1030 <memcpy@plt>
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @swap(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%9 = load i64, i64* %6
%10 = call i8* @llvm.stacksave()
store i8* %10, i8** %7
%11 = alloca i8, i64 %9
store i64 %9, i64* %8
%12 = load i8*, i8** %4
%13 = load i64, i64* %6
%14 = call i32 @memcpy(i8* %11, i8* %12, i64 %13)
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = load i64, i64* %6
%18 = call i32 @memcpy(i8* %15, i8* %16, i64 %17)
%19 = load i8*, i8** %5
%20 = load i64, i64* %6
%21 = call i32 @memcpy(i8* %19, i8* %11, i64 %20)
%22 = load i8*, i8** %7
ret void
}

LLVM IR (-O2):
define void @swap(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8, i64 %2
%5 = call i32 @memcpy(i8* %4, i8* %0, i64 %2)
%6 = call i32 @memcpy(i8* %0, i8* %1, i64 %2)
%7 = call i32 @memcpy(i8* %1, i8* %4, i64 %2)
ret void
}
int pos_julian_non_leap(int year) { return year & 3; }


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

x86 assembly (clang, -O2):
<pos_julian_non_leap>:
mov    %edi,%eax
and    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @pos_julian_non_leap(i32 %0) {
%2 = and i32 %0, 3
ret i32 %2
}
float pesoMaximo(float altura) { return 25 * altura * altura; }


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

x86 assembly (clang, -O2):
<pesoMaximo>:
movss  0xef8(%rip),%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @pesoMaximo(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 2.500000e+01, %3
%5 = load float, float* %2
%6 = fmul float %4, %5
ret float %6
}

LLVM IR (-O2):
define float @pesoMaximo(float %0) {
%2 = fmul float %0, 2.500000e+01
%3 = fmul float %2, %0
ret float %3
}
/* Variables and functions */
int fabs(scalar_t__);
double sprior(double x, double center, double sigma) {
  if (fabs(sigma - 0) < 1E-12)
    return 0;
  return (x - center) * (x - center) / sigma / sigma;
}


x86 assembly (clang, -O0):
<sprior>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xeb7(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1160 <sprior+0x50>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1187 <sprior+0x77>
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x20(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprior>:
sub    $0x18,%rsp
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x10(%rsp)
movsd  %xmm2,0x8(%rsp)
cvttsd2si %xmm2,%rdi
call   1030 <fabs@plt>
test   %eax,%eax
jle    1155 <sprior+0x45>
movsd  0x10(%rsp),%xmm0
subsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm1,%xmm0
divsd  %xmm1,%xmm0
add    $0x18,%rsp
ret
xorps  %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @sprior(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %7
%9 = fsub double %8, 0.000000e+00
%10 = fptosi double %9 to i64
%11 = call i32 @fabs(i64 %10)
%12 = sitofp i32 %11 to double
%13 = fcmp olt double %12, 0x3D719799812DEA11
br i1 %13, label %14, label %15
14: ; preds = %3
store double 0.000000e+00, double* %4
br label %27
15: ; preds = %3
%16 = load double, double* %5
%17 = load double, double* %6
%18 = fsub double %16, %17
%19 = load double, double* %5
%20 = load double, double* %6
%21 = fsub double %19, %20
%22 = fmul double %18, %21
%23 = load double, double* %7
%24 = fdiv double %22, %23
%25 = load double, double* %7
%26 = fdiv double %24, %25
store double %26, double* %4
br label %27
27: ; preds = %15, %14
%28 = load double, double* %4
ret double %28
}

LLVM IR (-O2):
define double @sprior(double %0, double %1, double %2) {
%4 = fptosi double %2 to i64
%5 = tail call i32 @fabs(i64 %4)
%6 = icmp slt i32 %5, 1
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = fsub double %0, %1
%9 = fmul double %8, %8
%10 = fdiv double %9, %2
%11 = fdiv double %10, %2
br label %12
12: ; preds = %3, %7
%13 = phi double [ %11, %7 ], [ 0.000000e+00, %3 ]
ret double %13
}
/* Variables and functions */
int is_prime(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  printf("%d\n", is_prime(num));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <is_prime@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @is_prime(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
int test_imm_D3int16_mem(short *val) {
  return ((*val) & (0xD3 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_D3int16_mem>:
testb  $0xd3,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D3int16_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, 211
%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_D3int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 211
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *strstr(char const *, char *);
unsigned int countLines(const char *l) {
  unsigned int c = 1;
  do {
    c++;
    l = strstr(l, "\\n");
    if (l)
      l += 2;
  } while (l != NULL);
  return c;
}


x86 assembly (clang, -O0):
<countLines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1157 <countLines+0x47>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    115c <countLines+0x4c>
cmpq   $0x0,-0x8(%rbp)
jne    1123 <countLines+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countLines>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
add    $0x1,%ebx
mov    %r14,%rsi
call   1030 <strstr@plt>
lea    0x2(%rax),%rdi
test   %rax,%rax
jne    1120 <countLines+0x10>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"\\n\00"
define i32 @countLines(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %8, %2 ]
%4 = phi i32 [ 1, %1 ], [ %5, %2 ]
%5 = add i32 %4, 1
%6 = tail call i8* @strstr(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i8* %6, null
%8 = getelementptr inbounds i8, i8* %6, i64 2
br i1 %7, label %9, label %2
9: ; preds = %2
ret i32 %5
}
/* Type definitions */
struct slab {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sys_aligned_free(struct slab *);
void slab_destroy(struct slab *s) { sys_aligned_free(s); }


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

x86 assembly (clang, -O2):
<slab_destroy>:
jmp    1030 <sys_aligned_free@plt>

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

LLVM IR (-O2):
%struct.slab = type { i32 }
define void @slab_destroy(%struct.slab* %0) {
%2 = tail call i32 @sys_aligned_free(%struct.slab* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void map_free(void *key, void *data, void *unused) {
  if (key)
    free(key);
  if (data)
    free(data);
}


x86 assembly (clang, -O0):
<map_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <map_free+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x10(%rbp)
je     114c <map_free+0x3c>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_free>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
je     111e <map_free+0xe>
call   1030 <free@plt>
test   %rbx,%rbx
je     112c <map_free+0x1c>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @map_free(i8* %0, i8* %1, i8* nocapture readnone %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @free(i8* %0)
br label %7
7: ; preds = %5, %3
%8 = icmp eq i8* %1, null
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i32 @free(i8* %1)
br label %11
11: ; preds = %9, %7
ret void
}
/* Variables and functions */
int mkdir(char const *, int);
int cg_create(const char *cgroup) { return mkdir(cgroup, 0644); }


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

x86 assembly (clang, -O2):
<cg_create>:
mov    $0x1a4,%esi
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @cg_create(i8* nocapture %0) {
%2 = tail call i32 @mkdir(i8* %0, i32 420)
ret i32 %2
}
/* Variables and functions */
scalar_t__ pow(double, int);
double sqrt(scalar_t__);
double hipotenus_bul(double ilk_kenar, double ikinci_kenar) {
  double dik_kenar;
  dik_kenar = sqrt((pow(ilk_kenar, 2) + pow(ikinci_kenar, 2)));
  return dik_kenar;
}


x86 assembly (clang, -O0):
<hipotenus_bul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %rax,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
call   1040 <sqrt@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hipotenus_bul>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @hipotenus_bul(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = call i64 @pow(double %6, i32 2)
%8 = load double, double* %4
%9 = call i64 @pow(double %8, i32 2)
%10 = add nsw i64 %7, %9
%11 = call double @sqrt(i64 %10)
store double %11, double* %5
%12 = load double, double* %5
ret double %12
}

LLVM IR (-O2):
define double @hipotenus_bul(double %0, double %1) {
%3 = tail call i64 @pow(double %0, i32 2)
%4 = tail call i64 @pow(double %1, i32 2)
%5 = add nsw i64 %4, %3
%6 = tail call double @sqrt(i64 %5)
ret double %6
}
int ff_nearestPowerOfTwo(int x) {
  int y = 1;
  while (y < x)
    y <<= 1;
  return y;
}


x86 assembly (clang, -O0):
<ff_nearestPowerOfTwo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1128 <ff_nearestPowerOfTwo+0x28>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <ff_nearestPowerOfTwo+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff_nearestPowerOfTwo>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jl     1110 <ff_nearestPowerOfTwo+0x10>
ret

LLVM IR (-O0):
define i32 @ff_nearestPowerOfTwo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %3
%10 = shl i32 %9, 1
store i32 %10, i32* %3
br label %4
11: ; preds = %4
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @ff_nearestPowerOfTwo(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = icmp slt i32 %3, %0
%5 = shl i32 %3, 1
br i1 %4, label %2, label %6
6: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ output_string(char *);
void output_label_prefix() { output_string(".L"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c".L\00"
define void @output_label_prefix() {
%1 = tail call i32 @output_string(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(unsigned char, unsigned char);
void SensorSetReg_PO3030K(unsigned short uAddr, unsigned short uVal) {
  VIM_SIF_I2cWriteByte((unsigned char)uAddr, (unsigned char)uVal);
}


x86 assembly (clang, -O0):
<SensorSetReg_PO3030K>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
mov    %al,%cl
mov    -0x4(%rbp),%ax
movzbl %cl,%edi
movzbl %al,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetReg_PO3030K>:
movzbl %dil,%edi
movzbl %sil,%esi
jmp    1030 <VIM_SIF_I2cWriteByte@plt>

LLVM IR (-O0):
define void @SensorSetReg_PO3030K(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = trunc i16 %5 to i8
%7 = load i16, i16* %4
%8 = trunc i16 %7 to i8
%9 = call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %6, i8 zeroext %8)
ret void
}

LLVM IR (-O2):
define void @SensorSetReg_PO3030K(i16 zeroext %0, i16 zeroext %1) {
%3 = trunc i16 %0 to i8
%4 = trunc i16 %1 to i8
%5 = tail call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %3, i8 zeroext %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int lib2p1();
int lib2t1();
int lib2t2();
int lib2t3();
int lib2test(void) {
  if (lib2t1() != 1)
    abort();
  if (lib2t2() != 1)
    abort();
  if (lib2t3() != 1)
    abort();
  if (lib2p1() != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<lib2test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <lib2t1@plt>
cmp    $0x1,%eax
je     116b <lib2test+0x1b>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x0,%al
call   1070 <lib2t2@plt>
cmp    $0x1,%eax
je     1182 <lib2test+0x32>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x0,%al
call   1050 <lib2t3@plt>
cmp    $0x1,%eax
je     1199 <lib2test+0x49>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x0,%al
call   1060 <lib2p1@plt>
cmp    $0x1,%eax
je     11b0 <lib2test+0x60>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lib2test>:
push   %rax
xor    %eax,%eax
call   1040 <lib2t1@plt>
cmp    $0x1,%eax
jne    1185 <lib2test+0x35>
xor    %eax,%eax
call   1070 <lib2t2@plt>
cmp    $0x1,%eax
jne    1185 <lib2test+0x35>
xor    %eax,%eax
call   1050 <lib2t3@plt>
cmp    $0x1,%eax
jne    1185 <lib2test+0x35>
xor    %eax,%eax
call   1060 <lib2p1@plt>
cmp    $0x1,%eax
jne    1185 <lib2test+0x35>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @lib2test() {
%1 = call i32 (...) @lib2t1()
%2 = icmp ne i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = call i32 (...) @lib2t2()
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = call i32 (...) @lib2t3()
%12 = icmp ne i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = call i32 (...) @lib2p1()
%17 = icmp ne i32 %16, 1
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 (...) @abort()
unreachable
20: ; preds = %15
ret i32 0
}

LLVM IR (-O2):
define i32 @lib2test() {
%1 = tail call i32 (...) @lib2t1()
%2 = icmp eq i32 %1, 1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 (...) @lib2t2()
%7 = icmp eq i32 %6, 1
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32 (...) @lib2t3()
%12 = icmp eq i32 %11, 1
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call i32 (...) @lib2p1()
%17 = icmp eq i32 %16, 1
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %15
ret i32 0
}
int do_519() { return 519; }


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

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

LLVM IR (-O0):
define i32 @do_519() {
ret i32 519
}

LLVM IR (-O2):
define i32 @do_519() {
ret i32 519
}
unsigned char is_alpha(const char c) {
  return ((c >= 65 && c <= 90) || (c >= 97 && c <= 122)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1129 <is_alpha+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    114e <is_alpha+0x4e>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x3(%rbp)
jl     1148 <is_alpha+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_alpha>:
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define zeroext i8 @is_alpha(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br i1 %9, label %20, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 97
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 122
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i64
%23 = select i1 %21, i32 1, i32 0
%24 = trunc i32 %23 to i8
ret i8 %24
}

LLVM IR (-O2):
define zeroext i8 @is_alpha(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i8
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int id(int);
void main() {
  int input = __VERIFIER_nondet_int();
  int result = id(input);
  if (result == 3) {
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <id@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    115e <main+0x2e>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%edi
call   1050 <id@plt>
cmp    $0x3,%eax
jne    114c <main+0x1c>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__VERIFIER_error@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @id(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 3
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @__VERIFIER_error()
br label %10
10: ; preds = %8, %0
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @id(i32 %1)
%3 = icmp eq i32 %2, 3
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @__VERIFIER_error()
br label %6
6: ; preds = %4, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ shastr(char const *, unsigned char *);
unsigned int fkey(const char *fn) {
  unsigned char sha[20];
  unsigned int *fk = (unsigned int *)&sha[0];
  shastr(fn, sha);
  return fk[0] % 8192;
}


x86 assembly (clang, -O0):
<fkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <shastr@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
and    $0x1fff,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fkey>:
sub    $0x18,%rsp
mov    %rsp,%rsi
call   1030 <shastr@plt>
mov    $0x1fff,%eax
and    (%rsp),%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @fkey(i8* %0) {
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = bitcast [20 x i8]* %2 to i32*
%5 = call i32 @shastr(i8* %0, i8* %3)
%6 = load i32, i32* %4
%7 = and i32 %6, 8191
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
int main() {
  char str[1024];
  while (1) {
    read(0, str, 1024);
    printf("P6:%s\n", str);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rsi
xor    %edi,%edi
mov    $0x400,%edx
call   1040 <read@plt>
lea    -0x410(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rsp,%rbx
lea    0xecc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
call   1040 <read@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
@.str = [7 x i8] c"P6:%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = call i32 @read(i32 0, i8* %4, i32 1024)
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %3
}

LLVM IR (-O2):
@.str = [7 x i8] c"P6:%s\0A\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %3, %0
%4 = call i32 @read(i32 0, i8* %2, i32 1024)
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *);
int osd_ext_clone_task_start(void) {
  printk("++ osd_ext_clone depends on GE2D module!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"++ osd_ext_clone depends on GE2D module!\0A\00"
define i32 @osd_ext_clone_task_start() {
%1 = call i32 @printk(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"++ osd_ext_clone depends on GE2D module!\0A\00"
define i32 @osd_ext_clone_task_start() {
%1 = tail call i32 @printk(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void count_clbk(void *elem, void *cpt) { (*(int *)cpt)++; }


x86 assembly (clang, -O0):
<count_clbk>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_clbk>:
addl   $0x1,(%rsi)
ret

LLVM IR (-O0):
define void @count_clbk(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 1
store i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @count_clbk(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1
store i32 %5, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ timer_set_frequency_1_hz();
void led_timer_set_frequency_1_hz() { timer_set_frequency_1_hz(); }


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

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

LLVM IR (-O0):
define void @led_timer_set_frequency_1_hz() {
%1 = call i32 (...) @timer_set_frequency_1_hz()
ret void
}

LLVM IR (-O2):
define void @led_timer_set_frequency_1_hz() {
%1 = tail call i32 (...) @timer_set_frequency_1_hz()
ret void
}
/* Variables and functions */
int __gen_ocl_get_global_size0();
int __gen_ocl_get_global_size1();
int __gen_ocl_get_global_size2();
__attribute__((always_)) unsigned get_global_size(unsigned int dim) {
  if (dim == 0)
    return __gen_ocl_get_global_size0();
  else if (dim == 1)
    return __gen_ocl_get_global_size1();
  else if (dim == 2)
    return __gen_ocl_get_global_size2();
  else
    return 1;
}


x86 assembly (clang, -O0):
<get_global_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1154 <get_global_size+0x24>
mov    $0x0,%al
call   1040 <__gen_ocl_get_global_size0@plt>
mov    %eax,-0x4(%rbp)
jmp    118d <get_global_size+0x5d>
cmpl   $0x1,-0x8(%rbp)
jne    116d <get_global_size+0x3d>
mov    $0x0,%al
call   1050 <__gen_ocl_get_global_size1@plt>
mov    %eax,-0x4(%rbp)
jmp    118d <get_global_size+0x5d>
cmpl   $0x2,-0x8(%rbp)
jne    1186 <get_global_size+0x56>
mov    $0x0,%al
call   1030 <__gen_ocl_get_global_size2@plt>
mov    %eax,-0x4(%rbp)
jmp    118d <get_global_size+0x5d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_global_size>:
cmp    $0x2,%edi
je     1145 <get_global_size+0x15>
cmp    $0x1,%edi
je     114c <get_global_size+0x1c>
test   %edi,%edi
jne    1153 <get_global_size+0x23>
xor    %eax,%eax
jmp    1040 <__gen_ocl_get_global_size0@plt>
xor    %eax,%eax
jmp    1030 <__gen_ocl_get_global_size2@plt>
xor    %eax,%eax
jmp    1050 <__gen_ocl_get_global_size1@plt>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @get_global_size(i32 %0) {
switch i32 %0, label %8 [
i32 0, label %2
i32 1, label %4
i32 2, label %6
]
2: ; preds = %1
%3 = tail call i32 (...) @__gen_ocl_get_global_size0()
br label %8
4: ; preds = %1
%5 = tail call i32 (...) @__gen_ocl_get_global_size1()
br label %8
6: ; preds = %1
%7 = tail call i32 (...) @__gen_ocl_get_global_size2()
br label %8
8: ; preds = %1, %6, %4, %2
%9 = phi i32 [ %3, %2 ], [ %5, %4 ], [ %7, %6 ], [ 1, %1 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ FD_SET(int, int /*<<< orphan*/ *);
void set_fd(fd_set *s, int *maxfd, int fd) {
  FD_SET(fd, s);
  if (*maxfd < fd)
    *maxfd = fd;
}


x86 assembly (clang, -O0):
<set_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <FD_SET@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
jge    1147 <set_fd+0x37>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_fd>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%rsi
mov    %edx,%edi
call   1030 <FD_SET@plt>
cmp    %ebx,(%r14)
jge    112b <set_fd+0x1b>
mov    %ebx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @set_fd(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
%9 = call i32 @FD_SET(i32 %7, i32* %8)
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = load i32, i32* %6
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = load i32, i32* %6
%16 = load i32*, i32** %5
store i32 %15, i32* %16
br label %17
17: ; preds = %14, %3
ret void
}

LLVM IR (-O2):
define void @set_fd(i32* %0, i32* nocapture %1, i32 %2) {
%4 = tail call i32 @FD_SET(i32 %2, i32* %0)
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, %2
br i1 %6, label %7, label %8
7: ; preds = %3
store i32 %2, i32* %1
br label %8
8: ; preds = %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ milli_sleep(unsigned long);
long rand();
int sleep_millis(long int base) {
  int millis_to_sleep = rand() % (base + 1);
  milli_sleep((unsigned long)millis_to_sleep);
  return millis_to_sleep;
}


x86 assembly (clang, -O0):
<sleep_millis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    -0x8(%rbp),%rcx
add    $0x1,%rcx
cqto
idiv   %rcx
mov    %edx,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rdi
call   1030 <milli_sleep@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_millis>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <rand@plt>
add    $0x1,%rbx
mov    %rax,%rcx
or     %rbx,%rcx
shr    $0x20,%rcx
je     1142 <sleep_millis+0x22>
cqto
idiv   %rbx
jmp    1146 <sleep_millis+0x26>
xor    %edx,%edx
div    %ebx
movslq %edx,%rbx
mov    %rbx,%rdi
call   1030 <milli_sleep@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sleep_millis(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = call i64 (...) @rand()
%5 = load i64, i64* %2
%6 = add nsw i64 %5, 1
%7 = srem i64 %4, %6
%8 = trunc i64 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = call i32 @milli_sleep(i64 %10)
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @sleep_millis(i64 %0) {
%2 = tail call i64 (...) @rand()
%3 = add nsw i64 %0, 1
%4 = srem i64 %2, %3
%5 = trunc i64 %4 to i32
%6 = shl i64 %4, 32
%7 = ashr exact i64 %6, 32
%8 = tail call i32 @milli_sleep(i64 %7)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ fprintf_parameters(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void print_default_parameters() {
  fprintf(stderr, "\nDefault parameter settings are:\n\n");
  fprintf_parameters(stderr);
}


x86 assembly (clang, -O0):
<print_default_parameters>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <fprintf_parameters@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_default_parameters>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fprintf_parameters@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"\0ADefault parameter settings are:\0A\0A\00"
define void @print_default_parameters() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf_parameters(i32 %3)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"\0ADefault parameter settings are:\0A\0A\00"
define void @print_default_parameters() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf_parameters(i32 %3)
ret void
}
void airkiss_record_move_ones(void *base_addr, int record_num) {
  int i;
  unsigned short *record_base = (unsigned short *)base_addr;
  for (i = 0; i < record_num; i++) {
    record_base[i] = record_base[i + 1];
  }
}


x86 assembly (clang, -O0):
<airkiss_record_move_ones>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <airkiss_record_move_ones+0x51>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,2),%dx
mov    -0x18(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111a <airkiss_record_move_ones+0x1a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<airkiss_record_move_ones>:
test   %esi,%esi
jle    112a <airkiss_record_move_ones+0x1a>
push   %rax
lea    0x2(%rdi),%rax
mov    %esi,%edx
add    %rdx,%rdx
mov    %rax,%rsi
call   1030 <memmove@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @airkiss_record_move_ones(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr i8, i8* %0, i64 2
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 1
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ pkt_asm_field_output_key_list(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void help_key() {
  fprintf(stderr, "FILTER KEYS:\n");
  pkt_asm_field_output_key_list(stderr, "\t");
  exit(0);
}


x86 assembly (clang, -O0):
<help_key>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
call   1030 <pkt_asm_field_output_key_list@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<help_key>:
push   %rbx
mov    0x2ea8(%rip),%rbx
mov    (%rbx),%edi
lea    0xebf(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xebf(%rip),%rsi
call   1030 <pkt_asm_field_output_key_list@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"FILTER KEYS:\0A\00"
@.str.1 = [2 x i8] c"\09\00"
define void @help_key() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @pkt_asm_field_output_key_list(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"FILTER KEYS:\0A\00"
@.str.1 = [2 x i8] c"\09\00"
define void @help_key() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @pkt_asm_field_output_key_list(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int count_ones(int);
int count_ones_fast(int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i = 55;
  printf("number of 1's in bit representation of %d: %d\n", i, count_ones(i));
  i = 57;
  printf("number of 1's in bit representation of %d: %d\n", i,
         count_ones_fast(i));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x37,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <count_ones@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
movl   $0x39,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <count_ones_fast@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xe7a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x37,%edi
call   1030 <count_ones@plt>
lea    0xebe(%rip),%rbx
mov    %rbx,%rdi
mov    $0x37,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    $0x39,%edi
call   1050 <count_ones_fast@plt>
mov    %rbx,%rdi
mov    $0x39,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"number of 1's in bit representation of %d: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 55, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @count_ones(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5)
store i32 57, i32* %2
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @count_ones_fast(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [47 x i8] c"number of 1's in bit representation of %d: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @count_ones(i32 55)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 55, i32 %1)
%3 = tail call i32 @count_ones_fast(i32 57)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 57, i32 %3)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int read_target_system_without_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(150, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<read_target_system_without_solutions>:
mov    $0x96,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @read_target_system_without_solutions() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 150, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
char *ckitox(n)
int n;
{
  long nn;
  nn = n;
  return (ckltox(nn));
}


x86 assembly (clang, -O0):
<ckitox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <ckltox@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ckitox>:
push   %rax
movslq %edi,%rdi
xor    %eax,%eax
call   1030 <ckltox@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @ckitox(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = call i32 (i64, ...) bitcast (i32 (...)* @ckltox to i32 (i64, ...)*)(i64 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @ckitox(i32 %0) {
%2 = sext i32 %0 to i64
%3 = tail call i32 (i64, ...) bitcast (i32 (...)* @ckltox to i32 (i64, ...)*)(i64 %2)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ address_tabcontrol_show(int /*<<< orphan*/ *);
void roadmap_address_history(void) { address_tabcontrol_show(NULL); }


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

x86 assembly (clang, -O2):
<roadmap_address_history>:
xor    %edi,%edi
jmp    1030 <address_tabcontrol_show@plt>

LLVM IR (-O0):
define void @roadmap_address_history() {
%1 = call i32 @address_tabcontrol_show(i32* null)
ret void
}

LLVM IR (-O2):
define void @roadmap_address_history() {
%1 = tail call i32 @address_tabcontrol_show(i32* null)
ret void
}