xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int foo[10];
  foo[0] = 5280;
  printf("%d", foo[7]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x14a0,-0x30(%rbp)
mov    -0x14(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32 5280, i32* %2
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 7
%4 = load i32, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 0
}
/* Variables and functions */
int fsync(int);
int test(void) {
  int fd;
  int result;
  fd = 4;
  result = fsync(fd);
  return result;
}


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

x86 assembly (clang, -O2):
<test>:
mov    $0x4,%edi
jmp    1030 <fsync@plt>

LLVM IR (-O0):
define i32 @test() {
%1 = alloca i32
%2 = alloca i32
store i32 4, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @fsync(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 @fsync(i32 4)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ glTexGenfv(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/ *);
void TexGenfv(GLenum coord, GLenum pname, GLfloat *params) {
  glTexGenfv(coord, pname, params);
}


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

x86 assembly (clang, -O2):
<TexGenfv>:
jmp    1030 <glTexGenfv@plt>

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

LLVM IR (-O2):
define void @TexGenfv(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 @glTexGenfv(i32 %0, i32 %1, i32* %2)
ret void
}
/* Variables and functions */
int getch();
int Getch() {
  int c;
  c = getch();
  return (c);
}


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

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

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

LLVM IR (-O2):
define i32 @Getch() {
%1 = tail call i32 (...) @getch()
ret i32 %1
}
/* Variables and functions */
scalar_t__ u8islowercyrilici(int);
scalar_t__ u8isuppercyrilici(int);
int u8iscyrilici(int n) { return u8islowercyrilici(n) || u8isuppercyrilici(n); }


x86 assembly (clang, -O0):
<u8iscyrilici>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <u8islowercyrilici@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <u8iscyrilici+0x37>
mov    -0x4(%rbp),%edi
call   1030 <u8isuppercyrilici@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8iscyrilici>:
push   %rbx
mov    %edi,%ebx
call   1040 <u8islowercyrilici@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <u8iscyrilici+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <u8isuppercyrilici@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @u8iscyrilici(i32 %0) {
%2 = tail call i64 @u8islowercyrilici(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @u8isuppercyrilici(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void link_failure(void) { abort(); }


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

x86 assembly (clang, -O2):
<link_failure>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @link_failure() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @link_failure() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct clause_list {
  int dummy;
};

/* Variables and functions */
int genlist_size(struct genlist const *);
int clause_list_size(const struct clause_list *tthis) {
  return genlist_size((const struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<clause_list_size>:
jmp    1030 <genlist_size@plt>

LLVM IR (-O0):
%struct.clause_list = type { i32 }
%struct.genlist = type { i32 }
define i32 @clause_list_size(%struct.clause_list* %0) {
%2 = alloca %struct.clause_list*
store %struct.clause_list* %0, %struct.clause_list** %2
%3 = load %struct.clause_list*, %struct.clause_list** %2
%4 = bitcast %struct.clause_list* %3 to %struct.genlist*
%5 = call i32 @genlist_size(%struct.genlist* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.clause_list = type { i32 }
%struct.genlist = type { i32 }
define i32 @clause_list_size(%struct.clause_list* %0) {
%2 = bitcast %struct.clause_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_size(%struct.genlist* %2)
ret i32 %3
}
int arrayatoi(c)
int c;
{
  if (c == 64)
    c = 96;
  if (c > 63 && c < 91)
    c += 32;
  if (c < 95 || c > 122)
    return (-1);
  return (c - 95);
}


x86 assembly (clang, -O0):
<arrayatoi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x40,-0x8(%rbp)
jne    1118 <arrayatoi+0x18>
movl   $0x60,-0x8(%rbp)
cmpl   $0x3f,-0x8(%rbp)
jle    1135 <arrayatoi+0x35>
cmpl   $0x5b,-0x8(%rbp)
jge    1135 <arrayatoi+0x35>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x5f,-0x8(%rbp)
jl     1149 <arrayatoi+0x49>
cmpl   $0x7a,-0x8(%rbp)
jle    1155 <arrayatoi+0x55>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <arrayatoi+0x5e>
mov    -0x8(%rbp),%eax
sub    $0x5f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrayatoi>:
cmp    $0x40,%edi
mov    $0x60,%eax
cmovne %edi,%eax
lea    -0x40(%rax),%ecx
lea    0x20(%rax),%edx
cmp    $0x1b,%ecx
cmovae %eax,%edx
lea    -0x7b(%rdx),%eax
add    $0xffffffa1,%edx
cmp    $0xffffffe4,%eax
mov    $0xffffffff,%eax
cmovae %edx,%eax
ret

LLVM IR (-O0):
define i32 @arrayatoi(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 64
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 96, i32* %3
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 63
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 91
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 32
store i32 %15, i32* %3
br label %16
16: ; preds = %13, %10, %7
%17 = load i32, i32* %3
%18 = icmp slt i32 %17, 95
br i1 %18, label %22, label %19
19: ; preds = %16
%20 = load i32, i32* %3
%21 = icmp sgt i32 %20, 122
br i1 %21, label %22, label %23
22: ; preds = %19, %16
store i32 -1, i32* %2
br label %26
23: ; preds = %19
%24 = load i32, i32* %3
%25 = sub nsw i32 %24, 95
store i32 %25, i32* %2
br label %26
26: ; preds = %23, %22
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @arrayatoi(i32 %0) {
%2 = icmp eq i32 %0, 64
%3 = select i1 %2, i32 96, i32 %0
%4 = add i32 %3, -64
%5 = icmp ult i32 %4, 27
%6 = add nsw i32 %3, 32
%7 = select i1 %5, i32 %6, i32 %3
%8 = add i32 %7, -123
%9 = icmp ult i32 %8, -28
%10 = add nsw i32 %7, -95
%11 = select i1 %9, i32 -1, i32 %10
ret i32 %11
}
void av_chroma_location_name() {}


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

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

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

LLVM IR (-O2):
define void @av_chroma_location_name() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *const, size_t);
void saveSentence(const char *const data, size_t N, char *target,
                  unsigned int *p) {
  memcpy(target + *p, data, N);
  (*p) += N;
}


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

x86 assembly (clang, -O2):
<saveSentence>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    (%rcx),%edi
add    %rdx,%rdi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
add    %ebx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @saveSentence(i8* %0, i64 %1, i8* %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32* %3, i32** %8
%9 = load i8*, i8** %7
%10 = load i32*, i32** %8
%11 = load i32, i32* %10
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
%14 = load i8*, i8** %5
%15 = load i64, i64* %6
%16 = call i32 @memcpy(i8* %13, i8* %14, i64 %15)
%17 = load i64, i64* %6
%18 = load i32*, i32** %8
%19 = load i32, i32* %18
%20 = zext i32 %19 to i64
%21 = add i64 %20, %17
%22 = trunc i64 %21 to i32
store i32 %22, i32* %18
ret void
}

LLVM IR (-O2):
define void @saveSentence(i8* %0, i64 %1, i8* %2, i32* nocapture %3) {
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %2, i64 %6
%8 = tail call i32 @memcpy(i8* %7, i8* %0, i64 %1)
%9 = load i32, i32* %3
%10 = trunc i64 %1 to i32
%11 = add i32 %9, %10
store i32 %11, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void jtp_free(void *ptr) { free((char *)ptr); }


x86 assembly (clang, -O0):
<jtp_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):
<jtp_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @jtp_free(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 @jtp_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void my_fclose(void *p) {
  if (NULL == p)
    return;
  FILE *fp = *(FILE **)p;
  if (fp)
    fclose(fp);
}


x86 assembly (clang, -O0):
<my_fclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
jne    112d <my_fclose+0x1d>
jmp    114c <my_fclose+0x3c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114c <my_fclose+0x3c>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_fclose>:
test   %rdi,%rdi
je     1122 <my_fclose+0x12>
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1122 <my_fclose+0x12>
jmp    1030 <fclose@plt>
ret

LLVM IR (-O0):
define void @my_fclose(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp eq i8* null, %4
br i1 %5, label %6, label %7
6: ; preds = %1
br label %16
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32**
%10 = load i32*, i32** %9
store i32* %10, i32** %3
%11 = load i32*, i32** %3
%12 = icmp ne i32* %11, null
br i1 %12, label %13, label %16
13: ; preds = %7
%14 = load i32*, i32** %3
%15 = call i32 @fclose(i32* %14)
br label %16
16: ; preds = %6, %13, %7
ret void
}

LLVM IR (-O2):
define void @my_fclose(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i32**
%5 = load i32*, i32** %4
%6 = icmp eq i32* %5, null
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @fclose(i32* %5)
br label %9
9: ; preds = %3, %7, %1
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int strcoll(char const *s1, char const *s2) { return strcmp(s1, s2); }


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

x86 assembly (clang, -O2):
<strcoll>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @strcoll(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 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @strcoll(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void delay(void) {
  int i;
  for (i = 0; i < 1000000; i++)
    __asm__ __volatile__("nop\n\t" ::: "memory");
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0xf4240,-0x4(%rbp)
jge    1127 <delay+0x27>
nop
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <delay+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
mov    $0xf4240,%eax
cs nopw 0x0(%rax,%rax,1)
nop
nop
add    $0xffffffff,%eax
jne    1110 <delay+0x10>
ret

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

LLVM IR (-O2):
define void @delay() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %3, %1 ]
tail call void asm sideeffect "nop\0A\09", "~{memory},~{dirflag},~{fpsr},~{flags}"()
%3 = add nuw nsw i32 %2, 1
%4 = icmp eq i32 %3, 1000000
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void main() {
  FILE *file = fopen("/home/Documentos/teste.odt", "w");
  fprintf(file, "alo\n");
  fclose(file);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xedc(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
lea    0xecf(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"/home/Documentos/teste.odt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [5 x i8] c"alo\0A\00"
define void @main() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32*, i32** %1
%6 = call i32 @fclose(i32* %5)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"/home/Documentos/teste.odt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [5 x i8] c"alo\0A\00"
define void @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 4, i64 1, i32* %1)
%3 = tail call i32 @fclose(i32* %1)
ret void
}
/* Variables and functions */
int PAPI_is_initialized();
void PAPIF_IS_INITIALIZED(int *level) { *level = PAPI_is_initialized(); }


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

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

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

LLVM IR (-O2):
define void @PAPIF_IS_INITIALIZED(i32* nocapture writeonly %0) {
%2 = tail call i32 (...) @PAPI_is_initialized()
store i32 %2, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_INFO;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *);
void quit() {
  syslog(LOG_INFO, "Terminating.");
  exit(0);
}


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

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

LLVM IR (-O0):
@LOG_INFO = global i32 0
@.str = [13 x i8] c"Terminating.\00"
define void @quit() {
%1 = load i32, i32* @LOG_INFO
%2 = call i32 @syslog(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@LOG_INFO = global i32 0
@.str = [13 x i8] c"Terminating.\00"
define void @quit() {
%1 = load i32, i32* @LOG_INFO
%2 = tail call i32 @syslog(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
void XtSetMappedWhenManaged() {}


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

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

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

LLVM IR (-O2):
define void @XtSetMappedWhenManaged() {
ret void
}
void prime7(void) { extern int test7(int); }


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

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

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

LLVM IR (-O2):
define void @prime7() {
ret void
}
int routeCursor_BaseScreen(int column, int row, int screen) { return 0; }


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

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

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

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

/* Variables and functions */
uint32_t direct_write32(volatile uint32_t *addr, uint32_t dat) {
  *addr = dat;
  return dat;
}


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

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

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

LLVM IR (-O2):
define i32 @direct_write32(i32* %0, i32 returned %1) {
store volatile i32 %1, i32* %0
ret i32 %1
}
/* Variables and functions */
double bezier_curve(double, int, double *);
int /*<<< orphan*/ cspline2bezier(double *, double const *);
double cspline(double t, const double coeff[4]) {
  double coeff2[4];
  cspline2bezier(coeff2, coeff);
  return bezier_curve(t, 3, coeff2);
}


x86 assembly (clang, -O0):
<cspline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <cspline2bezier@plt>
movsd  -0x8(%rbp),%xmm0
lea    -0x30(%rbp),%rsi
mov    $0x3,%edi
call   1030 <bezier_curve@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cspline>:
push   %rbx
sub    $0x30,%rsp
mov    %rdi,%rsi
movsd  %xmm0,0x8(%rsp)
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <cspline2bezier@plt>
movsd  0x8(%rsp),%xmm0
mov    $0x3,%edi
mov    %rbx,%rsi
call   1030 <bezier_curve@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @cspline(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca [4 x double]
store double %0, double* %3
store double* %1, double** %4
%6 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%7 = load double*, double** %4
%8 = call i32 @cspline2bezier(double* %6, double* %7)
%9 = load double, double* %3
%10 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%11 = call double @bezier_curve(double %9, i32 3, double* %10)
ret double %11
}

LLVM IR (-O2):
define double @cspline(double %0, double* %1) {
%3 = alloca [4 x double]
%4 = bitcast [4 x double]* %3 to i8*
%5 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%6 = call i32 @cspline2bezier(double* %5, double* %1)
%7 = call double @bezier_curve(double %0, i32 3, double* %5)
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void exitfunc11(void) {
  printf("Executing exitfunc11.\n");
  exit(0);
}


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

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

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

LLVM IR (-O2):
@str = [22 x i8] c"Executing exitfunc11.\00"
define void @exitfunc11() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct position {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ map_position_double(struct position *, double *, double *,
                                       char const *);
void map_position(struct position *pos, int *x, int *y, const char *what) {
  double xx, yy;
  map_position_double(pos, &xx, &yy, what);
  *x = xx;
  *y = yy;
}


x86 assembly (clang, -O0):
<map_position>:
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    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <map_position_double@plt>
cvttsd2si -0x28(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
cvttsd2si -0x30(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_position>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <map_position_double@plt>
cvttsd2si 0x10(%rsp),%eax
mov    %eax,(%rbx)
cvttsd2si 0x8(%rsp),%eax
mov    %eax,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.position = type { i32 }
define void @map_position(%struct.position* %0, i32* %1, i32* %2, i8* %3) {
%5 = alloca %struct.position*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca double
%10 = alloca double
store %struct.position* %0, %struct.position** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%11 = load %struct.position*, %struct.position** %5
%12 = load i8*, i8** %8
%13 = call i32 @map_position_double(%struct.position* %11, double* %9, double* %10, i8* %12)
%14 = load double, double* %9
%15 = fptosi double %14 to i32
%16 = load i32*, i32** %6
store i32 %15, i32* %16
%17 = load double, double* %10
%18 = fptosi double %17 to i32
%19 = load i32*, i32** %7
store i32 %18, i32* %19
ret void
}

LLVM IR (-O2):
%struct.position = type { i32 }
define void @map_position(%struct.position* %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i8* %3) {
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %5 to i8*
%8 = bitcast double* %6 to i8*
%9 = call i32 @map_position_double(%struct.position* %0, double* %5, double* %6, i8* %3)
%10 = load double, double* %5
%11 = fptosi double %10 to i32
store i32 %11, i32* %1
%12 = load double, double* %6
%13 = fptosi double %12 to i32
store i32 %13, i32* %2
ret void
}
double RECT(double a) { return (a > 0.0 ? a : 0.0); }


x86 assembly (clang, -O0):
<RECT>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    112a <RECT+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1137 <RECT+0x37>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1137 <RECT+0x37>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<RECT>:
xorpd  %xmm1,%xmm1
maxsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @RECT(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load double, double* %2
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %5
%9 = phi double [ %6, %5 ], [ 0.000000e+00, %7 ]
ret double %9
}

LLVM IR (-O2):
define double @RECT(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = select i1 %2, double %0, double 0.000000e+00
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ svd_fatalError(char *, char *);
int /*<<< orphan*/ *svd_readFile(char *);
FILE *svd_fatalReadFile(char *filename) {
  FILE *file;
  if (!(file = svd_readFile(filename)))
    svd_fatalError("couldn't read the file %s", filename);
  return file;
}


x86 assembly (clang, -O0):
<svd_fatalReadFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <svd_readFile@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1153 <svd_fatalReadFile+0x33>
mov    -0x8(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1040 <svd_fatalError@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svd_fatalReadFile>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <svd_readFile@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <svd_fatalReadFile+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1040 <svd_fatalError@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [26 x i8] c"couldn't read the file %s\00"
define i32* @svd_fatalReadFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @svd_readFile(i8* %4)
store i32* %5, i32** %3
%6 = icmp ne i32* %5, null
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @svd_fatalError(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %1
%11 = load i32*, i32** %3
ret i32* %11
}

LLVM IR (-O2):
@.str = [26 x i8] c"couldn't read the file %s\00"
define i32* @svd_fatalReadFile(i8* %0) {
%2 = tail call i32* @svd_readFile(i8* %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @svd_fatalError(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ imv_source_load_first_frame(void *);
void *first_frame_thread(void *src) {
  imv_source_load_first_frame(src);
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @first_frame_thread(i8* %0) {
%2 = tail call i32 @imv_source_load_first_frame(i8* %0)
ret i8* null
}
void main() {
  int i;
  int j;
  int x = i;
  int y = j;
  while (x != 0) {
    x--;
    y--;
  }
  if (i == j)
    if (y != 0)
    ERROR:;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1131 <main+0x31>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1110 <main+0x10>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1156 <main+0x56>
cmpl   $0x0,-0x10(%rbp)
je     1151 <main+0x51>
jmp    114c <main+0x4c>
jmp    1151 <main+0x51>
jmp    1156 <main+0x56>
pop    %rbp
ret

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ERR_load_BIO_strings();
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
void mz_crypt_init(void) {
  static int32_t openssl_initialized = 0;
  if (openssl_initialized == 0) {
    OpenSSL_add_all_algorithms();
    ERR_load_BIO_strings();
    ERR_load_crypto_strings();
    openssl_initialized = 1;
  }
}


x86 assembly (clang, -O0):
<mz_crypt_init>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f01(%rip)
jne    1160 <mz_crypt_init+0x30>
mov    $0x0,%al
call   1030 <OpenSSL_add_all_algorithms@plt>
mov    $0x0,%al
call   1050 <ERR_load_BIO_strings@plt>
mov    $0x0,%al
call   1040 <ERR_load_crypto_strings@plt>
movl   $0x1,0x2edc(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mz_crypt_init>:
push   %rax
cmpb   $0x0,0x2f04(%rip)
jne    1156 <mz_crypt_init+0x26>
xor    %eax,%eax
call   1030 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
call   1050 <ERR_load_BIO_strings@plt>
xor    %eax,%eax
call   1040 <ERR_load_crypto_strings@plt>
movb   $0x1,0x2ee6(%rip)
pop    %rax
ret

LLVM IR (-O0):
@mz_crypt_init.openssl_initialized = internal global i32 0
define void @mz_crypt_init() {
%1 = load i32, i32* @mz_crypt_init.openssl_initialized
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i32 (...) @OpenSSL_add_all_algorithms()
%5 = call i32 (...) @ERR_load_BIO_strings()
%6 = call i32 (...) @ERR_load_crypto_strings()
store i32 1, i32* @mz_crypt_init.openssl_initialized
br label %7
7: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@mz_crypt_init.openssl_initialized = internal unnamed_addr global i1 false
define void @mz_crypt_init() {
%1 = load i1, i1* @mz_crypt_init.openssl_initialized
br i1 %1, label %6, label %2
2: ; preds = %0
%3 = tail call i32 (...) @OpenSSL_add_all_algorithms()
%4 = tail call i32 (...) @ERR_load_BIO_strings()
%5 = tail call i32 (...) @ERR_load_crypto_strings()
store i1 true, i1* @mz_crypt_init.openssl_initialized
br label %6
6: ; preds = %2, %0
ret void
}
void uninit_filter(void *arg) {}


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

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

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

LLVM IR (-O2):
define void @uninit_filter(i8* nocapture %0) {
ret void
}
void InsertLines(Howmany) int Howmany;
{
  char Str[10];
  if (Howmany == 0)
    return;
  sprintf(Str, "\033[%dL", Howmany);
  WRITETEST(Str);
}


x86 assembly (clang, -O0):
<InsertLines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113a <InsertLines+0x1a>
jmp    115a <InsertLines+0x3a>
lea    -0xe(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0xe(%rbp),%rdi
mov    $0x0,%al
call   1030 <WRITETEST@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InsertLines>:
test   %edi,%edi
je     1150 <InsertLines+0x30>
push   %rbx
sub    $0x10,%rsp
mov    %edi,%edx
lea    0xece(%rip),%rsi
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <WRITETEST@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[%dL\00"
define void @InsertLines(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %13
7: ; preds = %1
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%9 = load i32, i32* %2
%10 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @WRITETEST to i32 (i8*, ...)*)(i8* %11)
br label %13
13: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%dL\00"
define void @InsertLines(i32 %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = icmp eq i32 %0, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @WRITETEST to i32 (i8*, ...)*)(i8* %3)
br label %8
8: ; preds = %1, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
scalar_t__ sleep_us(int);
int main(void) {
  printf("Sleeping half a second.\n");
  if (sleep_us(500) < 0) {
    perror("sleep_us() failed");
    exit(EXIT_FAILURE);
  }
  printf("Woke up.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1f4,%edi
call   1040 <sleep_us@plt>
cmp    $0x0,%rax
jge    1189 <main+0x49>
lea    0xea3(%rip),%rdi
call   1050 <perror@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1f4,%edi
call   1040 <sleep_us@plt>
test   %rax,%rax
js     116c <main+0x2c>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xe8d(%rip),%rdi
call   1050 <perror@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Sleeping half a second.\0A\00"
@.str.1 = [18 x i8] c"sleep_us() failed\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [10 x i8] c"Woke up.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i64 @sleep_us(i32 500)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [18 x i8] c"sleep_us() failed\00"
@EXIT_FAILURE = global i32 0
@str = [24 x i8] c"Sleeping half a second.\00"
@str.3 = [9 x i8] c"Woke up.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i64 @sleep_us(i32 500)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %0
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}
void RGB24ToUVRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @RGB24ToUVRow_Any_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i;
  do {
    printf("Digite um numero\n");
    scanf("%d", &i);
  } while ((i > 10) || (i < 1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0xa,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jg     1164 <main+0x44>
cmpl   $0x1,-0x8(%rbp)
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed3(%rip),%r14
lea    0xec9(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
add    $0xfffffff5,%eax
cmp    $0xfffffff6,%eax
jb     1140 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Digite um numero\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %12, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 10
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 1
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ true, %6 ], [ %11, %9 ]
br i1 %13, label %3, label %14
14: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [17 x i8] c"Digite um numero\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add i32 %6, -11
%8 = icmp ult i32 %7, -10
br i1 %8, label %3, label %9
9: ; preds = %3
ret i32 0
}
int main() {
  int x = 0;
  for (int i = 0; i < 1000000; i = i + 1) {
    x = x + 1;
  }
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xf4240,-0xc(%rbp)
jge    113d <main+0x3d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1000000
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1000000
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xe6() {
  Assert_real((isspace(230) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              1155, ("isspace should be 0 for 0xe6"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xe6\00"
define void @t_isspace_0xe6() {
%1 = call i64 @isspace(i32 230)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1155, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xe6\00"
define void @t_isspace_0xe6() {
%1 = tail call i64 @isspace(i32 230)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1155, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, char *);
char saisir_caractere(void) {
  char caractere;
  scanf("%c", &caractere);
  return caractere;
}


x86 assembly (clang, -O0):
<saisir_caractere>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1030 <scanf@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saisir_caractere>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1030 <scanf@plt>
mov    0x7(%rsp),%al
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define signext i8 @saisir_caractere() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
ret i8 %3
}
int addr_to_block(void *addr, void *base) {
  return ((unsigned int *)addr - (unsigned int *)base) / (32 * (1 << 4));
}


x86 assembly (clang, -O0):
<addr_to_block>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    $0x200,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<addr_to_block>:
sub    %rsi,%rdi
sar    $0x2,%rdi
lea    0x1ff(%rdi),%rax
test   %rdi,%rdi
cmovns %rdi,%rax
shr    $0x9,%rax
ret

LLVM IR (-O0):
define i32 @addr_to_block(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 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i32*
%9 = ptrtoint i32* %6 to i64
%10 = ptrtoint i32* %8 to i64
%11 = sub i64 %9, %10
%12 = sdiv exact i64 %11, 4
%13 = sdiv i64 %12, 512
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @addr_to_block(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = sub i64 %3, %4
%6 = ashr exact i64 %5, 2
%7 = sdiv i64 %6, 512
%8 = trunc i64 %7 to i32
ret i32 %8
}