xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ lr_eval_string(char *);
int /*<<< orphan*/ lr_output_message(char *, int /*<<< orphan*/);
int /*<<< orphan*/ lr_save_float(double, char *, int);
Action() {
  lr_save_float(123.456, "myVar", 2);
  lr_output_message("%s", lr_eval_string("{myVar}"));
  return 0;
}


x86 assembly (clang, -O0):
<Action>:
push   %rbp
mov    %rsp,%rbp
movsd  0xec4(%rip),%xmm0
lea    0xec5(%rip),%rdi
mov    $0x2,%esi
call   1050 <lr_save_float@plt>
lea    0xebd(%rip),%rdi
call   1030 <lr_eval_string@plt>
mov    %eax,%esi
lea    0xeac(%rip),%rdi
call   1040 <lr_output_message@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Action>:
push   %rax
lea    0xed0(%rip),%rdi
movsd  0xec0(%rip),%xmm0
mov    $0x2,%esi
call   1050 <lr_save_float@plt>
lea    0xec0(%rip),%rdi
call   1030 <lr_eval_string@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1040 <lr_output_message@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"myVar\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [8 x i8] c"{myVar}\00"
define i32 @Action() {
%1 = call i32 @lr_save_float(double 1.234560e+02, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2)
%2 = call i32 @lr_eval_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @lr_output_message(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"myVar\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [8 x i8] c"{myVar}\00"
define i32 @Action() {
%1 = tail call i32 @lr_save_float(double 1.234560e+02, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2)
%2 = tail call i32 @lr_eval_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @lr_output_message(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
void gtk_tree_selection_set_mode() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_selection_set_mode() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vmareas_init();
void transform_init(void) { vmareas_init(); }


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

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

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

LLVM IR (-O2):
define void @transform_init() {
%1 = tail call i32 (...) @vmareas_init()
ret void
}
unsigned long spi_xmit(unsigned long val) {
  *((volatile unsigned long *)(0xb0000000 + 0x00)) = val;
  *((volatile unsigned long *)(0xb0000000 + 0x04)) |= 0x00000001;
  while (*((volatile unsigned long *)(0xb0000000 + 0x04)) & 0x00000001)
    ;
  return *((volatile unsigned long *)(0xb0000000 + 0x00));
}


x86 assembly (clang, -O0):
<spi_xmit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0xb0000000,%eax
mov    %rcx,(%rax)
mov    $0xb0000004,%eax
mov    (%rax),%rcx
or     $0x1,%rcx
mov    $0xb0000004,%eax
mov    %rcx,(%rax)
mov    $0xb0000004,%eax
mov    (%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1143 <spi_xmit+0x43>
jmp    1128 <spi_xmit+0x28>
mov    $0xb0000000,%eax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_xmit>:
mov    $0xb0000004,%eax
mov    %rdi,-0x4(%rax)
orq    $0x1,(%rax)
nopl   (%rax)
mov    (%rax),%rcx
test   $0x1,%cl
jne    1110 <spi_xmit+0x10>
mov    -0x4(%rax),%rax
ret

LLVM IR (-O0):
define i64 @spi_xmit(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 2952790016 to i64*)
%4 = load volatile i64, i64* inttoptr (i64 2952790020 to i64*)
%5 = or i64 %4, 1
store volatile i64 %5, i64* inttoptr (i64 2952790020 to i64*)
br label %6
6: ; preds = %10, %1
%7 = load volatile i64, i64* inttoptr (i64 2952790020 to i64*)
%8 = and i64 %7, 1
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
br label %6
11: ; preds = %6
%12 = load volatile i64, i64* inttoptr (i64 2952790016 to i64*)
ret i64 %12
}

LLVM IR (-O2):
define i64 @spi_xmit(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 2952790016 to i64*)
%2 = load volatile i64, i64* inttoptr (i64 2952790020 to i64*)
%3 = or i64 %2, 1
store volatile i64 %3, i64* inttoptr (i64 2952790020 to i64*)
br label %4
4: ; preds = %4, %1
%5 = load volatile i64, i64* inttoptr (i64 2952790020 to i64*)
%6 = and i64 %5, 1
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4
%9 = load volatile i64, i64* inttoptr (i64 2952790016 to i64*)
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ Com_Error(int /*<<< orphan*/, char *, ...);
void TV_Module_Error(const char *msg) {
  if (msg)
    Com_Error(0, "Game error: %s", msg);
  else
    Com_Error(0, "Game error");
}


x86 assembly (clang, -O0):
<TV_Module_Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <TV_Module_Error+0x30>
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <Com_Error@plt>
jmp    1150 <TV_Module_Error+0x40>
xor    %edi,%edi
lea    0xec6(%rip),%rsi
mov    $0x0,%al
call   1030 <Com_Error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TV_Module_Error>:
test   %rdi,%rdi
je     1128 <TV_Module_Error+0x18>
mov    %rdi,%rdx
lea    0xee1(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <Com_Error@plt>
lea    0xee0(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <Com_Error@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Game error: %s\00"
@.str.1 = [11 x i8] c"Game error\00"
define void @TV_Module_Error(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 (i32, i8*, ...) @Com_Error(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %10
8: ; preds = %1
%9 = call i32 (i32, i8*, ...) @Com_Error(i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Game error: %s\00"
@.str.1 = [11 x i8] c"Game error\00"
define void @TV_Module_Error(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (i32, i8*, ...) @Com_Error(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
5: ; preds = %1
%6 = tail call i32 (i32, i8*, ...) @Com_Error(i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bestfit(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ firstfit(int /*<<< orphan*/, int /*<<< orphan*/);
void debug(void) {
  if (0) {
    bestfit(0, 0);
    firstfit(0, 0);
  }
}


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

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

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

LLVM IR (-O2):
define void @debug() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void display_help(void) {
  printf(
      "Usage: "
      "rfdformat"
      " [OPTIONS] MTD-device\n"
      "Formats NOR flash for resident flash disk\n"
      "\n"
      "-h         --help               display this help and exit\n"
      "-V         --version            output version information and exit\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [209 x i8] c"Usage: rfdformat [OPTIONS] MTD-device\0AFormats NOR flash for resident flash disk\0A\0A-h --help display this help and exit\0A-V --version output version information and exit\0A\00"
define void @display_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([209 x i8], [209 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [208 x i8] c"Usage: rfdformat [OPTIONS] MTD-device\0AFormats NOR flash for resident flash disk\0A\0A-h --help display this help and exit\0A-V --version output version information and exit\00"
define void @display_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([208 x i8], [208 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
void mutex_lock(int *lock) { *lock = 1; }


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

x86 assembly (clang, -O2):
<mutex_lock>:
movl   $0x1,(%rdi)
ret

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

LLVM IR (-O2):
define void @mutex_lock(i32* nocapture writeonly %0) {
store i32 1, i32* %0
ret void
}
void adder_close(void *file) { return; }


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

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

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

LLVM IR (-O2):
define void @adder_close(i8* nocapture %0) {
ret void
}
long kernel__Int__prec(long self) {
  long var;
  long var1;
  var1 = self - 1;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<kernel__Int__prec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel__Int__prec>:
lea    -0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @kernel__Int__prec(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = sub nsw i64 %5, 1
store i64 %6, i64* %4
%7 = load i64, i64* %4
store i64 %7, i64* %3
br label %8
8: ; preds = %1
%9 = load i64, i64* %3
ret i64 %9
}

LLVM IR (-O2):
define i64 @kernel__Int__prec(i64 %0) {
%2 = add nsw i64 %0, -1
ret i64 %2
}
void Ctypes_hook_wr_sgn_u8(void) {}


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

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

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

LLVM IR (-O2):
define void @Ctypes_hook_wr_sgn_u8() {
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int strcoll(const char *string1, const char *string2) {
  return strcmp(string1, string2);
}


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

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

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

LLVM IR (-O2):
define i32 @strcoll(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t nor(int32_t reg1, int32_t reg2) { return (~(reg1 | reg2)); }


x86 assembly (clang, -O0):
<nor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nor>:
mov    %edi,%eax
or     %esi,%eax
not    %eax
ret

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

LLVM IR (-O2):
define i32 @nor(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = xor i32 %3, -1
ret i32 %4
}
double modf(double x, double *iptr) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(x);
  (void)(iptr);
  return 0;
}


x86 assembly (clang, -O0):
<modf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modf>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.modf = [5 x i8] c"modf\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @modf(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.modf, i64 0, i64 0))
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%9 = load double, double* %3
%10 = load double*, double** %4
ret double 0.000000e+00
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.modf = [5 x i8] c"modf\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @modf(double %0, double* nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.modf, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret double 0.000000e+00
}
void pollen_math_FloorCeil_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @pollen_math_FloorCeil_targetInit__I() {
ret void
}
/* Type definitions */
struct rusage {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int errno;
scalar_t__ wait3(int *, int /*<<< orphan*/, struct rusage *);
void reap(int ignore) {
  int save_errno = errno;
  while (wait3((int *)NULL, WNOHANG, (struct rusage *)NULL) > 0)
    ;
  errno = save_errno;
}


x86 assembly (clang, -O0):
<reap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rdi
call   1030 <wait3@plt>
cmp    $0x0,%rax
jle    114b <reap+0x3b>
jmp    1127 <reap+0x17>
mov    -0x8(%rbp),%ecx
mov    0x2e83(%rip),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reap>:
push   %rbp
push   %r14
push   %rbx
mov    0x2ebd(%rip),%r14
mov    (%r14),%ebp
mov    0x2ec3(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rbx),%esi
xor    %edi,%edi
xor    %edx,%edx
call   1030 <wait3@plt>
test   %rax,%rax
jg     1130 <reap+0x20>
mov    %ebp,(%r14)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.rusage = type { i32 }
@errno = global i32 0
@WNOHANG = global i32 0
define void @reap(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @errno
store i32 %4, i32* %3
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* @WNOHANG
%7 = call i64 @wait3(i32* null, i32 %6, %struct.rusage* null)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
%11 = load i32, i32* %3
store i32 %11, i32* @errno
ret void
}

LLVM IR (-O2):
%struct.rusage = type { i32 }
@errno = global i32 0
@WNOHANG = global i32 0
define void @reap(i32 %0) {
%2 = load i32, i32* @errno
br label %3
3: ; preds = %3, %1
%4 = load i32, i32* @WNOHANG
%5 = tail call i64 @wait3(i32* null, i32 %4, %struct.rusage* null)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3
store i32 %2, i32* @errno
ret void
}
/* Variables and functions */
scalar_t__ Char_2d_array(int, int);
unsigned char **Uchar_2d_array(int i_size, int j_size) {
  return (
      (unsigned char **)Char_2d_array(i_size, j_size * sizeof(unsigned char)));
}


x86 assembly (clang, -O0):
<Uchar_2d_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
movslq -0x8(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%esi
call   1030 <Char_2d_array@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Uchar_2d_array>:
jmp    1030 <Char_2d_array@plt>

LLVM IR (-O0):
define i8** @Uchar_2d_array(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 1
%9 = trunc i64 %8 to i32
%10 = call i64 @Char_2d_array(i32 %5, i32 %9)
%11 = inttoptr i64 %10 to i8**
ret i8** %11
}

LLVM IR (-O2):
define i8** @Uchar_2d_array(i32 %0, i32 %1) {
%3 = tail call i64 @Char_2d_array(i32 %0, i32 %1)
%4 = inttoptr i64 %3 to i8**
ret i8** %4
}
/* Variables and functions */
int /*<<< orphan*/ CheckRunningInMainThread(char *);
int DoXOPAlert(int, char const *, char const *);
int XOPYesNoAlert(const char *title, const char *message) {
  if (!CheckRunningInMainThread("XOPYesNoAlert"))
    return 2;
  return DoXOPAlert(1505, title, message);
}


x86 assembly (clang, -O0):
<XOPYesNoAlert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <CheckRunningInMainThread@plt>
cmp    $0x0,%eax
jne    1151 <XOPYesNoAlert+0x31>
movl   $0x2,-0x4(%rbp)
jmp    1166 <XOPYesNoAlert+0x46>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x5e1,%edi
call   1040 <DoXOPAlert@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XOPYesNoAlert>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
call   1030 <CheckRunningInMainThread@plt>
test   %eax,%eax
je     1151 <XOPYesNoAlert+0x31>
mov    $0x5e1,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <DoXOPAlert@plt>
mov    $0x2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"XOPYesNoAlert\00"
define i32 @XOPYesNoAlert(i8* %0, i8* %1) {
%3 = tail call i32 @CheckRunningInMainThread(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @DoXOPAlert(i32 1505, i8* %0, i8* %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ 2, %2 ]
ret i32 %8
}
int fun(int i) {
  int s = 1;
  for (i = 1; i <= 5; i++) {
    s = s * i;
  }
  return s;
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jg     1137 <fun+0x37>
mov    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1115 <fun+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @fun(i32 %0) {
ret i32 120
}
int fun1203() { return 1203; }


x86 assembly (clang, -O0):
<fun1203>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4b3,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun1203() {
ret i32 1203
}

LLVM IR (-O2):
define i32 @fun1203() {
ret i32 1203
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  union {
    long l;
    char c[sizeof(long)];
  } u;
  u.l = 1;
  if (u.c[sizeof(long) - 1] == 1)
    printf("big\n");
  else
    printf("little\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x1,%eax
jne    114c <main+0x3c>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
jmp    1158 <main+0x48>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%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):
%union.anon = type { i64 }
@.str = [5 x i8] c"big\0A\00"
@.str.1 = [8 x i8] c"little\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %union.anon
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast %union.anon* %6 to i64*
store i64 1, i64* %7
%8 = bitcast %union.anon* %6 to [8 x i8]*
%9 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 7
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %17
15: ; preds = %2
%16 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %13
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"little\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int test_imm_B9uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xB9 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B9uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 794568949760
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ dcr_read(int, int *);
int mvpstb_video_end(void) {
  int wlr;
  if (dcr_read(0x140 + 0x34, &wlr) < 0)
    return -1;
  if (wlr == 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<mvpstb_video_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x174,%edi
lea    -0x8(%rbp),%rsi
call   1030 <dcr_read@plt>
cmp    $0x0,%rax
jge    113c <mvpstb_video_end+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1159 <mvpstb_video_end+0x49>
cmpl   $0x0,-0x8(%rbp)
jne    1152 <mvpstb_video_end+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1159 <mvpstb_video_end+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvpstb_video_end>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x174,%edi
call   1030 <dcr_read@plt>
xor    %ecx,%ecx
cmpl   $0x0,0x4(%rsp)
sete   %cl
test   %rax,%rax
mov    $0xffffffff,%eax
cmovns %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mvpstb_video_end() {
%1 = alloca i32
%2 = alloca i32
%3 = call i64 @dcr_read(i32 372, i32* %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 -1, i32* %1
br label %11
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %1
br label %11
10: ; preds = %6
store i32 0, i32* %1
br label %11
11: ; preds = %10, %9, %5
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @mvpstb_video_end() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @dcr_read(i32 372, i32* %1)
%4 = icmp slt i64 %3, 0
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = select i1 %4, i32 -1, i32 %7
ret i32 %8
}
void X509V3_get_d2i(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_get_d2i() {
ret void
}
int do_214() { return 214; }


x86 assembly (clang, -O0):
<do_214>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd6,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @do_214() {
ret i32 214
}

LLVM IR (-O2):
define i32 @do_214() {
ret i32 214
}
/* Type definitions */
struct tinyrl {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct tinyrl *);
int /*<<< orphan*/ free(struct tinyrl *);
int /*<<< orphan*/ tinyrl_fini(struct tinyrl *);
void tinyrl_delete(struct tinyrl *this) {
  assert(this);
  if (this) {
    tinyrl_fini(this);
    free(this);
  }
}


x86 assembly (clang, -O0):
<tinyrl_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
cmpq   $0x0,-0x8(%rbp)
je     1162 <tinyrl_delete+0x32>
mov    -0x8(%rbp),%rdi
call   1050 <tinyrl_fini@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tinyrl_delete>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
test   %rbx,%rbx
je     114f <tinyrl_delete+0x1f>
mov    %rbx,%rdi
call   1050 <tinyrl_fini@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.tinyrl = type { i32 }
define void @tinyrl_delete(%struct.tinyrl* %0) {
%2 = alloca %struct.tinyrl*
store %struct.tinyrl* %0, %struct.tinyrl** %2
%3 = load %struct.tinyrl*, %struct.tinyrl** %2
%4 = call i32 @assert(%struct.tinyrl* %3)
%5 = load %struct.tinyrl*, %struct.tinyrl** %2
%6 = icmp ne %struct.tinyrl* %5, null
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load %struct.tinyrl*, %struct.tinyrl** %2
%9 = call i32 @tinyrl_fini(%struct.tinyrl* %8)
%10 = load %struct.tinyrl*, %struct.tinyrl** %2
%11 = call i32 @free(%struct.tinyrl* %10)
br label %12
12: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
%struct.tinyrl = type { i32 }
define void @tinyrl_delete(%struct.tinyrl* %0) {
%2 = tail call i32 @assert(%struct.tinyrl* %0)
%3 = icmp eq %struct.tinyrl* %0, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @tinyrl_fini(%struct.tinyrl* %0)
%6 = tail call i32 @free(%struct.tinyrl* %0)
br label %7
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ luaL_check_lstr(int, int /*<<< orphan*/);
int /*<<< orphan*/ lua_pushobject(int /*<<< orphan*/);
int /*<<< orphan*/ lua_rawgetglobal(int /*<<< orphan*/);
void rawgetglobal(void) {
  lua_pushobject(lua_rawgetglobal((luaL_check_lstr((1), 0))));
}


x86 assembly (clang, -O0):
<rawgetglobal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <luaL_check_lstr@plt>
mov    %eax,%edi
call   1030 <lua_rawgetglobal@plt>
mov    %eax,%edi
call   1050 <lua_pushobject@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rawgetglobal>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <luaL_check_lstr@plt>
mov    %eax,%edi
call   1030 <lua_rawgetglobal@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <lua_pushobject@plt>

LLVM IR (-O0):
define void @rawgetglobal() {
%1 = call i32 @luaL_check_lstr(i32 1, i32 0)
%2 = call i32 @lua_rawgetglobal(i32 %1)
%3 = call i32 @lua_pushobject(i32 %2)
ret void
}

LLVM IR (-O2):
define void @rawgetglobal() {
%1 = tail call i32 @luaL_check_lstr(i32 1, i32 0)
%2 = tail call i32 @lua_rawgetglobal(i32 %1)
%3 = tail call i32 @lua_pushobject(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *programName) {
  printf("usage: %s <options> <input file>\n", programName);
  printf("Options:\n");
  printf("-d\tDebug mode\n");
  printf("\nMade by AndyRoth\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"usage: %s <options> <input file>\0A\00"
@.str.1 = [10 x i8] c"Options:\0A\00"
@.str.2 = [15 x i8] c"-d\09Debug mode\0A\00"
@.str.3 = [19 x i8] c"\0AMade by AndyRoth\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%8 = load i32, i32* @EXIT_SUCCESS
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@.str = [34 x i8] c"usage: %s <options> <input file>\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [9 x i8] c"Options:\00"
@str.4 = [14 x i8] c"-d\09Debug mode\00"
@str.5 = [18 x i8] c"\0AMade by AndyRoth\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.5, i64 0, i64 0))
%6 = load i32, i32* @EXIT_SUCCESS
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ xxx();
int main() { xxx(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @xxx()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @xxx()
ret i32 0
}
extern int sub(int a, int b) { return a - b; }


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

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

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

LLVM IR (-O2):
define i32 @sub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
void tegra_pm_set_cpu_in_lp2(void) {}


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

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

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

LLVM IR (-O2):
define void @tegra_pm_set_cpu_in_lp2() {
ret void
}
/* Variables and functions */
int SerialPrintfP__Putchar__putchar(int);
int PutcharP__Putchar__putchar(int c) {
  int __nesc_result;
  __nesc_result = SerialPrintfP__Putchar__putchar(c);
  return __nesc_result;
}


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

x86 assembly (clang, -O2):
<PutcharP__Putchar__putchar>:
jmp    1030 <SerialPrintfP__Putchar__putchar@plt>

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

LLVM IR (-O2):
define i32 @PutcharP__Putchar__putchar(i32 %0) {
%2 = tail call i32 @SerialPrintfP__Putchar__putchar(i32 %0)
ret i32 %2
}
unsigned int t(unsigned int a) { return ((((a) > (1)) ? (a) : (1))); }


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jbe    111c <t+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <t+0x29>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <t+0x29>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t>:
test   %edi,%edi
mov    $0x1,%eax
cmovne %edi,%eax
ret

LLVM IR (-O0):
define i32 @t(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ugt i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %5
%9 = phi i32 [ %6, %5 ], [ 1, %7 ]
ret i32 %9
}

LLVM IR (-O2):
define i32 @t(i32 %0) {
%2 = icmp ugt i32 %0, 1
%3 = select i1 %2, i32 %0, i32 1
ret i32 %3
}
int ft_str_is_numeric(char *str) {
  char *tmp;
  tmp = str;
  while (*tmp) {
    if (*tmp < '0' || *tmp > '9')
      return (0);
    tmp++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<ft_str_is_numeric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <ft_str_is_numeric+0x5a>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     113d <ft_str_is_numeric+0x3d>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    1149 <ft_str_is_numeric+0x49>
movl   $0x0,-0x4(%rbp)
jmp    1161 <ft_str_is_numeric+0x61>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <ft_str_is_numeric+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_str_is_numeric>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <ft_str_is_numeric+0x23>
add    $0x1,%rdi
nop
add    $0xc6,%cl
cmp    $0xf5,%cl
jbe    1124 <ft_str_is_numeric+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ft_str_is_numeric+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ft_str_is_numeric(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
store i8* %5, i8** %4
br label %6
6: ; preds = %21, %1
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %24
10: ; preds = %6
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp slt i32 %13, 48
br i1 %14, label %20, label %15
15: ; preds = %10
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sgt i32 %18, 57
br i1 %19, label %20, label %21
20: ; preds = %15, %10
store i32 0, i32* %2
br label %25
21: ; preds = %15
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %4
br label %6
24: ; preds = %6
store i32 1, i32* %2
br label %25
25: ; preds = %24, %20
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @ft_str_is_numeric(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = add i8 %8, -58
%11 = icmp ult i8 %10, -10
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
int get_rtc_month(void) {
  (*(volatile unsigned int *)(0x7E005040)) |= (1 << 3);
  (*(volatile unsigned int *)(0x7E005040)) = 1;
  char value = (*(volatile unsigned int *)(0x7E005084));
  int month = ((value >> 4) & 0x1) * 10 + (value & 0xF);
  (*(volatile unsigned int *)(0x7E005040)) = 0;
  return month;
}


x86 assembly (clang, -O0):
<get_rtc_month>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7e005040,%eax
mov    (%rax),%ecx
or     $0x8,%ecx
mov    $0x7e005040,%eax
mov    %ecx,(%rax)
mov    $0x7e005040,%eax
movl   $0x1,(%rax)
mov    $0x7e005084,%eax
mov    (%rax),%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sar    $0x4,%eax
and    $0x1,%eax
imul   $0xa,%eax,%eax
movsbl -0x1(%rbp),%ecx
and    $0xf,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x7e005040,%eax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rtc_month>:
orl    $0x8,0x7e005040
08
movl   $0x1,0x7e005040
mov    0x7e005084,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
and    $0x1,%ecx
lea    (%rcx,%rcx,4),%ecx
and    $0xf,%eax
lea    (%rax,%rcx,2),%eax
movl   $0x0,0x7e005040
ret

LLVM IR (-O0):
define i32 @get_rtc_month() {
%1 = alloca i8
%2 = alloca i32
%3 = load volatile i32, i32* inttoptr (i64 2113949760 to i32*)
%4 = or i32 %3, 8
store volatile i32 %4, i32* inttoptr (i64 2113949760 to i32*)
store volatile i32 1, i32* inttoptr (i64 2113949760 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 2113949828 to i32*)
%6 = trunc i32 %5 to i8
store i8 %6, i8* %1
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
%9 = ashr i32 %8, 4
%10 = and i32 %9, 1
%11 = mul nsw i32 %10, 10
%12 = load i8, i8* %1
%13 = sext i8 %12 to i32
%14 = and i32 %13, 15
%15 = add nsw i32 %11, %14
store i32 %15, i32* %2
store volatile i32 0, i32* inttoptr (i64 2113949760 to i32*)
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @get_rtc_month() {
%1 = load volatile i32, i32* inttoptr (i64 2113949760 to i32*)
%2 = or i32 %1, 8
store volatile i32 %2, i32* inttoptr (i64 2113949760 to i32*)
store volatile i32 1, i32* inttoptr (i64 2113949760 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 2113949828 to i32*)
%4 = lshr i32 %3, 4
%5 = and i32 %4, 1
%6 = mul nuw nsw i32 %5, 10
%7 = and i32 %3, 15
%8 = add nuw nsw i32 %6, %7
store volatile i32 0, i32* inttoptr (i64 2113949760 to i32*)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
int /*<<< orphan*/ printf(char *);
int test_init(ENGINE *e) {
  printf("OTP Test Engine Initializatzion!\r\n");
  OpenSSL_add_all_algorithms();
  return 111;
}


x86 assembly (clang, -O0):
<test_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <OpenSSL_add_all_algorithms@plt>
mov    $0x6f,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_init>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <OpenSSL_add_all_algorithms@plt>
mov    $0x6f,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"OTP Test Engine Initializatzion!\0D\0A\00"
define i32 @test_init(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @OpenSSL_add_all_algorithms()
ret i32 111
}

LLVM IR (-O2):
@str = [34 x i8] c"OTP Test Engine Initializatzion!\0D\00"
define i32 @test_init(i32* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @OpenSSL_add_all_algorithms()
ret i32 111
}
int fn1(int a, int b) {
  int tem1 = a + b;
  int tem2 = a & b;
  return tem1 - tem2;
}


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
mov    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @fn1(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
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = add nsw i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = and i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @fn1(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ EAGAIN;
int /*<<< orphan*/ errno;
int sem_trywait() {
  ;
  errno = EAGAIN;
  return -1;
}


x86 assembly (clang, -O0):
<sem_trywait>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ecc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_trywait>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EAGAIN = global i32 0
@errno = global i32 0
define i32 @sem_trywait() {
%1 = load i32, i32* @EAGAIN
store i32 %1, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EAGAIN = global i32 0
@errno = global i32 0
define i32 @sem_trywait() {
%1 = load i32, i32* @EAGAIN
store i32 %1, i32* @errno
ret i32 -1
}
void trace_exception_handler(unsigned char *addr) {}


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

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

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

LLVM IR (-O2):
define void @trace_exception_handler(i8* nocapture %0) {
ret void
}
int fun289() { return 289; }


x86 assembly (clang, -O0):
<fun289>:
push   %rbp
mov    %rsp,%rbp
mov    $0x121,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun289() {
ret i32 289
}

LLVM IR (-O2):
define i32 @fun289() {
ret i32 289
}
/* Type definitions */
struct List {
  int dummy;
};
struct Link {
  int dummy;
};

/* Variables and functions */
scalar_t__ make_name(char *);
int push_back(struct List *, struct Link *);
int push_back_name(struct List *lst, char *n) {
  return push_back(lst, (struct Link *)make_name(n));
}


x86 assembly (clang, -O0):
<push_back_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <make_name@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rsi
call   1030 <push_back@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<push_back_name>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <make_name@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <push_back@plt>

LLVM IR (-O0):
%struct.List = type { i32 }
%struct.Link = type { i32 }
define i32 @push_back_name(%struct.List* %0, i8* %1) {
%3 = alloca %struct.List*
%4 = alloca i8*
store %struct.List* %0, %struct.List** %3
store i8* %1, i8** %4
%5 = load %struct.List*, %struct.List** %3
%6 = load i8*, i8** %4
%7 = call i64 @make_name(i8* %6)
%8 = inttoptr i64 %7 to %struct.Link*
%9 = call i32 @push_back(%struct.List* %5, %struct.Link* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.List = type { i32 }
%struct.Link = type { i32 }
define i32 @push_back_name(%struct.List* %0, i8* %1) {
%3 = tail call i64 @make_name(i8* %1)
%4 = inttoptr i64 %3 to %struct.Link*
%5 = tail call i32 @push_back(%struct.List* %0, %struct.Link* %4)
ret i32 %5
}