xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_suite();
int main(void) {
  test_suite();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_suite@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_suite()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_suite()
ret i32 0
}
/* Variables and functions */
scalar_t__ memcpy(char *, char const *, int);
int strlen(char const *);
char *easy_strcpy(char *dest, const char *src) {
  int len = strlen(src);
  return (((char *)memcpy(dest, src, (len))) + (len));
}


x86 assembly (clang, -O0):
<easy_strcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<easy_strcpy>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
movslq %ebp,%rcx
add    %rcx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @easy_strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = call i64 @memcpy(i8* %8, i8* %9, i32 %10)
%12 = inttoptr i64 %11 to i8*
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
ret i8* %15
}

LLVM IR (-O2):
define i8* @easy_strcpy(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @memcpy(i8* %0, i8* %1, i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds i8, i8* %5, i64 %6
ret i8* %7
}
void foo(double *output) { *output = 0.0; }


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

x86 assembly (clang, -O2):
<foo>:
movq   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @foo(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
store double 0.000000e+00, double* %3
ret void
}

LLVM IR (-O2):
define void @foo(double* nocapture writeonly %0) {
store double 0.000000e+00, double* %0
ret void
}
int my_islower(int c) { return (unsigned)c - 'a' < 26; }


x86 assembly (clang, -O0):
<my_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
cmp    $0x1a,%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @my_islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub i32 %3, 97
%5 = icmp ult i32 %4, 26
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @my_islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned int my_add(unsigned int si1, unsigned int si2) {
  return (si1 > (50 - si2)) ? si1 : (si1 + si2);
}


x86 assembly (clang, -O0):
<my_add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x32,%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jbe    1128 <my_add+0x28>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1131 <my_add+0x31>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_add>:
mov    $0x32,%ecx
sub    %esi,%ecx
xor    %eax,%eax
cmp    %edi,%ecx
cmovae %esi,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @my_add(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 = sub i32 50, %6
%8 = icmp ugt i32 %5, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %3
br label %15
11: ; preds = %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = add i32 %12, %13
br label %15
15: ; preds = %11, %9
%16 = phi i32 [ %10, %9 ], [ %14, %11 ]
ret i32 %16
}

LLVM IR (-O2):
define i32 @my_add(i32 %0, i32 %1) {
%3 = sub i32 50, %1
%4 = icmp ult i32 %3, %0
%5 = select i1 %4, i32 0, i32 %1
%6 = add i32 %5, %0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int f(int);
main() {
  if (f(2) != 4711)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
call   1040 <f@plt>
cmp    $0x1267,%eax
je     115b <main+0x2b>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1040 <f@plt>
cmp    $0x1267,%eax
jne    1149 <main+0x19>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 2)
%3 = icmp ne i32 %2, 4711
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 2)
%2 = icmp eq i32 %1, 4711
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_self();
int /*<<< orphan*/ pthread_setaffinity_np(int /*<<< orphan*/, int,
                                          int /*<<< orphan*/ *);
void set_affinity(int cpuid) {
  cpu_set_t cpuset;
  CPU_ZERO(&cpuset);
  CPU_SET(cpuid, &cpuset);
  pthread_setaffinity_np(pthread_self(), 1, &cpuset);
}


x86 assembly (clang, -O0):
<set_affinity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <CPU_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1060 <CPU_SET@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%edi
mov    $0x1,%esi
lea    -0x8(%rbp),%rdx
call   1030 <pthread_setaffinity_np@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_affinity>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <CPU_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1060 <CPU_SET@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
mov    %eax,%edi
mov    $0x1,%esi
mov    %r14,%rdx
call   1030 <pthread_setaffinity_np@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @set_affinity(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @CPU_ZERO(i32* %3)
%5 = load i32, i32* %2
%6 = call i32 @CPU_SET(i32 %5, i32* %3)
%7 = call i32 (...) @pthread_self()
%8 = call i32 @pthread_setaffinity_np(i32 %7, i32 1, i32* %3)
ret void
}

LLVM IR (-O2):
define void @set_affinity(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @CPU_ZERO(i32* %2)
%5 = call i32 @CPU_SET(i32 %0, i32* %2)
%6 = call i32 (...) @pthread_self()
%7 = call i32 @pthread_setaffinity_np(i32 %6, i32 1, i32* %2)
ret void
}
int get_neighbors(int i, int j, int x, int y, char **grid) {}


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

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

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

LLVM IR (-O2):
define i32 @get_neighbors(i32 %0, i32 %1, i32 %2, i32 %3, i8** nocapture readnone %4) {
ret i32 undef
}
void mpp_domain_end() {}


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

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

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

LLVM IR (-O2):
define void @mpp_domain_end() {
ret void
}
float Linear__easeNone(float t, float b, float c, float d, float p0, float p1) {
  return c * t / d + b;
}


x86 assembly (clang, -O0):
<Linear__easeNone>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Linear__easeNone>:
mulss  %xmm2,%xmm0
divss  %xmm3,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Linear__easeNone(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %9
%14 = load float, float* %7
%15 = fmul float %13, %14
%16 = load float, float* %10
%17 = fdiv float %15, %16
%18 = load float, float* %8
%19 = fadd float %17, %18
ret float %19
}

LLVM IR (-O2):
define float @Linear__easeNone(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fmul float %0, %2
%8 = fdiv float %7, %3
%9 = fadd float %8, %1
ret float %9
}
int dbg_leb_map(struct ubifs_info *c, int lnum) { return 0; }


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

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

LLVM IR (-O0):
%struct.ubifs_info = type opaque
define i32 @dbg_leb_map(%struct.ubifs_info* %0, i32 %1) {
%3 = alloca %struct.ubifs_info*
%4 = alloca i32
store %struct.ubifs_info* %0, %struct.ubifs_info** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.ubifs_info = type opaque
define i32 @dbg_leb_map(%struct.ubifs_info* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("你好！\n我叫柴田望洋！\n"); }


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"\E4\BD\A0\E5\A5\BD\EF\BC\81\0A\E6\88\91\E5\8F\AB\E6\9F\B4\E7\94\B0\E6\9C\9B\E6\B4\8B\EF\BC\81\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [32 x i8] c"\E4\BD\A0\E5\A5\BD\EF\BC\81\0A\E6\88\91\E5\8F\AB\E6\9F\B4\E7\94\B0\E6\9C\9B\E6\B4\8B\EF\BC\81\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void fill_nop(void *src, unsigned int len) {
  unsigned char *src2 = (unsigned char *)src;
  while (len) {
    *src2++ = 0x90;
    --len;
  }
}


x86 assembly (clang, -O0):
<fill_nop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113d <fill_nop+0x3d>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x90,(%rax)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1113 <fill_nop+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_nop>:
test   %esi,%esi
je     1125 <fill_nop+0x15>
push   %rax
mov    %esi,%edx
mov    $0x90,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @fill_nop(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
call2b(f1, s, d1, i, f2, l, d2, c) float f1;
short s;
double d1;
int i;
float f2;
long l;
double d2;
char c;
{
  c = 'a';
  f1 = 0.0;
  s = 5;
  d1 = 0.0;
  i = 6;
  f2 = 0.1;
  l = 7;
  d2 = 0.2;
}


x86 assembly (clang, -O0):
<call2b>:
push   %rbp
mov    %rsp,%rbp
mov    %ecx,%eax
movsd  %xmm2,-0x40(%rbp)
movaps %xmm0,%xmm2
movsd  -0x40(%rbp),%xmm0
cvtsd2ss %xmm2,%xmm2
mov    %di,%cx
cvtsd2ss %xmm0,%xmm0
movss  %xmm2,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
movss  %xmm0,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
mov    %al,-0x31(%rbp)
movb   $0x61,-0x31(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movw   $0x5,-0xa(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x6,-0x1c(%rbp)
movss  0xe9f(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movq   $0x7,-0x28(%rbp)
movsd  0xe82(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @call2b(double %0, i32 %1, double %2, i32 %3, double %4, i64 %5, double %6, i32 %7) {
%9 = alloca i32
%10 = alloca float
%11 = alloca i16
%12 = alloca double
%13 = alloca i32
%14 = alloca float
%15 = alloca i64
%16 = alloca double
%17 = alloca i8
%18 = fptrunc double %0 to float
%19 = trunc i32 %1 to i16
%20 = fptrunc double %4 to float
%21 = trunc i32 %7 to i8
store float %18, float* %10
store i16 %19, i16* %11
store double %2, double* %12
store i32 %3, i32* %13
store float %20, float* %14
store i64 %5, i64* %15
store double %6, double* %16
store i8 %21, i8* %17
store i8 97, i8* %17
store float 0.000000e+00, float* %10
store i16 5, i16* %11
store double 0.000000e+00, double* %12
store i32 6, i32* %13
store float 0x3FB99999A0000000, float* %14
store i64 7, i64* %15
store double 2.000000e-01, double* %16
%22 = load i32, i32* %9
ret i32 %22
}

LLVM IR (-O2):
define i32 @call2b(double %0, i32 %1, double %2, i32 %3, double %4, i64 %5, double %6, i32 %7) {
ret i32 undef
}
/* Variables and functions */
int strlen(char *);
unsigned short get_dli(char *res) {
  if (res) {
    int ln = strlen(res);
    return ln < 8189 ? ln : 8189;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<get_dli>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1164 <get_dli+0x54>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1ffd,-0x14(%rbp)
jge    114b <get_dli+0x3b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1158 <get_dli+0x48>
mov    $0x1ffd,%eax
mov    %eax,-0x18(%rbp)
jmp    1158 <get_dli+0x48>
mov    -0x18(%rbp),%eax
mov    %ax,-0x2(%rbp)
jmp    116a <get_dli+0x5a>
movw   $0x0,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_dli>:
test   %rdi,%rdi
je     112f <get_dli+0x1f>
push   %rax
call   1030 <strlen@plt>
mov    %eax,%ecx
cmp    $0x1ffd,%eax
mov    $0x1ffd,%eax
cmovl  %ecx,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define zeroext i16 @get_dli(i8* %0) {
%2 = alloca i16
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %18
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 8189
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = load i32, i32* %4
br label %15
14: ; preds = %7
br label %15
15: ; preds = %14, %12
%16 = phi i32 [ %13, %12 ], [ 8189, %14 ]
%17 = trunc i32 %16 to i16
store i16 %17, i16* %2
br label %19
18: ; preds = %1
store i16 0, i16* %2
br label %19
19: ; preds = %18, %15
%20 = load i16, i16* %2
ret i16 %20
}

LLVM IR (-O2):
define zeroext i16 @get_dli(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp slt i32 %4, 8189
%6 = select i1 %5, i32 %4, i32 8189
%7 = trunc i32 %6 to i16
br label %8
8: ; preds = %1, %3
%9 = phi i16 [ %7, %3 ], [ 0, %1 ]
ret i16 %9
}
void nested_loop_prune_Good(int length) {
  int i, j;
  char a[length];
  for (i = length - 1; i >= 0; i--) {
    for (j = 0; j < i; j++) {
      a[length - i] = 'Z';
    }
  }
}


x86 assembly (clang, -O0):
<nested_loop_prune_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1189 <nested_loop_prune_Good+0x89>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1176 <nested_loop_prune_Good+0x76>
mov    -0x28(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
movslq %ecx,%rcx
movb   $0x5a,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114b <nested_loop_prune_Good+0x4b>
jmp    117b <nested_loop_prune_Good+0x7b>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <nested_loop_prune_Good+0x3a>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @nested_loop_prune_Good(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 42;
  printf("%d\n", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2a,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 42)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ eprintf(char *, char *);
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *estrdup(char *s) {
  char *t;
  t = (char *)malloc(strlen(s) + 1);
  if (t == NULL)
    eprintf("estrdup(\"%.20s\") failed:", s);
  strcpy(t, s);
  return t;
}


x86 assembly (clang, -O0):
<estrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1180 <estrdup+0x40>
mov    -0x8(%rbp),%rsi
lea    0xe85(%rip),%rdi
call   1060 <eprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    116c <estrdup+0x2c>
lea    0xe9c(%rip),%rdi
mov    %r14,%rsi
call   1060 <eprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [25 x i8] c"estrdup(\22%.20s\22) failed:\00"
define i8* @estrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = call i32 @eprintf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %1
%15 = load i8*, i8** %3
%16 = load i8*, i8** %2
%17 = call i32 @strcpy(i8* %15, i8* %16)
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@.str = [25 x i8] c"estrdup(\22%.20s\22) failed:\00"
define i8* @estrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 @eprintf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %7, %1
%10 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
scalar_t__ condvar_reinit(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
scalar_t__ pthread_condattr_setclock(int /*<<< orphan*/ *, int /*<<< orphan*/);
__attribute__((no)) int test_setclock(pthread_cond_t *condvar,
                                      pthread_condattr_t *attr) {
  int result = 1;
  if (pthread_condattr_setclock(attr, CLOCK_REALTIME) == 0 &&
      condvar_reinit(condvar, attr) == 0)
    result = 0;
  return result;
}


x86 assembly (clang, -O0):
<test_setclock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
call   1030 <pthread_condattr_setclock@plt>
cmp    $0x0,%rax
jne    1171 <test_setclock+0x51>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <condvar_reinit@plt>
cmp    $0x0,%rax
jne    1171 <test_setclock+0x51>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_setclock>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1030 <pthread_condattr_setclock@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    115e <test_setclock+0x3e>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <condvar_reinit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@CLOCK_REALTIME = global i32 0
define i32 @test_setclock(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 1, i32* %5
%6 = load i32*, i32** %4
%7 = load i32, i32* @CLOCK_REALTIME
%8 = call i64 @pthread_condattr_setclock(i32* %6, i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i32*, i32** %3
%12 = load i32*, i32** %4
%13 = call i64 @condvar_reinit(i32* %11, i32* %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 0, i32* %5
br label %16
16: ; preds = %15, %10, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@CLOCK_REALTIME = global i32 0
define i32 @test_setclock(i32* %0, i32* %1) {
%3 = load i32, i32* @CLOCK_REALTIME
%4 = tail call i64 @pthread_condattr_setclock(i32* %1, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i64 @condvar_reinit(i32* %0, i32* %1)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %2
%11 = phi i32 [ 1, %2 ], [ %9, %6 ]
ret i32 %11
}
int foo() {
  int x = 5;
  void *p;
c1:
  x--;
  goto c3;
c2:
  x = 4;
  goto c4;
c3:
  p = (x > 3) ? &&c1 : &&c2;
  goto *(p + 1);
c4:
  goto c1;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1125 <foo+0x25>
movl   $0x4,-0x4(%rbp)
jmp    1152 <foo+0x52>
mov    -0x4(%rbp),%eax
sub    $0x4,%eax
lea    -0x27(%rip),%rcx
lea    -0x20(%rip),%rax
cmovge %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1157 <foo+0x57>
jmp    110b <foo+0xb>
mov    -0x18(%rbp),%rax
jmp    *%rax

x86 assembly (clang, -O2):
<foo>:
mov    $0x5,%eax
lea    -0x1(%rax),%edx
cmp    $0x5,%eax
lea    0x1e(%rip),%rax
lea    0x2a(%rip),%rcx
mov    %rcx,%rsi
cmovge %rax,%rsi
add    $0x1,%rsi
jmp    *%rsi
cs nopw 0x0(%rax,%rax,1)
cmp    $0x5,%edx
lea    -0x1(%rdx),%edx
mov    %rcx,%rsi
cmovge %rax,%rsi
add    $0x1,%rsi
jmp    *%rsi
mov    $0x4,%esi
lea    -0x1(%rsi),%edx
cmp    $0x5,%esi
mov    %rcx,%rsi
cmovge %rax,%rsi
add    $0x1,%rsi
jmp    *%rsi

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = alloca i8*
store i32 5, i32* %1
br label %3
3: ; preds = %14, %15, %0
%4 = load i32, i32* %1
%5 = add nsw i32 %4, -1
store i32 %5, i32* %1
br label %7
6: ; preds = %15
store i32 4, i32* %1
br label %14
7: ; preds = %3
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 3
%10 = zext i1 %9 to i64
%11 = select i1 %9, i8* blockaddress(@foo, %3), i8* blockaddress(@foo, %6)
store i8* %11, i8** %2
%12 = load i8*, i8** %2
%13 = getelementptr i8, i8* %12, i64 1
br label %15
14: ; preds = %6
br label %3
15: ; preds = %7
%16 = phi i8* [ %13, %7 ]
indirectbr i8* %16, [label %3, label %6]
}

LLVM IR (-O2):
define i32 @foo() {
br label %1
1: ; preds = %6, %1, %0
%2 = phi i32 [ 5, %0 ], [ %3, %1 ], [ 4, %6 ]
%3 = add nsw i32 %2, -1
%4 = icmp sgt i32 %2, 4
%5 = select i1 %4, i8* getelementptr (i8, i8* blockaddress(@foo, %1), i64 1), i8* getelementptr (i8, i8* blockaddress(@foo, %6), i64 1)
indirectbr i8* %5, [label %1, label %6]
6: ; preds = %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ perm;

/* Variables and functions */
int /*<<< orphan*/ lexPermute(int *, int const);
int /*<<< orphan*/ printArray(int *, int const);
main() {
  int perm[] = {1, 2, 3, 4};
  int const PERMUTATION_LENGTH = sizeof(perm) / sizeof(perm[0]);
  printArray(perm, PERMUTATION_LENGTH);
  lexPermute(perm, PERMUTATION_LENGTH);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x14(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x4,%esi
call   1040 <printArray@plt>
lea    -0x10(%rbp),%rdi
mov    $0x4,%esi
call   1030 <lexPermute@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <printArray@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <lexPermute@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.perm = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
define i32 @main() {
%1 = alloca [4 x i32]
%2 = alloca i32
%3 = bitcast [4 x i32]* %1 to i8*
store i32 4, i32* %2
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%5 = call i32 @printArray(i32* %4, i32 4)
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%7 = call i32 @lexPermute(i32* %6, i32 4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.perm = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @printArray(i32* %3, i32 4)
%5 = call i32 @lexPermute(i32* %3, i32 4)
ret i32 0
}
int main() {
  char *s = "hello world";
  *s = 'H';
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = alloca i8*
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
store i8 72, i8* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ interrupt(int, int, int /*<<< orphan*/, int /*<<< orphan*/,
                             char);
void setPosition(char row, char col) {
  interrupt(0x10, 0x0200, 0, 0, (row << 8) + col);
}


x86 assembly (clang, -O0):
<setPosition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
shl    $0x8,%eax
movsbl -0x2(%rbp),%ecx
add    %ecx,%eax
mov    $0x10,%edi
mov    $0x200,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
movsbl %al,%r8d
call   1030 <interrupt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setPosition>:
mov    %esi,%r8d
mov    $0x10,%edi
mov    $0x200,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <interrupt@plt>

LLVM IR (-O0):
define void @setPosition(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = add nsw i32 %7, %9
%11 = trunc i32 %10 to i8
%12 = call i32 @interrupt(i32 16, i32 512, i32 0, i32 0, i8 signext %11)
ret void
}

LLVM IR (-O2):
define void @setPosition(i8 signext %0, i8 signext %1) {
%3 = tail call i32 @interrupt(i32 16, i32 512, i32 0, i32 0, i8 signext %1)
ret void
}
int get_counter(int index) { return ((3 * 3) * (3 * 3)) - 1 - index; }


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

x86 assembly (clang, -O2):
<get_counter>:
mov    $0x50,%eax
sub    %edi,%eax
ret

LLVM IR (-O0):
define i32 @get_counter(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 80, %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @get_counter(i32 %0) {
%2 = sub nsw i32 80, %0
ret i32 %2
}
int isitemtypeselectable(char itemtype) {
  switch (itemtype) {
  case 'i':
  case '3':
  case 0:
  case 0x7F:
    return 0;
  default:
    return 1;
  }
}


x86 assembly (clang, -O0):
<isitemtypeselectable>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     1151 <isitemtypeselectable+0x51>
jmp    111e <isitemtypeselectable+0x1e>
mov    -0xc(%rbp),%eax
sub    $0x33,%eax
je     1151 <isitemtypeselectable+0x51>
jmp    112f <isitemtypeselectable+0x2f>
mov    -0xc(%rbp),%eax
sub    $0x69,%eax
je     1151 <isitemtypeselectable+0x51>
jmp    1140 <isitemtypeselectable+0x40>
mov    -0xc(%rbp),%eax
sub    $0x7f,%eax
jne    115d <isitemtypeselectable+0x5d>
jmp    1151 <isitemtypeselectable+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1164 <isitemtypeselectable+0x64>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isitemtypeselectable>:
xor    %eax,%eax
cmp    $0x68,%edi
jg     1111 <isitemtypeselectable+0x11>
test   %edi,%edi
je     1110 <isitemtypeselectable+0x10>
cmp    $0x33,%edi
jne    111b <isitemtypeselectable+0x1b>
ret
cmp    $0x69,%edi
je     1110 <isitemtypeselectable+0x10>
cmp    $0x7f,%edi
je     1110 <isitemtypeselectable+0x10>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isitemtypeselectable(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 105, label %6
i32 51, label %6
i32 0, label %6
i32 127, label %6
]
6: ; preds = %1, %1, %1, %1
store i32 0, i32* %2
br label %8
7: ; preds = %1
store i32 1, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @isitemtypeselectable(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 105, label %4
i32 51, label %4
i32 0, label %4
i32 127, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %3
%5 = phi i32 [ 1, %3 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ]
ret i32 %5
}
/* Variables and functions */
char asm_inputc(char *);
char inputc(char *scancode) { return asm_inputc(scancode); }


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

x86 assembly (clang, -O2):
<inputc>:
jmp    1030 <asm_inputc@plt>

LLVM IR (-O0):
define signext i8 @inputc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call signext i8 @asm_inputc(i8* %3)
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @inputc(i8* %0) {
%2 = tail call signext i8 @asm_inputc(i8* %0)
ret i8 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int /*<<< orphan*/ *opendir(char *);
int check_dir(char *name) {
  DIR *dirptr;
  dirptr = opendir(name);
  if (dirptr != NULL) {
    closedir(dirptr);
    return (1);
  } else
    return (0);
}


x86 assembly (clang, -O0):
<check_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1159 <check_dir+0x39>
mov    -0x18(%rbp),%rdi
call   1040 <closedir@plt>
movl   $0x1,-0x4(%rbp)
jmp    1160 <check_dir+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_dir>:
push   %rax
call   1030 <opendir@plt>
test   %rax,%rax
je     113a <check_dir+0x1a>
mov    %rax,%rdi
call   1040 <closedir@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @check_dir(i8* nocapture %0) {
%2 = tail call i32* @opendir(i8* %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @closedir(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ BN_MONT_CTX;
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int deadcafe_bn_mod_exp(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                        int /*<<< orphan*/ const *, int /*<<< orphan*/ const *);
int deadcafe_rsa_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
                            const BIGNUM *m,
                            BN_CTX *ctx __attribute__((unused)),
                            BN_MONT_CTX *m_ctx __attribute__((unused))) {
  return deadcafe_bn_mod_exp(r, a, p, m);
}


x86 assembly (clang, -O0):
<deadcafe_rsa_bn_mod_exp>:
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    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <deadcafe_bn_mod_exp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deadcafe_rsa_bn_mod_exp>:
jmp    1030 <deadcafe_bn_mod_exp@plt>

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

LLVM IR (-O2):
define i32 @deadcafe_rsa_bn_mod_exp(i32* %0, i32* %1, i32* %2, i32* %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = tail call i32 @deadcafe_bn_mod_exp(i32* %0, i32* %1, i32* %2, i32* %3)
ret i32 %7
}
int ld_bgt_rc1(long double a1) { return (__builtin_isgreater(a1, 100)); }


x86 assembly (clang, -O0):
<ld_bgt_rc1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeed(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_bgt_rc1>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
xor    %eax,%eax
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
ret

LLVM IR (-O0):
define i32 @ld_bgt_rc1(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp ogt x86_fp80 %3, 0xK4005C800000000000000
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ld_bgt_rc1(x86_fp80 %0) {
%2 = fcmp ogt x86_fp80 %0, 0xK4005C800000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int sqlite3_open(char *, int /*<<< orphan*/ **);
int sqlite_open(sqlite3 **database) {
  return sqlite3_open("/var/lib/defs/defs.db", database);
}


x86 assembly (clang, -O0):
<sqlite_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <sqlite3_open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlite_open>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <sqlite3_open@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"/var/lib/defs/defs.db\00"
define i32 @sqlite_open(i32** %0) {
%2 = alloca i32**
store i32** %0, i32*** %2
%3 = load i32**, i32*** %2
%4 = call i32 @sqlite3_open(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32** %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [22 x i8] c"/var/lib/defs/defs.db\00"
define i32 @sqlite_open(i32** %0) {
%2 = tail call i32 @sqlite3_open(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32** %0)
ret i32 %2
}
char const *bindex(sp, c)
register char const *sp;
register int c;
{
  register char const *r;
  r = sp;
  while (*sp) {
    if (*sp++ == c)
      r = sp;
  }
  return r;
}


x86 assembly (clang, -O0):
<bindex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1148 <bindex+0x48>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    1143 <bindex+0x43>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1113 <bindex+0x13>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bindex>:
mov    %rdi,%rax
mov    (%rdi),%dl
test   %dl,%dl
je     1124 <bindex+0x24>
lea    0x1(%rax),%rcx
nopl   (%rax)
movsbl %dl,%edx
cmp    %esi,%edx
cmove  %rcx,%rax
movzbl (%rcx),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <bindex+0x10>
ret

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

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


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

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

LLVM IR (-O0):
define i32 @do_059() {
ret i32 59
}

LLVM IR (-O2):
define i32 @do_059() {
ret i32 59
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void fatal(const char *error) {
  fprintf(stderr, "Error: %s\n", error);
  exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
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):
<fatal>:
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 = [11 x i8] c"Error: %s\0A\00"
define void @fatal(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 ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int dev_puncher_write(struct dev_puncher *puncher) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.dev_puncher = type opaque
define i32 @dev_puncher_write(%struct.dev_puncher* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SYS_futex;
int syscall(int /*<<< orphan*/, int *, int, int, struct timespec const *, int *,
            int);
int __futex(int *uaddr, int op, int val, const struct timespec *timeout,
            int *uaddr2, int val3) {
  return syscall(SYS_futex, uaddr, op, val, timeout, uaddr2, val3);
}


x86 assembly (clang, -O0):
<__futex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x24(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__futex>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ebb(%rip),%rdi
mov    (%rdi),%edi
mov    %r9d,(%rsp)
mov    %rax,%r9
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@SYS_futex = global i32 0
define i32 @__futex(i32* %0, i32 %1, i32 %2, %struct.timespec* %3, i32* %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.timespec*
%11 = alloca i32*
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store %struct.timespec* %3, %struct.timespec** %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32, i32* @SYS_futex
%14 = load i32*, i32** %7
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load %struct.timespec*, %struct.timespec** %10
%18 = load i32*, i32** %11
%19 = load i32, i32* %12
%20 = call i32 @syscall(i32 %13, i32* %14, i32 %15, i32 %16, %struct.timespec* %17, i32* %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@SYS_futex = global i32 0
define i32 @__futex(i32* %0, i32 %1, i32 %2, %struct.timespec* %3, i32* %4, i32 %5) {
%7 = load i32, i32* @SYS_futex
%8 = tail call i32 @syscall(i32 %7, i32* %0, i32 %1, i32 %2, %struct.timespec* %3, i32* %4, i32 %5)
ret i32 %8
}
char *sem_get_error(void) {
  static char message[1024] = "";
  return message;
}


x86 assembly (clang, -O0):
<sem_get_error>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_get_error>:
lea    0x2f29(%rip),%rax
ret

LLVM IR (-O0):
@sem_get_error.message = internal global [1024 x i8] zeroinitializer
define i8* @sem_get_error() {
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @sem_get_error.message, i64 0, i64 0)
}

LLVM IR (-O2):
@sem_get_error.message = internal global [1024 x i8] zeroinitializer
define i8* @sem_get_error() {
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @sem_get_error.message, i64 0, i64 0)
}
void conn_cq_deinit(struct conn_q *cq) {}


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

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

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

LLVM IR (-O2):
%struct.conn_q = type opaque
define void @conn_cq_deinit(%struct.conn_q* nocapture %0) {
ret void
}