xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned long redondear_a_potencia_2(unsigned long);
int es_potencia_2(unsigned long int valor) {
  return redondear_a_potencia_2(valor) == valor;
}


x86 assembly (clang, -O0):
<es_potencia_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <redondear_a_potencia_2@plt>
cmp    -0x8(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<es_potencia_2>:
push   %rbx
mov    %rdi,%rbx
call   1030 <redondear_a_potencia_2@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @es_potencia_2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @redondear_a_potencia_2(i64 %3)
%5 = load i64, i64* %2
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @es_potencia_2(i64 %0) {
%2 = tail call i64 @redondear_a_potencia_2(i64 %0)
%3 = icmp eq i64 %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ tester_test_passed();
void test_create_connection_disconnect(void *user_data) {
  tester_test_passed();
}


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

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

LLVM IR (-O0):
define void @test_create_connection_disconnect(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @tester_test_passed()
ret void
}

LLVM IR (-O2):
define void @test_create_connection_disconnect(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @tester_test_passed()
ret void
}
void vkbcReset() {}


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

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

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

LLVM IR (-O2):
define void @vkbcReset() {
ret void
}
/* Variables and functions */
float exp2f(float);
scalar_t__ isnan(float);
float log2f(float);
float powf(float x, float y) {
  if (isnan(x))
    return x;
  if (isnan(y))
    return y;
  return exp2f(y * log2f(x));
}


x86 assembly (clang, -O0):
<powf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1050 <isnan@plt>
cmp    $0x0,%rax
je     1165 <powf+0x35>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11b2 <powf+0x82>
movss  -0xc(%rbp),%xmm0
call   1050 <isnan@plt>
cmp    $0x0,%rax
je     1188 <powf+0x58>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11b2 <powf+0x82>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <log2f@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
mulss  %xmm1,%xmm0
call   1030 <exp2f@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powf>:
push   %rax
movss  %xmm1,(%rsp)
movss  %xmm0,0x4(%rsp)
call   1050 <isnan@plt>
test   %rax,%rax
je     114e <powf+0x1e>
movss  0x4(%rsp),%xmm0
pop    %rax
ret
movss  (%rsp),%xmm0
call   1050 <isnan@plt>
test   %rax,%rax
je     1164 <powf+0x34>
movss  (%rsp),%xmm0
pop    %rax
ret
movss  0x4(%rsp),%xmm0
call   1040 <log2f@plt>
mulss  (%rsp),%xmm0
pop    %rax
jmp    1030 <exp2f@plt>

LLVM IR (-O0):
define float @powf(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* %4
store float %10, float* %3
br label %23
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* %5
store float %16, float* %3
br label %23
17: ; preds = %11
%18 = load float, float* %5
%19 = load float, float* %4
%20 = call float @log2f(float %19)
%21 = fmul float %18, %20
%22 = call float @exp2f(float %21)
store float %22, float* %3
br label %23
23: ; preds = %17, %15, %9
%24 = load float, float* %3
ret float %24
}

LLVM IR (-O2):
define float @powf(float %0, float %1) {
%3 = tail call i64 @isnan(float %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = tail call i64 @isnan(float %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = tail call float @log2f(float %0)
%10 = fmul float %9, %1
%11 = tail call float @exp2f(float %10)
br label %12
12: ; preds = %5, %2, %8
%13 = phi float [ %11, %8 ], [ %0, %2 ], [ %1, %5 ]
ret float %13
}
float i(float x) { return 2 / x - 3 / x; }


x86 assembly (clang, -O0):
<i>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
divss  -0x4(%rbp),%xmm0
movss  0xee2(%rip),%xmm1
divss  -0x4(%rbp),%xmm1
subss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<i>:
shufps $0x0,%xmm0,%xmm0
movaps 0xef5(%rip),%xmm1
divps  %xmm0,%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @i(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fdiv float 2.000000e+00, %3
%5 = load float, float* %2
%6 = fdiv float 3.000000e+00, %5
%7 = fsub float %4, %6
ret float %7
}

LLVM IR (-O2):
define float @i(float %0) {
%2 = insertelement <2 x float> poison, float %0, i64 0
%3 = shufflevector <2 x float> %2, <2 x float> poison, <2 x i32> zeroinitializer
%4 = fdiv <2 x float> <float 2.000000e+00, float 3.000000e+00>, %3
%5 = shufflevector <2 x float> %4, <2 x float> poison, <2 x i32> <i32 1, i32 undef>
%6 = fsub <2 x float> %4, %5
%7 = extractelement <2 x float> %6, i64 0
ret float %7
}
double Clip3(double minVal, double maxVal, double a) {
  if (a < minVal)
    a = minVal;
  else if (a > maxVal)
    a = maxVal;
  return a;
}


x86 assembly (clang, -O0):
<Clip3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1136 <Clip3+0x36>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1155 <Clip3+0x55>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1150 <Clip3+0x50>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1155 <Clip3+0x55>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Clip3>:
ucomisd %xmm2,%xmm0
ja     1114 <Clip3+0x14>
ucomisd %xmm1,%xmm2
movapd %xmm2,%xmm0
jbe    1114 <Clip3+0x14>
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Clip3(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double, double* %4
%9 = fcmp olt double %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load double, double* %4
store double %11, double* %6
br label %19
12: ; preds = %3
%13 = load double, double* %6
%14 = load double, double* %5
%15 = fcmp ogt double %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load double, double* %5
store double %17, double* %6
br label %18
18: ; preds = %16, %12
br label %19
19: ; preds = %18, %10
%20 = load double, double* %6
ret double %20
}

LLVM IR (-O2):
define double @Clip3(double %0, double %1, double %2) {
%4 = fcmp olt double %2, %0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = fcmp ogt double %2, %1
br i1 %6, label %7, label %8
7: ; preds = %5
br label %8
8: ; preds = %3, %5, %7
%9 = phi double [ %1, %7 ], [ %2, %5 ], [ %0, %3 ]
ret double %9
}
/* Variables and functions */
int syscall(int, int, int);
int missing_setns(int fd, int nstype) { return syscall(308, fd, nstype); }


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

x86 assembly (clang, -O2):
<missing_setns>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x134,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @missing_setns(i32 %0, i32 %1) {
%3 = tail call i32 @syscall(i32 308, i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ file_exists(char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *, char const *);
int /*<<< orphan*/ stderr;
void check_file_exists(const char *filename, const char *errormsg) {
  if (!file_exists(filename)) {
    fprintf(stderr, errormsg, filename);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<check_file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <file_exists@plt>
cmp    $0x0,%eax
jne    1172 <check_file_exists+0x42>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_file_exists>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <file_exists@plt>
test   %eax,%eax
je     114b <check_file_exists+0x1b>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @check_file_exists(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @file_exists(i8* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %4
%11 = load i8*, i8** %3
%12 = call i32 @fprintf(i32 %9, i8* %10, i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @check_file_exists(i8* %0, i8* %1) {
%3 = tail call i32 @file_exists(i8* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* %1, i8* %0)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
size_t strlen(char const *);
int /*<<< orphan*/ write_byte(char const);
void write_text(const char *text) {
  size_t i;
  for (i = 0; i < strlen(text); i++)
    write_byte(text[i]);
}


x86 assembly (clang, -O0):
<write_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jae    1177 <write_text+0x57>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <write_byte@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1134 <write_text+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_text>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     116b <write_text+0x4b>
mov    %rdi,%r14
movsbl %al,%edi
call   1040 <write_byte@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
cmp    $0x2,%rax
jb     116b <write_text+0x4b>
mov    $0x1,%ebx
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1040 <write_byte@plt>
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cmp    %rax,%rbx
jb     1150 <write_text+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @write_text(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1
%5 = tail call i32 @write_byte(i8 signext %2)
%6 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%7 = icmp ugt i64 %6, 1
br i1 %7, label %8, label %16
8: ; preds = %4, %8
%9 = phi i64 [ %13, %8 ], [ 1, %4 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = tail call i32 @write_byte(i8 signext %11)
%13 = add nuw i64 %9, 1
%14 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%15 = icmp ult i64 %13, %14
br i1 %15, label %8, label %16
16: ; preds = %8, %4, %1
ret void
}
/* Type definitions */
struct stat {
  scalar_t__ st_mtime;
};

/* Variables and functions */
int /*<<< orphan*/ stat(char const *, struct stat *);
int trig_file(const char *filename) {
  return 1;
  struct stat cur_stat;
  stat(filename, &cur_stat);
  if (cur_stat.st_mtime != 0) {
    return 1;
  } else {
    return 0;
  }
}


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

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

LLVM IR (-O0):
%struct.stat = type { i64 }
define i32 @trig_file(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
ret i32 1
}

LLVM IR (-O2):
define i32 @trig_file(i8* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ getc(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdin;
void printerr(char *msg) {
  puts(msg);
  puts("Press enter to exit");
  getc(stdin);
}


x86 assembly (clang, -O0):
<printerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <getc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printerr>:
push   %rax
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <getc@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Press enter to exit\00"
@stdin = global i32 0
define void @printerr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @puts(i8* %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = call i32 @getc(i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Press enter to exit\00"
@stdin = global i32 0
define void @printerr(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = tail call i32 @getc(i32 %4)
ret void
}
int test_imm_C8int64_lowword_reg(long long val) {
  return ((val) & (0xC8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C8int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xc8,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C8int64_lowword_reg>:
test   $0xc8,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C8int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 200
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void foo632() {}


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

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

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

LLVM IR (-O2):
define void @foo632() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int reverse(int);
int main(void) { printf("%d", reverse(123)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7b,%edi
call   1030 <reverse@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7b,%edi
call   1030 <reverse@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = call i32 @reverse(i32 123)
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @reverse(i32 123)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int biBg(char *name, char **args, char **environ) {
  printf("Not realized\n");
  return 1;
}


x86 assembly (clang, -O0):
<biBg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<biBg>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Not realized\0A\00"
define i32 @biBg(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 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [13 x i8] c"Not realized\00"
define i32 @biBg(i8* nocapture readnone %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ memcpy(void *, void *, int);
int MPI_Alltoall(void *in, int nin, int sz_in, void *out, int nout, int sz_out,
                 int bla) {
  memcpy(out, in, nout * sz_out * 1);
  assert(sz_in == sz_out);
  assert(nin == nout);
  return 0;
}


x86 assembly (clang, -O0):
<MPI_Alltoall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x1c(%rbp),%edx
imul   -0x20(%rbp),%edx
shl    $0x0,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%eax
cmp    -0x20(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%eax
cmp    -0x1c(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPI_Alltoall>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r9d,%ebx
mov    %r8d,%ebp
mov    %edx,%r14d
mov    %esi,%r15d
mov    %rdi,%rsi
mov    %r9d,%edx
imul   %r8d,%edx
mov    %rcx,%rdi
call   1040 <memcpy@plt>
xor    %edi,%edi
cmp    %ebx,%r14d
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    %ebp,%r15d
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @MPI_Alltoall(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i8* %3, i8** %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i8*, i8** %11
%16 = load i8*, i8** %8
%17 = load i32, i32* %12
%18 = load i32, i32* %13
%19 = mul nsw i32 %17, %18
%20 = mul nsw i32 %19, 1
%21 = call i32 @memcpy(i8* %15, i8* %16, i32 %20)
%22 = load i32, i32* %10
%23 = load i32, i32* %13
%24 = icmp eq i32 %22, %23
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = load i32, i32* %9
%28 = load i32, i32* %12
%29 = icmp eq i32 %27, %28
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
ret i32 0
}

LLVM IR (-O2):
define i32 @MPI_Alltoall(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4, i32 %5, i32 %6) {
%8 = mul nsw i32 %5, %4
%9 = tail call i32 @memcpy(i8* %3, i8* %0, i32 %8)
%10 = icmp eq i32 %2, %5
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = icmp eq i32 %1, %4
%14 = zext i1 %13 to i32
%15 = tail call i32 @assert(i32 %14)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int getpagesize();
int main(void) {
  assert(getpagesize() == 0x10000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getpagesize@plt>
cmp    $0x10000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getpagesize@plt>
xor    %edi,%edi
cmp    $0x10000,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpagesize()
%3 = icmp eq i32 %2, 65536
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @getpagesize()
%2 = icmp eq i32 %1, 65536
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char const,
                           unsigned char const);
void disasm_imm32(char *dst, const unsigned char *src) {
  sprintf(dst, "%04X:%04X", (((src[3]) << 8) | (src[2])),
          (((src[1]) << 8) | (src[0])));
}


x86 assembly (clang, -O0):
<disasm_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rdx
movzbl (%rdx),%edx
or     %edx,%eax
lea    0xeaa(%rip),%rsi
movzbl %cl,%edx
movzbl %al,%ecx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disasm_imm32>:
movzbl 0x2(%rsi),%edx
movzbl (%rsi),%ecx
lea    0xee2(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%04X:%04X\00"
define void @disasm_imm32(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i64 3
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = or i32 %10, %14
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 1
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = shl i32 %20, 8
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i64 0
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = or i32 %21, %25
%27 = trunc i32 %26 to i8
%28 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 zeroext %16, i8 zeroext %27)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%04X:%04X\00"
define void @disasm_imm32(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 2
%4 = load i8, i8* %3
%5 = load i8, i8* %1
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 zeroext %4, i8 zeroext %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_key_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
void *pthread_getspecific(int /*<<< orphan*/);
scalar_t__ pthread_setspecific(int /*<<< orphan*/, void *);
void f2(pthread_key_t *key) {
  void *val = pthread_getspecific(*key);
  *((size_t *)val) += 2;
  assert(0 == pthread_setspecific(*key, val));
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <pthread_getspecific@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
call   1050 <pthread_setspecific@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <pthread_getspecific@plt>
addq   $0x2,(%rax)
mov    (%rbx),%edi
mov    %rax,%rsi
call   1050 <pthread_setspecific@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rbx
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @f2(i32* %0) {
%2 = alloca i32*
%3 = alloca i8*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = call i8* @pthread_getspecific(i32 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
%10 = add i64 %9, 2
store i64 %10, i64* %8
%11 = load i32*, i32** %2
%12 = load i32, i32* %11
%13 = load i8*, i8** %3
%14 = call i64 @pthread_setspecific(i32 %12, i8* %13)
%15 = icmp eq i64 0, %14
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
ret void
}

LLVM IR (-O2):
define void @f2(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i8* @pthread_getspecific(i32 %2)
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
%6 = add i64 %5, 2
store i64 %6, i64* %4
%7 = load i32, i32* %0
%8 = tail call i64 @pthread_setspecific(i32 %7, i8* %3)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t
hfp_subevent_extended_audio_gateway_error_get_error(const uint8_t *event) {
  return event[3];
}


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

x86 assembly (clang, -O2):
<hfp_subevent_extended_audio_gateway_error_get_error>:
mov    0xc(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @hfp_subevent_extended_audio_gateway_error_get_error(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int foo(int, int, int, int, int, int, int, int, int, int, int, int);
int main() {
  int x;
  x = foo(1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2);
  if (x != 14)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%r8d
mov    $0x2,%r9d
mov    %r8d,%edi
mov    %r8d,%esi
mov    %r8d,%edx
mov    %r8d,%ecx
movl   $0x1,(%rsp)
movl   $0x1,0x8(%rsp)
movl   $0x1,0x10(%rsp)
movl   $0x1,0x18(%rsp)
movl   $0x1,0x20(%rsp)
movl   $0x2,0x28(%rsp)
call   1030 <foo@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xe,-0x8(%rbp)
je     1184 <main+0x74>
movl   $0x1,-0x4(%rbp)
jmp    118b <main+0x7b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
mov    $0x2,%r9d
push   $0x2
push   $0x1
push   $0x1
push   $0x1
push   $0x1
push   $0x1
call   1030 <foo@plt>
add    $0x30,%rsp
xor    %ecx,%ecx
cmp    $0xe,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @foo(i32 1, i32 1, i32 1, i32 1, i32 1, i32 2, i32 1, i32 1, i32 1, i32 1, i32 1, i32 2)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 14
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 1, i32* %1
br label %8
7: ; preds = %0
store i32 0, i32* %1
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1, i32 1, i32 1, i32 1, i32 1, i32 2, i32 1, i32 1, i32 1, i32 1, i32 1, i32 2)
%2 = icmp ne i32 %1, 14
%3 = zext i1 %2 to i32
ret i32 %3
}
unsigned xrop3_29_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = T ^ D;
  stk2 = S & stk3;
  stk1 = D ^ stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_29_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_29_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    $0xff,%eax
and    %ecx,%eax
xor    $0xffffff00,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_29_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = load i32, i32* %5
%25 = xor i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %6
%27 = load i32, i32* %10
%28 = and i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %5
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = xor i32 %32, -1
store i32 %33, i32* %8
%34 = load i32, i32* %8
ret i32 %34
}

LLVM IR (-O2):
define i32 @xrop3_29_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, 255
%8 = and i32 %7, %4
%9 = xor i32 %8, -256
ret i32 %9
}
void foo_1_1_2_2_1_2_1_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_2_2_1_2_1_2_1() {
ret void
}
/* Variables and functions */
char *_osmo_hexdump(unsigned char const *, int, char *);
char *osmo_hexdump_nospc(const unsigned char *buf, int len) {
  return _osmo_hexdump(buf, len, "");
}


x86 assembly (clang, -O0):
<osmo_hexdump_nospc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <_osmo_hexdump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<osmo_hexdump_nospc>:
lea    0xee9(%rip),%rdx
jmp    1030 <_osmo_hexdump@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @osmo_hexdump_nospc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i8* @_osmo_hexdump(i8* %5, i32 %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @osmo_hexdump_nospc(i8* %0, i32 %1) {
%3 = tail call i8* @_osmo_hexdump(i8* %0, i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
void tegra124_emc_timing_invalidate(void) { return; }


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

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

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

LLVM IR (-O2):
define void @tegra124_emc_timing_invalidate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int f_proj4(int mode, unsigned char **sec, float *data, unsigned int ndata,
            char *inv_out, void **local, const char *arg1) {
  if (mode == -1) {
    fprintf(stderr, "Proj4 package not installed\n");
    return 1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<f_proj4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    115d <f_proj4+0x4d>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1164 <f_proj4+0x54>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_proj4>:
cmp    $0xffffffff,%edi
je     111b <f_proj4+0xb>
mov    $0x1,%eax
ret
push   %rax
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x8,%rsp
mov    $0x1,%eax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"Proj4 package not installed\0A\00"
define i32 @f_proj4(i32 %0, i8** %1, float* %2, i32 %3, i8* %4, i8** %5, i8* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8**
%11 = alloca float*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i8**
%15 = alloca i8*
store i32 %0, i32* %9
store i8** %1, i8*** %10
store float* %2, float** %11
store i32 %3, i32* %12
store i8* %4, i8** %13
store i8** %5, i8*** %14
store i8* %6, i8** %15
%16 = load i32, i32* %9
%17 = icmp eq i32 %16, -1
br i1 %17, label %18, label %21
18: ; preds = %7
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %8
br label %22
21: ; preds = %7
store i32 1, i32* %8
br label %22
22: ; preds = %21, %18
%23 = load i32, i32* %8
ret i32 %23
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Proj4 package not installed\0A\00"
define i32 @f_proj4(i32 %0, i8** nocapture readnone %1, float* nocapture readnone %2, i32 %3, i8* nocapture readnone %4, i8** nocapture readnone %5, i8* nocapture readnone %6) {
%8 = icmp eq i32 %0, -1
br i1 %8, label %9, label %12
9: ; preds = %7
%10 = load i32, i32* @stderr
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %7, %9
ret i32 1
}
/* Variables and functions */
void *Cyc_BansheeIf_composite_constraint(unsigned int, void *,
                                         int /*<<< orphan*/);
void *Cyc_BansheeIf_neg_constraint(void *c1) {
  void *_T0;
  _T0 = Cyc_BansheeIf_composite_constraint(2U, c1, 0);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_BansheeIf_neg_constraint>:
mov    %rdi,%rsi
mov    $0x2,%edi
xor    %edx,%edx
jmp    1030 <Cyc_BansheeIf_composite_constraint@plt>

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

LLVM IR (-O2):
define i8* @Cyc_BansheeIf_neg_constraint(i8* %0) {
%2 = tail call i8* @Cyc_BansheeIf_composite_constraint(i32 2, i8* %0, i32 0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ ft_eight_queens_puzzle_2();
int main(void) {
  ft_eight_queens_puzzle_2();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ft_eight_queens_puzzle_2()
ret i32 0
}
void swap(char *a, char *b) {
  char tmp = *a;
  *a = *b;
  *b = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%al
mov    (%rsi),%cl
mov    %cl,(%rdi)
mov    %al,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
int utl_unpow2(int n) {
  int r;
  r = (n & 0xAAAA) != 0;
  r |= ((n & 0xCCCC) != 0) << 1;
  r |= ((n & 0xF0F0) != 0) << 2;
  r |= ((n & 0xFF00) != 0) << 3;
  return r;
}


x86 assembly (clang, -O0):
<utl_unpow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xaaaa,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xcccc,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
shl    $0x1,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf0f0,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
shl    $0x2,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
shl    $0x3,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utl_unpow2>:
xor    %eax,%eax
test   $0xaaaa,%edi
setne  %al
xor    %ecx,%ecx
test   $0xcccc,%edi
setne  %cl
lea    (%rax,%rcx,2),%eax
xor    %ecx,%ecx
test   $0xf0f0,%edi
setne  %cl
lea    (%rax,%rcx,4),%eax
xor    %ecx,%ecx
test   $0xff00,%edi
setne  %cl
lea    (%rax,%rcx,8),%eax
ret

LLVM IR (-O0):
define i32 @utl_unpow2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 43690
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = and i32 %8, 52428
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
%12 = shl i32 %11, 1
%13 = load i32, i32* %3
%14 = or i32 %13, %12
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = and i32 %15, 61680
%17 = icmp ne i32 %16, 0
%18 = zext i1 %17 to i32
%19 = shl i32 %18, 2
%20 = load i32, i32* %3
%21 = or i32 %20, %19
store i32 %21, i32* %3
%22 = load i32, i32* %2
%23 = and i32 %22, 65280
%24 = icmp ne i32 %23, 0
%25 = zext i1 %24 to i32
%26 = shl i32 %25, 3
%27 = load i32, i32* %3
%28 = or i32 %27, %26
store i32 %28, i32* %3
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @utl_unpow2(i32 %0) {
%2 = and i32 %0, 43690
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
%5 = and i32 %0, 52428
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 0, i32 2
%8 = or i32 %7, %4
%9 = and i32 %0, 61680
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32 0, i32 4
%12 = or i32 %8, %11
%13 = and i32 %0, 65280
%14 = icmp eq i32 %13, 0
%15 = select i1 %14, i32 0, i32 8
%16 = or i32 %12, %15
ret i32 %16
}
void imv_window_clear(struct imv_window *window, unsigned char r,
                      unsigned char g, unsigned char b) {
  (void)window;
  (void)r;
  (void)g;
  (void)b;
}


x86 assembly (clang, -O0):
<imv_window_clear>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %rdi,-0x8(%rbp)
mov    %dl,-0x9(%rbp)
mov    %cl,-0xa(%rbp)
mov    %al,-0xb(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.imv_window = type opaque
define void @imv_window_clear(%struct.imv_window* %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca %struct.imv_window*
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store %struct.imv_window* %0, %struct.imv_window** %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%9 = load %struct.imv_window*, %struct.imv_window** %5
%10 = load i8, i8* %6
%11 = load i8, i8* %7
%12 = load i8, i8* %8
ret void
}

LLVM IR (-O2):
%struct.imv_window = type opaque
define void @imv_window_clear(%struct.imv_window* nocapture %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help_script(void) {
  printf("\nwe provide u with if and while statement in scripts");
  printf("\nto see an example refer to readme.txt");
  printf("\nfor any problem contact amrit kumar at amritkrs@gmail.com\n");
}


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

x86 assembly (clang, -O2):
<help_script>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xf01(%rip),%rdi
call   1040 <printf@plt>
lea    0xf1c(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [53 x i8] c"\0Awe provide u with if and while statement in scripts\00"
@.str.1 = [39 x i8] c"\0Ato see an example refer to readme.txt\00"
@.str.2 = [60 x i8] c"\0Afor any problem contact amrit kumar at amritkrs@gmail.com\0A\00"
define void @help_script() {
%1 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c"\0Awe provide u with if and while statement in scripts\00"
@.str.1 = [39 x i8] c"\0Ato see an example refer to readme.txt\00"
@str = [59 x i8] c"\0Afor any problem contact amrit kumar at amritkrs@gmail.com\00"
define void @help_script() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_9Cint32_reg(int val) { return ((val) & (0x9C << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_9Cint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x9c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_9Cint32_reg>:
test   $0x9c,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Cint32_reg(i32 %0) {
%2 = and i32 %0, 156
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ndndc_fatal(int, char *, int, char const *);
void on_error_exit(int res, int lineno, const char *msg) {
  if (res >= 0)
    return;
  ndndc_fatal(lineno, "fatal error, res = %d, %s\n", res, msg);
}


x86 assembly (clang, -O0):
<on_error_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1131 <on_error_exit+0x21>
jmp    1147 <on_error_exit+0x37>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xebe(%rip),%rsi
call   1030 <ndndc_fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_error_exit>:
test   %edi,%edi
js     1115 <on_error_exit+0x5>
ret
mov    %rdx,%rcx
mov    %edi,%edx
lea    0xedf(%rip),%rax
mov    %esi,%edi
mov    %rax,%rsi
jmp    1030 <ndndc_fatal@plt>

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

LLVM IR (-O2):
@.str = [27 x i8] c"fatal error, res = %d, %s\0A\00"
define void @on_error_exit(i32 %0, i32 %1, i8* %2) {
%4 = icmp sgt i32 %0, -1
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @ndndc_fatal(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %2)
br label %7
7: ; preds = %3, %5
ret void
}