xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  void strcpyArray(char *, char *);
  char t[] = "Hello, World!";
  char s[100];
  strcpyArray(s, t);
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xebf(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x80(%rbp),%rdi
lea    -0x12(%rbp),%rsi
call   1040 <strcpyArray@plt>
lea    -0x80(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
movabs $0x21646c726f5720,%rax
mov    %rax,0x6(%rsp)
movabs $0x57202c6f6c6c6548,%rax
2c 20 57
mov    %rax,(%rsp)
lea    0x10(%rsp),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <strcpyArray@plt>
lea    0xeb2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.t = [14 x i8] c"Hello, World!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
%3 = alloca [100 x i8]
store i32 0, i32* %1
%4 = bitcast [14 x i8]* %2 to i8*
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.t = [14 x i8] c"Hello, World!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char const *);
int /*<<< orphan*/ *fopen_anycase(char const *, char const *, char const *);
FILE *fopen_with_error(const char *fn, const char *mode, const char *routine) {
  FILE *fp;
  fp = fopen(fn, mode);
  if (fp != NULL)
    return fp;
  return fopen_anycase(fn, mode, routine);
}


x86 assembly (clang, -O0):
<fopen_with_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     115d <fopen_with_error+0x3d>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1172 <fopen_with_error+0x52>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <fopen_anycase@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fopen_with_error>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <fopen@plt>
test   %rax,%rax
je     113e <fopen_with_error+0x1e>
pop    %rbx
pop    %r14
pop    %r15
ret
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <fopen_anycase@plt>

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

LLVM IR (-O2):
define i32* @fopen_with_error(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32* @fopen(i8* %0, i8* %1)
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32* @fopen_anycase(i8* %0, i8* %1, i8* %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32* [ %7, %6 ], [ %4, %3 ]
ret i32* %9
}
/* Variables and functions */
scalar_t__ asprintf(char **, char *, unsigned int);
int /*<<< orphan*/ xerror(char *);
char *xuitoa(unsigned int i) {
  char *s;
  if (asprintf(&s, "%u", i) < 0)
    xerror("asprintf");
  return s;
}


x86 assembly (clang, -O0):
<xuitoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    -0x10(%rbp),%rdi
lea    0xec7(%rip),%rsi
call   1040 <asprintf@plt>
cmp    $0x0,%rax
jge    1154 <xuitoa+0x34>
lea    0xeb4(%rip),%rdi
call   1030 <xerror@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xuitoa>:
push   %rax
mov    %edi,%edx
lea    0xed6(%rip),%rsi
mov    %rsp,%rdi
call   1040 <asprintf@plt>
test   %rax,%rax
jns    1143 <xuitoa+0x23>
lea    0xec5(%rip),%rdi
call   1030 <xerror@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
@.str.1 = [9 x i8] c"asprintf\00"
define i8* @xuitoa(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @asprintf(i8** %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @xerror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
@.str.1 = [9 x i8] c"asprintf\00"
define i8* @xuitoa(i32 %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @asprintf(i8** %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @xerror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = load i8*, i8** %2
ret i8* %9
}
void gf8mul_01010001(void) {
  __asm__ __volatile__("\tpxor    %xmm7, %xmm6\n"
                       "\tpxor    %xmm7, %xmm5\n"
                       "\tpxor    %xmm7, %xmm3\n"
                       "\tpxor    %xmm7, %xmm2\n"
                       "\tpxor    %xmm7, %xmm1\n"
                       "\tpxor    %xmm7, %xmm0\n"
                       "\tpxor    %xmm6, %xmm7\n"
                       "\tpxor    %xmm6, %xmm4\n"
                       "\tpxor    %xmm7, %xmm6\n"
                       "\tpxor    %xmm5, %xmm6\n"
                       "\tpxor    %xmm5, %xmm3\n"
                       "\tpxor    %xmm6, %xmm5\n"
                       "\tpxor    %xmm4, %xmm5\n"
                       "\tpxor    %xmm4, %xmm2\n"
                       "\tpxor    %xmm5, %xmm4\n"
                       "\tpxor    %xmm3, %xmm4\n"
                       "\tpxor    %xmm3, %xmm1\n"
                       "\tpxor    %xmm4, %xmm3\n"
                       "\tpxor    %xmm2, %xmm3\n"
                       "\tpxor    %xmm2, %xmm0\n"
                       "\tpxor    %xmm3, %xmm2\n"
                       "\tpxor    %xmm1, %xmm7\n"
                       "\tpxor    %xmm1, %xmm5\n"
                       "\tpxor    %xmm0, %xmm6\n"
                       "\tpxor    %xmm0, %xmm4\n");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pxor   %xmm7,%xmm6
pxor   %xmm7,%xmm5
pxor   %xmm7,%xmm3
pxor   %xmm7,%xmm2
pxor   %xmm7,%xmm1
pxor   %xmm7,%xmm0
pxor   %xmm6,%xmm7
pxor   %xmm6,%xmm4
pxor   %xmm7,%xmm6
pxor   %xmm5,%xmm6
pxor   %xmm5,%xmm3
pxor   %xmm6,%xmm5
pxor   %xmm4,%xmm5
pxor   %xmm4,%xmm2
pxor   %xmm5,%xmm4
pxor   %xmm3,%xmm4
pxor   %xmm3,%xmm1
pxor   %xmm4,%xmm3
pxor   %xmm2,%xmm3
pxor   %xmm2,%xmm0
pxor   %xmm3,%xmm2
pxor   %xmm1,%xmm7
pxor   %xmm1,%xmm5
pxor   %xmm0,%xmm6
pxor   %xmm0,%xmm4
pop    %rbp
ret

x86 assembly (clang, -O2):
pxor   %xmm7,%xmm6
pxor   %xmm7,%xmm5
pxor   %xmm7,%xmm3
pxor   %xmm7,%xmm2
pxor   %xmm7,%xmm1
pxor   %xmm7,%xmm0
pxor   %xmm6,%xmm7
pxor   %xmm6,%xmm4
pxor   %xmm7,%xmm6
pxor   %xmm5,%xmm6
pxor   %xmm5,%xmm3
pxor   %xmm6,%xmm5
pxor   %xmm4,%xmm5
pxor   %xmm4,%xmm2
pxor   %xmm5,%xmm4
pxor   %xmm3,%xmm4
pxor   %xmm3,%xmm1
pxor   %xmm4,%xmm3
pxor   %xmm2,%xmm3
pxor   %xmm2,%xmm0
pxor   %xmm3,%xmm2
pxor   %xmm1,%xmm7
pxor   %xmm1,%xmm5
pxor   %xmm0,%xmm6
pxor   %xmm0,%xmm4
ret

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

LLVM IR (-O2):
define void @gf8mul_01010001() {
tail call void asm sideeffect "\09pxor %xmm7, %xmm6\0A\09pxor %xmm7, %xmm5\0A\09pxor %xmm7, %xmm3\0A\09pxor %xmm7, %xmm2\0A\09pxor %xmm7, %xmm1\0A\09pxor %xmm7, %xmm0\0A\09pxor %xmm6, %xmm7\0A\09pxor %xmm6, %xmm4\0A\09pxor %xmm7, %xmm6\0A\09pxor %xmm5, %xmm6\0A\09pxor %xmm5, %xmm3\0A\09pxor %xmm6, %xmm5\0A\09pxor %xmm4, %xmm5\0A\09pxor %xmm4, %xmm2\0A\09pxor %xmm5, %xmm4\0A\09pxor %xmm3, %xmm4\0A\09pxor %xmm3, %xmm1\0A\09pxor %xmm4, %xmm3\0A\09pxor %xmm2, %xmm3\0A\09pxor %xmm2, %xmm0\0A\09pxor %xmm3, %xmm2\0A\09pxor %xmm1, %xmm7\0A\09pxor %xmm1, %xmm5\0A\09pxor %xmm0, %xmm6\0A\09pxor %xmm0, %xmm4\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
unsigned long asm_bt(const unsigned long *f, unsigned long i) {
  unsigned long ret;
  asm("btq  %2, %1 \n"
      "sbbq %0, %0"
      : "=r"(ret)
      : "m"(*f), "r"(i));
  return ret;
}


x86 assembly (clang, -O0):
<asm_bt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
bt     %rcx,(%rax)
sbb    %rax,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<asm_bt>:
bt     %rsi,(%rdi)
sbb    %rax,%rax
ret

LLVM IR (-O0):
define i64 @asm_bt(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%6 = load i64*, i64** %3
%7 = load i64, i64* %4
%8 = call i64 asm "btq $2, $1 \0Asbbq $0, $0", "=r,*m,r,~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %6, i64 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
ret i64 %9
}

LLVM IR (-O2):
define i64 @asm_bt(i64* %0, i64 %1) {
%3 = tail call i64 asm "btq $2, $1 \0Asbbq $0, $0", "=r,*m,r,~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %0, i64 %1)
ret i64 %3
}
int g_DUMMY_popup_messagebox2(int win_id, char *title, char *message,
                              char *button1text, char *button2text) {
  win_id = win_id;
  title = title;
  message = message;
  button1text = button1text;
  button2text = button2text;
  return 2;
}


x86 assembly (clang, -O0):
<g_DUMMY_popup_messagebox2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0x2,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @g_DUMMY_popup_messagebox2(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4) {
ret i32 2
}
int test_imm_A1int64_midword_reg(long long val) {
  return ((val >> 16) & (0xA1 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_A1int64_midword_reg>:
test   $0xa10000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A1int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 161
%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_A1int64_midword_reg(i64 %0) {
%2 = and i64 %0, 10551296
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int MCL_CURRENT;
int MCL_FUTURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ mlockall(int);
int /*<<< orphan*/ perror(char *);
void __attribute__((constructor)) init() {
  if (mlockall(MCL_CURRENT | MCL_FUTURE)) {
    perror("mlockall");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    0x2eac(%rip),%rax
or     (%rax),%edi
call   1030 <mlockall@plt>
cmp    $0x0,%rax
je     116f <init+0x3f>
lea    0xea4(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    0x2eb1(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <mlockall@plt>
test   %rax,%rax
jne    114f <init+0x1f>
pop    %rax
ret
lea    0xeaa(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@MCL_CURRENT = global i32 0
@MCL_FUTURE = global i32 0
@.str = [9 x i8] c"mlockall\00"
@EXIT_FAILURE = global i32 0
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @init, i8* null }]
define void @init() {
%1 = load i32, i32* @MCL_CURRENT
%2 = load i32, i32* @MCL_FUTURE
%3 = or i32 %1, %2
%4 = call i64 @mlockall(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %0
ret void
}

LLVM IR (-O2):
@MCL_CURRENT = global i32 0
@MCL_FUTURE = global i32 0
@.str = [9 x i8] c"mlockall\00"
@EXIT_FAILURE = global i32 0
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @init, i8* null }]
define void @init() {
%1 = load i32, i32* @MCL_CURRENT
%2 = load i32, i32* @MCL_FUTURE
%3 = or i32 %2, %1
%4 = tail call i64 @mlockall(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %0
%7 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ voronoi(float, float, float, float *, float *, int,
                           int /*<<< orphan*/);
float voronoi_F2S(float x, float y, float z) {
  float da[4], pa[12];
  voronoi(x, y, z, da, pa, 1, 0);
  return (2.0f * da[1] - 1.0f);
}


x86 assembly (clang, -O0):
<voronoi_F2S>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
lea    -0x20(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <voronoi@plt>
movss  -0x1c(%rbp),%xmm0
addss  %xmm0,%xmm0
movss  0xea5(%rip),%xmm1
addss  %xmm1,%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<voronoi_F2S>:
sub    $0x48,%rsp
mov    %rsp,%rdi
lea    0x10(%rsp),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <voronoi@plt>
movss  0x4(%rsp),%xmm0
addss  %xmm0,%xmm0
addss  0xec6(%rip),%xmm0
add    $0x48,%rsp
ret

LLVM IR (-O0):
define float @voronoi_F2S(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca [4 x float]
%8 = alloca [12 x float]
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%9 = load float, float* %4
%10 = load float, float* %5
%11 = load float, float* %6
%12 = getelementptr inbounds [4 x float], [4 x float]* %7, i64 0, i64 0
%13 = getelementptr inbounds [12 x float], [12 x float]* %8, i64 0, i64 0
%14 = call i32 @voronoi(float %9, float %10, float %11, float* %12, float* %13, i32 1, i32 0)
%15 = getelementptr inbounds [4 x float], [4 x float]* %7, i64 0, i64 1
%16 = load float, float* %15
%17 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %16, float -1.000000e+00)
ret float %17
}

LLVM IR (-O2):
define float @voronoi_F2S(float %0, float %1, float %2) {
%4 = alloca [4 x float]
%5 = alloca [12 x float]
%6 = bitcast [4 x float]* %4 to i8*
%7 = bitcast [12 x float]* %5 to i8*
%8 = getelementptr inbounds [4 x float], [4 x float]* %4, i64 0, i64 0
%9 = getelementptr inbounds [12 x float], [12 x float]* %5, i64 0, i64 0
%10 = call i32 @voronoi(float %0, float %1, float %2, float* %8, float* %9, i32 1, i32 0)
%11 = getelementptr inbounds [4 x float], [4 x float]* %4, i64 0, i64 1
%12 = load float, float* %11
%13 = call float @llvm.fmuladd.f32(float %12, float 2.000000e+00, float -1.000000e+00)
ret float %13
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void uDMAChannelSelectDefault(uint32_t ui32DefPeriphs) {
  (*((volatile unsigned long *)(0x400FF500))) &= ~ui32DefPeriphs;
}


x86 assembly (clang, -O0):
<uDMAChannelSelectDefault>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
mov    $0x400ff500,%ecx
mov    (%rcx),%rcx
and    %rax,%rcx
mov    $0x400ff500,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAChannelSelectDefault>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
not    %rax
and    %rax,0x400ff500
40
ret

LLVM IR (-O0):
define void @uDMAChannelSelectDefault(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1074787584 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074787584 to i64*)
ret void
}

LLVM IR (-O2):
define void @uDMAChannelSelectDefault(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1074787584 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074787584 to i64*)
ret void
}
/* Type definitions */
struct pdf_obj {
  int dummy;
};
struct pdf_name_tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pdf_add_tree_element(struct pdf_name_tree *,
                                        struct pdf_obj *, struct pdf_obj *);
struct pdf_obj *pdf_new_string(char *);
void pdf_add_name_tree_element(struct pdf_name_tree *tree, char *key,
                               struct pdf_obj *val) {
  struct pdf_obj *key_obj = pdf_new_string(key);
  pdf_add_tree_element(tree, key_obj, val);
}


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

x86 assembly (clang, -O2):
<pdf_add_name_tree_element>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <pdf_new_string@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <pdf_add_tree_element@plt>

LLVM IR (-O0):
%struct.pdf_name_tree = type { i32 }
%struct.pdf_obj = type { i32 }
define void @pdf_add_name_tree_element(%struct.pdf_name_tree* %0, i8* %1, %struct.pdf_obj* %2) {
%4 = alloca %struct.pdf_name_tree*
%5 = alloca i8*
%6 = alloca %struct.pdf_obj*
%7 = alloca %struct.pdf_obj*
store %struct.pdf_name_tree* %0, %struct.pdf_name_tree** %4
store i8* %1, i8** %5
store %struct.pdf_obj* %2, %struct.pdf_obj** %6
%8 = load i8*, i8** %5
%9 = call %struct.pdf_obj* @pdf_new_string(i8* %8)
store %struct.pdf_obj* %9, %struct.pdf_obj** %7
%10 = load %struct.pdf_name_tree*, %struct.pdf_name_tree** %4
%11 = load %struct.pdf_obj*, %struct.pdf_obj** %7
%12 = load %struct.pdf_obj*, %struct.pdf_obj** %6
%13 = call i32 @pdf_add_tree_element(%struct.pdf_name_tree* %10, %struct.pdf_obj* %11, %struct.pdf_obj* %12)
ret void
}

LLVM IR (-O2):
%struct.pdf_name_tree = type { i32 }
%struct.pdf_obj = type { i32 }
define void @pdf_add_name_tree_element(%struct.pdf_name_tree* %0, i8* %1, %struct.pdf_obj* %2) {
%4 = tail call %struct.pdf_obj* @pdf_new_string(i8* %1)
%5 = tail call i32 @pdf_add_tree_element(%struct.pdf_name_tree* %0, %struct.pdf_obj* %4, %struct.pdf_obj* %2)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ run_test(char *, int, char **);
int test_blanks(int argc, char **argv) {
  char *args[] = {"./shell", NULL};
  run_test("/bin/echo hello\n\n   \nexit\n", 1, args);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<test_blanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdx
lea    0xec8(%rip),%rdi
mov    $0x1,%esi
call   1030 <run_test@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_blanks>:
sub    $0x18,%rsp
movaps 0x2ce5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xee2(%rip),%rdi
mov    %rsp,%rdx
mov    $0x1,%esi
call   1030 <run_test@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"./shell\00"
@__const.test_blanks.args = [2 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [27 x i8] c"/bin/echo hello\0A\0A \0Aexit\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @test_blanks(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [2 x i8*]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = bitcast [2 x i8*]* %5 to i8*
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 0
%8 = call i32 @run_test(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 1, i8** %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@.str = [8 x i8] c"./shell\00"
@__const.test_blanks.args = [2 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [27 x i8] c"/bin/echo hello\0A\0A \0Aexit\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @test_blanks(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [2 x i8*]
%4 = bitcast [2 x i8*]* %3 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%6 = call i32 @run_test(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 1, i8** %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
void irq_adv_tx_ready(void) {}


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

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

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

LLVM IR (-O2):
define void @irq_adv_tx_ready() {
ret void
}
int process_dsyn_fin() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @process_dsyn_fin() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int ply_type_check(void) {
  assert(sizeof(char) == 1);
  assert(sizeof(unsigned char) == 1);
  assert(sizeof(short) == 2);
  assert(sizeof(unsigned short) == 2);
  assert(sizeof(long) == 4);
  assert(sizeof(unsigned long) == 4);
  assert(sizeof(float) == 4);
  assert(sizeof(double) == 8);
  if (sizeof(char) != 1)
    return 0;
  if (sizeof(unsigned char) != 1)
    return 0;
  if (sizeof(short) != 2)
    return 0;
  if (sizeof(unsigned short) != 2)
    return 0;
  if (sizeof(long) != 4)
    return 0;
  if (sizeof(unsigned long) != 4)
    return 0;
  if (sizeof(float) != 4)
    return 0;
  if (sizeof(double) != 8)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<ply_type_check>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ply_type_check>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ply_type_check() {
%1 = call i32 @assert(i32 1)
%2 = call i32 @assert(i32 1)
%3 = call i32 @assert(i32 1)
%4 = call i32 @assert(i32 1)
%5 = call i32 @assert(i32 0)
%6 = call i32 @assert(i32 0)
%7 = call i32 @assert(i32 1)
%8 = call i32 @assert(i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @ply_type_check() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 @assert(i32 0)
%6 = tail call i32 @assert(i32 0)
%7 = tail call i32 @assert(i32 1)
%8 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stdout;
int vfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int vprintf(const char *format, va_list args) {
  return vfprintf(stdout, format, args);
}


x86 assembly (clang, -O0):
<vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vprintf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @vprintf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @vfprintf(i32 %5, i8* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @vprintf(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
int adis16240_initialize_ring(struct iio_ring_buffer *ring) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iio_ring_buffer = type opaque
define i32 @adis16240_initialize_ring(%struct.iio_ring_buffer* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ hpet_init();
int /*<<< orphan*/ test2();
int main() {
  if (hpet_init()) {
    return 1;
  }
  test2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <hpet_init@plt>
cmp    $0x0,%rax
je     114c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    115a <main+0x3a>
mov    $0x0,%al
call   1040 <test2@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <hpet_init@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <main+0x17>
pop    %rcx
ret
xor    %eax,%eax
call   1040 <test2@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @hpet_init()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @test2()
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ 0, %3 ], [ 1, %0 ]
ret i32 %6
}
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ config_compute_prefix_max_length_all_buffers();
int /*<<< orphan*/ gui_window_ask_refresh(int);
void config_change_prefix_align_min(void *data,
                                    struct t_config_option *option) {
  (void)data;
  (void)option;
  config_compute_prefix_max_length_all_buffers();
  gui_window_ask_refresh(1);
}


x86 assembly (clang, -O0):
<config_change_prefix_align_min>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <config_compute_prefix_max_length_all_buffers@plt>
mov    $0x1,%edi
call   1040 <gui_window_ask_refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_change_prefix_align_min>:
push   %rax
xor    %eax,%eax
call   1030 <config_compute_prefix_max_length_all_buffers@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <gui_window_ask_refresh@plt>

LLVM IR (-O0):
%struct.t_config_option = type { i32 }
define void @config_change_prefix_align_min(i8* %0, %struct.t_config_option* %1) {
%3 = alloca i8*
%4 = alloca %struct.t_config_option*
store i8* %0, i8** %3
store %struct.t_config_option* %1, %struct.t_config_option** %4
%5 = load i8*, i8** %3
%6 = load %struct.t_config_option*, %struct.t_config_option** %4
%7 = call i32 (...) @config_compute_prefix_max_length_all_buffers()
%8 = call i32 @gui_window_ask_refresh(i32 1)
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @config_change_prefix_align_min(i8* nocapture readnone %0, %struct.t_config_option* nocapture readnone %1) {
%3 = tail call i32 (...) @config_compute_prefix_max_length_all_buffers()
%4 = tail call i32 @gui_window_ask_refresh(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display(int *, int);
int /*<<< orphan*/ heap_sort(int *, int);
int main() {
  int n = 11;
  int a[] = {55, 3, 2, 5, 77, 44, 65, 53, 88, 31, 9};
  display(a, n);
  heap_sort(a, n);
  display(a, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xb,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x2c,%edx
call   1050 <memcpy@plt>
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <display@plt>
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <heap_sort@plt>
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <display@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
movups 0xef0(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xb,%esi
call   1040 <display@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
call   1030 <heap_sort@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
call   1040 <display@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [11 x i32] [i32 55, i32 3, i32 2, i32 5, i32 77, i32 44, i32 65, i32 53, i32 88, i32 31, i32 9]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [11 x i32]
store i32 0, i32* %1
store i32 11, i32* %2
%4 = bitcast [11 x i32]* %3 to i8*
%5 = getelementptr inbounds [11 x i32], [11 x i32]* %3, i64 0, i64 0
%6 = load i32, i32* %2
%7 = call i32 @display(i32* %5, i32 %6)
%8 = getelementptr inbounds [11 x i32], [11 x i32]* %3, i64 0, i64 0
%9 = load i32, i32* %2
%10 = call i32 @heap_sort(i32* %8, i32 %9)
%11 = getelementptr inbounds [11 x i32], [11 x i32]* %3, i64 0, i64 0
%12 = load i32, i32* %2
%13 = call i32 @display(i32* %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [11 x i32] [i32 55, i32 3, i32 2, i32 5, i32 77, i32 44, i32 65, i32 53, i32 88, i32 31, i32 9]
define i32 @main() {
%1 = alloca [11 x i32]
%2 = bitcast [11 x i32]* %1 to i8*
%3 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%4 = call i32 @display(i32* %3, i32 11)
%5 = call i32 @heap_sort(i32* %3, i32 11)
%6 = call i32 @display(i32* %3, i32 11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
void print_vector(int n, int *v) {
  int i;
  for (i = 0; i < n; i++)
    printf("%d ", v[i]);
  puts("");
}


x86 assembly (clang, -O0):
<print_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1167 <print_vector+0x47>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <print_vector+0x16>
lea    0xe95(%rip),%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_vector>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1155 <print_vector+0x35>
mov    %rsi,%r15
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_vector+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [1 x i8] zeroinitializer
define void @print_vector(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 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_vector(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %1, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct datafile_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_clear(struct genlist *);
void datafile_list_clear(struct datafile_list *tthis) {
  genlist_clear(((struct genlist *)(tthis)));
}


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

x86 assembly (clang, -O2):
<datafile_list_clear>:
jmp    1030 <genlist_clear@plt>

LLVM IR (-O0):
%struct.datafile_list = type { i32 }
%struct.genlist = type { i32 }
define void @datafile_list_clear(%struct.datafile_list* %0) {
%2 = alloca %struct.datafile_list*
store %struct.datafile_list* %0, %struct.datafile_list** %2
%3 = load %struct.datafile_list*, %struct.datafile_list** %2
%4 = bitcast %struct.datafile_list* %3 to %struct.genlist*
%5 = call i32 @genlist_clear(%struct.genlist* %4)
ret void
}

LLVM IR (-O2):
%struct.datafile_list = type { i32 }
%struct.genlist = type { i32 }
define void @datafile_list_clear(%struct.datafile_list* %0) {
%2 = bitcast %struct.datafile_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_clear(%struct.genlist* %2)
ret void
}
int unObfuscateAtom(int at) {
  if (at < 0)
    at = (-at + 3) / 3;
  else
    at = (at + 3) / 3;
  return (at);
}


x86 assembly (clang, -O0):
<unObfuscateAtom>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1129 <unObfuscateAtom+0x29>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    113a <unObfuscateAtom+0x3a>
mov    -0x4(%rbp),%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unObfuscateAtom>:
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
add    $0x3,%ecx
mov    $0xaaaaaaab,%eax
imul   %rcx,%rax
shr    $0x21,%rax
ret

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

LLVM IR (-O2):
define i32 @unObfuscateAtom(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%3 = add nuw nsw i32 %2, 3
%4 = udiv i32 %3, 3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 1;
  while (i <= 1000) {
    printf("%i\n", i);
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jg     1150 <main+0x40>
mov    -0x8(%rbp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x3e9,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 1001
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn88() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn88");
  return result;
}


x86 assembly (clang, -O0):
<fn88>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn88>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn88\00"
define i8* @fn88() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn88\00"
define i8* @fn88() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
int execute_unlinkat() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_unlinkat() {
ret i32 0
}
char a_lower(char c) { return (c >= 'A' && c <= 'Z') ? c + ('a' - 'A') : c; }


x86 assembly (clang, -O0):
<a_lower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1133 <a_lower+0x33>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
jg     1133 <a_lower+0x33>
movsbl -0x1(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <a_lower+0x3a>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @a_lower(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = add nsw i32 %12, 32
br label %17
14: ; preds = %6, %1
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
br label %17
17: ; preds = %14, %10
%18 = phi i32 [ %13, %10 ], [ %16, %14 ]
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @a_lower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
unsigned short get_unaligned_uint16(void *p) {
  struct {
    unsigned short d;
  } __attribute__((packed)) *pp = (void *)p;
  return pp->d;
}


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

x86 assembly (clang, -O2):
<get_unaligned_uint16>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
%struct.anon = type { i16 }
define zeroext i16 @get_unaligned_uint16(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.anon*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.anon*
store %struct.anon* %5, %struct.anon** %3
%6 = load %struct.anon*, %struct.anon** %3
%7 = getelementptr inbounds %struct.anon, %struct.anon* %6, i32 0, i32 0
%8 = load i16, i16* %7
ret i16 %8
}

LLVM IR (-O2):
define zeroext i16 @get_unaligned_uint16(i8* nocapture %0) {
%2 = bitcast i8* %0 to i16*
%3 = load i16, i16* %2
ret i16 %3
}
/* Variables and functions */
int /*<<< orphan*/ luaL_check_lstr(int, int /*<<< orphan*/);
int /*<<< orphan*/ lua_getglobal(int /*<<< orphan*/);
int /*<<< orphan*/ lua_pushobject(int /*<<< orphan*/);
void getglobal(void) {
  lua_pushobject(lua_getglobal((luaL_check_lstr((1), 0))));
}


x86 assembly (clang, -O0):
<getglobal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <luaL_check_lstr@plt>
mov    %eax,%edi
call   1030 <lua_getglobal@plt>
mov    %eax,%edi
call   1050 <lua_pushobject@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getglobal>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <luaL_check_lstr@plt>
mov    %eax,%edi
call   1030 <lua_getglobal@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <lua_pushobject@plt>

LLVM IR (-O0):
define void @getglobal() {
%1 = call i32 @luaL_check_lstr(i32 1, i32 0)
%2 = call i32 @lua_getglobal(i32 %1)
%3 = call i32 @lua_pushobject(i32 %2)
ret void
}

LLVM IR (-O2):
define void @getglobal() {
%1 = tail call i32 @luaL_check_lstr(i32 1, i32 0)
%2 = tail call i32 @lua_getglobal(i32 %1)
%3 = tail call i32 @lua_pushobject(i32 %2)
ret void
}
void check_memory_gf_conf_c(void) {}


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

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

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

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

/* Variables and functions */
void dib_image_decode(FILE *inf) {}


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

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

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

LLVM IR (-O2):
define void @dib_image_decode(i32* nocapture %0) {
ret void
}