xunge/DecIR huggingface dataset:
/* Variables and functions */
int const vavailability_i(int);
__attribute__((visibility("default"))) const int xgetInt(int name) {
  if (1 <= name && name <= 10)
    return vavailability_i(name);
  return 0;
}


x86 assembly (clang, -O0):
<xgetInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x1,%eax
cmp    -0x8(%rbp),%eax
jg     1143 <xgetInt+0x33>
cmpl   $0xa,-0x8(%rbp)
jg     1143 <xgetInt+0x33>
mov    -0x8(%rbp),%edi
call   1030 <vavailability_i@plt>
mov    %eax,-0x4(%rbp)
jmp    114a <xgetInt+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xgetInt>:
lea    -0x1(%rdi),%eax
cmp    $0x9,%eax
ja     111d <xgetInt+0xd>
jmp    1030 <vavailability_i@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @xgetInt(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 10
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @vavailability_i(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void gdp_files_close(FILE *FilePointer) {
  if (FilePointer != NULL)
    fclose(FilePointer);
}


x86 assembly (clang, -O0):
<gdp_files_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <gdp_files_close+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdp_files_close>:
test   %rdi,%rdi
je     111a <gdp_files_close+0xa>
jmp    1030 <fclose@plt>
ret

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

LLVM IR (-O2):
define void @gdp_files_close(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @fclose(i32* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *concat(char *a, char *b) {
  char *res = (char *)malloc(sizeof(char) * (strlen(a) + strlen(b) + 1));
  strcpy(res, a);
  strcat(res, b);
  return res;
}


x86 assembly (clang, -O0):
<concat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<concat>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
call   1040 <strlen@plt>
mov    %eax,%r15d
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%r15,%rax,1),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @concat(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 = call i32 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = add nsw i32 %7, %9
%11 = add nsw i32 %10, 1
%12 = sext i32 %11 to i64
%13 = mul i64 1, %12
%14 = trunc i64 %13 to i32
%15 = call i64 @malloc(i32 %14)
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %5
%17 = load i8*, i8** %5
%18 = load i8*, i8** %3
%19 = call i32 @strcpy(i8* %17, i8* %18)
%20 = load i8*, i8** %5
%21 = load i8*, i8** %4
%22 = call i32 @strcat(i8* %20, i8* %21)
%23 = load i8*, i8** %5
ret i8* %23
}

LLVM IR (-O2):
define i8* @concat(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = add i32 %3, 1
%6 = add i32 %5, %4
%7 = tail call i64 @malloc(i32 %6)
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32 @strcpy(i8* %8, i8* %0)
%10 = tail call i32 @strcat(i8* %8, i8* %1)
ret i8* %8
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t ToDate(unsigned char month, unsigned char day, uint16_t year) {
  uint16_t date = 0;
  year %= 100;
  month &= 0x0F;
  day &= 0x1F;
  date ^= month;
  date <<= 5;
  date ^= day;
  date <<= 7;
  date ^= year;
  return date;
}


x86 assembly (clang, -O0):
<ToDate>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %edx,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
mov    %al,-0x1(%rbp)
movzbl -0x2(%rbp),%eax
and    $0x1f,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x7,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToDate>:
movslq %edx,%rcx
imul   $0x51eb851f,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rax
add    %edx,%eax
imul   $0x64,%eax,%eax
sub    %eax,%ecx
and    $0xf,%edi
and    $0x1f,%esi
shl    $0xc,%edi
shl    $0x7,%esi
lea    (%rsi,%rdi,1),%eax
xor    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ToDate(i8 zeroext %0, i8 zeroext %1, i32 %2) {
%4 = srem i32 %2, 100
%5 = and i8 %0, 15
%6 = and i8 %1, 31
%7 = zext i8 %5 to i32
%8 = zext i8 %6 to i32
%9 = shl nuw nsw i32 %7, 12
%10 = shl nuw nsw i32 %8, 7
%11 = or i32 %10, %9
%12 = xor i32 %11, %4
ret i32 %12
}
void addition_float(struct addition_options_float *options, float *in0,
                    float *in1, float *out0) {
  *out0 = *in0 + *in1;
}


x86 assembly (clang, -O0):
<addition_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
addss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<addition_float>:
movss  (%rsi),%xmm0
addss  (%rdx),%xmm0
movss  %xmm0,(%rcx)
ret

LLVM IR (-O0):
%struct.addition_options_float = type opaque
define void @addition_float(%struct.addition_options_float* %0, float* %1, float* %2, float* %3) {
%5 = alloca %struct.addition_options_float*
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
store %struct.addition_options_float* %0, %struct.addition_options_float** %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
%9 = load float*, float** %6
%10 = load float, float* %9
%11 = load float*, float** %7
%12 = load float, float* %11
%13 = fadd float %10, %12
%14 = load float*, float** %8
store float %13, float* %14
ret void
}

LLVM IR (-O2):
%struct.addition_options_float = type opaque
define void @addition_float(%struct.addition_options_float* nocapture readnone %0, float* nocapture %1, float* nocapture %2, float* nocapture writeonly %3) {
%5 = load float, float* %1
%6 = load float, float* %2
%7 = fadd float %5, %6
store float %7, float* %3
ret void
}
void power_off(void) {}


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

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

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

LLVM IR (-O2):
define void @power_off() {
ret void
}
void gentest_out() {}


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

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

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

LLVM IR (-O2):
define void @gentest_out() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void f3(int size) {
  char src[12] = "helloworld";
  char dest[12];
  if (size < 0)
    strncpy(dest, src, size);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1149 <f3+0x39>
lea    -0x1c(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
sub    $0x18,%rsp
movabs $0x726f776f6c6c6568,%rax
77 6f 72
mov    %rax,(%rsp)
movl   $0x646c,0x8(%rsp)
test   %edi,%edi
js     1133 <f3+0x23>
add    $0x18,%rsp
ret
mov    %edi,%edx
lea    0xc(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <strncpy@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.f3.src = [12 x i8] c"helloworld\00\00"
define void @f3(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i8]
%4 = alloca [12 x i8]
store i32 %0, i32* %2
%5 = bitcast [12 x i8]* %3 to i8*
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%11 = load i32, i32* %2
%12 = call i32 @strncpy(i8* %9, i8* %10, i32 %11)
br label %13
13: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@__const.f3.src = [12 x i8] c"helloworld\00\00"
define void @f3(i32 %0) {
%2 = alloca [12 x i8]
%3 = alloca [12 x i8]
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%6 = icmp slt i32 %0, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @strncpy(i8* %5, i8* %4, i32 %0)
br label %9
9: ; preds = %7, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ReadArgs(int, char **);
int /*<<< orphan*/ extractData();
int main(int argc, char *argv[]) {
  ReadArgs(argc, argv);
  extractData();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @ReadArgs(i32 %6, i8** %7)
%9 = call i32 (...) @extractData()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @ReadArgs(i32 %0, i8** %1)
%4 = tail call i32 (...) @extractData()
ret i32 0
}
void testing(double *ptr) {
  *ptr += 0.5;
  *ptr *= 0.5;
}


x86 assembly (clang, -O0):
<testing>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xeec(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0xed8(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<testing>:
movsd  0xef8(%rip),%xmm0
movsd  (%rdi),%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
ret

LLVM IR (-O0):
define void @testing(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double, double* %3
%5 = fadd double %4, 5.000000e-01
store double %5, double* %3
%6 = load double*, double** %2
%7 = load double, double* %6
%8 = fmul double %7, 5.000000e-01
store double %8, double* %6
ret void
}

LLVM IR (-O2):
define void @testing(double* nocapture %0) {
%2 = load double, double* %0
%3 = fadd double %2, 5.000000e-01
%4 = fmul double %3, 5.000000e-01
store double %4, double* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setDebuggingLevel(int);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ testIsInSet();
int /*<<< orphan*/ testNewSet();
int /*<<< orphan*/ testSetAdd();
int /*<<< orphan*/ testSetIntersect();
int /*<<< orphan*/ testSetMapping();
int /*<<< orphan*/ testSetRemove();
int /*<<< orphan*/ testSetUnion();
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  setDebuggingLevel(2);
  srand(time(NULL));
  testNewSet();
  testSetAdd();
  testSetRemove();
  testIsInSet();
  testSetMapping();
  testSetUnion();
  testSetIntersect();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2,%edi
call   1070 <setDebuggingLevel@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    $0x0,%al
call   10c0 <testNewSet@plt>
mov    $0x0,%al
call   1080 <testSetAdd@plt>
mov    $0x0,%al
call   1030 <testSetRemove@plt>
mov    $0x0,%al
call   1050 <testIsInSet@plt>
mov    $0x0,%al
call   1040 <testSetMapping@plt>
mov    $0x0,%al
call   10b0 <testSetUnion@plt>
mov    $0x0,%al
call   10a0 <testSetIntersect@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1070 <setDebuggingLevel@plt>
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
xor    %eax,%eax
call   10c0 <testNewSet@plt>
xor    %eax,%eax
call   1080 <testSetAdd@plt>
xor    %eax,%eax
call   1030 <testSetRemove@plt>
xor    %eax,%eax
call   1050 <testIsInSet@plt>
xor    %eax,%eax
call   1040 <testSetMapping@plt>
xor    %eax,%eax
call   10b0 <testSetUnion@plt>
xor    %eax,%eax
call   10a0 <testSetIntersect@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @setDebuggingLevel(i32 2)
%6 = call i32 @time(i32* null)
%7 = call i32 @srand(i32 %6)
%8 = call i32 (...) @testNewSet()
%9 = call i32 (...) @testSetAdd()
%10 = call i32 (...) @testSetRemove()
%11 = call i32 (...) @testIsInSet()
%12 = call i32 (...) @testSetMapping()
%13 = call i32 (...) @testSetUnion()
%14 = call i32 (...) @testSetIntersect()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @setDebuggingLevel(i32 2)
%4 = tail call i32 @time(i32* null)
%5 = tail call i32 @srand(i32 %4)
%6 = tail call i32 (...) @testNewSet()
%7 = tail call i32 (...) @testSetAdd()
%8 = tail call i32 (...) @testSetRemove()
%9 = tail call i32 (...) @testIsInSet()
%10 = tail call i32 (...) @testSetMapping()
%11 = tail call i32 (...) @testSetUnion()
%12 = tail call i32 (...) @testSetIntersect()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clear_hefesto_file_ptr_pool();
int /*<<< orphan*/ deinit_rqueue_mutex();
int /*<<< orphan*/ hvm_mod_ldmod_table_cleanup();
int /*<<< orphan*/ unset_modules_home();
void hefesto_deinit() {
  clear_hefesto_file_ptr_pool();
  hvm_mod_ldmod_table_cleanup();
  unset_modules_home();
  deinit_rqueue_mutex();
}


x86 assembly (clang, -O0):
<hefesto_deinit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <clear_hefesto_file_ptr_pool@plt>
mov    $0x0,%al
call   1030 <hvm_mod_ldmod_table_cleanup@plt>
mov    $0x0,%al
call   1050 <unset_modules_home@plt>
mov    $0x0,%al
call   1040 <deinit_rqueue_mutex@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hefesto_deinit>:
push   %rax
xor    %eax,%eax
call   1060 <clear_hefesto_file_ptr_pool@plt>
xor    %eax,%eax
call   1030 <hvm_mod_ldmod_table_cleanup@plt>
xor    %eax,%eax
call   1050 <unset_modules_home@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <deinit_rqueue_mutex@plt>

LLVM IR (-O0):
define void @hefesto_deinit() {
%1 = call i32 (...) @clear_hefesto_file_ptr_pool()
%2 = call i32 (...) @hvm_mod_ldmod_table_cleanup()
%3 = call i32 (...) @unset_modules_home()
%4 = call i32 (...) @deinit_rqueue_mutex()
ret void
}

LLVM IR (-O2):
define void @hefesto_deinit() {
%1 = tail call i32 (...) @clear_hefesto_file_ptr_pool()
%2 = tail call i32 (...) @hvm_mod_ldmod_table_cleanup()
%3 = tail call i32 (...) @unset_modules_home()
%4 = tail call i32 (...) @deinit_rqueue_mutex()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Keypad_setAlarmSound(int);
int atoi(char *);
void setAlarm(char *sound) {
  int alarm = atoi(sound);
  Keypad_setAlarmSound(alarm);
}


x86 assembly (clang, -O0):
<setAlarm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <Keypad_setAlarmSound@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setAlarm>:
push   %rax
call   1040 <atoi@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <Keypad_setAlarmSound@plt>

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

LLVM IR (-O2):
define void @setAlarm(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
%3 = tail call i32 @Keypad_setAlarmSound(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cvar_ForceSet(char *, char *);
int /*<<< orphan*/ StartGame();
void EasyGameFunc(void *data) {
  Cvar_ForceSet("skill", "0");
  StartGame();
}


x86 assembly (clang, -O0):
<EasyGameFunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
lea    0xecc(%rip),%rsi
call   1040 <Cvar_ForceSet@plt>
mov    $0x0,%al
call   1030 <StartGame@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EasyGameFunc>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1040 <Cvar_ForceSet@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <StartGame@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"skill\00"
@.str.1 = [2 x i8] c"0\00"
define void @EasyGameFunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @Cvar_ForceSet(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @StartGame()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"skill\00"
@.str.1 = [2 x i8] c"0\00"
define void @EasyGameFunc(i8* nocapture readnone %0) {
%2 = tail call i32 @Cvar_ForceSet(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @StartGame()
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void myhtobe32(void *be, uint32_t h) {
  uint8_t *p = (uint8_t *)be;
  p[0] = h >> 24;
  p[1] = (h >> 16) & 0xff;
  p[2] = (h >> 8) & 0xff;
  p[3] = h & 0xff;
}


x86 assembly (clang, -O0):
<myhtobe32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<myhtobe32>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
sar    $0x18,%eax
mov    %eax,(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x4(%rdi)
mov    %edx,0x8(%rdi)
mov    %esi,0xc(%rdi)
ret

LLVM IR (-O0):
define void @myhtobe32(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32, i32* %4
%9 = ashr i32 %8, 24
%10 = load i32*, i32** %5
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
%12 = load i32, i32* %4
%13 = ashr i32 %12, 16
%14 = and i32 %13, 255
%15 = load i32*, i32** %5
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %14, i32* %16
%17 = load i32, i32* %4
%18 = ashr i32 %17, 8
%19 = and i32 %18, 255
%20 = load i32*, i32** %5
%21 = getelementptr inbounds i32, i32* %20, i64 2
store i32 %19, i32* %21
%22 = load i32, i32* %4
%23 = and i32 %22, 255
%24 = load i32*, i32** %5
%25 = getelementptr inbounds i32, i32* %24, i64 3
store i32 %23, i32* %25
ret void
}

LLVM IR (-O2):
define void @myhtobe32(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = ashr i32 %1, 24
store i32 %4, i32* %3
%5 = lshr i32 %1, 16
%6 = and i32 %5, 255
%7 = getelementptr inbounds i8, i8* %0, i64 4
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
%9 = lshr i32 %1, 8
%10 = and i32 %9, 255
%11 = getelementptr inbounds i8, i8* %0, i64 8
%12 = bitcast i8* %11 to i32*
store i32 %10, i32* %12
%13 = and i32 %1, 255
%14 = getelementptr inbounds i8, i8* %0, i64 12
%15 = bitcast i8* %14 to i32*
store i32 %13, i32* %15
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int64_t int64min(int64_t a, int64_t b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<int64min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <int64min+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <int64min+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int64min>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @int64min(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
__attribute__((always_)) void free_secdata(void *secdata) {}


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

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

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

LLVM IR (-O2):
define void @free_secdata(i8* nocapture %0) {
ret void
}
char *Instance_metaClassName(void *const this) { return "Instance"; }


x86 assembly (clang, -O0):
<Instance_metaClassName>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Instance_metaClassName>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Instance\00"
define i8* @Instance_metaClassName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"Instance\00"
define i8* @Instance_metaClassName(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *table(int);
int main(int argc, char *argv[]) { printf("%s\n", table(1)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
call   1040 <table@plt>
mov    %rax,%rsi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @table(i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
int tan(double);
double my_cot(double x) { return 1 / tan(x); }


x86 assembly (clang, -O0):
<my_cot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <tan@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_cot>:
push   %rax
call   1030 <tan@plt>
lea    0x1(%rax),%ecx
xor    %edx,%edx
cmp    $0x3,%ecx
cmovb  %eax,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @my_cot(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @tan(double %3)
%5 = sdiv i32 1, %4
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @my_cot(double %0) {
%2 = tail call i32 @tan(double %0)
%3 = add i32 %2, 1
%4 = icmp ult i32 %3, 3
%5 = select i1 %4, i32 %2, i32 0
%6 = sitofp i32 %5 to double
ret double %6
}
extern int GetScreenSize() {
  int retval;
  asm("int $0x40" : "=a"(retval) : "a"(61), "b"(1));
  return retval;
}


x86 assembly (clang, -O0):
<GetScreenSize>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    $0x3d,%eax
mov    $0x1,%ebx
int    $0x40
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetScreenSize>:
push   %rbx
mov    $0x3d,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
ret

LLVM IR (-O0):
define i32 @GetScreenSize() {
%1 = alloca i32
%2 = call i32 asm "int $$0x40", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 61, i32 1)
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @GetScreenSize() {
%1 = tail call i32 asm "int $$0x40", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 61, i32 1)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ libsais_unbwt_aux_ctx(void const *,
                                         int /*<<< orphan*/ const *,
                                         int /*<<< orphan*/ *,
                                         int /*<<< orphan*/ *,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/ *);
int32_t libsais_unbwt_ctx(const void *ctx, const uint8_t *T, uint8_t *U,
                          int32_t *A, int32_t n, int32_t i) {
  return libsais_unbwt_aux_ctx(ctx, T, U, A, n, n, &i);
}


x86 assembly (clang, -O0):
<libsais_unbwt_ctx>:
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    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x24(%rbp),%r9d
lea    -0x28(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <libsais_unbwt_aux_ctx@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libsais_unbwt_ctx>:
sub    $0x18,%rsp
mov    %r9d,0x14(%rsp)
lea    0x14(%rsp),%rax
mov    %rax,(%rsp)
mov    %r8d,%r9d
call   1030 <libsais_unbwt_aux_ctx@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @libsais_unbwt_ctx(i8* %0, i32* %1, i32* %2, i32* %3, i32 %4, i32 %5) {
%7 = alloca i32
store i32 %5, i32* %7
%8 = call i32 @libsais_unbwt_aux_ctx(i8* %0, i32* %1, i32* %2, i32* %3, i32 %4, i32 %4, i32* %7)
ret i32 %8
}
/* Variables and functions */
char *_cgets(char *);
char *cgets(char *str) { return _cgets(str); }


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

x86 assembly (clang, -O2):
<cgets>:
jmp    1030 <_cgets@plt>

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

LLVM IR (-O2):
define i8* @cgets(i8* %0) {
%2 = tail call i8* @_cgets(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int intf_numa_node(char const *);
int numa_node_to_cpusmask(int, scalar_t__ *, int *);
int intf_name_best_cpus(const char *if_name, uint64_t *cpusmask, int *nr) {
  int numa_node, retval;
  *cpusmask = 0;
  numa_node = intf_numa_node(if_name);
  if (numa_node < 0)
    return -1;
  retval = numa_node_to_cpusmask(numa_node, cpusmask, nr);
  return retval;
}


x86 assembly (clang, -O0):
<intf_name_best_cpus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <intf_numa_node@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    1161 <intf_name_best_cpus+0x41>
movl   $0xffffffff,-0x4(%rbp)
jmp    117a <intf_name_best_cpus+0x5a>
mov    -0x24(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <numa_node_to_cpusmask@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intf_name_best_cpus>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
movq   $0x0,(%rsi)
call   1030 <intf_numa_node@plt>
test   %eax,%eax
js     114e <intf_name_best_cpus+0x2e>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <numa_node_to_cpusmask@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @intf_name_best_cpus(i8* %0, i64* %1, i32* %2) {
store i64 0, i64* %1
%4 = tail call i32 @intf_numa_node(i8* %0)
%5 = icmp slt i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @numa_node_to_cpusmask(i32 %4, i64* %1, i32* %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -1, %3 ]
ret i32 %9
}
/* Variables and functions */
size_t trio_length_max(const char *string, size_t max) {
  size_t i;
  for (i = 0; i < max; ++i) {
    if (string[i] == 0)
      break;
  }
  return i;
}


x86 assembly (clang, -O0):
<trio_length_max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1152 <trio_length_max+0x52>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    113c <trio_length_max+0x3c>
jmp    1152 <trio_length_max+0x52>
jmp    1141 <trio_length_max+0x41>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <trio_length_max+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trio_length_max>:
xor    %eax,%eax
test   %rsi,%rsi
je     1122 <trio_length_max+0x22>
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,(%rdi,%rax,1)
je     1122 <trio_length_max+0x22>
add    $0x1,%rax
cmp    %rax,%rsi
jne    1110 <trio_length_max+0x10>
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @trio_length_max(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %9
%5 = phi i64 [ %10, %9 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = add nuw i64 %5, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %4
12: ; preds = %9, %4, %2
%13 = phi i64 [ 0, %2 ], [ %5, %4 ], [ %1, %9 ]
ret i64 %13
}
int get_line_len(const char *src) {
  int linelen = 0;
  while ((*src != '\0') && (*src != '\n')) {
    src++;
    linelen++;
  }
  if (*src == '\n')
    linelen++;
  return (linelen);
}


x86 assembly (clang, -O0):
<get_line_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1134 <get_line_len+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1144 <get_line_len+0x44>
jmp    115e <get_line_len+0x5e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <get_line_len+0xf>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1177 <get_line_len+0x77>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_line_len>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rcx,1),%edx
test   %dl,%dl
je     1123 <get_line_len+0x23>
cmp    $0xa,%dl
je     1123 <get_line_len+0x23>
add    $0x1,%rcx
jmp    1110 <get_line_len+0x10>
xor    %eax,%eax
cmp    $0xa,%dl
sete   %al
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @get_line_len(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = phi i32 [ 0, %1 ], [ %8, %6 ]
%5 = load i8, i8* %3
switch i8 %5, label %6 [
i8 0, label %9
i8 10, label %9
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = add nuw nsw i32 %4, 1
br label %2
9: ; preds = %2, %2
%10 = icmp eq i8 %5, 10
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %4, %11
ret i32 %12
}
unsigned xrop3_167_1_1(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 = S | T;
  stk2 = D & stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_167_1_1>:
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    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%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
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_167_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %edi,%esi
mov    %eax,%edx
xor    %esi,%edx
or     %ecx,%eax
or     %edx,%eax
not    %eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_167_1_1(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* %6
%24 = load i32, i32* %7
%25 = or i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %5
%27 = load i32, i32* %10
%28 = and i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %7
%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
%35 = load i32, i32* %6
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %7
%39 = xor i32 %38, -1
%40 = and i32 %37, %39
%41 = load i32, i32* %5
%42 = load i32, i32* %6
%43 = and i32 %41, %42
%44 = or i32 %40, %43
%45 = load i32, i32* %5
%46 = load i32, i32* %7
%47 = and i32 %45, %46
%48 = or i32 %44, %47
ret i32 %48
}

LLVM IR (-O2):
define i32 @xrop3_167_1_1(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 = or i8 %1, %0
%8 = zext i8 %7 to i32
%9 = xor i32 %6, %8
%10 = or i32 %6, %4
%11 = or i32 %10, %9
%12 = xor i32 %11, -1
%13 = or i32 %8, %12
ret i32 %13
}
void av_frame_set_best_effort_timestamp() {}


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

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

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

LLVM IR (-O2):
define void @av_frame_set_best_effort_timestamp() {
ret void
}
/* Variables and functions */
char getchar();
char readchar() { return getchar() != '\n' ? readchar() : getchar(); }


x86 assembly (clang, -O0):
<readchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     114b <readchar+0x2b>
call   1030 <readchar@plt>
movsbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <readchar+0x38>
mov    $0x0,%al
call   1040 <getchar@plt>
movsbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readchar>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <readchar+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1030 <getchar@plt>

LLVM IR (-O0):
define signext i8 @readchar() {
%1 = call signext i8 (...) @getchar()
%2 = sext i8 %1 to i32
%3 = icmp ne i32 %2, 10
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call signext i8 @readchar()
%6 = sext i8 %5 to i32
br label %10
7: ; preds = %0
%8 = call signext i8 (...) @getchar()
%9 = sext i8 %8 to i32
br label %10
10: ; preds = %7, %4
%11 = phi i32 [ %6, %4 ], [ %9, %7 ]
%12 = trunc i32 %11 to i8
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @readchar() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
%5 = tail call signext i8 (...) @getchar()
ret i8 %5
}
int test_imm_BBint8_reg(signed char val) {
  return ((val) & (-0xBB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BBint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff45,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_BBint8_reg>:
test   $0xffffff45,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_BBint8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -187
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void vtime_account_system_irqsafe(struct task_struct *tsk) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @vtime_account_system_irqsafe(%struct.task_struct* nocapture %0) {
ret void
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
void cputime_(double *val) {
  struct timeval time;
  gettimeofday(&time, (struct timezone *)0);
  *val = time.tv_sec + time.tv_usec * 1.e-6;
}


x86 assembly (clang, -O0):
<cputime_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xec5(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cputime_>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xed0(%rip),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
%struct.timezone = type { i32 }
define void @cputime_(double* %0) {
%2 = alloca double*
%3 = alloca %struct.timeval
store double* %0, double** %2
%4 = call i32 @gettimeofday(%struct.timeval* %3, %struct.timezone* null)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%8 = load double, double* %7
%9 = call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %6)
%10 = load double*, double** %2
store double %9, double* %10
ret void
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
%struct.timezone = type { i32 }
define void @cputime_(double* nocapture writeonly %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = call i32 @gettimeofday(%struct.timeval* %2, %struct.timezone* null)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
%8 = load double, double* %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %6)
store double %9, double* %0
ret void
}
/* Variables and functions */
void *entry(void *arg) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @entry(i8* nocapture readnone %0) {
ret i8* null
}