xunge/DecIR huggingface dataset:
/* Variables and functions */
char *getlogin();
char *strcpy(char *, char *);
char *cuserid(char *s) {
  char *name = getlogin();
  if (s) {
    return (strcpy(s, name ? name : ""));
  }
  return name;
}


x86 assembly (clang, -O0):
<cuserid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getlogin@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1188 <cuserid+0x68>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1162 <cuserid+0x42>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1172 <cuserid+0x52>
lea    0xe97(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    1172 <cuserid+0x52>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x8(%rbp)
jmp    1190 <cuserid+0x70>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cuserid>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <getlogin@plt>
test   %rbx,%rbx
je     1148 <cuserid+0x28>
test   %rax,%rax
lea    0xec6(%rip),%rsi
cmovne %rax,%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
jmp    114b <cuserid+0x2b>
mov    %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @cuserid(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = call i8* (...) @getlogin()
store i8* %5, i8** %4
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %18
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = load i8*, i8** %4
br label %15
14: ; preds = %8
br label %15
15: ; preds = %14, %12
%16 = phi i8* [ %13, %12 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %14 ]
%17 = call i8* @strcpy(i8* %9, i8* %16)
store i8* %17, i8** %2
br label %20
18: ; preds = %1
%19 = load i8*, i8** %4
store i8* %19, i8** %2
br label %20
20: ; preds = %18, %15
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @cuserid(i8* %0) {
%2 = tail call i8* (...) @getlogin()
%3 = icmp eq i8* %0, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = icmp eq i8* %2, null
%6 = select i1 %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %2
%7 = tail call i8* @strcpy(i8* %0, i8* dereferenceable(1) %6)
br label %8
8: ; preds = %1, %4
%9 = phi i8* [ %0, %4 ], [ %2, %1 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void ping() { printf("Project compiled: %s %s\n", "Mar 16 2022", "00:54:06"); }


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

x86 assembly (clang, -O2):
<ping>:
lea    0xee9(%rip),%rdi
lea    0xefb(%rip),%rsi
lea    0xf00(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Project compiled: %s %s\0A\00"
@.str.1 = [12 x i8] c"Mar 16 2022\00"
@.str.2 = [9 x i8] c"00:54:06\00"
define void @ping() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Project compiled: %s %s\0A\00"
@.str.1 = [12 x i8] c"Mar 16 2022\00"
@.str.2 = [9 x i8] c"00:54:06\00"
define void @ping() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("* Usage: mot2bin [options] <filename>\n"
         "* Available options are:\n"
         "*  -out    - output file [stdout]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [98 x i8] c"* Usage: mot2bin [options] <filename>\0A* Available options are:\0A* -out - output file [stdout]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [97 x i8] c"* Usage: mot2bin [options] <filename>\0A* Available options are:\0A* -out - output file [stdout]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int child_func(void *arg) {
  char **argv = arg;
  execvp(argv[0], &argv[0]);
  do {
    perror("execvp");
    exit(EXIT_FAILURE);
  } while (0);
}


x86 assembly (clang, -O0):
<child_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <execvp@plt>
lea    0xea5(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<child_func>:
push   %rax
mov    %rdi,%rsi
mov    (%rdi),%rdi
call   1040 <execvp@plt>
lea    0xebd(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"execvp\00"
@EXIT_FAILURE = global i32 0
define i32 @child_func(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
store i8** %6, i8*** %4
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = call i32 @execvp(i8* %9, i8** %11)
br label %13
13: ; preds = %1
%14 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%15 = load i32, i32* @EXIT_FAILURE
%16 = call i32 @exit(i32 %15)
unreachable
17: ; No predecessors!
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [7 x i8] c"execvp\00"
@EXIT_FAILURE = global i32 0
define i32 @child_func(i8* %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @execvp(i8* %3, i8** %2)
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Variables and functions */
int SNDDMA_GetDMAPos(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @SNDDMA_GetDMAPos() {
ret i32 0
}
void gdk_window_show() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_show() {
ret void
}
void v2sprod(float *restrict a, const float *b, float c) {
  a[0] = b[0] * c;
  a[1] = b[1] * c;
}


x86 assembly (clang, -O0):
<v2sprod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<v2sprod>:
movss  (%rsi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
mulss  0x4(%rsi),%xmm0
movss  %xmm0,0x4(%rdi)
ret

LLVM IR (-O0):
define void @v2sprod(float* noalias %0, float* %1, float %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float
store float* %0, float** %4
store float* %1, float** %5
store float %2, float* %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float, float* %6
%11 = fmul float %9, %10
%12 = load float*, float** %4
%13 = getelementptr inbounds float, float* %12, i64 0
store float %11, float* %13
%14 = load float*, float** %5
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float, float* %6
%18 = fmul float %16, %17
%19 = load float*, float** %4
%20 = getelementptr inbounds float, float* %19, i64 1
store float %18, float* %20
ret void
}

LLVM IR (-O2):
define void @v2sprod(float* noalias nocapture writeonly %0, float* nocapture %1, float %2) {
%4 = load float, float* %1
%5 = fmul float %4, %2
store float %5, float* %0
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = fmul float %7, %2
%9 = getelementptr inbounds float, float* %0, i64 1
store float %8, float* %9
ret void
}
void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) { return; }


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

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

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

LLVM IR (-O2):
%struct.thermal_cooling_device = type opaque
define void @cpufreq_cooling_unregister(%struct.thermal_cooling_device* nocapture %0) {
ret void
}
/* Variables and functions */
unsigned int startHandleMessage(void *, char *, int, void **, unsigned int *);
unsigned int startRetractFact(void *handle, char *message, void **rulesBinding,
                              unsigned int *replyCount) {
  return startHandleMessage(handle, message, 7, rulesBinding, replyCount);
}


x86 assembly (clang, -O0):
<startRetractFact>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    $0x7,%edx
call   1030 <startHandleMessage@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startRetractFact>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    $0x7,%edx
jmp    1030 <startHandleMessage@plt>

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

LLVM IR (-O2):
define i32 @startRetractFact(i8* %0, i8* %1, i8** %2, i32* %3) {
%5 = tail call i32 @startHandleMessage(i8* %0, i8* %1, i32 7, i8** %2, i32* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ NOROM_IntUnregister(int);
void SysTickIntUnregister(void) {
  (*((volatile unsigned long *)(0xE000E010))) &= ~(0x00000002);
  NOROM_IntUnregister(15);
}


x86 assembly (clang, -O0):
<SysTickIntUnregister>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000e010,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffd,%rcx
mov    $0xe000e010,%eax
mov    %rcx,(%rax)
mov    $0xf,%edi
call   1030 <NOROM_IntUnregister@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysTickIntUnregister>:
mov    $0xe000e010,%eax
andq   $0xfffffffffffffffd,(%rax)
mov    $0xf,%edi
jmp    1030 <NOROM_IntUnregister@plt>

LLVM IR (-O0):
define void @SysTickIntUnregister() {
%1 = load volatile i64, i64* inttoptr (i64 3758153744 to i64*)
%2 = and i64 %1, -3
store volatile i64 %2, i64* inttoptr (i64 3758153744 to i64*)
%3 = call i32 @NOROM_IntUnregister(i32 15)
ret void
}

LLVM IR (-O2):
define void @SysTickIntUnregister() {
%1 = load volatile i64, i64* inttoptr (i64 3758153744 to i64*)
%2 = and i64 %1, -3
store volatile i64 %2, i64* inttoptr (i64 3758153744 to i64*)
%3 = tail call i32 @NOROM_IntUnregister(i32 15)
ret void
}
/* Variables and functions */
int rand();
void get_bin_randoms(int *numbers2, int upper) {
  int i, where;
  for (i = 0; i < upper; i++) {
    where = rand();
    ;
    numbers2[i] = where % 2;
  }
}


x86 assembly (clang, -O0):
<get_bin_randoms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <get_bin_randoms+0x50>
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <get_bin_randoms+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bin_randoms>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1150 <get_bin_randoms+0x40>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <get_bin_randoms+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @get_bin_randoms(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = tail call i32 (...) @rand()
%9 = srem i32 %8, 2
%10 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 %9, i32* %10
%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 void
}
/* Type definitions */
struct tokenizer {
  int dummy;
};
struct lineFile {
  int dummy;
};
struct asObject {
  int dummy;
};

/* Variables and functions */
struct asObject *asParseTokens(struct tokenizer *);
int /*<<< orphan*/ tokenizerFree(struct tokenizer **);
struct tokenizer *tokenizerOnLineFile(struct lineFile *);
struct asObject *asParseLineFile(struct lineFile *lf) {
  struct tokenizer *tkz = tokenizerOnLineFile(lf);
  struct asObject *objList = asParseTokens(tkz);
  tokenizerFree(&tkz);
  return objList;
}


x86 assembly (clang, -O0):
<asParseLineFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <tokenizerOnLineFile@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <asParseTokens@plt>
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rdi
call   1040 <tokenizerFree@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asParseLineFile>:
push   %rbx
sub    $0x10,%rsp
call   1050 <tokenizerOnLineFile@plt>
mov    %rax,0x8(%rsp)
mov    %rax,%rdi
call   1030 <asParseTokens@plt>
mov    %rax,%rbx
lea    0x8(%rsp),%rdi
call   1040 <tokenizerFree@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.asObject = type { i32 }
%struct.lineFile = type { i32 }
%struct.tokenizer = type { i32 }
define %struct.asObject* @asParseLineFile(%struct.lineFile* %0) {
%2 = alloca %struct.lineFile*
%3 = alloca %struct.tokenizer*
%4 = alloca %struct.asObject*
store %struct.lineFile* %0, %struct.lineFile** %2
%5 = load %struct.lineFile*, %struct.lineFile** %2
%6 = call %struct.tokenizer* @tokenizerOnLineFile(%struct.lineFile* %5)
store %struct.tokenizer* %6, %struct.tokenizer** %3
%7 = load %struct.tokenizer*, %struct.tokenizer** %3
%8 = call %struct.asObject* @asParseTokens(%struct.tokenizer* %7)
store %struct.asObject* %8, %struct.asObject** %4
%9 = call i32 @tokenizerFree(%struct.tokenizer** %3)
%10 = load %struct.asObject*, %struct.asObject** %4
ret %struct.asObject* %10
}

LLVM IR (-O2):
%struct.asObject = type { i32 }
%struct.lineFile = type { i32 }
%struct.tokenizer = type { i32 }
define %struct.asObject* @asParseLineFile(%struct.lineFile* %0) {
%2 = alloca %struct.tokenizer*
%3 = bitcast %struct.tokenizer** %2 to i8*
%4 = tail call %struct.tokenizer* @tokenizerOnLineFile(%struct.lineFile* %0)
store %struct.tokenizer* %4, %struct.tokenizer** %2
%5 = tail call %struct.asObject* @asParseTokens(%struct.tokenizer* %4)
%6 = call i32 @tokenizerFree(%struct.tokenizer** %2)
ret %struct.asObject* %5
}
/* Variables and functions */
int /*<<< orphan*/ SendByte(int /*<<< orphan*/);
int /*<<< orphan*/ usleep(int);
void SendString(char *data) {
  while (*data) {
    usleep(500);
    SendByte(*data++);
  }
}


x86 assembly (clang, -O0):
<SendString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115f <SendString+0x3f>
mov    $0x1f4,%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <SendByte@plt>
jmp    112c <SendString+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SendString>:
push   %rbx
cmpb   $0x0,(%rdi)
je     114c <SendString+0x2c>
mov    %rdi,%rbx
add    $0x1,%rbx
nopl   (%rax)
mov    $0x1f4,%edi
call   1040 <usleep@plt>
movsbl -0x1(%rbx),%edi
call   1030 <SendByte@plt>
cmpb   $0x0,(%rbx)
lea    0x1(%rbx),%rbx
jne    1130 <SendString+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @SendString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = call i32 @usleep(i32 500)
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = call i32 @SendByte(i32 %12)
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @SendString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %0, %1 ]
%6 = tail call i32 @usleep(i32 500)
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = load i8, i8* %5
%9 = sext i8 %8 to i32
%10 = tail call i32 @SendByte(i32 %9)
%11 = load i8, i8* %7
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
/* Variables and functions */
bool alpha(char c) { return c >= 'a' && c <= 'z'; }


x86 assembly (clang, -O0):
<alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <alpha+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alpha>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @alpha(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @alpha(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ focus;
};
struct TYPE_4__ {
  TYPE_1__ xcrossing;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xcrossing_focus(void *_p) {
  return (int)((XEvent *)_p)->xcrossing.focus;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XEvent_xcrossing_focus(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int max_tab(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int tab[] = {1, 4, 20, 12, 100, 2};
  printf("Max de [1, 4, 20, 12, 100, 2] : %d\n", max_tab(tab, 6));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x6,%esi
call   1040 <max_tab@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x6,%esi
call   1040 <max_tab@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.tab = [6 x i32] [i32 1, i32 4, i32 20, i32 12, i32 100, i32 2]
@.str = [36 x i8] c"Max de [1, 4, 20, 12, 100, 2] : %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
store i32 0, i32* %1
%3 = bitcast [6 x i32]* %2 to i8*
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%5 = call i32 @max_tab(i32* %4, i32 6)
%6 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.tab = [6 x i32] [i32 1, i32 4, i32 20, i32 12, i32 100, i32 2]
@.str = [36 x i8] c"Max de [1, 4, 20, 12, 100, 2] : %d\0A\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @max_tab(i32* %3, i32 6)
%5 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t swapbyte32_on_le(uint32_t in) {
  return ((in & 0xff) << 24) | ((in & 0xff00) << 8) | ((in & 0xff0000) >> 8) |
         ((in & 0xff000000) >> 24);
}


x86 assembly (clang, -O0):
<swapbyte32_on_le>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapbyte32_on_le>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @swapbyte32_on_le(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = ashr i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, -16777216
%16 = lshr i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @swapbyte32_on_le(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wcschr(int /*<<< orphan*/ *, int /*<<< orphan*/);
void uninivar_wcschr(void) {
  wchar_t *cs;
  wchar_t c;
  (void)wcschr(cs, c);
}


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

x86 assembly (clang, -O2):
<uninivar_wcschr>:
jmp    1030 <wcschr@plt>

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

LLVM IR (-O2):
define void @uninivar_wcschr() {
%1 = tail call i32 @wcschr(i32* undef, i32 undef)
ret void
}
unsigned getbit(unsigned src_bf) {
  int e;
  for (e = 0; src_bf > 1; ++e) {
    src_bf = src_bf >> 1;
  }
  return e;
}


x86 assembly (clang, -O0):
<getbit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jbe    112f <getbit+0x2f>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <getbit+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbit>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <getbit+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <getbit+0x10>
ret

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

LLVM IR (-O2):
define i32 @getbit(i32 %0) {
%2 = icmp ugt i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Type definitions */
struct menu_s {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ LINUX_REBOOT_CMD_RESTART2;
int /*<<< orphan*/ reboot(int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ write(int, char *, int);
void config_restart(struct menu_s *parent, int displayfd, int arg) {
  write(displayfd, "\x0cRestarting...", 14);
  sleep(2);
  reboot(LINUX_REBOOT_CMD_RESTART2);
}


x86 assembly (clang, -O0):
<config_restart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
lea    0xeb4(%rip),%rsi
mov    $0xe,%edx
call   1030 <write@plt>
mov    $0x2,%edi
call   1050 <sleep@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1040 <reboot@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_restart>:
push   %rax
mov    %esi,%edi
lea    0xec6(%rip),%rsi
mov    $0xe,%edx
call   1030 <write@plt>
mov    $0x2,%edi
call   1050 <sleep@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <reboot@plt>

LLVM IR (-O0):
%struct.menu_s = type { i32 }
@.str = [15 x i8] c"\0CRestarting...\00"
@LINUX_REBOOT_CMD_RESTART2 = global i32 0
define void @config_restart(%struct.menu_s* %0, i32 %1, i32 %2) {
%4 = alloca %struct.menu_s*
%5 = alloca i32
%6 = alloca i32
store %struct.menu_s* %0, %struct.menu_s** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = call i32 @write(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 14)
%9 = call i32 @sleep(i32 2)
%10 = load i32, i32* @LINUX_REBOOT_CMD_RESTART2
%11 = call i32 @reboot(i32 %10)
ret void
}

LLVM IR (-O2):
%struct.menu_s = type { i32 }
@.str = [15 x i8] c"\0CRestarting...\00"
@LINUX_REBOOT_CMD_RESTART2 = global i32 0
define void @config_restart(%struct.menu_s* nocapture readnone %0, i32 %1, i32 %2) {
%4 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 14)
%5 = tail call i32 @sleep(i32 2)
%6 = load i32, i32* @LINUX_REBOOT_CMD_RESTART2
%7 = tail call i32 @reboot(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("$(messagearm)"
         "\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"$(messagearm)\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"$(messagearm)\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint32_t;
typedef int ssize_t;
typedef int /*<<< orphan*/ info;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int write(int, int *, int);
void enableInterrupt(int fd) {
  uint32_t info = 1;
  ssize_t nb = write(fd, &info, sizeof(info));
  if (nb < sizeof(info)) {
    perror("write");
    close(fd);
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<enableInterrupt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
cmp    $0x4,%rax
jae    1196 <enableInterrupt+0x56>
lea    0xe85(%rip),%rdi
call   1050 <perror@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enableInterrupt>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movl   $0x1,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
cmp    $0x3,%eax
jbe    1169 <enableInterrupt+0x29>
add    $0x10,%rsp
pop    %rbx
ret
lea    0xe90(%rip),%rdi
call   1050 <perror@plt>
mov    %ebx,%edi
call   1040 <close@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"write\00"
@EXIT_FAILURE = global i32 0
define void @enableInterrupt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%5 = load i32, i32* %2
%6 = call i32 @write(i32 %5, i32* %3, i32 4)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = icmp ult i64 %8, 4
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = call i32 @close(i32 %12)
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
16: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"write\00"
@EXIT_FAILURE = global i32 0
define void @enableInterrupt(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = call i32 @write(i32 %0, i32* %2, i32 4)
%5 = icmp ult i32 %4, 4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @close(i32 %0)
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init(double *, double *, int);
int /*<<< orphan*/ vec_mult_ref(double *, double *, double *, int);
void foo_ref(double *p0, double *v1, double *v2, int N) {
  init(v1, v2, N);
  vec_mult_ref(p0, v1, v2, N);
}


x86 assembly (clang, -O0):
<foo_ref>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <init@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1040 <vec_mult_ref@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_ref>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%rbx
mov    %rsi,%rbp
mov    %rdi,%r15
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
call   1030 <init@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <vec_mult_ref@plt>

LLVM IR (-O0):
define void @foo_ref(double* %0, double* %1, double* %2, i32 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store i32 %3, i32* %8
%9 = load double*, double** %6
%10 = load double*, double** %7
%11 = load i32, i32* %8
%12 = call i32 @init(double* %9, double* %10, i32 %11)
%13 = load double*, double** %5
%14 = load double*, double** %6
%15 = load double*, double** %7
%16 = load i32, i32* %8
%17 = call i32 @vec_mult_ref(double* %13, double* %14, double* %15, i32 %16)
ret void
}

LLVM IR (-O2):
define void @foo_ref(double* %0, double* %1, double* %2, i32 %3) {
%5 = tail call i32 @init(double* %1, double* %2, i32 %3)
%6 = tail call i32 @vec_mult_ref(double* %0, double* %1, double* %2, i32 %3)
ret void
}
int char_is_tab(int c) { return c == '\t'; }


x86 assembly (clang, -O0):
<char_is_tab>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_is_tab>:
xor    %eax,%eax
cmp    $0x9,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @char_is_tab(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 9
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @char_is_tab(i32 %0) {
%2 = icmp eq i32 %0, 9
%3 = zext i1 %2 to i32
ret i32 %3
}
__attribute__((no)) long int syscall_0(long int syscall_no) {
  long int ret = syscall_0_asm(syscall_no);
  if ((ret) < 0) {
    libc_fatal(
        "Syscall",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/qdk0901/iotjs-openwrt/refs/heads/master/"
        "deps/jerry/jerry-libc/target/linux/jerry-libc-target.c",
        __func__, 65);
  };
  return ret;
}


x86 assembly (clang, -O0):
<syscall_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <syscall_0_asm@plt>
cltq
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1169 <syscall_0+0x49>
lea    0xeb1(%rip),%rdi
lea    0xeb2(%rip),%rsi
lea    0xf64(%rip),%rdx
mov    $0x41,%ecx
mov    $0x0,%al
call   1030 <libc_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall_0>:
push   %rbx
xor    %eax,%eax
call   1040 <syscall_0_asm@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    114f <syscall_0+0x2f>
lea    0xecb(%rip),%rdi
lea    0xecc(%rip),%rsi
lea    0xf7e(%rip),%rdx
mov    $0x41,%ecx
xor    %eax,%eax
call   1030 <libc_fatal@plt>
movslq %ebx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Syscall\00"
@.str.1 = [185 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/qdk0901/iotjs-openwrt/refs/heads/master/deps/jerry/jerry-libc/target/linux/jerry-libc-target.c\00"
@__func__.syscall_0 = [10 x i8] c"syscall_0\00"
define i64 @syscall_0(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i32 (i64, ...) bitcast (i32 (...)* @syscall_0_asm to i32 (i64, ...)*)(i64 %4)
%6 = sext i32 %5 to i64
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @libc_fatal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.syscall_0, i64 0, i64 0), i32 65)
br label %11
11: ; preds = %9, %1
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
@.str = [8 x i8] c"Syscall\00"
@.str.1 = [185 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/qdk0901/iotjs-openwrt/refs/heads/master/deps/jerry/jerry-libc/target/linux/jerry-libc-target.c\00"
@__func__.syscall_0 = [10 x i8] c"syscall_0\00"
define i64 @syscall_0(i64 %0) {
%2 = tail call i32 (i64, ...) bitcast (i32 (...)* @syscall_0_asm to i32 (i64, ...)*)(i64 %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @libc_fatal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.syscall_0, i64 0, i64 0), i32 65)
br label %6
6: ; preds = %4, %1
%7 = sext i32 %2 to i64
ret i64 %7
}
__float128 from_sign_int_load_n(int *a, long n) { return (__float128)a[n]; }


x86 assembly (clang, -O0):
<from_sign_int_load_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1130 <__floatsitf>
add    $0x10,%rsp
pop    %rbp
ret
cs nopw 0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<from_sign_int_load_n>:
push   %rax
mov    (%rdi,%rsi,4),%edi
call   1110 <__floatsitf>
pop    %rax
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define fp128 @from_sign_int_load_n(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = getelementptr inbounds i32, i32* %5, i64 %6
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to fp128
ret fp128 %9
}

LLVM IR (-O2):
define fp128 @from_sign_int_load_n(i32* nocapture %0, i64 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 %1
%4 = load i32, i32* %3
%5 = sitofp i32 %4 to fp128
ret fp128 %5
}
/* Variables and functions */
int /*<<< orphan*/ MD5_Transform(int *, int const *);
int main() {
  int buf[4];
  int const in[16];
  MD5_Transform(buf, in);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x10(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <MD5_Transform@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
mov    %rsp,%rdi
lea    0x10(%rsp),%rsi
call   1030 <MD5_Transform@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [4 x i32]
%2 = alloca [16 x i32]
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%5 = call i32 @MD5_Transform(i32* %3, i32* %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [4 x i32]
%2 = alloca [16 x i32]
%3 = bitcast [4 x i32]* %1 to i8*
%4 = bitcast [16 x i32]* %2 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%7 = call i32 @MD5_Transform(i32* %5, i32* %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x67() {
  Assert_real((isupper(103) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              520, ("isupper should be 0 for g"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x67>:
push   %rax
mov    $0x67,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x208,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for g\00"
define void @t_isupper_0x67() {
%1 = call i64 @isupper(i32 103)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 520, 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for g\00"
define void @t_isupper_0x67() {
%1 = tail call i64 @isupper(i32 103)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 520, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ VerifyScanningFloats();
scalar_t__ VerifyScanningIntegers();
scalar_t__ VerifyScanningRegression();
scalar_t__ VerifyScanningStrings();
int VerifyScanning(void) {
  int nerrors = 0;
  nerrors += VerifyScanningIntegers();
  nerrors += VerifyScanningFloats();
  nerrors += VerifyScanningStrings();
  nerrors += VerifyScanningRegression();
  return nerrors;
}


x86 assembly (clang, -O0):
<VerifyScanning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <VerifyScanningIntegers@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <VerifyScanningFloats@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <VerifyScanningStrings@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <VerifyScanningRegression@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VerifyScanning>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1060 <VerifyScanningIntegers@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1050 <VerifyScanningFloats@plt>
mov    %rax,%r15
add    %r14d,%r15d
xor    %eax,%eax
call   1040 <VerifyScanningStrings@plt>
mov    %rax,%rbx
add    %r15d,%ebx
xor    %eax,%eax
call   1030 <VerifyScanningRegression@plt>
add    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @VerifyScanning() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @VerifyScanningIntegers()
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = add nsw i64 %4, %2
%6 = trunc i64 %5 to i32
store i32 %6, i32* %1
%7 = call i64 (...) @VerifyScanningFloats()
%8 = load i32, i32* %1
%9 = sext i32 %8 to i64
%10 = add nsw i64 %9, %7
%11 = trunc i64 %10 to i32
store i32 %11, i32* %1
%12 = call i64 (...) @VerifyScanningStrings()
%13 = load i32, i32* %1
%14 = sext i32 %13 to i64
%15 = add nsw i64 %14, %12
%16 = trunc i64 %15 to i32
store i32 %16, i32* %1
%17 = call i64 (...) @VerifyScanningRegression()
%18 = load i32, i32* %1
%19 = sext i32 %18 to i64
%20 = add nsw i64 %19, %17
%21 = trunc i64 %20 to i32
store i32 %21, i32* %1
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
define i32 @VerifyScanning() {
%1 = tail call i64 (...) @VerifyScanningIntegers()
%2 = tail call i64 (...) @VerifyScanningFloats()
%3 = add i64 %2, %1
%4 = tail call i64 (...) @VerifyScanningStrings()
%5 = add i64 %3, %4
%6 = tail call i64 (...) @VerifyScanningRegression()
%7 = add i64 %5, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ free_double_int(int **, int);
int /*<<< orphan*/ free_triple_char(char ***, int, int *);
void free_simu_var(int *nb_var_simu, int **varSizeTab, char ***varNameTab,
                   char ***typeTab) {
  free_triple_char(varNameTab, 4, nb_var_simu);
  free_triple_char(typeTab, 4, nb_var_simu);
  free_double_int(varSizeTab, 4);
  free(nb_var_simu);
}


x86 assembly (clang, -O0):
<free_simu_var>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x4,%esi
call   1050 <free_triple_char@plt>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x4,%esi
call   1050 <free_triple_char@plt>
mov    -0x10(%rbp),%rdi
mov    $0x4,%esi
call   1040 <free_double_int@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_simu_var>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdx,%rdi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1050 <free_triple_char@plt>
mov    %r15,%rdi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1050 <free_triple_char@plt>
mov    %r14,%rdi
mov    $0x4,%esi
call   1040 <free_double_int@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_simu_var(i32* %0, i32** %1, i8*** %2, i8*** %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i8***
%8 = alloca i8***
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i8*** %2, i8**** %7
store i8*** %3, i8**** %8
%9 = load i8***, i8**** %7
%10 = load i32*, i32** %5
%11 = call i32 @free_triple_char(i8*** %9, i32 4, i32* %10)
%12 = load i8***, i8**** %8
%13 = load i32*, i32** %5
%14 = call i32 @free_triple_char(i8*** %12, i32 4, i32* %13)
%15 = load i32**, i32*** %6
%16 = call i32 @free_double_int(i32** %15, i32 4)
%17 = load i32*, i32** %5
%18 = call i32 @free(i32* %17)
ret void
}

LLVM IR (-O2):
define void @free_simu_var(i32* %0, i32** %1, i8*** %2, i8*** %3) {
%5 = tail call i32 @free_triple_char(i8*** %2, i32 4, i32* %0)
%6 = tail call i32 @free_triple_char(i8*** %3, i32 4, i32* %0)
%7 = tail call i32 @free_double_int(i32** %1, i32 4)
%8 = tail call i32 @free(i32* %0)
ret void
}