xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ defmac(char *);
void initmac(void) {
  defmac("cpm\t1");
  defmac("I8080\t1");
  defmac("RMAC\t1");
  defmac("smallc\t1");
}


x86 assembly (clang, -O0):
<initmac>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <defmac@plt>
lea    0xedf(%rip),%rdi
call   1030 <defmac@plt>
lea    0xedb(%rip),%rdi
call   1030 <defmac@plt>
lea    0xed6(%rip),%rdi
call   1030 <defmac@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initmac>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <defmac@plt>
lea    0xee2(%rip),%rdi
call   1030 <defmac@plt>
lea    0xede(%rip),%rdi
call   1030 <defmac@plt>
lea    0xed9(%rip),%rdi
pop    %rax
jmp    1030 <defmac@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"cpm\091\00"
@.str.1 = [8 x i8] c"I8080\091\00"
@.str.2 = [7 x i8] c"RMAC\091\00"
@.str.3 = [9 x i8] c"smallc\091\00"
define void @initmac() {
%1 = call i32 @defmac(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @defmac(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @defmac(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @defmac(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"cpm\091\00"
@.str.1 = [8 x i8] c"I8080\091\00"
@.str.2 = [7 x i8] c"RMAC\091\00"
@.str.3 = [9 x i8] c"smallc\091\00"
define void @initmac() {
%1 = tail call i32 @defmac(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @defmac(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @defmac(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @defmac(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}
unsigned char sf_priority(char *chr) {
  switch (*chr) {
  case 'f':
    return 0x60;
  case '^':
    return 0x40;
  case '/':
  case '*':
    return 0x20;
  case '+':
  case '-':
    return 0x00;
  default:
    return 0x80;
  }
}


x86 assembly (clang, -O0):
<sf_priority>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x2a,%eax
je     1187 <sf_priority+0x87>
jmp    1120 <sf_priority+0x20>
mov    -0x14(%rbp),%eax
sub    $0x2b,%eax
je     1190 <sf_priority+0x90>
jmp    1131 <sf_priority+0x31>
mov    -0x14(%rbp),%eax
sub    $0x2d,%eax
je     1190 <sf_priority+0x90>
jmp    1142 <sf_priority+0x42>
mov    -0x14(%rbp),%eax
sub    $0x2f,%eax
je     1187 <sf_priority+0x87>
jmp    1153 <sf_priority+0x53>
mov    -0x14(%rbp),%eax
sub    $0x5e,%eax
je     117e <sf_priority+0x7e>
jmp    1164 <sf_priority+0x64>
mov    -0x14(%rbp),%eax
sub    $0x66,%eax
jne    1199 <sf_priority+0x99>
jmp    1175 <sf_priority+0x75>
movb   $0x60,-0x1(%rbp)
jmp    119d <sf_priority+0x9d>
movb   $0x40,-0x1(%rbp)
jmp    119d <sf_priority+0x9d>
movb   $0x20,-0x1(%rbp)
jmp    119d <sf_priority+0x9d>
movb   $0x0,-0x1(%rbp)
jmp    119d <sf_priority+0x9d>
movb   $0x80,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sf_priority>:
movsbl (%rdi),%eax
lea    -0x2a(%rax),%ecx
cmp    $0x5,%ecx
ja     111e <sf_priority+0x1e>
lea    0xeee(%rip),%rax
movslq (%rax,%rcx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0x20,%al
ret
cmp    $0x66,%eax
je     1131 <sf_priority+0x31>
cmp    $0x5e,%eax
jne    112e <sf_priority+0x2e>
mov    $0x40,%al
ret
xor    %eax,%eax
ret
mov    $0x80,%al
ret
mov    $0x60,%al
ret

LLVM IR (-O0):
define zeroext i8 @sf_priority(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
switch i32 %6, label %11 [
i32 102, label %7
i32 94, label %8
i32 47, label %9
i32 42, label %9
i32 43, label %10
i32 45, label %10
]
7: ; preds = %1
store i8 96, i8* %2
br label %12
8: ; preds = %1
store i8 64, i8* %2
br label %12
9: ; preds = %1, %1
store i8 32, i8* %2
br label %12
10: ; preds = %1, %1
store i8 0, i8* %2
br label %12
11: ; preds = %1
store i8 -128, i8* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7
%13 = load i8, i8* %2
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @sf_priority(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
switch i32 %3, label %7 [
i32 102, label %8
i32 94, label %4
i32 47, label %5
i32 42, label %5
i32 43, label %6
i32 45, label %6
]
4: ; preds = %1
br label %8
5: ; preds = %1, %1
br label %8
6: ; preds = %1, %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %6, %5, %4
%9 = phi i8 [ -128, %7 ], [ 0, %6 ], [ 32, %5 ], [ 64, %4 ], [ 96, %1 ]
ret i8 %9
}
/* Variables and functions */
int hashStr(char const *);
char *strrchr(char const *, char);
int hashExt(const char *filename) {
  int result = 0;
  const char *p;
  p = strrchr(filename, '.');
  if (p != NULL) {
    result = hashStr(++p);
  }
  return result;
}


x86 assembly (clang, -O0):
<hashExt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1164 <hashExt+0x44>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x18(%rbp)
call   1040 <hashStr@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashExt>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     113d <hashExt+0x1d>
add    $0x1,%rax
mov    %rax,%rdi
pop    %rax
jmp    1040 <hashStr@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @hashExt(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 1
%6 = tail call i32 @hashStr(i8* %5)
br label %7
7: ; preds = %4, %1
%8 = phi i32 [ %6, %4 ], [ 0, %1 ]
ret i32 %8
}
void XConnectionNumber() {}


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

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

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

LLVM IR (-O2):
define void @XConnectionNumber() {
ret void
}
/* Variables and functions */
scalar_t__ isComment(char *);
int /*<<< orphan*/ *strstr(char *, char *);
int isParamLine(char *str) {
  if (isComment(str)) {
    return 0;
  }
  return strstr(str, "PARAM") != NULL;
}


x86 assembly (clang, -O0):
<isParamLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <isComment@plt>
cmp    $0x0,%rax
je     114b <isParamLine+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    116a <isParamLine+0x4a>
mov    -0x10(%rbp),%rdi
lea    0xeaa(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isParamLine>:
push   %rbx
mov    %rdi,%rbx
call   1030 <isComment@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <isParamLine+0x15>
pop    %rbx
ret
lea    0xec4(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"PARAM\00"
define i32 @isParamLine(i8* %0) {
%2 = tail call i64 @isComment(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ malloc(long);
int /*<<< orphan*/ nrerror(char *);
int *ivector(long nl, long nh) {
  int *v;
  v = (int *)malloc((nh - nl + 1) * sizeof(int));
  if (!v)
    nrerror("allocation failure in ivector()");
  return v - nl;
}


x86 assembly (clang, -O0):
<ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x1,%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1160 <ivector+0x40>
lea    0xea5(%rip),%rdi
call   1030 <nrerror@plt>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %rdi,%rsi
lea    0x4(,%rsi,4),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114b <ivector+0x2b>
lea    0xeba(%rip),%rdi
call   1030 <nrerror@plt>
shl    $0x2,%r14
sub    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in ivector()\00"
define i32* @ivector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 1
%10 = mul i64 %9, 4
%11 = call i64 @malloc(i64 %10)
%12 = inttoptr i64 %11 to i32*
store i32* %12, i32** %5
%13 = load i32*, i32** %5
%14 = icmp ne i32* %13, null
br i1 %14, label %17, label %15
15: ; preds = %2
%16 = call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %2
%18 = load i32*, i32** %5
%19 = load i64, i64* %3
%20 = sub i64 0, %19
%21 = getelementptr inbounds i32, i32* %18, i64 %20
ret i32* %21
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in ivector()\00"
define i32* @ivector(i64 %0, i64 %1) {
%3 = sub nsw i64 %1, %0
%4 = shl i64 %3, 2
%5 = add i64 %4, 4
%6 = tail call i64 @malloc(i64 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = inttoptr i64 %6 to i32*
%12 = sub i64 0, %0
%13 = getelementptr inbounds i32, i32* %11, i64 %12
ret i32* %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int elementals_func(void) {
  printf("Hello world\n");
  return (0);
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello world\00"
define i32 @elementals_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int libc_strcmp(const char *p1, const char *p2) {
  while (1) {
    int ch1 = *p1++;
    int ch2 = *p2++;
    int ret = ch2 - ch1;
    if (ret == 0 && ch1 == 0)
      return 0;
    if (ret)
      return ret;
  }
}


x86 assembly (clang, -O0):
<libc_strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    115f <libc_strcmp+0x5f>
cmpl   $0x0,-0x1c(%rbp)
jne    115f <libc_strcmp+0x5f>
movl   $0x0,-0x4(%rbp)
jmp    1179 <libc_strcmp+0x79>
cmpl   $0x0,-0x24(%rbp)
je     1174 <libc_strcmp+0x74>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1179 <libc_strcmp+0x79>
jmp    110c <libc_strcmp+0xc>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<libc_strcmp>:
xor    %r8d,%r8d
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl (%rdi,%rdx,1),%r9d
movsbl (%rsi,%rdx,1),%ecx
sub    %r9d,%ecx
cmovne %ecx,%eax
sete   %r10b
or     %r9d,%ecx
cmove  %r8d,%eax
sete   %cl
xor    %r10b,%cl
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <libc_strcmp+0x10>
ret

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

LLVM IR (-O2):
define i32 @libc_strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %10, %3 ]
%5 = phi i8* [ %0, %2 ], [ %7, %3 ]
%6 = phi i32 [ undef, %2 ], [ %18, %3 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = load i8, i8* %5
%9 = sext i8 %8 to i32
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = load i8, i8* %4
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, %9
%14 = icmp eq i32 %13, 0
%15 = icmp eq i8 %8, 0
%16 = select i1 %14, i1 %15, i1 false
%17 = select i1 %14, i32 %6, i32 %13
%18 = select i1 %16, i32 0, i32 %17
%19 = xor i1 %14, %16
br i1 %19, label %3, label %20
20: ; preds = %3
ret i32 %18
}
void free_matrix(unsigned int **m, unsigned int nr) {
  if (nr > 1) {
    unsigned int i;
    for (i = 0; i < nr; i++)
      free(m[i]);
    free(m);
  }
}


x86 assembly (clang, -O0):
<free_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jbe    1163 <free_matrix+0x53>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    115a <free_matrix+0x4a>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <free_matrix+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @free_matrix(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* %4
%7 = icmp ugt i32 %6, 1
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 ult i32 %10, %11
br i1 %12, label %13, label %23
13: ; preds = %9
%14 = load i32**, i32*** %3
%15 = load i32, i32* %5
%16 = zext 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 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_matrix(i32** nocapture %0, i32 %1) {
%3 = icmp ugt i32 %1, 1
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %0, i64 %7
%9 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6
%14 = bitcast i32** %0 to i8*
tail call void @free(i8* %14)
br label %15
15: ; preds = %13, %2
ret void
}
int do_992() { return 992; }


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

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

LLVM IR (-O0):
define i32 @do_992() {
ret i32 992
}

LLVM IR (-O2):
define i32 @do_992() {
ret i32 992
}
unsigned long strlen(char *str) {
  unsigned long count = 0;
  while (str[count] != 0)
    count++;
  return count;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1136 <strlen+0x36>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
void av_ripemd_alloc() {}


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

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

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

LLVM IR (-O2):
define void @av_ripemd_alloc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void editorClearScreen() {
  write(STDOUT_FILENO, "\x1b[2J", 4);
  write(STDOUT_FILENO, "\x1b[H", 3);
}


x86 assembly (clang, -O0):
<editorClearScreen>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<editorClearScreen>:
push   %rbx
mov    0x2ed8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%rbx),%edi
lea    0xed1(%rip),%rsi
mov    $0x3,%edx
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [4 x i8] c"\1B[H\00"
define void @editorClearScreen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = call i32 @write(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @write(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [4 x i8] c"\1B[H\00"
define void @editorClearScreen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = load i32, i32* @STDOUT_FILENO
%4 = tail call i32 @write(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret void
}
unsigned int prime_rand(void) {
  static unsigned int stb__rand = 1;
  stb__rand = stb__rand * 2147001325 + 715136305;
  return 0x31415926 ^ ((stb__rand >> 16) + (stb__rand << 16));
}


x86 assembly (clang, -O0):
<prime_rand>:
push   %rbp
mov    %rsp,%rbp
imul   $0x7ff8a3ed,0x2f12(%rip),%eax
a3 f8 7f
add    $0x2aa01d31,%eax
mov    %eax,0x2f07(%rip)
mov    0x2f01(%rip),%eax
shr    $0x10,%eax
mov    0x2ef8(%rip),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
xor    $0x31415926,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prime_rand>:
imul   $0x7ff8a3ed,0x2f16(%rip),%eax
a3 f8 7f
add    $0x2aa01d31,%eax
mov    %eax,0x2f0b(%rip)
rol    $0x10,%eax
xor    $0x31415926,%eax
ret

LLVM IR (-O0):
@prime_rand.stb__rand = internal global i32 1
define i32 @prime_rand() {
%1 = load i32, i32* @prime_rand.stb__rand
%2 = mul i32 %1, 2147001325
%3 = add i32 %2, 715136305
store i32 %3, i32* @prime_rand.stb__rand
%4 = load i32, i32* @prime_rand.stb__rand
%5 = lshr i32 %4, 16
%6 = load i32, i32* @prime_rand.stb__rand
%7 = shl i32 %6, 16
%8 = add i32 %5, %7
%9 = xor i32 826366246, %8
ret i32 %9
}

LLVM IR (-O2):
@prime_rand.stb__rand = internal unnamed_addr global i32 1
define i32 @prime_rand() {
%1 = load i32, i32* @prime_rand.stb__rand
%2 = mul i32 %1, 2147001325
%3 = add i32 %2, 715136305
store i32 %3, i32* @prime_rand.stb__rand
%4 = tail call i32 @llvm.fshl.i32(i32 %3, i32 %3, i32 16)
%5 = xor i32 %4, 826366246
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void DisplayUsage(char *programName) {
  printf("\nSYNOPSIS\n    %s [-at] [t-target]\n", programName);
  printf("\nDESCRIPTION\n    Demo command line parser\n\n");
}


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

x86 assembly (clang, -O2):
<DisplayUsage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeea(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"\0ASYNOPSIS\0A %s [-at] [t-target]\0A\00"
@.str.1 = [44 x i8] c"\0ADESCRIPTION\0A Demo command line parser\0A\0A\00"
define void @DisplayUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"\0ASYNOPSIS\0A %s [-at] [t-target]\0A\00"
@str = [43 x i8] c"\0ADESCRIPTION\0A Demo command line parser\0A\00"
define void @DisplayUsage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int atol(char *);
int /*<<< orphan*/ free(char *);
char *get_cpu_str(char const *, int);
int get_cpu_int(const char *item, int cpuid) {
  char *fc = NULL;
  int ret = 0;
  fc = get_cpu_str(item, cpuid);
  if (fc) {
    ret = atol(fc);
    free(fc);
  }
  return ret;
}


x86 assembly (clang, -O0):
<get_cpu_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <get_cpu_str@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     117e <get_cpu_int+0x4e>
mov    -0x18(%rbp),%rdi
call   1040 <atol@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cpu_int>:
push   %rbp
push   %rbx
push   %rax
call   1050 <get_cpu_str@plt>
test   %rax,%rax
je     1156 <get_cpu_int+0x26>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <atol@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
jmp    1158 <get_cpu_int+0x28>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @get_cpu_int(i8* %0, i32 %1) {
%3 = tail call i8* @get_cpu_str(i8* %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @atol(i8* %3)
%7 = tail call i32 @free(i8* %3)
br label %8
8: ; preds = %5, %2
%9 = phi i32 [ %6, %5 ], [ 0, %2 ]
ret i32 %9
}
void foo057(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo057(i32 %0) {
ret void
}
RCU_DEF_DESTROY_FUNC(user_f5_destroy, param) { RCU_FAIL("user_f5_destroy"); }


x86 assembly (clang, -O0):
<RCU_DEF_DESTROY_FUNC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <RCU_FAIL@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RCU_DEF_DESTROY_FUNC>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <RCU_FAIL@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"user_f5_destroy\00"
define i32 @RCU_DEF_DESTROY_FUNC(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @RCU_FAIL to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
@.str = [16 x i8] c"user_f5_destroy\00"
define i32 @RCU_DEF_DESTROY_FUNC(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @RCU_FAIL to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int acx1_write(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int aw(char *str) { return acx1_write(str, strlen(str)); }


x86 assembly (clang, -O0):
<aw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <acx1_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aw>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <acx1_write@plt>

LLVM IR (-O0):
define i32 @aw(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @acx1_write(i8* %3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @aw(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @acx1_write(i8* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ pthread_yield();
int main() {
  while (1)
    pthread_yield();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <pthread_yield@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <pthread_yield@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @pthread_yield()
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @pthread_yield()
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ __infer_nondet_int();
wint_t fputwc(wchar_t c, FILE *stream) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @fputwc(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = call i32 (...) @__infer_nondet_int()
ret i32 %5
}

LLVM IR (-O2):
define i32 @fputwc(i32 %0, i32* nocapture readnone %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t adjust_seed_8(uint32_t seed) { return seed ^ (seed << 8); }


x86 assembly (clang, -O0):
<adjust_seed_8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adjust_seed_8>:
mov    %edi,%eax
shl    $0x8,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @adjust_seed_8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = shl i32 %4, 8
%6 = xor i32 %3, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @adjust_seed_8(i32 %0) {
%2 = shl i32 %0, 8
%3 = xor i32 %2, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;

/* Variables and functions */
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ *realloc(int /*<<< orphan*/ *, size_t);
u_int32_t *bitvector_resize(u_int32_t *b, size_t n) {
  u_int32_t *p;
  size_t sz = ((n + 31) >> 5) * 4;
  p = realloc(b, sz);
  if (p == NULL)
    return NULL;
  memset(p, 0, sz);
  return p;
}


x86 assembly (clang, -O0):
<bitvector_resize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1f,%rax
shr    $0x5,%rax
shl    $0x2,%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    116d <bitvector_resize+0x4d>
movq   $0x0,-0x8(%rbp)
jmp    1184 <bitvector_resize+0x64>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitvector_resize>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
add    $0x1f,%rbx
shr    $0x3,%rbx
and    $0xfffffffffffffffc,%rbx
mov    %rbx,%rsi
call   1040 <realloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1150 <bitvector_resize+0x30>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @bitvector_resize(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32*
%7 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
%8 = load i64, i64* %5
%9 = add i64 %8, 31
%10 = lshr i64 %9, 5
%11 = mul i64 %10, 4
store i64 %11, i64* %7
%12 = load i32*, i32** %4
%13 = load i64, i64* %7
%14 = call i32* @realloc(i32* %12, i64 %13)
store i32* %14, i32** %6
%15 = load i32*, i32** %6
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %18
17: ; preds = %2
store i32* null, i32** %3
br label %23
18: ; preds = %2
%19 = load i32*, i32** %6
%20 = load i64, i64* %7
%21 = call i32 @memset(i32* %19, i32 0, i64 %20)
%22 = load i32*, i32** %6
store i32* %22, i32** %3
br label %23
23: ; preds = %18, %17
%24 = load i32*, i32** %3
ret i32* %24
}

LLVM IR (-O2):
define i32* @bitvector_resize(i32* nocapture %0, i64 %1) {
%3 = add i64 %1, 31
%4 = lshr i64 %3, 3
%5 = and i64 %4, 2305843009213693948
%6 = tail call i32* @realloc(i32* %0, i64 %5)
%7 = icmp eq i32* %6, null
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @memset(i32* %6, i32 0, i64 %5)
br label %10
10: ; preds = %2, %8
ret i32* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, short);
void extractmonth(short int x) { printf("date =%d \n", (x & 0x0f80) >> 7); }


x86 assembly (clang, -O0):
<extractmonth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
and    $0xf80,%eax
sar    $0x7,%eax
lea    0xece(%rip),%rdi
movswl %ax,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extractmonth>:
mov    %edi,%esi
shr    $0x7,%esi
and    $0x1f,%esi
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"date =%d \0A\00"
define void @extractmonth(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 3968
%6 = ashr i32 %5, 7
%7 = trunc i32 %6 to i16
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i16 signext %7)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"date =%d \0A\00"
define void @extractmonth(i16 signext %0) {
%2 = lshr i16 %0, 7
%3 = and i16 %2, 31
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i16 signext %3)
ret void
}
void copy02(char to[], char from[]) {
  int i;
  i = 0;
  while ((to[i] = from[i]) != '\0')
    ++i;
}


x86 assembly (clang, -O0):
<copy02>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1143 <copy02+0x43>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <copy02+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy02>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copy02+0x10>
ret

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

LLVM IR (-O2):
define void @copy02(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %9, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %6, i8* %7
%8 = icmp eq i8 %6, 0
%9 = add nuw i64 %4, 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printd(int);
void divp(int a, int b) {
  int *p;
  printd(a);
  print(" /= ");
  printd(b);
  print(" -> ");
  p = &a;
  *p /= b;
  printd(*p);
  print("\r\n");
}


x86 assembly (clang, -O0):
<divp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <printd@plt>
lea    0xec3(%rip),%rdi
call   1040 <print@plt>
mov    -0x8(%rbp),%edi
call   1030 <printd@plt>
lea    0xeb4(%rip),%rdi
call   1040 <print@plt>
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    (%rax),%eax
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <printd@plt>
lea    0xe82(%rip),%rdi
call   1040 <print@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<divp>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <printd@plt>
lea    0xecd(%rip),%rdi
call   1040 <print@plt>
mov    %ebx,%edi
call   1030 <printd@plt>
lea    0xebf(%rip),%rdi
call   1040 <print@plt>
mov    %ebp,%eax
cltd
idiv   %ebx
mov    %eax,%edi
call   1030 <printd@plt>
lea    0xeac(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <print@plt>

LLVM IR (-O0):
@.str = [5 x i8] c" /= \00"
@.str.1 = [5 x i8] c" -> \00"
@.str.2 = [3 x i8] c"\0D\0A\00"
define void @divp(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 = call i32 @printd(i32 %6)
%8 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
%10 = call i32 @printd(i32 %9)
%11 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %5
%12 = load i32, i32* %4
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = sdiv i32 %14, %12
store i32 %15, i32* %13
%16 = load i32*, i32** %5
%17 = load i32, i32* %16
%18 = call i32 @printd(i32 %17)
%19 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c" /= \00"
@.str.1 = [5 x i8] c" -> \00"
@.str.2 = [3 x i8] c"\0D\0A\00"
define void @divp(i32 %0, i32 %1) {
%3 = tail call i32 @printd(i32 %0)
%4 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @printd(i32 %1)
%6 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = sdiv i32 %0, %1
%8 = tail call i32 @printd(i32 %7)
%9 = tail call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int track_pfn_copy(struct vm_area_struct *vma) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.vm_area_struct = type opaque
define i32 @track_pfn_copy(%struct.vm_area_struct* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ InlineWords(int, int, int);
void DoCatch(void) { InlineWords(2, 9, 10); }


x86 assembly (clang, -O0):
<DoCatch>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x9,%esi
mov    $0xa,%edx
call   1030 <InlineWords@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoCatch>:
mov    $0x2,%edi
mov    $0x9,%esi
mov    $0xa,%edx
jmp    1030 <InlineWords@plt>

LLVM IR (-O0):
define void @DoCatch() {
%1 = call i32 @InlineWords(i32 2, i32 9, i32 10)
ret void
}

LLVM IR (-O2):
define void @DoCatch() {
%1 = tail call i32 @InlineWords(i32 2, i32 9, i32 10)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ test_readDataList();
int /*<<< orphan*/ test_removeDataList();
int /*<<< orphan*/ test_voidList();
int main(int argc, char *argv[]) {
  test_voidList();
  test_readDataList();
  test_removeDataList();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <test_voidList@plt>
mov    $0x0,%al
call   1030 <test_readDataList@plt>
mov    $0x0,%al
call   1050 <test_removeDataList@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_voidList@plt>
xor    %eax,%eax
call   1030 <test_readDataList@plt>
xor    %eax,%eax
call   1050 <test_removeDataList@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_voidList()
%7 = call i32 (...) @test_readDataList()
%8 = call i32 (...) @test_removeDataList()
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_voidList()
%4 = tail call i32 (...) @test_readDataList()
%5 = tail call i32 (...) @test_removeDataList()
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
unsigned readl(unsigned addr) { return (*(volatile unsigned *)(addr)); }


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

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

LLVM IR (-O0):
define i32 @readl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @readl(i32 %0) {
%2 = zext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = load volatile i32, i32* %3
ret i32 %4
}
void caller_1_1_2_1_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_1_1_2_1_2_2_2() {
ret void
}
/* Variables and functions */
double nthPrime(double);
int /*<<< orphan*/ printf(char *, double);
int main() {
  printf("%.1f\n", nthPrime(10001.0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
call   1040 <nthPrime@plt>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <nthPrime@plt>
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%.1f\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double @nthPrime(double 1.000100e+04)
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.1f\0A\00"
define i32 @main() {
%1 = tail call double @nthPrime(double 1.000100e+04)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
/* Variables and functions */
int strlen(char *);
void trim(char *s) {
  int n = strlen(s) - 1;
  if ((n > 0) && (s[n] == '\n')) {
    s[n] = '\0';
  }
}


x86 assembly (clang, -O0):
<trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1156 <trim+0x46>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1156 <trim+0x46>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x2,%eax
jl     112b <trim+0x1b>
add    $0xffffffff,%eax
cmpb   $0xa,(%rbx,%rax,1)
jne    112b <trim+0x1b>
movb   $0x0,(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @trim(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 1
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = add nsw i32 %2, -1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 10
br i1 %9, label %10, label %11
10: ; preds = %4
store i8 0, i8* %7
br label %11
11: ; preds = %10, %4, %1
ret void
}
int have_xssextension(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @have_xssextension() {
ret i32 0
}