xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int64_t EMBC_TIME_ABS(int64_t t) { return ((t) < 0 ? -(t) : (t)); }


x86 assembly (clang, -O0):
<EMBC_TIME_ABS>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <EMBC_TIME_ABS+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <EMBC_TIME_ABS+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMBC_TIME_ABS>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @EMBC_TIME_ABS(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
int gcd(int a, int b) {
  int c;
  while ((c = a % b)) {
    a = b;
    b = c;
  }
  return (b);
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmp    $0x0,%edx
je     112e <gcd+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <gcd+0xa>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edi,%eax
mov    %edx,%edi
cltd
idiv   %edi
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %1, %2 ], [ %6, %3 ]
%5 = phi i32 [ %0, %2 ], [ %4, %3 ]
%6 = srem i32 %5, %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int write(int file, char *ptr, int len) { puts(ptr); }


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
mov    %rsi,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
define i32 @write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i8*, i8** %6
%9 = call i32 @puts(i8* %8)
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @write(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) %1)
ret i32 undef
}
int fun500() { return 500; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x1f4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x1f4,%eax
ret

LLVM IR (-O0):
define i32 @fun500() {
ret i32 500
}

LLVM IR (-O2):
define i32 @fun500() {
ret i32 500
}
/* Variables and functions */
double pow(double const, double const);
double rglmut_logistic_function(const double x) {
  const double e = 2.71828182845904523536;
  return (double)1.0 / ((double)1.0 + pow(e, -x));
}


x86 assembly (clang, -O0):
<rglmut_logistic_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xeba(%rip),%xmm0
call   1030 <pow@plt>
movsd  0xea5(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xe99(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rglmut_logistic_function>:
push   %rax
movaps %xmm0,%xmm1
xorps  0xee5(%rip),%xmm1
movsd  0xeed(%rip),%xmm0
call   1030 <pow@plt>
movsd  0xee8(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rglmut_logistic_function(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 0x4005BF0A8B145769, double* %3
%4 = load double, double* %2
%5 = fneg double %4
%6 = call double @pow(double 0x4005BF0A8B145769, double %5)
%7 = fadd double 1.000000e+00, %6
%8 = fdiv double 1.000000e+00, %7
ret double %8
}

LLVM IR (-O2):
define double @rglmut_logistic_function(double %0) {
%2 = fneg double %0
%3 = tail call double @pow(double 0x4005BF0A8B145769, double %2)
%4 = fadd double %3, 1.000000e+00
%5 = fdiv double 1.000000e+00, %4
ret double %5
}
void bar(int *a) {
  if (a[0] != a[1] * 2333)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
imul   $0x91d,0x4(%rcx),%ecx
cmp    %ecx,%eax
je     113a <bar+0x2a>
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
imul   $0x91d,0x4(%rdi),%eax
cmp    %eax,(%rdi)
jne    111e <bar+0xe>
pop    %rax
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define void @bar(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = mul nsw i32 %8, 2333
%10 = icmp ne i32 %5, %9
br i1 %10, label %11, label %12
11: ; preds = %1
unreachable
12: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @bar(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 2333
%6 = icmp eq i32 %2, %5
br i1 %6, label %8, label %7
7: ; preds = %1
tail call void @abort()
unreachable
8: ; preds = %1
ret void
}
int atrshmlog_patch_version() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @atrshmlog_patch_version() {
ret i32 0
}
int test_imm_FAuint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xFA << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_FAuint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 16384000
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
char *itob(int /*<<< orphan*/, int, char *);
char *int64tob(int64_t in, char *out) { return itob(in, 64, out); }


x86 assembly (clang, -O0):
<int64tob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x40,%esi
call   1030 <itob@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int64tob>:
mov    %rsi,%rdx
mov    $0x40,%esi
jmp    1030 <itob@plt>

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

LLVM IR (-O2):
define i8* @int64tob(i32 %0, i8* %1) {
%3 = tail call i8* @itob(i32 %0, i32 64, i8* %1)
ret i8* %3
}
/* Variables and functions */
long f1();
long f2();
int /*<<< orphan*/ f3(long);
void f4() {
  long v = f1();
  long o = f2();
  v = (v & 0x00ffffff) | (o & 0xff000000);
  f3(v);
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <f1@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <f2@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffffff,%rax
movabs $0xff000000,%rcx
and    -0x10(%rbp),%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <f3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
push   %rbx
xor    %eax,%eax
call   1050 <f1@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <f2@plt>
and    $0xffffff,%ebx
and    $0xff000000,%eax
or     %rax,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <f3@plt>

LLVM IR (-O0):
define void @f4() {
%1 = alloca i64
%2 = alloca i64
%3 = call i64 (...) @f1()
store i64 %3, i64* %1
%4 = call i64 (...) @f2()
store i64 %4, i64* %2
%5 = load i64, i64* %1
%6 = and i64 %5, 16777215
%7 = load i64, i64* %2
%8 = and i64 %7, 4278190080
%9 = or i64 %6, %8
store i64 %9, i64* %1
%10 = load i64, i64* %1
%11 = call i32 @f3(i64 %10)
ret void
}

LLVM IR (-O2):
define void @f4() {
%1 = tail call i64 (...) @f1()
%2 = tail call i64 (...) @f2()
%3 = and i64 %1, 16777215
%4 = and i64 %2, 4278190080
%5 = or i64 %4, %3
%6 = tail call i32 @f3(i64 %5)
ret void
}
/* Variables and functions */
int check2dsurface(int *, double *, int *, int *, int /*<<< orphan*/,
                   int /*<<< orphan*/, int /*<<< orphan*/);
int check_surface_topology(int nV, double *vertex, int nF, int *face) {
  return check2dsurface(&nV, vertex, &nF, face, 0, 0, 0);
}


x86 assembly (clang, -O0):
<check_surface_topology>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    -0x4(%rbp),%rdi
lea    -0x14(%rbp),%rdx
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <check2dsurface@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_surface_topology>:
sub    $0x18,%rsp
mov    %edi,0x14(%rsp)
mov    %edx,0x10(%rsp)
movl   $0x0,(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rdx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <check2dsurface@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @check_surface_topology(i32 %0, double* %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32*
store i32 %0, i32* %5
store double* %1, double** %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load double*, double** %6
%10 = load i32*, i32** %8
%11 = call i32 @check2dsurface(i32* %5, double* %9, i32* %7, i32* %10, i32 0, i32 0, i32 0)
ret i32 %11
}

LLVM IR (-O2):
define i32 @check_surface_topology(i32 %0, double* %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %5
store i32 %2, i32* %6
%7 = call i32 @check2dsurface(i32* %5, double* %1, i32* %6, i32* %3, i32 0, i32 0, i32 0)
ret i32 %7
}
char ****swears(const char x[20], const int *const **const ***const ****umpteen,
                const const float a) {
  return (char ****)0;
}


x86 assembly (clang, -O0):
<swears>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8**** @swears(i8* %0, i32********** %1, float %2) {
%4 = alloca i8*
%5 = alloca i32**********
%6 = alloca float
store i8* %0, i8** %4
store i32********** %1, i32*********** %5
store float %2, float* %6
ret i8**** null
}

LLVM IR (-O2):
define noalias i8**** @swears(i8* nocapture readnone %0, i32********** nocapture readnone %1, float %2) {
ret i8**** null
}
/* Variables and functions */
#define SQLITE_CONSTRAINT 128
int /*<<< orphan*/ printError(char *, int /*<<< orphan*/);
void checkResultCode(int code) {
  switch (code) {
  case SQLITE_CONSTRAINT:
    printError("[!] Fehler : %s.\n", 0);
    break;
  default:
    printError("[!] Fehler : %s.\n", 0);
    break;
  }
}


x86 assembly (clang, -O0):
<checkResultCode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x80,%eax
jne    1141 <checkResultCode+0x31>
jmp    112e <checkResultCode+0x1e>
lea    0xecb(%rip),%rdi
xor    %esi,%esi
call   1030 <printError@plt>
jmp    114f <checkResultCode+0x3f>
lea    0xeb8(%rip),%rdi
xor    %esi,%esi
call   1030 <printError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkResultCode>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <printError@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"[!] Fehler : %s.\0A\00"
define void @checkResultCode(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %6 [
i32 128, label %4
]
4: ; preds = %1
%5 = call i32 @printError(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 0)
br label %8
6: ; preds = %1
%7 = call i32 @printError(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 0)
br label %8
8: ; preds = %6, %4
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"[!] Fehler : %s.\0A\00"
define void @checkResultCode(i32 %0) {
%2 = tail call i32 @printError(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
int test_imm_BDuint16_mem(unsigned short *val) {
  return ((*val) & (0xBD << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_BDuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 189
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ activity_sort1(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Total input: ");
  scanf("%d", &n);
  activity_sort1(n);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"Total input: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @activity_sort1(i32 %5)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t __GC_mellow_is_marked(void *ptr) {
  if ((((uint64_t *)(ptr))[1] & 0x8000000000000000) != 0) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<__GC_mellow_is_marked>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq 0x4(%rax),%rax
movabs $0x8000000000000000,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
je     1133 <__GC_mellow_is_marked+0x33>
movl   $0x1,-0x4(%rbp)
jmp    113a <__GC_mellow_is_marked+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__GC_mellow_is_marked>:
mov    0x4(%rdi),%eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @__GC_mellow_is_marked(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = bitcast i8* %4 to i32*
%6 = getelementptr inbounds i32, i32* %5, i64 1
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
%9 = and i64 %8, -9223372036854775808
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @__GC_mellow_is_marked(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
%5 = lshr i32 %4, 31
ret i32 %5
}
/* Variables and functions */
int SCHED_FIFO;
int get_default_sched_policy(void) { return SCHED_FIFO; }


x86 assembly (clang, -O0):
<get_default_sched_policy>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@SCHED_FIFO = global i32 0
define i32 @get_default_sched_policy() {
%1 = load i32, i32* @SCHED_FIFO
ret i32 %1
}

LLVM IR (-O2):
@SCHED_FIFO = global i32 0
define i32 @get_default_sched_policy() {
%1 = load i32, i32* @SCHED_FIFO
ret i32 %1
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int shiftr64(int, int);
uint64_t bmw_large_s4(uint64_t x) {
  uint64_t r;
  r = shiftr64(x, 1) ^ x;
  return r;
}


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

x86 assembly (clang, -O2):
<bmw_large_s4>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%esi
call   1030 <shiftr64@plt>
xor    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @bmw_large_s4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @shiftr64(i32 %4, i32 1)
%6 = load i32, i32* %2
%7 = xor i32 %5, %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @bmw_large_s4(i32 %0) {
%2 = tail call i32 @shiftr64(i32 %0, i32 1)
%3 = xor i32 %2, %0
ret i32 %3
}
void _exit(void) {
  waitkey();
  while (inportb(0x64) & 0x02)
    ;
  outportb(0x64, 0xfe);
  asm("cli;hlt");
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <waitkey@plt>
mov    $0x64,%edi
mov    $0x0,%al
call   1040 <inportb@plt>
and    $0x2,%eax
cmp    $0x0,%eax
je     1158 <_exit+0x28>
jmp    113b <_exit+0xb>
mov    $0x64,%edi
mov    $0xfe,%esi
mov    $0x0,%al
call   1050 <outportb@plt>
cli
hlt

x86 assembly (clang, -O2):
<_exit>:
push   %rax
xor    %eax,%eax
call   1030 <waitkey@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x64,%edi
xor    %eax,%eax
call   1040 <inportb@plt>
test   $0x2,%al
jne    1140 <_exit+0x10>
mov    $0x64,%edi
mov    $0xfe,%esi
xor    %eax,%eax
call   1050 <outportb@plt>
cli
hlt

LLVM IR (-O0):
define void @_exit() {
%1 = call i32 (...) @waitkey()
br label %2
2: ; preds = %6, %0
%3 = call i32 (i32, ...) bitcast (i32 (...)* @inportb to i32 (i32, ...)*)(i32 100)
%4 = and i32 %3, 2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
%8 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outportb to i32 (i32, i32, ...)*)(i32 100, i32 254)
unreachable
}

LLVM IR (-O2):
define void @_exit() {
%1 = tail call i32 (...) @waitkey()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @inportb to i32 (i32, ...)*)(i32 100)
%4 = and i32 %3, 2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outportb to i32 (i32, i32, ...)*)(i32 100, i32 254)
tail call void asm sideeffect "cli;hlt", "~{dirflag},~{fpsr},~{flags}"()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int correctAnswer(unsigned short user, unsigned short machine) {
  if (user == machine) {
    printf("Correct\n\n");
    return 1;
  } else {
    printf("Incorrect, start all over again\n\n");
    return 0;
  }
}


x86 assembly (clang, -O0):
<correctAnswer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x8(%rbp),%ecx
cmp    %ecx,%eax
jne    114e <correctAnswer+0x3e>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1161 <correctAnswer+0x51>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<correctAnswer>:
push   %rbx
xor    %ebx,%ebx
cmp    %si,%di
sete   %bl
lea    0xf01(%rip),%rax
lea    0xed9(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Correct\0A\0A\00"
@.str.1 = [34 x i8] c"Incorrect, start all over again\0A\0A\00"
define i32 @correctAnswer(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i32
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
%6 = load i16, i16* %4
%7 = zext i16 %6 to i32
%8 = load i16, i16* %5
%9 = zext i16 %8 to i32
%10 = icmp eq i32 %7, %9
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %15
15: ; preds = %13, %11
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@str = [33 x i8] c"Incorrect, start all over again\0A\00"
@str.2 = [9 x i8] c"Correct\0A\00"
define i32 @correctAnswer(i16 zeroext %0, i16 zeroext %1) {
%3 = icmp eq i16 %0, %1
%4 = select i1 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0)
%5 = zext i1 %3 to i32
%6 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ popmatrix();
void popmatrix_() { popmatrix(); }


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

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

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

LLVM IR (-O2):
define void @popmatrix_() {
%1 = tail call i32 (...) @popmatrix()
ret void
}
int all_upper(str)
char *str;
{
  while (*str) {
    if (!(((unsigned char)*str) <= 0177) || !isupper(*str))
      return 0;
    ++str;
  }
  return 1;
}


x86 assembly (clang, -O0):
<all_upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     116b <all_upper+0x5b>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x7f,%eax
jg     114e <all_upper+0x3e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isupper@plt>
cmp    $0x0,%eax
jne    115a <all_upper+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1172 <all_upper+0x62>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <all_upper+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_upper>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     114b <all_upper+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %al,%al
js     1150 <all_upper+0x40>
movzbl %al,%edi
call   1030 <isupper@plt>
test   %eax,%eax
je     1150 <all_upper+0x40>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <all_upper+0x20>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @all_upper(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %20, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %23
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = icmp sle i32 %11, 127
br i1 %12, label %13, label %19
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = call i32 @isupper(i32 %16)
%18 = icmp ne i32 %17, 0
br i1 %18, label %20, label %19
19: ; preds = %13, %8
store i32 0, i32* %2
br label %24
20: ; preds = %13
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
br label %4
23: ; preds = %4
store i32 1, i32* %2
br label %24
24: ; preds = %23, %19
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @all_upper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %7
4: ; preds = %11
%5 = load i8, i8* %15
%6 = icmp eq i8 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %15, %4 ], [ %0, %1 ]
%10 = icmp sgt i8 %8, -1
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = zext i8 %8 to i32
%13 = tail call i32 @isupper(i32 %12)
%14 = icmp eq i32 %13, 0
%15 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %14, label %16, label %4
16: ; preds = %11, %7, %4, %1
%17 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ], [ 0, %11 ]
ret i32 %17
}
int newDbClose(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @newDbClose() {
ret i32 1
}

LLVM IR (-O2):
define i32 @newDbClose() {
ret i32 1
}
int devcgroup_device_visible(int type, int major, int start_minor,
                             int nr_minors) {
  return 0;
}


x86 assembly (clang, -O0):
<devcgroup_device_visible>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @devcgroup_device_visible(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @devcgroup_device_visible(i32 %0, i32 %1, i32 %2, i32 %3) {
ret i32 0
}
double get_dynamical_diff_sh1(double JD) {
  double TD, E;
  E = (JD - 2067314.5) / 36525.0;
  TD = 1830.0 - 405.0 * E + 46.5 * E * E;
  return (TD);
}


x86 assembly (clang, -O0):
<get_dynamical_diff_sh1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xf0a(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xef6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  0xed0(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xecc(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xeb0(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_dynamical_diff_sh1>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef4(%rip),%xmm1
movsd  0xef4(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @get_dynamical_diff_sh1(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fsub double %5, 0x413F8B7280000000
%7 = fdiv double %6, 3.652500e+04
store double %7, double* %4
%8 = load double, double* %4
%9 = call double @llvm.fmuladd.f64(double -4.050000e+02, double %8, double 1.830000e+03)
%10 = load double, double* %4
%11 = fmul double 4.650000e+01, %10
%12 = load double, double* %4
%13 = call double @llvm.fmuladd.f64(double %11, double %12, double %9)
store double %13, double* %3
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @get_dynamical_diff_sh1(double %0) {
%2 = fadd double %0, 0xC13F8B7280000000
%3 = fdiv double %2, 3.652500e+04
%4 = tail call double @llvm.fmuladd.f64(double %3, double -4.050000e+02, double 1.830000e+03)
%5 = fmul double %3, 4.650000e+01
%6 = tail call double @llvm.fmuladd.f64(double %5, double %3, double %4)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printV(void) { printf("tomopy_peri\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"tomopy_peri\0A\00"
define void @printV() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"tomopy_peri\00"
define void @printV() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
int do_319() { return 319; }


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

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

LLVM IR (-O0):
define i32 @do_319() {
ret i32 319
}

LLVM IR (-O2):
define i32 @do_319() {
ret i32 319
}
/* Variables and functions */
int /*<<< orphan*/ fd_exit();
void cleanup(void) { fd_exit(); }


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

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

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

LLVM IR (-O2):
define void @cleanup() {
%1 = tail call i32 (...) @fd_exit()
ret void
}
void check_closefile(int handle, unsigned name) {
  (void)handle;
  (void)name;
}


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

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

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

LLVM IR (-O2):
define void @check_closefile(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int gprc_default_instruction_set(int *);
int gprcm_morphology_instruction_set(int *instruction_set) {
  return gprc_default_instruction_set(instruction_set);
}


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

x86 assembly (clang, -O2):
<gprcm_morphology_instruction_set>:
jmp    1030 <gprc_default_instruction_set@plt>

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

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

/* Variables and functions */
float read_f32_be(unsigned char *buf) {
  union {
    uint32_t i;
    float f;
  } ret;
  ret.i = (unsigned int)(((buf)[0] << 24) + ((buf)[1] << 16) + ((buf)[2] << 8) +
                         ((buf)[3]));
  return ret.f;
}


x86 assembly (clang, -O0):
<read_f32_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_f32_be>:
mov    (%rdi),%eax
bswap  %eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define float @read_f32_be(i8* %0) {
%2 = alloca i8*
%3 = alloca %union.anon
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl i32 %7, 24
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 16
%14 = add nsw i32 %8, %13
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 2
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = add nsw i32 %14, %19
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 3
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = add nsw i32 %20, %24
%26 = bitcast %union.anon* %3 to i32*
store i32 %25, i32* %26
%27 = bitcast %union.anon* %3 to float*
%28 = load float, float* %27
ret float %28
}

LLVM IR (-O2):
define float @read_f32_be(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %14, %17
%19 = bitcast i32 %18 to float
ret float %19
}
/* Variables and functions */
int /*<<< orphan*/ soar_ecPrintMemoryStatistics();
void print_memory_statistics(void) { soar_ecPrintMemoryStatistics(); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ my_diff(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                           int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void message_print_diffs(FILE *res_patch, FILE *current_file, char *path) {
  printf("--> Diferencias del archivo %s\n", path);
  my_diff(res_patch, current_file, stdout);
  printf("\n\n");
}


x86 assembly (clang, -O0):
<message_print_diffs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e8b(%rip),%rax
mov    (%rax),%edx
call   1040 <my_diff@plt>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<message_print_diffs>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xebf(%rip),%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <my_diff@plt>
lea    0xeb8(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"--> Diferencias del archivo %s\0A\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"\0A\0A\00"
define void @message_print_diffs(i32* %0, i32* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i8*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32*, i32** %4
%10 = load i32*, i32** %5
%11 = load i32, i32* @stdout
%12 = call i32 @my_diff(i32* %9, i32* %10, i32 %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"--> Diferencias del archivo %s\0A\00"
@stdout = global i32 0
@str = [2 x i8] c"\0A\00"
define void @message_print_diffs(i32* %0, i32* %1, i8* %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i32, i32* @stdout
%6 = tail call i32 @my_diff(i32* %0, i32* %1, i32 %5)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
int cephes_isnan(x)
double x;
{
  union {
    double d;
    unsigned short s[4];
    unsigned int i[2];
  } u;
  u.d = x;
  if (sizeof(int) == 4) {
    if (((u.i[1] & 0x7ff00000) == 0x7ff00000) &&
        (((u.i[1] & 0x000fffff) != 0) || (u.i[0] != 0)))
      return 1;
    return (0);
  } else {
    if ((u.s[3] & 0x7ff0) == 0x7ff0) {
      if (((u.s[3] & 0x000f) | u.s[2] | u.s[1] | u.s[0]) != 0)
        return (1);
    }
    return (0);
  }
}


x86 assembly (clang, -O0):
<cephes_isnan>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
and    $0x7ff00000,%eax
cmp    $0x7ff00000,%eax
jne    114d <cephes_isnan+0x4d>
mov    -0x14(%rbp),%eax
and    $0xfffff,%eax
cmp    $0x0,%eax
jne    1141 <cephes_isnan+0x41>
cmpl   $0x0,-0x18(%rbp)
je     114d <cephes_isnan+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1154 <cephes_isnan+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cephes_isnan>:
movq   %xmm0,%rcx
mov    %rcx,%rdx
shr    $0x20,%rdx
mov    %edx,%eax
not    %eax
test   $0x7ff00000,%eax
jne    1127 <cephes_isnan+0x27>
and    $0xfffff,%edx
mov    $0x1,%eax
or     %edx,%ecx
je     1127 <cephes_isnan+0x27>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
%union.anon = type { double }
define i32 @cephes_isnan(double %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca %union.anon
store double %0, double* %3
%5 = load double, double* %3
%6 = bitcast %union.anon* %4 to double*
store double %5, double* %6
%7 = bitcast %union.anon* %4 to [2 x i32]*
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%9 = load i32, i32* %8
%10 = and i32 %9, 2146435072
%11 = icmp eq i32 %10, 2146435072
br i1 %11, label %12, label %24
12: ; preds = %1
%13 = bitcast %union.anon* %4 to [2 x i32]*
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 1
%15 = load i32, i32* %14
%16 = and i32 %15, 1048575
%17 = icmp ne i32 %16, 0
br i1 %17, label %23, label %18
18: ; preds = %12
%19 = bitcast %union.anon* %4 to [2 x i32]*
%20 = getelementptr inbounds [2 x i32], [2 x i32]* %19, i64 0, i64 0
%21 = load i32, i32* %20
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %18, %12
store i32 1, i32* %2
br label %25
24: ; preds = %18, %1
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @cephes_isnan(double %0) {
%2 = bitcast double %0 to i64
%3 = lshr i64 %2, 32
%4 = trunc i64 %3 to i32
%5 = and i32 %4, 2146435072
%6 = icmp eq i32 %5, 2146435072
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = and i32 %4, 1048575
%9 = trunc i64 %2 to i32
%10 = or i32 %8, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7, %1
br label %13
13: ; preds = %7, %12
%14 = phi i32 [ 0, %12 ], [ 1, %7 ]
ret i32 %14
}
/* Variables and functions */
int random();
int rsd() { return (random() % 10); }


x86 assembly (clang, -O0):
<rsd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <random@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsd>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rsd() {
%1 = call i32 (...) @random()
%2 = srem i32 %1, 10
ret i32 %2
}

LLVM IR (-O2):
define i32 @rsd() {
%1 = tail call i32 (...) @random()
%2 = srem i32 %1, 10
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ ans;

/* Variables and functions */
int /*<<< orphan*/ SIOCATMARK;
scalar_t__ ioctl(int, int /*<<< orphan*/, int *, int);
int is_sioctatmark(int fd) {
  int ans = -1;
  if (ioctl(fd, SIOCATMARK, &ans, sizeof(ans)) < 0) {
  }
  return ans;
}


x86 assembly (clang, -O0):
<is_sioctatmark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
mov    $0x4,%ecx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jge    114b <is_sioctatmark+0x3b>
jmp    114b <is_sioctatmark+0x3b>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sioctatmark>:
push   %rax
movl   $0xffffffff,0x4(%rsp)
ff
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
mov    $0x4,%ecx
call   1030 <ioctl@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIOCATMARK = global i32 0
define i32 @is_sioctatmark(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @SIOCATMARK
%6 = call i64 @ioctl(i32 %4, i32 %5, i32* %3, i32 4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %1
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@SIOCATMARK = global i32 0
define i32 @is_sioctatmark(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 -1, i32* %2
%4 = load i32, i32* @SIOCATMARK
%5 = call i64 @ioctl(i32 %0, i32 %4, i32* %2, i32 4)
%6 = load i32, i32* %2
ret i32 %6
}
void endutxent(void) { ; }


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

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

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

LLVM IR (-O2):
define void @endutxent() {
ret void
}
/* Variables and functions */
long get_num(char *, char *);
int /*<<< orphan*/ get_string(char *);
int /*<<< orphan*/ l_bitwise(int /*<<< orphan*/, long);
char *long2str(char *, int /*<<< orphan*/);
char *macbitwise(char *arg) {
  long int i = get_num("bitwise", arg);
  return long2str(arg, l_bitwise(get_string(arg), i));
}


x86 assembly (clang, -O0):
<macbitwise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <get_num@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_string@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1060 <l_bitwise@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1050 <long2str@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macbitwise>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xeb2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <get_num@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <get_string@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1060 <l_bitwise@plt>
mov    %rbx,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <long2str@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"bitwise\00"
define i8* @macbitwise(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @get_num(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %4)
store i64 %5, i64* %3
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @get_string(i8* %7)
%9 = load i64, i64* %3
%10 = call i32 @l_bitwise(i32 %8, i64 %9)
%11 = call i8* @long2str(i8* %6, i32 %10)
ret i8* %11
}

LLVM IR (-O2):
@.str = [8 x i8] c"bitwise\00"
define i8* @macbitwise(i8* %0) {
%2 = tail call i64 @get_num(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @get_string(i8* %0)
%4 = tail call i32 @l_bitwise(i32 %3, i64 %2)
%5 = tail call i8* @long2str(i8* %0, i32 %4)
ret i8* %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int const *, size_t const);
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
void norx_pad(uint8_t *out, const uint8_t *in, const size_t inlen) {
  memset(out, 0, (((((32 * 16) - (32 * 4))) + 7) / 8));
  memcpy(out, in, inlen);
  out[inlen] = 0x01;
  out[(((((32 * 16) - (32 * 4))) + 7) / 8) - 1] |= 0x80;
}


x86 assembly (clang, -O0):
<norx_pad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    0xbc(%rax),%ecx
or     $0x80,%ecx
mov    %ecx,0xbc(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<norx_pad>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x30,%edx
call   1030 <memset@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
movl   $0x1,(%rbx,%r15,4)
orb    $0x80,0xbc(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @norx_pad(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = call i32 @memset(i32* %7, i32 0, i32 48)
%9 = load i32*, i32** %4
%10 = load i32*, i32** %5
%11 = load i64, i64* %6
%12 = call i32 @memcpy(i32* %9, i32* %10, i64 %11)
%13 = load i32*, i32** %4
%14 = load i64, i64* %6
%15 = getelementptr inbounds i32, i32* %13, i64 %14
store i32 1, i32* %15
%16 = load i32*, i32** %4
%17 = getelementptr inbounds i32, i32* %16, i64 47
%18 = load i32, i32* %17
%19 = or i32 %18, 128
store i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @norx_pad(i32* %0, i32* %1, i64 %2) {
%4 = tail call i32 @memset(i32* %0, i32 0, i32 48)
%5 = tail call i32 @memcpy(i32* %0, i32* %1, i64 %2)
%6 = getelementptr inbounds i32, i32* %0, i64 %2
store i32 1, i32* %6
%7 = getelementptr inbounds i32, i32* %0, i64 47
%8 = load i32, i32* %7
%9 = or i32 %8, 128
store i32 %9, i32* %7
ret void
}