xunge/DecIR huggingface dataset:
void DMADefaultHandler() {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<DMADefaultHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <DMADefaultHandler+0x9>
jmp    1109 <DMADefaultHandler+0x9>

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

LLVM IR (-O0):
define void @DMADefaultHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @DMADefaultHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void Internet_status(void) {}


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

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

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

LLVM IR (-O2):
define void @Internet_status() {
ret void
}
void rop3_48_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = ~S;
  stk1 = T & stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_48_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_48_0_1>:
mov    %edx,%eax
not    %eax
or     %esi,%eax
not    %esi
movzbl (%rdi),%ecx
or     %eax,%ecx
and    %edx,%esi
and    %ecx,%esi
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_48_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = xor i32 %10, -1
%12 = trunc i32 %11 to i8
store i8 %12, i8* %8
%13 = load i8, i8* %6
%14 = zext i8 %13 to i32
%15 = load i8, i8* %8
%16 = zext i8 %15 to i32
%17 = and i32 %14, %16
%18 = trunc i32 %17 to i8
store i8 %18, i8* %7
%19 = load i8, i8* %7
%20 = zext i8 %19 to i32
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = and i32 %20, %22
%24 = load i8, i8* %7
%25 = zext i8 %24 to i32
%26 = load i8, i8* %6
%27 = zext i8 %26 to i32
%28 = xor i32 %27, -1
%29 = and i32 %25, %28
%30 = or i32 %23, %29
%31 = load i8, i8* %6
%32 = zext i8 %31 to i32
%33 = load i8, i8* %5
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = load i8*, i8** %4
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = and i32 %36, %39
%41 = or i32 %30, %40
%42 = trunc i32 %41 to i8
%43 = load i8*, i8** %4
store i8 %42, i8* %43
ret void
}

LLVM IR (-O2):
define void @rop3_48_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = zext i8 %1 to i32
%5 = xor i32 %4, -1
%6 = zext i8 %2 to i32
%7 = trunc i32 %5 to i8
%8 = and i8 %7, %2
%9 = zext i8 %8 to i32
%10 = and i8 %8, %1
%11 = zext i8 %10 to i32
%12 = xor i32 %6, -1
%13 = and i32 %9, %12
%14 = or i32 %13, %11
%15 = and i32 %6, %5
%16 = load i8, i8* %0
%17 = zext i8 %16 to i32
%18 = and i32 %15, %17
%19 = or i32 %14, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %0
ret void
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct sockaddr_in *);
void sockaddr_in_free(struct sockaddr_in *sa) { free(sa); }


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

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

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

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
define void @sockaddr_in_free(%struct.sockaddr_in* nocapture %0) {
%2 = tail call i32 @free(%struct.sockaddr_in* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ syscall(int, int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void iexit() { syscall(0x4978, 0, 0, 0); }


x86 assembly (clang, -O0):
<iexit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4978,%edi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<iexit>:
mov    $0x4978,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define void @iexit() {
%1 = call i32 @syscall(i32 18808, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @iexit() {
%1 = tail call i32 @syscall(i32 18808, i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void megafree(void *ptr) { free((char *)ptr); }


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

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

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

LLVM IR (-O2):
define void @megafree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int ft_check_char(char *);
int ft_check_file(char *);
int ft_check_grid(char *);
int ft_full_check(char *stream) {
  if (ft_check_char(stream) != 1)
    return (0);
  if (ft_check_file(stream) != 1)
    return (0);
  if (ft_check_grid(stream) != 1)
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<ft_full_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ft_check_char@plt>
cmp    $0x1,%eax
je     115a <ft_full_check+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    119d <ft_full_check+0x6d>
mov    -0x10(%rbp),%rdi
call   1050 <ft_check_file@plt>
cmp    $0x1,%eax
je     1178 <ft_full_check+0x48>
movl   $0x0,-0x4(%rbp)
jmp    119d <ft_full_check+0x6d>
mov    -0x10(%rbp),%rdi
call   1030 <ft_check_grid@plt>
cmp    $0x1,%eax
je     1196 <ft_full_check+0x66>
movl   $0x0,-0x4(%rbp)
jmp    119d <ft_full_check+0x6d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_full_check>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <ft_check_char@plt>
xor    %ebp,%ebp
cmp    $0x1,%eax
jne    1160 <ft_full_check+0x30>
mov    %rbx,%rdi
call   1050 <ft_check_file@plt>
cmp    $0x1,%eax
jne    1160 <ft_full_check+0x30>
mov    %rbx,%rdi
call   1030 <ft_check_grid@plt>
xor    %ebp,%ebp
cmp    $0x1,%eax
sete   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ft_full_check(i8* %0) {
%2 = tail call i32 @ft_check_char(i8* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i32 @ft_check_file(i8* %0)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i32 @ft_check_grid(i8* %0)
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 0, %1 ], [ 0, %4 ], [ %10, %7 ]
ret i32 %12
}
int main() {
  int a = 3 * 5 - 2 + 1;
  int b = 4 + a * 3;
  int c = a * b * -1;
  int d = c * a + b * c - a;
  int e = a - b + c * -d;
  if (e >= a + b + c)
    d = 550;
  int f = a * b + c / d;
  int g = a + f;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xe,-0x8(%rbp)
imul   $0x3,-0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
imul   $0xffffffff,%eax,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    %ecx,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
xor    %edx,%edx
sub    -0x14(%rbp),%edx
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jl     1170 <main+0x70>
movl   $0x226,-0x14(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 14, i32* %2
%9 = load i32, i32* %2
%10 = mul nsw i32 %9, 3
%11 = add nsw i32 4, %10
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = mul nsw i32 %12, %13
%15 = mul nsw i32 %14, -1
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = load i32, i32* %2
%18 = mul nsw i32 %16, %17
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = mul nsw i32 %19, %20
%22 = add nsw i32 %18, %21
%23 = load i32, i32* %2
%24 = sub nsw i32 %22, %23
store i32 %24, i32* %5
%25 = load i32, i32* %2
%26 = load i32, i32* %3
%27 = sub nsw i32 %25, %26
%28 = load i32, i32* %4
%29 = load i32, i32* %5
%30 = sub nsw i32 0, %29
%31 = mul nsw i32 %28, %30
%32 = add nsw i32 %27, %31
store i32 %32, i32* %6
%33 = load i32, i32* %6
%34 = load i32, i32* %2
%35 = load i32, i32* %3
%36 = add nsw i32 %34, %35
%37 = load i32, i32* %4
%38 = add nsw i32 %36, %37
%39 = icmp sge i32 %33, %38
br i1 %39, label %40, label %41
40: ; preds = %0
store i32 550, i32* %5
br label %41
41: ; preds = %40, %0
%42 = load i32, i32* %2
%43 = load i32, i32* %3
%44 = mul nsw i32 %42, %43
%45 = load i32, i32* %4
%46 = load i32, i32* %5
%47 = sdiv i32 %45, %46
%48 = add nsw i32 %44, %47
store i32 %48, i32* %7
%49 = load i32, i32* %2
%50 = load i32, i32* %7
%51 = add nsw i32 %49, %50
store i32 %51, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ emitln(char *);
void notIt() { emitln("not\t%%eax"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"not\09%%eax\00"
define void @notIt() {
%1 = call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"not\09%%eax\00"
define void @notIt() {
%1 = tail call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int main() {
  int *x;
  int y;
  x = (int *)malloc(4);
  *x = 20;
  y = *x++;
  return *x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x14,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0x14,(%rax)
mov    0x4(%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32 0, i32* %1
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %2
%6 = load i32*, i32** %2
store i32 20, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i32 1
store i32* %8, i32** %2
%9 = load i32, i32* %7
store i32 %9, i32* %3
%10 = load i32*, i32** %2
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 20, i32* %2
%3 = getelementptr inbounds i32, i32* %2, i64 1
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ DoOtherStuff();
int main() {
  DoOtherStuff();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <DoOtherStuff@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @DoOtherStuff()
ret i32 0
}
/* Variables and functions */
char *strrchr(char *, char);
void remove_term(char *s) {
  char *eof;
  if ((eof = strrchr(s, '\n')) != NULL)
    eof[0] = '\0';
}


x86 assembly (clang, -O0):
<remove_term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     113f <remove_term+0x2f>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_term>:
push   %rax
mov    $0xa,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1123 <remove_term+0x13>
movb   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @remove_term(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 10)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 0, i8* %9
br label %10
10: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @remove_term(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 10)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret void
}
/* Variables and functions */
char *add(char const *, char *);
char *addlist(char *list, const char *item) {
  if (list)
    list = add(", ", list);
  return add(item, list);
}


x86 assembly (clang, -O0):
<addlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113f <addlist+0x2f>
mov    -0x8(%rbp),%rsi
lea    0xeca(%rip),%rdi
call   1030 <add@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <add@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addlist>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
je     112d <addlist+0x1d>
mov    %rdi,%rsi
lea    0xedd(%rip),%rdi
call   1030 <add@plt>
mov    %rax,%rsi
jmp    112f <addlist+0x1f>
xor    %esi,%esi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <add@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c", \00"
define i8* @addlist(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i8* @add(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %2
%7 = phi i8* [ %5, %4 ], [ null, %2 ]
%8 = tail call i8* @add(i8* %1, i8* %7)
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ printRandomPhoneNumber();
int /*<<< orphan*/ randomize();
int main(int argc, const char *argv[]) {
  randomize();
  printRandomPhoneNumber();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <randomize@plt>
mov    $0x0,%al
call   1030 <printRandomPhoneNumber@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <randomize@plt>
xor    %eax,%eax
call   1030 <printRandomPhoneNumber@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @randomize()
%7 = call i32 (...) @printRandomPhoneNumber()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @randomize()
%4 = tail call i32 (...) @printRandomPhoneNumber()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f1(int);
void f2() { f1(17); }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x11,%edi
call   1030 <f1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    $0x11,%edi
jmp    1030 <f1@plt>

LLVM IR (-O0):
define void @f2() {
%1 = call i32 @f1(i32 17)
ret void
}

LLVM IR (-O2):
define void @f2() {
%1 = tail call i32 @f1(i32 17)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f();
int xmain() { f(); }


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

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

LLVM IR (-O0):
define i32 @xmain() {
%1 = alloca i32
%2 = call i32 (...) @f()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @xmain() {
%1 = tail call i32 (...) @f()
ret i32 undef
}
/* Variables and functions */
int anetTcpGenericConnect(char *, char const *, int, int /*<<< orphan*/);
int anetTcpConnect(char *err, const char *addr, int port) {
  return anetTcpGenericConnect(err, addr, port, 0);
}


x86 assembly (clang, -O0):
<anetTcpConnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <anetTcpGenericConnect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<anetTcpConnect>:
xor    %ecx,%ecx
jmp    1030 <anetTcpGenericConnect@plt>

LLVM IR (-O0):
define i32 @anetTcpConnect(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @anetTcpGenericConnect(i8* %7, i8* %8, i32 %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @anetTcpConnect(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @anetTcpGenericConnect(i8* %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int readl(int);
int oldland_serial_getc(void) {
  while (!(readl(0x80000000 + 0x4) & (1 << 1)))
    continue;
  return readl(0x80000000 + 0x0) & 0xff;
}


x86 assembly (clang, -O0):
<oldland_serial_getc>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <oldland_serial_getc+0x9>
mov    $0x80000004,%edi
call   1030 <readl@plt>
and    $0x2,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    113b <oldland_serial_getc+0x2b>
jmp    1140 <oldland_serial_getc+0x30>
jmp    1119 <oldland_serial_getc+0x9>
mov    $0x80000000,%edi
call   1030 <readl@plt>
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oldland_serial_getc>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x80000004,%edi
call   1030 <readl@plt>
test   $0x2,%al
je     1120 <oldland_serial_getc+0x10>
mov    $0x80000000,%edi
call   1030 <readl@plt>
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @oldland_serial_getc() {
br label %1
1: ; preds = %6, %0
%2 = call i32 @readl(i32 -2147483644)
%3 = and i32 %2, 2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
br i1 %5, label %6, label %7
6: ; preds = %1
br label %1
7: ; preds = %1
%8 = call i32 @readl(i32 -2147483648)
%9 = and i32 %8, 255
ret i32 %9
}

LLVM IR (-O2):
define i32 @oldland_serial_getc() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @readl(i32 -2147483644)
%3 = and i32 %2, 2
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = tail call i32 @readl(i32 -2147483648)
%7 = and i32 %6, 255
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usererror_hander(char *func_name, char *msg) {
  fprintf(stderr, "%s error: %s\n", func_name, msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usererror_hander>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usererror_hander>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"%s error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @usererror_hander(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"%s error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @usererror_hander(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
void disable_vblk_interrupt() {
  (*(volatile unsigned long *)(((0xFFFFF000) + 0x014))) = 0x10000;
  (*(volatile unsigned long *)((0xE01FC140))) = 0x4;
}


x86 assembly (clang, -O0):
<disable_vblk_interrupt>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffff014,%eax
movq   $0x10000,(%rax)
mov    $0xe01fc140,%eax
movq   $0x4,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_vblk_interrupt>:
mov    $0xe01fc140,%eax
movq   $0x10000,0x1fe02ed4(%rax)
movq   $0x4,(%rax)
ret

LLVM IR (-O0):
define void @disable_vblk_interrupt() {
store volatile i64 65536, i64* inttoptr (i64 4294963220 to i64*)
store volatile i64 4, i64* inttoptr (i64 3760177472 to i64*)
ret void
}

LLVM IR (-O2):
define void @disable_vblk_interrupt() {
store volatile i64 65536, i64* inttoptr (i64 4294963220 to i64*)
store volatile i64 4, i64* inttoptr (i64 3760177472 to i64*)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool mp2vseqdx_get_color(const uint8_t *p_mp2vseqdx) {
  return !!(p_mp2vseqdx[4] & 0x1);
}


x86 assembly (clang, -O0):
<mp2vseqdx_get_color>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vseqdx_get_color>:
mov    0x10(%rdi),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @mp2vseqdx_get_color(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
%5 = load i32, i32* %4
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @mp2vseqdx_get_color(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _throw_null_fn(char *, int);
void *_check_null(void *ptr) {
  if (ptr == 0)
    (_throw_null_fn("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/"
                    "heads/master/bin/cyc-lib/vc_cyc_include.h",
                    121));
  return ptr;
}


x86 assembly (clang, -O0):
<_check_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1138 <_check_null+0x28>
lea    0xed2(%rip),%rdi
mov    $0x79,%esi
call   1030 <_throw_null_fn@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_null>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    112a <_check_null+0x1a>
lea    0xee0(%rip),%rdi
mov    $0x79,%esi
call   1030 <_throw_null_fn@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/cyc-lib/vc_cyc_include.h\00"
define i8* @_check_null(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @_throw_null_fn(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 121)
br label %7
7: ; preds = %5, %1
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/cyc-lib/vc_cyc_include.h\00"
define i8* @_check_null(i8* readnone returned %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @_throw_null_fn(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 121)
br label %5
5: ; preds = %3, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
void randomize() { srand(time(0)); }


x86 assembly (clang, -O0):
<randomize>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @randomize() {
%1 = tail call i32 @time(i32 0)
%2 = tail call i32 @srand(i32 %1)
ret void
}
/* Variables and functions */
unsigned short _rotl16(unsigned short, unsigned char);
unsigned short test_rotl16(unsigned short value, unsigned char shift) {
  return _rotl16(value, shift);
}


x86 assembly (clang, -O0):
<test_rotl16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%ax
movzwl %ax,%edi
movzbl -0x3(%rbp),%esi
call   1030 <_rotl16@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_rotl16>:
jmp    1030 <_rotl16@plt>

LLVM IR (-O0):
define zeroext i16 @test_rotl16(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
%6 = load i8, i8* %4
%7 = call zeroext i16 @_rotl16(i16 zeroext %5, i8 zeroext %6)
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @test_rotl16(i16 zeroext %0, i8 zeroext %1) {
%3 = tail call zeroext i16 @_rotl16(i16 zeroext %0, i8 zeroext %1)
ret i16 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y;
};
typedef TYPE_1__ XGravityEvent;

/* Variables and functions */
int get_XGravityEvent_y(void *_p) { return (int)((XGravityEvent *)_p)->y; }


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

x86 assembly (clang, -O2):
<get_XGravityEvent_y>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XGravityEvent_y(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XGravityEvent_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
unsigned long long add2(unsigned long long x, unsigned y) { return x + y; }


x86 assembly (clang, -O0):
<add2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add2>:
mov    %esi,%eax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @add2(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = zext i32 %6 to i64
%8 = add i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @add2(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = add i64 %3, %0
ret i64 %4
}
int comparator_long(long *a, long *b) {
  return *a == *b ? 0 : *a < *b ? -1 : 1;
}


x86 assembly (clang, -O0):
<comparator_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
jne    112a <comparator_long+0x2a>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    114b <comparator_long+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparator_long>:
mov    (%rdi),%rax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%rax
setge  %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @comparator_long(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %5
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = icmp eq i64 %6, %8
br i1 %9, label %10, label %11
10: ; preds = %2
br label %19
11: ; preds = %2
%12 = load i64*, i64** %3
%13 = load i64, i64* %12
%14 = load i64*, i64** %4
%15 = load i64, i64* %14
%16 = icmp slt i64 %13, %15
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 -1, i32 1
br label %19
19: ; preds = %11, %10
%20 = phi i32 [ 0, %10 ], [ %18, %11 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @comparator_long(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
%5 = icmp eq i64 %3, %4
%6 = icmp slt i64 %3, %4
%7 = select i1 %6, i32 -1, i32 1
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ handle_60(int /*<<< orphan*/);
int gen_60() { handle_60(0); }


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

x86 assembly (clang, -O2):
<gen_60>:
xor    %edi,%edi
jmp    1030 <handle_60@plt>

LLVM IR (-O0):
define i32 @gen_60() {
%1 = alloca i32
%2 = call i32 @handle_60(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gen_60() {
%1 = tail call i32 @handle_60(i32 0)
ret i32 undef
}
void UI_get0_result(void) {}


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

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

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

LLVM IR (-O2):
define void @UI_get0_result() {
ret void
}
/* Variables and functions */
int ENOSYS;
int /*<<< orphan*/ __set_errno(int);
int __ptsname_r(int fd __attribute__((unused)),
                char *buf __attribute__((unused)),
                size_t len __attribute__((unused))) {
  __set_errno(ENOSYS);
  return ENOSYS;
}


x86 assembly (clang, -O0):
<__ptsname_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ptsname_r>:
push   %rbx
mov    0x2ed0(%rip),%rbx
mov    (%rbx),%edi
call   1030 <__set_errno@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__ptsname_r(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
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
%9 = load i32, i32* @ENOSYS
ret i32 %9
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__ptsname_r(i32 %0, i8* nocapture readnone %1, i64 %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
%6 = load i32, i32* @ENOSYS
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int time(int /*<<< orphan*/);
void waitFor(unsigned int secs) {
  printf("waiting for %d seconds\n", secs);
  int retTime = time(0) + secs;
  while (time(0) < retTime)
    ;
}


x86 assembly (clang, -O0):
<waitFor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <time@plt>
add    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1040 <time@plt>
cmp    -0x8(%rbp),%eax
jge    115c <waitFor+0x3c>
jmp    1147 <waitFor+0x27>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitFor>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0xed4(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xchg   %ax,%ax
xor    %edi,%edi
call   1040 <time@plt>
cmp    %ebx,%eax
jl     1140 <waitFor+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [24 x i8] c"waiting for %d seconds\0A\00"
define void @waitFor(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @time(i32 0)
%4 = add i32 %3, %0
br label %5
5: ; preds = %5, %1
%6 = tail call i32 @time(i32 0)
%7 = icmp slt i32 %6, %4
br i1 %7, label %5, label %8
8: ; preds = %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void usage(char *name) {
  printf("Usage: %s <input filename> <output filename>\n"
         "       input file as read from /dev/v4l/video0\n"
         "       output file contains pixel data in YUY2-format\n\n"
         "       expects that the the first two 16-bit (BE) numbers\n"
         "        of the input file are width and height and will apply\n"
         "        this header to the output file as well.\n"
         "       line length equals to bytes per scan line\n"
         "Example: %s in.syuv out.yuy2\n",
         name, name);
}


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

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

LLVM IR (-O0):
@.str = [394 x i8] c"Usage: %s <input filename> <output filename>\0A input file as read from /dev/v4l/video0\0A output file contains pixel data in YUY2-format\0A\0A expects that the the first two 16-bit (BE) numbers\0A of the input file are width and height and will apply\0A this header to the output file as well.\0A line length equals to bytes per scan line\0AExample: %s in.syuv out.yuy2\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([394 x i8], [394 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [394 x i8] c"Usage: %s <input filename> <output filename>\0A input file as read from /dev/v4l/video0\0A output file contains pixel data in YUY2-format\0A\0A expects that the the first two 16-bit (BE) numbers\0A of the input file are width and height and will apply\0A this header to the output file as well.\0A line length equals to bytes per scan line\0AExample: %s in.syuv out.yuy2\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([394 x i8], [394 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
/* Type definitions */
struct object {
  int dummy;
};
struct node {
  int dummy;
};
struct expr {
  int dummy;
};
struct cond_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cond_node_class_get();
int /*<<< orphan*/ cond_node_init(struct cond_node *, struct expr *);
struct object *object_new(int /*<<< orphan*/);
struct node *cond_node_new(struct expr *condition) {
  struct object *node = object_new(cond_node_class_get());
  cond_node_init(((struct cond_node *)(node)), condition);
  return ((struct node *)(node));
}


x86 assembly (clang, -O0):
<cond_node_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <cond_node_class_get@plt>
mov    %eax,%edi
call   1040 <object_new@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <cond_node_init@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cond_node_new>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <cond_node_class_get@plt>
mov    %eax,%edi
call   1040 <object_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <cond_node_init@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.node = type { i32 }
%struct.expr = type { i32 }
%struct.object = type { i32 }
%struct.cond_node = type { i32 }
define %struct.node* @cond_node_new(%struct.expr* %0) {
%2 = alloca %struct.expr*
%3 = alloca %struct.object*
store %struct.expr* %0, %struct.expr** %2
%4 = call i32 (...) @cond_node_class_get()
%5 = call %struct.object* @object_new(i32 %4)
store %struct.object* %5, %struct.object** %3
%6 = load %struct.object*, %struct.object** %3
%7 = bitcast %struct.object* %6 to %struct.cond_node*
%8 = load %struct.expr*, %struct.expr** %2
%9 = call i32 @cond_node_init(%struct.cond_node* %7, %struct.expr* %8)
%10 = load %struct.object*, %struct.object** %3
%11 = bitcast %struct.object* %10 to %struct.node*
ret %struct.node* %11
}

LLVM IR (-O2):
%struct.node = type { i32 }
%struct.expr = type { i32 }
%struct.object = type { i32 }
%struct.cond_node = type { i32 }
define %struct.node* @cond_node_new(%struct.expr* %0) {
%2 = tail call i32 (...) @cond_node_class_get()
%3 = tail call %struct.object* @object_new(i32 %2)
%4 = bitcast %struct.object* %3 to %struct.cond_node*
%5 = tail call i32 @cond_node_init(%struct.cond_node* %4, %struct.expr* %0)
%6 = bitcast %struct.object* %3 to %struct.node*
ret %struct.node* %6
}
/* Variables and functions */
int /*<<< orphan*/ clock_lo();
int /*<<< orphan*/ data_hi();
void inhibit(void) {
  clock_lo();
  data_hi();
}


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

x86 assembly (clang, -O2):
<inhibit>:
push   %rax
xor    %eax,%eax
call   1040 <clock_lo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <data_hi@plt>

LLVM IR (-O0):
define void @inhibit() {
%1 = call i32 (...) @clock_lo()
%2 = call i32 (...) @data_hi()
ret void
}

LLVM IR (-O2):
define void @inhibit() {
%1 = tail call i32 (...) @clock_lo()
%2 = tail call i32 (...) @data_hi()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, double);
char *_dtoa(double value) {
  static char buff[100];
  sprintf(buff, "%f", value);
  return buff;
}


x86 assembly (clang, -O0):
<_dtoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0x2f17(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f04(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dtoa>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@_dtoa.buff = internal global [100 x i8] zeroinitializer
@.str = [3 x i8] c"%f\00"
define i8* @_dtoa(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @_dtoa.buff, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %3)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @_dtoa.buff, i64 0, i64 0)
}

LLVM IR (-O2):
@_dtoa.buff = internal global [100 x i8] zeroinitializer
@.str = [3 x i8] c"%f\00"
define i8* @_dtoa(double %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @_dtoa.buff, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %0)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @_dtoa.buff, i64 0, i64 0)
}
int condition_parenClose(char c) { return c == ')'; }


x86 assembly (clang, -O0):
<condition_parenClose>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x29,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<condition_parenClose>:
xor    %eax,%eax
cmp    $0x29,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @condition_parenClose(i8 signext %0) {
%2 = icmp eq i8 %0, 41
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
unsigned char glk_char_to_upper(unsigned char);
int __wrap_toupper(int ch) {
  unsigned char uch;
  uch = glk_char_to_upper((unsigned char)ch);
  return (int)uch;
}


x86 assembly (clang, -O0):
<__wrap_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movzbl %al,%edi
call   1030 <glk_char_to_upper@plt>
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_toupper>:
push   %rax
movzbl %dil,%edi
call   1030 <glk_char_to_upper@plt>
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__wrap_toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
%6 = call zeroext i8 @glk_char_to_upper(i8 zeroext %5)
store i8 %6, i8* %3
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @__wrap_toupper(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call zeroext i8 @glk_char_to_upper(i8 zeroext %2)
%4 = zext i8 %3 to i32
ret i32 %4
}
void w1(void *x, double y) { *(double *)(x + 32767) = y; }


x86 assembly (clang, -O0):
<w1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x7fff(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<w1>:
movsd  %xmm0,0x7fff(%rdi)
ret

LLVM IR (-O0):
define void @w1(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32767
%8 = bitcast i8* %7 to double*
store double %5, double* %8
ret void
}

LLVM IR (-O2):
define void @w1(i8* nocapture writeonly %0, double %1) {
%3 = getelementptr i8, i8* %0, i64 32767
%4 = bitcast i8* %3 to double*
store double %1, double* %4
ret void
}
void zlScale(signed long x, signed long y, signed long z) {}


x86 assembly (clang, -O0):
<zlScale>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @zlScale(i64 %0, i64 %1, i64 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void hook2(void) {
  printf("atexit hook 2\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<hook2>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hook2>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"atexit hook 2\0A\00"
@stdout = global i32 0
define void @hook2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [14 x i8] c"atexit hook 2\00"
define void @hook2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ find(int /*<<< orphan*/);
int main(void) {
  find(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <find@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <find@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @find(i32 0)
ret i32 0
}