xunge/DecIR huggingface dataset:
char *midstr2(astr, start, len)
char *astr;
int start, len;
{
  static char tempstr[255];
  char *startptr, *endptr;
  strcpy(tempstr, astr);
  startptr = (char *)((long)(tempstr) + start - 1);
  endptr = (char *)((long)(tempstr) + start + len - 1);
  strcpy(endptr, "\0");
  return startptr;
}


x86 assembly (clang, -O0):
<midstr2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2f13(%rip),%rdi
call   1030 <strcpy@plt>
movslq -0xc(%rbp),%rcx
lea    0x2f03(%rip),%rax
add    %rcx,%rax
sub    $0x1,%rax
mov    %rax,-0x18(%rbp)
movslq -0xc(%rbp),%rcx
lea    0x2eed(%rip),%rax
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
add    %rcx,%rax
sub    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xe90(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<midstr2>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rsi
lea    0x2f1d(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
movslq %ebp,%rcx
lea    (%rcx,%rbx,1),%rax
add    $0xffffffffffffffff,%rax
add    %rcx,%rbx
movslq %r14d,%rcx
movb   $0x0,-0x1(%rcx,%rbx,1)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@midstr2.tempstr = internal global [255 x i8] zeroinitializer
@.str = [2 x i8] zeroinitializer
define i8* @midstr2(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i8*, i8** %4
%10 = call i8* @strcpy(i8* getelementptr inbounds ([255 x i8], [255 x i8]* @midstr2.tempstr, i64 0, i64 0), i8* %9)
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = add nsw i64 ptrtoint ([255 x i8]* @midstr2.tempstr to i64), %12
%14 = sub nsw i64 %13, 1
%15 = inttoptr i64 %14 to i8*
store i8* %15, i8** %7
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = add nsw i64 ptrtoint ([255 x i8]* @midstr2.tempstr to i64), %17
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = add nsw i64 %18, %20
%22 = sub nsw i64 %21, 1
%23 = inttoptr i64 %22 to i8*
store i8* %23, i8** %8
%24 = load i8*, i8** %8
%25 = call i8* @strcpy(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%26 = load i8*, i8** %7
ret i8* %26
}

LLVM IR (-O2):
@midstr2.tempstr = internal global [255 x i8] zeroinitializer
define i8* @midstr2(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i8* @strcpy(i8* dereferenceable(1) getelementptr inbounds ([255 x i8], [255 x i8]* @midstr2.tempstr, i64 0, i64 0), i8* dereferenceable(1) %0)
%5 = sext i32 %1 to i64
%6 = add i64 %5, add (i64 ptrtoint ([255 x i8]* @midstr2.tempstr to i64), i64 -1)
%7 = inttoptr i64 %6 to i8*
%8 = sext i32 %2 to i64
%9 = add i64 %6, %8
%10 = inttoptr i64 %9 to i8*
store i8 0, i8* %10
ret i8* %7
}
/* Variables and functions */
int rand();
int foo(int a) {
  int b;
  int i;
  int res = 0;
  b = rand() % 65536;
  for (i = 0; i < b; i++)
    res += a;
  return res % 65536;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x10000,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115e <foo+0x4e>
mov    -0x4(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113b <foo+0x2b>
mov    -0x10(%rbp),%eax
mov    $0x10000,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
lea    0xffff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffff0000,%ecx
sub    %ecx,%eax
test   %eax,%eax
jle    114d <foo+0x3d>
imul   %ebx,%eax
lea    0xffff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffff0000,%ecx
sub    %ecx,%eax
mov    %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %5
%6 = call i32 (...) @rand()
%7 = srem i32 %6, 65536
store i32 %7, i32* %3
store i32 0, i32* %4
br label %8
8: ; preds = %16, %1
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load i32, i32* %2
%14 = load i32, i32* %5
%15 = add nsw i32 %14, %13
store i32 %15, i32* %5
br label %16
16: ; preds = %12
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
br label %8
19: ; preds = %8
%20 = load i32, i32* %5
%21 = srem i32 %20, 65536
ret i32 %21
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 65536
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = mul i32 %3, %0
%7 = srem i32 %6, 65536
br label %8
8: ; preds = %5, %1
%9 = phi i32 [ 0, %1 ], [ %7, %5 ]
ret i32 %9
}
int bcmp(b1, b2, length)
register char *b1;
register char *b2;
register int length;
{
  while (length-- > 0)
    if (*b1++ != *b2++)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<bcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1c(%rbp)
cmp    $0x0,%eax
jle    1160 <bcmp+0x60>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     115b <bcmp+0x5b>
movl   $0x1,-0x4(%rbp)
jmp    1167 <bcmp+0x67>
jmp    110f <bcmp+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcmp>:
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   %edx,%edx
jle    112e <bcmp+0x2e>
add    $0xffffffff,%edx
movzbl (%rdi,%rcx,1),%r8d
lea    0x1(%rcx),%r9
cmp    (%rsi,%rcx,1),%r8b
mov    %r9,%rcx
je     1110 <bcmp+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @bcmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
br label %4
4: ; preds = %9, %3
%5 = phi i8* [ %0, %3 ], [ %11, %9 ]
%6 = phi i8* [ %1, %3 ], [ %13, %9 ]
%7 = phi i32 [ %2, %3 ], [ %10, %9 ]
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %4
%10 = add nsw i32 %7, -1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = load i8, i8* %5
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %6
%15 = icmp eq i8 %12, %14
br i1 %15, label %4, label %16
16: ; preds = %4, %9
%17 = phi i32 [ 1, %9 ], [ 0, %4 ]
ret i32 %17
}
void computeComputedConstants(double *variables) {}


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

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

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

LLVM IR (-O2):
define void @computeComputedConstants(double* nocapture %0) {
ret void
}
/* Variables and functions */
int japi_scrollpane(int);
int j_scrollpane(int arg0) { return (japi_scrollpane(arg0)); }


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

x86 assembly (clang, -O2):
<j_scrollpane>:
jmp    1030 <japi_scrollpane@plt>

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

LLVM IR (-O2):
define i32 @j_scrollpane(i32 %0) {
%2 = tail call i32 @japi_scrollpane(i32 %0)
ret i32 %2
}
unsigned int my_umod(unsigned int a, unsigned int b) { return a % b; }


x86 assembly (clang, -O0):
<my_umod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_umod>:
mov    %edi,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @my_umod(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = urem i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @my_umod(i32 %0, i32 %1) {
%3 = urem i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, unsigned int, unsigned int);
void Sys_MemSet(char *dst, unsigned val, unsigned bytes) {
  memset(dst, val, bytes);
}


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

x86 assembly (clang, -O2):
<Sys_MemSet>:
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @Sys_MemSet(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @memset(i8* %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void protected_func(void) {
  char buf[8];
  strncpy(buf, "abcdefghijklmnop", 17);
}


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

x86 assembly (clang, -O2):
<protected_func>:
push   %rax
lea    0xee8(%rip),%rsi
mov    %rsp,%rdi
mov    $0x11,%edx
call   1030 <strncpy@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"abcdefghijklmnop\00"
define void @protected_func() {
%1 = alloca [8 x i8]
%2 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%3 = call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 17)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"abcdefghijklmnop\00"
define void @protected_func() {
%1 = alloca [8 x i8]
%2 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%3 = call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 17)
ret void
}
int min_i(int a, int b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<min_i>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <min_i+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min_i+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_i>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min_i(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
char getchar();
int custom_getline(char *str, int max) {
  int i;
  char c;
  char *p = str;
  while ((c = getchar()) != '\n') {
    *(str++) = c;
  }
  *str = '\0';
  return str - p;
}


x86 assembly (clang, -O0):
<custom_getline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x11(%rbp)
movsbl %al,%eax
cmp    $0xa,%eax
je     1156 <custom_getline+0x46>
mov    -0x11(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1127 <custom_getline+0x17>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<custom_getline>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %r14,%rbx
cmp    $0xa,%al
je     1141 <custom_getline+0x31>
mov    %r14,%rbx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rbx)
add    $0x1,%rbx
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1130 <custom_getline+0x20>
movb   $0x0,(%rbx)
sub    %r14d,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @custom_getline(i8* %0, i32 %1) {
%3 = tail call signext i8 (...) @getchar()
%4 = icmp eq i8 %3, 10
br i1 %4, label %11, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %9, %5 ], [ %3, %2 ]
%7 = phi i8* [ %8, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %7
%9 = tail call signext i8 (...) @getchar()
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %5
11: ; preds = %5, %2
%12 = phi i8* [ %0, %2 ], [ %8, %5 ]
store i8 0, i8* %12
%13 = ptrtoint i8* %12 to i64
%14 = ptrtoint i8* %0 to i64
%15 = sub i64 %13, %14
%16 = trunc i64 %15 to i32
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ lsx_safe_rdft_f(int, int, float *);
void forward(int length, void *setup, float *H) {
  lsx_safe_rdft_f(length, 1, H);
  (void)setup;
}


x86 assembly (clang, -O0):
<forward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    $0x1,%esi
call   1030 <lsx_safe_rdft_f@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forward>:
mov    $0x1,%esi
jmp    1030 <lsx_safe_rdft_f@plt>

LLVM IR (-O0):
define void @forward(i32 %0, i8* %1, float* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca float*
store i32 %0, i32* %4
store i8* %1, i8** %5
store float* %2, float** %6
%7 = load i32, i32* %4
%8 = load float*, float** %6
%9 = call i32 @lsx_safe_rdft_f(i32 %7, i32 1, float* %8)
%10 = load i8*, i8** %5
ret void
}

LLVM IR (-O2):
define void @forward(i32 %0, i8* nocapture readnone %1, float* %2) {
%4 = tail call i32 @lsx_safe_rdft_f(i32 %0, i32 1, float* %2)
ret void
}
int sushu() {
  int i = 0;
  int j = 13;
  while (j) {
    for (i = 2; i < j; i++) {
      if (!(j % i))
        break;
    }
    if (i == j)
      break;
    j--;
  }
  return j;
}


x86 assembly (clang, -O0):
<sushu>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xd,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1176 <sushu+0x76>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1157 <sushu+0x57>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
cmp    $0x0,%edx
jne    1144 <sushu+0x44>
jmp    1157 <sushu+0x57>
jmp    1149 <sushu+0x49>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1123 <sushu+0x23>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1168 <sushu+0x68>
jmp    1176 <sushu+0x76>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <sushu+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sushu>:
mov    $0xd,%ecx
mov    $0xfffffff5,%esi
mov    $0x2,%edi
cmp    $0x3,%ecx
jb     1140 <sushu+0x40>
mov    $0x2,%edi
nopl   0x0(%rax)
mov    %ecx,%eax
xor    %edx,%edx
div    %edi
test   %edx,%edx
je     1140 <sushu+0x40>
lea    (%rsi,%rdi,1),%eax
add    $0x1,%eax
mov    %edi,%edx
add    $0x1,%edx
mov    %edx,%edi
cmp    $0x2,%eax
jne    1120 <sushu+0x20>
jmp    114e <sushu+0x4e>
xchg   %ax,%ax
cmp    %ecx,%edi
je     114e <sushu+0x4e>
add    $0x1,%esi
add    $0xffffffff,%ecx
jne    110a <sushu+0xa>
xor    %ecx,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @sushu() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 13, i32* %2
br label %3
3: ; preds = %26, %0
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %29
6: ; preds = %3
store i32 2, i32* %1
br label %7
7: ; preds = %18, %6
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i32, i32* %2
%13 = load i32, i32* %1
%14 = srem i32 %12, %13
%15 = icmp ne i32 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %11
br label %21
17: ; preds = %11
br label %18
18: ; preds = %17
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
br label %7
21: ; preds = %16, %7
%22 = load i32, i32* %1
%23 = load i32, i32* %2
%24 = icmp eq i32 %22, %23
br i1 %24, label %25, label %26
25: ; preds = %21
br label %29
26: ; preds = %21
%27 = load i32, i32* %2
%28 = add nsw i32 %27, -1
store i32 %28, i32* %2
br label %3
29: ; preds = %25, %3
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @sushu() {
br label %1
1: ; preds = %0, %14
%2 = phi i32 [ 13, %0 ], [ %15, %14 ]
%3 = icmp ugt i32 %2, 2
br i1 %3, label %4, label %11
4: ; preds = %1, %8
%5 = phi i32 [ %9, %8 ], [ 2, %1 ]
%6 = urem i32 %2, %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %4
%9 = add nuw nsw i32 %5, 1
%10 = icmp eq i32 %9, %2
br i1 %10, label %17, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 2, %1 ], [ %5, %4 ]
%13 = icmp eq i32 %12, %2
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = add nsw i32 %2, -1
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %1
17: ; preds = %11, %14, %8
%18 = phi i32 [ %2, %8 ], [ 0, %14 ], [ %2, %11 ]
ret i32 %18
}
double _contrast(double x) { return x * x * (3 - 2 * x); }


x86 assembly (clang, -O0):
<_contrast>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xedc(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_contrast>:
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm0,%xmm0
movsd  0xeec(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @_contrast(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %6, double 3.000000e+00)
%8 = fmul double %5, %7
ret double %8
}

LLVM IR (-O2):
define double @_contrast(double %0) {
%2 = fmul double %0, %0
%3 = tail call double @llvm.fmuladd.f64(double %0, double -2.000000e+00, double 3.000000e+00)
%4 = fmul double %2, %3
ret double %4
}
void sysfs_remove_link(struct kobject *kobj, const char *name) {}


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

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

LLVM IR (-O0):
%struct.kobject = type opaque
define void @sysfs_remove_link(%struct.kobject* %0, i8* %1) {
%3 = alloca %struct.kobject*
%4 = alloca i8*
store %struct.kobject* %0, %struct.kobject** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.kobject = type opaque
define void @sysfs_remove_link(%struct.kobject* nocapture %0, i8* nocapture %1) {
ret void
}
void free_comm_schedule(int **sched, int npes) {
  if (sched) {
    int i;
    for (i = 0; i < npes; ++i)
      free(sched[i]);
    free(sched);
  }
}


x86 assembly (clang, -O0):
<free_comm_schedule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1165 <free_comm_schedule+0x55>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115c <free_comm_schedule+0x4c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1131 <free_comm_schedule+0x21>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_comm_schedule>:
test   %rdi,%rdi
je     114f <free_comm_schedule+0x3f>
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_comm_schedule+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_comm_schedule+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @free_comm_schedule(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 = icmp ne i32** %6, null
br i1 %7, label %8, label %26
8: ; preds = %2
store i32 0, i32* %5
br label %9
9: ; preds = %20, %8
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %23
13: ; preds = %9
%14 = load i32**, i32*** %3
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32*, i32** %14, i64 %16
%18 = load i32*, i32** %17
%19 = bitcast i32* %18 to i8*
br label %20
20: ; preds = %13
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %9
23: ; preds = %9
%24 = load i32**, i32*** %3
%25 = bitcast i32** %24 to i8*
br label %26
26: ; preds = %23, %2
ret void
}

LLVM IR (-O2):
define void @free_comm_schedule(i32** %0, i32 %1) {
%3 = icmp eq i32** %0, null
br i1 %3, label %17, label %4
4: ; preds = %2
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %15
6: ; preds = %4
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %13, %8 ]
%10 = getelementptr inbounds i32*, i32** %0, i64 %9
%11 = bitcast i32** %10 to i8**
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8, %4
%16 = bitcast i32** %0 to i8*
tail call void @free(i8* %16)
br label %17
17: ; preds = %15, %2
ret void
}
void mpp_recv_int(int *data, int size, int from_pe) {}


x86 assembly (clang, -O0):
<mpp_recv_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mpp_recv_int(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @mpp_recv_int(i32* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int base_width;
};
typedef TYPE_1__ XSizeHints;

/* Variables and functions */
void set_XSizeHints_base_width(void *_p, int _v) {
  ((XSizeHints *)_p)->base_width = (int)_v;
}


x86 assembly (clang, -O0):
<set_XSizeHints_base_width>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XSizeHints_base_width>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XSizeHints_base_width(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XSizeHints_base_width(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int basecmp(char *, char *, int, int);
int dircmp(char *s1, char *s2) { return basecmp(s1, s2, 1, 1); }


x86 assembly (clang, -O0):
<dircmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <basecmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dircmp>:
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1030 <basecmp@plt>

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

LLVM IR (-O2):
define i32 @dircmp(i8* %0, i8* %1) {
%3 = tail call i32 @basecmp(i8* %0, i8* %1, i32 1, i32 1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef int int16_t;

/* Variables and functions */
int se16(uint16_t x) { return (int16_t)x; }


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

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

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

LLVM IR (-O2):
define i32 @se16(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ _gcd(int /*<<< orphan*/, int /*<<< orphan*/);
uint32_t gcd_three(uint32_t *triangle) {
  return _gcd(triangle[0], _gcd(triangle[1], triangle[2]));
}


x86 assembly (clang, -O0):
<gcd_three>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%esi
call   1030 <_gcd@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1030 <_gcd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd_three>:
push   %rbx
mov    (%rdi),%ebx
mov    0x4(%rdi),%eax
mov    0x8(%rdi),%esi
mov    %eax,%edi
call   1030 <_gcd@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <_gcd@plt>

LLVM IR (-O0):
define i32 @gcd_three(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 2
%11 = load i32, i32* %10
%12 = call i32 @_gcd(i32 %8, i32 %11)
%13 = call i32 @_gcd(i32 %5, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @gcd_three(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = tail call i32 @_gcd(i32 %4, i32 %6)
%8 = tail call i32 @_gcd(i32 %2, i32 %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int value1, value2, sum;
  value1 = 10;
  value2 = 20;
  sum = value1 + value2;
  printf("The sum of %i and %i is %#X\n", value1, value2, sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [29 x i8] c"The sum of %i and %i is %#X\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 20, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = add nsw i32 %5, %6
store i32 %7, i32* %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"The sum of %i and %i is %#X\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 10, i32 20, i32 30)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/);
__attribute__((no, noclone)) unsigned long f2(unsigned long x,
                                              unsigned long y) {
  unsigned long r = x - y;
  if (r < x)
    foo(0);
  return r;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1141 <f2+0x31>
xor    %edi,%edi
call   1030 <foo@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rbx
mov    %rdi,%rbx
sub    %rsi,%rbx
cmp    %rdi,%rbx
jae    1123 <f2+0x13>
xor    %edi,%edi
call   1030 <foo@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @f2(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 = sub i64 %6, %7
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = load i64, i64* %3
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @foo(i32 0)
br label %14
14: ; preds = %12, %2
%15 = load i64, i64* %5
ret i64 %15
}

LLVM IR (-O2):
define i64 @f2(i64 %0, i64 %1) {
%3 = sub i64 %0, %1
%4 = icmp ult i64 %3, %0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @foo(i32 0)
br label %7
7: ; preds = %5, %2
ret i64 %3
}
const char *match_eos(const char *p) {
  if (!p)
    return 0;
  return *p ? 0 : p;
}


x86 assembly (clang, -O0):
<match_eos>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <match_eos+0x20>
movq   $0x0,-0x8(%rbp)
jmp    114b <match_eos+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113b <match_eos+0x3b>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1143 <match_eos+0x43>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_eos>:
xor    %eax,%eax
test   %rdi,%rdi
je     110e <match_eos+0xe>
cmpb   $0x0,(%rdi)
cmove  %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @match_eos(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
%6 = select i1 %5, i8* %0, i8* null
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ croak(char *);
void bail_to_command_line() { croak("panic: gnuplot"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"panic: gnuplot\00"
define void @bail_to_command_line() {
%1 = call i32 @croak(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"panic: gnuplot\00"
define void @bail_to_command_line() {
%1 = tail call i32 @croak(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ifline();
void preprocess() {
  char c, sname[127];
  int k;
  ifline();
  return;
}


x86 assembly (clang, -O0):
<preprocess>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    $0x0,%al
call   1030 <ifline@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<preprocess>:
xor    %eax,%eax
jmp    1030 <ifline@plt>

LLVM IR (-O0):
define void @preprocess() {
%1 = alloca i8
%2 = alloca [127 x i8]
%3 = alloca i32
%4 = call i32 (...) @ifline()
ret void
}

LLVM IR (-O2):
define void @preprocess() {
%1 = tail call i32 (...) @ifline()
ret void
}
/* Variables and functions */
scalar_t__ cos(float);
float cosf(float x) { return (float)cos(x); }


x86 assembly (clang, -O0):
<cosf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <cos@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosf>:
push   %rax
call   1030 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @cosf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @cos(float %3)
%5 = sitofp i64 %4 to float
ret float %5
}

LLVM IR (-O2):
define float @cosf(float %0) {
%2 = tail call i64 @cos(float %0)
%3 = sitofp i64 %2 to float
ret float %3
}
void missed_deadline_handler() {}


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

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

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

LLVM IR (-O2):
define void @missed_deadline_handler() {
ret void
}
/* Variables and functions */
char *luaI_buffer(size_t);
int /*<<< orphan*/ strcpy(char *, char *);
size_t strlen(char *);
char *lua_strconc(char *l, char *r) {
  size_t nl = strlen(l);
  char *buffer = luaI_buffer(nl + strlen(r) + 1);
  strcpy(buffer, l);
  strcpy(buffer + nl, r);
  return buffer;
}


x86 assembly (clang, -O0):
<lua_strconc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   1050 <luaI_buffer@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rdi
add    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lua_strconc>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
call   1040 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%rbx,%rax,1),%rdi
add    $0x1,%rdi
call   1050 <luaI_buffer@plt>
mov    %rax,%r12
mov    %rax,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
add    %r12,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @lua_strconc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = load i8*, i8** %4
%11 = call i64 @strlen(i8* %10)
%12 = add i64 %9, %11
%13 = add i64 %12, 1
%14 = call i8* @luaI_buffer(i64 %13)
store i8* %14, i8** %6
%15 = load i8*, i8** %6
%16 = load i8*, i8** %3
%17 = call i32 @strcpy(i8* %15, i8* %16)
%18 = load i8*, i8** %6
%19 = load i64, i64* %5
%20 = getelementptr inbounds i8, i8* %18, i64 %19
%21 = load i8*, i8** %4
%22 = call i32 @strcpy(i8* %20, i8* %21)
%23 = load i8*, i8** %6
ret i8* %23
}

LLVM IR (-O2):
define i8* @lua_strconc(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %3, 1
%6 = add i64 %5, %4
%7 = tail call i8* @luaI_buffer(i64 %6)
%8 = tail call i32 @strcpy(i8* %7, i8* %0)
%9 = getelementptr inbounds i8, i8* %7, i64 %3
%10 = tail call i32 @strcpy(i8* %9, i8* %1)
ret i8* %7
}
int compare_floats(const void *x, const void *y) {
  float xx = *(float *)x, yy = *(float *)y;
  if (xx < yy)
    return -1;
  if (xx > yy)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<compare_floats>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm1
movss  -0x20(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1145 <compare_floats+0x45>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <compare_floats+0x67>
movss  -0x1c(%rbp),%xmm0
ucomiss -0x20(%rbp),%xmm0
jbe    1160 <compare_floats+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1167 <compare_floats+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_floats>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
seta   %cl
ucomiss %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_floats(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp olt float %4, %6
%8 = fcmp ogt float %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void PrintArgs(char *name) {
  fprintf(stderr,
          "                                                   \n"
          "Usage: %s [OPTIONS] < input > output               \n"
          "                                                   \n"
          "  -k <int>       Window size (sw) to filter QS,    \n"
          "  -w <int>       Minimum average QS with k-sw.     \n"
          "  -m <int>       Minimum quality score ascii (33). \n"
          "                                                   \n"
          "It works for Reverse chain (Paired End reads).     \n"
          "                                                   \n",
          name);
}


x86 assembly (clang, -O0):
<PrintArgs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintArgs>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [469 x i8] c" \0AUsage: %s [OPTIONS] < input > output \0A \0A -k <int> Window size (sw) to filter QS, \0A -w <int> Minimum average QS with k-sw. \0A -m <int> Minimum quality score ascii (33). \0A \0AIt works for Reverse chain (Paired End reads). \0A \0A\00"
define void @PrintArgs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([469 x i8], [469 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [469 x i8] c" \0AUsage: %s [OPTIONS] < input > output \0A \0A -k <int> Window size (sw) to filter QS, \0A -w <int> Minimum average QS with k-sw. \0A -m <int> Minimum quality score ascii (33). \0A \0AIt works for Reverse chain (Paired End reads). \0A \0A\00"
define void @PrintArgs(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([469 x i8], [469 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct ndarrayFunctionObject {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ndarrayFunctionObject *);
void stdlib_ndarray_function_free(struct ndarrayFunctionObject *obj) {
  if (obj == NULL) {
    return;
  }
  free(obj);
}


x86 assembly (clang, -O0):
<stdlib_ndarray_function_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <stdlib_ndarray_function_free+0x1c>
jmp    1135 <stdlib_ndarray_function_free+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_ndarray_function_free>:
test   %rdi,%rdi
je     111a <stdlib_ndarray_function_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.ndarrayFunctionObject = type { i32 }
define void @stdlib_ndarray_function_free(%struct.ndarrayFunctionObject* %0) {
%2 = alloca %struct.ndarrayFunctionObject*
store %struct.ndarrayFunctionObject* %0, %struct.ndarrayFunctionObject** %2
%3 = load %struct.ndarrayFunctionObject*, %struct.ndarrayFunctionObject** %2
%4 = icmp eq %struct.ndarrayFunctionObject* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load %struct.ndarrayFunctionObject*, %struct.ndarrayFunctionObject** %2
%8 = call i32 @free(%struct.ndarrayFunctionObject* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.ndarrayFunctionObject = type { i32 }
define void @stdlib_ndarray_function_free(%struct.ndarrayFunctionObject* %0) {
%2 = icmp eq %struct.ndarrayFunctionObject* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.ndarrayFunctionObject* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
float ANTweenTimingFunctionCubicIn(float, int /*<<< orphan*/, int, float);
float ANTweenProgressTimingFunctionCubicIn(float time, float duration) {
  return ANTweenTimingFunctionCubicIn(time, 0, 1, duration);
}


x86 assembly (clang, -O0):
<ANTweenProgressTimingFunctionCubicIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <ANTweenTimingFunctionCubicIn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANTweenProgressTimingFunctionCubicIn>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <ANTweenTimingFunctionCubicIn@plt>

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

LLVM IR (-O2):
define float @ANTweenProgressTimingFunctionCubicIn(float %0, float %1) {
%3 = tail call float @ANTweenTimingFunctionCubicIn(float %0, i32 0, i32 1, float %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *strstr(char *, char *);
extern int str_rm(char *s, char *t) {
  char *p = strstr(s, t);
  if (!p)
    return 0;
  strcpy(p, p + strlen(t));
  return 1;
}


x86 assembly (clang, -O0):
<str_rm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1168 <str_rm+0x38>
movl   $0x0,-0x4(%rbp)
jmp    119a <str_rm+0x6a>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdi
cltq
add    %rax,%rsi
call   1030 <strcpy@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_rm>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1050 <strstr@plt>
test   %rax,%rax
je     1161 <str_rm+0x31>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
movslq %eax,%rsi
add    %rbx,%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    $0x1,%eax
jmp    1163 <str_rm+0x33>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @str_rm(i8* %0, i8* %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i32 @strlen(i8* %1)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %3, i64 %7
%9 = tail call i32 @strcpy(i8* %3, i8* %8)
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %11
}