xunge/DecIR huggingface dataset:
/* Variables and functions */
int DoVprintf(char *, void *);
int /*<<< orphan*/ Fail(char *, int, int);
int strlen(char *);
void DoPointerTest(char *formatstr, void *param, char *paramstr,
                   char *checkstr1) {
  int ret;
  ret = DoVprintf(formatstr, param);
  if (ret != strlen(checkstr1)) {
    Fail("Expected vprintf to return %d, got %d.\n", strlen(checkstr1), ret);
  }
}


x86 assembly (clang, -O0):
<DoPointerTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <DoVprintf@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
cmp    %ecx,%eax
je     118e <DoPointerTest+0x5e>
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x24(%rbp),%edx
lea    0xe77(%rip),%rdi
call   1050 <Fail@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoPointerTest>:
push   %rbp
push   %rbx
push   %rax
mov    %rcx,%rbx
call   1040 <DoVprintf@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    %eax,%ebp
jne    1150 <DoPointerTest+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <Fail@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Expected vprintf to return %d, got %d.\0A\00"
define void @DoPointerTest(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = call i32 @DoVprintf(i8* %10, i8* %11)
store i32 %12, i32* %9
%13 = load i32, i32* %9
%14 = load i8*, i8** %8
%15 = call i32 @strlen(i8* %14)
%16 = icmp ne i32 %13, %15
br i1 %16, label %17, label %22
17: ; preds = %4
%18 = load i8*, i8** %8
%19 = call i32 @strlen(i8* %18)
%20 = load i32, i32* %9
%21 = call i32 @Fail(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %19, i32 %20)
br label %22
22: ; preds = %17, %4
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Expected vprintf to return %d, got %d.\0A\00"
define void @DoPointerTest(i8* %0, i8* %1, i8* nocapture readnone %2, i8* %3) {
%5 = tail call i32 @DoVprintf(i8* %0, i8* %1)
%6 = tail call i32 @strlen(i8* %3)
%7 = icmp eq i32 %5, %6
br i1 %7, label %11, label %8
8: ; preds = %4
%9 = tail call i32 @strlen(i8* %3)
%10 = tail call i32 @Fail(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %5)
br label %11
11: ; preds = %8, %4
ret void
}
int intcmp(const void *p1, const void *p2) {
  int i1 = *(int *)p1;
  int i2 = *(int *)p2;
  if (i1 > i2)
    return 1;
  else if (i1 < i2)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<intcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    1136 <intcmp+0x36>
movl   $0x1,-0x4(%rbp)
jmp    115a <intcmp+0x5a>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    114e <intcmp+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <intcmp+0x5a>
jmp    1153 <intcmp+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intcmp>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setl   %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @intcmp(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 = icmp sgt i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fill_rect(int /*<<< orphan*/, int /*<<< orphan*/, int, int,
                             unsigned int);
void clear_display(unsigned int color) {
  int i;
  fill_rect(0, 0, 640, 480, color);
}


x86 assembly (clang, -O0):
<clear_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%r8d
xor    %esi,%esi
mov    $0x280,%edx
mov    $0x1e0,%ecx
mov    %esi,%edi
call   1030 <fill_rect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_display>:
mov    %edi,%r8d
xor    %edi,%edi
xor    %esi,%esi
mov    $0x280,%edx
mov    $0x1e0,%ecx
jmp    1030 <fill_rect@plt>

LLVM IR (-O0):
define void @clear_display(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @fill_rect(i32 0, i32 0, i32 640, i32 480, i32 %4)
ret void
}

LLVM IR (-O2):
define void @clear_display(i32 %0) {
%2 = tail call i32 @fill_rect(i32 0, i32 0, i32 640, i32 480, i32 %0)
ret void
}
void foo_1_2_1_1_2_2_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_1_1_2_2_1_1_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void sn(int n) { assert(n < 2047); }


x86 assembly (clang, -O0):
<sn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x7ff,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sn>:
xor    %eax,%eax
cmp    $0x7ff,%edi
setl   %al
mov    %eax,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @sn(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 2047
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
ret void
}

LLVM IR (-O2):
define void @sn(i32 %0) {
%2 = icmp slt i32 %0, 2047
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, int);
int I2C_open(uint8_t bus) {
  char device[20];
  sprintf(device, "/dev/i2c-%d", bus);
  return open(device, O_RDWR, 0);
}


x86 assembly (clang, -O0):
<I2C_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x20(%rbp),%rdi
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <open@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2C_open>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <open@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"/dev/i2c-%d\00"
@O_RDWR = global i32 0
define i32 @I2C_open(i32 %0) {
%2 = alloca i32
%3 = alloca [20 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%8 = load i32, i32* @O_RDWR
%9 = call i32 @open(i8* %7, i32 %8, i32 0)
ret i32 %9
}

LLVM IR (-O2):
@.str = [12 x i8] c"/dev/i2c-%d\00"
@O_RDWR = global i32 0
define i32 @I2C_open(i32 %0) {
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = load i32, i32* @O_RDWR
%6 = call i32 @open(i8* %3, i32 %5, i32 0)
ret i32 %6
}
long long llrintl(long double x) {
  long long retval;
  __asm__ __volatile__("fistpll %0" : "=m"(retval) : "t"(x) : "st");
  return retval;
}


x86 assembly (clang, -O0):
<llrintl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fistpll -0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<llrintl>:
fldt   0x8(%rsp)
fistpll -0x8(%rsp)
mov    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @llrintl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca i64
store x86_fp80 %0, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @llrintl(x86_fp80 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = load i64, i64* %2
ret i64 %4
}
/* Variables and functions */
int g(int);
int f(int n) {
  switch (n) {
  case 0:
    n++;
    if (n == 1)
      break;
    return 3;
  case 1:
    return 0;
  default:
    break;
  };
  return g(n);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     113f <f+0x2f>
jmp    112e <f+0x1e>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1163 <f+0x53>
jmp    116f <f+0x5f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1157 <f+0x47>
jmp    1174 <f+0x64>
movl   $0x3,-0x4(%rbp)
jmp    117f <f+0x6f>
movl   $0x0,-0x4(%rbp)
jmp    117f <f+0x6f>
jmp    1174 <f+0x64>
mov    -0x8(%rbp),%edi
call   1030 <g@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    $0x1,%edi
je     1123 <f+0x13>
test   %edi,%edi
jne    111e <f+0xe>
mov    $0x1,%edi
jmp    1030 <g@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
switch i32 %0, label %3 [
i32 0, label %2
i32 1, label %6
]
2: ; preds = %1
br label %3
3: ; preds = %2, %1
%4 = phi i32 [ %0, %1 ], [ 1, %2 ]
%5 = tail call i32 @g(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
float log(float);
int rand();
float erandom(float mean) {
  float r;
  do {
    r = ((rand() & 0x7fff) / ((float)0x7fff));
  } while (r == 0.0);
  return -mean * log(r);
}


x86 assembly (clang, -O0):
<erandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
and    $0x7fff,%eax
cvtsi2ss %eax,%xmm0
movss  0xebb(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    116f <erandom+0x4f>
jp     116f <erandom+0x4f>
jmp    112d <erandom+0xd>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erandom>:
sub    $0x18,%rsp
movaps %xmm0,(%rsp)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rand@plt>
and    $0x7fff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  0xeb5(%rip),%xmm0
ucomiss 0xeb2(%rip),%xmm0
jne    1156 <erandom+0x36>
jnp    1130 <erandom+0x10>
movaps (%rsp),%xmm1
xorps  0xeaf(%rip),%xmm1
movaps %xmm1,(%rsp)
call   1030 <log@plt>
mulss  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @erandom(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
br label %4
4: ; preds = %9, %1
%5 = call i32 (...) @rand()
%6 = and i32 %5, 32767
%7 = sitofp i32 %6 to float
%8 = fdiv float %7, 3.276700e+04
store float %8, float* %3
br label %9
9: ; preds = %4
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = fcmp oeq double %11, 0.000000e+00
br i1 %12, label %4, label %13
13: ; preds = %9
%14 = load float, float* %2
%15 = fneg float %14
%16 = load float, float* %3
%17 = call float @log(float %16)
%18 = fmul float %15, %17
ret float %18
}

LLVM IR (-O2):
define float @erandom(float %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 (...) @rand()
%4 = and i32 %3, 32767
%5 = sitofp i32 %4 to float
%6 = fdiv float %5, 3.276700e+04
%7 = fcmp oeq float %6, 0.000000e+00
br i1 %7, label %2, label %8
8: ; preds = %2
%9 = fneg float %0
%10 = tail call float @log(float %6)
%11 = fmul float %10, %9
ret float %11
}
/* Variables and functions */
scalar_t__ j0f(float);
int /*<<< orphan*/ link_failure_j0f();
void test_j0f(float f) {
  if (j0f(f) != j0f(f))
    link_failure_j0f();
}


x86 assembly (clang, -O0):
<test_j0f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <j0f@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <j0f@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_j0f+0x3c>
mov    $0x0,%al
call   1030 <link_failure_j0f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_j0f>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <j0f@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1040 <j0f@plt>
cmp    %rax,%rbx
jne    1149 <test_j0f+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_j0f@plt>

LLVM IR (-O0):
define void @test_j0f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @j0f(float %3)
%5 = load float, float* %2
%6 = call i64 @j0f(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_j0f()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_j0f(float %0) {
%2 = tail call i64 @j0f(float %0)
%3 = tail call i64 @j0f(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_j0f()
br label %7
7: ; preds = %5, %1
ret void
}
void foo723() {}


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

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

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

LLVM IR (-O2):
define void @foo723() {
ret void
}
/* Variables and functions */
int atoi(char *);
int main(int argc, char const *argv[]) {
  char str[] = "12abc";
  if (atoi(str) != 12) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed4(%rip),%eax
mov    %eax,-0x16(%rbp)
mov    0xece(%rip),%ax
mov    %ax,-0x12(%rbp)
lea    -0x16(%rbp),%rdi
call   1030 <atoi@plt>
cmp    $0xc,%eax
je     1158 <main+0x48>
movl   $0x1,-0x4(%rbp)
jmp    115f <main+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <atoi@plt>
xor    %ecx,%ecx
cmp    $0xc,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@__const.main.str = [6 x i8] c"12abc\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @atoi(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__const.main.str, i64 0, i64 0))
%4 = icmp ne i32 %3, 12
%5 = zext i1 %4 to i32
ret i32 %5
}
int tolower(int c) { return (64 < c && c < 91) ? c + 32 : c; }


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x40,%eax
cmp    -0x4(%rbp),%eax
jge    112d <tolower+0x2d>
cmpl   $0x5b,-0x4(%rbp)
jge    112d <tolower+0x2d>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <tolower+0x33>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
int series(int a) {
  if (a <= 0) {
    return 0;
  } else {
    return a + series(a - 1);
  }
}


x86 assembly (clang, -O0):
<series>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1131 <series+0x21>
movl   $0x0,-0x4(%rbp)
jmp    114c <series+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <series@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<series>:
test   %edi,%edi
jle    1119 <series+0x19>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
imul   %eax,%eax
shr    %rcx
add    %edi,%eax
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @series(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = mul i32 %4, %4
%6 = zext i32 %4 to i33
%7 = add nsw i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %5, %0
%13 = sub i32 %12, %11
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ copia();
int obtenlinea();
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  int longitud;
  extern int max;
  extern char linea_max[1000];
  while ((longitud = obtenlinea()) > 0)
    if (longitud > 80) {
      copia();
      printf("%s", linea_max);
    }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <obtenlinea@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    117b <main+0x4b>
cmpl   $0x50,-0x8(%rbp)
jle    1176 <main+0x46>
mov    $0x0,%al
call   1040 <copia@plt>
lea    0xe96(%rip),%rdi
mov    0x2e6f(%rip),%rsi
call   1050 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <obtenlinea@plt>
test   %eax,%eax
jle    1174 <main+0x44>
lea    0xeba(%rip),%r14
mov    0x2e93(%rip),%rbx
jmp    115b <main+0x2b>
nop
xor    %eax,%eax
call   1030 <obtenlinea@plt>
test   %eax,%eax
jle    1174 <main+0x44>
cmp    $0x51,%eax
jb     1150 <main+0x20>
xor    %eax,%eax
call   1040 <copia@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
jmp    1150 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@linea_max = external global [1000 x i8]
define i32 @main() {
%1 = tail call i32 (...) @obtenlinea()
%2 = icmp sgt i32 %1, 0
br i1 %2, label %3, label %12
3: ; preds = %0, %9
%4 = phi i32 [ %10, %9 ], [ %1, %0 ]
%5 = icmp ugt i32 %4, 80
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 (...) @copia()
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1000 x i8], [1000 x i8]* @linea_max, i64 0, i64 0))
br label %9
9: ; preds = %6, %3
%10 = tail call i32 (...) @obtenlinea()
%11 = icmp sgt i32 %10, 0
br i1 %11, label %3, label %12
12: ; preds = %9, %0
ret i32 0
}
void RTStrmClose(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrmClose() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int convert_float_to_byte(float *float_data, uint8_t *byte_data) {
  memcpy(byte_data, (uint8_t *)float_data, sizeof(float));
  return sizeof(float);
}


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

x86 assembly (clang, -O2):
<convert_float_to_byte>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @convert_float_to_byte(float* %0, i32* %1) {
%3 = alloca float*
%4 = alloca i32*
store float* %0, float** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load float*, float** %3
%7 = bitcast float* %6 to i32*
%8 = call i32 @memcpy(i32* %5, i32* %7, i32 4)
ret i32 4
}

LLVM IR (-O2):
define i32 @convert_float_to_byte(float* %0, i32* %1) {
%3 = bitcast float* %0 to i32*
%4 = tail call i32 @memcpy(i32* %1, i32* %3, i32 4)
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ check_vect();
int /*<<< orphan*/ main1(int *);
int main(void) {
  int a[16] __attribute__((__aligned__(16)));
  check_vect();
  main1(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <check_vect@plt>
lea    -0x50(%rbp),%rdi
call   1040 <main1@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
xor    %eax,%eax
call   1030 <check_vect@plt>
mov    %rsp,%rdi
call   1040 <main1@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i32]
store i32 0, i32* %1
%3 = call i32 (...) @check_vect()
%4 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%5 = call i32 @main1(i32* %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [16 x i32]
%2 = bitcast [16 x i32]* %1 to i8*
%3 = tail call i32 (...) @check_vect()
%4 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%5 = call i32 @main1(i32* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glutAddMenuEntry(char *, int);
int /*<<< orphan*/ sprintf(char *, char *, int);
void createTransparencyMenu(void) {
  char label[20];
  int i;
  for (i = 0; i < 17; i++) {
    sprintf(label, "%d%% opaque", i * 100 / 16);
    glutAddMenuEntry(label, i);
  }
}


x86 assembly (clang, -O0):
<createTransparencyMenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x24(%rbp)
cmpl   $0x11,-0x24(%rbp)
jge    1171 <createTransparencyMenu+0x51>
lea    -0x20(%rbp),%rdi
imul   $0x64,-0x24(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
lea    0xeae(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <glutAddMenuEntry@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    112f <createTransparencyMenu+0xf>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createTransparencyMenu>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
xor    %ebx,%ebx
lea    0xecd(%rip),%r14
mov    %rsp,%r15
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edx
shr    $0x4,%edx
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <sprintf@plt>
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <glutAddMenuEntry@plt>
add    $0x1,%ebp
add    $0x64,%ebx
cmp    $0x11,%ebp
jne    1140 <createTransparencyMenu+0x20>
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d%% opaque\00"
define void @createTransparencyMenu() {
%1 = alloca [20 x i8]
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %15, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 17
br i1 %5, label %6, label %18
6: ; preds = %3
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%8 = load i32, i32* %2
%9 = mul nsw i32 %8, 100
%10 = sdiv i32 %9, 16
%11 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%13 = load i32, i32* %2
%14 = call i32 @glutAddMenuEntry(i8* %12, i32 %13)
br label %15
15: ; preds = %6
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %3
18: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d%% opaque\00"
define void @createTransparencyMenu() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %9, %3 ]
%5 = mul nuw nsw i32 %4, 100
%6 = lshr i32 %5, 4
%7 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @glutAddMenuEntry(i8* %2, i32 %4)
%9 = add nuw nsw i32 %4, 1
%10 = icmp eq i32 %9, 17
br i1 %10, label %11, label %3
11: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bubble_sort(int *, int);
int /*<<< orphan*/ fillArray(int, char **, int *, int);
int main(int argc, char *argv[]) {
  int a[20];
  fillArray(argc, argv, a, argc - 1);
  bubble_sort(a, argc - 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x60(%rbp),%rdx
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
call   1030 <fillArray@plt>
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
call   1040 <bubble_sort@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x58,%rsp
lea    -0x1(%rdi),%ebx
mov    %rsp,%r14
mov    %r14,%rdx
mov    %ebx,%ecx
call   1030 <fillArray@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <bubble_sort@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [20 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds [20 x i32], [20 x i32]* %6, i64 0, i64 0
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 1
%12 = call i32 @fillArray(i32 %7, i8** %8, i32* %9, i32 %11)
%13 = getelementptr inbounds [20 x i32], [20 x i32]* %6, i64 0, i64 0
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
%16 = call i32 @bubble_sort(i32* %13, i32 %15)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [20 x i32]
%4 = bitcast [20 x i32]* %3 to i8*
%5 = getelementptr inbounds [20 x i32], [20 x i32]* %3, i64 0, i64 0
%6 = add nsw i32 %0, -1
%7 = call i32 @fillArray(i32 %0, i8** %1, i32* %5, i32 %6)
%8 = call i32 @bubble_sort(i32* %5, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printf_line(int len) {
  int i;
  printf("  ");
  for (i = 0; i < len; i++)
    printf("-");
  printf("\n");
}


x86 assembly (clang, -O0):
<printf_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1154 <printf_line+0x44>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112e <printf_line+0x1e>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf_line>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1040 <printf@plt>
test   %ebx,%ebx
jle    114f <printf_line+0x2f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1140 <printf_line+0x20>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c" \00"
define void @printf_line(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @putchar(i32 45)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
%10 = tail call i32 @putchar(i32 10)
ret void
}
char *copys(s)
char *s;
{
  register int i;
  register char *cp;
  register char *result;
  i = 1;
  for (cp = s; *cp; cp++)
    i++;
  result = mallocate((unsigned int)i);
  strcpy(result, s);
  return (result);
}


x86 assembly (clang, -O0):
<copys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1162 <copys+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    113b <copys+0x1b>
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1040 <mallocate@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copys>:
push   %rbx
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     113c <copys+0x1c>
mov    $0x1,%edi
xchg   %ax,%ax
cmpb   $0x0,(%rbx,%rdi,1)
lea    0x1(%rdi),%rdi
jne    1130 <copys+0x10>
jmp    1141 <copys+0x21>
mov    $0x1,%edi
xor    %eax,%eax
call   1040 <mallocate@plt>
movslq %eax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

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

LLVM IR (-O2):
define i8* @copys(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 i32 [ %7, %4 ], [ 1, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = add nuw nsw i32 %5, 1
%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
%12 = phi i32 [ 1, %1 ], [ %7, %4 ]
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @mallocate to i32 (i32, ...)*)(i32 %12)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
%16 = tail call i8* @strcpy(i8* dereferenceable(1) %15, i8* dereferenceable(1) %0)
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error_exit(char *error_message) {
  fprintf(stderr, "%s\n", error_message);
  exit(1);
}


x86 assembly (clang, -O0):
<error_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error_exit>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error_exit(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void plain_contour(FILE *f, const char **opts, int xsz, int ysz, double d[]) {}


x86 assembly (clang, -O0):
<plain_contour>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @plain_contour(i32* %0, i8** %1, i32 %2, i32 %3, double* %4) {
%6 = alloca i32*
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i32
%10 = alloca double*
store i32* %0, i32** %6
store i8** %1, i8*** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store double* %4, double** %10
ret void
}

LLVM IR (-O2):
define void @plain_contour(i32* nocapture %0, i8** nocapture %1, i32 %2, i32 %3, double* nocapture %4) {
ret void
}
int fun387() { return 387; }


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

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

LLVM IR (-O0):
define i32 @fun387() {
ret i32 387
}

LLVM IR (-O2):
define i32 @fun387() {
ret i32 387
}
int ocfs2_test_bit(int nr, const void *addr) {
  int mask;
  const unsigned char *ADDR = (const unsigned char *)addr;
  ADDR += nr >> 3;
  mask = 1 << (nr & 0x07);
  return ((mask & *ADDR) != 0);
}


x86 assembly (clang, -O0):
<ocfs2_test_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x3,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
movzbl (%rcx),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ocfs2_test_bit>:
mov    %edi,%ecx
mov    %edi,%eax
sar    $0x3,%eax
cltq
movzbl (%rsi,%rax,1),%eax
and    $0x7,%cl
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @ocfs2_test_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
store i8* %7, i8** %6
%8 = load i32, i32* %3
%9 = ashr i32 %8, 3
%10 = load i8*, i8** %6
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds i8, i8* %10, i64 %11
store i8* %12, i8** %6
%13 = load i32, i32* %3
%14 = and i32 %13, 7
%15 = shl i32 1, %14
store i32 %15, i32* %5
%16 = load i32, i32* %5
%17 = load i8*, i8** %6
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = and i32 %16, %19
%21 = icmp ne i32 %20, 0
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @ocfs2_test_bit(i32 %0, i8* nocapture %1) {
%3 = ashr i32 %0, 3
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = and i32 %0, 7
%7 = load i8, i8* %5
%8 = zext i8 %7 to i32
%9 = lshr i32 %8, %6
%10 = and i32 %9, 1
ret i32 %10
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char *clone_string(const char *stringToClone) {
  int length;
  char *buffer;
  length = strlen(stringToClone);
  buffer = (char *)malloc(sizeof(char) * (length + 1));
  strcpy(buffer, stringToClone);
  return buffer;
}


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

x86 assembly (clang, -O2):
<clone_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@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* @clone_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = mul i64 1, %9
%11 = trunc i64 %10 to i32
%12 = call i64 @malloc(i32 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = load i8*, i8** %2
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
define i8* @clone_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
void some_function() {}


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

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

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

LLVM IR (-O2):
define void @some_function() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_sd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_add_sd(__m128d A, __m128d B) { return _mm_add_sd(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_add_sd>:
jmp    1030 <_mm_add_sd@plt>

LLVM IR (-O0):
define i32 @test_mm_add_sd(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_add_sd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_add_sd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_add_sd(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ FSE_compress(void *, size_t, void const *, size_t);
int local_FSE_compress(void *dst, size_t dstSize, const void *src,
                       size_t srcSize) {
  (void)dstSize;
  return (int)FSE_compress(dst, dstSize, src, srcSize);
}


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

x86 assembly (clang, -O2):
<local_FSE_compress>:
jmp    1030 <FSE_compress@plt>

LLVM IR (-O0):
define i32 @local_FSE_compress(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i64, i64* %6
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = call i64 @FSE_compress(i8* %10, i64 %11, i8* %12, i64 %13)
%15 = trunc i64 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @local_FSE_compress(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = tail call i64 @FSE_compress(i8* %0, i64 %1, i8* %2, i64 %3)
%6 = trunc i64 %5 to i32
ret i32 %6
}
int process_sman_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @process_sman_init() {
ret i32 0
}
void gdk_pixmap_lookup() {}


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

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

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

LLVM IR (-O2):
define void @gdk_pixmap_lookup() {
ret void
}
void foo559() {}


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

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

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

LLVM IR (-O2):
define void @foo559() {
ret void
}
void ff_hevc_put_hevc_epel_hv32_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_hv32_8_sse4() {
ret void
}
int in_interval(int number, int left_bound, int right_bound) {
  return (number >= left_bound && number <= right_bound) ? 1 : 0;
}


x86 assembly (clang, -O0):
<in_interval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0xd(%rbp)
jl     112a <in_interval+0x2a>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_interval>:
cmp    %esi,%edi
setge  %al
cmp    %edx,%edi
setle  %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @in_interval(i32 %0, i32 %1, i32 %2) {
%4 = icmp sge i32 %0, %1
%5 = icmp sle i32 %0, %2
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
double erfc(double x) { return 4; }


x86 assembly (clang, -O0):
<erfc>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<erfc>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @erfc(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 4.000000e+00
}

LLVM IR (-O2):
define double @erfc(double %0) {
ret double 4.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/ *, int, int);
signed short x_in_laby(WINDOW *screen, short x) {
  int xm, ym;
  getmaxyx(screen, ym, xm);
  return xm / 2 - 29 / 2 + x;
}


x86 assembly (clang, -O0):
<x_in_laby>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <getmaxyx@plt>
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0xe,%eax
movswl -0xa(%rbp),%ecx
add    %ecx,%eax
cwtl
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_in_laby>:
push   %rbx
mov    %esi,%ebx
call   1030 <getmaxyx@plt>
add    $0xfffffff2,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @x_in_laby(i32* %0, i16 signext %1) {
%3 = alloca i32*
%4 = alloca i16
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i16 %1, i16* %4
%7 = load i32*, i32** %3
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = call i32 @getmaxyx(i32* %7, i32 %8, i32 %9)
%11 = load i32, i32* %5
%12 = sdiv i32 %11, 2
%13 = sub nsw i32 %12, 14
%14 = load i16, i16* %4
%15 = sext i16 %14 to i32
%16 = add nsw i32 %13, %15
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define signext i16 @x_in_laby(i32* %0, i16 signext %1) {
%3 = tail call i32 @getmaxyx(i32* %0, i32 undef, i32 undef)
%4 = add i16 %1, -14
ret i16 %4
}