xunge/DecIR huggingface dataset:
/* Variables and functions */
int color_eqn(int, int, int, int, int, int);
int b_cymg_yeg_yemg(int entrycyg, int entrycymg, int entryyeg, int entryyemg) {
  return color_eqn(79, entrycymg, -51, entryyeg, -1, entryyemg);
}


x86 assembly (clang, -O0):
<b_cymg_yeg_yemg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r9d
mov    $0x4f,%edi
mov    $0xffffffcd,%edx
mov    $0xffffffff,%r8d
call   1030 <color_eqn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_cymg_yeg_yemg>:
mov    %ecx,%r9d
mov    %edx,%ecx
mov    $0x4f,%edi
mov    $0xffffffcd,%edx
mov    $0xffffffff,%r8d
jmp    1030 <color_eqn@plt>

LLVM IR (-O0):
define i32 @b_cymg_yeg_yemg(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = call i32 @color_eqn(i32 79, i32 %9, i32 -51, i32 %10, i32 -1, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @b_cymg_yeg_yemg(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @color_eqn(i32 79, i32 %1, i32 -51, i32 %2, i32 -1, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ msDelay(int);
void LedTest(void) {
  volatile unsigned int i;
  for (i = 0; i < 4; i++) {
    (*(volatile unsigned *)(0x7F008824)) = ~(1 << i);
    msDelay(10);
  }
}


x86 assembly (clang, -O0):
<LedTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    $0x4,%eax
jae    1159 <LedTest+0x49>
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
mov    $0x7f008824,%eax
mov    %ecx,(%rax)
mov    $0xa,%edi
call   1030 <msDelay@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <LedTest+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LedTest>:
push   %rax
movl   $0x0,0x4(%rsp)
mov    0x4(%rsp),%eax
cmp    $0x3,%eax
ja     115a <LedTest+0x4a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x4(%rsp),%ecx
mov    $0xfffffffe,%eax
rol    %cl,%eax
mov    %eax,0x7f008824
mov    $0xa,%edi
call   1030 <msDelay@plt>
addl   $0x1,0x4(%rsp)
mov    0x4(%rsp),%eax
cmp    $0x4,%eax
jb     1130 <LedTest+0x20>
pop    %rax
ret

LLVM IR (-O0):
define void @LedTest() {
%1 = alloca i32
store volatile i32 0, i32* %1
br label %2
2: ; preds = %10, %0
%3 = load volatile i32, i32* %1
%4 = icmp ult i32 %3, 4
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = load volatile i32, i32* %1
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
store volatile i32 %8, i32* inttoptr (i64 2130741284 to i32*)
%9 = call i32 @msDelay(i32 10)
br label %10
10: ; preds = %5
%11 = load volatile i32, i32* %1
%12 = add i32 %11, 1
store volatile i32 %12, i32* %1
br label %2
13: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @LedTest() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 0, i32* %1
%3 = load volatile i32, i32* %1
%4 = icmp ult i32 %3, 4
br i1 %4, label %5, label %14
5: ; preds = %0, %5
%6 = load volatile i32, i32* %1
%7 = shl nuw i32 1, %6
%8 = xor i32 %7, -1
store volatile i32 %8, i32* inttoptr (i64 2130741284 to i32*)
%9 = tail call i32 @msDelay(i32 10)
%10 = load volatile i32, i32* %1
%11 = add i32 %10, 1
store volatile i32 %11, i32* %1
%12 = load volatile i32, i32* %1
%13 = icmp ult i32 %12, 4
br i1 %13, label %5, label %14
14: ; preds = %5, %0
ret void
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strnlen(char const *, size_t);
char *strndup(const char *s, size_t n) {
  size_t l = strnlen(s, n) + 1;
  char *p = malloc(l);
  if (p) {
    memcpy(p, s, l - 1);
    p[l - 1] = '\0';
  }
  return p;
}


x86 assembly (clang, -O0):
<strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strnlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1193 <strndup+0x63>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
sub    $0x1,%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strndup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strnlen@plt>
movslq %eax,%rbx
add    $0x1,%rbx
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,%r15
test   %rax,%rax
je     1169 <strndup+0x39>
lea    -0x1(%rbx),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <memcpy@plt>
movb   $0x0,-0x1(%r15,%rbx,1)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @strndup(i8* %0, i64 %1) {
%3 = tail call i32 @strnlen(i8* %0, i64 %1)
%4 = add nsw i32 %3, 1
%5 = sext i32 %4 to i64
%6 = tail call i8* @malloc(i64 %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = add nsw i64 %5, -1
%10 = tail call i32 @memcpy(i8* %6, i8* %0, i64 %9)
%11 = getelementptr inbounds i8, i8* %6, i64 %9
store i8 0, i8* %11
br label %12
12: ; preds = %8, %2
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help(void) {
  printf("\n             Operation Codes:\n");
  printf(" i -  insert   | r - remove | m - modify\n");
  printf(" c - (change   | v -  view  | q -  quit\n");
  printf("     category) | h -  help\n");
}


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

x86 assembly (clang, -O2):
<print_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefb(%rip),%rdi
call   1030 <puts@plt>
lea    0xf18(%rip),%rdi
call   1030 <puts@plt>
lea    0xf34(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"\0A Operation Codes:\0A\00"
@.str.1 = [42 x i8] c" i - insert | r - remove | m - modify\0A\00"
@.str.2 = [41 x i8] c" c - (change | v - view | q - quit\0A\00"
@.str.3 = [28 x i8] c" category) | h - help\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"\0A Operation Codes:\00"
@str.4 = [41 x i8] c" i - insert | r - remove | m - modify\00"
@str.5 = [40 x i8] c" c - (change | v - view | q - quit\00"
@str.6 = [27 x i8] c" category) | h - help\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char h;
  do {
    scanf("%c", &h);
  } while (h < 97 || h > 122);
  int a = 219;
  int b = a - h;
  printf("%c\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x61,%ecx
mov    %al,-0x11(%rbp)
jl     115e <main+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    112f <main+0xf>
movl   $0xdb,-0xc(%rbp)
mov    -0xc(%rbp),%eax
movsbl -0x5(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
lea    0x7(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movzbl 0x7(%rsp),%eax
lea    -0x7b(%rax),%ecx
cmp    $0xe6,%cl
jb     1130 <main+0x10>
mov    $0xdb,%esi
sub    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
br label %5
5: ; preds = %15, %0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %7
7: ; preds = %5
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp slt i32 %9, 97
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp sgt i32 %13, 122
br label %15
15: ; preds = %11, %7
%16 = phi i1 [ true, %7 ], [ %14, %11 ]
br i1 %16, label %5, label %17
17: ; preds = %15
store i32 219, i32* %3
%18 = load i32, i32* %3
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = sub nsw i32 %18, %20
store i32 %21, i32* %4
%22 = load i32, i32* %4
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i8
br label %2
2: ; preds = %2, %0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = add i8 %4, -123
%6 = icmp ult i8 %5, -26
br i1 %6, label %2, label %7
7: ; preds = %2
%8 = zext i8 %4 to i32
%9 = sub nuw nsw i32 219, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
void fd235(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  p026A:
    goto p026A;
    goto a;
  P026A:
    goto P026A;
    0;
  };
a:;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd235>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd235+0x7>

x86 assembly (clang, -O2):
<fd235>:
jmp    1100 <fd235>

LLVM IR (-O0):
define void @fd235(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd235(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Type definitions */
struct gdev_time {
  int dummy;
};

/* Variables and functions */
scalar_t__ gdev_time_eqz(struct gdev_time *);
scalar_t__ gdev_time_ltz(struct gdev_time *);
int gdev_time_lez(struct gdev_time *p) {
  return gdev_time_ltz(p) || gdev_time_eqz(p);
}


x86 assembly (clang, -O0):
<gdev_time_lez>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <gdev_time_ltz@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    115a <gdev_time_lez+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <gdev_time_eqz@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdev_time_lez>:
push   %rbx
mov    %rdi,%rbx
call   1040 <gdev_time_ltz@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <gdev_time_lez+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <gdev_time_eqz@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
%struct.gdev_time = type { i32 }
define i32 @gdev_time_lez(%struct.gdev_time* %0) {
%2 = alloca %struct.gdev_time*
store %struct.gdev_time* %0, %struct.gdev_time** %2
%3 = load %struct.gdev_time*, %struct.gdev_time** %2
%4 = call i64 @gdev_time_ltz(%struct.gdev_time* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load %struct.gdev_time*, %struct.gdev_time** %2
%8 = call i64 @gdev_time_eqz(%struct.gdev_time* %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.gdev_time = type { i32 }
define i32 @gdev_time_lez(%struct.gdev_time* %0) {
%2 = tail call i64 @gdev_time_ltz(%struct.gdev_time* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @gdev_time_eqz(%struct.gdev_time* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
const char *get_lame_short_version(void) {
  static const char *const str = "3"
                                 "."
                                 "88"
                                 " (beta)";
  return str;
}


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

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

LLVM IR (-O0):
@get_lame_short_version.str = internal constant i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0)
@.str = [12 x i8] c"3.88 (beta)\00"
define i8* @get_lame_short_version() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"3.88 (beta)\00"
define i8* @get_lame_short_version() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
void cfree(p, num, size) char *p;
unsigned num;
unsigned size;
{ free(p); }


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

x86 assembly (clang, -O2):
<cfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @cfree(i8* nocapture %0, i32 %1, i32 %2) {
tail call void @free(i8* %0)
ret void
}
__attribute__((always_)) void SCB_CleanInvalidateDCache(void) {}


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

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

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

LLVM IR (-O2):
define void @SCB_CleanInvalidateDCache() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int int16_t;

/* Variables and functions */
void store2(uint8_t *buf, int16_t value) {
  buf[0] = value >> 8;
  buf[1] = value;
}


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

x86 assembly (clang, -O2):
<store2>:
mov    %esi,%eax
sar    $0x8,%eax
mov    %eax,(%rdi)
mov    %esi,0x4(%rdi)
ret

LLVM IR (-O0):
define void @store2(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 8
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
define void @store2(i32* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 8
store i32 %3, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %1, i32* %4
ret void
}
/* Variables and functions */
int O_RDWR;
int O_SYNC;
int open(char *, int);
int i2c_open(char *name) { return open(name, (O_RDWR | O_SYNC)); }


x86 assembly (clang, -O0):
<i2c_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb0(%rip),%rax
or     (%rax),%esi
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_open>:
mov    0x2ed1(%rip),%rax
mov    0x2ec2(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDWR = global i32 0
@O_SYNC = global i32 0
define i32 @i2c_open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_RDWR
%5 = load i32, i32* @O_SYNC
%6 = or i32 %4, %5
%7 = call i32 @open(i8* %3, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@O_SYNC = global i32 0
define i32 @i2c_open(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = load i32, i32* @O_SYNC
%4 = or i32 %3, %2
%5 = tail call i32 @open(i8* %0, i32 %4)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
struct stat {
  int /*<<< orphan*/ st_size;
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISREG(int /*<<< orphan*/);
int stat(char *, struct stat *);
uint64_t BMK_GetFileSize(char *infilename) {
  int r;
  struct stat statbuf;
  r = stat(infilename, &statbuf);
  if (r || !S_ISREG(statbuf.st_mode))
    return 0;
  return (uint64_t)statbuf.st_size;
}


x86 assembly (clang, -O0):
<BMK_GetFileSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1157 <BMK_GetFileSize+0x37>
mov    -0x1c(%rbp),%edi
call   1040 <S_ISREG@plt>
cmp    $0x0,%eax
jne    1163 <BMK_GetFileSize+0x43>
movl   $0x0,-0x4(%rbp)
jmp    1169 <BMK_GetFileSize+0x49>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BMK_GetFileSize>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rsi
call   1030 <stat@plt>
xor    %ebx,%ebx
test   %eax,%eax
jne    1146 <BMK_GetFileSize+0x26>
mov    0xc(%rsp),%edi
call   1040 <S_ISREG@plt>
test   %eax,%eax
je     1146 <BMK_GetFileSize+0x26>
mov    0x8(%rsp),%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32, i32 }
define i32 @BMK_GetFileSize(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.stat
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @stat(i8* %6, %struct.stat* %5)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %1
%11 = getelementptr inbounds %struct.stat, %struct.stat* %5, i32 0, i32 1
%12 = load i32, i32* %11
%13 = call i32 @S_ISREG(i32 %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %10, %1
store i32 0, i32* %2
br label %19
16: ; preds = %10
%17 = getelementptr inbounds %struct.stat, %struct.stat* %5, i32 0, i32 0
%18 = load i32, i32* %17
store i32 %18, i32* %2
br label %19
19: ; preds = %16, %15
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
%struct.stat = type { i32, i32 }
define i32 @BMK_GetFileSize(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 1
%8 = load i32, i32* %7
%9 = tail call i32 @S_ISREG(i32 %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %6
%12 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%13 = load i32, i32* %12
br label %14
14: ; preds = %1, %6, %11
%15 = phi i32 [ %13, %11 ], [ 0, %6 ], [ 0, %1 ]
ret i32 %15
}
int fail(int start) {
  switch (start) {
  case 0:
    start = 3;
    break;
  case 3:
    start = 13;
    break;
  case 13:
    start = 19;
    break;
  case 19:
    start = 29;
    break;
  case 29:
    start = 33;
    break;
  case 33:
    start = 37;
    break;
  case 37:
    start = 39;
    break;
  case 39:
    start = 45;
    break;
  case 45:
    start = 0;
    break;
  }
  return start;
}


x86 assembly (clang, -O0):
<fail>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x2d,%rax
ja     1193 <fail+0x93>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x3,-0x4(%rbp)
jmp    1193 <fail+0x93>
movl   $0xd,-0x4(%rbp)
jmp    1193 <fail+0x93>
movl   $0x13,-0x4(%rbp)
jmp    1193 <fail+0x93>
movl   $0x1d,-0x4(%rbp)
jmp    1193 <fail+0x93>
movl   $0x21,-0x4(%rbp)
jmp    1193 <fail+0x93>
movl   $0x25,-0x4(%rbp)
jmp    1193 <fail+0x93>
movl   $0x27,-0x4(%rbp)
jmp    1193 <fail+0x93>
movl   $0x2d,-0x4(%rbp)
jmp    1193 <fail+0x93>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fail>:
mov    %edi,%eax
cmp    $0x2d,%edi
ja     114b <fail+0x4b>
mov    %eax,%ecx
lea    0xef0(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x3,%eax
ret
mov    $0xd,%eax
ret
mov    $0x13,%eax
ret
mov    $0x1d,%eax
ret
mov    $0x21,%eax
ret
mov    $0x25,%eax
ret
mov    $0x27,%eax
ret
mov    $0x2d,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @fail(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %13 [
i32 0, label %4
i32 3, label %5
i32 13, label %6
i32 19, label %7
i32 29, label %8
i32 33, label %9
i32 37, label %10
i32 39, label %11
i32 45, label %12
]
4: ; preds = %1
store i32 3, i32* %2
br label %13
5: ; preds = %1
store i32 13, i32* %2
br label %13
6: ; preds = %1
store i32 19, i32* %2
br label %13
7: ; preds = %1
store i32 29, i32* %2
br label %13
8: ; preds = %1
store i32 33, i32* %2
br label %13
9: ; preds = %1
store i32 37, i32* %2
br label %13
10: ; preds = %1
store i32 39, i32* %2
br label %13
11: ; preds = %1
store i32 45, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %1, %12, %11, %10, %9, %8, %7, %6, %5, %4
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @fail(i32 %0) {
switch i32 %0, label %11 [
i32 0, label %2
i32 3, label %3
i32 13, label %4
i32 19, label %5
i32 29, label %6
i32 33, label %7
i32 37, label %8
i32 39, label %9
i32 45, label %10
]
2: ; preds = %1
br label %11
3: ; preds = %1
br label %11
4: ; preds = %1
br label %11
5: ; preds = %1
br label %11
6: ; preds = %1
br label %11
7: ; preds = %1
br label %11
8: ; preds = %1
br label %11
9: ; preds = %1
br label %11
10: ; preds = %1
br label %11
11: ; preds = %1, %10, %9, %8, %7, %6, %5, %4, %3, %2
%12 = phi i32 [ %0, %1 ], [ 0, %10 ], [ 45, %9 ], [ 39, %8 ], [ 37, %7 ], [ 33, %6 ], [ 29, %5 ], [ 19, %4 ], [ 13, %3 ], [ 3, %2 ]
ret i32 %12
}
/* Variables and functions */
double cosf(float);
float blackman(int k, int N) {
  float p = ((float)(k)) / ((float)(N));
  return 0.42 - 0.5 * cosf(2.f * 3.14159265358979323846f * p) +
         0.08 * cosf(4.f * 3.14159265358979323846f * p);
}


x86 assembly (clang, -O0):
<blackman>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xee3(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
call   1030 <cosf@plt>
movsd  0xebd(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  0xeb0(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
call   1030 <cosf@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xe81(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blackman>:
sub    $0x18,%rsp
cvtsi2ss %edi,%xmm1
cvtsi2ss %esi,%xmm0
divss  %xmm0,%xmm1
movss  %xmm1,0xc(%rsp)
movss  0xed2(%rip),%xmm0
mulss  %xmm1,%xmm0
call   1030 <cosf@plt>
mulsd  0xec9(%rip),%xmm0
addsd  0xec9(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
mulss  0xea9(%rip),%xmm0
call   1030 <cosf@plt>
mulsd  0xeb0(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @blackman(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to float
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to float
%10 = fdiv float %7, %9
store float %10, float* %5
%11 = load float, float* %5
%12 = fmul float 0x401921FB60000000, %11
%13 = call double @cosf(float %12)
%14 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %13, double 4.200000e-01)
%15 = load float, float* %5
%16 = fmul float 0x402921FB60000000, %15
%17 = call double @cosf(float %16)
%18 = call double @llvm.fmuladd.f64(double 8.000000e-02, double %17, double %14)
%19 = fptrunc double %18 to float
ret float %19
}

LLVM IR (-O2):
define float @blackman(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to float
%4 = sitofp i32 %1 to float
%5 = fdiv float %3, %4
%6 = fmul float %5, 0x401921FB60000000
%7 = tail call double @cosf(float %6)
%8 = tail call double @llvm.fmuladd.f64(double %7, double -5.000000e-01, double 4.200000e-01)
%9 = fmul float %5, 0x402921FB60000000
%10 = tail call double @cosf(float %9)
%11 = tail call double @llvm.fmuladd.f64(double %10, double 8.000000e-02, double %8)
%12 = fptrunc double %11 to float
ret float %12
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isbdigit(int);
void t_isbdigit_0x30() {
  Assert_real((isbdigit(48)),
              "/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",
              245, ("isbdigit should be 1 for 0"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x30>:
push   %rbp
mov    %rsp,%rbp
mov    $0x30,%edi
call   1040 <isbdigit@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xf5,%edx
lea    0xf66(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x30>:
push   %rax
mov    $0x30,%edi
call   1040 <isbdigit@plt>
lea    0xece(%rip),%rsi
lea    0xf70(%rip),%rcx
mov    %eax,%edi
mov    $0xf5,%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 1 for 0\00"
define void @t_isbdigit_0x30() {
%1 = call i32 @isbdigit(i32 48)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 245, 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 1 for 0\00"
define void @t_isbdigit_0x30() {
%1 = tail call i32 @isbdigit(i32 48)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 245, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
unsigned int add64c(uint64_t *ret, uint64_t *u, uint64_t *v) {
  uint64_t w;
  int c;
  w = *u + *v;
  c = w < *u;
  *ret = w;
  return c;
}


x86 assembly (clang, -O0):
<add64c>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
add    (%rcx),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add64c>:
mov    (%rdx),%rax
mov    (%rsi),%rcx
add    %rax,%rcx
shr    $0x3f,%rax
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
define i32 @add64c(i64* %0, i64* %1, i64* %2) {
%4 = alloca i64*
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca i64
%8 = alloca i32
store i64* %0, i64** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%9 = load i64*, i64** %5
%10 = load i64, i64* %9
%11 = load i64*, i64** %6
%12 = load i64, i64* %11
%13 = add nsw i64 %10, %12
store i64 %13, i64* %7
%14 = load i64, i64* %7
%15 = load i64*, i64** %5
%16 = load i64, i64* %15
%17 = icmp slt i64 %14, %16
%18 = zext i1 %17 to i32
store i32 %18, i32* %8
%19 = load i64, i64* %7
%20 = load i64*, i64** %4
store i64 %19, i64* %20
%21 = load i32, i32* %8
ret i32 %21
}

LLVM IR (-O2):
define i32 @add64c(i64* nocapture writeonly %0, i64* nocapture %1, i64* nocapture %2) {
%4 = load i64, i64* %1
%5 = load i64, i64* %2
%6 = add nsw i64 %5, %4
%7 = lshr i64 %5, 63
%8 = trunc i64 %7 to i32
store i64 %6, i64* %0
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
ssize_t __wrap_listen(int fd, void *buf, size_t bytes) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__wrap_listen(i32 %0, i8* nocapture readnone %1, i64 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ read_write_screen(char *, int);
void read_screen(char *buf) { read_write_screen(buf, 1); }


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

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

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

LLVM IR (-O2):
define void @read_screen(i8* %0) {
%2 = tail call i32 @read_write_screen(i8* %0, i32 1)
ret void
}
/* Type definitions */
struct winsize {
  int ws_col;
};

/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ TIOCGWINSZ;
int /*<<< orphan*/ ioctl(int /*<<< orphan*/, int /*<<< orphan*/,
                         struct winsize *);
screen_size() {
  struct winsize win;
  ioctl(STDOUT_FILENO, TIOCGWINSZ, &win);
  return win.ws_col;
}


x86 assembly (clang, -O0):
<screen_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<screen_size>:
push   %rax
mov    0x2ed8(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <ioctl@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.winsize = type { i32 }
@STDOUT_FILENO = global i32 0
@TIOCGWINSZ = global i32 0
define i32 @screen_size() {
%1 = alloca %struct.winsize
%2 = load i32, i32* @STDOUT_FILENO
%3 = load i32, i32* @TIOCGWINSZ
%4 = call i32 @ioctl(i32 %2, i32 %3, %struct.winsize* %1)
%5 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.winsize = type { i32 }
@STDOUT_FILENO = global i32 0
@TIOCGWINSZ = global i32 0
define i32 @screen_size() {
%1 = alloca %struct.winsize
%2 = bitcast %struct.winsize* %1 to i8*
%3 = load i32, i32* @STDOUT_FILENO
%4 = load i32, i32* @TIOCGWINSZ
%5 = call i32 @ioctl(i32 %3, i32 %4, %struct.winsize* %1)
%6 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i64 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fread(char *, size_t, size_t, int /*<<< orphan*/ *);
int c_fread_str_(char *str, int *size, FILE **fp, int maxsize) {
  return fread(str, (size_t)*size, (size_t)1, *fp);
}


x86 assembly (clang, -O0):
<c_fread_str_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq (%rax),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
mov    $0x1,%edx
call   1030 <fread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_fread_str_>:
movslq (%rsi),%rsi
mov    (%rdx),%rcx
mov    $0x1,%edx
jmp    1030 <fread@plt>

LLVM IR (-O0):
define i32 @c_fread_str_(i8* %0, i32* %1, i32** %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32**
%8 = alloca i32
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32** %2, i32*** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = sext i32 %11 to i64
%13 = load i32**, i32*** %7
%14 = load i32*, i32** %13
%15 = call i32 @fread(i8* %9, i64 %12, i64 1, i32* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @c_fread_str_(i8* nocapture %0, i32* nocapture %1, i32** nocapture %2, i32 %3) {
%5 = load i32, i32* %1
%6 = sext i32 %5 to i64
%7 = load i32*, i32** %2
%8 = tail call i32 @fread(i8* %0, i64 %6, i64 1, i32* %7)
ret i32 %8
}
void omirror() {}


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

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

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

LLVM IR (-O2):
define void @omirror() {
ret void
}
/* Variables and functions */
int validate_bugs(const char *bugs) {
  if (bugs == NULL) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<validate_bugs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <validate_bugs+0x1f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1126 <validate_bugs+0x26>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_bugs>:
cmp    $0x1,%rdi
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @validate_bugs(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @validate_bugs(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = sext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ putchar(char);
void output(int *num, int numSize) {
  int i;
  for (i = 0; i < numSize; i++) {
    printf("%d ", num[i]);
  }
  putchar('\n');
}


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

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

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

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


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

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

LLVM IR (-O0):
define i32 @angel_syslog(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %4 [
]
4: ; preds = %1
ret i32 0
}

LLVM IR (-O2):
define i32 @angel_syslog(i32 %0) {
ret i32 0
}
void foo_2_2_2_2_1_1_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_2_2_1_1_1_1_1() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t b4_LE_to_uint32(const uint8_t *b) {
  uint32_t value = (b[3] << 24) | (b[2] << 16) | (b[1] << 8) | b[0];
  return value;
}


x86 assembly (clang, -O0):
<b4_LE_to_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
or     (%rcx),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b4_LE_to_uint32>:
mov    0xc(%rdi),%ecx
shl    $0x18,%ecx
mov    0x4(%rdi),%eax
mov    0x8(%rdi),%edx
shl    $0x10,%edx
or     %ecx,%edx
shl    $0x8,%eax
or     %edx,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @b4_LE_to_uint32(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 3
%6 = load i32, i32* %5
%7 = shl i32 %6, 24
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 2
%10 = load i32, i32* %9
%11 = shl i32 %10, 16
%12 = or i32 %7, %11
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 1
%15 = load i32, i32* %14
%16 = shl i32 %15, 8
%17 = or i32 %12, %16
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 0
%20 = load i32, i32* %19
%21 = or i32 %17, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @b4_LE_to_uint32(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = shl i32 %6, 16
%8 = or i32 %7, %4
%9 = getelementptr inbounds i32, i32* %0, i64 1
%10 = load i32, i32* %9
%11 = shl i32 %10, 8
%12 = or i32 %8, %11
%13 = load i32, i32* %0
%14 = or i32 %12, %13
ret i32 %14
}
void INT_Excep_MTU7_TGIV7(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU7_TGIV7() {
ret void
}
extern void __attribute__((no)) __attribute__((visibility("default")))
rtld_db_dlactivity() {}


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

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

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

LLVM IR (-O2):
define void @rtld_db_dlactivity() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cprofile_result_log(char *, int, char const *);
void cprofile_result_logall(const char *logfile) {
  cprofile_result_log("/", 1, logfile);
}


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

x86 assembly (clang, -O2):
<cprofile_result_logall>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <cprofile_result_log@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define void @cprofile_result_logall(i8* %0) {
%2 = tail call i32 @cprofile_result_log(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
char *strrchr(char const *, char);
int ends_with_so(const char *str) {
  char *dot = strrchr(str, '.');
  return (NULL == dot) ? 0 : strcmp(dot + 1, "so") == 0;
}


x86 assembly (clang, -O0):
<ends_with_so>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1154 <ends_with_so+0x34>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1177 <ends_with_so+0x57>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0xe9d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ends_with_so>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1150 <ends_with_so+0x30>
add    $0x1,%rax
lea    0xec5(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"so\00"
define i32 @ends_with_so(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 46)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* null, %6
br i1 %7, label %8, label %9
8: ; preds = %1
br label %15
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %9, %8
%16 = phi i32 [ 0, %8 ], [ %14, %9 ]
ret i32 %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"so\00"
define i32 @ends_with_so(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 1
%6 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %1, %4
%10 = phi i32 [ %8, %4 ], [ 0, %1 ]
ret i32 %10
}