xunge/DecIR huggingface dataset:
/* Variables and functions */
int pow(double, int);
double calcFA(double Altitude) {
  double fa = 0;
  fa = -4e-15 * pow(Altitude, 3) + 4e-10 * pow(Altitude, 2) - 3e-5 * Altitude +
       1;
  return (1 / fa);
}


x86 assembly (clang, -O0):
<calcFA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x18(%rbp),%xmm1
cvtsi2sd %eax,%xmm2
movsd  0xebb(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  0xea7(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xe8a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe72(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe61(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcFA>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x3,%edi
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xeb0(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0xeaa(%rip),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0xe9c(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xe98(%rip),%xmm0
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @calcFA(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %3
%4 = load double, double* %2
%5 = call i32 @pow(double %4, i32 3)
%6 = sitofp i32 %5 to double
%7 = load double, double* %2
%8 = call i32 @pow(double %7, i32 2)
%9 = sitofp i32 %8 to double
%10 = fmul double 4.000000e-10, %9
%11 = call double @llvm.fmuladd.f64(double -4.000000e-15, double %6, double %10)
%12 = load double, double* %2
%13 = call double @llvm.fmuladd.f64(double -3.000000e-05, double %12, double %11)
%14 = fadd double %13, 1.000000e+00
store double %14, double* %3
%15 = load double, double* %3
%16 = fdiv double 1.000000e+00, %15
ret double %16
}

LLVM IR (-O2):
define double @calcFA(double %0) {
%2 = tail call i32 @pow(double %0, i32 3)
%3 = sitofp i32 %2 to double
%4 = tail call i32 @pow(double %0, i32 2)
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 4.000000e-10
%7 = tail call double @llvm.fmuladd.f64(double %3, double -4.000000e-15, double %6)
%8 = tail call double @llvm.fmuladd.f64(double %0, double -3.000000e-05, double %7)
%9 = fadd double %8, 1.000000e+00
%10 = fdiv double 1.000000e+00, %9
ret double %10
}
/* Type definitions */
struct ProxySettings {
  int dummy;
};

/* Variables and functions */
struct ProxySettings *processArgs(int, char **);
int /*<<< orphan*/ proxyLogSetThreadName(char *);
int /*<<< orphan*/ runProxy(struct ProxySettings const *);
int main(int argc, char **argv) {
  const struct ProxySettings *proxySettings;
  proxyLogSetThreadName("main");
  proxySettings = processArgs(argc, argv);
  runProxy(proxySettings);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <proxyLogSetThreadName@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <processArgs@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <runProxy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec1(%rip),%rdi
call   1040 <proxyLogSetThreadName@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <processArgs@plt>
mov    %rax,%rdi
call   1030 <runProxy@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.ProxySettings = type { i32 }
@.str = [5 x i8] c"main\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.ProxySettings*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @proxyLogSetThreadName(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call %struct.ProxySettings* @processArgs(i32 %8, i8** %9)
store %struct.ProxySettings* %10, %struct.ProxySettings** %6
%11 = load %struct.ProxySettings*, %struct.ProxySettings** %6
%12 = call i32 @runProxy(%struct.ProxySettings* %11)
ret i32 0
}

LLVM IR (-O2):
%struct.ProxySettings = type { i32 }
@.str = [5 x i8] c"main\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @proxyLogSetThreadName(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = tail call %struct.ProxySettings* @processArgs(i32 %0, i8** %1)
%5 = tail call i32 @runProxy(%struct.ProxySettings* %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
scalar_t__ strlen(char *);
void fprintStr(FILE *fp, char *szStr) {
  int i;
  for (i = 0; i < (int)strlen(szStr); i++)
    fputc(szStr[i], fp);
}


x86 assembly (clang, -O0):
<fprintStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    1179 <fprintStr+0x59>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1040 <fputc@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <fprintStr+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprintStr>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    1160 <fprintStr+0x40>
xor    %ebx,%ebx
nopl   0x0(%rax)
movsbl (%r15,%rbx,1),%edi
mov    %r14,%rsi
call   1040 <fputc@plt>
add    $0x1,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <fprintStr+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @fprintStr(i32* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = trunc i64 %3 to i32
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %2, %6
%7 = phi i64 [ %11, %6 ], [ 0, %2 ]
%8 = getelementptr inbounds i8, i8* %1, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @fputc(i8 signext %9, i32* %0)
%11 = add nuw nsw i64 %7, 1
%12 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%13 = shl i64 %12, 32
%14 = ashr exact i64 %13, 32
%15 = icmp slt i64 %11, %14
br i1 %15, label %6, label %16
16: ; preds = %6, %2
ret void
}
int main() {
  int a = 3;
  int b = a > 3 ? 1 < 2 ? 4 : 5 : 3 < 4 ? 6 : 7;
  return b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    $0x6,%eax
mov    $0x4,%ecx
cmp    $0x3,%edx
cmovg  %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 3
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 4, i32 6
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 6
}
void f139(void) {
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
  a:
    goto a;
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f139>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
jmp    1120 <f139+0x20>

x86 assembly (clang, -O2):
<f139>:
jmp    1100 <f139>

LLVM IR (-O0):
define void @f139() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* %1
store i32 0, i32* %2
%7 = load i32, i32* %2
store i32 0, i32* %3
%8 = load i32, i32* %3
store i32 0, i32* %4
%9 = load i32, i32* %4
br label %10
10: ; preds = %10, %0
br label %10
}

LLVM IR (-O2):
define void @f139() {
br label %1
1: ; preds = %1, %0
br label %1
}
void func4() {
  static int multiple_static_locals = 0, msl2, msl3 = 10;
  msl2 = 500 / msl3;
}


x86 assembly (clang, -O0):
<func4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1f4,%eax
cltd
idivl  0x2f10(%rip)
mov    %eax,0x2f16(%rip)
pop    %rbp
ret

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

LLVM IR (-O0):
@func4.multiple_static_locals = internal global i32 0
@func4.msl2 = internal global i32 0
@func4.msl3 = internal global i32 10
define void @func4() {
%1 = load i32, i32* @func4.msl3
%2 = sdiv i32 500, %1
store i32 %2, i32* @func4.msl2
ret void
}

LLVM IR (-O2):
define void @func4() {
ret void
}
/* Variables and functions */
char *_get_cpuinfo_cpu_type_line(char *, int, char const *, int);
char *_get_cpuinfo_cpu_type(char *buf, int len, const char *prefix) {
  return _get_cpuinfo_cpu_type_line(buf, len, prefix, 1);
}


x86 assembly (clang, -O0):
<_get_cpuinfo_cpu_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <_get_cpuinfo_cpu_type_line@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_cpuinfo_cpu_type>:
mov    $0x1,%ecx
jmp    1030 <_get_cpuinfo_cpu_type_line@plt>

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

LLVM IR (-O2):
define i8* @_get_cpuinfo_cpu_type(i8* %0, i32 %1, i8* %2) {
%4 = tail call i8* @_get_cpuinfo_cpu_type_line(i8* %0, i32 %1, i8* %2, i32 1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void TS_Xran(void) {
  fputs("Out of range: invalid dynamic array position\n", stderr);
  abort();
}


x86 assembly (clang, -O0):
<TS_Xran>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<TS_Xran>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Out of range: invalid dynamic array position\0A\00"
@stderr = global i32 0
define void @TS_Xran() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [46 x i8] c"Out of range: invalid dynamic array position\0A\00"
@stderr = global i32 0
define void @TS_Xran() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int x(int, int);
int y(int);
int call_recursive(void) { return y(3) + x(5, 9); }


x86 assembly (clang, -O0):
<call_recursive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3,%edi
call   1040 <y@plt>
mov    %eax,-0x4(%rbp)
mov    $0x5,%edi
mov    $0x9,%esi
call   1030 <x@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_recursive>:
push   %rbx
mov    $0x3,%edi
call   1040 <y@plt>
mov    %eax,%ebx
mov    $0x5,%edi
mov    $0x9,%esi
call   1030 <x@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @call_recursive() {
%1 = call i32 @y(i32 3)
%2 = call i32 @x(i32 5, i32 9)
%3 = add nsw i32 %1, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @call_recursive() {
%1 = tail call i32 @y(i32 3)
%2 = tail call i32 @x(i32 5, i32 9)
%3 = add nsw i32 %2, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/);
void set_random_seed() { srand((unsigned int)time(0)); }


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

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

LLVM IR (-O0):
define void @set_random_seed() {
%1 = call i64 @time(i32 0)
%2 = trunc i64 %1 to i32
%3 = call i32 @srand(i32 %2)
ret void
}

LLVM IR (-O2):
define void @set_random_seed() {
%1 = tail call i64 @time(i32 0)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @srand(i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ __builtin_parityll(unsigned long long);
uint64_t chpl_bitops_parity_64(unsigned long long x) {
  return __builtin_parityll(x);
}


x86 assembly (clang, -O0):
<chpl_bitops_parity_64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    %rcx,%rax
shr    %rax
movabs $0x5555555555555555,%rdx
55 55 55
and    %rdx,%rax
sub    %rax,%rcx
movabs $0x3333333333333333,%rdx
33 33 33
mov    %rcx,%rax
and    %rdx,%rax
shr    $0x2,%rcx
and    %rdx,%rcx
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rcx,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
movabs $0x101010101010101,%rcx
01 01 01
imul   %rcx,%rax
shr    $0x38,%rax
and    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chpl_bitops_parity_64>:
mov    %rdi,%rax
shr    $0x20,%rax
xor    %edi,%eax
mov    %eax,%ecx
shr    $0x10,%ecx
xor    %eax,%ecx
xor    %eax,%eax
xor    %ch,%cl
setnp  %al
ret

LLVM IR (-O0):
define i32 @chpl_bitops_parity_64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llvm.ctpop.i64(i64 %3)
%5 = and i64 %4, 1
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @chpl_bitops_parity_64(i64 %0) {
%2 = tail call i64 @llvm.ctpop.i64(i64 %0)
%3 = trunc i64 %2 to i32
%4 = and i32 %3, 1
ret i32 %4
}
char *dummy_dcngettext(const char *domainname, const char *msgid1,
                       const char *msgid2, unsigned long int n, int category) {
  return (char *)(n == 1 ? msgid1 : msgid2);
}


x86 assembly (clang, -O0):
<dummy_dcngettext>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
cmpq   $0x1,-0x20(%rbp)
jne    1130 <dummy_dcngettext+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    1138 <dummy_dcngettext+0x38>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy_dcngettext>:
mov    %rsi,%rax
cmp    $0x1,%rcx
cmovne %rdx,%rax
ret

LLVM IR (-O0):
define i8* @dummy_dcngettext(i8* %0, i8* %1, i8* %2, i64 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i32 %4, i32* %10
%11 = load i64, i64* %9
%12 = icmp eq i64 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %5
%14 = load i8*, i8** %7
br label %17
15: ; preds = %5
%16 = load i8*, i8** %8
br label %17
17: ; preds = %15, %13
%18 = phi i8* [ %14, %13 ], [ %16, %15 ]
ret i8* %18
}

LLVM IR (-O2):
define i8* @dummy_dcngettext(i8* nocapture readnone %0, i8* readnone %1, i8* readnone %2, i64 %3, i32 %4) {
%6 = icmp eq i64 %3, 1
%7 = select i1 %6, i8* %1, i8* %2
ret i8* %7
}
int btrfs_test_free_space_cache(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @btrfs_test_free_space_cache() {
ret i32 0
}
int Mini_AigLitNot(int Lit) { return Lit ^ 1; }


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

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

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

LLVM IR (-O2):
define i32 @Mini_AigLitNot(i32 %0) {
%2 = xor i32 %0, 1
ret i32 %2
}
int main(void) { "hello"[0] = 'x'; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movb   $0x78,0xef5(%rip)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i32 @main() {
store i8 120, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getltchars();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int);
int /*<<< orphan*/ md_onsignal_default();
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ raw();
int /*<<< orphan*/ stdscr;
void setup() {
  md_onsignal_default();
  raw();
  noecho();
  keypad(stdscr, 1);
  getltchars();
}


x86 assembly (clang, -O0):
<setup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <md_onsignal_default@plt>
mov    $0x0,%al
call   1050 <raw@plt>
mov    $0x0,%al
call   1070 <noecho@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1040 <keypad@plt>
mov    $0x0,%al
call   1030 <getltchars@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup>:
push   %rax
xor    %eax,%eax
call   1060 <md_onsignal_default@plt>
xor    %eax,%eax
call   1050 <raw@plt>
xor    %eax,%eax
call   1070 <noecho@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1040 <keypad@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <getltchars@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define void @setup() {
%1 = call i32 (...) @md_onsignal_default()
%2 = call i32 (...) @raw()
%3 = call i32 (...) @noecho()
%4 = load i32, i32* @stdscr
%5 = call i32 @keypad(i32 %4, i32 1)
%6 = call i32 (...) @getltchars()
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @setup() {
%1 = tail call i32 (...) @md_onsignal_default()
%2 = tail call i32 (...) @raw()
%3 = tail call i32 (...) @noecho()
%4 = load i32, i32* @stdscr
%5 = tail call i32 @keypad(i32 %4, i32 1)
%6 = tail call i32 (...) @getltchars()
ret void
}
void s500_pwm_set_mode(int mode) {}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @s500_pwm_set_mode(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear();
int refresh();
int con_clearScr() {
  clear();
  return refresh();
}


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

x86 assembly (clang, -O2):
<con_clearScr>:
push   %rax
xor    %eax,%eax
call   1040 <clear@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <refresh@plt>

LLVM IR (-O0):
define i32 @con_clearScr() {
%1 = call i32 (...) @clear()
%2 = call i32 (...) @refresh()
ret i32 %2
}

LLVM IR (-O2):
define i32 @con_clearScr() {
%1 = tail call i32 (...) @clear()
%2 = tail call i32 (...) @refresh()
ret i32 %2
}
/* Variables and functions */
double fabs(double);
int equal(double double1, double double2) {
  double diff;
  diff = fabs(double1 - double2);
  return (diff < 0.001);
}


x86 assembly (clang, -O0):
<equal>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movaps 0xef1(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed0(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
movsd  0xefc(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @equal(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fsub double %6, %7
%9 = call double @llvm.fabs.f64(double %8)
store double %9, double* %5
%10 = load double, double* %5
%11 = fcmp olt double %10, 1.000000e-03
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @equal(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
%5 = fcmp olt double %4, 1.000000e-03
%6 = zext i1 %5 to i32
ret i32 %6
}
void fakeClDisplayTransientMessage(char *message) {}


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

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

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

LLVM IR (-O2):
define void @fakeClDisplayTransientMessage(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ set_ticker(int /*<<< orphan*/);
extern void end_down() {
  set_ticker(0);
  endwin();
}


x86 assembly (clang, -O0):
<end_down>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <set_ticker@plt>
mov    $0x0,%al
call   1040 <endwin@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_down>:
push   %rax
xor    %edi,%edi
call   1030 <set_ticker@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <endwin@plt>

LLVM IR (-O0):
define void @end_down() {
%1 = call i32 @set_ticker(i32 0)
%2 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
define void @end_down() {
%1 = tail call i32 @set_ticker(i32 0)
%2 = tail call i32 (...) @endwin()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
int skip_line(FILE *infile) {
  int c;
  do {
    c = fgetc(infile);
    if (c < 0)
      return c;
  } while (c != '\n');
  return 0;
}


x86 assembly (clang, -O0):
<skip_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    113d <skip_line+0x2d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <skip_line+0x43>
jmp    1142 <skip_line+0x32>
cmpl   $0xa,-0x14(%rbp)
jne    111c <skip_line+0xc>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_line>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <fgetc@plt>
test   %eax,%eax
js     1133 <skip_line+0x23>
cmp    $0xa,%eax
jne    1120 <skip_line+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @skip_line(i32* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = tail call i32 @fgetc(i32* %0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = icmp eq i32 %3, 10
br i1 %6, label %7, label %2
7: ; preds = %5, %2
%8 = phi i32 [ %3, %2 ], [ 0, %5 ]
ret i32 %8
}
void foo047(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo047(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, char *, char *, char *, char *);
void ip_str(char *ip, char *buf) {
  sscanf(ip, "%d.%d.%d.%d", buf, buf + 1, buf + 2, buf + 3);
}


x86 assembly (clang, -O0):
<ip_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%r8
add    $0x2,%r8
mov    -0x10(%rbp),%r9
add    $0x3,%r9
lea    0xeb9(%rip),%rsi
call   1030 <sscanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_str>:
mov    %rsi,%rdx
lea    0x1(%rsi),%rcx
lea    0x2(%rsi),%r8
lea    0x3(%rsi),%r9
lea    0xeda(%rip),%rsi
jmp    1030 <sscanf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define void @ip_str(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 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 3
%13 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %8, i8* %10, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define void @ip_str(i8* nocapture %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = getelementptr inbounds i8, i8* %1, i64 2
%5 = getelementptr inbounds i8, i8* %1, i64 3
%6 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %3, i8* %4, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void Free(void *_Ptr) { free(_Ptr); }


x86 assembly (clang, -O0):
<Free>:
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>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @Free(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(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void gtk_cell_view_new_with_markup() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_view_new_with_markup() {
ret void
}
int helper(int num) { return !num ? 0 : num % 10 + helper(num / 10); }


x86 assembly (clang, -O0):
<helper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112f <helper+0x1f>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1159 <helper+0x49>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <helper@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper>:
xor    %eax,%eax
test   %edi,%edi
je     113b <helper+0x3b>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
lea    (%rdi,%rdi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
add    %esi,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <helper+0x10>
ret

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

LLVM IR (-O2):
define i32 @helper(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = phi i32 [ %8, %3 ], [ 0, %1 ]
%6 = srem i32 %4, 10
%7 = sdiv i32 %4, 10
%8 = add nsw i32 %6, %5
%9 = add i32 %4, 9
%10 = icmp ult i32 %9, 19
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %12
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/buildlib.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/buildlib.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/buildlib.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void calSquare(int arg) { printf("The square of %d is %d\n", arg, arg * arg); }


x86 assembly (clang, -O0):
<calSquare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
imul   -0x4(%rbp),%edx
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calSquare>:
mov    %edi,%edx
imul   %edi,%edx
lea    0xee4(%rip),%rax
mov    %edi,%esi
mov    %rax,%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"The square of %d is %d\0A\00"
define void @calSquare(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 %4, %5
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"The square of %d is %d\0A\00"
define void @calSquare(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a, b, z;
  a = 4;
  b = 20;
  printf("%d\n", (a > b) ? a : b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1144 <main+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    114a <main+0x3a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 20)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  const int limit = 100;
  int num;
  scanf("%d", &num);
  if (num >= limit) {
    printf("high\n");
  } else {
    printf("low\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
lea    0xec3(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x64,-0xc(%rbp)
jl     1161 <main+0x41>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    116d <main+0x4d>
lea    0xea1(%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    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x64,0x4(%rsp)
lea    0xec9(%rip),%rax
lea    0xebe(%rip),%rdi
cmovge %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"high\0A\00"
@.str.2 = [5 x i8] c"low\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 100, i32* %2
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 100
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [4 x i8] c"low\00"
@str.3 = [5 x i8] c"high\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 99
%6 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0)
%7 = call i32 @puts(i8* dereferenceable(1) %6)
ret i32 0
}
void baz(void) { asm("baz_label: .globl baz_label"); }


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

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

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

LLVM IR (-O2):
define void @baz() {
tail call void asm sideeffect "baz_label: .globl baz_label", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nss_macsec_reg_write(unsigned int, unsigned int,
                                        unsigned int);
int dal_reg_write(unsigned int dev_id, unsigned int reg_addr,
                  unsigned int value) {
  if ((dev_id >= 3) || (reg_addr >= 0x200000)) {
    return -1;
  }
  nss_macsec_reg_write(dev_id, reg_addr, value);
  return 0;
}


x86 assembly (clang, -O0):
<dal_reg_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jae    1138 <dal_reg_write+0x28>
cmpl   $0x200000,-0xc(%rbp)
jb     1144 <dal_reg_write+0x34>
movl   $0xffffffff,-0x4(%rbp)
jmp    1159 <dal_reg_write+0x49>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <nss_macsec_reg_write@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dal_reg_write>:
mov    $0xffffffff,%eax
cmp    $0x2,%edi
ja     112e <dal_reg_write+0x1e>
cmp    $0x1fffff,%esi
ja     112e <dal_reg_write+0x1e>
push   %rax
call   1030 <nss_macsec_reg_write@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @dal_reg_write(i32 %0, i32 %1, i32 %2) {
%4 = icmp ugt i32 %0, 2
%5 = icmp ugt i32 %1, 2097151
%6 = or i1 %4, %5
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @nss_macsec_reg_write(i32 %0, i32 %1, i32 %2)
br label %9
9: ; preds = %3, %7
%10 = phi i32 [ 0, %7 ], [ -1, %3 ]
ret i32 %10
}
/* Type definitions */
struct stat {
  long st_size;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int SSIRecommendMode(char *file) {
  struct stat s2;
  if (stat(file, &s2) == 0) {
    if (s2.st_size <= 2146483647L)
      return 0;
    else
      return 1;
  }
  return -1;
}


x86 assembly (clang, -O0):
<SSIRecommendMode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jne    1159 <SSIRecommendMode+0x49>
cmpq   $0x7ff0bdbf,-0x18(%rbp)
7f
jg     114d <SSIRecommendMode+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1160 <SSIRecommendMode+0x50>
movl   $0x1,-0x4(%rbp)
jmp    1160 <SSIRecommendMode+0x50>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIRecommendMode>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
cmpq   $0x7ff0bdc0,(%rsp)
7f
setge  %cl
neg    %rax
sbb    %eax,%eax
or     %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
define i32 @SSIRecommendMode(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%10 = load i64, i64* %9
%11 = icmp sle i64 %10, 2146483647
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 0, i32* %2
br label %15
13: ; preds = %8
store i32 1, i32* %2
br label %15
14: ; preds = %1
store i32 -1, i32* %2
br label %15
15: ; preds = %14, %13, %12
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i64 }
define i32 @SSIRecommendMode(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i64, i64* %6
%8 = icmp sgt i64 %7, 2146483647
%9 = zext i1 %8 to i32
%10 = select i1 %5, i32 %9, i32 -1
ret i32 %10
}
void TIM4_IRQHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @TIM4_IRQHandler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_PowerF_init(void) {
  _hmt_register_covercase("HMM_PowerF", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_PowerF_init>:
lea    0xee9(%rip),%rdi
lea    0xeed(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"HMM_PowerF\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_PowerF_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"HMM_PowerF\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_PowerF_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
bool direxists(const char *dir) {
  struct stat buf;
  return stat(dir, &buf) == 0 && S_ISDIR(buf.st_mode);
}


x86 assembly (clang, -O0):
<direxists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    115d <direxists+0x3d>
mov    -0x10(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<direxists>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <direxists+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @direxists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i64 @S_ISDIR(i32 %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @direxists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
void yy_1_PreParaWsMore(char *yytext, int yyleng) {
  ;
  ;
}


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

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

LLVM IR (-O0):
define void @yy_1_PreParaWsMore(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 @yy_1_PreParaWsMore(i8* nocapture %0, i32 %1) {
ret void
}
_Bool accept(char *c) { return (*c > 31 && *c < 127); }


x86 assembly (clang, -O0):
<accept>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x1f,%ecx
mov    %al,-0x9(%rbp)
jle    112d <accept+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7f,%eax
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept>:
mov    (%rdi),%al
add    $0xe0,%al
cmp    $0x5f,%al
setb   %al
ret

LLVM IR (-O0):
define zeroext i1 @accept(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sgt i32 %5, 31
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp slt i32 %10, 127
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
ret i1 %13
}

LLVM IR (-O2):
define zeroext i1 @accept(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -32
%4 = icmp ult i8 %3, 95
ret i1 %4
}