xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ sys_brk(unsigned long);
void *sbrk(long increment) {
  void *current_break = (void *)sys_brk(0);
  void *changed = (void *)sys_brk((unsigned long)(current_break + increment));
  if ((changed == current_break) && (increment != 0)) {
    return (void *)(-1);
  }
  return current_break;
}


x86 assembly (clang, -O0):
<sbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <sys_brk@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    -0x10(%rbp),%rdi
call   1030 <sys_brk@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1163 <sbrk+0x53>
cmpq   $0x0,-0x10(%rbp)
je     1163 <sbrk+0x53>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    116b <sbrk+0x5b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbrk>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
call   1030 <sys_brk@plt>
mov    %rax,%rbx
lea    (%rax,%r14,1),%rdi
call   1030 <sys_brk@plt>
cmp    %rbx,%rax
mov    $0xffffffffffffffff,%rax
cmovne %rbx,%rax
test   %r14,%r14
cmove  %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @sbrk(i64 %0) {
%2 = tail call i64 @sys_brk(i64 0)
%3 = inttoptr i64 %2 to i8*
%4 = getelementptr i8, i8* %3, i64 %0
%5 = ptrtoint i8* %4 to i64
%6 = tail call i64 @sys_brk(i64 %5)
%7 = inttoptr i64 %6 to i8*
%8 = icmp eq i8* %7, %3
%9 = icmp ne i64 %0, 0
%10 = and i1 %9, %8
%11 = select i1 %10, i8* inttoptr (i64 -1 to i8*), i8* %3
ret i8* %11
}
int min(int n1, int n2) { return n1 > n2 ? n2 : n1; }


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

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

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ entab(char *);
scalar_t__ getln(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  char line[1000];
  while (getln(line, 1000) > 0) {
    entab(line);
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x400(%rbp),%rdi
mov    $0x3e8,%esi
call   1030 <getln@plt>
cmp    $0x0,%rax
jle    1188 <main+0x58>
lea    -0x400(%rbp),%rdi
call   1050 <entab@plt>
lea    -0x400(%rbp),%rsi
lea    0xe82(%rip),%rdi
call   1040 <printf@plt>
jmp    1149 <main+0x19>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1030 <getln@plt>
test   %rax,%rax
jle    1185 <main+0x55>
mov    %rsp,%rbx
lea    0xeaa(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1050 <entab@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1030 <getln@plt>
test   %rax,%rax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = call i64 @getln(i8* %4, i32 1000)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2, %7
%8 = call i32 @entab(i8* %4)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%10 = call i64 @getln(i8* %4, i32 1000)
%11 = icmp sgt i64 %10, 0
br i1 %11, label %7, label %12
12: ; preds = %7, %2
ret i32 0
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
scalar_t__ WIFEXITED(int);
scalar_t__ WIFSIGNALED(int);
int wait(int *);
pid_t waitexit(int *status) {
  pid_t pid;
  while ((pid = wait(status)) != -1) {
    if (WIFEXITED(*status) || WIFSIGNALED(*status))
      break;
  }
  return pid;
}


x86 assembly (clang, -O0):
<waitexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <wait@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xffffffff,%eax
je     1185 <waitexit+0x55>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1040 <WIFEXITED@plt>
cmp    $0x0,%rax
jne    117b <waitexit+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <WIFSIGNALED@plt>
cmp    $0x0,%rax
je     1180 <waitexit+0x50>
jmp    1185 <waitexit+0x55>
jmp    113c <waitexit+0xc>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitexit>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1050 <wait@plt>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
je     1167 <waitexit+0x37>
mov    (%rbx),%edi
call   1040 <WIFEXITED@plt>
test   %rax,%rax
jne    1167 <waitexit+0x37>
mov    (%rbx),%edi
call   1030 <WIFSIGNALED@plt>
test   %rax,%rax
je     1140 <waitexit+0x10>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @waitexit(i32* %0) {
br label %2
2: ; preds = %9, %1
%3 = tail call i32 @wait(i32* %0)
%4 = icmp eq i32 %3, -1
br i1 %4, label %13, label %5
5: ; preds = %2
%6 = load i32, i32* %0
%7 = tail call i64 @WIFEXITED(i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i32, i32* %0
%11 = tail call i64 @WIFSIGNALED(i32 %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %2, label %13
13: ; preds = %5, %9, %2
ret i32 %3
}
/* Variables and functions */
void *malloc(size_t);
void *a(size_t n) { return malloc(n); }


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

x86 assembly (clang, -O2):
<a>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @a(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
void errorBeep() {}


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

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

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

LLVM IR (-O2):
define void @errorBeep() {
ret void
}
/* Variables and functions */
int libisofs_md5(void **, void *, int /*<<< orphan*/, int /*<<< orphan*/ *,
                 int);
int iso_md5_clone(void *old_md5_context, void **new_md5_context) {
  int ret;
  ret = libisofs_md5(new_md5_context, old_md5_context, 0, NULL, 1 | 4);
  if (ret < 0)
    return 0xF030FFFA;
  if (ret == 0)
    return 0xE830FFFB;
  return 1;
}


x86 assembly (clang, -O0):
<iso_md5_clone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x5,%r8d
call   1030 <libisofs_md5@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1152 <iso_md5_clone+0x42>
movl   $0xf030fffa,-0x4(%rbp)
jmp    116f <iso_md5_clone+0x5f>
cmpl   $0x0,-0x1c(%rbp)
jne    1168 <iso_md5_clone+0x58>
movl   $0xe830fffb,-0x4(%rbp)
jmp    116f <iso_md5_clone+0x5f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iso_md5_clone>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x5,%r8d
call   1030 <libisofs_md5@plt>
test   %eax,%eax
mov    $0xe830fffb,%eax
mov    $0x1,%ecx
cmove  %eax,%ecx
mov    $0xf030fffa,%eax
cmovns %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @iso_md5_clone(i8* %0, i8** %1) {
%3 = tail call i32 @libisofs_md5(i8** %1, i8* %0, i32 0, i32* null, i32 5)
%4 = icmp slt i32 %3, 0
%5 = icmp eq i32 %3, 0
%6 = select i1 %5, i32 -399441925, i32 1
%7 = select i1 %4, i32 -265224198, i32 %6
ret i32 %7
}
/* Variables and functions */
char *strrchr(const char *p, int ch) {
  char *save;
  for (save = NULL;; ++p) {
    if (*p == ch)
      save = (char *)p;
    if (!*p)
      return (save);
  }
}


x86 assembly (clang, -O0):
<strrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    112b <strrchr+0x2b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    113e <strrchr+0x3e>
mov    -0x18(%rbp),%rax
pop    %rbp
ret
jmp    1143 <strrchr+0x43>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <strrchr+0x13>

x86 assembly (clang, -O2):
<strrchr>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi),%ecx
cmp    %esi,%ecx
cmove  %rdi,%rax
add    $0x1,%rdi
test   %ecx,%ecx
jne    1110 <strrchr+0x10>
ret

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

LLVM IR (-O2):
define i8* @strrchr(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %11, %3 ]
%5 = phi i8* [ null, %2 ], [ %9, %3 ]
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, %1
%9 = select i1 %8, i8* %4, i8* %5
%10 = icmp eq i8 %6, 0
%11 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %10, label %12, label %3
12: ; preds = %3
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x90() {
  Assert_real((islower(144) == 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_islower.c",
              725, ("islower should be 0 for 0x90"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x90>:
push   %rax
mov    $0x90,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2d5,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x90\00"
define void @t_islower_0x90() {
%1 = call i64 @islower(i32 144)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 725, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x90\00"
define void @t_islower_0x90() {
%1 = tail call i64 @islower(i32 144)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 725, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ndsctl_action(char *, char *, char *);
void ndsctl_unblock(void) {
  ndsctl_action("unblock", "MAC %s unblocked.\n",
                "Failed to unblock MAC %s.\n");
}


x86 assembly (clang, -O0):
<ndsctl_unblock>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee6(%rip),%rsi
lea    0xef2(%rip),%rdx
call   1030 <ndsctl_action@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ndsctl_unblock>:
lea    0xee9(%rip),%rdi
lea    0xeea(%rip),%rsi
lea    0xef6(%rip),%rdx
jmp    1030 <ndsctl_action@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"unblock\00"
@.str.1 = [19 x i8] c"MAC %s unblocked.\0A\00"
@.str.2 = [27 x i8] c"Failed to unblock MAC %s.\0A\00"
define void @ndsctl_unblock() {
%1 = call i32 @ndsctl_action(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"unblock\00"
@.str.1 = [19 x i8] c"MAC %s unblocked.\0A\00"
@.str.2 = [27 x i8] c"Failed to unblock MAC %s.\0A\00"
define void @ndsctl_unblock() {
%1 = tail call i32 @ndsctl_action(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main() {
  int c, prev;
  while ((c = getchar()) != EOF)
    if (prev == ' ' && c == ' ')
      ;
    else {
      prev = c;
      putchar(c);
    }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1174 <main+0x54>
cmpl   $0x20,-0xc(%rbp)
jne    1161 <main+0x41>
cmpl   $0x20,-0x8(%rbp)
jne    1161 <main+0x41>
jmp    116f <main+0x4f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%eax
jne    1141 <main+0x21>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
jmp    1163 <main+0x43>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
je     1137 <main+0x17>
mov    %ebx,%ecx
mov    %eax,%ebx
cmp    $0x20,%ecx
jne    1150 <main+0x30>
cmp    $0x20,%ebx
je     1157 <main+0x37>
jmp    1150 <main+0x30>

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %19, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %2
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %20
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 32
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 32
br i1 %13, label %14, label %15
14: ; preds = %11
br label %19
15: ; preds = %11, %8
%16 = load i32, i32* %2
store i32 %16, i32* %3
%17 = load i32, i32* %2
%18 = call i32 @putchar(i32 %17)
br label %19
19: ; preds = %15, %14
br label %4
20: ; preds = %4
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %16, label %4
4: ; preds = %0, %12
%5 = phi i32 [ %13, %12 ], [ %1, %0 ]
%6 = phi i32 [ %5, %12 ], [ undef, %0 ]
%7 = icmp eq i32 %6, 32
%8 = icmp eq i32 %5, 32
%9 = and i1 %7, %8
br i1 %9, label %12, label %10
10: ; preds = %4
%11 = tail call i32 @putchar(i32 %5)
br label %12
12: ; preds = %4, %10
%13 = tail call i32 (...) @getchar()
%14 = load i32, i32* @EOF
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %4
16: ; preds = %12, %0
ret i32 0
}
void f() {
  int a = 42;
  int b = 35;
  if (a = b)
    a = 36;
  return;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x2a,-0x4(%rbp)
movl   $0x23,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1128 <f+0x28>
movl   $0x24,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
%2 = alloca i32
store i32 42, i32* %1
store i32 35, i32* %2
%3 = load i32, i32* %2
store i32 %3, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 36, i32* %1
br label %6
6: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sla_mappa_(double *, double *, double *);
void slaMappa(double eq, double date, double amprms[21]) {
  sla_mappa_(&eq, &date, amprms);
}


x86 assembly (clang, -O0):
<slaMappa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <sla_mappa_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaMappa>:
sub    $0x18,%rsp
mov    %rdi,%rdx
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <sla_mappa_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @slaMappa(double %0, double %1, double* %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double*
store double %0, double* %4
store double %1, double* %5
store double* %2, double** %6
%7 = load double*, double** %6
%8 = call i32 @sla_mappa_(double* %4, double* %5, double* %7)
ret void
}

LLVM IR (-O2):
define void @slaMappa(double %0, double %1, double* %2) {
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = call i32 @sla_mappa_(double* %4, double* %5, double* %2)
ret void
}
extern int _isatty(int file) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @_isatty(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ SBC_(int);
int /*<<< orphan*/ c64_memIndirectZeroY();
void SBC_izy(void) {
  c64_memIndirectZeroY();
  SBC_(1);
}


x86 assembly (clang, -O0):
<SBC_izy>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <c64_memIndirectZeroY@plt>
mov    $0x1,%edi
call   1030 <SBC_@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @SBC_izy() {
%1 = call i32 (...) @c64_memIndirectZeroY()
%2 = call i32 @SBC_(i32 1)
ret void
}

LLVM IR (-O2):
define void @SBC_izy() {
%1 = tail call i32 (...) @c64_memIndirectZeroY()
%2 = tail call i32 @SBC_(i32 1)
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SYS_gettimeofday;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, struct timeval *,
                           int /*<<< orphan*/);
int main() {
  for (;;) {
    struct timeval tv;
    syscall(SYS_gettimeofday, &tv, 0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
xor    %edx,%edx
call   1030 <syscall@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
mov    %rsp,%rbx
xchg   %ax,%ax
mov    (%r14),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <syscall@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
%struct.timeval = type { i32 }
@SYS_gettimeofday = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timeval
store i32 0, i32* %1
br label %3
3: ; preds = %3, %0
%4 = load i32, i32* @SYS_gettimeofday
%5 = call i32 @syscall(i32 %4, %struct.timeval* %2, i32 0)
br label %3
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@SYS_gettimeofday = global i32 0
define i32 @main() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = load i32, i32* @SYS_gettimeofday
%5 = call i32 @syscall(i32 %4, %struct.timeval* %1, i32 0)
br label %3
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t asrl0(int64_t x) { return x >> 0; }


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

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

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

LLVM IR (-O2):
define i32 @asrl0(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ WSramAddr(int);
int /*<<< orphan*/ Wd(int, int);
int /*<<< orphan*/ Ws(char *);
int Winst99(int i, int code) {
  Ws("sbic  ");
  WSramAddr((code >> 3) & 0x1F);
  Ws(", ");
  Wd(code & 7, 1);
  return 0;
}


x86 assembly (clang, -O0):
<Winst99>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xebb(%rip),%rdi
call   1030 <Ws@plt>
mov    -0x8(%rbp),%edi
sar    $0x3,%edi
and    $0x1f,%edi
call   1040 <WSramAddr@plt>
lea    0xea8(%rip),%rdi
call   1030 <Ws@plt>
mov    -0x8(%rbp),%edi
and    $0x7,%edi
mov    $0x1,%esi
call   1050 <Wd@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Winst99>:
push   %rbx
mov    %esi,%ebx
lea    0xec6(%rip),%rdi
call   1030 <Ws@plt>
mov    %ebx,%edi
shr    $0x3,%edi
and    $0x1f,%edi
call   1040 <WSramAddr@plt>
lea    0xeb4(%rip),%rdi
call   1030 <Ws@plt>
and    $0x7,%ebx
mov    %ebx,%edi
mov    $0x1,%esi
call   1050 <Wd@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"sbic \00"
@.str.1 = [3 x i8] c", \00"
define i32 @Winst99(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @Ws(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %4
%7 = ashr i32 %6, 3
%8 = and i32 %7, 31
%9 = call i32 @WSramAddr(i32 %8)
%10 = call i32 @Ws(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* %4
%12 = and i32 %11, 7
%13 = call i32 @Wd(i32 %12, i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"sbic \00"
@.str.1 = [3 x i8] c", \00"
define i32 @Winst99(i32 %0, i32 %1) {
%3 = tail call i32 @Ws(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = lshr i32 %1, 3
%5 = and i32 %4, 31
%6 = tail call i32 @WSramAddr(i32 %5)
%7 = tail call i32 @Ws(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = and i32 %1, 7
%9 = tail call i32 @Wd(i32 %8, i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ a(int);
void m() {
  a(1);
  a(0);
}


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

x86 assembly (clang, -O2):
<m>:
push   %rax
mov    $0x1,%edi
call   1030 <a@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <a@plt>

LLVM IR (-O0):
define void @m() {
%1 = call i32 @a(i32 1)
%2 = call i32 @a(i32 0)
ret void
}

LLVM IR (-O2):
define void @m() {
%1 = tail call i32 @a(i32 1)
%2 = tail call i32 @a(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_ZIGBEE_long(int, unsigned short);
void set_TX_power(unsigned short int power) {
  if ((power < 0) || (power > 31))
    power = 31;
  power = 31 - power;
  power = ((power & 0b00011111) << 3) & 0b11111000;
  write_ZIGBEE_long(0x203, power);
}


x86 assembly (clang, -O0):
<set_TX_power>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
cmp    $0x0,%eax
jl     1139 <set_TX_power+0x29>
movzwl -0x2(%rbp),%eax
cmp    $0x1f,%eax
jle    113f <set_TX_power+0x2f>
movw   $0x1f,-0x2(%rbp)
movzwl -0x2(%rbp),%ecx
mov    $0x1f,%eax
sub    %ecx,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0x1f,%eax
shl    $0x3,%eax
and    $0xf8,%eax
mov    %ax,-0x2(%rbp)
mov    $0x203,%edi
movzwl -0x2(%rbp),%esi
call   1030 <write_ZIGBEE_long@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_TX_power>:
cmp    $0x1f,%di
mov    $0x1f,%esi
cmovb  %edi,%esi
shl    $0x3,%esi
not    %esi
and    $0xf8,%esi
mov    $0x203,%edi
jmp    1030 <write_ZIGBEE_long@plt>

LLVM IR (-O0):
define void @set_TX_power(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = icmp slt i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = icmp sgt i32 %8, 31
br i1 %9, label %10, label %11
10: ; preds = %6, %1
store i16 31, i16* %2
br label %11
11: ; preds = %10, %6
%12 = load i16, i16* %2
%13 = zext i16 %12 to i32
%14 = sub nsw i32 31, %13
%15 = trunc i32 %14 to i16
store i16 %15, i16* %2
%16 = load i16, i16* %2
%17 = zext i16 %16 to i32
%18 = and i32 %17, 31
%19 = shl i32 %18, 3
%20 = and i32 %19, 248
%21 = trunc i32 %20 to i16
store i16 %21, i16* %2
%22 = load i16, i16* %2
%23 = call i32 @write_ZIGBEE_long(i32 515, i16 zeroext %22)
ret void
}

LLVM IR (-O2):
define void @set_TX_power(i16 zeroext %0) {
%2 = icmp ult i16 %0, 31
%3 = select i1 %2, i16 %0, i16 31
%4 = shl nuw nsw i16 %3, 3
%5 = and i16 %4, 248
%6 = xor i16 %5, 248
%7 = tail call i32 @write_ZIGBEE_long(i32 515, i16 zeroext %6)
ret void
}
/* Variables and functions */
int strncmp(char *, char *, int);
void strncmp_diff_length_2() {
  char *x = "12345";
  char *y = "123";
  if (strncmp(x, y, 5) != 1)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strncmp_diff_length_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xedc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x1,%eax
je     1149 <strncmp_diff_length_2+0x39>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_diff_length_2>:
lea    0xee9(%rip),%rdi
lea    0xee8(%rip),%rsi
mov    $0x5,%edx
jmp    1030 <strncmp@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"12345\00"
@.str.1 = [4 x i8] c"123\00"
define void @strncmp_diff_length_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strncmp(i8* %3, i8* %4, i32 5)
%6 = icmp ne i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = load i8, i8* null
br label %9
9: ; preds = %7, %0
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"12345\00"
@.str.1 = [4 x i8] c"123\00"
define void @strncmp_diff_length_2() {
%1 = tail call i32 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
ret void
}
f(a, b) int a, b;
{}


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

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

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *, int, double, int);
int myfoobarthing(int a, double b, int c, int *d) {
  FILE *foo = fopen("what", "r");
  printf("my foobar thing is alive %d %f %d\n", a, b, c);
  *d = 8;
  return 7;
}


x86 assembly (clang, -O0):
<myfoobarthing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
lea    0xec2(%rip),%rdi
lea    0xec0(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%edx
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
movl   $0x8,(%rax)
mov    $0x7,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myfoobarthing>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %esi,%ebp
movsd  %xmm0,0x8(%rsp)
mov    %edi,%ebx
lea    0xec4(%rip),%rdi
lea    0xec2(%rip),%rsi
call   1040 <fopen@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
movsd  0x8(%rsp),%xmm0
mov    %ebp,%edx
call   1030 <printf@plt>
movl   $0x8,(%r14)
mov    $0x7,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"what\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [35 x i8] c"my foobar thing is alive %d %f %d\0A\00"
define i32 @myfoobarthing(i32 %0, double %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
store i32 %0, i32* %5
store double %1, double* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%10 = call i32* @fopen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %10, i32** %9
%11 = load i32, i32* %5
%12 = load double, double* %6
%13 = load i32, i32* %7
%14 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %11, double %12, i32 %13)
%15 = load i32*, i32** %8
store i32 8, i32* %15
ret i32 7
}

LLVM IR (-O2):
@.str = [5 x i8] c"what\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [35 x i8] c"my foobar thing is alive %d %f %d\0A\00"
define i32 @myfoobarthing(i32 %0, double %1, i32 %2, i32* nocapture writeonly %3) {
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %0, double %1, i32 %2)
store i32 8, i32* %3
ret i32 7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int system(char *);
int main(int argc, char *argv[]) {
  printf("%d", system("ll"));
  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)
lea    0xec6(%rip),%rdi
call   1030 <system@plt>
mov    %eax,%esi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
call   1030 <system@plt>
lea    0xecc(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"ll\00"
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 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"ll\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
struct buffer {
  int dummy;
};

/* Variables and functions */
int get32be(struct buffer *);
uint64_t get64be(struct buffer *input) {
  uint64_t ret;
  ret = get32be(input);
  ret <<= 32;
  ret |= get32be(input);
  return ret;
}


x86 assembly (clang, -O0):
<get64be>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get32be@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get32be@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get64be>:
push   %rbx
mov    %rdi,%rbx
call   1030 <get32be@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <get32be@plt>

LLVM IR (-O0):
%struct.buffer = type { i32 }
define i32 @get64be(%struct.buffer* %0) {
%2 = alloca %struct.buffer*
%3 = alloca i32
store %struct.buffer* %0, %struct.buffer** %2
%4 = load %struct.buffer*, %struct.buffer** %2
%5 = call i32 @get32be(%struct.buffer* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = shl i32 %6, 32
store i32 %7, i32* %3
%8 = load %struct.buffer*, %struct.buffer** %2
%9 = call i32 @get32be(%struct.buffer* %8)
%10 = load i32, i32* %3
%11 = or i32 %10, %9
store i32 %11, i32* %3
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define i32 @get64be(%struct.buffer* %0) {
%2 = tail call i32 @get32be(%struct.buffer* %0)
%3 = tail call i32 @get32be(%struct.buffer* %0)
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ frexpl(long double, int *);
int floor_log2l(long double x) {
  int exp;
  frexpl(x, &exp);
  return exp - 1;
}


x86 assembly (clang, -O0):
<floor_log2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    -0x14(%rbp),%rdi
call   1030 <frexpl@plt>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor_log2l>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
lea    0x14(%rsp),%rdi
call   1030 <frexpl@plt>
mov    0x14(%rsp),%eax
add    $0xffffffff,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @floor_log2l(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca i32
store x86_fp80 %0, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = call i32 @frexpl(x86_fp80 %4, i32* %3)
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @floor_log2l(x86_fp80 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @frexpl(x86_fp80 %0, i32* %2)
%5 = load i32, i32* %2
%6 = add nsw i32 %5, -1
ret i32 %6
}
void __attribute__((weak)) _fini(void) { ; }


x86 assembly (clang, -O0):
<_fini>:
endbr64
sub    $0x8,%rsp
add    $0x8,%rsp
ret


x86 assembly (clang, -O2):
<_fini>:
endbr64
sub    $0x8,%rsp
add    $0x8,%rsp
ret


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

LLVM IR (-O2):
define weak void @_fini() {
ret void
}
int system_thread_destruct(void *handle) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @system_thread_destruct(i8* nocapture readnone %0) {
ret i32 0
}
int good(void) {
  const int x = 0;
  return x;
}


x86 assembly (clang, -O0):
<good>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @good() {
ret i32 0
}
const char *event_get_version(void) { return "0.02"; }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"0.02\00"
define i8* @event_get_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char const *, char *);
void display_label(const char *text) {
  printf("%s%s %s %s\n", "", "", text, "");
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"%s%s %s %s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @display_label(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s%s %s %s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @display_label(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ A2();
int *func2(int *arg) {
  A2();
  return arg;
}


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

x86 assembly (clang, -O2):
<func2>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <A2@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32* @func2(i32* readnone returned %0) {
%2 = tail call i32 (...) @A2()
ret i32* %0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int y;
  x = __VERIFIER_nondet_int();
  while (x >= 0) {
    x = x + 1;
    y = 1;
    while (x >= y) {
      y = y + 1;
    }
    x = x - 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     116b <main+0x5b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     115d <main+0x4d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <main+0x33>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@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
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
br label %5
5: ; preds = %18, %0
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %21
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
store i32 1, i32* %3
br label %11
11: ; preds = %15, %8
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp sge i32 %12, %13
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %11
18: ; preds = %11
%19 = load i32, i32* %2
%20 = sub nsw i32 %19, 2
store i32 %20, i32* %2
br label %5
21: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bp_sw_base_from_char(char);
char bp_sw_char_from_base(int /*<<< orphan*/);
int /*<<< orphan*/ bp_sw_complement_base(int /*<<< orphan*/);
char bp_sw_char_complement_base(char c) {
  return bp_sw_char_from_base(bp_sw_complement_base(bp_sw_base_from_char(c)));
}


x86 assembly (clang, -O0):
<bp_sw_char_complement_base>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <bp_sw_base_from_char@plt>
mov    %eax,%edi
call   1050 <bp_sw_complement_base@plt>
mov    %eax,%edi
call   1030 <bp_sw_char_from_base@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bp_sw_char_complement_base>:
push   %rax
call   1040 <bp_sw_base_from_char@plt>
mov    %eax,%edi
call   1050 <bp_sw_complement_base@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <bp_sw_char_from_base@plt>

LLVM IR (-O0):
define signext i8 @bp_sw_char_complement_base(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @bp_sw_base_from_char(i8 signext %3)
%5 = call i32 @bp_sw_complement_base(i32 %4)
%6 = call signext i8 @bp_sw_char_from_base(i32 %5)
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @bp_sw_char_complement_base(i8 signext %0) {
%2 = tail call i32 @bp_sw_base_from_char(i8 signext %0)
%3 = tail call i32 @bp_sw_complement_base(i32 %2)
%4 = tail call signext i8 @bp_sw_char_from_base(i32 %3)
ret i8 %4
}
void can_calc_tdco(struct net_device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.net_device = type opaque
define void @can_calc_tdco(%struct.net_device* nocapture %0) {
ret void
}
void endItFunJUnitXml() {}


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

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

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

LLVM IR (-O2):
define void @endItFunJUnitXml() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int CVBBoolChars(char *Src) {
  if (!strcmp(Src, "True"))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<CVBBoolChars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1141 <CVBBoolChars+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1148 <CVBBoolChars+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CVBBoolChars>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"True\00"
define i32 @CVBBoolChars(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}