xunge/DecIR huggingface dataset:
unsigned NumberOfBitsNeeded(unsigned PowerOfTwo) {
  unsigned i;
  for (i = 0;; i++) {
    if (PowerOfTwo & (1 << i))
      return i;
  }
  return 0;
}


x86 assembly (clang, -O0):
<NumberOfBitsNeeded>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     112d <NumberOfBitsNeeded+0x2d>
mov    -0x8(%rbp),%eax
pop    %rbp
ret
jmp    1132 <NumberOfBitsNeeded+0x32>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <NumberOfBitsNeeded+0xe>

x86 assembly (clang, -O2):
<NumberOfBitsNeeded>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
bt     %eax,%edi
jae    1110 <NumberOfBitsNeeded+0x10>
ret

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

LLVM IR (-O2):
define i32 @NumberOfBitsNeeded(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %7, %2 ]
%4 = shl nuw i32 1, %3
%5 = and i32 %4, %0
%6 = icmp eq i32 %5, 0
%7 = add i32 %3, 1
br i1 %6, label %2, label %8
8: ; preds = %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int dspd_strtoi64(char const *, int /*<<< orphan*/ *, int);
int dspd_strtoll(const char *str, long long *n, int base) {
  return dspd_strtoi64(str, (int64_t *)n, base);
}


x86 assembly (clang, -O0):
<dspd_strtoll>:
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 <dspd_strtoi64@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dspd_strtoll>:
jmp    1030 <dspd_strtoi64@plt>

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

LLVM IR (-O2):
define i32 @dspd_strtoll(i8* %0, i64* %1, i32 %2) {
%4 = bitcast i64* %1 to i32*
%5 = tail call i32 @dspd_strtoi64(i8* %0, i32* %4, i32 %2)
ret i32 %5
}
/* Variables and functions */
int *malloc(int);
int main() {
  volatile int *i = malloc(sizeof(int));
  *i = 34534534;
  return *i % 256;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x20ef486,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0x20ef486,(%rax)
mov    (%rax),%eax
lea    0xff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffff00,%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @malloc(i32 4)
store i32* %3, i32** %2
%4 = load i32*, i32** %2
store volatile i32 34534534, i32* %4
%5 = load i32*, i32** %2
%6 = load volatile i32, i32* %5
%7 = srem i32 %6, 256
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 4)
store volatile i32 34534534, i32* %1
%2 = load volatile i32, i32* %1
%3 = srem i32 %2, 256
ret i32 %3
}
/* Variables and functions */
float *malloc(int);
extern float *ReturnsAFloatArray() {
  float *arr = malloc(3 * sizeof(float));
  arr[0] = 1.23;
  arr[1] = 4.56;
  arr[2] = 7.89;
  return arr;
}


x86 assembly (clang, -O0):
<ReturnsAFloatArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xed6(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0xec2(%rip),%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0xead(%rip),%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReturnsAFloatArray>:
push   %rax
mov    $0xc,%edi
call   1030 <malloc@plt>
movabs $0x4091eb853f9d70a4,%rcx
eb 91 40
mov    %rcx,(%rax)
movl   $0x40fc7ae1,0x8(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define float* @ReturnsAFloatArray() {
%1 = alloca float*
%2 = call float* @malloc(i32 12)
store float* %2, float** %1
%3 = load float*, float** %1
%4 = getelementptr inbounds float, float* %3, i64 0
store float 0x3FF3AE1480000000, float* %4
%5 = load float*, float** %1
%6 = getelementptr inbounds float, float* %5, i64 1
store float 0x40123D70A0000000, float* %6
%7 = load float*, float** %1
%8 = getelementptr inbounds float, float* %7, i64 2
store float 0x401F8F5C20000000, float* %8
%9 = load float*, float** %1
ret float* %9
}

LLVM IR (-O2):
define noalias float* @ReturnsAFloatArray() {
%1 = tail call float* @malloc(i32 12)
store float 0x3FF3AE1480000000, float* %1
%2 = getelementptr inbounds float, float* %1, i64 1
store float 0x40123D70A0000000, float* %2
%3 = getelementptr inbounds float, float* %1, i64 2
store float 0x401F8F5C20000000, float* %3
ret float* %1
}
/* Type definitions */
typedef scalar_t__ uintmax_t;

/* Variables and functions */
uintmax_t __pmp_distance(uintmax_t a, uintmax_t b) {
  return a > b ? a - b : b - a;
}


x86 assembly (clang, -O0):
<__pmp_distance>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    112b <__pmp_distance+0x2b>
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1137 <__pmp_distance+0x37>
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__pmp_distance>:
mov    %rdi,%rax
sub    %rsi,%rax
neg    %rax
sub    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @__pmp_distance(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = sub nsw i64 %0, %1
%5 = sub nsw i64 %1, %0
%6 = select i1 %3, i64 %4, i64 %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void line_print() { printf("   _______________________________________\n"); }


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

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

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

LLVM IR (-O2):
@str = [43 x i8] c" _______________________________________\00"
define void @line_print() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(int);
int main(int argc, char **argv) {
  test(0x1234);
  test(0x2000);
  test(0x1fff);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1234,%edi
call   1030 <test@plt>
mov    $0x2000,%edi
call   1030 <test@plt>
mov    $0x1fff,%edi
call   1030 <test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @test(i32 4660)
%7 = call i32 @test(i32 8192)
%8 = call i32 @test(i32 8191)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test(i32 4660)
%4 = tail call i32 @test(i32 8192)
%5 = tail call i32 @test(i32 8191)
ret i32 0
}
/* Variables and functions */
char toupper(char);
void stringMaiusculo(char *string) {
  while (*string) {
    *string = toupper(*string);
    string++;
  }
}


x86 assembly (clang, -O0):
<stringMaiusculo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <stringMaiusculo+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <stringMaiusculo+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringMaiusculo>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <stringMaiusculo+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <stringMaiusculo+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @stringMaiusculo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call signext i8 @toupper(i8 signext %9)
%11 = load i8*, i8** %2
store i8 %10, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @stringMaiusculo(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @toupper(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
__attribute__((__no__)) void do_nothing_char_array_none(unsigned char *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


x86 assembly (clang, -O0):
<do_nothing_char_array_none>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x2,%rax
jbe    111b <do_nothing_char_array_none+0x1b>
jmp    1120 <do_nothing_char_array_none+0x20>
jmp    1120 <do_nothing_char_array_none+0x20>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @do_nothing_char_array_none(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = icmp ugt i64 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
define void @do_nothing_char_array_none(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char **argv) {
  write(1, "gnucc33\n", 9);
  exit(0);
  write(1, "gnucc\n", 6);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
lea    0xebe(%rip),%rsi
mov    $0x9,%edx
call   1030 <write@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
mov    $0x9,%edx
call   1030 <write@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"gnucc33\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 9)
%4 = tail call i32 @exit(i32 0)
unreachable
}
short fn1(int p1, int p2) { return p2 >= 2 ? p1 : p1 > p2; }


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     111f <fn1+0x1f>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1130 <fn1+0x30>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
xor    %eax,%eax
cmp    %esi,%edi
setg   %al
cmp    $0x2,%esi
cmovge %edi,%eax
ret

LLVM IR (-O0):
define signext i16 @fn1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sge i32 %5, 2
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32, i32* %3
br label %14
9: ; preds = %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = icmp sgt i32 %10, %11
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %9, %7
%15 = phi i32 [ %8, %7 ], [ %13, %9 ]
%16 = trunc i32 %15 to i16
ret i16 %16
}

LLVM IR (-O2):
define signext i16 @fn1(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
%4 = icmp sgt i32 %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 %0, i32 %5
%7 = trunc i32 %6 to i16
ret i16 %7
}
/* Variables and functions */
int nid_cmp(int const *, int const *);
int nid_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) {
  int const *a = a_;
  int const *b = b_;
  return nid_cmp(a, b);
}


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

x86 assembly (clang, -O2):
<nid_cmp_BSEARCH_CMP_FN>:
jmp    1030 <nid_cmp@plt>

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

LLVM IR (-O2):
define i32 @nid_cmp_BSEARCH_CMP_FN(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = tail call i32 @nid_cmp(i32* %3, i32* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ GyrCon(int);
int /*<<< orphan*/ SrvCon(int, int);
void OisEna(void) {
  SrvCon(0x00, 0x01);
  SrvCon(0x01, 0x01);
  GyrCon(0x01);
}


x86 assembly (clang, -O0):
<OisEna>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <SrvCon@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <SrvCon@plt>
mov    $0x1,%edi
call   1040 <GyrCon@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OisEna>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <SrvCon@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <SrvCon@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <GyrCon@plt>

LLVM IR (-O0):
define void @OisEna() {
%1 = call i32 @SrvCon(i32 0, i32 1)
%2 = call i32 @SrvCon(i32 1, i32 1)
%3 = call i32 @GyrCon(i32 1)
ret void
}

LLVM IR (-O2):
define void @OisEna() {
%1 = tail call i32 @SrvCon(i32 0, i32 1)
%2 = tail call i32 @SrvCon(i32 1, i32 1)
%3 = tail call i32 @GyrCon(i32 1)
ret void
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
bool list_end(const struct list *list, const struct list *node) {
  return list == node;
}


x86 assembly (clang, -O0):
<list_end>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_end>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
%struct.list = type { i32 }
define i32 @list_end(%struct.list* %0, %struct.list* %1) {
%3 = alloca %struct.list*
%4 = alloca %struct.list*
store %struct.list* %0, %struct.list** %3
store %struct.list* %1, %struct.list** %4
%5 = load %struct.list*, %struct.list** %3
%6 = load %struct.list*, %struct.list** %4
%7 = icmp eq %struct.list* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
%struct.list = type { i32 }
define i32 @list_end(%struct.list* readnone %0, %struct.list* readnone %1) {
%3 = icmp eq %struct.list* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ outop1str(char *);
void outinc() { outop1str("INC"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"INC\00"
define void @outinc() {
%1 = call i32 @outop1str(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"INC\00"
define void @outinc() {
%1 = tail call i32 @outop1str(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
char *strcpy(char *destination, const char *source) {
  while (*source != 0)
    *(destination++) = *(source++);
  return destination;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1143 <strcpy+0x43>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    110c <strcpy+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1121 <strcpy+0x21>
add    $0x1,%rsi
nopl   (%rax)
mov    %cl,(%rax)
add    $0x1,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %6, i8* %8
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
ret i8* %14
}
void block(int useless) {}


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

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

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

LLVM IR (-O2):
define void @block(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("step_table <wheel diameter> <steps> <max speed> <acceleration "
         "duration>\n"
         "\n"
         " wheel diameter        : Wheel diameter in centimeters.\n"
         " steps                 : Number of steps for one rotation.\n"
         " max speed             : Maximum speed in meters/second.\n"
         " acceleration duration : Time to reach the maximum speed, in "
         "seconds.\n");
}


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

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

LLVM IR (-O0):
@.str = [316 x i8] c"step_table <wheel diameter> <steps> <max speed> <acceleration duration>\0A\0A wheel diameter : Wheel diameter in centimeters.\0A steps : Number of steps for one rotation.\0A max speed : Maximum speed in meters/second.\0A acceleration duration : Time to reach the maximum speed, in seconds.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([316 x i8], [316 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [315 x i8] c"step_table <wheel diameter> <steps> <max speed> <acceleration duration>\0A\0A wheel diameter : Wheel diameter in centimeters.\0A steps : Number of steps for one rotation.\0A max speed : Maximum speed in meters/second.\0A acceleration duration : Time to reach the maximum speed, in seconds.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([315 x i8], [315 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned int unpacki16(unsigned char *buf) { return (buf[0] << 8) | buf[1]; }


x86 assembly (clang, -O0):
<unpacki16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpacki16>:
movzwl (%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @unpacki16(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @unpacki16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
/* Variables and functions */
int yahoo_M1ObfuscatedTableCommon(int, int, unsigned char *);
int yahoo_f01_26(int Salt, int Parameter) {
  static unsigned char LUT[32] = {
      0x0D, 0x0B, 0x11, 0x02, 0x05, 0x1B, 0x08, 0x1D, 0x04, 0x14, 0x01,
      0x09, 0x00, 0x19, 0x1E, 0x15, 0x1F, 0x0A, 0x0F, 0x1C, 0x10, 0x16,
      0x0C, 0x07, 0x13, 0x1A, 0x06, 0x17, 0x0E, 0x12, 0x18, 0x03,
  };
  return yahoo_M1ObfuscatedTableCommon(Salt, Parameter, LUT);
}


x86 assembly (clang, -O0):
<yahoo_f01_26>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    0x2f05(%rip),%rdx
call   1030 <yahoo_M1ObfuscatedTableCommon@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_26>:
lea    0x2f19(%rip),%rdx
jmp    1030 <yahoo_M1ObfuscatedTableCommon@plt>

LLVM IR (-O0):
@yahoo_f01_26.LUT = internal global [32 x i8] c"\0D\0B\11\02\05\1B\08\1D\04\14\01\09\00\19\1E\15\1F\0A\0F\1C\10\16\0C\07\13\1A\06\17\0E\12\18\03"
define i32 @yahoo_f01_26(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 @yahoo_M1ObfuscatedTableCommon(i32 %5, i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_26.LUT, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@yahoo_f01_26.LUT = internal global [32 x i8] c"\0D\0B\11\02\05\1B\08\1D\04\14\01\09\00\19\1E\15\1F\0A\0F\1C\10\16\0C\07\13\1A\06\17\0E\12\18\03"
define i32 @yahoo_f01_26(i32 %0, i32 %1) {
%3 = tail call i32 @yahoo_M1ObfuscatedTableCommon(i32 %0, i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_26.LUT, i64 0, i64 0))
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
int _mm_read_str(char *buffer, int number, FILE *fp) {
  fread(buffer, 1, number, fp);
  return !feof(fp);
}


x86 assembly (clang, -O0):
<_mm_read_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
mov    -0x18(%rbp),%rdi
call   1040 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_read_str>:
push   %rbx
mov    %rdx,%rbx
mov    %esi,%edx
mov    $0x1,%esi
mov    %rbx,%rcx
call   1030 <fread@plt>
mov    %rbx,%rdi
call   1040 <feof@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_mm_read_str(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32*, i32** %6
%10 = call i32 @fread(i8* %7, i32 1, i32 %8, i32* %9)
%11 = load i32*, i32** %6
%12 = call i32 @feof(i32* %11)
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @_mm_read_str(i8* nocapture %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32 @fread(i8* %0, i32 1, i32 %1, i32* %2)
%5 = tail call i32 @feof(i32* %2)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ chkbuf;

/* Variables and functions */
int memcmp_aml(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ sha2_get(unsigned char *, unsigned char const *, int);
int sha2_check(unsigned char verify[32], const unsigned char *pbuff, int nLen) {
  unsigned char chkbuf[32];
  sha2_get(chkbuf, pbuff, nLen);
  return memcmp_aml(verify, chkbuf, sizeof(chkbuf));
}


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

x86 assembly (clang, -O2):
<sha2_check>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sha2_get@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x20,%edx
call   1030 <memcmp_aml@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @sha2_check(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [32 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @sha2_get(i8* %8, i8* %9, i32 %10)
%12 = load i8*, i8** %4
%13 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%14 = call i32 @memcmp_aml(i8* %12, i8* %13, i32 32)
ret i32 %14
}

LLVM IR (-O2):
define i32 @sha2_check(i8* %0, i8* %1, i32 %2) {
%4 = alloca [32 x i8]
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%6 = call i32 @sha2_get(i8* %5, i8* %1, i32 %2)
%7 = call i32 @memcmp_aml(i8* %0, i8* %5, i32 32)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ testFree();
int /*<<< orphan*/ testGet();
int /*<<< orphan*/ testNew();
int /*<<< orphan*/ testSet();
int main(int argc, char **argv) {
  testNew();
  testFree();
  testSet();
  testGet();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <testNew@plt>
mov    $0x0,%al
call   1060 <testFree@plt>
mov    $0x0,%al
call   1040 <testSet@plt>
mov    $0x0,%al
call   1030 <testGet@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <testNew@plt>
xor    %eax,%eax
call   1060 <testFree@plt>
xor    %eax,%eax
call   1040 <testSet@plt>
xor    %eax,%eax
call   1030 <testGet@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @testNew()
%6 = call i32 (...) @testFree()
%7 = call i32 (...) @testSet()
%8 = call i32 (...) @testGet()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @testNew()
%4 = tail call i32 (...) @testFree()
%5 = tail call i32 (...) @testSet()
%6 = tail call i32 (...) @testGet()
ret i32 0
}
XQueryColor() {}


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

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

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

LLVM IR (-O2):
define i32 @XQueryColor() {
ret i32 undef
}
int main(int argc, char *argv[]) {
  short i = 1, j = 2, k;
  asm volatile("nop" ::"a"(i));
  asm volatile("nop" ::"b"(j));
  asm volatile("add %eax,%ebx");
  asm volatile("nop" : "=b"(k));
  asm volatile("emms");
  printf(" %3d + %3d = %3d\n", i, j, k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x18,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movw   $0x1,-0x1a(%rbp)
movw   $0x2,-0x1c(%rbp)
mov    -0x1a(%rbp),%ax
nop
mov    -0x1c(%rbp),%bx
nop
add    %eax,%ebx
nop
mov    %bx,-0x1e(%rbp)
emms
movswl -0x1a(%rbp),%esi
movswl -0x1c(%rbp),%edx
movswl -0x1e(%rbp),%ecx
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%ax
nop
mov    $0x2,%bx
nop
add    %eax,%ebx
nop
emms
movswl %bx,%ecx
lea    0xed6(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c" %3d + %3d = %3d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i16
%7 = alloca i16
%8 = alloca i16
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i16 1, i16* %6
store i16 2, i16* %7
%9 = load i16, i16* %6
%10 = load i16, i16* %7
%11 = call i16 asm sideeffect "nop", "={bx},~{dirflag},~{fpsr},~{flags}"()
store i16 %11, i16* %8
%12 = load i16, i16* %6
%13 = sext i16 %12 to i32
%14 = load i16, i16* %7
%15 = sext i16 %14 to i32
%16 = load i16, i16* %8
%17 = sext i16 %16 to i32
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %15, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c" %3d + %3d = %3d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
tail call void asm sideeffect "nop", "{ax},~{dirflag},~{fpsr},~{flags}"(i16 1)
tail call void asm sideeffect "nop", "{bx},~{dirflag},~{fpsr},~{flags}"(i16 2)
tail call void asm sideeffect "add %eax,%ebx", "~{dirflag},~{fpsr},~{flags}"()
%3 = tail call i16 asm sideeffect "nop", "={bx},~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "emms", "~{dirflag},~{fpsr},~{flags}"()
%4 = sext i16 %3 to i32
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned long, unsigned long,
                           unsigned long, unsigned long);
unsigned int Int2IP(unsigned long ip, char *str) {
  unsigned long ip1, ip2, ip3, ip4;
  ip1 = (ip & 0xff000000) >> 24;
  ip2 = (ip & 0x00ff0000) >> 16;
  ip3 = (ip & 0x0000ff00) >> 8;
  ip4 = ip & 0x000000ff;
  sprintf(str, "%lu.%lu.%lu.%lu", ip1, ip2, ip3, ip4);
  return 1;
}


x86 assembly (clang, -O0):
<Int2IP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0xff000000,%rax
and    -0x8(%rbp),%rax
shr    $0x18,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff0000,%rax
shr    $0x10,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff00,%rax
shr    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
lea    0xe7d(%rip),%rsi
call   1030 <sprintf@plt>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int2IP>:
push   %rbx
mov    %rsi,%rax
mov    %rdi,%rdx
mov    %edx,%ecx
movzbl %dh,%ebx
movzbl %dl,%r9d
shr    $0x18,%edx
shr    $0x10,%ecx
movzbl %cl,%ecx
lea    0xed0(%rip),%rsi
mov    %rax,%rdi
mov    %rbx,%r8
call   1030 <sprintf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"%lu.%lu.%lu.%lu\00"
define i32 @Int2IP(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %3
store i8* %1, i8** %4
%9 = load i64, i64* %3
%10 = and i64 %9, 4278190080
%11 = lshr i64 %10, 24
store i64 %11, i64* %5
%12 = load i64, i64* %3
%13 = and i64 %12, 16711680
%14 = lshr i64 %13, 16
store i64 %14, i64* %6
%15 = load i64, i64* %3
%16 = and i64 %15, 65280
%17 = lshr i64 %16, 8
store i64 %17, i64* %7
%18 = load i64, i64* %3
%19 = and i64 %18, 255
store i64 %19, i64* %8
%20 = load i8*, i8** %4
%21 = load i64, i64* %5
%22 = load i64, i64* %6
%23 = load i64, i64* %7
%24 = load i64, i64* %8
%25 = call i32 @sprintf(i8* %20, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %21, i64 %22, i64 %23, i64 %24)
ret i32 1
}

LLVM IR (-O2):
@.str = [16 x i8] c"%lu.%lu.%lu.%lu\00"
define i32 @Int2IP(i64 %0, i8* nocapture writeonly %1) {
%3 = lshr i64 %0, 24
%4 = and i64 %3, 255
%5 = lshr i64 %0, 16
%6 = and i64 %5, 255
%7 = lshr i64 %0, 8
%8 = and i64 %7, 255
%9 = and i64 %0, 255
%10 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %4, i64 %6, i64 %8, i64 %9)
ret i32 1
}
int test2() {
  int x = 0;
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @test2() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int socketcall(int (*)(int, int, int, void *, int /*<<< orphan*/ *), int, int,
               int, void *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int getsockopt(int fd, int level, int optname, void *restrict optval,
               socklen_t *restrict optlen) {
  return socketcall(getsockopt, fd, level, optname, optval, optlen, 0);
}


x86 assembly (clang, -O0):
<getsockopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    0x2eaf(%rip),%rdi
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <socketcall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getsockopt>:
push   %rax
mov    %r8,%r9
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
movl   $0x0,(%rsp)
mov    0x2ec5(%rip),%rdi
call   1030 <socketcall@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getsockopt(i32 %0, i32 %1, i32 %2, i8* noalias %3, i32* noalias %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i32*, i32** %10
%16 = call i32 @socketcall(i32 (i32, i32, i32, i8*, i32*)* @getsockopt, i32 %11, i32 %12, i32 %13, i8* %14, i32* %15, i32 0)
ret i32 %16
}

LLVM IR (-O2):
define i32 @getsockopt(i32 %0, i32 %1, i32 %2, i8* noalias %3, i32* noalias %4) {
%6 = tail call i32 @socketcall(i32 (i32, i32, i32, i8*, i32*)* @getsockopt, i32 %0, i32 %1, i32 %2, i8* %3, i32* %4, i32 0)
ret i32 %6
}
float precio_actualizado(float precio, int edad) {
  float r = 0;
  if (edad > 6)
    r = precio;
  if (edad < 6 && edad >= 2)
    r = precio * 0.5;
  if (edad < 2)
    r = 0;
  return r;
}


x86 assembly (clang, -O0):
<precio_actualizado>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
cmpl   $0x6,-0x8(%rbp)
jle    1128 <precio_actualizado+0x28>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    115a <precio_actualizado+0x5a>
cmpl   $0x2,-0x8(%rbp)
jl     115a <precio_actualizado+0x5a>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb3(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    116c <precio_actualizado+0x6c>
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<precio_actualizado>:
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
movaps %xmm1,%xmm2
cmp    $0x7,%edi
jge    1111 <precio_actualizado+0x11>
xorps  %xmm2,%xmm2
lea    -0x2(%rdi),%eax
cmp    $0x4,%eax
jb     111f <precio_actualizado+0x1f>
cmp    $0x2,%edi
jge    112f <precio_actualizado+0x2f>
ret
mulss  0xed9(%rip),%xmm1
movaps %xmm1,%xmm2
cmp    $0x2,%edi
jl     111e <precio_actualizado+0x1e>
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @precio_actualizado(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca float
store float %0, float* %3
store i32 %1, i32* %4
store float 0.000000e+00, float* %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
store float %9, float* %5
br label %10
10: ; preds = %8, %2
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 6
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp sge i32 %14, 2
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = load float, float* %3
%18 = fpext float %17 to double
%19 = fmul double %18, 5.000000e-01
%20 = fptrunc double %19 to float
store float %20, float* %5
br label %21
21: ; preds = %16, %13, %10
%22 = load i32, i32* %4
%23 = icmp slt i32 %22, 2
br i1 %23, label %24, label %25
24: ; preds = %21
store float 0.000000e+00, float* %5
br label %25
25: ; preds = %24, %21
%26 = load float, float* %5
ret float %26
}

LLVM IR (-O2):
define float @precio_actualizado(float %0, i32 %1) {
%3 = icmp sgt i32 %1, 6
%4 = select i1 %3, float %0, float 0.000000e+00
%5 = add i32 %1, -2
%6 = icmp ult i32 %5, 4
%7 = fmul float %0, 5.000000e-01
%8 = select i1 %6, float %7, float %4
%9 = icmp slt i32 %1, 2
%10 = select i1 %9, float 0.000000e+00, float %8
ret float %10
}
int palindromic(char *number) {
  int numberLength = 6;
  int i;
  for (i = 0; i <= numberLength / 2; i++) {
    if (number[i] != number[numberLength - 1 - i])
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<palindromic>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x6,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
cmp    %ecx,%eax
jg     117b <palindromic+0x7b>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
sub    -0x18(%rbp),%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1168 <palindromic+0x68>
movl   $0x0,-0x4(%rbp)
jmp    1182 <palindromic+0x82>
jmp    116d <palindromic+0x6d>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1116 <palindromic+0x16>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<palindromic>:
mov    (%rdi),%cl
xor    %eax,%eax
cmp    0x5(%rdi),%cl
jne    111c <palindromic+0x1c>
mov    0x1(%rdi),%cl
cmp    0x4(%rdi),%cl
jne    111c <palindromic+0x1c>
mov    0x2(%rdi),%cl
xor    %eax,%eax
cmp    0x3(%rdi),%cl
sete   %al
ret

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

LLVM IR (-O2):
define i32 @palindromic(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 5
%4 = load i8, i8* %3
%5 = icmp eq i8 %2, %4
br i1 %5, label %6, label %19
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %0, i64 4
%10 = load i8, i8* %9
%11 = icmp eq i8 %8, %10
br i1 %11, label %12, label %19
12: ; preds = %6
%13 = getelementptr inbounds i8, i8* %0, i64 2
%14 = load i8, i8* %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = icmp eq i8 %14, %16
%18 = zext i1 %17 to i32
br label %19
19: ; preds = %12, %6, %1
%20 = phi i32 [ 0, %1 ], [ 0, %6 ], [ %18, %12 ]
ret i32 %20
}
/* Variables and functions */
scalar_t__ M_PI;
float rad2deg(float rad) { return rad / 2.0F / (float)M_PI * 360.0F; }


x86 assembly (clang, -O0):
<rad2deg>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeee(%rip),%xmm1
divss  %xmm1,%xmm0
mov    0x2ec7(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
movss  0xece(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rad2deg>:
mulss  0xef8(%rip),%xmm0
mov    0x2ed9(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
mulss  0xee4(%rip),%xmm0
ret

LLVM IR (-O0):
@M_PI = global i64 0
define float @rad2deg(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fdiv float %3, 2.000000e+00
%5 = load i64, i64* @M_PI
%6 = sitofp i64 %5 to float
%7 = fdiv float %4, %6
%8 = fmul float %7, 3.600000e+02
ret float %8
}

LLVM IR (-O2):
@M_PI = global i64 0
define float @rad2deg(float %0) {
%2 = fmul float %0, 5.000000e-01
%3 = load i64, i64* @M_PI
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
%6 = fmul float %5, 3.600000e+02
ret float %6
}
float sign(float num) {
  if (num > 0)
    return 1;
  if (num < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    112c <sign+0x2c>
movss  0xee2(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1153 <sign+0x53>
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    114b <sign+0x4b>
movss  0xebf(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1153 <sign+0x53>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
xorps  %xmm1,%xmm1
movaps %xmm0,%xmm2
cmpltss %xmm1,%xmm2
movss  0xeed(%rip),%xmm3
andps  %xmm2,%xmm3
cmpltss %xmm0,%xmm1
movss  0xee1(%rip),%xmm0
andps  %xmm1,%xmm0
andnps %xmm3,%xmm1
orps   %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @sign(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = fcmp olt float %0, 0.000000e+00
%4 = select i1 %3, float -1.000000e+00, float 0.000000e+00
%5 = select i1 %2, float 1.000000e+00, float %4
ret float %5
}
/* Variables and functions */
bool win() { return true; }


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

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

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

LLVM IR (-O2):
define i32 @win() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Emit1(int);
void emit_pushad(void) { Emit1(0x60); }


x86 assembly (clang, -O0):
<emit_pushad>:
push   %rbp
mov    %rsp,%rbp
mov    $0x60,%edi
call   1030 <Emit1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_pushad>:
mov    $0x60,%edi
jmp    1030 <Emit1@plt>

LLVM IR (-O0):
define void @emit_pushad() {
%1 = call i32 @Emit1(i32 96)
ret void
}

LLVM IR (-O2):
define void @emit_pushad() {
%1 = tail call i32 @Emit1(i32 96)
ret void
}