xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("folderTail 0.1 ( http://computingeureka.com )\n"
         "Usage: folderTail <path-to-folder>\n\n"
         "Starts tail -f on each file or link that is a direct child of "
         "path-to-folder.\n");
}


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

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

LLVM IR (-O0):
@.str = [161 x i8] c"folderTail 0.1 ( http://computingeureka.com )\0AUsage: folderTail <path-to-folder>\0A\0AStarts tail -f on each file or link that is a direct child of path-to-folder.\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [160 x i8] c"folderTail 0.1 ( http://computingeureka.com )\0AUsage: folderTail <path-to-folder>\0A\0AStarts tail -f on each file or link that is a direct child of path-to-folder.\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([160 x i8], [160 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ soundexists(int);
void basSoundExists() {
  int n;
  n = popNumber();
  pushNumber(soundexists(n));
}


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

x86 assembly (clang, -O2):
<basSoundExists>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <soundexists@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

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

LLVM IR (-O2):
define void @basSoundExists() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @soundexists(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
size_t strlen(char const *);
char *xmalloc(size_t);
char *xstrdup(const char *s) {
  size_t length = strlen(s);
  char *p = xmalloc(length + 1);
  memcpy(p, s, length);
  p[length] = '\0';
  return p;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1040 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1050 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %rax,%r15
lea    0x1(%rax),%rdi
call   1040 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* @xmalloc(i64 %3)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %2)
%6 = getelementptr inbounds i8, i8* %4, i64 %2
store i8 0, i8* %6
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int i;
  i = 0;
  int n;
  assume(n >= 50000);
  assume(n <= 100000);
  while (i < n) {
    i = i + 2;
  }
  assert(i == n + 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xc350,-0xc(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
cmpl   $0x186a0,-0xc(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1178 <main+0x58>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    115e <main+0x3e>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 50000
%6 = zext i1 %5 to i32
%7 = call i32 @assume(i32 %6)
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 100000
%10 = zext i1 %9 to i32
%11 = call i32 @assume(i32 %10)
br label %12
12: ; preds = %16, %0
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 2
store i32 %18, i32* %2
br label %12
19: ; preds = %12
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
%23 = icmp eq i32 %20, %22
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 1)
%2 = tail call i32 @assume(i32 1)
%3 = tail call i32 @assert(i32 0)
ret i32 0
}
int f(int a, int b) { return a == 10 ? b : 0; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xa,-0x4(%rbp)
jne    111f <f+0x1f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <f+0x29>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <f+0x29>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
cmp    $0xa,%edi
cmove  %esi,%eax
ret

LLVM IR (-O0):
define i32 @f(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 = icmp eq i32 %5, 10
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32, i32* %4
br label %10
9: ; preds = %2
br label %10
10: ; preds = %9, %7
%11 = phi i32 [ %8, %7 ], [ 0, %9 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 10
%4 = select i1 %3, i32 %1, i32 0
ret i32 %4
}
/* Variables and functions */
int render();
int benchmarkRun() { return render(); }


x86 assembly (clang, -O0):
<benchmarkRun>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <render@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @benchmarkRun() {
%1 = call i32 (...) @render()
ret i32 %1
}

LLVM IR (-O2):
define i32 @benchmarkRun() {
%1 = tail call i32 (...) @render()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ errno;
int unlink(char *name) {
  errno = ENOENT;
  return -1;
}


x86 assembly (clang, -O0):
<unlink>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlink>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOENT = global i32 0
@errno = global i32 0
define i32 @unlink(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @ENOENT
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOENT = global i32 0
@errno = global i32 0
define i32 @unlink(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOENT
store i32 %2, i32* @errno
ret i32 -1
}
int cloudvpn_boot(int argc, char **argv) { return 0; }


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

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

LLVM IR (-O0):
define i32 @cloudvpn_boot(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @cloudvpn_boot(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ isspace(char);
char *next_char(char *p) {
  do {
    ++p;
  } while (isspace(*p));
  return p;
}


x86 assembly (clang, -O0):
<next_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
jne    111c <next_char+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_char>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <next_char+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @next_char(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = tail call i64 @isspace(i8 signext %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %2
8: ; preds = %2
ret i8* %4
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
scalar_t__ ceil(int /*<<< orphan*/);
int /*<<< orphan*/ log10(int);
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char const *, int);
int strlen(char const *);
char *getPidDir(const char *cg, pid_t pid) {
  char *pid_dir =
      malloc(sizeof(char) * (strlen(cg) + (int)ceil(log10(pid)) + 2));
  sprintf(pid_dir, "%s/%d", cg, pid);
  return pid_dir;
}


x86 assembly (clang, -O0):
<getPidDir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
call   1060 <log10@plt>
mov    %eax,%edi
call   1030 <ceil@plt>
mov    %rax,%rcx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
add    $0x2,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xe58(%rip),%rsi
call   1070 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPidDir>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r15d
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%r14d
mov    %r15d,%edi
call   1060 <log10@plt>
mov    %eax,%edi
call   1030 <ceil@plt>
lea    (%r14,%rax,1),%edi
add    $0x2,%edi
call   1050 <malloc@plt>
mov    %rax,%rbp
lea    0xe76(%rip),%rsi
mov    %rax,%rdi
mov    %rbx,%rdx
mov    %r15d,%ecx
call   1070 <sprintf@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%d\00"
define i8* @getPidDir(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = load i32, i32* %4
%9 = call i32 @log10(i32 %8)
%10 = call i64 @ceil(i32 %9)
%11 = trunc i64 %10 to i32
%12 = add nsw i32 %7, %11
%13 = add nsw i32 %12, 2
%14 = sext i32 %13 to i64
%15 = mul i64 1, %14
%16 = trunc i64 %15 to i32
%17 = call i8* @malloc(i32 %16)
store i8* %17, i8** %5
%18 = load i8*, i8** %5
%19 = load i8*, i8** %3
%20 = load i32, i32* %4
%21 = call i32 @sprintf(i8* %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %19, i32 %20)
%22 = load i8*, i8** %5
ret i8* %22
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%d\00"
define noalias i8* @getPidDir(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @log10(i32 %1)
%5 = tail call i64 @ceil(i32 %4)
%6 = trunc i64 %5 to i32
%7 = add i32 %3, 2
%8 = add i32 %7, %6
%9 = tail call i8* @malloc(i32 %8)
%10 = tail call i32 @sprintf(i8* dereferenceable(1) %9, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
char *strstr(char *, char *);
int main() {
  char ch[] = "Linux C";
  char fo[] = "ux";
  char *p;
  p = strstr(ch, fo);
  if (p != NULL)
    printf("%s\n", p);
  else
    printf("Not Found!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xec7(%rip),%ax
mov    %ax,-0xf(%rbp)
mov    0xebf(%rip),%al
mov    %al,-0xd(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0xf(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1181 <main+0x61>
mov    -0x18(%rbp),%rsi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118f <main+0x6f>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x432078756e694c,%rax
mov    %rax,(%rsp)
lea    0xeca(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     1148 <main+0x28>
mov    %rax,%rdi
jmp    114f <main+0x2f>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.ch = [8 x i8] c"Linux C\00"
@__const.main.fo = [3 x i8] c"ux\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [12 x i8] c"Not Found!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8]
%3 = alloca [3 x i8]
%4 = alloca i8*
store i32 0, i32* %1
%5 = bitcast [8 x i8]* %2 to i8*
%6 = bitcast [3 x i8]* %3 to i8*
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%9 = call i8* @strstr(i8* %7, i8* %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %0
%13 = load i8*, i8** %4
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %17
15: ; preds = %0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %12
ret i32 0
}

LLVM IR (-O2):
@__const.main.fo = [3 x i8] c"ux\00"
@str = [11 x i8] c"Not Found!\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 18894525177948492, i64* %1
%3 = call i8* @strstr(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @__const.main.fo, i64 0, i64 0))
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @puts(i8* %3)
br label %9
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *prgname) {
  printf("usage: %s [OPTION] FILE > IMAGE\n"
         "\n"
         "options:\n"
         "  -a <address> memory address for the loaded image in SRAM\n"
         "  -s           Write big endian image needed for direct flashing to "
         "SPI\n",
         prgname);
}


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

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

LLVM IR (-O0):
@.str = [174 x i8] c"usage: %s [OPTION] FILE > IMAGE\0A\0Aoptions:\0A -a <address> memory address for the loaded image in SRAM\0A -s Write big endian image needed for direct flashing to SPI\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [174 x i8] c"usage: %s [OPTION] FILE > IMAGE\0A\0Aoptions:\0A -a <address> memory address for the loaded image in SRAM\0A -s Write big endian image needed for direct flashing to SPI\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear();
void curses_clear_screen() { clear(); }


x86 assembly (clang, -O0):
<curses_clear_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <clear@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @curses_clear_screen() {
%1 = call i32 (...) @clear()
ret void
}

LLVM IR (-O2):
define void @curses_clear_screen() {
%1 = tail call i32 (...) @clear()
ret void
}
/* Variables and functions */
int strlen(char const *);
char const *strstr(char const *, char const *);
int ends_with(const char *str, const char *suffix) {
  return strstr(str, suffix) + strlen(suffix) == str + strlen(str);
}


x86 assembly (clang, -O0):
<ends_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rcx
mov    %eax,%edx
mov    -0x18(%rbp),%rax
movslq %edx,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ends_with>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
call   1040 <strstr@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1030 <strlen@plt>
movslq %eax,%rbx
add    %r15,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
movslq %eax,%rcx
add    %r14,%rcx
xor    %eax,%eax
cmp    %rcx,%rbx
sete   %al
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @ends_with(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 i8* @strstr(i8* %5, i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %7, i64 %10
%12 = load i8*, i8** %3
%13 = load i8*, i8** %3
%14 = call i32 @strlen(i8* %13)
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %12, i64 %15
%17 = icmp eq i8* %11, %16
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @ends_with(i8* %0, i8* %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = tail call i32 @strlen(i8* %1)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %3, i64 %5
%7 = tail call i32 @strlen(i8* %0)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = icmp eq i8* %6, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char **argv) {
  int in;
  while (1) {
    scanf("%d", &in);
    if (in == 42) {
      return 0;
    } else {
      printf("%d\n", in);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x2a,-0x14(%rbp)
jne    1158 <main+0x38>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret
mov    -0x14(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
cmp    $0x2a,%esi
je     117c <main+0x5c>
lea    0xeb9(%rip),%r14
lea    0xeaf(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
cmp    $0x2a,%esi
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 42
br i1 %7, label %8, label %9
8: ; preds = %9, %2
ret i32 0
9: ; preds = %2, %9
%10 = phi i32 [ %13, %9 ], [ %6, %2 ]
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 42
br i1 %14, label %8, label %9
}
void find_extensionsGLES2(void) {}


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

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

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

LLVM IR (-O2):
define void @find_extensionsGLES2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ luaL_check_lstr(int, int /*<<< orphan*/ *);
scalar_t__ luaL_check_number(int);
int /*<<< orphan*/ lua_gettagmethod(int, int /*<<< orphan*/);
int /*<<< orphan*/ lua_pushobject(int /*<<< orphan*/);
void luaB_gettagmethod(void) {
  lua_pushobject(lua_gettagmethod(((int)luaL_check_number(1)),
                                  (luaL_check_lstr((2), NULL))));
}


x86 assembly (clang, -O0):
<luaB_gettagmethod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
mov    %eax,-0x4(%rbp)
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <luaL_check_lstr@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1040 <lua_gettagmethod@plt>
mov    %eax,%edi
call   1060 <lua_pushobject@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luaB_gettagmethod>:
push   %rbx
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
mov    %rax,%rbx
mov    $0x2,%edi
xor    %esi,%esi
call   1050 <luaL_check_lstr@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <lua_gettagmethod@plt>
mov    %eax,%edi
pop    %rbx
jmp    1060 <lua_pushobject@plt>

LLVM IR (-O0):
define void @luaB_gettagmethod() {
%1 = call i64 @luaL_check_number(i32 1)
%2 = trunc i64 %1 to i32
%3 = call i32 @luaL_check_lstr(i32 2, i32* null)
%4 = call i32 @lua_gettagmethod(i32 %2, i32 %3)
%5 = call i32 @lua_pushobject(i32 %4)
ret void
}

LLVM IR (-O2):
define void @luaB_gettagmethod() {
%1 = tail call i64 @luaL_check_number(i32 1)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @luaL_check_lstr(i32 2, i32* null)
%4 = tail call i32 @lua_gettagmethod(i32 %2, i32 %3)
%5 = tail call i32 @lua_pushobject(i32 %4)
ret void
}
int arch_virq_is_global(int virq) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @arch_virq_is_global(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ glutDisplayFunc(void (*)());
void s2winDisplayFunc(void (*func)(void)) { glutDisplayFunc(func); }


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

x86 assembly (clang, -O2):
<s2winDisplayFunc>:
jmp    1030 <glutDisplayFunc@plt>

LLVM IR (-O0):
define void @s2winDisplayFunc(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
%4 = bitcast void ()* %3 to void (...)*
%5 = call i32 @glutDisplayFunc(void (...)* %4)
ret void
}

LLVM IR (-O2):
define void @s2winDisplayFunc(void ()* %0) {
%2 = bitcast void ()* %0 to void (...)*
%3 = tail call i32 @glutDisplayFunc(void (...)* %2)
ret void
}
void gtk_layout_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_layout_new() {
ret void
}
void cli_val_x86_attr_deinit(struct cli_val_x86_attr *a) {}


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

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

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

LLVM IR (-O2):
%struct.cli_val_x86_attr = type opaque
define void @cli_val_x86_attr_deinit(%struct.cli_val_x86_attr* nocapture %0) {
ret void
}
int c1(int x, int y) {
  int t = x & y;
  int tt = x | y;
  unsigned tt1 = tt + 1;
  return t - tt1;
}


x86 assembly (clang, -O0):
<c1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c1>:
mov    %esi,%eax
and    %edi,%eax
or     %edi,%esi
not    %esi
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @c1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = and i32 %8, %9
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = or i32 %11, %12
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = add nsw i32 %14, 1
store i32 %15, i32* %7
%16 = load i32, i32* %5
%17 = load i32, i32* %7
%18 = sub i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @c1(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = or i32 %1, %0
%5 = xor i32 %4, -1
%6 = add i32 %3, %5
ret i32 %6
}
void gtk_image_new_from_icon_set() {}


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

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

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

LLVM IR (-O2):
define void @gtk_image_new_from_icon_set() {
ret void
}
mvdnwind(f, n) int n;
{ return (mvupwind(f, -n)); }


x86 assembly (clang, -O0):
<mvdnwind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
sub    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <mvupwind@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvdnwind>:
neg    %esi
xor    %eax,%eax
jmp    1030 <mvupwind@plt>

LLVM IR (-O0):
define i32 @mvdnwind(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 0, %6
%8 = call i32 (i32, i32, ...) bitcast (i32 (...)* @mvupwind to i32 (i32, i32, ...)*)(i32 %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @mvdnwind(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @mvupwind to i32 (i32, i32, ...)*)(i32 %0, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ init();
int /*<<< orphan*/ load_config(char *);
int /*<<< orphan*/ print();
int main(int argc, char *argv[]) {
  if (argc < 2)
    return -1;
  init();
  load_config(argv[1]);
  print();
  return 0;
}


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)
cmpl   $0x2,-0x8(%rbp)
jge    115c <main+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    117e <main+0x4e>
mov    $0x0,%al
call   1040 <init@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <load_config@plt>
mov    $0x0,%al
call   1030 <print@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffff,%ebx
cmp    $0x2,%edi
jl     115a <main+0x2a>
mov    %rsi,%r14
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <init@plt>
mov    0x8(%r14),%rdi
call   1050 <load_config@plt>
xor    %eax,%eax
call   1030 <print@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 -1, i32* %3
br label %16
9: ; preds = %2
%10 = call i32 (...) @init()
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @load_config(i8* %13)
%15 = call i32 (...) @print()
store i32 0, i32* %3
br label %16
16: ; preds = %9, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = tail call i32 (...) @init()
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @load_config(i8* %7)
%9 = tail call i32 (...) @print()
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ 0, %4 ], [ -1, %2 ]
ret i32 %11
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void EPINonBlockingReadStop(uint32_t ui32Base, uint32_t ui32Channel) {
  uint32_t ui32Offset;
  ASSERT(ui32Base == 0x400D0000);
  ASSERT(ui32Channel < 2);
  ui32Offset = ui32Channel * (0x00000038 - 0x00000028);
  (*((volatile uint32_t *)(ui32Base + 0x00000028 + ui32Offset))) = 0;
}


x86 assembly (clang, -O0):
<EPINonBlockingReadStop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x400d0000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x2,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x28,%eax
add    -0xc(%rbp),%eax
cltq
movl   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPINonBlockingReadStop>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x400d0000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x2,%ebx
setl   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
shl    $0x4,%rax
movslq %ebp,%rcx
movl   $0x0,0x28(%rcx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @EPINonBlockingReadStop(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 eq i32 %6, 1074593792
%8 = zext i1 %7 to i32
%9 = call i32 @ASSERT(i32 %8)
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 2
%12 = zext i1 %11 to i32
%13 = call i32 @ASSERT(i32 %12)
%14 = load i32, i32* %4
%15 = mul nsw i32 %14, 16
store i32 %15, i32* %5
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 40
%18 = load i32, i32* %5
%19 = add nsw i32 %17, %18
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
store volatile i32 0, i32* %21
ret void
}

LLVM IR (-O2):
define void @EPINonBlockingReadStop(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074593792
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = icmp slt i32 %1, 2
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = shl nsw i32 %1, 4
%10 = add nsw i32 %0, 40
%11 = add nsw i32 %10, %9
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 0, i32* %13
ret void
}
void brcmf_debugfs_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @brcmf_debugfs_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int h(int b) {
  if (b <= 0)
    return 0;
  h(b - 1);
  h(b - 1);
  printf("%d ", b);
  return 0;
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1141 <h+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116d <h+0x4d>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <h@plt>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <h@plt>
mov    -0x8(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
test   %edi,%edi
jle    114e <h+0x2e>
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    -0x1(%rbx),%ebp
mov    %ebp,%edi
call   1030 <h@plt>
mov    %ebp,%edi
call   1030 <h@plt>
lea    0xebf(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define i32 @h(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %16
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = call i32 @h(i32 %9)
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 1
%13 = call i32 @h(i32 %12)
%14 = load i32, i32* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
store i32 0, i32* %2
br label %16
16: ; preds = %7, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @h(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %4
3: ; preds = %1, %4
ret i32 0
4: ; preds = %1
%5 = add nsw i32 %0, -1
%6 = tail call i32 @h(i32 %5)
%7 = tail call i32 @h(i32 %5)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %3
}
int skips(char c) { return c == 'm' ? 7 : 6; }


x86 assembly (clang, -O0):
<skips>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x6,%eax
mov    $0x7,%ecx
cmp    $0x6d,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skips>:
xor    %eax,%eax
cmp    $0x6d,%dil
sete   %al
or     $0x6,%eax
ret

LLVM IR (-O0):
define i32 @skips(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 109
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 7, i32 6
ret i32 %7
}

LLVM IR (-O2):
define i32 @skips(i8 signext %0) {
%2 = icmp eq i8 %0, 109
%3 = select i1 %2, i32 7, i32 6
ret i32 %3
}
/* Variables and functions */
scalar_t__ vmalloc(unsigned long);
unsigned long vdma_mem_alloc(unsigned long size) {
  return (unsigned long)vmalloc(size);
}


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

x86 assembly (clang, -O2):
<vdma_mem_alloc>:
jmp    1030 <vmalloc@plt>

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

LLVM IR (-O2):
define i64 @vdma_mem_alloc(i64 %0) {
%2 = tail call i64 @vmalloc(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *value = malloc(size);
  if (!value) {
    fprintf(stderr, "virtual memory exhausted\n");
    exit(1);
  }
  return value;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <xmalloc+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"virtual memory exhausted\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"virtual memory exhausted\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
void G_RemapTeamShaders() {}


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

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

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

LLVM IR (-O2):
define void @G_RemapTeamShaders() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x71() {
  Assert_real((isbdigit(113) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              570, ("isbdigit should be 0 for q"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x71>:
push   %rbp
mov    %rsp,%rbp
mov    $0x71,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x23a,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x71>:
push   %rax
mov    $0x71,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x23a,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for q\00"
define void @t_isbdigit_0x71() {
%1 = call i64 @isbdigit(i32 113)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 570, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for q\00"
define void @t_isbdigit_0x71() {
%1 = tail call i64 @isbdigit(i32 113)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 570, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *match_upto(char *a, char *b) {
  int i = 0;
  while (1) {
    if (a[i] != b[i])
      break;
    i++;
  }
  return b + i;
}


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

x86 assembly (clang, -O2):
<match_upto>:
mov    %rsi,%rax
mov    $0xffffffffffffffff,%rcx
nopw   0x0(%rax,%rax,1)
mov    %rcx,%rdx
movzbl 0x1(%rdi,%rcx,1),%esi
add    $0x1,%rcx
cmp    0x1(%rax,%rdx,1),%sil
je     1110 <match_upto+0x10>
mov    %ecx,%ecx
add    %rcx,%rax
ret

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

LLVM IR (-O2):
define i8* @match_upto(i8* nocapture %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %10, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %1, i64 %4
%8 = load i8, i8* %7
%9 = icmp eq i8 %6, %8
%10 = add nuw i64 %4, 1
br i1 %9, label %3, label %11
11: ; preds = %3
%12 = and i64 %4, 4294967295
%13 = getelementptr inbounds i8, i8* %1, i64 %12
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ arm_data_regi_op();
int /*<<< orphan*/ arm_logic_teq(int /*<<< orphan*/);
void arm_teq_regi() { arm_logic_teq(arm_data_regi_op()); }


x86 assembly (clang, -O0):
<arm_teq_regi>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <arm_data_regi_op@plt>
mov    %eax,%edi
call   1040 <arm_logic_teq@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arm_teq_regi>:
push   %rax
xor    %eax,%eax
call   1030 <arm_data_regi_op@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <arm_logic_teq@plt>

LLVM IR (-O0):
define void @arm_teq_regi() {
%1 = call i32 (...) @arm_data_regi_op()
%2 = call i32 @arm_logic_teq(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_teq_regi() {
%1 = tail call i32 (...) @arm_data_regi_op()
%2 = tail call i32 @arm_logic_teq(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kl27z_ep_stall(int);
void usb_lld_stall(int n) { kl27z_ep_stall(n); }


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

x86 assembly (clang, -O2):
<usb_lld_stall>:
jmp    1030 <kl27z_ep_stall@plt>

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

LLVM IR (-O2):
define void @usb_lld_stall(i32 %0) {
%2 = tail call i32 @kl27z_ep_stall(i32 %0)
ret void
}
void loadFingeringsPreset() {}


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

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

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

LLVM IR (-O2):
define void @loadFingeringsPreset() {
ret void
}
/* Variables and functions */
scalar_t__ ceil(size_t);
size_t EstimateBas64DecodedDataSizeFHS(size_t inDataSize) {
  size_t theDecodedDataSize = (int)ceil(inDataSize / 4.0) * 3;
  return (theDecodedDataSize);
}


x86 assembly (clang, -O0):
<EstimateBas64DecodedDataSizeFHS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movaps 0xedd(%rip),%xmm1
movq   -0x8(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xedc(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rdi
mov    %rdi,%rcx
sar    $0x3f,%rcx
movsd  0xec2(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
and    %rcx,%rax
or     %rax,%rdi
call   1030 <ceil@plt>
imul   $0x3,%eax,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EstimateBas64DecodedDataSizeFHS>:
push   %rax
movq   %rdi,%xmm0
punpckldq 0xee2(%rip),%xmm0
subpd  0xeea(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
mulsd  0xee6(%rip),%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
subsd  0xeda(%rip),%xmm1
cvttsd2si %xmm1,%rdi
and    %rcx,%rdi
or     %rax,%rdi
call   1030 <ceil@plt>
shl    $0x20,%rax
lea    (%rax,%rax,2),%rax
sar    $0x20,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @EstimateBas64DecodedDataSizeFHS(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = uitofp i64 %4 to double
%6 = fdiv double %5, 4.000000e+00
%7 = fptoui double %6 to i64
%8 = call i64 @ceil(i64 %7)
%9 = trunc i64 %8 to i32
%10 = mul nsw i32 %9, 3
%11 = sext i32 %10 to i64
store i64 %11, i64* %3
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
define i64 @EstimateBas64DecodedDataSizeFHS(i64 %0) {
%2 = uitofp i64 %0 to double
%3 = fmul double %2, 2.500000e-01
%4 = fptoui double %3 to i64
%5 = tail call i64 @ceil(i64 %4)
%6 = mul i64 %5, 12884901888
%7 = ashr exact i64 %6, 32
ret i64 %7
}