xunge/DecIR huggingface dataset:
void wait() {
  volatile long i;
  for (i = 0; i < 300000; i++)
    ;
}


x86 assembly (clang, -O0):
<wait>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x493e0,%rax
jge    1132 <wait+0x32>
jmp    1121 <wait+0x21>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <wait+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait>:
movq   $0x0,-0x8(%rsp)
mov    -0x8(%rsp),%rax
cmp    $0x493df,%rax
jg     1133 <wait+0x33>
cs nopw 0x0(%rax,%rax,1)
addq   $0x1,-0x8(%rsp)
mov    -0x8(%rsp),%rax
cmp    $0x493e0,%rax
jl     1120 <wait+0x20>
ret

LLVM IR (-O0):
define void @wait() {
%1 = alloca i64
store volatile i64 0, i64* %1
br label %2
2: ; preds = %6, %0
%3 = load volatile i64, i64* %1
%4 = icmp slt i64 %3, 300000
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load volatile i64, i64* %1
%8 = add nsw i64 %7, 1
store volatile i64 %8, i64* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @wait() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store volatile i64 0, i64* %1
%3 = load volatile i64, i64* %1
%4 = icmp slt i64 %3, 300000
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = load volatile i64, i64* %1
%7 = add nsw i64 %6, 1
store volatile i64 %7, i64* %1
%8 = load volatile i64, i64* %1
%9 = icmp slt i64 %8, 300000
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret void
}
void gtk_text_iter_forward_sentence_ends() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_forward_sentence_ends() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int,
                           char const *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void bench_assertion_failed(const char *s, int line, const char *file) {
  fflush(stdout);
  fprintf(stderr, "bench: %s:%d: assertion failed: %s\n", file, line, s);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<bench_assertion_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%r8
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<bench_assertion_failed>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xea6(%rip),%rsi
mov    %rbx,%rdx
mov    %ebp,%ecx
mov    %r14,%r8
call   1030 <fprintf@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@stderr = global i32 0
@.str = [36 x i8] c"bench: %s:%d: assertion failed: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @bench_assertion_failed(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* @stdout
%8 = call i32 @fflush(i32 %7)
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %6
%11 = load i32, i32* %5
%12 = load i8*, i8** %4
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11, i8* %12)
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@stderr = global i32 0
@.str = [36 x i8] c"bench: %s:%d: assertion failed: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @bench_assertion_failed(i8* %0, i32 %1, i8* %2) {
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %1, i8* %0)
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
}
/* Variables and functions */
char *strchr(char *, char);
char *strndup(char *, int);
char *mongo_server_hash_to_server(char *hash) {
  char *ptr, *tmp;
  ptr = strchr(hash, ';');
  tmp = strndup((hash), (ptr - hash));
  return tmp;
}


x86 assembly (clang, -O0):
<mongo_server_hash_to_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3b,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%esi
call   1040 <strndup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mongo_server_hash_to_server>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3b,%esi
call   1030 <strchr@plt>
sub    %ebx,%eax
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <strndup@plt>

LLVM IR (-O0):
define i8* @mongo_server_hash_to_server(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @strchr(i8* %5, i8 signext 59)
store i8* %6, i8** %3
%7 = load i8*, i8** %2
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = ptrtoint i8* %8 to i64
%11 = ptrtoint i8* %9 to i64
%12 = sub i64 %10, %11
%13 = trunc i64 %12 to i32
%14 = call i8* @strndup(i8* %7, i32 %13)
store i8* %14, i8** %4
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
define noalias i8* @mongo_server_hash_to_server(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 59)
%3 = ptrtoint i8* %2 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = tail call i8* @strndup(i8* %0, i32 %6)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ cnext();
int /*<<< orphan*/ exit(int);
scalar_t__ isNext(char *);
int /*<<< orphan*/ printf(char *);
int next(char *set) {
  if (isNext(set))
    cnext();
  else {
    printf("error!");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <isNext@plt>
cmp    $0x0,%rax
je     116b <next+0x2b>
mov    $0x0,%al
call   1050 <cnext@plt>
jmp    1181 <next+0x41>
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next>:
push   %rax
call   1030 <isNext@plt>
test   %rax,%rax
je     1153 <next+0x13>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cnext@plt>
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"error!\00"
define i32 @next(i8* %0) {
%2 = tail call i64 @isNext(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @cnext()
ret i32 undef
6: ; preds = %1
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ x_root;
};
struct TYPE_4__ {
  TYPE_1__ xmotion;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xmotion_x_root(void *_p) {
  return (int)((XEvent *)_p)->xmotion.x_root;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XEvent_xmotion_x_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
__attribute__((always_)) void _tu_set_background(const char *color_str) {
  fputs(color_str, stdout);
}


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

x86 assembly (clang, -O2):
<_tu_set_background>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @_tu_set_background(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdout
%5 = call i32 @fputs(i8* %3, i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @_tu_set_background(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void abort(void) {
  while (1) {
    _exit(1);
  }
}


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <abort+0x9>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<abort>:
push   %rax
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @abort() {
br label %1
1: ; preds = %0
%2 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @abort() {
%1 = tail call i32 @_exit(i32 1)
unreachable
}
char *strcpy(char *dst, const char *src) {
  char *ptr = dst;
  while (*src)
    *dst++ = *src++;
  *dst = '\0';
  return ptr;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1148 <strcpy+0x48>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %rdi,%rdx
test   %cl,%cl
je     1131 <strcpy+0x31>
add    $0x1,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %cl,(%rdx)
add    $0x1,%rdx
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <strcpy+0x20>
movb   $0x0,(%rdx)
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %7
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void startDocument(void) { printf("============startDocument============\n"); }


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"============startDocument============\0A\00"
define void @startDocument() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [38 x i8] c"============startDocument============\00"
define void @startDocument() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int c;
  int b;
  while (1) {
    c = getchar();
    b = (c != EOF);
    printf("%d\n", b);
    if (c == EOF) {
      break;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2ea5(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    0x2e7f(%rip),%rcx
cmp    (%rcx),%eax
jne    1176 <main+0x56>
jmp    117b <main+0x5b>
jmp    112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    0x2ebd(%rip),%rbx
lea    0xece(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebp
xor    %esi,%esi
cmp    (%rbx),%eax
setne  %sil
mov    %r14,%rdi
call   1030 <printf@plt>
cmp    (%rbx),%ebp
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @getchar()
%3 = load i32, i32* @EOF
%4 = icmp ne i32 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @EOF
%8 = icmp eq i32 %2, %7
br i1 %8, label %9, label %1
9: ; preds = %1
ret i32 0
}
void I422ToRGB565Row_NEON() {}


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

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

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

LLVM IR (-O2):
define void @I422ToRGB565Row_NEON() {
ret void
}
int is_data_char(c)
char c;
{ return ((c >= '0' && c <= '9') || c == '+' || c == '-' || c == '.'); }


x86 assembly (clang, -O0):
<is_data_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1129 <is_data_char+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    115a <is_data_char+0x5a>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x2(%rbp)
je     115a <is_data_char+0x5a>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     115a <is_data_char+0x5a>
movsbl -0x1(%rbp),%eax
cmp    $0x2e,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_data_char>:
shl    $0x18,%edi
lea    -0x2f000001(%rdi),%ecx
mov    $0x1,%eax
cmp    $0xaffffff,%ecx
jb     1126 <is_data_char+0x26>
cmp    $0x2b000000,%edi
je     1126 <is_data_char+0x26>
cmp    $0x2d000000,%edi
jne    1127 <is_data_char+0x27>
ret
xor    %eax,%eax
cmp    $0x2e000000,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_data_char(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %23, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 43
br i1 %14, label %23, label %15
15: ; preds = %11
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 45
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8, i8* %2
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 46
br label %23
23: ; preds = %19, %15, %11, %7
%24 = phi i1 [ true, %15 ], [ true, %11 ], [ true, %7 ], [ %22, %19 ]
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @is_data_char(i32 %0) {
%2 = shl i32 %0, 24
%3 = add i32 %2, -788529153
%4 = icmp ult i32 %3, 184549375
br i1 %4, label %9, label %5
5: ; preds = %1
switch i32 %2, label %6 [
i32 754974720, label %9
i32 721420288, label %9
]
6: ; preds = %5
%7 = icmp eq i32 %2, 771751936
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %5, %1, %6
%10 = phi i32 [ %8, %6 ], [ 1, %5 ], [ 1, %1 ], [ 1, %5 ]
ret i32 %10
}
void io_init(void) { ; }


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

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

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

LLVM IR (-O2):
define void @io_init() {
ret void
}
void gtk_box_set_spacing() {}


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

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

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

LLVM IR (-O2):
define void @gtk_box_set_spacing() {
ret void
}
int isspace(int c) {
  if ((c >= 9 && c <= 13) || c == 32)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jl     111b <isspace+0x1b>
cmpl   $0xd,-0x8(%rbp)
jle    1125 <isspace+0x25>
cmpl   $0x20,-0x8(%rbp)
jne    1131 <isspace+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1138 <isspace+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
mov    $0x1,%eax
lea    -0x9(%rdi),%ecx
cmp    $0x5,%ecx
jae    110e <isspace+0xe>
ret
cmp    $0x20,%edi
je     110d <isspace+0xd>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %3
i32 13, label %3
i32 12, label %3
i32 11, label %3
i32 10, label %3
i32 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int __builtin_mul(int, int);
int /*<<< orphan*/ putchar(int);
int main() {
  putchar(__builtin_mul(22, 5));
  int a = 22;
  putchar(a * 5);
  int b = 99;
  putchar(b / 3);
  int c = 999;
  putchar(c % 100);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x16,%edi
mov    $0x5,%esi
call   1040 <__builtin_mul@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
movl   $0x16,-0x8(%rbp)
imul   $0x5,-0x8(%rbp),%edi
call   1030 <putchar@plt>
movl   $0x63,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <putchar@plt>
movl   $0x3e7,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x16,%edi
mov    $0x5,%esi
call   1040 <__builtin_mul@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
mov    $0x6e,%edi
call   1030 <putchar@plt>
mov    $0x21,%edi
call   1030 <putchar@plt>
mov    $0x63,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @__builtin_mul(i32 22, i32 5)
%6 = call i32 @putchar(i32 %5)
store i32 22, i32* %2
%7 = load i32, i32* %2
%8 = mul nsw i32 %7, 5
%9 = call i32 @putchar(i32 %8)
store i32 99, i32* %3
%10 = load i32, i32* %3
%11 = sdiv i32 %10, 3
%12 = call i32 @putchar(i32 %11)
store i32 999, i32* %4
%13 = load i32, i32* %4
%14 = srem i32 %13, 100
%15 = call i32 @putchar(i32 %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__builtin_mul(i32 22, i32 5)
%2 = tail call i32 @putchar(i32 %1)
%3 = tail call i32 @putchar(i32 110)
%4 = tail call i32 @putchar(i32 33)
%5 = tail call i32 @putchar(i32 99)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dbl_mul_add();
int /*<<< orphan*/ dbl_mul_sub();
int /*<<< orphan*/ dbl_neg_mul_add();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ flt_mul_add();
int /*<<< orphan*/ flt_mul_sub();
int /*<<< orphan*/ flt_neg_mul_add();
int main() {
  flt_mul_add();
  flt_mul_sub();
  flt_neg_mul_add();
  dbl_mul_add();
  dbl_mul_sub();
  dbl_neg_mul_add();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <flt_mul_add@plt>
mov    $0x0,%al
call   1060 <flt_mul_sub@plt>
mov    $0x0,%al
call   1070 <flt_neg_mul_add@plt>
mov    $0x0,%al
call   1050 <dbl_mul_add@plt>
mov    $0x0,%al
call   1030 <dbl_mul_sub@plt>
mov    $0x0,%al
call   1040 <dbl_neg_mul_add@plt>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1080 <flt_mul_add@plt>
xor    %eax,%eax
call   1060 <flt_mul_sub@plt>
xor    %eax,%eax
call   1070 <flt_neg_mul_add@plt>
xor    %eax,%eax
call   1050 <dbl_mul_add@plt>
xor    %eax,%eax
call   1030 <dbl_mul_sub@plt>
xor    %eax,%eax
call   1040 <dbl_neg_mul_add@plt>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @flt_mul_add()
%3 = call i32 (...) @flt_mul_sub()
%4 = call i32 (...) @flt_neg_mul_add()
%5 = call i32 (...) @dbl_mul_add()
%6 = call i32 (...) @dbl_mul_sub()
%7 = call i32 (...) @dbl_neg_mul_add()
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @flt_mul_add()
%2 = tail call i32 (...) @flt_mul_sub()
%3 = tail call i32 (...) @flt_neg_mul_add()
%4 = tail call i32 (...) @dbl_mul_add()
%5 = tail call i32 (...) @dbl_mul_sub()
%6 = tail call i32 (...) @dbl_neg_mul_add()
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
long function(char *);
int main() {
  char arr[] = "asdf";
  long a = function(arr);
  long b = function(arr);
  return a == b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xed6(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x9(%rbp),%rdi
call   1030 <function@plt>
mov    %rax,-0x18(%rbp)
lea    -0x9(%rbp),%rdi
call   1030 <function@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movb   $0x0,0x4(%rsp)
movl   $0x66647361,(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <function@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <function@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.arr = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
%5 = bitcast [5 x i8]* %2 to i8*
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = call i64 @function(i8* %6)
store i64 %7, i64* %3
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%9 = call i64 @function(i8* %8)
store i64 %9, i64* %4
%10 = load i64, i64* %3
%11 = load i64, i64* %4
%12 = icmp eq i64 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@__const.main.arr = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i64 @function(i8* %2)
%4 = call i64 @function(i8* %2)
%5 = icmp eq i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *callee) {
  fprintf(stderr, "USAGE: %s [--conf|-c config_file] [--daemon|-d]\n", callee);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
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   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [49 x i8] c"USAGE: %s [--conf|-c config_file] [--daemon|-d]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(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 ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [49 x i8] c"USAGE: %s [--conf|-c config_file] [--daemon|-d]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void ISR_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @ISR_Interrupt() {
ret void
}
int do_828() { return 828; }


x86 assembly (clang, -O0):
<do_828>:
push   %rbp
mov    %rsp,%rbp
mov    $0x33c,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @do_828() {
ret i32 828
}

LLVM IR (-O2):
define i32 @do_828() {
ret i32 828
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
void clear_file(const char *name) {
  FILE *p;
  p = fopen(name, "w");
  fclose(p);
}


x86 assembly (clang, -O0):
<clear_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_file>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
define void @clear_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @fclose(i32* %6)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define void @clear_file(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fclose(i32* %2)
ret void
}
/* Type definitions */
struct cec_msg {
  int len;
  int /*<<< orphan*/ *msg;
};

/* Variables and functions */
int /*<<< orphan*/ CEC_MSG_ABORT;
void cec_msg_abort(struct cec_msg *msg) {
  msg->len = 2;
  msg->msg[1] = CEC_MSG_ABORT;
}


x86 assembly (clang, -O0):
<cec_msg_abort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
mov    0x2ec7(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_msg_abort>:
movl   $0x2,(%rdi)
mov    0x2ed3(%rip),%rax
mov    (%rax),%eax
mov    0x8(%rdi),%rcx
mov    %eax,0x4(%rcx)
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32, i32* }
@CEC_MSG_ABORT = global i32 0
define void @cec_msg_abort(%struct.cec_msg* %0) {
%2 = alloca %struct.cec_msg*
store %struct.cec_msg* %0, %struct.cec_msg** %2
%3 = load %struct.cec_msg*, %struct.cec_msg** %2
%4 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %3, i32 0, i32 0
store i32 2, i32* %4
%5 = load i32, i32* @CEC_MSG_ABORT
%6 = load %struct.cec_msg*, %struct.cec_msg** %2
%7 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %6, i32 0, i32 1
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32, i32* }
@CEC_MSG_ABORT = global i32 0
define void @cec_msg_abort(%struct.cec_msg* nocapture %0) {
%2 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
store i32 2, i32* %2
%3 = load i32, i32* @CEC_MSG_ABORT
%4 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 1
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 %3, i32* %6
ret void
}
/* Type definitions */
struct matrix {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_point(struct matrix *, double, double, double);
void add_edge(struct matrix *points, double x0, double y0, double z0, double x1,
              double y1, double z1) {
  add_point(points, x0, y0, z0);
  add_point(points, x1, y1, z1);
}


x86 assembly (clang, -O0):
<add_edge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  %xmm5,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1030 <add_point@plt>
mov    -0x8(%rbp),%rdi
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
call   1030 <add_point@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_edge>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm5,0x18(%rsp)
movsd  %xmm4,0x10(%rsp)
movsd  %xmm3,0x8(%rsp)
mov    %rdi,%rbx
call   1030 <add_point@plt>
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
add    $0x20,%rsp
pop    %rbx
jmp    1030 <add_point@plt>

LLVM IR (-O0):
%struct.matrix = type { i32 }
define void @add_edge(%struct.matrix* %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = alloca %struct.matrix*
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store %struct.matrix* %0, %struct.matrix** %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double %6, double* %14
%15 = load %struct.matrix*, %struct.matrix** %8
%16 = load double, double* %9
%17 = load double, double* %10
%18 = load double, double* %11
%19 = call i32 @add_point(%struct.matrix* %15, double %16, double %17, double %18)
%20 = load %struct.matrix*, %struct.matrix** %8
%21 = load double, double* %12
%22 = load double, double* %13
%23 = load double, double* %14
%24 = call i32 @add_point(%struct.matrix* %20, double %21, double %22, double %23)
ret void
}

LLVM IR (-O2):
%struct.matrix = type { i32 }
define void @add_edge(%struct.matrix* %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = tail call i32 @add_point(%struct.matrix* %0, double %1, double %2, double %3)
%9 = tail call i32 @add_point(%struct.matrix* %0, double %4, double %5, double %6)
ret void
}
/* Type definitions */
typedef size_t uLongf;

/* Variables and functions */
int Z_OK;
int uncompress(void *, size_t *, void const *, size_t);
int z_uncompress(void *dst, size_t *dstlen, const void *src, size_t srclen) {
  int ret;
  uLongf len = *dstlen;
  if ((ret = uncompress(dst, &len, src, srclen)) == Z_OK)
    *dstlen = (size_t)len;
  return (ret);
}


x86 assembly (clang, -O0):
<z_uncompress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    -0x30(%rbp),%rsi
call   1030 <uncompress@plt>
mov    %eax,-0x24(%rbp)
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%eax
jne    1165 <z_uncompress+0x55>
mov    -0x30(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<z_uncompress>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    (%rsi),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rsi
call   1030 <uncompress@plt>
mov    0x2ebf(%rip),%rcx
cmp    (%rcx),%eax
jne    113d <z_uncompress+0x2d>
mov    0x8(%rsp),%rcx
mov    %rcx,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@Z_OK = global i32 0
define i32 @z_uncompress(i8* %0, i64* nocapture %1, i8* %2, i64 %3) {
%5 = alloca i64
%6 = bitcast i64* %5 to i8*
%7 = load i64, i64* %1
store i64 %7, i64* %5
%8 = call i32 @uncompress(i8* %0, i64* %5, i8* %2, i64 %3)
%9 = load i32, i32* @Z_OK
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = load i64, i64* %5
store i64 %12, i64* %1
br label %13
13: ; preds = %11, %4
ret i32 %8
}
void cvmx_wqe_set_qos(struct cvmx_wqe *work, int qos) {}


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

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

LLVM IR (-O0):
%struct.cvmx_wqe = type opaque
define void @cvmx_wqe_set_qos(%struct.cvmx_wqe* %0, i32 %1) {
%3 = alloca %struct.cvmx_wqe*
%4 = alloca i32
store %struct.cvmx_wqe* %0, %struct.cvmx_wqe** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.cvmx_wqe = type opaque
define void @cvmx_wqe_set_qos(%struct.cvmx_wqe* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
struct ndiff {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ndiff_clear(struct ndiff *);
struct ndiff *ut_teardown(struct ndiff *dif) {
  ndiff_clear(dif);
  return dif;
}


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

x86 assembly (clang, -O2):
<ut_teardown>:
push   %rbx
mov    %rdi,%rbx
call   1030 <ndiff_clear@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.ndiff = type { i32 }
define %struct.ndiff* @ut_teardown(%struct.ndiff* returned %0) {
%2 = tail call i32 @ndiff_clear(%struct.ndiff* %0)
ret %struct.ndiff* %0
}
/* Variables and functions */
int /*<<< orphan*/ mark();
int /*<<< orphan*/ sweep();
void collect(void) {
  mark();
  sweep();
}


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

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

LLVM IR (-O0):
define void @collect() {
%1 = call i32 (...) @mark()
%2 = call i32 (...) @sweep()
ret void
}

LLVM IR (-O2):
define void @collect() {
%1 = tail call i32 (...) @mark()
%2 = tail call i32 (...) @sweep()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, unsigned int);
void cpy(volatile void *to, volatile void *from, unsigned int size) {
  memcpy((void *)to, (void *)from, size);
}


x86 assembly (clang, -O0):
<cpy>:
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
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpy>:
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @cpy(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 @memcpy(i8* %7, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @cpy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool errata_57(void) {
  if ((((*(uint32_t *)0xF0000FE0) & 0x000000FF) == 0x6) &&
      (((*(uint32_t *)0xF0000FE4) & 0x0000000F) == 0x0)) {
    if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x30) {
      return true;
    }
  }
  return false;
}


x86 assembly (clang, -O0):
<errata_57>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf0000fe0,%eax
mov    (%rax),%eax
and    $0xff,%eax
cmp    $0x6,%eax
jne    1152 <errata_57+0x52>
mov    $0xf0000fe4,%eax
mov    (%rax),%eax
and    $0xf,%eax
cmp    $0x0,%eax
jne    1152 <errata_57+0x52>
mov    $0xf0000fe8,%eax
mov    (%rax),%eax
and    $0xf0,%eax
cmp    $0x30,%eax
jne    114d <errata_57+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1159 <errata_57+0x59>
jmp    1152 <errata_57+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<errata_57>:
mov    $0xf0000fe0,%eax
cmpb   $0x6,(%rax)
jne    1122 <errata_57+0x22>
testb  $0xf,0x4(%rax)
jne    1122 <errata_57+0x22>
mov    $0xf0,%ecx
and    0x8(%rax),%ecx
mov    $0x1,%eax
cmp    $0x30,%ecx
je     1124 <errata_57+0x24>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @errata_57() {
%1 = alloca i32
%2 = load i32, i32* inttoptr (i64 4026535904 to i32*)
%3 = and i32 %2, 255
%4 = icmp eq i32 %3, 6
br i1 %4, label %5, label %15
5: ; preds = %0
%6 = load i32, i32* inttoptr (i64 4026535908 to i32*)
%7 = and i32 %6, 15
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i32, i32* inttoptr (i64 4026535912 to i32*)
%11 = and i32 %10, 240
%12 = icmp eq i32 %11, 48
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 1, i32* %1
br label %16
14: ; preds = %9
br label %15
15: ; preds = %14, %5, %0
store i32 0, i32* %1
br label %16
16: ; preds = %15, %13
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @errata_57() {
%1 = load i32, i32* inttoptr (i64 4026535904 to i32*)
%2 = and i32 %1, 255
%3 = icmp eq i32 %2, 6
br i1 %3, label %4, label %12
4: ; preds = %0
%5 = load i32, i32* inttoptr (i64 4026535908 to i32*)
%6 = and i32 %5, 15
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = load i32, i32* inttoptr (i64 4026535912 to i32*)
%10 = and i32 %9, 240
%11 = icmp eq i32 %10, 48
br i1 %11, label %13, label %12
12: ; preds = %8, %4, %0
br label %13
13: ; preds = %8, %12
%14 = phi i32 [ 0, %12 ], [ 1, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ lseek(int, int, int /*<<< orphan*/);
int write(int, char *, int);
int write_data(int f, char *buff, int len) {
  lseek(f, 0x6600, SEEK_SET);
  return write(f, buff, len);
}


x86 assembly (clang, -O0):
<write_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
mov    $0x6600,%esi
call   1040 <lseek@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_data>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
mov    $0x6600,%esi
call   1040 <lseek@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <write@plt>

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @write_data(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* @SEEK_SET
%9 = call i32 @lseek(i32 %7, i32 26112, i32 %8)
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @write(i32 %10, i8* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @write_data(i32 %0, i8* nocapture %1, i32 %2) {
%4 = load i32, i32* @SEEK_SET
%5 = tail call i32 @lseek(i32 %0, i32 26112, i32 %4)
%6 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
ret i32 %6
}
/* Type definitions */
struct request_queue {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ queue_flag_clear(int, struct request_queue *);
__attribute__((always_)) void blk_clear_queue_full(struct request_queue *q,
                                                   int sync) {
  if (sync)
    queue_flag_clear(3, q);
  else
    queue_flag_clear(4, q);
}


x86 assembly (clang, -O0):
<blk_clear_queue_full>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113c <blk_clear_queue_full+0x2c>
mov    -0x8(%rbp),%rsi
mov    $0x3,%edi
call   1030 <queue_flag_clear@plt>
jmp    114a <blk_clear_queue_full+0x3a>
mov    -0x8(%rbp),%rsi
mov    $0x4,%edi
call   1030 <queue_flag_clear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blk_clear_queue_full>:
mov    %rdi,%rax
cmp    $0x1,%esi
mov    $0x3,%edi
adc    $0x0,%edi
mov    %rax,%rsi
jmp    1030 <queue_flag_clear@plt>

LLVM IR (-O0):
%struct.request_queue = type { i32 }
define void @blk_clear_queue_full(%struct.request_queue* %0, i32 %1) {
%3 = alloca %struct.request_queue*
%4 = alloca i32
store %struct.request_queue* %0, %struct.request_queue** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load %struct.request_queue*, %struct.request_queue** %3
%9 = call i32 @queue_flag_clear(i32 3, %struct.request_queue* %8)
br label %13
10: ; preds = %2
%11 = load %struct.request_queue*, %struct.request_queue** %3
%12 = call i32 @queue_flag_clear(i32 4, %struct.request_queue* %11)
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
%struct.request_queue = type { i32 }
define void @blk_clear_queue_full(%struct.request_queue* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i32 4, i32 3
%5 = tail call i32 @queue_flag_clear(i32 %4, %struct.request_queue* %0)
ret void
}
int HelpItem43(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @HelpItem43() {
ret i32 0
}

LLVM IR (-O2):
define i32 @HelpItem43() {
ret i32 0
}