xunge/DecIR huggingface dataset:
/* Variables and functions */
int atoi(char *);
char *getenv(char *);
int row_dflt(void) {
  char *rows = getenv("LINES");
  if (rows)
    return atoi(rows);
  return 24;
}


x86 assembly (clang, -O0):
<row_dflt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1154 <row_dflt+0x34>
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x4(%rbp)
jmp    115b <row_dflt+0x3b>
movl   $0x18,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<row_dflt>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     113b <row_dflt+0x1b>
mov    %rax,%rdi
pop    %rax
jmp    1040 <atoi@plt>
mov    $0x18,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"LINES\00"
define i32 @row_dflt() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @atoi(i8* %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 24, %0 ]
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long red_mask;
};
typedef TYPE_1__ XVisualInfo;

/* Variables and functions */
void set_XVisualInfo_red_mask(void *_p, unsigned long _v) {
  ((XVisualInfo *)_p)->red_mask = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XVisualInfo_red_mask>:
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_XVisualInfo_red_mask>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XVisualInfo_red_mask(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_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XVisualInfo_red_mask(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void JackThreadInit(void *arg) {
  unsigned int mxcsr;
  mxcsr = __builtin_ia32_stmxcsr();
  __builtin_ia32_ldmxcsr(mxcsr | 0x8040);
  return;
  do {
    (void)(arg);
  } while (0);
}


x86 assembly (clang, -O0):
<JackThreadInit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rax
stmxcsr (%rax)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
or     $0x8040,%eax
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rax
ldmxcsr (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<JackThreadInit>:
stmxcsr -0x4(%rsp)
mov    $0x8040,%eax
or     -0x4(%rsp),%eax
mov    %eax,-0x8(%rsp)
ldmxcsr -0x8(%rsp)
ret

LLVM IR (-O0):
define void @JackThreadInit(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
%6 = bitcast i32* %4 to i8*
%7 = load i32, i32* %4
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = or i32 %8, 32832
store i32 %9, i32* %5
%10 = bitcast i32* %5 to i8*
ret void
}

LLVM IR (-O2):
define void @JackThreadInit(i8* nocapture readnone %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = load i32, i32* %2
%6 = or i32 %5, 32832
store i32 %6, i32* %3
%7 = bitcast i32* %3 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WriteCmd(int);
void OLED_Enable(void) {
  WriteCmd(0X8D);
  WriteCmd(0X14);
  WriteCmd(0XAF);
}


x86 assembly (clang, -O0):
<OLED_Enable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8d,%edi
call   1030 <WriteCmd@plt>
mov    $0x14,%edi
call   1030 <WriteCmd@plt>
mov    $0xaf,%edi
call   1030 <WriteCmd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OLED_Enable>:
push   %rax
mov    $0x8d,%edi
call   1030 <WriteCmd@plt>
mov    $0x14,%edi
call   1030 <WriteCmd@plt>
mov    $0xaf,%edi
pop    %rax
jmp    1030 <WriteCmd@plt>

LLVM IR (-O0):
define void @OLED_Enable() {
%1 = call i32 @WriteCmd(i32 141)
%2 = call i32 @WriteCmd(i32 20)
%3 = call i32 @WriteCmd(i32 175)
ret void
}

LLVM IR (-O2):
define void @OLED_Enable() {
%1 = tail call i32 @WriteCmd(i32 141)
%2 = tail call i32 @WriteCmd(i32 20)
%3 = tail call i32 @WriteCmd(i32 175)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void ls_usage(FILE *fp) {
  fputs("usage: unrez ls [<options>] <file> [<type> [<id>]]\n", fp);
}


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

x86 assembly (clang, -O2):
<ls_usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x33,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"usage: unrez ls [<options>] <file> [<type> [<id>]]\0A\00"
define void @ls_usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputs(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"usage: unrez ls [<options>] <file> [<type> [<id>]]\0A\00"
define void @ls_usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i64 51, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ timerHandler(char *, unsigned long, unsigned long);
void timer4Handler(void *string, unsigned long currentTime,
                   unsigned long scheduledTime) {
  timerHandler((char *)string, currentTime, scheduledTime);
}


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

x86 assembly (clang, -O2):
<timer4Handler>:
jmp    1030 <timerHandler@plt>

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

LLVM IR (-O2):
define void @timer4Handler(i8* %0, i64 %1, i64 %2) {
%4 = tail call i32 @timerHandler(i8* %0, i64 %1, i64 %2)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long event;
};
typedef TYPE_1__ XDestroyWindowEvent;

/* Variables and functions */
void set_XDestroyWindowEvent_event(void *_p, unsigned long _v) {
  ((XDestroyWindowEvent *)_p)->event = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XDestroyWindowEvent_event>:
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_XDestroyWindowEvent_event>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XDestroyWindowEvent_event(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_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XDestroyWindowEvent_event(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
scalar_t__ strbtrim(char *);
int /*<<< orphan*/ stretrim(char *);
char *strtrim(char *data) {
  data = (char *)strbtrim(data);
  stretrim(data);
  return data;
}


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

x86 assembly (clang, -O2):
<strtrim>:
push   %rbx
call   1030 <strbtrim@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <stretrim@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @strtrim(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strbtrim(i8* %3)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @stretrim(i8* %6)
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
define i8* @strtrim(i8* %0) {
%2 = tail call i64 @strbtrim(i8* %0)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @stretrim(i8* %3)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ Sys_failure(char *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int pthread_cond_destroy(int /*<<< orphan*/ *);
void Pthread_cond_destroy(pthread_cond_t *cond) {
  int retval;
  assert(cond != NULL);
  retval = pthread_cond_destroy(cond);
  if (retval != 0)
    Sys_failure("pthread_cond_destroy");
}


x86 assembly (clang, -O0):
<Pthread_cond_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <pthread_cond_destroy@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1170 <Pthread_cond_destroy+0x40>
lea    0xe95(%rip),%rdi
call   1040 <Sys_failure@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pthread_cond_destroy>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1050 <pthread_cond_destroy@plt>
test   %eax,%eax
je     115b <Pthread_cond_destroy+0x2b>
lea    0xeab(%rip),%rdi
pop    %rbx
jmp    1040 <Sys_failure@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"pthread_cond_destroy\00"
define void @Pthread_cond_destroy(i32* %0) {
%2 = icmp ne i32* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @pthread_cond_destroy(i32* %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @Sys_failure(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
ret void
}
int add_customer_database(char *name) {}


x86 assembly (clang, -O0):
<add_customer_database>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @add_customer_database(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
double sla_dtt_(double *);
double slaDtt(double utc) {
  double UTC;
  double RETVAL;
  double retval;
  UTC = utc;
  RETVAL = sla_dtt_(&UTC);
  retval = RETVAL;
  return retval;
}


x86 assembly (clang, -O0):
<slaDtt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <sla_dtt_@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaDtt>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <sla_dtt_@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @slaDtt(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
%6 = load double, double* %2
store double %6, double* %3
%7 = call double @sla_dtt_(double* %3)
store double %7, double* %4
%8 = load double, double* %4
store double %8, double* %5
%9 = load double, double* %5
ret double %9
}

LLVM IR (-O2):
define double @slaDtt(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store double %0, double* %2
%4 = call double @sla_dtt_(double* %2)
ret double %4
}
unsigned pointer_hash(const void *key) {
  return (unsigned long)key / sizeof(void *);
}


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

x86 assembly (clang, -O2):
<pointer_hash>:
mov    %rdi,%rax
shr    $0x3,%rax
ret

LLVM IR (-O0):
define i32 @pointer_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = udiv i64 %4, 8
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @pointer_hash(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = lshr i64 %2, 3
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ showPowerset(int *, int /*<<< orphan*/, int);
int main(void) {
  int n = 0;
  int list[100];
  puts("how many elements in alphabet set?");
  scanf("%d", &n);
  showPowerset(list, 0, n - 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    -0x1a0(%rbp),%rdi
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1050 <showPowerset@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x1a8,%rsp
movl   $0x0,0xc(%rsp)
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xed1(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%edx
add    $0xffffffff,%edx
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <showPowerset@plt>
xor    %eax,%eax
add    $0x1a8,%rsp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"how many elements in alphabet set?\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i32]
store i32 0, i32* %1
store i32 0, i32* %2
%4 = call i32 @puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
%9 = call i32 @showPowerset(i32* %6, i32 0, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"how many elements in alphabet set?\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i32]
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast [100 x i32]* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%8 = load i32, i32* %1
%9 = add nsw i32 %8, -1
%10 = call i32 @showPowerset(i32* %7, i32 0, i32 %9)
ret i32 0
}
void rop3_107_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = T | S;
  stk3 = *D & stk4;
  stk2 = S ^ stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_107_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xe(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_107_1_0>:
mov    %edx,%eax
or     %sil,%al
mov    (%rdi),%cl
and    %cl,%al
xor    %sil,%dl
xor    %al,%dl
or     %sil,%dl
not    %dl
and    %sil,%cl
or     %dl,%cl
mov    %cl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_107_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %10
%17 = load i8*, i8** %4
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = load i8, i8* %10
%21 = zext i8 %20 to i32
%22 = and i32 %19, %21
%23 = trunc i32 %22 to i8
store i8 %23, i8* %9
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = load i8, i8* %9
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %8
%30 = load i8, i8* %6
%31 = zext i8 %30 to i32
%32 = load i8, i8* %8
%33 = zext i8 %32 to i32
%34 = xor i32 %31, %33
%35 = trunc i32 %34 to i8
store i8 %35, i8* %7
%36 = load i8, i8* %7
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = trunc i32 %38 to i8
store i8 %39, i8* %7
%40 = load i8, i8* %7
%41 = zext i8 %40 to i32
%42 = load i8, i8* %5
%43 = zext i8 %42 to i32
%44 = xor i32 %43, -1
%45 = and i32 %41, %44
%46 = load i8*, i8** %4
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = load i8, i8* %5
%50 = zext i8 %49 to i32
%51 = and i32 %48, %50
%52 = or i32 %45, %51
%53 = trunc i32 %52 to i8
%54 = load i8*, i8** %4
store i8 %53, i8* %54
ret void
}

LLVM IR (-O2):
define void @rop3_107_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = and i8 %5, %4
%7 = xor i8 %2, %1
%8 = xor i8 %7, %6
%9 = or i8 %8, %1
%10 = xor i8 %9, -1
%11 = and i8 %5, %1
%12 = or i8 %11, %10
store i8 %12, i8* %0
ret void
}
/* Variables and functions */
int __execve(char const *, char **, int /*<<< orphan*/ *);
int execl(const char *path, const char *arg, ...) {
  return __execve(path, (char **)&arg, NULL);
}


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

x86 assembly (clang, -O2):
<execl>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <__execve@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @execl(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 = call i32 @__execve(i8* %5, i8** %4, i32* null)
ret i32 %6
}

LLVM IR (-O2):
define i32 @execl(i8* %0, i8* %1, ...) {
%3 = alloca i8*
store i8* %1, i8** %3
%4 = call i32 @__execve(i8* %0, i8** %3, i32* null)
ret i32 %4
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
struct SN_env *SN_create_env(int /*<<< orphan*/, int, int /*<<< orphan*/);
extern struct SN_env *russian_KOI8_R_create_env(void) {
  return SN_create_env(0, 2, 0);
}


x86 assembly (clang, -O0):
<russian_KOI8_R_create_env>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x2,%esi
mov    %edx,%edi
call   1030 <SN_create_env@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<russian_KOI8_R_create_env>:
xor    %edi,%edi
mov    $0x2,%esi
xor    %edx,%edx
jmp    1030 <SN_create_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define %struct.SN_env* @russian_KOI8_R_create_env() {
%1 = call %struct.SN_env* @SN_create_env(i32 0, i32 2, i32 0)
ret %struct.SN_env* %1
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define %struct.SN_env* @russian_KOI8_R_create_env() {
%1 = tail call %struct.SN_env* @SN_create_env(i32 0, i32 2, i32 0)
ret %struct.SN_env* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct ethhdr {
  int /*<<< orphan*/ h_proto;
};

/* Variables and functions */
int /*<<< orphan*/ htons(int /*<<< orphan*/);
void update_proto_ether2(struct ethhdr *eth2, uint16_t protocol) {
  eth2->h_proto = htons(protocol);
}


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

x86 assembly (clang, -O2):
<update_proto_ether2>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <htons@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.ethhdr = type { i32 }
define void @update_proto_ether2(%struct.ethhdr* %0, i32 %1) {
%3 = alloca %struct.ethhdr*
%4 = alloca i32
store %struct.ethhdr* %0, %struct.ethhdr** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @htons(i32 %5)
%7 = load %struct.ethhdr*, %struct.ethhdr** %3
%8 = getelementptr inbounds %struct.ethhdr, %struct.ethhdr* %7, i32 0, i32 0
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
%struct.ethhdr = type { i32 }
define void @update_proto_ether2(%struct.ethhdr* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @htons(i32 %1)
%4 = getelementptr inbounds %struct.ethhdr, %struct.ethhdr* %0, i64 0, i32 0
store i32 %3, i32* %4
ret void
}
int get_blank_length(int cur_line_length, int blank_num_per_tab) {
  int tab_num;
  int blank_remain, blank_need;
  tab_num = cur_line_length / blank_num_per_tab;
  blank_remain = cur_line_length - tab_num * blank_num_per_tab;
  blank_need = blank_num_per_tab - blank_remain;
  return blank_need;
}


x86 assembly (clang, -O0):
<get_blank_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x8(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @get_blank_length(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sdiv i32 %8, %9
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = mul nsw i32 %12, %13
%15 = sub nsw i32 %11, %14
store i32 %15, i32* %6
%16 = load i32, i32* %4
%17 = load i32, i32* %6
%18 = sub nsw i32 %16, %17
store i32 %18, i32* %7
%19 = load i32, i32* %7
ret i32 %19
}

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


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

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

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

LLVM IR (-O2):
define void @CPU_NULL() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main(int argc, char *argv[]) {
  if (!printf("Hello World")) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
cmp    $0x0,%eax
jne    1139 <main+0x29>
jmp    1139 <main+0x29>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %2
br label %8
8: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
define void @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void printTime() {
  time_t timer;
  char buffer[26];
  struct tm *tm_info;
  time(&timer);
  tm_info = localtime(&timer);
  strftime(buffer, 26, "%Y:%m:%d %H:%M:%S", tm_info);
  printf(buffer);
}


x86 assembly (clang, -O0):
<printTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x4(%rbp),%rdi
call   1050 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0x1a,%esi
lea    0xe8e(%rip),%rdx
call   1060 <strftime@plt>
lea    -0x20(%rbp),%rdi
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTime>:
push   %rbx
sub    $0x30,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
lea    0xe9f(%rip),%rdx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1a,%esi
mov    %rax,%rcx
call   1060 <strftime@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y:%m:%d %H:%M:%S\00"
define void @printTime() {
%1 = alloca i32
%2 = alloca [26 x i8]
%3 = alloca %struct.tm*
%4 = call i32 @time(i32* %1)
%5 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %5, %struct.tm** %3
%6 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%7 = load %struct.tm*, %struct.tm** %3
%8 = call i32 @strftime(i8* %6, i32 26, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %7)
%9 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* %9)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y:%m:%d %H:%M:%S\00"
define void @printTime() {
%1 = alloca i32
%2 = alloca [26 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%5 = call i32 @time(i32* %1)
%6 = call %struct.tm* @localtime(i32* %1)
%7 = call i32 @strftime(i8* %4, i32 26, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
%8 = call i32 @printf(i8* %4)
ret void
}
/* Type definitions */
struct timeval {
  unsigned long tv_sec;
  unsigned long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned long gettimeofday_us(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (1000UL * 1000 * tv.tv_sec) + tv.tv_usec;
}


x86 assembly (clang, -O0):
<gettimeofday_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x10(%rbp),%rax
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettimeofday_us>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x8(%rsp),%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @gettimeofday_us() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i64, i64* %3
%5 = mul i64 1000000, %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i64, i64* %6
%8 = add i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @gettimeofday_us() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i64, i64* %7
%9 = add i64 %6, %8
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ fact(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x;
  scanf("%d", &x);
  printf("X = %d , ", x);
  printf("%ld", fact(x));
  printf(" , OK!\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%esi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <fact@plt>
mov    %eax,%esi
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xea6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%edi
call   1050 <fact@plt>
lea    0xe99(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe8d(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [10 x i8] c"X = %d , \00"
@.str.2 = [4 x i8] c"%ld\00"
@.str.3 = [8 x i8] c" , OK!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %1
%6 = call i32 @fact(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [10 x i8] c"X = %d , \00"
@.str.2 = [4 x i8] c"%ld\00"
@str = [7 x i8] c" , OK!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %1
%7 = call i32 @fact(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sort(int *, int *, int /*<<< orphan*/, int);
void merge_sort(int input[], int size) {
  int temp[size];
  sort(input, temp, 0, size - 1);
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
xor    %edx,%edx
call   1030 <sort@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%ecx
mov    %rsp,%rax
lea    0xf(,%rcx,4),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%rax
mov    %rax,%rsp
lea    -0x1(%rsi),%ecx
mov    %rax,%rsi
xor    %edx,%edx
call   1030 <sort@plt>
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
define void @merge_sort(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %5
%10 = alloca i32, i64 %8
store i64 %8, i64* %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
%14 = call i32 @sort(i32* %11, i32* %10, i32 0, i32 %13)
%15 = load i8*, i8** %5
ret void
}

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = alloca i32, i64 %3
%5 = add nsw i32 %1, -1
%6 = call i32 @sort(i32* %0, i32* %4, i32 0, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ppm_device_close(int);
int ppm_device_open(char const *);
int ppm_chk(const char *fname) {
  int fd;
  if ((fd = ppm_device_open(fname)) == -1) {
    return 0;
  }
  ppm_device_close(fd);
  return 1;
}


x86 assembly (clang, -O0):
<ppm_chk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ppm_device_open@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
jne    114d <ppm_chk+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    115c <ppm_chk+0x3c>
mov    -0x14(%rbp),%edi
call   1030 <ppm_device_close@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ppm_chk>:
push   %rax
call   1040 <ppm_device_open@plt>
cmp    $0xffffffff,%eax
je     1139 <ppm_chk+0x19>
mov    %eax,%edi
call   1030 <ppm_device_close@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ppm_chk(i8* %0) {
%2 = tail call i32 @ppm_device_open(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @ppm_device_close(i32 %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
int main(argc, argv)
int argc;
char **argv;
{
  printf("calculate floating dhrystones using doubles size %d\n",
         sizeof(double));
  Proc0();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <Proc0@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [53 x i8] c"calculate floating dhrystones using doubles size %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i64 8)
%7 = call i32 (...) @Proc0()
ret i32 0
}

LLVM IR (-O2):
@.str = [53 x i8] c"calculate floating dhrystones using doubles size %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i64 8)
%4 = tail call i32 (...) @Proc0()
ret i32 0
}
/* Type definitions */
struct nn_epbase {
  int dummy;
};

/* Variables and functions */
int nn_bipc_create(void *, struct nn_epbase **);
int nn_ipc_bind(void *hint, struct nn_epbase **epbase) {
  return nn_bipc_create(hint, epbase);
}


x86 assembly (clang, -O0):
<nn_ipc_bind>:
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 <nn_bipc_create@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nn_ipc_bind>:
jmp    1030 <nn_bipc_create@plt>

LLVM IR (-O0):
%struct.nn_epbase = type { i32 }
define i32 @nn_ipc_bind(i8* %0, %struct.nn_epbase** %1) {
%3 = alloca i8*
%4 = alloca %struct.nn_epbase**
store i8* %0, i8** %3
store %struct.nn_epbase** %1, %struct.nn_epbase*** %4
%5 = load i8*, i8** %3
%6 = load %struct.nn_epbase**, %struct.nn_epbase*** %4
%7 = call i32 @nn_bipc_create(i8* %5, %struct.nn_epbase** %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.nn_epbase = type { i32 }
define i32 @nn_ipc_bind(i8* %0, %struct.nn_epbase** %1) {
%3 = tail call i32 @nn_bipc_create(i8* %0, %struct.nn_epbase** %1)
ret i32 %3
}
int isascii(c)
int c;
{ return ((c & ~0x7F) == 0); }


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

x86 assembly (clang, -O2):
<isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void Delay1TCY() { usleep(1); }


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

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

LLVM IR (-O0):
define void @Delay1TCY() {
%1 = call i32 @usleep(i32 1)
ret void
}

LLVM IR (-O2):
define void @Delay1TCY() {
%1 = tail call i32 @usleep(i32 1)
ret void
}
/* Type definitions */
struct Cyc_List_List {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_RemoveAggrs_remove_aggrs(struct Cyc_List_List *);
struct Cyc_List_List *Cyc_do_removeaggrs(int ignore,
                                         struct Cyc_List_List *tds) {
  return ({ Cyc_RemoveAggrs_remove_aggrs(tds); });
}


x86 assembly (clang, -O0):
<Cyc_do_removeaggrs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <Cyc_RemoveAggrs_remove_aggrs@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_do_removeaggrs>:
push   %rax
mov    %rsi,%rdi
call   1030 <Cyc_RemoveAggrs_remove_aggrs@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct.Cyc_List_List = type { i32 }
define %struct.Cyc_List_List* @Cyc_do_removeaggrs(i32 %0, %struct.Cyc_List_List* %1) {
%3 = alloca i32
%4 = alloca %struct.Cyc_List_List*
%5 = alloca i32
store i32 %0, i32* %3
store %struct.Cyc_List_List* %1, %struct.Cyc_List_List** %4
%6 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %4
%7 = call i32 @Cyc_RemoveAggrs_remove_aggrs(%struct.Cyc_List_List* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to %struct.Cyc_List_List*
ret %struct.Cyc_List_List* %10
}

LLVM IR (-O2):
%struct.Cyc_List_List = type { i32 }
define %struct.Cyc_List_List* @Cyc_do_removeaggrs(i32 %0, %struct.Cyc_List_List* %1) {
%3 = tail call i32 @Cyc_RemoveAggrs_remove_aggrs(%struct.Cyc_List_List* %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to %struct.Cyc_List_List*
ret %struct.Cyc_List_List* %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void die(char *message) {
  perror(message);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @die(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int rand();
int rand_in_range(int max) {
  assert(max != 0);
  return (rand() % max) + 1;
}


x86 assembly (clang, -O0):
<rand_in_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x0,%al
call   1040 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_in_range>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
setne  %dil
call   1030 <assert@plt>
xor    %eax,%eax
call   1040 <rand@plt>
cltd
idiv   %ebx
lea    0x1(%rdx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rand_in_range(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = call i32 (...) @rand()
%8 = load i32, i32* %2
%9 = srem i32 %7, %8
%10 = add nsw i32 %9, 1
ret i32 %10
}

LLVM IR (-O2):
define i32 @rand_in_range(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, %0
%7 = add nsw i32 %6, 1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
int /*<<< orphan*/ marked_noreturn(char *);
void test_4(void *ptr) {
  if (!ptr)
    marked_noreturn("ptr was NULL");
  __analyzer_eval(ptr != 0);
}


x86 assembly (clang, -O0):
<test_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1143 <test_4+0x23>
lea    0xec2(%rip),%rdi
call   1040 <marked_noreturn@plt>
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_4>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1135 <test_4+0x15>
lea    0xed0(%rip),%rdi
call   1040 <marked_noreturn@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
pop    %rbx
jmp    1030 <__analyzer_eval@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"ptr was NULL\00"
define void @test_4(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 %7, label %5
5: ; preds = %1
%6 = call i32 @marked_noreturn(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i8*, i8** %2
%9 = icmp ne i8* %8, null
%10 = zext i1 %9 to i32
%11 = call i32 @__analyzer_eval(i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"ptr was NULL\00"
define void @test_4(i8* readnone %0) {
%2 = icmp ne i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @marked_noreturn(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = zext i1 %2 to i32
%7 = tail call i32 @__analyzer_eval(i32 %6)
ret void
}
/* Type definitions */
struct t_safeu_struct {
  int dummy;
};

/* Variables and functions */
scalar_t__ safeu_get_fingerprint(struct t_safeu_struct *, unsigned int);
unsigned get_number_of_identities(struct t_safeu_struct *ac) {
  unsigned i;
  for (i = 0; safeu_get_fingerprint(ac, i); i++) {
  }
  return i;
}


x86 assembly (clang, -O0):
<get_number_of_identities>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <safeu_get_fingerprint@plt>
cmp    $0x0,%rax
je     114c <get_number_of_identities+0x3c>
jmp    113e <get_number_of_identities+0x2e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <get_number_of_identities+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_number_of_identities>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xffffffff,%ebx
nopl   0x0(%rax)
add    $0x1,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <safeu_get_fingerprint@plt>
test   %rax,%rax
jne    1120 <get_number_of_identities+0x10>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
%struct.t_safeu_struct = type { i32 }
define i32 @get_number_of_identities(%struct.t_safeu_struct* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %6, %2 ]
%4 = tail call i64 @safeu_get_fingerprint(%struct.t_safeu_struct* %0, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = add i32 %3, 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i32 %3
}
int main(void) {
  char a;
  int b[5];
  a == b[0];
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}