xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ dtoi(float);
int /*<<< orphan*/ g2_clear(int /*<<< orphan*/);
void g2_clear_(float *dev) { g2_clear(dtoi(*dev)); }


x86 assembly (clang, -O0):
<g2_clear_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <dtoi@plt>
mov    %eax,%edi
call   1040 <g2_clear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_clear_>:
push   %rax
movss  (%rdi),%xmm0
call   1030 <dtoi@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <g2_clear@plt>

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

LLVM IR (-O2):
define void @g2_clear_(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call i32 @dtoi(float %2)
%4 = tail call i32 @g2_clear(i32 %3)
ret void
}
int __attribute__((nomips16)) f1(unsigned long long y) {
  return (int)((int)(y >> 32) + 1);
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x20,%rax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
shr    $0x20,%rdi
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @f1(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = trunc i64 %4 to i32
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @f1(i64 %0) {
%2 = lshr i64 %0, 32
%3 = trunc i64 %2 to i32
%4 = add nsw i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ compare();
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ subtract();
int /*<<< orphan*/ t1();
int /*<<< orphan*/ t2();
int /*<<< orphan*/ t3();
int /*<<< orphan*/ t4();
int /*<<< orphan*/ t5();
int /*<<< orphan*/ t6();
int /*<<< orphan*/ t7();
void testmain() {
  print("pointer");
  t1();
  t2();
  t3();
  t4();
  t5();
  t6();
  t7();
  subtract();
  compare();
}


x86 assembly (clang, -O0):
<testmain>:
push   %rbp
mov    %rsp,%rbp
lea    0xe55(%rip),%rdi
call   1070 <print@plt>
mov    $0x0,%al
call   1030 <t1@plt>
mov    $0x0,%al
call   1090 <t2@plt>
mov    $0x0,%al
call   1040 <t3@plt>
mov    $0x0,%al
call   10a0 <t4@plt>
mov    $0x0,%al
call   1050 <t5@plt>
mov    $0x0,%al
call   10b0 <t6@plt>
mov    $0x0,%al
call   1060 <t7@plt>
mov    $0x0,%al
call   1080 <subtract@plt>
mov    $0x0,%al
call   10c0 <compare@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testmain>:
push   %rax
lea    0xe58(%rip),%rdi
call   1070 <print@plt>
xor    %eax,%eax
call   1030 <t1@plt>
xor    %eax,%eax
call   1090 <t2@plt>
xor    %eax,%eax
call   1040 <t3@plt>
xor    %eax,%eax
call   10a0 <t4@plt>
xor    %eax,%eax
call   1050 <t5@plt>
xor    %eax,%eax
call   10b0 <t6@plt>
xor    %eax,%eax
call   1060 <t7@plt>
xor    %eax,%eax
call   1080 <subtract@plt>
xor    %eax,%eax
pop    %rcx
jmp    10c0 <compare@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"pointer\00"
define void @testmain() {
%1 = call i32 @print(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @t1()
%3 = call i32 (...) @t2()
%4 = call i32 (...) @t3()
%5 = call i32 (...) @t4()
%6 = call i32 (...) @t5()
%7 = call i32 (...) @t6()
%8 = call i32 (...) @t7()
%9 = call i32 (...) @subtract()
%10 = call i32 (...) @compare()
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"pointer\00"
define void @testmain() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @t1()
%3 = tail call i32 (...) @t2()
%4 = tail call i32 (...) @t3()
%5 = tail call i32 (...) @t4()
%6 = tail call i32 (...) @t5()
%7 = tail call i32 (...) @t6()
%8 = tail call i32 (...) @t7()
%9 = tail call i32 (...) @subtract()
%10 = tail call i32 (...) @compare()
ret void
}
int n_null_open(struct tty_struct *tty) { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ cclcomp(int /*<<< orphan*/);
int /*<<< orphan*/ cclin(int);
int /*<<< orphan*/ cclstart();
struct node *salloc(int, int /*<<< orphan*/);
struct node *make_09(void) {
  register int x;
  cclstart();
  for (x = '0'; x <= '9'; x++)
    cclin(x);
  return (salloc(6, cclcomp(0)));
}


x86 assembly (clang, -O0):
<make_09>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <cclstart@plt>
movl   $0x30,-0x4(%rbp)
cmpl   $0x39,-0x4(%rbp)
jg     1176 <make_09+0x36>
mov    -0x4(%rbp),%edi
call   1030 <cclin@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1156 <make_09+0x16>
xor    %edi,%edi
call   1040 <cclcomp@plt>
mov    %eax,%esi
mov    $0x6,%edi
call   1050 <salloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_09>:
push   %rax
xor    %eax,%eax
call   1060 <cclstart@plt>
mov    $0x30,%edi
call   1030 <cclin@plt>
mov    $0x31,%edi
call   1030 <cclin@plt>
mov    $0x32,%edi
call   1030 <cclin@plt>
mov    $0x33,%edi
call   1030 <cclin@plt>
mov    $0x34,%edi
call   1030 <cclin@plt>
mov    $0x35,%edi
call   1030 <cclin@plt>
mov    $0x36,%edi
call   1030 <cclin@plt>
mov    $0x37,%edi
call   1030 <cclin@plt>
mov    $0x38,%edi
call   1030 <cclin@plt>
mov    $0x39,%edi
call   1030 <cclin@plt>
xor    %edi,%edi
call   1040 <cclcomp@plt>
mov    $0x6,%edi
mov    %eax,%esi
pop    %rax
jmp    1050 <salloc@plt>

LLVM IR (-O0):
%struct.node = type { i32 }
define %struct.node* @make_09() {
%1 = alloca i32
%2 = call i32 (...) @cclstart()
store i32 48, i32* %1
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %1
%5 = icmp sle i32 %4, 57
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %1
%8 = call i32 @cclin(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %3
12: ; preds = %3
%13 = call i32 @cclcomp(i32 0)
%14 = call %struct.node* @salloc(i32 6, i32 %13)
ret %struct.node* %14
}

LLVM IR (-O2):
%struct.node = type { i32 }
define %struct.node* @make_09() {
%1 = tail call i32 (...) @cclstart()
%2 = tail call i32 @cclin(i32 48)
%3 = tail call i32 @cclin(i32 49)
%4 = tail call i32 @cclin(i32 50)
%5 = tail call i32 @cclin(i32 51)
%6 = tail call i32 @cclin(i32 52)
%7 = tail call i32 @cclin(i32 53)
%8 = tail call i32 @cclin(i32 54)
%9 = tail call i32 @cclin(i32 55)
%10 = tail call i32 @cclin(i32 56)
%11 = tail call i32 @cclin(i32 57)
%12 = tail call i32 @cclcomp(i32 0)
%13 = tail call %struct.node* @salloc(i32 6, i32 %12)
ret %struct.node* %13
}
/* Variables and functions */
int /*<<< orphan*/ warnx(char *, char *);
void dowarn(int line) {
  warnx("warning: can't back up %s",
        line < 0 ? "past first line" : "-- line already flushed");
}


x86 assembly (clang, -O0):
<dowarn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xf05(%rip),%rsi
lea    0xeee(%rip),%rax
cmp    $0x0,%ecx
cmovl  %rax,%rsi
lea    0xec6(%rip),%rdi
call   1030 <warnx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dowarn>:
test   %edi,%edi
lea    0xf01(%rip),%rax
lea    0xf0a(%rip),%rsi
cmovs  %rax,%rsi
lea    0xed5(%rip),%rdi
jmp    1030 <warnx@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"warning: can't back up %s\00"
@.str.1 = [16 x i8] c"past first line\00"
@.str.2 = [24 x i8] c"-- line already flushed\00"
define void @dowarn(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0)
%7 = call i32 @warnx(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"warning: can't back up %s\00"
@.str.1 = [16 x i8] c"past first line\00"
@.str.2 = [24 x i8] c"-- line already flushed\00"
define void @dowarn(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0)
%4 = tail call i32 @warnx(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int tt_index(uint64_t h) { return h % 1048583; }


x86 assembly (clang, -O0):
<tt_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x100007,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tt_index>:
movslq %edi,%rax
imul   $0x7fffc801,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x33,%rcx
add    %edx,%ecx
imul   $0x100007,%ecx,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @tt_index(i32 %0) {
%2 = srem i32 %0, 1048583
ret i32 %2
}
/* Variables and functions */
long construct_I(int, int, int, int);
long construct_L(int opcode, int rd, int rs1, int imm) {
  return construct_I(opcode, rd, rs1, imm);
}


x86 assembly (clang, -O0):
<construct_L>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <construct_I@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<construct_L>:
jmp    1030 <construct_I@plt>

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

LLVM IR (-O2):
define i64 @construct_L(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i64 @construct_I(i32 %0, i32 %1, i32 %2, i32 %3)
ret i64 %5
}
void DebugMain_Initialise(void) {}


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

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

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

LLVM IR (-O2):
define void @DebugMain_Initialise() {
ret void
}
void cpuidle_resume_and_unlock(void) {}


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

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

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

LLVM IR (-O2):
define void @cpuidle_resume_and_unlock() {
ret void
}
void g() { int *a; }


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

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

LLVM IR (-O0):
define void @g() {
%1 = alloca i32*
ret void
}

LLVM IR (-O2):
define void @g() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
void sprint_dec_Rn(char *str, unsigned char n) {
  sprintf(str, "DEC   R%X                        ", n);
}


x86 assembly (clang, -O0):
<sprint_dec_Rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprint_dec_Rn>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"DEC R%X \00"
define void @sprint_dec_Rn(i8* %0, i8 zeroext %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 @sprintf(i8* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"DEC R%X \00"
define void @sprint_dec_Rn(i8* nocapture writeonly %0, i8 zeroext %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Type definitions */
struct _item_abs {
  int dummy;
};

/* Variables and functions */
struct _item_abs *get_nth_item(const struct _item_abs *items, int index,
                               size_t item_size) {
  return (struct _item_abs *)((char *)items + (index * item_size));
}


x86 assembly (clang, -O0):
<get_nth_item>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   -0x18(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_nth_item>:
movslq %esi,%rax
imul   %rdx,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
%struct._item_abs = type { i32 }
define %struct._item_abs* @get_nth_item(%struct._item_abs* %0, i32 %1, i64 %2) {
%4 = alloca %struct._item_abs*
%5 = alloca i32
%6 = alloca i64
store %struct._item_abs* %0, %struct._item_abs** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = load %struct._item_abs*, %struct._item_abs** %4
%8 = bitcast %struct._item_abs* %7 to i8*
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = load i64, i64* %6
%12 = mul i64 %10, %11
%13 = getelementptr inbounds i8, i8* %8, i64 %12
%14 = bitcast i8* %13 to %struct._item_abs*
ret %struct._item_abs* %14
}

LLVM IR (-O2):
%struct._item_abs = type { i32 }
define %struct._item_abs* @get_nth_item(%struct._item_abs* readnone %0, i32 %1, i64 %2) {
%4 = bitcast %struct._item_abs* %0 to i8*
%5 = sext i32 %1 to i64
%6 = mul i64 %5, %2
%7 = getelementptr inbounds i8, i8* %4, i64 %6
%8 = bitcast i8* %7 to %struct._item_abs*
ret %struct._item_abs* %8
}
int false_fn(struct atom *atom, struct action_data *action_data) { return 0; }


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

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

LLVM IR (-O0):
%struct.atom = type opaque
%struct.action_data = type opaque
define i32 @false_fn(%struct.atom* %0, %struct.action_data* %1) {
%3 = alloca %struct.atom*
%4 = alloca %struct.action_data*
store %struct.atom* %0, %struct.atom** %3
store %struct.action_data* %1, %struct.action_data** %4
ret i32 0
}

LLVM IR (-O2):
%struct.atom = type opaque
%struct.action_data = type opaque
define i32 @false_fn(%struct.atom* nocapture readnone %0, %struct.action_data* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_PROCESS_CPUTIME_ID;
scalar_t__ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void start_watch(struct timespec *timer) {
  if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, timer))
    fprintf(stderr, "startWatch failed\n");
}


x86 assembly (clang, -O0):
<start_watch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
cmp    $0x0,%rax
je     115d <start_watch+0x3d>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_watch>:
push   %rax
mov    %rdi,%rsi
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <clock_gettime@plt>
test   %rax,%rax
je     114d <start_watch+0x2d>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
pop    %rax
jmp    1040 <fprintf@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_PROCESS_CPUTIME_ID = global i32 0
@stderr = global i32 0
@.str = [19 x i8] c"startWatch failed\0A\00"
define void @start_watch(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%4 = load %struct.timespec*, %struct.timespec** %2
%5 = call i64 @clock_gettime(i32 %3, %struct.timespec* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_PROCESS_CPUTIME_ID = global i32 0
@stderr = global i32 0
@.str = [19 x i8] c"startWatch failed\0A\00"
define void @start_watch(%struct.timespec* %0) {
%2 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%3 = tail call i64 @clock_gettime(i32 %2, %struct.timespec* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ increment();
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int x = 1;
  printf("x is now %d\n", x);
  printf("Incrementing...\n");
  increment();
  printf("Incremented!\n");
  printf("x is now %d\n", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <increment@plt>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xebf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <increment@plt>
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"x is now %d\0A\00"
@.str.1 = [17 x i8] c"Incrementing...\0A\00"
@.str.2 = [14 x i8] c"Incremented!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 1, i32* %1
%2 = load i32, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @increment()
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"x is now %d\0A\00"
@str = [16 x i8] c"Incrementing...\00"
@str.3 = [13 x i8] c"Incremented!\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @increment()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: mountpoint [-q] [-d] [-x] path\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Usage: mountpoint [-q] [-d] [-x] path\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Usage: mountpoint [-q] [-d] [-x] path\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
long abs32(long a) { return (a < 0) ? -a : a; }


x86 assembly (clang, -O0):
<abs32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <abs32+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <abs32+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs32>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @abs32(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @abs32(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ circle_sort(int *, int);
int main() {
  int a[] = {3, -4, 20, -8, 2, 5, 17, 9, 6, 7};
  circle_sort(a, sizeof(a) / sizeof(a[0]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <circle_sort@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xf05(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1030 <circle_sort@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [10 x i32] [i32 3, i32 -4, i32 20, i32 -8, i32 2, i32 5, i32 17, i32 9, i32 6, i32 7]
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = call i32 @circle_sort(i32* %4, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [10 x i32] [i32 3, i32 -4, i32 20, i32 -8, i32 2, i32 5, i32 17, i32 9, i32 6, i32 7]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @circle_sort(i32* %3, i32 10)
ret i32 0
}
void rop3_108_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & T;
  stk1 = S ^ stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_108_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_108_0_0>:
and    (%rdi),%dl
xor    %sil,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_108_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = and i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %5
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = load i8*, i8** %4
store i8 %22, i8* %23
ret void
}

LLVM IR (-O2):
define void @rop3_108_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = xor i8 %5, %1
store i8 %6, i8* %0
ret void
}
int cmp(void *a, void *b) { return *(long *)a - *(long *)b; }


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

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

LLVM IR (-O0):
define i32 @cmp(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 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = sub nsw i64 %7, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ MessageBufferLayerP__0__stateDoneTask__postTask();
void MessageBufferLayerP__0__RadioState__done(void) {
  MessageBufferLayerP__0__stateDoneTask__postTask();
}


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

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

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

LLVM IR (-O2):
define void @MessageBufferLayerP__0__RadioState__done() {
%1 = tail call i32 (...) @MessageBufferLayerP__0__stateDoneTask__postTask()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char);
int str_is_numeric(char *s) {
  while (*s != 0) {
    if (!isdigit(*s)) {
      return 0;
    }
    ++s;
  }
  return 1;
}


x86 assembly (clang, -O0):
<str_is_numeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115e <str_is_numeric+0x4e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    114d <str_is_numeric+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1165 <str_is_numeric+0x55>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <str_is_numeric+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_is_numeric>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <str_is_numeric+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1149 <str_is_numeric+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <str_is_numeric+0x20>
jmp    114b <str_is_numeric+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @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 = tail call i32 @isdigit(i8 signext %8)
%11 = icmp eq i32 %10, 0
%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
}
/* Variables and functions */
double drand(double, double);
double uniform_dist(double min, double max) { return drand(min, max); }


x86 assembly (clang, -O0):
<uniform_dist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <drand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniform_dist>:
jmp    1030 <drand@plt>

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

LLVM IR (-O2):
define double @uniform_dist(double %0, double %1) {
%3 = tail call double @drand(double %0, double %1)
ret double %3
}
void __attribute__((visibility("hidden"))) lib3_hidden(void) {}


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

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

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

LLVM IR (-O2):
define hidden void @lib3_hidden() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void _exit() {
  puts("Done!");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
jmp    1127 <_exit+0x17>

x86 assembly (clang, -O2):
<_exit>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <_exit+0x10>

LLVM IR (-O0):
@.str = [6 x i8] c"Done!\00"
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %1, %4
br label %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"Done!\00"
define void @_exit(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
br label %3
}
unsigned xrop3_66_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk1 = S ^ D;
  stk2 = T ^ D;
  stk1 = stk1 & stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_66_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_66_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
mov    %eax,%edx
xor    $0xff,%edx
mov    %ecx,%edi
xor    $0xff,%edi
and    %edx,%edi
not    %ecx
or     %eax,%ecx
and    %edi,%ecx
not    %eax
and    %esi,%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_66_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, 255
%8 = xor i32 %6, 255
%9 = and i32 %8, %7
%10 = xor i32 %6, -1
%11 = or i32 %4, %10
%12 = and i32 %9, %11
%13 = xor i32 %4, -1
%14 = and i32 %13, %5
%15 = or i32 %12, %14
ret i32 %15
}
int test_imm_C9uint8_mem(unsigned char *val) {
  return ((*val) & (0xC9 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_C9uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 201
%7 = icmp ne i32 %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_C9uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -55
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double pow(double, double);
double fpow64(double x, double y) { return pow(x, y); }


x86 assembly (clang, -O0):
<fpow64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpow64>:
jmp    1030 <pow@plt>

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

LLVM IR (-O2):
define double @fpow64(double %0, double %1) {
%3 = tail call double @pow(double %0, double %1)
ret double %3
}
/* Variables and functions */
scalar_t__ geteuid();
int /*<<< orphan*/ pr_inf(char *, char const *);
int stress_exec_supported(const char *name) {
  if (geteuid() == 0) {
    pr_inf("%s stressor must not run as root, skipping the stressor\n", name);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<stress_exec_supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <geteuid@plt>
cmp    $0x0,%rax
jne    1159 <stress_exec_supported+0x39>
mov    -0x10(%rbp),%rsi
lea    0xeb8(%rip),%rdi
call   1040 <pr_inf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <stress_exec_supported+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_exec_supported>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <geteuid@plt>
test   %rax,%rax
jne    1148 <stress_exec_supported+0x28>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <pr_inf@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [57 x i8] c"%s stressor must not run as root, skipping the stressor\0A\00"
define i32 @stress_exec_supported(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i64 (...) @geteuid()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i32 @pr_inf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %7)
store i32 -1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [57 x i8] c"%s stressor must not run as root, skipping the stressor\0A\00"
define i32 @stress_exec_supported(i8* %0) {
%2 = tail call i64 (...) @geteuid()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @pr_inf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_standard_one_homogenization(void) {
  int fail, *a, *b;
  double *c;
  fail = _ada_use_c2phc4c(894, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_standard_one_homogenization>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x37e,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_standard_one_homogenization>:
mov    $0x37e,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @solcon_standard_one_homogenization() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 894, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int ordalpha(int);
int idx(int c) { return ((ordalpha(c) - 1) & 31); }


x86 assembly (clang, -O0):
<idx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ordalpha@plt>
sub    $0x1,%eax
and    $0x1f,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idx>:
push   %rax
call   1030 <ordalpha@plt>
add    $0xffffffff,%eax
and    $0x1f,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @idx(i32 %0) {
%2 = tail call i32 @ordalpha(i32 %0)
%3 = add i32 %2, 31
%4 = and i32 %3, 31
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ func();
int /*<<< orphan*/ printf(char *, int);
main() {
  int x = 5;
  printf("x=%d\t", x);
  func();
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"x=%d\09\00"
define i32 @main() {
%1 = alloca i32
store i32 5, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @func()
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"x=%d\09\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 (...) @func()
ret i32 0
}
int _strlen(const char *str) {
  int i;
  for (i = 0; *str; i++)
    str++;
  return i;
}


x86 assembly (clang, -O0):
<_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1136 <_strlen+0x36>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strlen>:
cmpb   $0x0,(%rdi)
je     111c <_strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <_strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @_strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ xip_fpo_recsqrt_flt(float *, float);
float xil_fpo_recsqrt_flt(float a) {
  float res_flt;
  xip_fpo_recsqrt_flt(&res_flt, a);
  return res_flt;
}


x86 assembly (clang, -O0):
<xil_fpo_recsqrt_flt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    -0x8(%rbp),%rdi
call   1030 <xip_fpo_recsqrt_flt@plt>
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xil_fpo_recsqrt_flt>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <xip_fpo_recsqrt_flt@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @xil_fpo_recsqrt_flt(float %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = call i32 @xip_fpo_recsqrt_flt(float* %2, float %0)
%5 = load float, float* %2
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void msg_error_too_many_sentences() { printf("Error: too many sentences.\n"); }


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"Error: too many sentences.\0A\00"
define void @msg_error_too_many_sentences() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"Error: too many sentences.\00"
define void @msg_error_too_many_sentences() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret void
}
int cg_calculate_offset_push(struct NExpr *expr) {}


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

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

LLVM IR (-O0):
%struct.NExpr = type opaque
define i32 @cg_calculate_offset_push(%struct.NExpr* %0) {
%2 = alloca i32
%3 = alloca %struct.NExpr*
store %struct.NExpr* %0, %struct.NExpr** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
%struct.NExpr = type opaque
define i32 @cg_calculate_offset_push(%struct.NExpr* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void pr() { printf("hi there\n"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"hi there\0A\00"
define void @pr() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c"hi there\00"
define void @pr() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ alloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
int strlen(char *);
char *newstr(char *orig) {
  int len;
  char *r;
  len = strlen(orig);
  r = (char *)alloc(len + 1);
  memcpy(r, orig, len + 1);
  return (r);
}


x86 assembly (clang, -O0):
<newstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1050 <alloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
add    $0x1,%edx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newstr>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x1(%rax),%ebp
mov    %ebp,%edi
call   1050 <alloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @newstr(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = call i64 @alloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = load i8*, i8** %2
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
%15 = call i32 @memcpy(i8* %11, i8* %12, i32 %14)
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
define i8* @newstr(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @alloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i32 %3)
ret i8* %5
}