xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ eiki_attach_debugger();
void eiki_gdb() { eiki_attach_debugger(); }


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

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

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

LLVM IR (-O2):
define void @eiki_gdb() {
%1 = tail call i32 (...) @eiki_attach_debugger()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void lastz_show_stats_before(FILE *f __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @lastz_show_stats_before(i32* nocapture %0) {
ret void
}
int test_imm_1Fint32_mem(int *val) {
  return ((*val) & (0x1F << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_1Fint32_mem>:
testb  $0x1f,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_1Fint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 31
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct out {
  int dummy;
};
struct node {
  int dummy;
};
struct module {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_block(struct out *, struct module const *,
                               int /*<<< orphan*/);
int /*<<< orphan*/ subs_first_const(struct node const *);
void print_pre(struct out *out, const struct module *mod,
               const struct node *node) {
  print_block(out, mod, subs_first_const(node));
}


x86 assembly (clang, -O0):
<print_pre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <subs_first_const@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1040 <print_block@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_pre>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdx,%rdi
call   1030 <subs_first_const@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <print_block@plt>

LLVM IR (-O0):
%struct.out = type { i32 }
%struct.module = type { i32 }
%struct.node = type { i32 }
define void @print_pre(%struct.out* %0, %struct.module* %1, %struct.node* %2) {
%4 = alloca %struct.out*
%5 = alloca %struct.module*
%6 = alloca %struct.node*
store %struct.out* %0, %struct.out** %4
store %struct.module* %1, %struct.module** %5
store %struct.node* %2, %struct.node** %6
%7 = load %struct.out*, %struct.out** %4
%8 = load %struct.module*, %struct.module** %5
%9 = load %struct.node*, %struct.node** %6
%10 = call i32 @subs_first_const(%struct.node* %9)
%11 = call i32 @print_block(%struct.out* %7, %struct.module* %8, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.out = type { i32 }
%struct.module = type { i32 }
%struct.node = type { i32 }
define void @print_pre(%struct.out* %0, %struct.module* %1, %struct.node* %2) {
%4 = tail call i32 @subs_first_const(%struct.node* %2)
%5 = tail call i32 @print_block(%struct.out* %0, %struct.module* %1, i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fseek(int /*<<< orphan*/ *, long, int);
__attribute__((__weak__, __always___)) int
softboundmpx_fseek(FILE *stream, long offset, int whence) {
  return fseek(stream, offset, whence);
}


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

x86 assembly (clang, -O2):
<softboundmpx_fseek>:
jmp    1030 <fseek@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_fseek(i32* %0, i64 %1, i32 %2) {
%4 = tail call i32 @fseek(i32* %0, i64 %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ glob_t;

/* Variables and functions */
scalar_t__ glob(char *, int /*<<< orphan*/, int /*<<< orphan*/ *,
                int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
void glob_devices(glob_t *globbuf) {
  if (glob("/dev/hidraw*", 0, NULL, globbuf) != 0) {
    printf("DEBUG: glob() failed.\n");
  }
}


x86 assembly (clang, -O0):
<glob_devices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0xec9(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <glob@plt>
cmp    $0x0,%rax
je     1158 <glob_devices+0x38>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glob_devices>:
push   %rax
mov    %rdi,%rcx
lea    0xed5(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <glob@plt>
test   %rax,%rax
je     1146 <glob_devices+0x26>
lea    0xecd(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/hidraw*\00"
@.str.1 = [23 x i8] c"DEBUG: glob() failed.\0A\00"
define void @glob_devices(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @glob(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 0, i32* null, i32* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/hidraw*\00"
@str = [22 x i8] c"DEBUG: glob() failed.\00"
define void @glob_devices(i32* %0) {
%2 = tail call i64 @glob(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 0, i32* null, i32* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
size_t dummywc_mbrlen(const char *s, size_t n, int *ps) {
  if (*s == '\0')
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<dummywc_mbrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    112d <dummywc_mbrlen+0x2d>
movq   $0x0,-0x8(%rbp)
jmp    1135 <dummywc_mbrlen+0x35>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummywc_mbrlen>:
xor    %eax,%eax
cmpb   $0x0,(%rdi)
setne  %al
ret

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

LLVM IR (-O2):
define i64 @dummywc_mbrlen(i8* nocapture %0, i64 %1, i32* nocapture readnone %2) {
%4 = load i8, i8* %0
%5 = icmp ne i8 %4, 0
%6 = zext i1 %5 to i64
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ error();
void *realloc(void *, size_t);
void *_realloc(void *ptr, size_t size) {
  void *ret = realloc(ptr, size);
  if (!ret)
    error();
  return ret;
}


x86 assembly (clang, -O0):
<_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <_realloc+0x33>
mov    $0x0,%al
call   1040 <error@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_realloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <_realloc+0x15>
xor    %eax,%eax
call   1040 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 (...) @error()
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @error()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
int passes_loc_constraints_fp(int **walk_points, int curr_num_pts,
                              double not_used) {
  return 1;
}


x86 assembly (clang, -O0):
<passes_loc_constraints_fp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @passes_loc_constraints_fp(i32** nocapture readnone %0, i32 %1, double %2) {
ret i32 1
}
/* Variables and functions */
int WNOHANG;
int WUNTRACED;
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ waitpid(int, int *, int);
void traitement_signal(int sig) {
  printf("Signal %d reçu \n", sig);
  int status;
  waitpid(-1, &status, WNOHANG | WUNTRACED);
}


x86 assembly (clang, -O0):
<traitement_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
mov    0x2e8e(%rip),%rax
or     (%rax),%edx
mov    $0xffffffff,%edi
lea    -0x8(%rbp),%rsi
call   1040 <waitpid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<traitement_signal>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb2(%rip),%rax
mov    0x2e9b(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
lea    0x4(%rsp),%rsi
mov    $0xffffffff,%edi
call   1040 <waitpid@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Signal %d re\C3\A7u \0A\00"
@WNOHANG = global i32 0
@WUNTRACED = global i32 0
define void @traitement_signal(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @WNOHANG
%7 = load i32, i32* @WUNTRACED
%8 = or i32 %6, %7
%9 = call i32 @waitpid(i32 -1, i32* %3, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Signal %d re\C3\A7u \0A\00"
@WNOHANG = global i32 0
@WUNTRACED = global i32 0
define void @traitement_signal(i32 %0) {
%2 = alloca i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = bitcast i32* %2 to i8*
%5 = load i32, i32* @WNOHANG
%6 = load i32, i32* @WUNTRACED
%7 = or i32 %6, %5
%8 = call i32 @waitpid(i32 -1, i32* %2, i32 %7)
ret void
}
void freeAllottedMem(char **args, int arraySize) {
  int i;
  for (i = 0; i < arraySize; ++i) {
    free(args[i]);
  }
  free(args);
}


x86 assembly (clang, -O0):
<freeAllottedMem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <freeAllottedMem+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <freeAllottedMem+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeAllottedMem>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <freeAllottedMem+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freeAllottedMem+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeAllottedMem(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ task_deassert_flag(int, int);
void task_deassert_fifo(int id) { task_deassert_flag(id, (1 << 4)); }


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

x86 assembly (clang, -O2):
<task_deassert_fifo>:
mov    $0x10,%esi
jmp    1030 <task_deassert_flag@plt>

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

LLVM IR (-O2):
define void @task_deassert_fifo(i32 %0) {
%2 = tail call i32 @task_deassert_flag(i32 %0, i32 16)
ret void
}
/* Type definitions */
struct i {
  int dummy;
};

/* Variables and functions */
struct i *i_reverse0(int /*<<< orphan*/ *, struct i *);
struct i *i_reverse(struct i *h) {
  return i_reverse0(NULL, h);
}


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

x86 assembly (clang, -O2):
<i_reverse>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <i_reverse0@plt>

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

LLVM IR (-O2):
%struct.i = type { i32 }
define %struct.i* @i_reverse(%struct.i* %0) {
%2 = tail call %struct.i* @i_reverse0(i32* null, %struct.i* %0)
ret %struct.i* %2
}
/* Variables and functions */
int /*<<< orphan*/ transfer_flow_vol_from_units_c();
void transfer_flow_vol_from_units() { transfer_flow_vol_from_units_c(); }


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

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

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

LLVM IR (-O2):
define void @transfer_flow_vol_from_units() {
%1 = tail call i32 (...) @transfer_flow_vol_from_units_c()
ret void
}
void VM_sysinit(int argc, char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @VM_sysinit(i32 %0, i8** nocapture %1) {
ret void
}
unsigned int type2size(const unsigned int type) {
  switch (type) {
  case 1:
  case 2:
  case 6:
  case 7:
    return 1;
  case 3:
  case 8:
    return 2;
  case 4:
  case 9:
  case 11:
  case 13:
    return 4;
  case 5:
  case 10:
  case 12:
  case 16:
  case 17:
  case 18:
    return 8;
  default:
    return 1;
  }
}


x86 assembly (clang, -O0):
<type2size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x11,%eax
ja     1160 <type2size+0x60>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1167 <type2size+0x67>
movl   $0x2,-0x4(%rbp)
jmp    1167 <type2size+0x67>
movl   $0x4,-0x4(%rbp)
jmp    1167 <type2size+0x67>
movl   $0x8,-0x4(%rbp)
jmp    1167 <type2size+0x67>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<type2size>:
add    $0xfffffffd,%edi
mov    $0x1,%eax
cmp    $0xf,%edi
ja     111a <type2size+0x1a>
movslq %edi,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @type2size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 1, label %5
i32 2, label %5
i32 6, label %5
i32 7, label %5
i32 3, label %6
i32 8, label %6
i32 4, label %7
i32 9, label %7
i32 11, label %7
i32 13, label %7
i32 5, label %8
i32 10, label %8
i32 12, label %8
i32 16, label %8
i32 17, label %8
i32 18, label %8
]
5: ; preds = %1, %1, %1, %1
store i32 1, i32* %2
br label %10
6: ; preds = %1, %1
store i32 2, i32* %2
br label %10
7: ; preds = %1, %1, %1, %1
store i32 4, i32* %2
br label %10
8: ; preds = %1, %1, %1, %1, %1, %1
store i32 8, i32* %2
br label %10
9: ; preds = %1
store i32 1, i32* %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@switch.table.type2size = [16 x i32] [i32 2, i32 4, i32 8, i32 1, i32 1, i32 2, i32 4, i32 8, i32 4, i32 8, i32 4, i32 1, i32 1, i32 8, i32 8, i32 8]
define i32 @type2size(i32 %0) {
%2 = add i32 %0, -3
%3 = icmp ult i32 %2, 16
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [16 x i32], [16 x i32]* @switch.table.type2size, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *ptr = malloc(size);
  if (ptr == NULL)
    fatal("out of memory");
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <xmalloc+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <xmalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ ispunct(int);
void t_ispunct_0x27() {
  Assert_real((ispunct(39)),
              "/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_ispunct.c",
              200, ("ispunct should be 1 for '"));
}


x86 assembly (clang, -O0):
<t_ispunct_0x27>:
push   %rbp
mov    %rsp,%rbp
mov    $0x27,%edi
call   1030 <ispunct@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xc8,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x27>:
push   %rax
mov    $0x27,%edi
call   1030 <ispunct@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xc8,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for '\00"
define void @t_ispunct_0x27() {
%1 = call i32 @ispunct(i32 39)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 200, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for '\00"
define void @t_ispunct_0x27() {
%1 = tail call i32 @ispunct(i32 39)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 200, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_16(int /*<<< orphan*/ const *, int);
uint16_t bnep_event_can_send_now_get_source_uuid(const uint8_t *event) {
  return little_endian_read_16(event, 4);
}


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

x86 assembly (clang, -O2):
<bnep_event_can_send_now_get_source_uuid>:
mov    $0x4,%esi
jmp    1030 <little_endian_read_16@plt>

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

LLVM IR (-O2):
define i32 @bnep_event_can_send_now_get_source_uuid(i32* %0) {
%2 = tail call i32 @little_endian_read_16(i32* %0, i32 4)
ret i32 %2
}
void PGMR3QueryGlobalMemoryStats(void) {}


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

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

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

LLVM IR (-O2):
define void @PGMR3QueryGlobalMemoryStats() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lv1_panic(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void abort(void) {
  printf("abort() called! Panicking.\n");
  lv1_panic(0);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1030 <lv1_panic@plt>
jmp    1137 <abort+0x17>

x86 assembly (clang, -O2):
<abort>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1030 <lv1_panic@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1140 <abort+0x20>

LLVM IR (-O0):
@.str = [28 x i8] c"abort() called! Panicking.\0A\00"
define void @abort() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @lv1_panic(i32 0)
br label %3
3: ; preds = %0, %3
br label %3
}

LLVM IR (-O2):
@str = [27 x i8] c"abort() called! Panicking.\00"
define void @abort() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @lv1_panic(i32 0)
br label %3
3: ; preds = %0, %3
br label %3
}
void t2n(double *x, double *x1, double *x2, double *x3, int i) {
  x1[i] = x[0];
  x2[i] = x[1];
  x3[i] = x[2];
}


x86 assembly (clang, -O0):
<t2n>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2n>:
movsd  (%rdi),%xmm0
movslq %r8d,%rax
movsd  %xmm0,(%rsi,%rax,8)
movsd  0x8(%rdi),%xmm0
movsd  %xmm0,(%rdx,%rax,8)
movsd  0x10(%rdi),%xmm0
movsd  %xmm0,(%rcx,%rax,8)
ret

LLVM IR (-O0):
define void @t2n(double* %0, double* %1, double* %2, double* %3, i32 %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
store double* %0, double** %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double*, double** %6
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = load double*, double** %7
%15 = load i32, i32* %10
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %14, i64 %16
store double %13, double* %17
%18 = load double*, double** %6
%19 = getelementptr inbounds double, double* %18, i64 1
%20 = load double, double* %19
%21 = load double*, double** %8
%22 = load i32, i32* %10
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds double, double* %21, i64 %23
store double %20, double* %24
%25 = load double*, double** %6
%26 = getelementptr inbounds double, double* %25, i64 2
%27 = load double, double* %26
%28 = load double*, double** %9
%29 = load i32, i32* %10
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds double, double* %28, i64 %30
store double %27, double* %31
ret void
}

LLVM IR (-O2):
define void @t2n(double* nocapture %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3, i32 %4) {
%6 = load double, double* %0
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds double, double* %1, i64 %7
store double %6, double* %8
%9 = getelementptr inbounds double, double* %0, i64 1
%10 = load double, double* %9
%11 = getelementptr inbounds double, double* %2, i64 %7
store double %10, double* %11
%12 = getelementptr inbounds double, double* %0, i64 2
%13 = load double, double* %12
%14 = getelementptr inbounds double, double* %3, i64 %7
store double %13, double* %14
ret void
}
int _kb_lock_module(int do_lock, void (*cs1)(void), void (*ce1)(void),
                    void (*cs2)(void), void (*ce2)(void), const void *ds1,
                    const void *de1, const void *ds2, const void *de2,
                    const void *ds3, const void *de3, const void *ds4,
                    const void *de4, const void *ds5, const void *de5,
                    const void *ds6, const void *de6, const void *ds7,
                    const void *de7, const void *ds8, const void *de8) {
  return 0;
}


x86 assembly (clang, -O0):
<_kb_lock_module>:
push   %rbp
mov    %rsp,%rbp
mov    0x80(%rbp),%rax
mov    0x78(%rbp),%rax
mov    0x70(%rbp),%rax
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @_kb_lock_module(i32 %0, void ()* nocapture readnone %1, void ()* nocapture readnone %2, void ()* nocapture readnone %3, void ()* nocapture readnone %4, i8* nocapture readnone %5, i8* nocapture readnone %6, i8* nocapture readnone %7, i8* nocapture readnone %8, i8* nocapture readnone %9, i8* nocapture readnone %10, i8* nocapture readnone %11, i8* nocapture readnone %12, i8* nocapture readnone %13, i8* nocapture readnone %14, i8* nocapture readnone %15, i8* nocapture readnone %16, i8* nocapture readnone %17, i8* nocapture readnone %18, i8* nocapture readnone %19, i8* nocapture readnone %20) {
ret i32 0
}
void RTStrToUInt32Ex(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrToUInt32Ex() {
ret void
}
unsigned int kgsl_virtaddr_to_physaddr(void *virtaddr) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @kgsl_virtaddr_to_physaddr(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int /*<<< orphan*/ *opendir(char const *);
int probe_ro_dir(const char *ro_dir) {
  DIR *dir = opendir(ro_dir);
  if (dir)
    closedir(dir);
  return !!dir;
}


x86 assembly (clang, -O0):
<probe_ro_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114d <probe_ro_dir+0x2d>
mov    -0x10(%rbp),%rdi
call   1040 <closedir@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<probe_ro_dir>:
push   %rbx
call   1030 <opendir@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1136 <probe_ro_dir+0x16>
mov    %rbx,%rdi
call   1040 <closedir@plt>
xor    %eax,%eax
test   %rbx,%rbx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @probe_ro_dir(i8* nocapture %0) {
%2 = tail call i32* @opendir(i8* %0)
%3 = icmp ne i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @closedir(i32* %2)
br label %6
6: ; preds = %4, %1
%7 = zext i1 %3 to i32
ret i32 %7
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_4d(int Salt, int Parameter) {
  unsigned b = Salt ^ 0x53F3604F;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_4d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x53f3604f,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_4d>:
xor    $0x53f3604f,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_4d(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = xor i32 %6, 1408458831
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @yahoo_M1Common(i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @yahoo_f01_4d(i32 %0, i32 %1) {
%3 = xor i32 %0, 1408458831
%4 = tail call i32 @yahoo_M1Common(i32 %3, i32 %1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
unsigned char _mm_aesdec256kl_u8(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                 void const *);
unsigned char test_mm_aesdec256kl_u8(__m128i *odata, __m128i idata,
                                     const void *h) {
  return _mm_aesdec256kl_u8(odata, idata, h);
}


x86 assembly (clang, -O0):
<test_mm_aesdec256kl_u8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <_mm_aesdec256kl_u8@plt>
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_aesdec256kl_u8>:
jmp    1030 <_mm_aesdec256kl_u8@plt>

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

LLVM IR (-O2):
define zeroext i8 @test_mm_aesdec256kl_u8(i32* %0, i32 %1, i8* %2) {
%4 = tail call zeroext i8 @_mm_aesdec256kl_u8(i32* %0, i32 %1, i8* %2)
ret i8 %4
}
/* Variables and functions */
int exor(int, int);
int *malloc(int);
int *half_adder(int a, int b) {
  int *arr = malloc(sizeof(int) * 2);
  int sum, carry;
  *(arr + 0) = exor(a, b);
  *(arr + 1) = a & b;
  return arr;
}


x86 assembly (clang, -O0):
<half_adder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <exor@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
and    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<half_adder>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%r14d
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,%rbp
mov    %r14d,%edi
mov    %ebx,%esi
call   1040 <exor@plt>
mov    %eax,0x0(%rbp)
and    %r14d,%ebx
mov    %ebx,0x4(%rbp)
mov    %rbp,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32* @half_adder(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = call i32* @malloc(i32 8)
store i32* %8, i32** %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @exor(i32 %9, i32 %10)
%12 = load i32*, i32** %5
%13 = getelementptr inbounds i32, i32* %12, i64 0
store i32 %11, i32* %13
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = and i32 %14, %15
%17 = load i32*, i32** %5
%18 = getelementptr inbounds i32, i32* %17, i64 1
store i32 %16, i32* %18
%19 = load i32*, i32** %5
ret i32* %19
}

LLVM IR (-O2):
define noalias i32* @half_adder(i32 %0, i32 %1) {
%3 = tail call i32* @malloc(i32 8)
%4 = tail call i32 @exor(i32 %0, i32 %1)
store i32 %4, i32* %3
%5 = and i32 %1, %0
%6 = getelementptr inbounds i32, i32* %3, i64 1
store i32 %5, i32* %6
ret i32* %3
}
double AddOp(double a, double b) { return a + b; }


x86 assembly (clang, -O0):
<AddOp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<AddOp>:
addsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @AddOp(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
/* Variables and functions */
void *mem_alloc_align_func(size_t, size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *mem_calloc_align_func(size_t count, size_t size, size_t align) {
  void *ptr = mem_alloc_align_func(size * count, align);
  memset(ptr, 0, size * count);
  return ptr;
}


x86 assembly (clang, -O0):
<mem_calloc_align_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
imul   -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <mem_alloc_align_func@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rdx
imul   -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_calloc_align_func>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
mov    %rdx,%rsi
call   1040 <mem_alloc_align_func@plt>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @mem_calloc_align_func(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %5
%9 = load i64, i64* %4
%10 = mul i64 %8, %9
%11 = load i64, i64* %6
%12 = call i8* @mem_alloc_align_func(i64 %10, i64 %11)
store i8* %12, i8** %7
%13 = load i8*, i8** %7
%14 = load i64, i64* %5
%15 = load i64, i64* %4
%16 = mul i64 %14, %15
%17 = call i32 @memset(i8* %13, i32 0, i64 %16)
%18 = load i8*, i8** %7
ret i8* %18
}

LLVM IR (-O2):
define i8* @mem_calloc_align_func(i64 %0, i64 %1, i64 %2) {
%4 = mul i64 %1, %0
%5 = tail call i8* @mem_alloc_align_func(i64 %4, i64 %2)
%6 = tail call i32 @memset(i8* %5, i32 0, i64 %4)
ret i8* %5
}
void initt(void) {}


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

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

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

LLVM IR (-O2):
define void @initt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_output(int, char *, int, int, unsigned int);
void energy_cb(int uJin, int uJout, unsigned int uJbatt) {
  log_output(10, "%d,%d,%u", uJin, uJout, uJbatt);
}


x86 assembly (clang, -O0):
<energy_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    $0xa,%edi
lea    0xec9(%rip),%rsi
call   1030 <log_output@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<energy_cb>:
mov    %edx,%r8d
mov    %esi,%ecx
mov    %edi,%edx
lea    0xee2(%rip),%rsi
mov    $0xa,%edi
jmp    1030 <log_output@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%d,%d,%u\00"
define void @energy_cb(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 @log_output(i32 10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d,%d,%u\00"
define void @energy_cb(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @log_output(i32 10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ wait(int *);
int main(void) {
  int status;
  pid_t pid;
  pid = wait(&status);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @wait(i32* %1)
ret i32 0
}
void terminate_occi_sql() { return; }


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

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

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

LLVM IR (-O2):
define void @terminate_occi_sql() {
ret void
}
long usec_to_PR(int t) { return (double)(t)*29.48 - 1; }


x86 assembly (clang, -O0):
<usec_to_PR>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee8(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<usec_to_PR>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%rax
ret

LLVM IR (-O0):
define i64 @usec_to_PR(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = call double @llvm.fmuladd.f64(double %4, double 2.948000e+01, double -1.000000e+00)
%6 = fptosi double %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @usec_to_PR(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 2.948000e+01, double -1.000000e+00)
%4 = fptosi double %3 to i64
ret i64 %4
}
void arm_mrc() {}


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

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

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

LLVM IR (-O2):
define void @arm_mrc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FEvers();
int /*<<< orphan*/ nl();
int /*<<< orphan*/ ol(char *);
int /*<<< orphan*/ outstr(char *);
header() {
  outstr("|\tSmall C MC6809\n|\tCoder (2.4,84/11/27)\n|");
  FEvers();
  nl();
  ol(".globl\tsmul,sdiv,smod,asr,asl,neg,lneg,case");
  ol(".globl\teq,ne,lt,le,gt,ge,ult,ule,ugt,uge,bool");
}


x86 assembly (clang, -O0):
<header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1050 <outstr@plt>
mov    $0x0,%al
call   1040 <FEvers@plt>
mov    $0x0,%al
call   1030 <nl@plt>
lea    0xec1(%rip),%rdi
call   1060 <ol@plt>
lea    0xee1(%rip),%rdi
call   1060 <ol@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<header>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <outstr@plt>
xor    %eax,%eax
call   1040 <FEvers@plt>
xor    %eax,%eax
call   1030 <nl@plt>
lea    0xec8(%rip),%rdi
call   1060 <ol@plt>
lea    0xee8(%rip),%rdi
pop    %rax
jmp    1060 <ol@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"|\09Small C MC6809\0A|\09Coder (2.4,84/11/27)\0A|\00"
@.str.1 = [44 x i8] c".globl\09smul,sdiv,smod,asr,asl,neg,lneg,case\00"
@.str.2 = [46 x i8] c".globl\09eq,ne,lt,le,gt,ge,ult,ule,ugt,uge,bool\00"
define i32 @header() {
%1 = alloca i32
%2 = call i32 @outstr(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @FEvers()
%4 = call i32 (...) @nl()
%5 = call i32 @ol(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @ol(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
@.str = [42 x i8] c"|\09Small C MC6809\0A|\09Coder (2.4,84/11/27)\0A|\00"
@.str.1 = [44 x i8] c".globl\09smul,sdiv,smod,asr,asl,neg,lneg,case\00"
@.str.2 = [46 x i8] c".globl\09eq,ne,lt,le,gt,ge,ult,ule,ugt,uge,bool\00"
define i32 @header() {
%1 = tail call i32 @outstr(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @FEvers()
%3 = tail call i32 (...) @nl()
%4 = tail call i32 @ol(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @ol(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
ret i32 undef
}