xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "usage: csplit [-ks] [-f prefix] [-n number] file args ...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [59 x i8] c"usage: csplit [-ks] [-f prefix] [-n number] file args ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [59 x i8] c"usage: csplit [-ks] [-f prefix] [-n number] file args ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ setsid();
void test(void) {
  pid_t pid;
  pid = setsid();
}


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

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

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
%2 = call i32 (...) @setsid()
store i32 %2, i32* %1
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 (...) @setsid()
ret void
}
int fun_1(short *a) {
  return *(
      (short *)__builtin_assume_aligned((short *)((unsigned int)a * 2), 2));
}


x86 assembly (clang, -O0):
<fun_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x1,%eax
mov    %eax,%eax
movswl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_1>:
add    %edi,%edi
movswl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @fun_1(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = ptrtoint i16* %3 to i32
%5 = mul i32 %4, 2
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i16*
%8 = bitcast i16* %7 to i8*
%9 = bitcast i8* %8 to i16*
%10 = load i16, i16* %9
%11 = sext i16 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @fun_1(i16* %0) {
%2 = ptrtoint i16* %0 to i64
%3 = shl i64 %2, 1
%4 = and i64 %3, 4294967294
%5 = inttoptr i64 %4 to i16*
%6 = inttoptr i64 %4 to i8*
%7 = load i16, i16* %5
%8 = sext i16 %7 to i32
ret i32 %8
}
long max5(long a, long b, long c, long d, long e) {
  long out = a;
  if (b > out) {
    out = b;
  }
  if (c > out) {
    out = c;
  }
  if (d > out) {
    out = d;
  }
  if (e > out) {
    out = e;
  }
  return out;
}


x86 assembly (clang, -O0):
<max5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x30(%rbp),%rax
jle    1136 <max5+0x36>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x30(%rbp),%rax
jle    114c <max5+0x4c>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x30(%rbp),%rax
jle    1162 <max5+0x62>
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x30(%rbp),%rax
jle    1178 <max5+0x78>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max5>:
mov    %rdi,%rax
cmp    %rdi,%rsi
cmovg  %rsi,%rax
cmp    %rdx,%rax
cmovl  %rdx,%rax
cmp    %rcx,%rax
cmovl  %rcx,%rax
cmp    %r8,%rax
cmovl  %r8,%rax
ret

LLVM IR (-O0):
define i64 @max5(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%12 = load i64, i64* %6
store i64 %12, i64* %11
%13 = load i64, i64* %7
%14 = load i64, i64* %11
%15 = icmp sgt i64 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %5
%17 = load i64, i64* %7
store i64 %17, i64* %11
br label %18
18: ; preds = %16, %5
%19 = load i64, i64* %8
%20 = load i64, i64* %11
%21 = icmp sgt i64 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = load i64, i64* %8
store i64 %23, i64* %11
br label %24
24: ; preds = %22, %18
%25 = load i64, i64* %9
%26 = load i64, i64* %11
%27 = icmp sgt i64 %25, %26
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = load i64, i64* %9
store i64 %29, i64* %11
br label %30
30: ; preds = %28, %24
%31 = load i64, i64* %10
%32 = load i64, i64* %11
%33 = icmp sgt i64 %31, %32
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = load i64, i64* %10
store i64 %35, i64* %11
br label %36
36: ; preds = %34, %30
%37 = load i64, i64* %11
ret i64 %37
}

LLVM IR (-O2):
define i64 @max5(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = icmp sgt i64 %1, %0
%7 = select i1 %6, i64 %1, i64 %0
%8 = icmp slt i64 %7, %2
%9 = select i1 %8, i64 %2, i64 %7
%10 = icmp slt i64 %9, %3
%11 = select i1 %10, i64 %3, i64 %9
%12 = icmp slt i64 %11, %4
%13 = select i1 %12, i64 %4, i64 %11
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void print_hman(int dead) {
  printf("%s\n%s\n", dead ? "(x_x)" : "(o_o)",
         " -|- "
         "\n"
         " / \\ ");
}


x86 assembly (clang, -O0):
<print_hman>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xee8(%rip),%rsi
lea    0xedb(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xec6(%rip),%rdi
lea    0xed2(%rip),%rdx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hman>:
test   %edi,%edi
lea    0xef4(%rip),%rax
lea    0xee7(%rip),%rsi
cmove  %rax,%rsi
lea    0xed5(%rip),%rdi
lea    0xee1(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [6 x i8] c"(x_x)\00"
@.str.2 = [6 x i8] c"(o_o)\00"
@.str.3 = [12 x i8] c" -|- \0A / \\ \00"
define void @print_hman(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [6 x i8] c"(x_x)\00"
@.str.2 = [6 x i8] c"(o_o)\00"
@.str.3 = [12 x i8] c" -|- \0A / \\ \00"
define void @print_hman(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *my_mallocc(int, char *);
int /*<<< orphan*/ sprintf(char *, char *, long);
char *ltoa(long in) {
  char *r = my_mallocc(16, "string");
  sprintf(r, "%ld", in);
  return r;
}


x86 assembly (clang, -O0):
<ltoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x10,%edi
lea    0xec8(%rip),%rsi
call   1030 <my_mallocc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb7(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltoa>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xed2(%rip),%rsi
mov    $0x10,%edi
call   1030 <my_mallocc@plt>
mov    %rax,%rbx
lea    0xec5(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"string\00"
@.str.1 = [4 x i8] c"%ld\00"
define i8* @ltoa(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = call i8* @my_mallocc(i32 16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i64, i64* %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [7 x i8] c"string\00"
@.str.1 = [4 x i8] c"%ld\00"
define i8* @ltoa(i64 %0) {
%2 = tail call i8* @my_mallocc(i32 16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 %0)
ret i8* %2
}
void NV12ToRGB565Row_C() {}


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

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

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

LLVM IR (-O2):
define void @NV12ToRGB565Row_C() {
ret void
}
int mdp4_lcdc_pipe_commit(int cndx, int wait) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mdp4_lcdc_pipe_commit(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar(int, int);
int /*<<< orphan*/ reduced(int /*<<< orphan*/, double, int /*<<< orphan*/,
                           double, int /*<<< orphan*/);
int main(void) {
  reduced(0, 0.0, 0, 0.0, 0);
  bar(1, 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
xorps  %xmm1,%xmm1
mov    %edx,%edi
movaps %xmm1,%xmm0
mov    %edx,%esi
call   1040 <reduced@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <reduced@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @reduced(i32 0, double 0.000000e+00, i32 0, double 0.000000e+00, i32 0)
%2 = call i32 @bar(i32 1, i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @reduced(i32 0, double 0.000000e+00, i32 0, double 0.000000e+00, i32 0)
%2 = tail call i32 @bar(i32 1, i32 2)
ret i32 0
}
/* Variables and functions */
scalar_t__ read_double();
int read_int(void) { return (int)read_double(); }


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

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

LLVM IR (-O0):
define i32 @read_int() {
%1 = call i64 (...) @read_double()
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @read_int() {
%1 = tail call i64 (...) @read_double()
%2 = trunc i64 %1 to i32
ret i32 %2
}
int f(int *x) { return (x == (int *)0); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @f(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp eq i32* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @f(i32* readnone %0) {
%2 = icmp eq i32* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print_ledger_default(int);
void print_ledger(int parameter) { print_ledger_default(parameter); }


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

x86 assembly (clang, -O2):
<print_ledger>:
jmp    1030 <print_ledger_default@plt>

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

LLVM IR (-O2):
define void @print_ledger(i32 %0) {
%2 = tail call i32 @print_ledger_default(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char *, char *);
isGET(char *req) {
  if (strstr(req, "GET") != NULL)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isGET>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     1142 <isGET+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <isGET+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"GET\00"
define i32 @isGET(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32* @strstr(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %8
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 = [4 x i8] c"GET\00"
define i32 @isGET(i8* %0) {
%2 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int _atoi(char *, int /*<<< orphan*/, int, int /*<<< orphan*/);
int myAtoi(char *str) { return _atoi(str, 0, 1, 0); }


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

x86 assembly (clang, -O2):
<myAtoi>:
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
jmp    1030 <_atoi@plt>

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

LLVM IR (-O2):
define i32 @myAtoi(i8* %0) {
%2 = tail call i32 @_atoi(i8* %0, i32 0, i32 1, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void printFileTypeError() { fprintf(stderr, "Unknown file type\n"); }


x86 assembly (clang, -O0):
<printFileTypeError>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printFileTypeError>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Unknown file type\0A\00"
define void @printFileTypeError() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Unknown file type\0A\00"
define void @printFileTypeError() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_stream_handle_noplay_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_stream@%p::handle_noplay (rtpp_stream_handle_noplay) is "
          "invoked after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_stream_handle_noplay_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_stream_handle_noplay_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [95 x i8] c"Method rtpp_stream@%p::handle_noplay (rtpp_stream_handle_noplay) is invoked after destruction\0A\00"
define void @rtpp_stream_handle_noplay_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [95 x i8] c"Method rtpp_stream@%p::handle_noplay (rtpp_stream_handle_noplay) is invoked after destruction\0A\00"
define void @rtpp_stream_handle_noplay_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
void *lelomemset(void *s, int c, int n) {
  int i;
  char *ss = (char *)s;
  for (i = 0; i < n; i++)
    ss[i] = c;
  return s;
}


x86 assembly (clang, -O0):
<lelomemset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1147 <lelomemset+0x47>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111d <lelomemset+0x1d>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lelomemset>:
push   %rbx
mov    %rdi,%rbx
test   %edx,%edx
jle    1122 <lelomemset+0x12>
mov    %edx,%edx
mov    %rbx,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @lelomemset(i8* returned writeonly %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = trunc i32 %1 to i8
%7 = zext i32 %2 to i64
br label %8
8: ; preds = %5, %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void int_usage(void) {
  puts("e:\tedit blank diff\n"
       "eb:\tedit both diffs concatenated\n"
       "el:\tedit left diff\n"
       "er:\tedit right diff\n"
       "l | 1:\tchoose left diff\n"
       "r | 2:\tchoose right diff\n"
       "s:\tsilent mode--don't print identical lines\n"
       "v:\tverbose mode--print identical lines\n"
       "q:\tquit");
}


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

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

LLVM IR (-O0):
@.str = [231 x i8] c"e:\09edit blank diff\0Aeb:\09edit both diffs concatenated\0Ael:\09edit left diff\0Aer:\09edit right diff\0Al | 1:\09choose left diff\0Ar | 2:\09choose right diff\0As:\09silent mode--don't print identical lines\0Av:\09verbose mode--print identical lines\0Aq:\09quit\00"
define void @int_usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([231 x i8], [231 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [231 x i8] c"e:\09edit blank diff\0Aeb:\09edit both diffs concatenated\0Ael:\09edit left diff\0Aer:\09edit right diff\0Al | 1:\09choose left diff\0Ar | 2:\09choose right diff\0As:\09silent mode--don't print identical lines\0Av:\09verbose mode--print identical lines\0Aq:\09quit\00"
define void @int_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([231 x i8], [231 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *calloc(int, int);
void *aligned_calloc(size_t size) {
  void *mem = calloc(size + 64 + sizeof(void *), 1);
  void **ptr = NULL;
  if (mem != NULL) {
    ptr = (void **)((uintptr_t)(mem + 64 + sizeof(void *)) &
                    ~(uintptr_t)(64 - 1));
    ptr[-1] = mem;
  }
  return ptr;
}


x86 assembly (clang, -O0):
<aligned_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rax
add    $0x8,%rax
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116b <aligned_calloc+0x5b>
mov    -0x10(%rbp),%rax
add    $0x40,%rax
add    $0x8,%rax
and    $0xffffffffffffffc0,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,-0x8(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aligned_calloc>:
push   %rax
add    $0x48,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1134 <aligned_calloc+0x24>
mov    %rax,%rcx
add    $0x48,%rax
and    $0xffffffffffffffc0,%rax
mov    %rcx,-0x8(%rax)
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @aligned_calloc(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = add i32 %2, 72
%4 = tail call i8* @calloc(i32 %3, i32 1)
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %1
%7 = getelementptr i8, i8* %4, i64 72
%8 = ptrtoint i8* %7 to i64
%9 = and i64 %8, -64
%10 = inttoptr i64 %9 to i8**
%11 = getelementptr inbounds i8*, i8** %10, i64 -1
store i8* %4, i8** %11
%12 = inttoptr i64 %9 to i8*
br label %13
13: ; preds = %6, %1
%14 = phi i8* [ %12, %6 ], [ null, %1 ]
ret i8* %14
}
unsigned long long trees(unsigned n) {
  if (n <= 1) {
    return 1;
  }
  unsigned long long res = 0;
  unsigned i;
  for (i = 0; i < n; i++) {
    res += 2 * trees(i) * trees(n - i - 1);
  }
  return res;
}


x86 assembly (clang, -O0):
<trees>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
ja     1132 <trees+0x22>
movq   $0x1,-0x8(%rbp)
jmp    1194 <trees+0x84>
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    118c <trees+0x7c>
mov    -0x1c(%rbp),%edi
call   1030 <trees@plt>
shl    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%edi
sub    -0x1c(%rbp),%edi
sub    $0x1,%edi
call   1030 <trees@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
imul   %rcx,%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1141 <trees+0x31>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trees>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%r14d
cmp    $0x2,%edi
jb     1151 <trees+0x41>
mov    %edi,%ebp
add    $0xffffffff,%ebp
xor    %ebx,%ebx
xor    %r14d,%r14d
nopl   0x0(%rax)
mov    %ebx,%edi
call   1030 <trees@plt>
mov    %rax,%r15
mov    %ebp,%edi
call   1030 <trees@plt>
imul   %r15,%rax
lea    (%r14,%rax,2),%r14
add    $0x1,%ebx
add    $0xffffffff,%ebp
jb     1130 <trees+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i64 @trees(i32 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = icmp ule i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %1
store i64 1, i64* %2
br label %31
9: ; preds = %1
store i64 0, i64* %4
store i32 0, i32* %5
br label %10
10: ; preds = %26, %9
%11 = load i32, i32* %5
%12 = load i32, i32* %3
%13 = icmp ult i32 %11, %12
br i1 %13, label %14, label %29
14: ; preds = %10
%15 = load i32, i32* %5
%16 = call i64 @trees(i32 %15)
%17 = mul i64 2, %16
%18 = load i32, i32* %3
%19 = load i32, i32* %5
%20 = sub i32 %18, %19
%21 = sub i32 %20, 1
%22 = call i64 @trees(i32 %21)
%23 = mul i64 %17, %22
%24 = load i64, i64* %4
%25 = add i64 %24, %23
store i64 %25, i64* %4
br label %26
26: ; preds = %14
%27 = load i32, i32* %5
%28 = add i32 %27, 1
store i32 %28, i32* %5
br label %10
29: ; preds = %10
%30 = load i64, i64* %4
store i64 %30, i64* %2
br label %31
31: ; preds = %29, %8
%32 = load i64, i64* %2
ret i64 %32
}

LLVM IR (-O2):
define i64 @trees(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %15, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %13, %3 ], [ 0, %1 ]
%5 = phi i64 [ %12, %3 ], [ 0, %1 ]
%6 = tail call i64 @trees(i32 %4)
%7 = shl i64 %6, 1
%8 = xor i32 %4, -1
%9 = add i32 %8, %0
%10 = tail call i64 @trees(i32 %9)
%11 = mul i64 %7, %10
%12 = add i64 %11, %5
%13 = add nuw i32 %4, 1
%14 = icmp eq i32 %13, %0
br i1 %14, label %15, label %3
15: ; preds = %3, %1
%16 = phi i64 [ 1, %1 ], [ %12, %3 ]
ret i64 %16
}
double inner_2d(double *p0, double *p1) {
  double out = *(p0++) * *(p1++);
  return out + (*p0 * *p1);
}


x86 assembly (clang, -O0):
<inner_2d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<inner_2d>:
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @inner_2d(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = getelementptr inbounds double, double* %6, i32 1
store double* %7, double** %3
%8 = load double, double* %6
%9 = load double*, double** %4
%10 = getelementptr inbounds double, double* %9, i32 1
store double* %10, double** %4
%11 = load double, double* %9
%12 = fmul double %8, %11
store double %12, double* %5
%13 = load double, double* %5
%14 = load double*, double** %3
%15 = load double, double* %14
%16 = load double*, double** %4
%17 = load double, double* %16
%18 = call double @llvm.fmuladd.f64(double %15, double %17, double %13)
ret double %18
}

LLVM IR (-O2):
define double @inner_2d(double* nocapture %0, double* nocapture %1) {
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %0
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %1
%7 = fmul double %4, %6
%8 = load double, double* %3
%9 = load double, double* %5
%10 = tail call double @llvm.fmuladd.f64(double %8, double %9, double %7)
ret double %10
}
int prefix(s1, s2)
register char *s1, *s2;
{
  register char c;
  while ((c = *s1++) == *s2++)
    if (c == '\0')
      return (1);
  return (c == '\0');
}


x86 assembly (clang, -O0):
<prefix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x19(%rbp)
movsbl %al,%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    115b <prefix+0x5b>
movsbl -0x19(%rbp),%eax
cmp    $0x0,%eax
jne    1156 <prefix+0x56>
movl   $0x1,-0x4(%rbp)
jmp    116d <prefix+0x6d>
jmp    110c <prefix+0xc>
movsbl -0x19(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @prefix(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %11, %9 ]
%5 = phi i8* [ %1, %2 ], [ %10, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = getelementptr inbounds i8, i8* %4, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %16, label %3
13: ; preds = %3
%14 = icmp eq i8 %6, 0
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %9, %13
%17 = phi i32 [ %15, %13 ], [ 1, %9 ]
ret i32 %17
}
/* Variables and functions */
float M_PI;
int cos(float);
float sineEaseInOutf(float p) { return 0.5 * (1 - cos(p * M_PI)); }


x86 assembly (clang, -O0):
<sineEaseInOutf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    0x2ebf(%rip),%rax
mulss  (%rax),%xmm0
call   1030 <cos@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm1
movsd  0xeb9(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sineEaseInOutf>:
push   %rax
mov    0x2ed0(%rip),%rax
mulss  (%rax),%xmm0
call   1030 <cos@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mulsd  0xec9(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define float @sineEaseInOutf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* @M_PI
%5 = fmul float %3, %4
%6 = call i32 @cos(float %5)
%7 = sub nsw i32 1, %6
%8 = sitofp i32 %7 to double
%9 = fmul double 5.000000e-01, %8
%10 = fptrunc double %9 to float
ret float %10
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define float @sineEaseInOutf(float %0) {
%2 = load float, float* @M_PI
%3 = fmul float %2, %0
%4 = tail call i32 @cos(float %3)
%5 = sub nsw i32 1, %4
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 5.000000e-01
%8 = fptrunc double %7 to float
ret float %8
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool utf32_is_valid(uint32_t cp) {
  if ((cp >= 0xd800) && (cp <= 0xdfff))
    return false;
  return cp <= 0x10ffff;
}


x86 assembly (clang, -O0):
<utf32_is_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xd800,-0x8(%rbp)
jl     112d <utf32_is_valid+0x2d>
cmpl   $0xdfff,-0x8(%rbp)
jg     112d <utf32_is_valid+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    113f <utf32_is_valid+0x3f>
cmpl   $0x10ffff,-0x8(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf32_is_valid>:
mov    %edi,%eax
and    $0xfffff800,%eax
cmp    $0xd800,%eax
setne  %al
cmp    $0x110000,%edi
setl   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @utf32_is_valid(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 55296
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57343
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 0, i32* %2
br label %14
10: ; preds = %6, %1
%11 = load i32, i32* %3
%12 = icmp sle i32 %11, 1114111
%13 = zext i1 %12 to i32
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @utf32_is_valid(i32 %0) {
%2 = and i32 %0, -2048
%3 = icmp ne i32 %2, 55296
%4 = icmp slt i32 %0, 1114112
%5 = and i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
struct iio_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
struct iio_context *iio_create_xml_context_mem(const char *xml, size_t len) {
  errno = ENOSYS;
  return NULL;
}


x86 assembly (clang, -O0):
<iio_create_xml_context_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iio_create_xml_context_mem>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.iio_context = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define %struct.iio_context* @iio_create_xml_context_mem(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret %struct.iio_context* null
}

LLVM IR (-O2):
%struct.iio_context = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define noalias %struct.iio_context* @iio_create_xml_context_mem(i8* nocapture readnone %0, i64 %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret %struct.iio_context* null
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBDMAChannelCountSet(uint32_t ui32Base, uint32_t ui32Channel,
                           uint32_t ui32Count) {
  ASSERT(ui32Base == 0x40050000);
  ASSERT(ui32Channel < 8);
  (*((volatile uint32_t *)(ui32Base + 0x0000020C + (0x10 * ui32Channel)))) =
      ui32Count;
}


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

x86 assembly (clang, -O2):
<USBDMAChannelCountSet>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x8,%ebp
setl   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
movslq %ebp,%rcx
shl    $0x4,%rcx
mov    %r14d,0x20c(%rax,%rcx,1)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @USBDMAChannelCountSet(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1074069504
%9 = zext i1 %8 to i32
%10 = call i32 @ASSERT(i32 %9)
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 8
%13 = zext i1 %12 to i32
%14 = call i32 @ASSERT(i32 %13)
%15 = load i32, i32* %6
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 524
%18 = load i32, i32* %5
%19 = mul nsw i32 16, %18
%20 = add nsw i32 %17, %19
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to i32*
store volatile i32 %15, i32* %22
ret void
}

LLVM IR (-O2):
define void @USBDMAChannelCountSet(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 1074069504
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = icmp slt i32 %1, 8
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = add nsw i32 %0, 524
%11 = shl nsw i32 %1, 4
%12 = add nsw i32 %10, %11
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
store volatile i32 %2, i32* %14
ret void
}
/* Type definitions */
struct sk_buff {
  int dummy;
};

/* Variables and functions */
int cap_netlink_send(struct sk_buff *);
int security_netlink_send(struct sk_buff *skb) { return cap_netlink_send(skb); }


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

x86 assembly (clang, -O2):
<security_netlink_send>:
jmp    1030 <cap_netlink_send@plt>

LLVM IR (-O0):
%struct.sk_buff = type { i32 }
define i32 @security_netlink_send(%struct.sk_buff* %0) {
%2 = alloca %struct.sk_buff*
store %struct.sk_buff* %0, %struct.sk_buff** %2
%3 = load %struct.sk_buff*, %struct.sk_buff** %2
%4 = call i32 @cap_netlink_send(%struct.sk_buff* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.sk_buff = type { i32 }
define i32 @security_netlink_send(%struct.sk_buff* %0) {
%2 = tail call i32 @cap_netlink_send(%struct.sk_buff* %0)
ret i32 %2
}
int securestore_key_write(char *keyname, char *keybuf, unsigned int keylen,
                          int keytype) {
  return -1;
}


x86 assembly (clang, -O0):
<securestore_key_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @securestore_key_write(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @securestore_key_write(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i32 %3) {
ret i32 -1
}
void SNDWavUnMuteAudio(void) {}


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

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

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

LLVM IR (-O2):
define void @SNDWavUnMuteAudio() {
ret void
}
int msmthorium_unclamp_secondary_arm_cpu(unsigned int cpu) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @msmthorium_unclamp_secondary_arm_cpu(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void exitfunc21(void) {
  printf("Executing exitfunc21.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<exitfunc21>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc21>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Executing exitfunc21.\0A\00"
define void @exitfunc21() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [22 x i8] c"Executing exitfunc21.\00"
define void @exitfunc21() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int floor(int);
int /*<<< orphan*/ max_heapify(int *, int, int);
void build_max_heap(int data[], int count) {
  int i = floor(count / 2);
  for (; i >= 1; i--) {
    max_heapify(data, i, count);
  }
}


x86 assembly (clang, -O0):
<build_max_heap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <floor@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jl     116b <build_max_heap+0x4b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <max_heapify@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1144 <build_max_heap+0x24>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_max_heap>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
shr    $0x1f,%edi
add    %esi,%edi
sar    %edi
call   1040 <floor@plt>
test   %eax,%eax
jle    1156 <build_max_heap+0x36>
mov    %eax,%ebx
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <max_heapify@plt>
lea    -0x1(%rbx),%eax
cmp    $0x1,%ebx
mov    %eax,%ebx
ja     1140 <build_max_heap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @build_max_heap(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sdiv i32 %6, 2
%8 = call i32 @floor(i32 %7)
store i32 %8, i32* %5
br label %9
9: ; preds = %17, %2
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 1
br i1 %11, label %12, label %20
12: ; preds = %9
%13 = load i32*, i32** %3
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = call i32 @max_heapify(i32* %13, i32 %14, i32 %15)
br label %17
17: ; preds = %12
%18 = load i32, i32* %5
%19 = add nsw i32 %18, -1
store i32 %19, i32* %5
br label %9
20: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @build_max_heap(i32* %0, i32 %1) {
%3 = sdiv i32 %1, 2
%4 = tail call i32 @floor(i32 %3)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %4, %2 ]
%8 = tail call i32 @max_heapify(i32* %0, i32 %7, i32 %1)
%9 = add nsw i32 %7, -1
%10 = icmp ugt i32 %7, 1
br i1 %10, label %6, label %11
11: ; preds = %6, %2
ret void
}
int machswap() {
  char *ctest;
  int itest;
  itest = 1;
  ctest = (char *)&itest;
  if (*ctest)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<machswap>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x14(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     112c <machswap+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1133 <machswap+0x33>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @machswap() {
ret i32 1
}
/* Variables and functions */
int floor(float);
float roundToHundreths(float number) { return floor(number * 100 + .5) / 100; }


x86 assembly (clang, -O0):
<roundToHundreths>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xee3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeca(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <floor@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundToHundreths>:
push   %rax
mulss  0xee7(%rip),%xmm0
addss  0xee3(%rip),%xmm0
call   1030 <floor@plt>
cltq
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @roundToHundreths(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 1.000000e+02
%5 = fpext float %4 to double
%6 = fadd double %5, 5.000000e-01
%7 = fptrunc double %6 to float
%8 = call i32 @floor(float %7)
%9 = sdiv i32 %8, 100
%10 = sitofp i32 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @roundToHundreths(float %0) {
%2 = fmul float %0, 1.000000e+02
%3 = fadd float %2, 5.000000e-01
%4 = tail call i32 @floor(float %3)
%5 = sdiv i32 %4, 100
%6 = sitofp i32 %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x72() {
  Assert_real((isupper(114) == 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_isupper.c",
              575, ("isupper should be 0 for r"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x72>:
push   %rax
mov    $0x72,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x23f,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for r\00"
define void @t_isupper_0x72() {
%1 = call i64 @isupper(i32 114)
%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 575, i8* getelementptr inbounds ([26 x i8], [26 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for r\00"
define void @t_isupper_0x72() {
%1 = tail call i64 @isupper(i32 114)
%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 575, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}