xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ lib1_function();
int /*<<< orphan*/ lib2_function();
int /*<<< orphan*/ moveable_function();
int /*<<< orphan*/ stdout;
int main(void) {
  fprintf(stdout, "Hello from program.c\n");
  fflush(stdout);
  lib1_function();
  lib2_function();
  moveable_function();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1030 <lib1_function@plt>
mov    $0x0,%al
call   1070 <lib2_function@plt>
mov    $0x0,%al
call   1060 <moveable_function@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2e88(%rip),%rbx
mov    (%rbx),%edi
lea    0xe9f(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1030 <lib1_function@plt>
xor    %eax,%eax
call   1070 <lib2_function@plt>
xor    %eax,%eax
call   1060 <moveable_function@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [22 x i8] c"Hello from program.c\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdout
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
%6 = call i32 (...) @lib1_function()
%7 = call i32 (...) @lib2_function()
%8 = call i32 (...) @moveable_function()
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [22 x i8] c"Hello from program.c\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
%5 = tail call i32 (...) @lib1_function()
%6 = tail call i32 (...) @lib2_function()
%7 = tail call i32 (...) @moveable_function()
ret i32 0
}
unsigned char inq_parse_type(char *Identify) {
  if (Identify != (char *)0)
    return (Identify[0] & 0x1f);
  return 0;
}


x86 assembly (clang, -O0):
<inq_parse_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1125 <inq_parse_type+0x25>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
and    $0x1f,%eax
mov    %al,-0x1(%rbp)
jmp    1129 <inq_parse_type+0x29>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inq_parse_type>:
test   %rdi,%rdi
je     110a <inq_parse_type+0xa>
mov    (%rdi),%al
and    $0x1f,%al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define zeroext i8 @inq_parse_type(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = and i32 %10, 31
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
br label %14
13: ; preds = %1
store i8 0, i8* %2
br label %14
14: ; preds = %13, %6
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define zeroext i8 @inq_parse_type(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = and i8 %4, 31
br label %6
6: ; preds = %1, %3
%7 = phi i8 [ %5, %3 ], [ 0, %1 ]
ret i8 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void longjmp(jmp_buf env, int val) {
  {
    fprintf(stderr, "ERROR: "
                    "longjmp"
                    " is unsupported!\n");
    abort();
  };
}


x86 assembly (clang, -O0):
<longjmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"ERROR: longjmp is unsupported!\0A\00"
define void @longjmp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"ERROR: longjmp is unsupported!\0A\00"
define void @longjmp(i32 %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int read_mpidr();
int appf_platform_get_cpu_index(void) { return read_mpidr() & 0xff; }


x86 assembly (clang, -O0):
<appf_platform_get_cpu_index>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <read_mpidr@plt>
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<appf_platform_get_cpu_index>:
push   %rax
xor    %eax,%eax
call   1030 <read_mpidr@plt>
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @appf_platform_get_cpu_index() {
%1 = call i32 (...) @read_mpidr()
%2 = and i32 %1, 255
ret i32 %2
}

LLVM IR (-O2):
define i32 @appf_platform_get_cpu_index() {
%1 = tail call i32 (...) @read_mpidr()
%2 = and i32 %1, 255
ret i32 %2
}
/* Type definitions */
struct variable {
  int dummy;
};
struct var_set {
  int dummy;
};
struct lexer {
  int dummy;
};
struct const_var_set {
  int dummy;
};

/* Variables and functions */
int parse_var_set_vars(struct lexer *, struct var_set const *,
                       struct variable ***, size_t *, int);
bool parse_const_var_set_vars(struct lexer *l, const struct const_var_set *vs,
                              const struct variable ***v, size_t *s, int opts) {
  return parse_var_set_vars(l, (const struct var_set *)vs,
                            (struct variable ***)v, s, opts);
}


x86 assembly (clang, -O0):
<parse_const_var_set_vars>:
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    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <parse_var_set_vars@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_const_var_set_vars>:
jmp    1030 <parse_var_set_vars@plt>

LLVM IR (-O0):
%struct.lexer = type { i32 }
%struct.const_var_set = type { i32 }
%struct.variable = type { i32 }
%struct.var_set = type { i32 }
define i32 @parse_const_var_set_vars(%struct.lexer* %0, %struct.const_var_set* %1, %struct.variable*** %2, i64* %3, i32 %4) {
%6 = alloca %struct.lexer*
%7 = alloca %struct.const_var_set*
%8 = alloca %struct.variable***
%9 = alloca i64*
%10 = alloca i32
store %struct.lexer* %0, %struct.lexer** %6
store %struct.const_var_set* %1, %struct.const_var_set** %7
store %struct.variable*** %2, %struct.variable**** %8
store i64* %3, i64** %9
store i32 %4, i32* %10
%11 = load %struct.lexer*, %struct.lexer** %6
%12 = load %struct.const_var_set*, %struct.const_var_set** %7
%13 = bitcast %struct.const_var_set* %12 to %struct.var_set*
%14 = load %struct.variable***, %struct.variable**** %8
%15 = load i64*, i64** %9
%16 = load i32, i32* %10
%17 = call i32 @parse_var_set_vars(%struct.lexer* %11, %struct.var_set* %13, %struct.variable*** %14, i64* %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
%struct.lexer = type { i32 }
%struct.const_var_set = type { i32 }
%struct.variable = type { i32 }
%struct.var_set = type { i32 }
define i32 @parse_const_var_set_vars(%struct.lexer* %0, %struct.const_var_set* %1, %struct.variable*** %2, i64* %3, i32 %4) {
%6 = bitcast %struct.const_var_set* %1 to %struct.var_set*
%7 = tail call i32 @parse_var_set_vars(%struct.lexer* %0, %struct.var_set* %6, %struct.variable*** %2, i64* %3, i32 %4)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ handlefile(char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 1; i < argc; ++i)
    handlefile(argv[i]);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1158 <main+0x48>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <handlefile@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1142 <main+0x32>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <handlefile@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @handlefile(i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i32 0
}
/* Type definitions */
struct demod_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ selcall_init(struct demod_state *);
void zvei3_init(struct demod_state *s) { selcall_init(s); }


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

x86 assembly (clang, -O2):
<zvei3_init>:
jmp    1030 <selcall_init@plt>

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

LLVM IR (-O2):
%struct.demod_state = type { i32 }
define void @zvei3_init(%struct.demod_state* %0) {
%2 = tail call i32 @selcall_init(%struct.demod_state* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void __attribute__((noreturn)) zg_exit(int rc) { exit(rc); }


x86 assembly (clang, -O0):
<zg_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<zg_exit>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @zg_exit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
void apr_pool_terminate(void) { return; }


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

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

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

LLVM IR (-O2):
define void @apr_pool_terminate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ increment();
int main(void) {
#pragma omp parallel
  {
    for (int i = 0; i < 100; ++i) {
      increment();
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1145 <main+0x35>
mov    $0x0,%al
call   1030 <increment@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <increment@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %2
1: ; preds = %2
ret i32 0
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 (...) @increment()
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 100
br i1 %6, label %1, label %2
}
void gtk_true() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long int fsize(FILE *f) {
  long int original, size;
  original = ftell(f);
  fseek(f, 0, SEEK_END);
  size = ftell(f);
  fseek(f, original, SEEK_SET);
  return size;
}


x86 assembly (clang, -O0):
<fsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsize>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r15
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fsize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @ftell(i32* %5)
store i64 %6, i64* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %2
%13 = load i64, i64* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
%16 = load i64, i64* %4
ret i64 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fsize(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 %2, i32 %6)
ret i64 %5
}
unsigned int LowPassMul(unsigned int PrevMul, unsigned int CurrMul, int *Coef) {
  int dMul = PrevMul - CurrMul;
  unsigned int d = ((dMul + 0x10007FF) >> 12);
  return CurrMul + Coef[d];
}


x86 assembly (clang, -O0):
<LowPassMul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x10007ff,%eax
sar    $0xc,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%edx
add    (%rcx,%rdx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LowPassMul>:
mov    %esi,%eax
sub    %esi,%edi
add    $0x10007ff,%edi
sar    $0xc,%edi
add    (%rdx,%rdi,4),%eax
ret

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

LLVM IR (-O2):
define i32 @LowPassMul(i32 %0, i32 %1, i32* nocapture %2) {
%4 = add i32 %0, 16779263
%5 = sub i32 %4, %1
%6 = ashr i32 %5, 12
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %2, i64 %7
%9 = load i32, i32* %8
%10 = add i32 %9, %1
ret i32 %10
}
/* Variables and functions */
int fsync(int);
void test(void) {
  int fd;
  int result;
  fd = 4;
  result = fsync(fd);
}


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)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @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
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @fsync(i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ two(int);
void three(int size) { two(size); }


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

x86 assembly (clang, -O2):
<three>:
jmp    1030 <two@plt>

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

LLVM IR (-O2):
define void @three(i32 %0) {
%2 = tail call i32 @two(i32 %0)
ret void
}
void c_pomp_flush_enter_(struct ompregdescr *r) { (void)0; }


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

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

LLVM IR (-O0):
%struct.ompregdescr = type opaque
define void @c_pomp_flush_enter_(%struct.ompregdescr* %0) {
%2 = alloca %struct.ompregdescr*
store %struct.ompregdescr* %0, %struct.ompregdescr** %2
ret void
}

LLVM IR (-O2):
%struct.ompregdescr = type opaque
define void @c_pomp_flush_enter_(%struct.ompregdescr* nocapture %0) {
ret void
}
void RTSemMutexRequestNoResume(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemMutexRequestNoResume() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handler_not_implemented(char *);
void defaultUndefinedInstructionHandler() {
  handler_not_implemented("UNDEFINED_INSTRUCTION_HANDLER");
}


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

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

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

LLVM IR (-O2):
@.str = [30 x i8] c"UNDEFINED_INSTRUCTION_HANDLER\00"
define void @defaultUndefinedInstructionHandler() {
%1 = tail call i32 @handler_not_implemented(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}
void RTAvlrFileOffsetInsert(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrFileOffsetInsert() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, contador;
  scanf("%d", &n);
  for (contador = 0; contador < n; contador = contador + 1) {
    printf("Eu adoro programar\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116c <main+0x4c>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xed6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    1161 <main+0x41>
xor    %ebp,%ebp
lea    0xebf(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [19 x i8] c"Eu adoro programar\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %0, %6
%7 = phi i32 [ %9, %6 ], [ 0, %0 ]
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%9 = add nuw nsw i32 %7, 1
%10 = load i32, i32* %1
%11 = icmp slt i32 %9, %10
br i1 %11, label %6, label %12
12: ; preds = %6, %0
ret i32 0
}
void free(void *addr) { addr = addr; }


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

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

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

LLVM IR (-O2):
define void @free(i8* nocapture %0) {
ret void
}
void omp_set_num_threads(int num_threads) {}


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

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

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

LLVM IR (-O2):
define void @omp_set_num_threads(i32 %0) {
ret void
}
/* Variables and functions */
double floor(double);
double Frac(double arg) { return (arg - floor(arg)); }


x86 assembly (clang, -O0):
<Frac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Frac>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <floor@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Frac(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @llvm.floor.f64(double %4)
%6 = fsub double %3, %5
ret double %6
}

LLVM IR (-O2):
define double @Frac(double %0) {
%2 = tail call double @llvm.floor.f64(double %0)
%3 = fsub double %0, %2
ret double %3
}
int test_imm_E6int64_lowword_reg(long long val) {
  return ((val) & (0xE6 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E6int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xe6,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E6int64_lowword_reg>:
test   $0xe6,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E6int64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 230
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_E6int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 230
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ mqd_t;

/* Variables and functions */
int /*<<< orphan*/ mq_timedreceive(int /*<<< orphan*/, char *, size_t,
                                   unsigned int *, int /*<<< orphan*/);
ssize_t mq_receive(mqd_t mqd, char *msg, size_t len, unsigned *prio) {
  return mq_timedreceive(mqd, msg, len, prio, 0);
}


x86 assembly (clang, -O0):
<mq_receive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <mq_timedreceive@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mq_receive>:
xor    %r8d,%r8d
jmp    1030 <mq_timedreceive@plt>

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

LLVM IR (-O2):
define i32 @mq_receive(i32 %0, i8* %1, i64 %2, i32* %3) {
%5 = tail call i32 @mq_timedreceive(i32 %0, i8* %1, i64 %2, i32* %3, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fisher(int, int, int, int, double *, double *, double *);
double fisher1(int a, int b, int c, int d) {
  double p_left = 0;
  double p_right = 0;
  double p_twotail = 0;
  fisher(a, b, c, d, &p_left, &p_right, &p_twotail);
  return p_right;
}


x86 assembly (clang, -O0):
<fisher1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    -0x18(%rbp),%r8
lea    -0x20(%rbp),%r9
lea    -0x28(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <fisher@plt>
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fisher1>:
sub    $0x28,%rsp
movq   $0x0,0x20(%rsp)
movq   $0x0,0x10(%rsp)
movq   $0x0,0x18(%rsp)
lea    0x18(%rsp),%rax
mov    %rax,(%rsp)
lea    0x20(%rsp),%r8
lea    0x10(%rsp),%r9
call   1030 <fisher@plt>
movsd  0x10(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @fisher1(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double
%11 = alloca double
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store double 0.000000e+00, double* %9
store double 0.000000e+00, double* %10
store double 0.000000e+00, double* %11
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = call i32 @fisher(i32 %12, i32 %13, i32 %14, i32 %15, double* %9, double* %10, double* %11)
%17 = load double, double* %10
ret double %17
}

LLVM IR (-O2):
define double @fisher1(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = bitcast double* %5 to i8*
store double 0.000000e+00, double* %5
%9 = bitcast double* %6 to i8*
store double 0.000000e+00, double* %6
%10 = bitcast double* %7 to i8*
store double 0.000000e+00, double* %7
%11 = call i32 @fisher(i32 %0, i32 %1, i32 %2, i32 %3, double* %5, double* %6, double* %7)
%12 = load double, double* %6
ret double %12
}
int ft_toupper(int c) {
  if (c >= 'a' && c <= 'z')
    return (c - 'a' + 'A');
  else
    return (c);
}


x86 assembly (clang, -O0):
<ft_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     112c <ft_toupper+0x2c>
cmpl   $0x7a,-0x8(%rbp)
jg     112c <ft_toupper+0x2c>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <ft_toupper+0x32>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_toupper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
void gtk_drag_source_set_icon() {}


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

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

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

LLVM IR (-O2):
define void @gtk_drag_source_set_icon() {
ret void
}
int list() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @list() {
ret i32 0
}
void f(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @f(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int log_open(int);
int log_open_server(void) { return log_open(1); }


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

x86 assembly (clang, -O2):
<log_open_server>:
mov    $0x1,%edi
jmp    1030 <log_open@plt>

LLVM IR (-O0):
define i32 @log_open_server() {
%1 = call i32 @log_open(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @log_open_server() {
%1 = tail call i32 @log_open(i32 1)
ret i32 %1
}
/* Variables and functions */
scalar_t__ read_byte(unsigned int);
unsigned int read_word(unsigned int addr) {
  int number = 0;
  number |= (((unsigned int)read_byte(addr)) << 8);
  number |= (((unsigned int)read_byte(addr + 1)));
  return number;
}


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

x86 assembly (clang, -O2):
<read_word>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <read_byte@plt>
mov    %rax,%r14
shl    $0x8,%r14d
add    $0x1,%ebx
mov    %ebx,%edi
call   1030 <read_byte@plt>
or     %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @read_word(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i64 @read_byte(i32 %4)
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = load i32, i32* %3
%9 = or i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = add i32 %10, 1
%12 = call i64 @read_byte(i32 %11)
%13 = trunc i64 %12 to i32
%14 = load i32, i32* %3
%15 = or i32 %14, %13
store i32 %15, i32* %3
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @read_word(i32 %0) {
%2 = tail call i64 @read_byte(i32 %0)
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 8
%5 = add i32 %0, 1
%6 = tail call i64 @read_byte(i32 %5)
%7 = trunc i64 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, ...);
int setnonblock(int fd) {
  int flags;
  flags = fcntl(fd, F_GETFL);
  flags |= O_NONBLOCK;
  fcntl(fd, F_SETFL, flags);
}


x86 assembly (clang, -O0):
<setnonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0xc(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e8e(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setnonblock>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1030 <fcntl@plt>
mov    0x2ebe(%rip),%rcx
or     (%rcx),%eax
mov    0x2ea5(%rip),%rcx
mov    (%rcx),%esi
mov    %ebx,%edi
mov    %eax,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
@F_SETFL = global i32 0
define i32 @setnonblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* @F_GETFL
%7 = call i32 (i32, i32, ...) @fcntl(i32 %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* @O_NONBLOCK
%9 = load i32, i32* %4
%10 = or i32 %9, %8
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = load i32, i32* @F_SETFL
%13 = load i32, i32* %4
%14 = call i32 (i32, i32, ...) @fcntl(i32 %11, i32 %12, i32 %13)
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
@F_SETFL = global i32 0
define i32 @setnonblock(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %2)
%4 = load i32, i32* @O_NONBLOCK
%5 = or i32 %4, %3
%6 = load i32, i32* @F_SETFL
%7 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %6, i32 %5)
ret i32 undef
}
yyerror(s) char *s;
{ warning(s, (char *)0); }


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

x86 assembly (clang, -O2):
<yyerror>:
xor    %esi,%esi
xor    %eax,%eax
jmp    1030 <warning@plt>

LLVM IR (-O0):
define i32 @yyerror(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @warning to i32 (i8*, i8*, ...)*)(i8* %4, i8* null)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @yyerror(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @warning to i32 (i8*, i8*, ...)*)(i8* %0, i8* null)
ret i32 undef
}
void ECDSA_verify(void) {}


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

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

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

LLVM IR (-O2):
define void @ECDSA_verify() {
ret void
}
/* Type definitions */
typedef scalar_t__ uid_t;

/* Variables and functions */
int /*<<< orphan*/ cleanup();
int /*<<< orphan*/ exit(int);
scalar_t__ getuid();
int /*<<< orphan*/ printf(char *);
void check_must_be_root(void) {
  uid_t uid = getuid();
  if (uid != 0)
    do {
      cleanup();
      printf("Bad configuration: "
             "Must be root"
             "\n");
      exit(1);
    } while (0);
}


x86 assembly (clang, -O0):
<check_must_be_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1180 <check_must_be_root+0x40>
jmp    1163 <check_must_be_root+0x23>
mov    $0x0,%al
call   1050 <cleanup@plt>
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_must_be_root>:
push   %rax
xor    %eax,%eax
call   1040 <getuid@plt>
test   %rax,%rax
jne    114f <check_must_be_root+0xf>
pop    %rax
ret
xor    %eax,%eax
call   1050 <cleanup@plt>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Bad configuration: Must be root\0A\00"
define void @check_must_be_root() {
%1 = alloca i64
%2 = call i64 (...) @getuid()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %0
br label %6
6: ; preds = %5
%7 = call i32 (...) @cleanup()
%8 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
10: ; No predecessors!
br label %11
11: ; preds = %10, %0
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"Bad configuration: Must be root\00"
define void @check_must_be_root() {
%1 = tail call i64 (...) @getuid()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 (...) @cleanup()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_key_t;

/* Variables and functions */
void *pthread_getspecific(int /*<<< orphan*/);
void *OsGetThreadData(long key) {
  return (pthread_getspecific((pthread_key_t)key));
}


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

x86 assembly (clang, -O2):
<OsGetThreadData>:
jmp    1030 <pthread_getspecific@plt>

LLVM IR (-O0):
define i8* @OsGetThreadData(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = call i8* @pthread_getspecific(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @OsGetThreadData(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i8* @pthread_getspecific(i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("\n");
  printf(
      "Usage: LD_PRELOAD=./libmpsocket.so CHUNK_SIZE_IN_KB=<number> "
      "CONNECTIONS=<number>  <application> <application specific options>\n");
  printf("LD_PRELOAD=./libmpsocket.so CHUNK_SIZE_IN_KB=1024 CONNECTIONS=2 wget "
         "http://www.google.com/index.html\n\n\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
lea    0xf42(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [129 x i8] c"Usage: LD_PRELOAD=./libmpsocket.so CHUNK_SIZE_IN_KB=<number> CONNECTIONS=<number> <application> <application specific options>\0A\00"
@.str.2 = [105 x i8] c"LD_PRELOAD=./libmpsocket.so CHUNK_SIZE_IN_KB=1024 CONNECTIONS=2 wget http://www.google.com/index.html\0A\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [128 x i8] c"Usage: LD_PRELOAD=./libmpsocket.so CHUNK_SIZE_IN_KB=<number> CONNECTIONS=<number> <application> <application specific options>\00"
@str.3 = [104 x i8] c"LD_PRELOAD=./libmpsocket.so CHUNK_SIZE_IN_KB=1024 CONNECTIONS=2 wget http://www.google.com/index.html\0A\0A\00"
define void @usage() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([104 x i8], [104 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SV_RemoveAllBots();
void GScr_RemoveAllBots() { SV_RemoveAllBots(); }


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

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

LLVM IR (-O0):
define void @GScr_RemoveAllBots() {
%1 = call i32 (...) @SV_RemoveAllBots()
ret void
}

LLVM IR (-O2):
define void @GScr_RemoveAllBots() {
%1 = tail call i32 (...) @SV_RemoveAllBots()
ret void
}
int maior(int x, int y) {
  if (x > y)
    return x;
  else
    return y;
}


x86 assembly (clang, -O0):
<maior>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <maior+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <maior+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maior>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @maior(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void sol_message_digest_shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @sol_message_digest_shutdown() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR47_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR47_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR47_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
unsigned int dns_packet_skipname(char *, unsigned int, unsigned int);
int /*<<< orphan*/ err(int, char *);
unsigned int x_skipname(char *buf, unsigned int len, unsigned int pos) {
  pos = dns_packet_skipname(buf, len, pos);
  if (!pos)
    err(-1, "could not parse AXFR results");
  return pos;
}


x86 assembly (clang, -O0):
<x_skipname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <dns_packet_skipname@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    115f <x_skipname+0x3f>
mov    $0xffffffff,%edi
lea    0xea6(%rip),%rsi
call   1040 <err@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_skipname>:
push   %rbx
call   1030 <dns_packet_skipname@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    113d <x_skipname+0x1d>
lea    0xecd(%rip),%rsi
mov    $0xffffffff,%edi
call   1040 <err@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"could not parse AXFR results\00"
define i32 @x_skipname(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @dns_packet_skipname(i8* %7, i32 %8, i32 %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp ne i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %3
%14 = call i32 @err(i32 -1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
%16 = load i32, i32* %6
ret i32 %16
}

LLVM IR (-O2):
@.str = [29 x i8] c"could not parse AXFR results\00"
define i32 @x_skipname(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @dns_packet_skipname(i8* %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @err(i32 -1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}