xunge/DecIR huggingface dataset:
__attribute__((pure)) int testFundef6(int a) { return a; }


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

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

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

LLVM IR (-O2):
define i32 @testFundef6(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int rotateRight(int, int);
uint32_t SmallSigma0(uint32_t x) {
  return rotateRight(x, 7) ^ rotateRight(x, 18) ^ (x >> 3);
}


x86 assembly (clang, -O0):
<SmallSigma0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x7,%esi
call   1030 <rotateRight@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x12,%esi
call   1030 <rotateRight@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x3,%ecx
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SmallSigma0>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x7,%esi
call   1030 <rotateRight@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x12,%esi
call   1030 <rotateRight@plt>
sar    $0x3,%ebx
xor    %ebp,%ebx
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @SmallSigma0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rotateRight(i32 %3, i32 7)
%5 = load i32, i32* %2
%6 = call i32 @rotateRight(i32 %5, i32 18)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 3
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @SmallSigma0(i32 %0) {
%2 = tail call i32 @rotateRight(i32 %0, i32 7)
%3 = tail call i32 @rotateRight(i32 %0, i32 18)
%4 = ashr i32 %0, 3
%5 = xor i32 %2, %4
%6 = xor i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int nearestInt(float);
unsigned convertTo8bit(float x) {
  if (x < 0)
    x = 0;
  if (x > 1)
    x = 1;
  return nearestInt(x * 255.0f);
}


x86 assembly (clang, -O0):
<convertTo8bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1132 <convertTo8bit+0x22>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xec1(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1155 <convertTo8bit+0x45>
movss  0xeb0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xea7(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
call   1030 <nearestInt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertTo8bit>:
xorps  %xmm1,%xmm1
maxss  %xmm0,%xmm1
movss  0xee1(%rip),%xmm0
minss  %xmm1,%xmm0
mulss  0xed9(%rip),%xmm0
jmp    1030 <nearestInt@plt>

LLVM IR (-O0):
define i32 @convertTo8bit(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
store float 0.000000e+00, float* %2
br label %6
6: ; preds = %5, %1
%7 = load float, float* %2
%8 = fcmp ogt float %7, 1.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
store float 1.000000e+00, float* %2
br label %10
10: ; preds = %9, %6
%11 = load float, float* %2
%12 = fmul float %11, 2.550000e+02
%13 = call i32 @nearestInt(float %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @convertTo8bit(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = select i1 %2, float 0.000000e+00, float %0
%4 = fcmp ogt float %3, 1.000000e+00
%5 = select i1 %4, float 1.000000e+00, float %3
%6 = fmul float %5, 2.550000e+02
%7 = tail call i32 @nearestInt(float %6)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_storeh_pi(int /*<<< orphan*/ *, int /*<<< orphan*/);
void test_mm_storeh_pi(__m64 *x, __m128 y) { _mm_storeh_pi(x, y); }


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

x86 assembly (clang, -O2):
<test_mm_storeh_pi>:
jmp    1030 <_mm_storeh_pi@plt>

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

LLVM IR (-O2):
define void @test_mm_storeh_pi(i32* %0, i32 %1) {
%3 = tail call i32 @_mm_storeh_pi(i32* %0, i32 %1)
ret void
}
/* Variables and functions */
char *calloc(scalar_t__, int);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *charalloc(char *in) {
  char *buf;
  buf = calloc(strlen(in) + 1, 1);
  strcpy(buf, in);
  return (char *)buf;
}


x86 assembly (clang, -O0):
<charalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @charalloc(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @calloc(i64 %6, i32 1)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @charalloc(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @calloc(i64 %3, i32 1)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
int qh_intcompare(const void *i, const void *j) {
  return (*((const int *)i) - *((const int *)j));
}


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

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

LLVM IR (-O0):
define i32 @qh_intcompare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @qh_intcompare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int hash(s)
register char *s;
{
  register int hashval = 0;
  while (*s) {
    hashval += *s++;
    hashval *= 81;
    hashval &= (256 - 1);
  }
  return hashval;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <hash+0x4b>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
imul   $0x51,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112a <hash+0x2a>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
add    %eax,%ecx
lea    (%rcx,%rcx,8),%eax
lea    (%rax,%rax,8),%eax
movzbl %al,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %19
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = load i32, i32* %3
%14 = add nsw i32 %13, %12
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = mul nsw i32 %15, 81
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = and i32 %17, 255
store i32 %18, i32* %3
br label %4
19: ; preds = %4
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = zext i8 %5 to i32
%10 = add nuw nsw i32 %6, %9
%11 = mul nuw nsw i32 %10, 81
%12 = and i32 %11, 255
%13 = load i8, i8* %8
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %12, %4 ]
ret i32 %16
}
void deallocate_Stat(struct Stat *v) {}


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

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

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

LLVM IR (-O2):
%struct.Stat = type opaque
define void @deallocate_Stat(%struct.Stat* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getCCFunctionId(char const *);
int /*<<< orphan*/ notifyControlChangeById(void *, int /*<<< orphan*/,
                                           unsigned char);
void notifyControlChangeByName(void *mcfg, const char *cfname,
                               unsigned char val) {
  notifyControlChangeById(mcfg, getCCFunctionId(cfname), val);
}


x86 assembly (clang, -O0):
<notifyControlChangeByName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getCCFunctionId@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
movzbl -0x11(%rbp),%edx
call   1040 <notifyControlChangeById@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<notifyControlChangeByName>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <getCCFunctionId@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <notifyControlChangeById@plt>

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

LLVM IR (-O2):
define void @notifyControlChangeByName(i8* %0, i8* %1, i8 zeroext %2) {
%4 = tail call i32 @getCCFunctionId(i8* %1)
%5 = tail call i32 @notifyControlChangeById(i8* %0, i32 %4, i8 zeroext %2)
ret void
}
/* Variables and functions */
int F2_cc_nu_p(double, double);
double F1_cc_nu_p(double xx, double Q2) { return F2_cc_nu_p(xx, Q2) / 2 / xx; }


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

x86 assembly (clang, -O2):
<F1_cc_nu_p>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <F2_cc_nu_p@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @F1_cc_nu_p(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @F2_cc_nu_p(double %5, double %6)
%8 = sdiv i32 %7, 2
%9 = sitofp i32 %8 to double
%10 = load double, double* %3
%11 = fdiv double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @F1_cc_nu_p(double %0, double %1) {
%3 = tail call i32 @F2_cc_nu_p(double %0, double %1)
%4 = sdiv i32 %3, 2
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, %0
ret double %6
}
int is_in(int ch, char *s) {
  while (*s)
    if (*s++ == ch)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1144 <is_in+0x44>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    -0x8(%rbp),%eax
jne    113f <is_in+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    114b <is_in+0x4b>
jmp    110b <is_in+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_in>:
movsbl (%rsi),%eax
test   %eax,%eax
je     1115 <is_in+0x15>
add    $0x1,%rsi
cmp    %edi,%eax
jne    1100 <is_in>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_in(i32 %0, i8* nocapture %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %1, %2 ], [ %8, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = sext i8 %5 to i32
%10 = icmp eq i32 %9, %0
br i1 %10, label %11, label %3
11: ; preds = %3, %7
%12 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %12
}
int ipInit(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ipInit() {
ret i32 0
}
void prune_sub1(unsigned int x) {
  int a[10];
  if (9 > x - 1) {
    a[x] = 0;
  }
}


x86 assembly (clang, -O0):
<prune_sub1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x9,%eax
cmp    %ecx,%eax
jbe    1125 <prune_sub1+0x25>
mov    -0x4(%rbp),%eax
movl   $0x0,-0x30(%rbp,%rax,4)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @prune_sub1(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub i32 %4, 1
%6 = icmp ugt i32 9, %5
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %9
store i32 0, i32* %10
br label %11
11: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @prune_sub1(i32 %0) {
ret void
}
int ft_isdigit(int c) {
  if (c >= '0' && c <= '9') {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<ft_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1127 <ft_isdigit+0x27>
cmpl   $0x39,-0x8(%rbp)
jg     1127 <ft_isdigit+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <ft_isdigit+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t p2floor(uint64_t x) {
  uint64_t y;
  while ((y = x & (x - 1)))
    x = y;
  return x;
}


x86 assembly (clang, -O0):
<p2floor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     1129 <p2floor+0x29>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <p2floor+0x7>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<p2floor>:
mov    %edi,%eax
lea    -0x1(%rax),%edi
and    %eax,%edi
jne    1100 <p2floor>
ret

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

LLVM IR (-O2):
define i32 @p2floor(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %5, %2 ]
%4 = add nsw i32 %3, -1
%5 = and i32 %4, %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
ret i32 %3
}
struct lzma *public(struct private *pz) {
  return (struct lzma *)(pz);
}


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

x86 assembly (clang, -O2):
<public>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.lzma = type opaque
%struct.private = type opaque
define %struct.lzma* @public(%struct.private* %0) {
%2 = alloca %struct.private*
store %struct.private* %0, %struct.private** %2
%3 = load %struct.private*, %struct.private** %2
%4 = bitcast %struct.private* %3 to %struct.lzma*
ret %struct.lzma* %4
}

LLVM IR (-O2):
%struct.lzma = type opaque
%struct.private = type opaque
define %struct.lzma* @public(%struct.private* readnone %0) {
%2 = bitcast %struct.private* %0 to %struct.lzma*
ret %struct.lzma* %2
}
void *destructor(void *const _self) {
  struct RESTc_OAuth2Authenticator *const self = _self;
  return self;
}


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

x86 assembly (clang, -O2):
<destructor>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.RESTc_OAuth2Authenticator = type opaque
define i8* @destructor(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.RESTc_OAuth2Authenticator*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.RESTc_OAuth2Authenticator*
store %struct.RESTc_OAuth2Authenticator* %5, %struct.RESTc_OAuth2Authenticator** %3
%6 = load %struct.RESTc_OAuth2Authenticator*, %struct.RESTc_OAuth2Authenticator** %3
%7 = bitcast %struct.RESTc_OAuth2Authenticator* %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @destructor(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
void *memcpy_backwards(void *, void *, size_t);
void *memcpy_forward(void *, void *, size_t);
void *my_memmove(void *dst, void *src, size_t n) {
  if (dst > src)
    return memcpy_backwards(dst, src, n);
  else
    return memcpy_forward(dst, src, n);
}


x86 assembly (clang, -O0):
<my_memmove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    115c <my_memmove+0x3c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <memcpy_backwards@plt>
mov    %rax,-0x8(%rbp)
jmp    1171 <my_memmove+0x51>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <memcpy_forward@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_memmove>:
cmp    %rsi,%rdi
jbe    112a <my_memmove+0xa>
jmp    1030 <memcpy_backwards@plt>
jmp    1040 <memcpy_forward@plt>

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

LLVM IR (-O2):
define i8* @my_memmove(i8* %0, i8* %1, i64 %2) {
%4 = icmp ugt i8* %0, %1
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i8* @memcpy_backwards(i8* %0, i8* %1, i64 %2)
br label %9
7: ; preds = %3
%8 = tail call i8* @memcpy_forward(i8* %0, i8* %1, i64 %2)
br label %9
9: ; preds = %7, %5
%10 = phi i8* [ %6, %5 ], [ %8, %7 ]
ret i8* %10
}
void disk_update(struct hw_device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.hw_device = type opaque
define void @disk_update(%struct.hw_device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int currentSpeed, maxSpeed;
  scanf("%d %d", &currentSpeed, &maxSpeed);
  if (currentSpeed > maxSpeed) {
    printf("violation\n");
  } else {
    printf("ok\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1160 <main+0x40>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
jmp    116c <main+0x4c>
lea    0xeaa(%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
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    (%rsp),%eax
lea    0xec6(%rip),%rax
lea    0xebc(%rip),%rdi
cmovg  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [11 x i8] c"violation\0A\00"
@.str.2 = [4 x i8] c"ok\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, 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 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@str = [3 x i8] c"ok\00"
@str.3 = [10 x i8] c"violation\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %6, %7
%9 = select i1 %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
%10 = call i32 @puts(i8* dereferenceable(1) %9)
ret i32 0
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ printf(char *, size_t, size_t);
void *Memory_calloc(size_t num, size_t size) {
  void *ptr;
  ptr = calloc(num, size);
  if (ptr != ((void *)0)) {
    return ptr;
  }
  printf("[memory.c] Could not allocate %d objects of size %d\n", num, size);
  return ((void *)0);
}


x86 assembly (clang, -O0):
<Memory_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1159 <Memory_calloc+0x39>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1175 <Memory_calloc+0x55>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Memory_calloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114a <Memory_calloc+0x2a>
lea    0xec1(%rip),%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [53 x i8] c"[memory.c] Could not allocate %d objects of size %d\0A\00"
define i8* @Memory_calloc(i64 %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %4
store i64 %1, i64* %5
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = call i8* @calloc(i64 %7, i64 %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i8*, i8** %6
store i8* %13, i8** %3
br label %18
14: ; preds = %2
%15 = load i64, i64* %4
%16 = load i64, i64* %5
%17 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i64 %15, i64 %16)
store i8* null, i8** %3
br label %18
18: ; preds = %14, %12
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@.str = [53 x i8] c"[memory.c] Could not allocate %d objects of size %d\0A\00"
define noalias i8* @Memory_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
br label %7
7: ; preds = %2, %5
ret i8* %3
}
int main(int argc, char *argv[]) {
#pragma starpu initialize
#pragma starpu shutdown foo bar
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
double stell_dust_limit(stell_mass_ratio)
double stell_mass_ratio;
{ return (200.0 * pow(stell_mass_ratio, (1.0 / 3.0))); }


x86 assembly (clang, -O0):
<stell_dust_limit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xede(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xec6(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stell_dust_limit>:
push   %rax
movsd  0xee7(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @stell_dust_limit(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, double 0x3FD5555555555555)
%5 = fmul double 2.000000e+02, %4
ret double %5
}

LLVM IR (-O2):
define double @stell_dust_limit(double %0) {
%2 = tail call double @pow(double %0, double 0x3FD5555555555555)
%3 = fmul double %2, 2.000000e+02
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char const *);
int streq(const char *s1, const char *s2) { return !strcmp(s1, s2); }


x86 assembly (clang, -O0):
<streq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streq>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @streq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @streq(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p434_divstep_precomp(uintptr_t);
void fiat_p434_divstep_precomp(uint64_t out1[7]) {
  internal_fiat_p434_divstep_precomp((uintptr_t)out1);
}


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

x86 assembly (clang, -O2):
<fiat_p434_divstep_precomp>:
jmp    1030 <internal_fiat_p434_divstep_precomp@plt>

LLVM IR (-O0):
define void @fiat_p434_divstep_precomp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i64
%5 = call i32 @internal_fiat_p434_divstep_precomp(i64 %4)
ret void
}

LLVM IR (-O2):
define void @fiat_p434_divstep_precomp(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = tail call i32 @internal_fiat_p434_divstep_precomp(i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ eembed_diy_str_to_i64(char const *, char **, int);
int64_t eembed_str_to_i64(const char *str, char **endptr, int base) {
  return eembed_diy_str_to_i64(str, endptr, base);
}


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

x86 assembly (clang, -O2):
<eembed_str_to_i64>:
jmp    1030 <eembed_diy_str_to_i64@plt>

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

LLVM IR (-O2):
define i32 @eembed_str_to_i64(i8* %0, i8** %1, i32 %2) {
%4 = tail call i32 @eembed_diy_str_to_i64(i8* %0, i8** %1, i32 %2)
ret i32 %4
}
w(float x, float y) {}


x86 assembly (clang, -O0):
<w>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @w(float %0, float %1) {
ret i32 undef
}
/* Variables and functions */
int yaffsfs_GetLastError();
int yaffs_get_error(void) { return yaffsfs_GetLastError(); }


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

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

LLVM IR (-O0):
define i32 @yaffs_get_error() {
%1 = call i32 (...) @yaffsfs_GetLastError()
ret i32 %1
}

LLVM IR (-O2):
define i32 @yaffs_get_error() {
%1 = tail call i32 (...) @yaffsfs_GetLastError()
ret i32 %1
}
int max17058_get_soc_for_otg(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @max17058_get_soc_for_otg() {
ret i32 0
}
char cast_uint_char_fast(unsigned int x) { return (char)x; }


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

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

LLVM IR (-O0):
define signext i8 @cast_uint_char_fast(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @cast_uint_char_fast(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
void file(void) {
  printf("%s, %s, %d\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/"
         "base-usage/make_study/files.c",
         __func__, 14);
}


x86 assembly (clang, -O0):
<file>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeea(%rip),%rsi
lea    0xf85(%rip),%rdx
mov    $0xe,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<file>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
lea    0xf89(%rip),%rdx
mov    $0xe,%ecx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s, %s, %d\0A\00"
@.str.1 = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/base-usage/make_study/files.c\00"
@__func__.file = [5 x i8] c"file\00"
define void @file() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.file, i64 0, i64 0), i32 14)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s, %s, %d\0A\00"
@.str.1 = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/base-usage/make_study/files.c\00"
@__func__.file = [5 x i8] c"file\00"
define void @file() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.file, i64 0, i64 0), i32 14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dropping();
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, i;
  scanf("%d", &n);
  for (i = 0; i < n; i++)
    dropping();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1167 <main+0x47>
mov    $0x0,%al
call   1040 <dropping@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1030 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1150 <main+0x30>
xor    %ebx,%ebx
nop
xor    %eax,%eax
call   1040 <dropping@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1140 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\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, 0
br i1 %5, label %6, label %12
6: ; preds = %0, %6
%7 = phi i32 [ %9, %6 ], [ 0, %0 ]
%8 = call i32 (...) @dropping()
%9 = add nuw nsw i32 %7, 1
%10 = load i32, i32* %1
%11 = icmp slt i32 %9, %10
br i1 %11, label %6, label %12
12: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
double sqrt(double);
double points_distance(double x1, double y1, double x2, double y2) {
  return sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}


x86 assembly (clang, -O0):
<points_distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
subsd  -0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<points_distance>:
subsd  %xmm0,%xmm2
subsd  %xmm1,%xmm3
mulsd  %xmm3,%xmm3
mulsd  %xmm2,%xmm2
addsd  %xmm3,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jb     1136 <points_distance+0x26>
xorps  %xmm0,%xmm0
sqrtsd %xmm2,%xmm0
ret
movapd %xmm2,%xmm0
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @points_distance(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %7
%10 = load double, double* %5
%11 = fsub double %9, %10
%12 = load double, double* %7
%13 = load double, double* %5
%14 = fsub double %12, %13
%15 = load double, double* %8
%16 = load double, double* %6
%17 = fsub double %15, %16
%18 = load double, double* %8
%19 = load double, double* %6
%20 = fsub double %18, %19
%21 = fmul double %17, %20
%22 = call double @llvm.fmuladd.f64(double %11, double %14, double %21)
%23 = call double @sqrt(double %22)
ret double %23
}

LLVM IR (-O2):
define double @points_distance(double %0, double %1, double %2, double %3) {
%5 = fsub double %2, %0
%6 = fsub double %3, %1
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %7)
%9 = tail call double @sqrt(double %8)
ret double %9
}
/* Variables and functions */
scalar_t__ floor(int /*<<< orphan*/);
int /*<<< orphan*/ log10(int);
int numcount(int integer) {
  if (integer == 0) {
    return 1;
  }
  if (integer < 0) {
    integer = integer * -1;
  }
  int count = (int)floor(log10(integer)) + 1;
  return count;
}


x86 assembly (clang, -O0):
<numcount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1141 <numcount+0x21>
movl   $0x1,-0x4(%rbp)
jmp    116d <numcount+0x4d>
cmpl   $0x0,-0x8(%rbp)
jge    1152 <numcount+0x32>
imul   $0xffffffff,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <log10@plt>
mov    %eax,%edi
call   1040 <floor@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numcount>:
test   %edi,%edi
je     1142 <numcount+0x22>
push   %rax
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
mov    %eax,%edi
call   1030 <log10@plt>
mov    %eax,%edi
call   1040 <floor@plt>
add    $0x1,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @numcount(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %21
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %3
%13 = mul nsw i32 %12, -1
store i32 %13, i32* %3
br label %14
14: ; preds = %11, %8
%15 = load i32, i32* %3
%16 = call i32 @log10(i32 %15)
%17 = call i64 @floor(i32 %16)
%18 = trunc i64 %17 to i32
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
%20 = load i32, i32* %4
store i32 %20, i32* %2
br label %21
21: ; preds = %14, %7
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @numcount(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%5 = tail call i32 @log10(i32 %4)
%6 = tail call i64 @floor(i32 %5)
%7 = trunc i64 %6 to i32
%8 = add nsw i32 %7, 1
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ %8, %3 ], [ 1, %1 ]
ret i32 %10
}
void func3() { int x = 0; }


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

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

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

LLVM IR (-O2):
define void @func3() {
ret void
}
int main(void) {
  int counter = 0;
  for (; counter < 5; counter++) {
    int a;
    a++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1133 <main+0x33>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
unsigned long getpagesize();
unsigned long read_sysfs(int, char *, unsigned long);
unsigned long read_free(unsigned long ps) {
  return read_sysfs(ps != getpagesize(),
                    "/sys/kernel/mm/hugepages/hugepages-%lukB/free_hugepages",
                    ps >> 10);
}


x86 assembly (clang, -O0):
<read_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getpagesize@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
mov    -0x8(%rbp),%rdx
shr    $0xa,%rdx
lea    0xea4(%rip),%rsi
call   1030 <read_sysfs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_free>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <getpagesize@plt>
xor    %edi,%edi
cmp    %rbx,%rax
setne  %dil
shr    $0xa,%rbx
lea    0xec1(%rip),%rsi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <read_sysfs@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"/sys/kernel/mm/hugepages/hugepages-%lukB/free_hugepages\00"
define i64 @read_free(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 (...) @getpagesize()
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
%7 = load i64, i64* %2
%8 = lshr i64 %7, 10
%9 = call i64 @read_sysfs(i32 %6, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i64 %8)
ret i64 %9
}

LLVM IR (-O2):
@.str = [56 x i8] c"/sys/kernel/mm/hugepages/hugepages-%lukB/free_hugepages\00"
define i64 @read_free(i64 %0) {
%2 = tail call i64 (...) @getpagesize()
%3 = icmp ne i64 %2, %0
%4 = zext i1 %3 to i32
%5 = lshr i64 %0, 10
%6 = tail call i64 @read_sysfs(i32 %4, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i64 %5)
ret i64 %6
}
unsigned long StartStopwatch() { return 0; }


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

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

LLVM IR (-O0):
define i64 @StartStopwatch() {
ret i64 0
}

LLVM IR (-O2):
define i64 @StartStopwatch() {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void mcxFree(void *object) {
  if (object)
    free(object);
}


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

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

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

LLVM IR (-O2):
define void @mcxFree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_message_get_priority(void *m, int64_t *priority) {
  return -EINVAL;
}


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

x86 assembly (clang, -O2):
<sd_bus_message_get_priority>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_message_get_priority(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_message_get_priority(i8* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}