xunge/DecIR huggingface dataset:
/* Variables and functions */
double my_parse_double(char const *);
double my_parse_double0(const char *string) {
  if (string == NULL || string[0] == '\0')
    return 0;
  return my_parse_double(string);
}


x86 assembly (clang, -O0):
<my_parse_double0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1137 <my_parse_double0+0x27>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1144 <my_parse_double0+0x34>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1152 <my_parse_double0+0x42>
mov    -0x10(%rbp),%rdi
call   1030 <my_parse_double@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_parse_double0>:
test   %rdi,%rdi
je     111f <my_parse_double0+0xf>
cmpb   $0x0,(%rdi)
je     111f <my_parse_double0+0xf>
jmp    1030 <my_parse_double@plt>
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @my_parse_double0(i8* %0) {
%2 = alloca double
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %6, %1
store double 0.000000e+00, double* %2
br label %16
13: ; preds = %6
%14 = load i8*, i8** %3
%15 = call double @my_parse_double(i8* %14)
store double %15, double* %2
br label %16
16: ; preds = %13, %12
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @my_parse_double0(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call double @my_parse_double(i8* %0)
br label %8
8: ; preds = %1, %3, %6
%9 = phi double [ %7, %6 ], [ 0.000000e+00, %3 ], [ 0.000000e+00, %1 ]
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, char *);
void print_heading(char *filename, unsigned page_number) {
  printf("[Page %u] %s\n", page_number, filename);
}


x86 assembly (clang, -O0):
<print_heading>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_heading>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"[Page %u] %s\0A\00"
define void @print_heading(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"[Page %u] %s\0A\00"
define void @print_heading(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %0)
ret void
}
/* Variables and functions */
int asprintf(char **, char *, char *, char *);
int /*<<< orphan*/ err(int, char *);
char *setlocalenv_nomangle(char *format, char *name, char *value) {
  char *result;
  if (asprintf(&result, format, name, value) == -1)
    err(1, "asprintf");
  return result;
}


x86 assembly (clang, -O0):
<setlocalenv_nomangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x20(%rbp),%rdi
call   1040 <asprintf@plt>
cmp    $0xffffffff,%eax
jne    1163 <setlocalenv_nomangle+0x43>
mov    $0x1,%edi
lea    0xea2(%rip),%rsi
call   1030 <err@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setlocalenv_nomangle>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1040 <asprintf@plt>
cmp    $0xffffffff,%eax
jne    1148 <setlocalenv_nomangle+0x28>
lea    0xec2(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"asprintf\00"
define i8* @setlocalenv_nomangle(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = call i32 @asprintf(i8** %4, i8* %0, i8* %1, i8* %2)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %3
%11 = load i8*, i8** %4
ret i8* %11
}
/* Variables and functions */
int floor(double);
void floor_w_d(double *source, int *dest) { *dest = floor(*source); }


x86 assembly (clang, -O0):
<floor_w_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <floor@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor_w_d>:
push   %rbx
mov    %rsi,%rbx
movsd  (%rdi),%xmm0
call   1030 <floor@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @floor_w_d(double* nocapture %0, i32* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = tail call i32 @floor(double %3)
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo2();
int /*<<< orphan*/ putchar(char);
int foo3(void) {
  foo2();
  putchar('a');
  return 0;
}


x86 assembly (clang, -O0):
<foo3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <foo2@plt>
mov    $0x61,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo3>:
push   %rax
xor    %eax,%eax
call   1040 <foo2@plt>
mov    $0x61,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @foo3() {
%1 = call i32 (...) @foo2()
%2 = call i32 @putchar(i8 signext 97)
ret i32 0
}

LLVM IR (-O2):
define i32 @foo3() {
%1 = tail call i32 (...) @foo2()
%2 = tail call i32 @putchar(i8 signext 97)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memfreeheap(char *, char *, int);
void conn_destroy_resp_byte(char *resp) {
  ;
  memfreeheap(resp,
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/fatihky2/maxtable/refs/heads/master/"
              "common/src/netconn.c",
              223);
}


x86 assembly (clang, -O0):
<conn_destroy_resp_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0xdf,%edx
call   1030 <memfreeheap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conn_destroy_resp_byte>:
lea    0xee9(%rip),%rsi
mov    $0xdf,%edx
jmp    1030 <memfreeheap@plt>

LLVM IR (-O0):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fatihky2/maxtable/refs/heads/master/common/src/netconn.c\00"
define void @conn_destroy_resp_byte(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @memfreeheap(i8* %3, i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 223)
ret void
}

LLVM IR (-O2):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fatihky2/maxtable/refs/heads/master/common/src/netconn.c\00"
define void @conn_destroy_resp_byte(i8* %0) {
%2 = tail call i32 @memfreeheap(i8* %0, i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 223)
ret void
}
void FIPS_selftest_check() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
time_t time(time_t *tloc) {
  assert(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @time(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @assert(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @time(i32* nocapture readnone %0) {
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
int double_sort_up(const void *_a, const void *_b) {
  double a = *((double *)_a);
  double b = *((double *)_b);
  if (a < b)
    return -1;
  if (a == b)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<double_sort_up>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1146 <double_sort_up+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    116f <double_sort_up+0x6f>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jne    1168 <double_sort_up+0x68>
jp     1168 <double_sort_up+0x68>
movl   $0x0,-0x4(%rbp)
jmp    116f <double_sort_up+0x6f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_sort_up>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
movapd %xmm0,%xmm2
cmpneqsd %xmm1,%xmm2
movq   %xmm2,%rcx
and    $0x1,%ecx
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @double_sort_up(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
store double %10, double* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
store double %13, double* %7
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fcmp olt double %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fcmp oeq double %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 0, i32* %3
br label %24
23: ; preds = %18
store i32 1, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @double_sort_up(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp une double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int rmdir(char *);
int ILibFileDir_DeleteDir(char *path) { return (rmdir(path)); }


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

x86 assembly (clang, -O2):
<ILibFileDir_DeleteDir>:
jmp    1030 <rmdir@plt>

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

LLVM IR (-O2):
define i32 @ILibFileDir_DeleteDir(i8* nocapture %0) {
%2 = tail call i32 @rmdir(i8* %0)
ret i32 %2
}
unsigned char _test_premature_read(int s, int *p) {
  switch (s) {
  case -1:
    return *p * 7 - 3;
  case 0:
    return 0;
  case 1:
    return *p * 7 + 3;
  default:
    return *p * 7;
  }
}


x86 assembly (clang, -O0):
<_test_premature_read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0xffffffff,%eax
je     1140 <_test_premature_read+0x40>
jmp    111f <_test_premature_read+0x1f>
mov    -0x14(%rbp),%eax
test   %eax,%eax
je     1152 <_test_premature_read+0x52>
jmp    112f <_test_premature_read+0x2f>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
je     115b <_test_premature_read+0x5b>
jmp    116d <_test_premature_read+0x6d>
mov    -0x10(%rbp),%rax
imul   $0x7,(%rax),%eax
sub    $0x3,%eax
mov    %al,-0x1(%rbp)
jmp    1177 <_test_premature_read+0x77>
movb   $0x0,-0x1(%rbp)
jmp    1177 <_test_premature_read+0x77>
mov    -0x10(%rbp),%rax
imul   $0x7,(%rax),%eax
add    $0x3,%eax
mov    %al,-0x1(%rbp)
jmp    1177 <_test_premature_read+0x77>
mov    -0x10(%rbp),%rax
imul   $0x7,(%rax),%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_test_premature_read>:
cmp    $0x1,%edi
je     111c <_test_premature_read+0x1c>
test   %edi,%edi
je     112a <_test_premature_read+0x2a>
cmp    $0xffffffff,%edi
jne    112d <_test_premature_read+0x2d>
mov    (%rsi),%ecx
lea    0x0(,%rcx,8),%eax
sub    %ecx,%eax
add    $0xfd,%al
ret
mov    (%rsi),%ecx
lea    0x0(,%rcx,8),%eax
sub    %ecx,%eax
add    $0x3,%al
ret
xor    %eax,%eax
ret
mov    (%rsi),%ecx
lea    0x0(,%rcx,8),%eax
sub    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @_test_premature_read(i32 %0, i32* %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
%6 = load i32, i32* %4
switch i32 %6, label %20 [
i32 -1, label %7
i32 0, label %13
i32 1, label %14
]
7: ; preds = %2
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 7
%11 = sub nsw i32 %10, 3
%12 = trunc i32 %11 to i8
store i8 %12, i8* %3
br label %25
13: ; preds = %2
store i8 0, i8* %3
br label %25
14: ; preds = %2
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
%17 = mul nsw i32 %16, 7
%18 = add nsw i32 %17, 3
%19 = trunc i32 %18 to i8
store i8 %19, i8* %3
br label %25
20: ; preds = %2
%21 = load i32*, i32** %5
%22 = load i32, i32* %21
%23 = mul nsw i32 %22, 7
%24 = trunc i32 %23 to i8
store i8 %24, i8* %3
br label %25
25: ; preds = %20, %14, %13, %7
%26 = load i8, i8* %3
ret i8 %26
}

LLVM IR (-O2):
define zeroext i8 @_test_premature_read(i32 %0, i32* nocapture %1) {
switch i32 %0, label %13 [
i32 -1, label %3
i32 0, label %17
i32 1, label %8
]
3: ; preds = %2
%4 = load i32, i32* %1
%5 = trunc i32 %4 to i8
%6 = mul i8 %5, 7
%7 = add i8 %6, -3
br label %17
8: ; preds = %2
%9 = load i32, i32* %1
%10 = trunc i32 %9 to i8
%11 = mul i8 %10, 7
%12 = add i8 %11, 3
br label %17
13: ; preds = %2
%14 = load i32, i32* %1
%15 = trunc i32 %14 to i8
%16 = mul i8 %15, 7
br label %17
17: ; preds = %2, %13, %8, %3
%18 = phi i8 [ %16, %13 ], [ %12, %8 ], [ %7, %3 ], [ 0, %2 ]
ret i8 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ usleep(double);
scalar_t__ xingenc_read_stat(double *);
int main(int argc, char **argv) {
  double current = 0;
  while (1) {
    if (xingenc_read_stat(&current) == 0)
      printf("[P %f]\n", current);
    usleep(0.5 * 1000000);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
call   1040 <xingenc_read_stat@plt>
cmp    $0x0,%rax
jne    1172 <main+0x42>
movsd  -0x18(%rbp),%xmm0
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe86(%rip),%xmm0
call   1050 <usleep@plt>
jmp    114e <main+0x1e>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rbx
lea    0xec2(%rip),%r14
jmp    115d <main+0x2d>
nopl   0x0(%rax,%rax,1)
movsd  0xea8(%rip),%xmm0
call   1050 <usleep@plt>
mov    %rbx,%rdi
call   1040 <xingenc_read_stat@plt>
test   %rax,%rax
jne    1150 <main+0x20>
movsd  (%rsp),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [8 x i8] c"[P %f]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 0.000000e+00, double* %6
br label %7
7: ; preds = %2, %13
%8 = call i64 @xingenc_read_stat(double* %6)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load double, double* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %11)
br label %13
13: ; preds = %10, %7
%14 = call i32 @usleep(double 5.000000e+05)
br label %7
}

LLVM IR (-O2):
@.str = [8 x i8] c"[P %f]\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
store double 0.000000e+00, double* %3
br label %5
5: ; preds = %11, %2
%6 = call i64 @xingenc_read_stat(double* %3)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load double, double* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %9)
br label %11
11: ; preds = %8, %5
%12 = call i32 @usleep(double 5.000000e+05)
br label %5
}
float derivative_sigtanh(float y) {
  return (1.0 * 1.0 / 1.0) * (1.0 - y) * (1.0 + y);
}


x86 assembly (clang, -O0):
<derivative_sigtanh>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xec5(%rip),%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<derivative_sigtanh>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @derivative_sigtanh(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fsub double 1.000000e+00, %4
%6 = fmul double 1.000000e+00, %5
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fadd double 1.000000e+00, %8
%10 = fmul double %6, %9
%11 = fptrunc double %10 to float
ret float %11
}

LLVM IR (-O2):
define float @derivative_sigtanh(float %0) {
%2 = fpext float %0 to double
%3 = fsub double 1.000000e+00, %2
%4 = fadd double %2, 1.000000e+00
%5 = fmul double %3, %4
%6 = fptrunc double %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ hotel_stack();
int main(void) {
  hotel_stack();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hotel_stack()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
void func1(int x) {
  printf("endereço de x: %p\n", (void *)&x);
  x = 9 * x;
  printf("endereço de x: %p\n", (void *)&x);
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rsi
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
imul   $0x9,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func1>:
push   %r14
push   %rbx
push   %rax
mov    %edi,0x4(%rsp)
lea    0xee1(%rip),%rbx
lea    0x4(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
lea    (%rax,%rax,8),%eax
mov    %eax,0x4(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [20 x i8] c"endere\C3\A7o de x: %p\0A\00"
define void @func1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* %2
%6 = mul nsw i32 9, %5
store i32 %6, i32* %2
%7 = bitcast i32* %2 to i8*
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"endere\C3\A7o de x: %p\0A\00"
define void @func1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* %2
%6 = mul nsw i32 %5, 9
store i32 %6, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ blue;
};
typedef TYPE_1__ XColor;

/* Variables and functions */
unsigned short get_XColor_blue(void *_p) {
  return (unsigned short)((XColor *)_p)->blue;
}


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

x86 assembly (clang, -O2):
<get_XColor_blue>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define zeroext i16 @get_XColor_blue(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void die(const char *message) {
  fprintf(stderr, "Error: %s.\n", message);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"Error: %s.\0A\00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"Error: %s.\0A\00"
define void @die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct aFILE {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __fpurge(int /*<<< orphan*/);
int /*<<< orphan*/ _get_actual_fp(struct aFILE *);
int my_fpurge(struct aFILE *fp) {
  __fpurge(_get_actual_fp(fp));
  return 0;
}


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

x86 assembly (clang, -O2):
<my_fpurge>:
push   %rax
call   1040 <_get_actual_fp@plt>
mov    %eax,%edi
call   1030 <__fpurge@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.aFILE = type { i32 }
define i32 @my_fpurge(%struct.aFILE* %0) {
%2 = tail call i32 @_get_actual_fp(%struct.aFILE* %0)
%3 = tail call i32 @__fpurge(i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errLevel(int *);
void err_level_(int *const LEVEL) {
  int level;
  errLevel(&level);
  *LEVEL = level;
}


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

x86 assembly (clang, -O2):
<err_level_>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
call   1030 <errLevel@plt>
mov    0xc(%rsp),%eax
mov    %eax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @err_level_(i32* nocapture writeonly %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @errLevel(i32* %2)
%5 = load i32, i32* %2
store i32 %5, i32* %0
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t lswaps(uint16_t x) { return ((x & 0xff) << 8) | ((x >> 8) & 0xff); }


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

x86 assembly (clang, -O2):
<lswaps>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @lswaps(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 8
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = and i32 %7, 255
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @lswaps(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %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__ {
  unsigned long serial;
};
struct TYPE_4__ {
  TYPE_1__ xmaprequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xmaprequest_serial(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xmaprequest.serial = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xmaprequest_serial>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEvent_xmaprequest_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *lowercase(char *);
int strcmp(char *, char *);
int strcmp_case_insensitive(char *a, char *b) {
  char *a_low = lowercase(a);
  char *b_low = lowercase(b);
  int ret = strcmp(a_low, b_low);
  free(a_low);
  free(b_low);
  return ret;
}


x86 assembly (clang, -O0):
<strcmp_case_insensitive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <lowercase@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <lowercase@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcmp@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_case_insensitive>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1050 <lowercase@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1050 <lowercase@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %rax,%rsi
call   1040 <strcmp@plt>
mov    %eax,%ebp
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @strcmp_case_insensitive(i8* %0, i8* %1) {
%3 = tail call i8* @lowercase(i8* %0)
%4 = tail call i8* @lowercase(i8* %1)
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(1) %4)
%6 = tail call i32 @free(i8* %3)
%7 = tail call i32 @free(i8* %4)
ret i32 %5
}
int isEmptyString(char *string) { return (string[0] == '\0'); }


x86 assembly (clang, -O0):
<isEmptyString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isEmptyString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @isEmptyString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct sockaddr_in6 {
  int sin6_scope_id;
  int /*<<< orphan*/ sin6_family;
};

/* Variables and functions */
int /*<<< orphan*/ PF_INET6;
main() {
  struct sockaddr_in6 sa;
  sa.sin6_family = PF_INET6;
  sa.sin6_scope_id = 23;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x17,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sockaddr_in6 = type { i32, i32 }
@PF_INET6 = global i32 0
define i32 @main() {
%1 = alloca %struct.sockaddr_in6
%2 = load i32, i32* @PF_INET6
%3 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %1, i32 0, i32 1
store i32 %2, i32* %3
%4 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %1, i32 0, i32 0
store i32 23, i32* %4
ret i32 0
}

LLVM IR (-O2):
@PF_INET6 = global i32 0
define i32 @main() {
ret i32 0
}
void g_main_context_remove_poll() {}


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

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

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

LLVM IR (-O2):
define void @g_main_context_remove_poll() {
ret void
}
void two() {}


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

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

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

LLVM IR (-O2):
define void @two() {
ret void
}
int getNextDiff(char s[], int index) {
  int ret = index + 1;
  while (s[ret]) {
    if (s[ret] != s[index]) {
      break;
    }
    ret++;
  }
  return ret;
}


x86 assembly (clang, -O0):
<getNextDiff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1159 <getNextDiff+0x59>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     114b <getNextDiff+0x4b>
jmp    1159 <getNextDiff+0x59>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <getNextDiff+0x14>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNextDiff>:
movslq %esi,%r8
lea    0x1(%r8),%esi
lea    (%r8,%rdi,1),%rdx
add    $0x1,%rdx
nop
mov    %esi,%eax
movzbl (%rdx),%ecx
test   %cl,%cl
je     1126 <getNextDiff+0x26>
lea    0x1(%rax),%esi
add    $0x1,%rdx
cmp    (%rdi,%r8,1),%cl
je     1110 <getNextDiff+0x10>
ret

LLVM IR (-O0):
define i32 @getNextDiff(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
store i32 %7, i32* %5
br label %8
8: ; preds = %30, %2
%9 = load i8*, i8** %3
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = icmp ne i8 %13, 0
br i1 %14, label %15, label %33
15: ; preds = %8
%16 = load i8*, i8** %3
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i8*, i8** %3
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp ne i32 %21, %27
br i1 %28, label %29, label %30
29: ; preds = %15
br label %33
30: ; preds = %15
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
br label %8
33: ; preds = %29, %8
%34 = load i32, i32* %5
ret i32 %34
}

LLVM IR (-O2):
define i32 @getNextDiff(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
br label %5
5: ; preds = %11, %2
%6 = phi i64 [ %7, %11 ], [ %3, %2 ]
%7 = add nsw i64 %6, 1
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %5
%12 = load i8, i8* %4
%13 = icmp eq i8 %9, %12
br i1 %13, label %5, label %14
14: ; preds = %11, %5
%15 = trunc i64 %7 to i32
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void MMfree(void *obj) {
  if (obj != 0) {
    free(obj);
  }
}


x86 assembly (clang, -O0):
<MMfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <MMfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMfree>:
test   %rdi,%rdi
je     111a <MMfree+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @MMfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @MMfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
int *test_func_04(int *p, int c) {
  *--p = c;
  *--p = c;
  return p;
}


x86 assembly (clang, -O0):
<test_func_04>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0xfffffffffffffffc,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,-0x4(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0xfffffffffffffffc,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,-0x4(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_func_04>:
mov    %esi,-0x4(%rdi)
mov    %esi,-0x8(%rdi)
lea    -0x8(%rdi),%rax
ret

LLVM IR (-O0):
define i32* @test_func_04(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i32 -1
store i32* %7, i32** %3
store i32 %5, i32* %7
%8 = load i32, i32* %4
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i32 -1
store i32* %10, i32** %3
store i32 %8, i32* %10
%11 = load i32*, i32** %3
ret i32* %11
}

LLVM IR (-O2):
define i32* @test_func_04(i32* writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 -1
store i32 %1, i32* %3
%4 = getelementptr inbounds i32, i32* %0, i64 -2
store i32 %1, i32* %4
ret i32* %4
}
/* Variables and functions */
scalar_t__ send_command_to_variable_server(int, char *);
int freeze(int socket) {
  if (send_command_to_variable_server(socket, "trick.exec_freeze()") < 0) {
    return -1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<freeze>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <send_command_to_variable_server@plt>
cmp    $0x0,%rax
jge    1140 <freeze+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1147 <freeze+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeze>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <send_command_to_variable_server@plt>
sar    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"trick.exec_freeze()\00"
define i32 @freeze(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @send_command_to_variable_server(i32 %4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 -1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [20 x i8] c"trick.exec_freeze()\00"
define i32 @freeze(i32 %0) {
%2 = tail call i64 @send_command_to_variable_server(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = ashr i64 %2, 63
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *GetUserName(int User) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @GetUserName(i32 %0) {
ret i8* null
}
int ls2h_hda_create_hwdep(struct hda_codec *codec) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.hda_codec = type opaque
define i32 @ls2h_hda_create_hwdep(%struct.hda_codec* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int printargs(struct tcb *);
int sys_ipc(struct tcb *tcp) { return printargs(tcp); }


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

x86 assembly (clang, -O2):
<sys_ipc>:
jmp    1030 <printargs@plt>

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

LLVM IR (-O2):
%struct.tcb = type { i32 }
define i32 @sys_ipc(%struct.tcb* %0) {
%2 = tail call i32 @printargs(%struct.tcb* %0)
ret i32 %2
}
void modif_rear_unit2MODIF_B() {}


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

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

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

LLVM IR (-O2):
define void @modif_rear_unit2MODIF_B() {
ret void
}
/* Variables and functions */
int check2();
int /*<<< orphan*/ strcpy(char *, char *);
void test2(char *s) { strcpy(s, "foobarbaz" + check2()); }


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <check2@plt>
mov    -0x10(%rbp),%rdi
cltq
lea    0xeb8(%rip),%rsi
add    %rax,%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <check2@plt>
cltq
lea    0xecc(%rip),%rsi
add    %rax,%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"foobarbaz\00"
define void @test2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (...) @check2()
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 %5
%7 = call i32 @strcpy(i8* %3, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"foobarbaz\00"
define void @test2(i8* %0) {
%2 = tail call i32 (...) @check2()
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds [10 x i8], [10 x i8]* @.str, i64 0, i64 %3
%5 = tail call i32 @strcpy(i8* %0, i8* %4)
ret void
}
/* Variables and functions */
unsigned long PRCMHIBRegRead(int);
int /*<<< orphan*/ PRCMHIBRegWrite(int, unsigned long);
void PRCMHibernateWakeupSourceEnable(unsigned long ulHIBWakupSrc) {
  unsigned long ulRegValue;
  ulRegValue = PRCMHIBRegRead(0x4402F800 + 0x00000018);
  ulRegValue |= (ulHIBWakupSrc & 0x1);
  PRCMHIBRegWrite(0x4402F800 + 0x00000018, ulRegValue);
  ulRegValue = PRCMHIBRegRead(0x4402F800 + 0x00000404);
  ulRegValue |= ((ulHIBWakupSrc >> 16) & 0xFF);
  PRCMHIBRegWrite(0x4402F800 + 0x00000404, ulRegValue);
}


x86 assembly (clang, -O0):
<PRCMHibernateWakeupSourceEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4402f818,%edi
call   1040 <PRCMHIBRegRead@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x4402f818,%edi
call   1030 <PRCMHIBRegWrite@plt>
mov    $0x4402fc04,%edi
call   1040 <PRCMHIBRegRead@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x4402fc04,%edi
call   1030 <PRCMHIBRegWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRCMHibernateWakeupSourceEnable>:
push   %rbx
mov    %rdi,%rbx
mov    $0x4402f818,%edi
call   1040 <PRCMHIBRegRead@plt>
mov    %ebx,%esi
and    $0x1,%esi
or     %rax,%rsi
mov    $0x4402f818,%edi
call   1030 <PRCMHIBRegWrite@plt>
mov    $0x4402fc04,%edi
call   1040 <PRCMHIBRegRead@plt>
shr    $0x10,%ebx
movzbl %bl,%esi
or     %rax,%rsi
mov    $0x4402fc04,%edi
pop    %rbx
jmp    1030 <PRCMHIBRegWrite@plt>

LLVM IR (-O0):
define void @PRCMHibernateWakeupSourceEnable(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = call i64 @PRCMHIBRegRead(i32 1141045272)
store i64 %4, i64* %3
%5 = load i64, i64* %2
%6 = and i64 %5, 1
%7 = load i64, i64* %3
%8 = or i64 %7, %6
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = call i32 @PRCMHIBRegWrite(i32 1141045272, i64 %9)
%11 = call i64 @PRCMHIBRegRead(i32 1141046276)
store i64 %11, i64* %3
%12 = load i64, i64* %2
%13 = lshr i64 %12, 16
%14 = and i64 %13, 255
%15 = load i64, i64* %3
%16 = or i64 %15, %14
store i64 %16, i64* %3
%17 = load i64, i64* %3
%18 = call i32 @PRCMHIBRegWrite(i32 1141046276, i64 %17)
ret void
}

LLVM IR (-O2):
define void @PRCMHibernateWakeupSourceEnable(i64 %0) {
%2 = tail call i64 @PRCMHIBRegRead(i32 1141045272)
%3 = and i64 %0, 1
%4 = or i64 %2, %3
%5 = tail call i32 @PRCMHIBRegWrite(i32 1141045272, i64 %4)
%6 = tail call i64 @PRCMHIBRegRead(i32 1141046276)
%7 = lshr i64 %0, 16
%8 = and i64 %7, 255
%9 = or i64 %6, %8
%10 = tail call i32 @PRCMHIBRegWrite(i32 1141046276, i64 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tfp_printf(char *);
void exit(int status) { tfp_printf("exit called, unimplemented!\n"); }


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

x86 assembly (clang, -O2):
<exit>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <tfp_printf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"exit called, unimplemented!\0A\00"
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @tfp_printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
unreachable
}

LLVM IR (-O2):
@.str = [29 x i8] c"exit called, unimplemented!\0A\00"
define void @exit(i32 %0) {
%2 = tail call i32 @tfp_printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
int main(void) { errx(1, "not implemented"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <errx@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
call   1030 <errx@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"not implemented\00"
define i32 @main() {
%1 = call i32 @errx(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"not implemented\00"
define i32 @main() {
%1 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
char *dgettext(const char *domainname, const char *msgid) { return msgid; }


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

x86 assembly (clang, -O2):
<dgettext>:
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i8* @dgettext(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
ret i8* %5
}

LLVM IR (-O2):
define i8* @dgettext(i8* nocapture readnone %0, i8* readnone returned %1) {
ret i8* %1
}