xunge/DecIR huggingface dataset:
void swap(int *numA, int *numB) {
  int temp = *numA;
  *numA = *numB;
  *numB = temp;
}


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

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

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
void fourty_two_and_free(void *str) {
  if (__builtin_expect((!!(str)), (1))) {
    char *s = str;
    while (*s)
      *s++ = 42;
    do {
      __typeof__(str) no_discard_ = str;
      __asm__ __volatile__("" ::"g"(no_discard_) : "memory");
    } while (0);
    free(str);
  }
}


x86 assembly (clang, -O0):
<fourty_two_and_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cltq
cmp    $0x0,%rax
je     1183 <fourty_two_and_free+0x73>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1165 <fourty_two_and_free+0x55>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2a,(%rax)
jmp    1141 <fourty_two_and_free+0x31>
jmp    116a <fourty_two_and_free+0x5a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fourty_two_and_free>:
test   %rdi,%rdi
je     1137 <fourty_two_and_free+0x27>
cmpb   $0x0,(%rdi)
je     112d <fourty_two_and_free+0x1d>
lea    0x1(%rdi),%rax
xchg   %ax,%ax
movb   $0x2a,-0x1(%rax)
cmpb   $0x0,(%rax)
lea    0x1(%rax),%rax
jne    1120 <fourty_two_and_free+0x10>
mov    %rdi,-0x8(%rsp)
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @fourty_two_and_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %8, %6 ], [ %0, %3 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 42, i8* %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %3
tail call void asm sideeffect "", "imr,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0)
tail call void @free(i8* %0)
br label %12
12: ; preds = %11, %1
ret void
}
int test_imm_3Eint64_lowword_mem(long long *val) {
  return ((*val) & (0x3E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_3Eint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 62
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ unlikely(int);
int dl_prio(int prio) {
  if (unlikely(prio < 0))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<dl_prio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <unlikely@plt>
cmp    $0x0,%rax
je     1142 <dl_prio+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <dl_prio+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dl_prio>:
push   %rax
shr    $0x1f,%edi
call   1030 <unlikely@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dl_prio(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i64 @unlikely(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @dl_prio(i32 %0) {
%2 = lshr i32 %0, 31
%3 = tail call i64 @unlikely(i32 %2)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int HelpItem165(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem165() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
Dumpglsy() {
  printf("\n\n\n****************  GLOSSARY TABLES  ***************\n");
  printf("****************  NOT IMPLEMENTED  ***************\n\n");
}


x86 assembly (clang, -O0):
<Dumpglsy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dumpglsy>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf12(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"\0A\0A\0A**************** GLOSSARY TABLES ***************\0A\00"
@.str.1 = [53 x i8] c"**************** NOT IMPLEMENTED ***************\0A\0A\00"
define i32 @Dumpglsy() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@str = [54 x i8] c"\0A\0A\0A**************** GLOSSARY TABLES ***************\00"
@str.2 = [52 x i8] c"**************** NOT IMPLEMENTED ***************\0A\00"
define i32 @Dumpglsy() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.2, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ glOrtho(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/, int, int);
void gluOrtho2D(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top) {
  glOrtho(left, right, bottom, top, -1, 1);
}


x86 assembly (clang, -O0):
<gluOrtho2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0xffffffff,%r8d
mov    $0x1,%r9d
call   1030 <glOrtho@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gluOrtho2D>:
mov    $0xffffffff,%r8d
mov    $0x1,%r9d
jmp    1030 <glOrtho@plt>

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

LLVM IR (-O2):
define void @gluOrtho2D(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @glOrtho(i32 %0, i32 %1, i32 %2, i32 %3, i32 -1, i32 1)
ret void
}
/* Variables and functions */
scalar_t__ xmalloc(int);
void *splay_tree_xmalloc_allocate(int size,
                                  void *data __attribute__((__unused__))) {
  return (void *)xmalloc(size);
}


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

x86 assembly (clang, -O2):
<splay_tree_xmalloc_allocate>:
jmp    1030 <xmalloc@plt>

LLVM IR (-O0):
define i8* @splay_tree_xmalloc_allocate(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = call i64 @xmalloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @splay_tree_xmalloc_allocate(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i64 @xmalloc(i32 %0)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void external(void) { printf("external function\n"); }


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

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

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

LLVM IR (-O2):
@str = [18 x i8] c"external function\00"
define void @external() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
const char *get_world() { return "world!"; }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"world!\00"
define i8* @get_world() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"world!\00"
define i8* @get_world() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
int enable_large_pages(void) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @enable_large_pages() {
ret i32 -1
}
float magic_sqrt(float number) {
  float x = number;
  float xhalf = 0.5f * x;
  int i;
  memcpy(&i, &x, sizeof(i));
  i = 0x5f375a84 - (i >> 1);
  memcpy(&x, &i, sizeof(x));
  x = x * (1.5f - xhalf * x * x);
  return number * x;
}


x86 assembly (clang, -O0):
<magic_sqrt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xee9(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
sar    $0x1,%ecx
mov    $0x5f375a84,%eax
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
movss  0xe92(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<magic_sqrt>:
movd   %xmm0,%eax
sar    %eax
mov    $0x5f375a84,%ecx
sub    %eax,%ecx
movd   %ecx,%xmm1
movss  0xee7(%rip),%xmm2
mulss  %xmm0,%xmm2
mulss  %xmm1,%xmm2
mulss  %xmm1,%xmm2
addss  0xed7(%rip),%xmm2
mulss  %xmm1,%xmm2
mulss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @magic_sqrt(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float %0, float* %2
%6 = load float, float* %2
store float %6, float* %3
%7 = load float, float* %3
%8 = fmul float 5.000000e-01, %7
store float %8, float* %4
%9 = bitcast i32* %5 to i8*
%10 = bitcast float* %3 to i8*
%11 = load i32, i32* %5
%12 = ashr i32 %11, 1
%13 = sub nsw i32 1597463172, %12
store i32 %13, i32* %5
%14 = bitcast float* %3 to i8*
%15 = bitcast i32* %5 to i8*
%16 = load float, float* %3
%17 = load float, float* %4
%18 = load float, float* %3
%19 = fmul float %17, %18
%20 = load float, float* %3
%21 = fneg float %19
%22 = call float @llvm.fmuladd.f32(float %21, float %20, float 1.500000e+00)
%23 = fmul float %16, %22
store float %23, float* %3
%24 = load float, float* %2
%25 = load float, float* %3
%26 = fmul float %24, %25
ret float %26
}

LLVM IR (-O2):
define float @magic_sqrt(float %0) {
%2 = bitcast float %0 to i32
%3 = ashr i32 %2, 1
%4 = sub nsw i32 1597463172, %3
%5 = bitcast i32 %4 to float
%6 = fmul float %0, -5.000000e-01
%7 = fmul float %6, %5
%8 = tail call float @llvm.fmuladd.f32(float %7, float %5, float 1.500000e+00)
%9 = fmul float %8, %5
%10 = fmul float %9, %0
ret float %10
}
void usr_error(char *file, int line, char *msg) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<usr_error>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
jmp    110f <usr_error+0xf>

x86 assembly (clang, -O2):
<usr_error>:
jmp    1100 <usr_error>

LLVM IR (-O0):
define void @usr_error(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
br label %7
7: ; preds = %3, %7
br label %7
}

LLVM IR (-O2):
define void @usr_error(i8* nocapture %0, i32 %1, i8* nocapture %2) {
br label %4
4: ; preds = %3, %4
br label %4
}
int isid(int c) {
  return (c >= 'a' & c <= 'z') | (c >= 'A' & c <= 'Z') | c == '_';
}


x86 assembly (clang, -O0):
<isid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x7a,-0x4(%rbp)
setle  %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmpl   $0x41,-0x4(%rbp)
setge  %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmpl   $0x5a,-0x4(%rbp)
setle  %dl
and    $0x1,%dl
movzbl %dl,%edx
and    %edx,%ecx
or     %ecx,%eax
cmpl   $0x5f,-0x4(%rbp)
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isid>:
mov    %edi,%eax
and    $0xffffffdf,%eax
add    $0xffffffbf,%eax
cmp    $0x1a,%eax
setb   %al
cmp    $0x5f,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
%5 = zext i1 %4 to i32
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
%8 = zext i1 %7 to i32
%9 = and i32 %5, %8
%10 = load i32, i32* %2
%11 = icmp sge i32 %10, 65
%12 = zext i1 %11 to i32
%13 = load i32, i32* %2
%14 = icmp sle i32 %13, 90
%15 = zext i1 %14 to i32
%16 = and i32 %12, %15
%17 = or i32 %9, %16
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 95
%20 = zext i1 %19 to i32
%21 = or i32 %17, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @isid(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = icmp eq i32 %0, 95
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
__attribute__((no)) int t2(void) {
  int undef_stack_int;
  register char undef_stack_char = (char)undef_stack_int;
  fprintf(stderr, "\nUndef 2 of 8 (8 bits of 32 undef)\n");
  return (undef_stack_char == 0x12 ? 11 : 22);
}


x86 assembly (clang, -O0):
<t2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
movsbl -0x5(%rbp),%edx
mov    $0x16,%eax
mov    $0xb,%ecx
cmp    $0x12,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x16,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"\0AUndef 2 of 8 (8 bits of 32 undef)\0A\00"
define i32 @t2() {
%1 = alloca i32
%2 = alloca i8
%3 = load i32, i32* %1
%4 = trunc i32 %3 to i8
store i8 %4, i8* %2
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 18
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 11, i32 22
ret i32 %11
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"\0AUndef 2 of 8 (8 bits of 32 undef)\0A\00"
define i32 @t2() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret i32 22
}
int test_imm_63uint16_mem(unsigned short *val) {
  return ((*val) & (0x63 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_63uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 99
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int cichlid_rotate_right_32(int, int);
uint32_t Sigma1(uint32_t x) {
  return cichlid_rotate_right_32(x, 6) ^ cichlid_rotate_right_32(x, 11) ^
         cichlid_rotate_right_32(x, 25);
}


x86 assembly (clang, -O0):
<Sigma1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x6,%esi
call   1030 <cichlid_rotate_right_32@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xb,%esi
call   1030 <cichlid_rotate_right_32@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x19,%esi
call   1030 <cichlid_rotate_right_32@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sigma1>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    $0x6,%esi
call   1030 <cichlid_rotate_right_32@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0xb,%esi
call   1030 <cichlid_rotate_right_32@plt>
mov    %eax,%ebp
xor    %r14d,%ebp
mov    %ebx,%edi
mov    $0x19,%esi
call   1030 <cichlid_rotate_right_32@plt>
xor    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @Sigma1(i32 %0) {
%2 = tail call i32 @cichlid_rotate_right_32(i32 %0, i32 6)
%3 = tail call i32 @cichlid_rotate_right_32(i32 %0, i32 11)
%4 = xor i32 %3, %2
%5 = tail call i32 @cichlid_rotate_right_32(i32 %0, i32 25)
%6 = xor i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ muggle_parity_gen(int);
int /*<<< orphan*/ printf(char *);
void output_even_parity() {
  printf("even parity\n");
  muggle_parity_gen(0x00);
}


x86 assembly (clang, -O0):
<output_even_parity>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1030 <muggle_parity_gen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_even_parity>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <muggle_parity_gen@plt>

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

LLVM IR (-O2):
@str = [12 x i8] c"even parity\00"
define void @output_even_parity() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @muggle_parity_gen(i32 0)
ret void
}
int bitpos2unit(int bitpos) {
  static int units[] = {13, 5, 3, 11, 15, 7, 1, 9, 14, 6, 4, 12, 16, 8, 2, 10};
  return units[bitpos & 0x0f];
}


x86 assembly (clang, -O0):
<bitpos2unit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0x2f19(%rip),%rax
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitpos2unit>:
and    $0xf,%edi
lea    0xef6(%rip),%rax
mov    (%rax,%rdi,4),%eax
ret

LLVM IR (-O0):
@bitpos2unit.units = internal global [16 x i32] [i32 13, i32 5, i32 3, i32 11, i32 15, i32 7, i32 1, i32 9, i32 14, i32 6, i32 4, i32 12, i32 16, i32 8, i32 2, i32 10]
define i32 @bitpos2unit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 15
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [16 x i32], [16 x i32]* @bitpos2unit.units, i64 0, i64 %5
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
@bitpos2unit.units = internal unnamed_addr constant [16 x i32] [i32 13, i32 5, i32 3, i32 11, i32 15, i32 7, i32 1, i32 9, i32 14, i32 6, i32 4, i32 12, i32 16, i32 8, i32 2, i32 10]
define i32 @bitpos2unit(i32 %0) {
%2 = and i32 %0, 15
%3 = zext i32 %2 to i64
%4 = getelementptr inbounds [16 x i32], [16 x i32]* @bitpos2unit.units, i64 0, i64 %3
%5 = load i32, i32* %4
ret i32 %5
}
int func2() { return -42; }


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

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

LLVM IR (-O0):
define i32 @func2() {
ret i32 -42
}

LLVM IR (-O2):
define i32 @func2() {
ret i32 -42
}
/* Variables and functions */
int /*<<< orphan*/ ecp_PointMultiply(unsigned char *, unsigned char const *,
                                     unsigned char *, int);
int /*<<< orphan*/ ecp_TrimSecretKey(unsigned char *);
void curve25519_dh_CreateSharedKey(unsigned char *shared,
                                   const unsigned char *pk, unsigned char *sk) {
  ecp_TrimSecretKey(sk);
  ecp_PointMultiply(shared, pk, sk, 32);
}


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

x86 assembly (clang, -O2):
<curve25519_dh_CreateSharedKey>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1030 <ecp_TrimSecretKey@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    $0x20,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <ecp_PointMultiply@plt>

LLVM IR (-O0):
define void @curve25519_dh_CreateSharedKey(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @ecp_TrimSecretKey(i8* %7)
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = call i32 @ecp_PointMultiply(i8* %9, i8* %10, i8* %11, i32 32)
ret void
}

LLVM IR (-O2):
define void @curve25519_dh_CreateSharedKey(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @ecp_TrimSecretKey(i8* %2)
%5 = tail call i32 @ecp_PointMultiply(i8* %0, i8* %1, i8* %2, i32 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ changemode(int);
int getchar();
scalar_t__ kbhit();
int osd_get_char() {
  changemode(1);
  int ch = -1;
  while (kbhit())
    ch = getchar();
  changemode(0);
  return ch;
}


x86 assembly (clang, -O0):
<osd_get_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1050 <changemode@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    $0x0,%al
call   1030 <kbhit@plt>
cmp    $0x0,%rax
je     1169 <osd_get_char+0x39>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
jmp    1149 <osd_get_char+0x19>
xor    %edi,%edi
call   1050 <changemode@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<osd_get_char>:
push   %rbx
mov    $0x1,%edi
call   1050 <changemode@plt>
xor    %eax,%eax
call   1030 <kbhit@plt>
test   %rax,%rax
je     1167 <osd_get_char+0x37>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <kbhit@plt>
test   %rax,%rax
jne    1150 <osd_get_char+0x20>
jmp    116c <osd_get_char+0x3c>
mov    $0xffffffff,%ebx
xor    %edi,%edi
call   1050 <changemode@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @osd_get_char() {
%1 = tail call i32 @changemode(i32 1)
%2 = tail call i64 (...) @kbhit()
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %0, %4
%5 = tail call i32 (...) @getchar()
%6 = tail call i64 (...) @kbhit()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4, %0
%9 = phi i32 [ -1, %0 ], [ %5, %4 ]
%10 = tail call i32 @changemode(i32 0)
ret i32 %9
}
char pass_char(char arg) { return arg; }


x86 assembly (clang, -O0):
<pass_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i8 @pass_char(i8 returned signext %0) {
ret i8 %0
}
/* Variables and functions */
int /*<<< orphan*/ dst_on_comm(int *, int *, void *, int *, void *, int *, int);
void dist_on_comm_(int *comm, int *typesize, void *inbuf, int *ninbuf,
                   void *outbuf, int *noutbuf) {
  dst_on_comm(comm, typesize, inbuf, ninbuf, outbuf, noutbuf, 1);
}


x86 assembly (clang, -O0):
<dist_on_comm_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%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
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
movl   $0x1,(%rsp)
call   1030 <dst_on_comm@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist_on_comm_>:
push   %rax
movl   $0x1,(%rsp)
call   1030 <dst_on_comm@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @dist_on_comm_(i32* %0, i32* %1, i8* %2, i32* %3, i8* %4, i32* %5) {
%7 = tail call i32 @dst_on_comm(i32* %0, i32* %1, i8* %2, i32* %3, i8* %4, i32* %5, i32 1)
ret void
}
void __ompc_do_nothing(void) {}


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

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

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

LLVM IR (-O2):
define void @__ompc_do_nothing() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mintaka_set_state(int);
void mintaka_set_state_(int *state) { mintaka_set_state(*state); }


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

x86 assembly (clang, -O2):
<mintaka_set_state_>:
mov    (%rdi),%edi
jmp    1030 <mintaka_set_state@plt>

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

LLVM IR (-O2):
define void @mintaka_set_state_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @mintaka_set_state(i32 %2)
ret void
}
/* Variables and functions */
int power(int, int);
int valueToDemux(int value) { return power(2, value % 7); }


x86 assembly (clang, -O0):
<valueToDemux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
mov    $0x2,%edi
call   1030 <power@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valueToDemux>:
movslq %edi,%rax
imul   $0xffffffff92492493,%rax,%rsi
shr    $0x20,%rsi
add    %eax,%esi
mov    %esi,%ecx
shr    $0x1f,%ecx
sar    $0x2,%esi
add    %ecx,%esi
lea    0x0(,%rsi,8),%ecx
sub    %ecx,%esi
add    %eax,%esi
mov    $0x2,%edi
jmp    1030 <power@plt>

LLVM IR (-O0):
define i32 @valueToDemux(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 7
%5 = call i32 @power(i32 2, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @valueToDemux(i32 %0) {
%2 = srem i32 %0, 7
%3 = tail call i32 @power(i32 2, i32 %2)
ret i32 %3
}
/* Variables and functions */
int strlen_recursive(const char *str) {
  return NULL == str ? -1 : '\0' == *str ? 0 : strlen_recursive(str + 1) + 1;
}


x86 assembly (clang, -O0):
<strlen_recursive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
jne    1135 <strlen_recursive+0x25>
mov    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1169 <strlen_recursive+0x59>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1150 <strlen_recursive+0x40>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    1163 <strlen_recursive+0x53>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1030 <strlen_recursive@plt>
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen_recursive>:
test   %rdi,%rdi
je     111c <strlen_recursive+0x1c>
cmpb   $0x0,(%rdi)
je     1122 <strlen_recursive+0x22>
xor    %eax,%eax
nopl   0x0(%rax)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen_recursive+0x10>
ret
mov    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strlen_recursive(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i32 [ %10, %6 ], [ 0, %3 ]
%8 = phi i8* [ %9, %6 ], [ %0, %3 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = add nuw nsw i32 %7, 1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i32 [ -1, %1 ], [ 0, %3 ], [ %10, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ *realpath(char const *, char *);
int stb_fullpath(char *abs, size_t abs_size, const char *rel) {
  return realpath(rel, abs) != NULL;
}


x86 assembly (clang, -O0):
<stb_fullpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <realpath@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_fullpath>:
push   %rax
mov    %rdi,%rsi
mov    %rdx,%rdi
call   1030 <realpath@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @stb_fullpath(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = call i32* @realpath(i8* %7, i8* %8)
%10 = icmp ne i32* %9, null
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @stb_fullpath(i8* %0, i64 %1, i8* nocapture %2) {
%4 = tail call i32* @realpath(i8* %2, i8* %0)
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
ret i32 %6
}
int test_imm_8Auint32_mem(unsigned int *val) {
  return ((*val) & (0x8A << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_8Auint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 138
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int initialize_dobldobl_solution(int k) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc4c(504, &k, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<initialize_dobldobl_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1f8,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_dobldobl_solution>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1f8,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @initialize_dobldobl_solution(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %4
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 504, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @initialize_dobldobl_solution(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 504, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
int tls13_server_certificate_request_recv(struct tls13_ctx *ctx) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.tls13_ctx = type opaque
define i32 @tls13_server_certificate_request_recv(%struct.tls13_ctx* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
size_t _uniqid2index(long uniqid) {
  assert(uniqid != 0);
  return (size_t)(uniqid < 0 ? -2 * uniqid - 2 : 2 * uniqid - 1);
}


x86 assembly (clang, -O0):
<_uniqid2index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x8(%rbp)
jge    114b <_uniqid2index+0x3b>
imul   $0xfffffffffffffffe,-0x8(%rbp),%rax
sub    $0x2,%rax
mov    %rax,-0x10(%rbp)
jmp    115b <_uniqid2index+0x4b>
mov    -0x8(%rbp),%rax
shl    $0x1,%rax
sub    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_uniqid2index>:
push   %rbx
lea    (%rdi,%rdi,1),%rcx
xor    $0xfffffffffffffffe,%rcx
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
lea    -0x1(%rdi,%rdi,1),%rbx
cmovs  %rcx,%rbx
mov    %eax,%edi
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @_uniqid2index(i64 %0) {
%2 = icmp ne i64 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = icmp slt i64 %0, 0
%6 = mul nsw i64 %0, -2
%7 = add nsw i64 %6, -2
%8 = shl nsw i64 %0, 1
%9 = add nsw i64 %8, -1
%10 = select i1 %5, i64 %7, i64 %9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ RB_HALT_SYSTEM;
int /*<<< orphan*/ reboot(int /*<<< orphan*/);
void shutdown() { reboot(RB_HALT_SYSTEM); }


x86 assembly (clang, -O0):
<shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <reboot@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<shutdown>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <reboot@plt>

LLVM IR (-O0):
@RB_HALT_SYSTEM = global i32 0
define void @shutdown() {
%1 = load i32, i32* @RB_HALT_SYSTEM
%2 = call i32 @reboot(i32 %1)
ret void
}

LLVM IR (-O2):
@RB_HALT_SYSTEM = global i32 0
define void @shutdown() {
%1 = load i32, i32* @RB_HALT_SYSTEM
%2 = tail call i32 @reboot(i32 %1)
ret void
}
/* Variables and functions */
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ setbob(int, int);
void basSetBob() {
  int n, scr;
  scr = popNumber();
  n = popNumber();
  pushNumber(setbob(n, scr));
}


x86 assembly (clang, -O0):
<basSetBob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <setbob@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basSetBob>:
push   %rbx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <setbob@plt>
mov    %eax,%edi
pop    %rbx
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basSetBob() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @popNumber()
store i32 %3, i32* %2
%4 = call i32 (...) @popNumber()
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @setbob(i32 %5, i32 %6)
%8 = call i32 @pushNumber(i32 %7)
ret void
}

LLVM IR (-O2):
define void @basSetBob() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 (...) @popNumber()
%3 = tail call i32 @setbob(i32 %2, i32 %1)
%4 = tail call i32 @pushNumber(i32 %3)
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int UINT16_C(int);
uint16_t bswap_u16(uint16_t x) {
  return ((x << 8) & UINT16_C(0xff00)) | ((x >> 8) & UINT16_C(0x00ff));
}


x86 assembly (clang, -O0):
<bswap_u16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    $0xff00,%edi
call   1030 <UINT16_C@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    $0xff,%edi
call   1030 <UINT16_C@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%edx
mov    -0x8(%rbp),%eax
and    %edx,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap_u16>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebp
mov    %edi,%ebx
shl    $0x8,%ebx
mov    $0xff00,%edi
call   1030 <UINT16_C@plt>
mov    %eax,%r14d
and    %ebx,%r14d
sar    $0x8,%ebp
mov    $0xff,%edi
call   1030 <UINT16_C@plt>
and    %ebp,%eax
or     %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @bswap_u16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = call i32 @UINT16_C(i32 65280)
%6 = and i32 %4, %5
%7 = load i32, i32* %2
%8 = ashr i32 %7, 8
%9 = call i32 @UINT16_C(i32 255)
%10 = and i32 %8, %9
%11 = or i32 %6, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @bswap_u16(i32 %0) {
%2 = shl i32 %0, 8
%3 = tail call i32 @UINT16_C(i32 65280)
%4 = and i32 %3, %2
%5 = ashr i32 %0, 8
%6 = tail call i32 @UINT16_C(i32 255)
%7 = and i32 %6, %5
%8 = or i32 %7, %4
ret i32 %8
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ sprintf(char *, char *, int);
char *strdup(char *);
char *regression_get_temp_filename(void) {
  char temp_filename[128];
  sprintf(temp_filename, "/tmp/regression_temp_%d.csv", getpid());
  return strdup(temp_filename);
}


x86 assembly (clang, -O0):
<regression_get_temp_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
lea    -0x80(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x88(%rbp),%rdi
mov    %eax,%edx
lea    0xea3(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x80(%rbp),%rdi
call   1050 <strdup@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regression_get_temp_filename>:
push   %rbx
sub    $0x80,%rsp
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xeba(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %eax,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <strdup@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"/tmp/regression_temp_%d.csv\00"
define i8* @regression_get_temp_filename() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = call i32 (...) @getpid()
%4 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%6 = call i8* @strdup(i8* %5)
ret i8* %6
}

LLVM IR (-O2):
@.str = [28 x i8] c"/tmp/regression_temp_%d.csv\00"
define noalias i8* @regression_get_temp_filename() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (...) @getpid()
%4 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i8* @strdup(i8* %2)
ret i8* %5
}
/* Variables and functions */
int factorial(int);
int nchoosek(int n, int k) {
  int nmk, nf, kf, nmkf;
  int temp;
  nmk = n - k;
  nf = factorial(n);
  kf = factorial(k);
  nmkf = factorial(nmk);
  temp = (int)nf / (kf * nmkf);
  return temp;
}


x86 assembly (clang, -O0):
<nchoosek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0x18(%rbp),%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nchoosek>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
sub    %esi,%ebp
call   1030 <factorial@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1030 <factorial@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <factorial@plt>
mov    %eax,%ecx
imul   %ebx,%ecx
mov    %r14d,%eax
cltd
idiv   %ecx
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @nchoosek(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %3
%14 = call i32 @factorial(i32 %13)
store i32 %14, i32* %6
%15 = load i32, i32* %4
%16 = call i32 @factorial(i32 %15)
store i32 %16, i32* %7
%17 = load i32, i32* %5
%18 = call i32 @factorial(i32 %17)
store i32 %18, i32* %8
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = load i32, i32* %8
%22 = mul nsw i32 %20, %21
%23 = sdiv i32 %19, %22
store i32 %23, i32* %9
%24 = load i32, i32* %9
ret i32 %24
}

LLVM IR (-O2):
define i32 @nchoosek(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = tail call i32 @factorial(i32 %0)
%5 = tail call i32 @factorial(i32 %1)
%6 = tail call i32 @factorial(i32 %3)
%7 = mul nsw i32 %6, %5
%8 = sdiv i32 %4, %7
ret i32 %8
}