xunge/DecIR huggingface dataset:
/* Variables and functions */
char *change_path(char const *, char const *, char const *, int /*<<< orphan*/);
char *exec_name(const char *old_name, const char *old_dir,
                const char *new_dir) {
  return change_path(old_name, old_dir, new_dir, 0);
}


x86 assembly (clang, -O0):
<exec_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <change_path@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exec_name>:
xor    %ecx,%ecx
jmp    1030 <change_path@plt>

LLVM IR (-O0):
define i8* @exec_name(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 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i8* @change_path(i8* %7, i8* %8, i8* %9, i32 0)
ret i8* %10
}

LLVM IR (-O2):
define i8* @exec_name(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @change_path(i8* %0, i8* %1, i8* %2, i32 0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ I_FadeOutMusic(int);
void S_FadeOutMusic(int ms) { I_FadeOutMusic(ms); }


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

x86 assembly (clang, -O2):
<S_FadeOutMusic>:
jmp    1030 <I_FadeOutMusic@plt>

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

LLVM IR (-O2):
define void @S_FadeOutMusic(i32 %0) {
%2 = tail call i32 @I_FadeOutMusic(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_string(char *s) { free(s); }


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

x86 assembly (clang, -O2):
<free_string>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_string(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int mgetch();
symbol() {
  int c;
  c = mgetch();
  return (c);
}


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

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

LLVM IR (-O0):
define i32 @symbol() {
%1 = alloca i32
%2 = call i32 (...) @mgetch()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @symbol() {
%1 = tail call i32 (...) @mgetch()
ret i32 %1
}
/* Variables and functions */
scalar_t__ isnan(double);
int /*<<< orphan*/ printf(char *);
double swabs(double x) {
  if (isnan(x)) {
    printf("IS NAN!!!\n");
    x = 0;
  }
  if (x > 0)
    return x;
  else
    return -x;
}


x86 assembly (clang, -O0):
<swabs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%rax
je     1155 <swabs+0x35>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1176 <swabs+0x56>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1197 <swabs+0x77>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swabs>:
sub    $0x18,%rsp
movapd %xmm0,(%rsp)
call   1040 <isnan@plt>
movapd (%rsp),%xmm2
test   %rax,%rax
je     1148 <swabs+0x28>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
xorpd  %xmm2,%xmm2
movapd 0xeb0(%rip),%xmm1
xorpd  %xmm2,%xmm1
xorpd  %xmm0,%xmm0
cmpltsd %xmm2,%xmm0
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"IS NAN!!!\0A\00"
define double @swabs(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = call i64 @isnan(double %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store double 0.000000e+00, double* %3
br label %9
9: ; preds = %7, %1
%10 = load double, double* %3
%11 = fcmp ogt double %10, 0.000000e+00
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load double, double* %3
store double %13, double* %2
br label %17
14: ; preds = %9
%15 = load double, double* %3
%16 = fneg double %15
store double %16, double* %2
br label %17
17: ; preds = %14, %12
%18 = load double, double* %2
ret double %18
}

LLVM IR (-O2):
@str = [10 x i8] c"IS NAN!!!\00"
define double @swabs(double %0) {
%2 = tail call i64 @isnan(double %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = phi double [ 0.000000e+00, %4 ], [ %0, %1 ]
%8 = fcmp ogt double %7, 0.000000e+00
%9 = fneg double %7
%10 = select i1 %8, double %7, double %9
ret double %10
}
/* Variables and functions */
char *string_val() { return NULL; }


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

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

LLVM IR (-O0):
define i8* @string_val() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @string_val() {
ret i8* null
}
/* Variables and functions */
char *libintl_dcgettext(char const *, char const *, int);
char *libintl_dgettext(const char *domainname, const char *msgid) {
  return libintl_dcgettext(domainname, msgid, 1729);
}


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

x86 assembly (clang, -O2):
<libintl_dgettext>:
mov    $0x6c1,%edx
jmp    1030 <libintl_dcgettext@plt>

LLVM IR (-O0):
define i8* @libintl_dgettext(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 = call i8* @libintl_dcgettext(i8* %5, i8* %6, i32 1729)
ret i8* %7
}

LLVM IR (-O2):
define i8* @libintl_dgettext(i8* %0, i8* %1) {
%3 = tail call i8* @libintl_dcgettext(i8* %0, i8* %1, i32 1729)
ret i8* %3
}
/* Variables and functions */
float logf(float const);
void glmLog3f(float out[3], const float x[3]) {
  for (size_t i = 0; i < 3; ++i)
    out[i] = logf(x[i]);
}


x86 assembly (clang, -O0):
<glmLog3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x3,-0x18(%rbp)
jae    1163 <glmLog3f+0x53>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1030 <logf@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <glmLog3f+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmLog3f>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movss  (%rsi),%xmm0
call   1030 <logf@plt>
movss  %xmm0,(%r14)
movss  0x4(%rbx),%xmm0
call   1030 <logf@plt>
movss  %xmm0,0x4(%r14)
movss  0x8(%rbx),%xmm0
call   1030 <logf@plt>
movss  %xmm0,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @glmLog3f(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = tail call float @logf(float %3)
store float %4, float* %0
%5 = getelementptr inbounds float, float* %1, i64 1
%6 = load float, float* %5
%7 = tail call float @logf(float %6)
%8 = getelementptr inbounds float, float* %0, i64 1
store float %7, float* %8
%9 = getelementptr inbounds float, float* %1, i64 2
%10 = load float, float* %9
%11 = tail call float @logf(float %10)
%12 = getelementptr inbounds float, float* %0, i64 2
store float %11, float* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ strcasestr(char *, char *);
int main() {
  if (strcasestr("ÖªÊ¶²úÈ¨Òª·¢Õ¹", "¹Ú¾ü±­"))
    printf("true");
  else
    printf("false");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1040 <strcasestr@plt>
cmp    $0x0,%rax
je     115d <main+0x3d>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
jmp    1169 <main+0x49>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xeee(%rip),%rsi
call   1040 <strcasestr@plt>
test   %rax,%rax
lea    0xef1(%rip),%rax
lea    0xee5(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"\C3\96\C2\AA\C3\8A\C2\B6\C2\B2\C3\BA\C3\88\C2\A8\C3\92\C2\AA\C2\B7\C2\A2\C3\95\C2\B9\00"
@.str.1 = [13 x i8] c"\C2\B9\C3\9A\C2\BE\C3\BC\C2\B1\C2\AD\00"
@.str.2 = [5 x i8] c"true\00"
@.str.3 = [6 x i8] c"false\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @strcasestr(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"\C3\96\C2\AA\C3\8A\C2\B6\C2\B2\C3\BA\C3\88\C2\A8\C3\92\C2\AA\C2\B7\C2\A2\C3\95\C2\B9\00"
@.str.1 = [13 x i8] c"\C2\B9\C3\9A\C2\BE\C3\BC\C2\B1\C2\AD\00"
@.str.2 = [5 x i8] c"true\00"
@.str.3 = [6 x i8] c"false\00"
define i32 @main() {
%1 = tail call i64 @strcasestr(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printBits(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void printStrBits(const char *str) { printBits(str, strlen(str)); }


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

x86 assembly (clang, -O2):
<printStrBits>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <printBits@plt>

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

LLVM IR (-O2):
define void @printStrBits(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @printBits(i8* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void jolly(void) { printf("For he's a jolly good fellow!\n"); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"For he's a jolly good fellow!\0A\00"
define void @jolly() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"For he's a jolly good fellow!\00"
define void @jolly() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, int);
int /*<<< orphan*/ produire(int);
int /*<<< orphan*/ sleep(int);
long producteur(long thrdID) {
  while (1) {
    int donnee = (int)thrdID;
    produire(donnee);
    printf("(%ld) + %d\n", thrdID, donnee);
    sleep(1);
  }
  return thrdID;
}


x86 assembly (clang, -O0):
<producteur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <produire@plt>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    113c <producteur+0xc>

x86 assembly (clang, -O2):
<producteur>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xec2(%rip),%r14
xchg   %ax,%ax
mov    %ebx,%edi
call   1040 <produire@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    1140 <producteur+0x10>

LLVM IR (-O0):
@.str = [12 x i8] c"(%ld) + %d\0A\00"
define i64 @producteur(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
br label %4
4: ; preds = %1, %4
%5 = load i64, i64* %2
%6 = trunc i64 %5 to i32
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @produire(i32 %7)
%9 = load i64, i64* %2
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %9, i32 %10)
%12 = call i32 @sleep(i32 1)
br label %4
}

LLVM IR (-O2):
@.str = [12 x i8] c"(%ld) + %d\0A\00"
define i64 @producteur(i64 %0) {
%2 = trunc i64 %0 to i32
br label %3
3: ; preds = %1, %3
%4 = tail call i32 @produire(i32 %2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %0, i32 %2)
%6 = tail call i32 @sleep(i32 1)
br label %3
}
con_lo(l) long l;
{
  if (l != 7)
    e(2);
}


x86 assembly (clang, -O0):
<con_lo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x7,-0x10(%rbp)
je     1133 <con_lo+0x23>
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <e@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<con_lo>:
cmp    $0x7,%rdi
je     1127 <con_lo+0x17>
push   %rax
mov    $0x2,%edi
xor    %eax,%eax
call   1030 <e@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @con_lo(i64 %0) {
%2 = icmp eq i64 %0, 7
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 2)
br label %5
5: ; preds = %3, %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ del_timer(char *);
int /*<<< orphan*/ destroy_map();
void i_mapper_module_unload() {
  del_timer("queue_reset_timer");
  del_timer("remove_players");
  destroy_map();
}


x86 assembly (clang, -O0):
<i_mapper_module_unload>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <del_timer@plt>
lea    0xedb(%rip),%rdi
call   1030 <del_timer@plt>
mov    $0x0,%al
call   1040 <destroy_map@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_mapper_module_unload>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <del_timer@plt>
lea    0xede(%rip),%rdi
call   1030 <del_timer@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <destroy_map@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"queue_reset_timer\00"
@.str.1 = [15 x i8] c"remove_players\00"
define void @i_mapper_module_unload() {
%1 = call i32 @del_timer(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @del_timer(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @destroy_map()
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"queue_reset_timer\00"
@.str.1 = [15 x i8] c"remove_players\00"
define void @i_mapper_module_unload() {
%1 = tail call i32 @del_timer(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @del_timer(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @destroy_map()
ret void
}
void tickEx(void *userdata) {}


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

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

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

LLVM IR (-O2):
define void @tickEx(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ num;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void power_of_two(int num) {
  if (!((num) & (num - 1)))
    printf("%d is power of 2\n", num);
  else
    printf("%d is not power of 2\n", num);
  return;
}


x86 assembly (clang, -O0):
<power_of_two>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
jne    1143 <power_of_two+0x33>
mov    -0x4(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
jmp    1152 <power_of_two+0x42>
mov    -0x4(%rbp),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power_of_two>:
mov    %edi,%esi
lea    -0x1(%rsi),%eax
test   %eax,%edi
lea    0xee2(%rip),%rax
lea    0xeed(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"%d is power of 2\0A\00"
@.str.1 = [22 x i8] c"%d is not power of 2\0A\00"
define void @power_of_two(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 1
%6 = and i32 %3, %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %14
11: ; preds = %1
%12 = load i32, i32* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"%d is power of 2\0A\00"
@.str.1 = [22 x i8] c"%d is not power of 2\0A\00"
define void @power_of_two(i32 %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
%3 = icmp ult i32 %2, 2
%4 = select i1 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @printf(i8* %4, i32 %0)
ret void
}
int setsid() {}


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

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

LLVM IR (-O0):
define i32 @setsid() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @setsid() {
ret i32 undef
}
char allowed_identifier_char(char which) {
  switch (which) {
  case '\0':
  case ' ':
  case '\t':
  case '\n':
  case '"':
  case '\'':
  case '*':
  case '$':
  case '{':
  case '}':
  case '(':
  case ')':
  case ';':
    return 0;
  default:
    return 1;
  }
}


x86 assembly (clang, -O0):
<allowed_identifier_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x7d,%eax
ja     113a <allowed_identifier_char+0x3a>
mov    -0x10(%rbp),%rax
lea    0xed8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x0,-0x1(%rbp)
jmp    113e <allowed_identifier_char+0x3e>
movb   $0x1,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<allowed_identifier_char>:
cmp    $0x7d,%edi
ja     111a <allowed_identifier_char+0x1a>
xor    %eax,%eax
mov    %edi,%ecx
lea    0xef0(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
ret
mov    $0x1,%al
ret

LLVM IR (-O0):
define signext i8 @allowed_identifier_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 0, label %6
i32 32, label %6
i32 9, label %6
i32 10, label %6
i32 34, label %6
i32 39, label %6
i32 42, label %6
i32 36, label %6
i32 123, label %6
i32 125, label %6
i32 40, label %6
i32 41, label %6
i32 59, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i8 0, i8* %2
br label %8
7: ; preds = %1
store i8 1, i8* %2
br label %8
8: ; preds = %7, %6
%9 = load i8, i8* %2
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @allowed_identifier_char(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 0, label %4
i32 32, label %4
i32 9, label %4
i32 10, label %4
i32 34, label %4
i32 39, label %4
i32 42, label %4
i32 36, label %4
i32 123, label %4
i32 125, label %4
i32 40, label %4
i32 41, label %4
i32 59, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %3
%5 = phi i8 [ 1, %3 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ]
ret i8 %5
}
void debug_object_destroy(void *addr, struct debug_obj_descr *descr) {}


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

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

LLVM IR (-O0):
%struct.debug_obj_descr = type opaque
define void @debug_object_destroy(i8* %0, %struct.debug_obj_descr* %1) {
%3 = alloca i8*
%4 = alloca %struct.debug_obj_descr*
store i8* %0, i8** %3
store %struct.debug_obj_descr* %1, %struct.debug_obj_descr** %4
ret void
}

LLVM IR (-O2):
%struct.debug_obj_descr = type opaque
define void @debug_object_destroy(i8* nocapture %0, %struct.debug_obj_descr* nocapture %1) {
ret void
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_57(int Salt, int Parameter) {
  unsigned b = Salt ^ 0x6D86030F;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_57>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x6d86030f,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_57>:
xor    $0x6d86030f,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_57(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = xor i32 %6, 1837499151
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @yahoo_M1Common(i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @yahoo_f01_57(i32 %0, i32 %1) {
%3 = xor i32 %0, 1837499151
%4 = tail call i32 @yahoo_M1Common(i32 %3, i32 %1)
ret i32 %4
}
int getBoxId(int x, int y) {
  int boxX = x / 3;
  int boxY = y / 3;
  return boxX + boxY * 3;
}


x86 assembly (clang, -O0):
<getBoxId>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
imul   $0x3,-0x10(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBoxId>:
movslq %edi,%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
shr    $0x20,%rcx
add    %eax,%ecx
movslq %esi,%rdx
imul   $0x55555556,%rdx,%rax
mov    %rax,%rsi
shr    $0x3f,%rsi
shr    $0x20,%rax
add    %esi,%eax
lea    (%rax,%rax,2),%eax
add    %edx,%ecx
sub    %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @getBoxId(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = sdiv i32 %7, 3
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = sdiv i32 %9, 3
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = mul nsw i32 %12, 3
%14 = add nsw i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @getBoxId(i32 %0, i32 %1) {
%3 = sdiv i32 %0, 3
%4 = srem i32 %1, 3
%5 = add i32 %3, %1
%6 = sub i32 %5, %4
ret i32 %6
}
int main() {
  int a;
  a += 2;
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 undef
}
/* Type definitions */
struct t_hashtable {
  int dummy;
};
struct t_config_file {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ config_file_write_line(struct t_config_file *, void const *,
                                          char *, void const *);
void secure_config_data_write_map_encrypted_cb(void *data,
                                               struct t_hashtable *hashtable,
                                               const void *key,
                                               const void *value) {
  struct t_config_file *config_file;
  (void)hashtable;
  config_file = (struct t_config_file *)data;
  config_file_write_line(config_file, key, "\"%s\"", value);
}


x86 assembly (clang, -O0):
<secure_config_data_write_map_encrypted_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    0xebd(%rip),%rdx
call   1030 <config_file_write_line@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<secure_config_data_write_map_encrypted_cb>:
lea    0xee9(%rip),%rax
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <config_file_write_line@plt>

LLVM IR (-O0):
%struct.t_hashtable = type { i32 }
%struct.t_config_file = type { i32 }
@.str = [5 x i8] c"\22%s\22\00"
define void @secure_config_data_write_map_encrypted_cb(i8* %0, %struct.t_hashtable* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca %struct.t_hashtable*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca %struct.t_config_file*
store i8* %0, i8** %5
store %struct.t_hashtable* %1, %struct.t_hashtable** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = load %struct.t_hashtable*, %struct.t_hashtable** %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to %struct.t_config_file*
store %struct.t_config_file* %12, %struct.t_config_file** %9
%13 = load %struct.t_config_file*, %struct.t_config_file** %9
%14 = load i8*, i8** %7
%15 = load i8*, i8** %8
%16 = call i32 @config_file_write_line(%struct.t_config_file* %13, i8* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %15)
ret void
}

LLVM IR (-O2):
%struct.t_hashtable = type { i32 }
%struct.t_config_file = type { i32 }
@.str = [5 x i8] c"\22%s\22\00"
define void @secure_config_data_write_map_encrypted_cb(i8* %0, %struct.t_hashtable* nocapture readnone %1, i8* %2, i8* %3) {
%5 = bitcast i8* %0 to %struct.t_config_file*
%6 = tail call i32 @config_file_write_line(%struct.t_config_file* %5, i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int matchBody(char *, char *, int /*<<< orphan*/);
int match(char *sorig, char *p) { return matchBody(sorig, p, 0); }


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

x86 assembly (clang, -O2):
<match>:
xor    %edx,%edx
jmp    1030 <matchBody@plt>

LLVM IR (-O0):
define i32 @match(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 = call i32 @matchBody(i8* %5, i8* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @match(i8* %0, i8* %1) {
%3 = tail call i32 @matchBody(i8* %0, i8* %1, i32 0)
ret i32 %3
}
int gids_cmp(int *gids_a, int *gids_b, int lvl, int max_lvl) {
  int i;
  for (i = lvl; i < max_lvl; i++)
    if (gids_a[i] != gids_b[i])
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<gids_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    115f <gids_cmp+0x5f>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
movslq -0x24(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     114c <gids_cmp+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1166 <gids_cmp+0x66>
jmp    1151 <gids_cmp+0x51>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1118 <gids_cmp+0x18>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gids_cmp>:
xor    %eax,%eax
cmp    %ecx,%edx
jge    1138 <gids_cmp+0x38>
movslq %edx,%r8
lea    (%rdi,%r8,4),%rax
lea    (%rsi,%r8,4),%rsi
sub    %edx,%ecx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rax,%rdx,4),%edi
cmp    (%rsi,%rdx,4),%edi
jne    1133 <gids_cmp+0x33>
add    $0x1,%rdx
cmp    %edx,%ecx
jne    1120 <gids_cmp+0x20>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @gids_cmp(i32* nocapture %0, i32* nocapture %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %2, %3
br i1 %5, label %6, label %19
6: ; preds = %4
%7 = sext i32 %2 to i64
br label %11
8: ; preds = %11
%9 = trunc i64 %18 to i32
%10 = icmp eq i32 %9, %3
br i1 %10, label %19, label %11
11: ; preds = %6, %8
%12 = phi i64 [ %7, %6 ], [ %18, %8 ]
%13 = getelementptr inbounds i32, i32* %0, i64 %12
%14 = load i32, i32* %13
%15 = getelementptr inbounds i32, i32* %1, i64 %12
%16 = load i32, i32* %15
%17 = icmp eq i32 %14, %16
%18 = add nsw i64 %12, 1
br i1 %17, label %8, label %19
19: ; preds = %11, %8, %4
%20 = phi i32 [ 0, %4 ], [ 0, %8 ], [ 1, %11 ]
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void set_pmu_sleep_clk_default() {
  mbus_remote_register_write(0x6, 0x19,
                             ((0 << 13) | (1 << 9) | (1 << 5) | (1)));
  delay(100);
  mbus_remote_register_write(0x6, 0x19,
                             ((0 << 13) | (1 << 9) | (1 << 5) | (1)));
  delay(100);
  mbus_remote_register_write(0x6, 0x15,
                             ((0 << 19) | (0 << 18) | (0 << 17) | (3 << 14) |
                              (0 << 13) | (1 << 9) | (1 << 5) | (6)));
  delay(100 * 10);
}


x86 assembly (clang, -O0):
<set_pmu_sleep_clk_default>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0x19,%esi
mov    $0x221,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x19,%esi
mov    $0x221,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x15,%esi
mov    $0xc226,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x3e8,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pmu_sleep_clk_default>:
push   %rax
mov    $0x6,%edi
mov    $0x19,%esi
mov    $0x221,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x19,%esi
mov    $0x221,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x15,%esi
mov    $0xc226,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x3e8,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @set_pmu_sleep_clk_default() {
%1 = call i32 @mbus_remote_register_write(i32 6, i32 25, i32 545)
%2 = call i32 @delay(i32 100)
%3 = call i32 @mbus_remote_register_write(i32 6, i32 25, i32 545)
%4 = call i32 @delay(i32 100)
%5 = call i32 @mbus_remote_register_write(i32 6, i32 21, i32 49702)
%6 = call i32 @delay(i32 1000)
ret void
}

LLVM IR (-O2):
define void @set_pmu_sleep_clk_default() {
%1 = tail call i32 @mbus_remote_register_write(i32 6, i32 25, i32 545)
%2 = tail call i32 @delay(i32 100)
%3 = tail call i32 @mbus_remote_register_write(i32 6, i32 25, i32 545)
%4 = tail call i32 @delay(i32 100)
%5 = tail call i32 @mbus_remote_register_write(i32 6, i32 21, i32 49702)
%6 = tail call i32 @delay(i32 1000)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ WEOF;
wint_t ungetwc(wint_t wc, FILE *stream) {
  ;
  return WEOF;
}


x86 assembly (clang, -O0):
<ungetwc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ece(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ungetwc>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@WEOF = global i32 0
define i32 @ungetwc(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* @WEOF
ret i32 %5
}

LLVM IR (-O2):
@WEOF = global i32 0
define i32 @ungetwc(i32 %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @WEOF
ret i32 %3
}
int number_of_wheels() { return 4; }


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

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

LLVM IR (-O0):
define i32 @number_of_wheels() {
ret i32 4
}

LLVM IR (-O2):
define i32 @number_of_wheels() {
ret i32 4
}
unsigned int get_vbar(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @get_vbar() {
ret i32 0
}

LLVM IR (-O2):
define i32 @get_vbar() {
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int ilog2_32(int);
int ilog2(uint64_t v) { return v >> 32 ? 32 + ilog2_32(v >> 32) : ilog2_32(v); }


x86 assembly (clang, -O0):
<ilog2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
cmp    $0x0,%eax
je     1148 <ilog2+0x38>
mov    -0x4(%rbp),%edi
mov    $0x20,%ecx
sar    %cl,%edi
call   1030 <ilog2_32@plt>
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1153 <ilog2+0x43>
mov    -0x4(%rbp),%edi
call   1030 <ilog2_32@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilog2>:
jmp    1030 <ilog2_32@plt>

LLVM IR (-O0):
define i32 @ilog2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 32
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = ashr i32 %7, 32
%9 = call i32 @ilog2_32(i32 %8)
%10 = add nsw i32 32, %9
br label %14
11: ; preds = %1
%12 = load i32, i32* %2
%13 = call i32 @ilog2_32(i32 %12)
br label %14
14: ; preds = %11, %6
%15 = phi i32 [ %10, %6 ], [ %13, %11 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @ilog2(i32 %0) {
%2 = tail call i32 @ilog2_32(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void I2CMasterTimeoutSet(uint32_t ui32Base, uint32_t ui32Value) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000024))) = ui32Value;
}


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

x86 assembly (clang, -O2):
<I2CMasterTimeoutSet>:
mov    %rsi,0x24(%rdi)
ret

LLVM IR (-O0):
define void @I2CMasterTimeoutSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 36
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @I2CMasterTimeoutSet(i64 %0, i64 %1) {
%3 = add i64 %0, 36
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
void statistics(void) {}


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

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

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

LLVM IR (-O2):
define void @statistics() {
ret void
}
void RTPathStartsWithRoot(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPathStartsWithRoot() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char const *, char const);
int InSet(const char *string, int i, const char *separators) {
  return strchr(separators, string[i - 1]) != NULL;
}


x86 assembly (clang, -O0):
<InSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InSet>:
push   %rax
movslq %esi,%rax
movsbl -0x1(%rax,%rdi,1),%esi
mov    %rdx,%rdi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @InSet(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = sub nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
%13 = load i8, i8* %12
%14 = call i32* @strchr(i8* %7, i8 signext %13)
%15 = icmp ne i32* %14, null
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @InSet(i8* nocapture %0, i32 %1, i8* %2) {
%4 = add nsw i32 %1, -1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i32* @strchr(i8* %2, i8 signext %7)
%9 = icmp ne i32* %8, null
%10 = zext i1 %9 to i32
ret i32 %10
}
void remove_ima_buffer(void *fdt, int chosen_node) {}


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

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

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

LLVM IR (-O2):
define void @remove_ima_buffer(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int backtrace(void **, int const);
void *get_eip() {
  const int SIZE = 5;
  void *tracePtrs[SIZE];
  int ret = backtrace(tracePtrs, SIZE);
  assert(ret >= 0);
  return tracePtrs[2];
}


x86 assembly (clang, -O0):
<get_eip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x5,-0x4(%rbp)
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x5,%esi
call   1030 <backtrace@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x30(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_eip>:
sub    $0x28,%rsp
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <backtrace@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
call   1040 <assert@plt>
mov    0x10(%rsp),%rax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i8* @get_eip() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
store i32 5, i32* %1
%4 = call i8* @llvm.stacksave()
store i8* %4, i8** %2
%5 = alloca i8*, i64 5
%6 = call i32 @backtrace(i8** %5, i32 5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = getelementptr inbounds i8*, i8** %5, i64 2
%12 = load i8*, i8** %11
%13 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @get_eip() {
%1 = alloca [5 x i8*]
%2 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 0
%3 = call i32 @backtrace(i8** %2, i32 5)
%4 = xor i32 %3, -1
%5 = lshr i32 %4, 31
%6 = call i32 @assert(i32 %5)
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 2
%8 = load i8*, i8** %7
ret i8* %8
}
int is_index_lower(double *p, double *q) { return (*p < *q); }


x86 assembly (clang, -O0):
<is_index_lower>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_index_lower>:
movsd  (%rsi),%xmm0
xor    %eax,%eax
ucomisd (%rdi),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @is_index_lower(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = fcmp olt double %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_index_lower(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fcmp olt double %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int tv_diff(struct timeval *t1, struct timeval *t2) {
  return (t1->tv_sec - t2->tv_sec) * 1000 + (t1->tv_usec - t2->tv_usec) / 1000;
}


x86 assembly (clang, -O0):
<tv_diff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
imul   $0x3e8,%eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0x10(%rbp),%rcx
sub    0x4(%rcx),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tv_diff>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
sub    (%rsi),%eax
imul   $0x3e8,%eax,%edx
sub    0x4(%rsi),%ecx
movslq %ecx,%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @tv_diff(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.timeval*, %struct.timeval** %3
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load %struct.timeval*, %struct.timeval** %4
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
%12 = mul nsw i32 %11, 1000
%13 = load %struct.timeval*, %struct.timeval** %3
%14 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 1
%15 = load i32, i32* %14
%16 = load %struct.timeval*, %struct.timeval** %4
%17 = getelementptr inbounds %struct.timeval, %struct.timeval* %16, i32 0, i32 1
%18 = load i32, i32* %17
%19 = sub nsw i32 %15, %18
%20 = sdiv i32 %19, 1000
%21 = add nsw i32 %12, %20
ret i32 %21
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @tv_diff(%struct.timeval* nocapture %0, %struct.timeval* nocapture %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
%8 = mul nsw i32 %7, 1000
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%10 = load i32, i32* %9
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%12 = load i32, i32* %11
%13 = sub nsw i32 %10, %12
%14 = sdiv i32 %13, 1000
%15 = add nsw i32 %14, %8
ret i32 %15
}
int my_comp(const void *a, const void *b) { return (*(int *)a - *(int *)b); }


x86 assembly (clang, -O0):
<my_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_comp>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @my_comp(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @my_comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}