xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ isdigit(char);
unsigned is_valid_number(char *str) {
  while (*str) {
    if (!isdigit(*str)) {
      return 0;
    }
    str++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_valid_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115b <is_valid_number+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    114a <is_valid_number+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1162 <is_valid_number+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <is_valid_number+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_number>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <is_valid_number+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 <is_valid_number+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <is_valid_number+0x20>
jmp    114b <is_valid_number+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @is_valid_number(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
}
char *stpcpy(char *restrict s1, const char *restrict s2) {
  while (*s2) {
    *s1++ = *s2++;
  }
  *s1 = '\0';
  return s1;
}


x86 assembly (clang, -O0):
<stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1140 <stpcpy+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    110c <stpcpy+0xc>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1121 <stpcpy+0x21>
add    $0x1,%rsi
nopl   (%rax)
mov    %cl,(%rax)
add    $0x1,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <stpcpy+0x10>
movb   $0x0,(%rax)
ret

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

LLVM IR (-O2):
define i8* @stpcpy(i8* noalias writeonly %0, i8* noalias nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %6, i8* %8
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %14
}
/* Variables and functions */
int config_get_int(char *, int /*<<< orphan*/);
int GiveRestriction(void) { return config_get_int("GiveRestriction", 0); }


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

x86 assembly (clang, -O2):
<GiveRestriction>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <config_get_int@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"GiveRestriction\00"
define i32 @GiveRestriction() {
%1 = tail call i32 @config_get_int(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 %1
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i, sum, bound;
  bound = __VERIFIER_nondet_int();
  i = 0;
  sum = 0;
  while (i < bound) {
    sum = sum + i;
    i = i + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    115a <main+0x4a>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1137 <main+0x27>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Type definitions */
struct rtt_info {
  int dummy;
};

/* Variables and functions */
int calc_rto(struct rtt_info const *);
int rtt_notimeout(const struct rtt_info *rtt) { return calc_rto(rtt); }


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

x86 assembly (clang, -O2):
<rtt_notimeout>:
jmp    1030 <calc_rto@plt>

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

LLVM IR (-O2):
%struct.rtt_info = type { i32 }
define i32 @rtt_notimeout(%struct.rtt_info* %0) {
%2 = tail call i32 @calc_rto(%struct.rtt_info* %0)
ret i32 %2
}
void foo269() {}


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

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

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

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

/* Variables and functions */
int setreuid(int, int /*<<< orphan*/);
int setegid(uid_t egid) { return setreuid(-1, egid); }


x86 assembly (clang, -O0):
<setegid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xffffffff,%edi
call   1030 <setreuid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setegid>:
mov    %edi,%esi
mov    $0xffffffff,%edi
jmp    1030 <setreuid@plt>

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

LLVM IR (-O2):
define i32 @setegid(i32 %0) {
%2 = tail call i32 @setreuid(i32 -1, i32 %0)
ret i32 %2
}
void RTThreadSelfName(void) {}


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

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

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

LLVM IR (-O2):
define void @RTThreadSelfName() {
ret void
}
/* Variables and functions */
int fdt_node_end_offset_(void *, int);
int /*<<< orphan*/ fdt_nop_region_(int /*<<< orphan*/, int);
int /*<<< orphan*/ fdt_offset_ptr_w(void *, int, int /*<<< orphan*/);
int fdt_nop_node(void *fdt, int nodeoffset) {
  int endoffset;
  endoffset = fdt_node_end_offset_(fdt, nodeoffset);
  if (endoffset < 0)
    return endoffset;
  fdt_nop_region_(fdt_offset_ptr_w(fdt, nodeoffset, 0), endoffset - nodeoffset);
  return 0;
}


x86 assembly (clang, -O0):
<fdt_nop_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <fdt_node_end_offset_@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1163 <fdt_nop_node+0x33>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1185 <fdt_nop_node+0x55>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
xor    %edx,%edx
call   1050 <fdt_offset_ptr_w@plt>
mov    %eax,%edi
mov    -0x18(%rbp),%esi
sub    -0x14(%rbp),%esi
call   1040 <fdt_nop_region_@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdt_nop_node>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
call   1030 <fdt_node_end_offset_@plt>
mov    %eax,%ebx
test   %eax,%eax
js     115d <fdt_nop_node+0x2d>
mov    %r14,%rdi
mov    %ebp,%esi
xor    %edx,%edx
call   1050 <fdt_offset_ptr_w@plt>
sub    %ebp,%ebx
mov    %eax,%edi
mov    %ebx,%esi
call   1040 <fdt_nop_region_@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fdt_nop_node(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = call i32 @fdt_node_end_offset_(i8* %7, i32 %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* %6
store i32 %13, i32* %3
br label %22
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = load i32, i32* %5
%17 = call i32 @fdt_offset_ptr_w(i8* %15, i32 %16, i32 0)
%18 = load i32, i32* %6
%19 = load i32, i32* %5
%20 = sub nsw i32 %18, %19
%21 = call i32 @fdt_nop_region_(i32 %17, i32 %20)
store i32 0, i32* %3
br label %22
22: ; preds = %14, %12
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @fdt_nop_node(i8* %0, i32 %1) {
%3 = tail call i32 @fdt_node_end_offset_(i8* %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @fdt_offset_ptr_w(i8* %0, i32 %1, i32 0)
%7 = sub nsw i32 %3, %1
%8 = tail call i32 @fdt_nop_region_(i32 %6, i32 %7)
br label %9
9: ; preds = %2, %5
%10 = phi i32 [ 0, %5 ], [ %3, %2 ]
ret i32 %10
}
long __fixdfdi(double a) { return (long)((int)a); }


x86 assembly (clang, -O0):
<__fixdfdi>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fixdfdi>:
cvttsd2si %xmm0,%eax
cltq
ret

LLVM IR (-O0):
define i64 @__fixdfdi(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fptosi double %3 to i32
%5 = sext i32 %4 to i64
ret i64 %5
}

LLVM IR (-O2):
define i64 @__fixdfdi(double %0) {
%2 = fptosi double %0 to i32
%3 = sext i32 %2 to i64
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ relocrecord(int /*<<< orphan*/, int, int /*<<< orphan*/);
void relocate_code(uint16_t addr, uint8_t *p) { relocrecord(addr, 1, *p); }


x86 assembly (clang, -O0):
<relocate_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    $0x1,%esi
call   1030 <relocrecord@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<relocate_code>:
mov    (%rsi),%edx
mov    $0x1,%esi
jmp    1030 <relocrecord@plt>

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

LLVM IR (-O2):
define void @relocate_code(i32 %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @relocrecord(i32 %0, i32 1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reset_handler();
void CpuReset(void) { reset_handler(); }


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

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

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

LLVM IR (-O2):
define void @CpuReset() {
%1 = tail call i32 (...) @reset_handler()
ret void
}
/* Variables and functions */
double genrand_int32();
double genrand_real1() { return (genrand_int32() * (1.0 / 4294967295.0)); }


x86 assembly (clang, -O0):
<genrand_real1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <genrand_int32@plt>
movsd  0xedd(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand_real1>:
push   %rax
xor    %eax,%eax
call   1030 <genrand_int32@plt>
mulsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @genrand_real1() {
%1 = call double (...) @genrand_int32()
%2 = fmul double %1, 0x3DF0000000100000
ret double %2
}

LLVM IR (-O2):
define double @genrand_real1() {
%1 = tail call double (...) @genrand_int32()
%2 = fmul double %1, 0x3DF0000000100000
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
int test777(void) {
  extern int foo(int *);
  int u = 7, v1;
  static int sarr[10];
  sarr[0] = 4;
  v1 = u;
  if (v1 != 7)
    link_error();
  foo(sarr);
  return v1 + sarr[0];
}


x86 assembly (clang, -O0):
<test777>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x7,-0x4(%rbp)
movl   $0x4,0x2f07(%rip)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x7,-0x8(%rbp)
je     1150 <test777+0x30>
mov    $0x0,%al
call   1040 <link_error@plt>
lea    0x2ee9(%rip),%rdi
call   1030 <foo@plt>
mov    -0x8(%rbp),%eax
add    0x2edb(%rip),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test777>:
push   %rax
movl   $0x4,0x2f25(%rip)
lea    0x2f1e(%rip),%rdi
call   1030 <foo@plt>
mov    0x2f13(%rip),%eax
add    $0x7,%eax
pop    %rcx
ret

LLVM IR (-O0):
@test777.sarr = internal global [10 x i32] zeroinitializer
define i32 @test777() {
%1 = alloca i32
%2 = alloca i32
store i32 7, i32* %1
store i32 4, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @test777.sarr, i64 0, i64 0)
%3 = load i32, i32* %1
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 7
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @link_error()
br label %8
8: ; preds = %6, %0
%9 = call i32 @foo(i32* getelementptr inbounds ([10 x i32], [10 x i32]* @test777.sarr, i64 0, i64 0))
%10 = load i32, i32* %2
%11 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @test777.sarr, i64 0, i64 0)
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
@test777.sarr = internal global [10 x i32] zeroinitializer
define i32 @test777() {
store i32 4, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @test777.sarr, i64 0, i64 0)
%1 = tail call i32 @foo(i32* getelementptr inbounds ([10 x i32], [10 x i32]* @test777.sarr, i64 0, i64 0))
%2 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @test777.sarr, i64 0, i64 0)
%3 = add nsw i32 %2, 7
ret i32 %3
}
double omega_ij(int i, int j) { return 1.0; }


x86 assembly (clang, -O0):
<omega_ij>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  0xeee(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<omega_ij>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @omega_ij(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @omega_ij(i32 %0, i32 %1) {
ret double 1.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_hex8(unsigned char);
void print_emerg_hex8(unsigned char value) { __console_tx_hex8(value); }


x86 assembly (clang, -O0):
<print_emerg_hex8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <__console_tx_hex8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_emerg_hex8>:
jmp    1030 <__console_tx_hex8@plt>

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

LLVM IR (-O2):
define void @print_emerg_hex8(i8 zeroext %0) {
%2 = tail call i32 @__console_tx_hex8(i8 zeroext %0)
ret void
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float RandFloat(float a, float b) {
  float random = ((float)rand()) / (float)RAND_MAX;
  float diff = b - a;
  float r = random * diff;
  return a + r;
}


x86 assembly (clang, -O0):
<RandFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2eb3(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandFloat>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm2
mov    0x2eb9(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm2
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm1
subss  %xmm1,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @RandFloat(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %3
store float %1, float* %4
%8 = call i64 (...) @rand()
%9 = sitofp i64 %8 to float
%10 = load i64, i64* @RAND_MAX
%11 = sitofp i64 %10 to float
%12 = fdiv float %9, %11
store float %12, float* %5
%13 = load float, float* %4
%14 = load float, float* %3
%15 = fsub float %13, %14
store float %15, float* %6
%16 = load float, float* %5
%17 = load float, float* %6
%18 = fmul float %16, %17
store float %18, float* %7
%19 = load float, float* %3
%20 = load float, float* %7
%21 = fadd float %19, %20
ret float %21
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @RandFloat(float %0, float %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to float
%7 = fdiv float %4, %6
%8 = fsub float %1, %0
%9 = fmul float %8, %7
%10 = fadd float %9, %0
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ ADS1299SetInputModeSetGain(int, int);
int /*<<< orphan*/ ADS1299WriteReg(int, int);
unsigned char ADS1299TestSignal(unsigned char enable) {
  if (enable) {
    ADS1299WriteReg(0x02, 0xD0);
    ADS1299SetInputModeSetGain(0x05, 1);
    return 1;
  } else {
    ADS1299WriteReg(0x02, 0xC0);
    ADS1299SetInputModeSetGain(0x00, 1);
    return 0;
  }
}


x86 assembly (clang, -O0):
<ADS1299TestSignal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
cmpb   $0x0,-0x2(%rbp)
je     115f <ADS1299TestSignal+0x3f>
mov    $0x2,%edi
mov    $0xd0,%esi
call   1040 <ADS1299WriteReg@plt>
mov    $0x5,%edi
mov    $0x1,%esi
call   1030 <ADS1299SetInputModeSetGain@plt>
movb   $0x1,-0x1(%rbp)
jmp    117e <ADS1299TestSignal+0x5e>
mov    $0x2,%edi
mov    $0xc0,%esi
call   1040 <ADS1299WriteReg@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <ADS1299SetInputModeSetGain@plt>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADS1299TestSignal>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
test   %edi,%edi
setne  %bl
lea    0xc(%rbx),%esi
shl    $0x4,%esi
lea    (%rbx,%rbx,4),%ebp
mov    $0x2,%edi
call   1040 <ADS1299WriteReg@plt>
mov    %ebp,%edi
mov    $0x1,%esi
call   1030 <ADS1299SetInputModeSetGain@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @ADS1299TestSignal(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @ADS1299WriteReg(i32 2, i32 208)
%8 = call i32 @ADS1299SetInputModeSetGain(i32 5, i32 1)
store i8 1, i8* %2
br label %12
9: ; preds = %1
%10 = call i32 @ADS1299WriteReg(i32 2, i32 192)
%11 = call i32 @ADS1299SetInputModeSetGain(i32 0, i32 1)
store i8 0, i8* %2
br label %12
12: ; preds = %9, %6
%13 = load i8, i8* %2
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @ADS1299TestSignal(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
%3 = select i1 %2, i32 192, i32 208
%4 = select i1 %2, i32 0, i32 5
%5 = xor i1 %2, true
%6 = zext i1 %5 to i8
%7 = tail call i32 @ADS1299WriteReg(i32 2, i32 %3)
%8 = tail call i32 @ADS1299SetInputModeSetGain(i32 %4, i32 1)
ret i8 %6
}
void Decrypt_Done() {}


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

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

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

LLVM IR (-O2):
define void @Decrypt_Done() {
ret void
}
void swap(long double **a, int l1, int l2) {
  long double *t = a[l1];
  a[l1] = a[l2];
  a[l2] = t;
}


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

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rcx
movslq %edx,%rdx
mov    (%rdi,%rdx,8),%rsi
mov    %rsi,(%rdi,%rax,8)
mov    %rcx,(%rdi,%rdx,8)
ret

LLVM IR (-O0):
define void @swap(x86_fp80** %0, i32 %1, i32 %2) {
%4 = alloca x86_fp80**
%5 = alloca i32
%6 = alloca i32
%7 = alloca x86_fp80*
store x86_fp80** %0, x86_fp80*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load x86_fp80**, x86_fp80*** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds x86_fp80*, x86_fp80** %8, i64 %10
%12 = load x86_fp80*, x86_fp80** %11
store x86_fp80* %12, x86_fp80** %7
%13 = load x86_fp80**, x86_fp80*** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds x86_fp80*, x86_fp80** %13, i64 %15
%17 = load x86_fp80*, x86_fp80** %16
%18 = load x86_fp80**, x86_fp80*** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds x86_fp80*, x86_fp80** %18, i64 %20
store x86_fp80* %17, x86_fp80** %21
%22 = load x86_fp80*, x86_fp80** %7
%23 = load x86_fp80**, x86_fp80*** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds x86_fp80*, x86_fp80** %23, i64 %25
store x86_fp80* %22, x86_fp80** %26
ret void
}

LLVM IR (-O2):
define void @swap(x86_fp80** nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds x86_fp80*, x86_fp80** %0, i64 %4
%6 = load x86_fp80*, x86_fp80** %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds x86_fp80*, x86_fp80** %0, i64 %7
%9 = load x86_fp80*, x86_fp80** %8
store x86_fp80* %9, x86_fp80** %5
store x86_fp80* %6, x86_fp80** %8
ret void
}
/* Type definitions */
struct scpi_token {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ scpi_free_some_tokens(struct scpi_token *,
                                         int /*<<< orphan*/ *);
void scpi_free_tokens(struct scpi_token *start) {
  scpi_free_some_tokens(start, NULL);
}


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

x86 assembly (clang, -O2):
<scpi_free_tokens>:
xor    %esi,%esi
jmp    1030 <scpi_free_some_tokens@plt>

LLVM IR (-O0):
%struct.scpi_token = type { i32 }
define void @scpi_free_tokens(%struct.scpi_token* %0) {
%2 = alloca %struct.scpi_token*
store %struct.scpi_token* %0, %struct.scpi_token** %2
%3 = load %struct.scpi_token*, %struct.scpi_token** %2
%4 = call i32 @scpi_free_some_tokens(%struct.scpi_token* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.scpi_token = type { i32 }
define void @scpi_free_tokens(%struct.scpi_token* %0) {
%2 = tail call i32 @scpi_free_some_tokens(%struct.scpi_token* %0, i32* null)
ret void
}
void msg_encode_end(struct encode_context *ectxt) {}


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

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

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

LLVM IR (-O2):
%struct.encode_context = type opaque
define void @msg_encode_end(%struct.encode_context* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_array();
int /*<<< orphan*/ test_cast_signed();
int /*<<< orphan*/ test_cast_unsigned();
int main(void) {
  test_array();
  test_cast_signed();
  test_cast_unsigned();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_array()
%2 = tail call i32 (...) @test_cast_signed()
%3 = tail call i32 (...) @test_cast_unsigned()
ret i32 0
}
int intmax(register int x, register int y) { return x < y ? y : x; }


x86 assembly (clang, -O0):
<intmax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <intmax+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <intmax+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @intmax(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
void swap(int *A, int pos1, int pos2) {
  int temp = A[pos1];
  A[pos1] = A[pos2];
  A[pos2] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ foo(int);
int main(void) {
  foo(42);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2a,%edi
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2a,%edi
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 42)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 42)
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ floor(float);
float checkerboard(float x, float y) {
  x -= floor(x);
  y -= floor(y);
  return (x < .499999) ^ (y < .499999);
}


x86 assembly (clang, -O0):
<checkerboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <floor@plt>
cvtsi2ss %rax,%xmm1
movss  -0x4(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
cvtsi2ss %rax,%xmm1
movss  -0x8(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe93(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe76(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
xor    %ecx,%eax
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkerboard>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
call   1030 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  (%rsp),%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
movss  0x4(%rsp),%xmm0
call   1030 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  (%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xea5(%rip),%xmm2
ucomisd %xmm1,%xmm2
seta   %al
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
ucomisd %xmm0,%xmm2
seta   %cl
xor    %al,%cl
movzbl %cl,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @checkerboard(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = call i64 @floor(float %5)
%7 = sitofp i64 %6 to float
%8 = load float, float* %3
%9 = fsub float %8, %7
store float %9, float* %3
%10 = load float, float* %4
%11 = call i64 @floor(float %10)
%12 = sitofp i64 %11 to float
%13 = load float, float* %4
%14 = fsub float %13, %12
store float %14, float* %4
%15 = load float, float* %3
%16 = fpext float %15 to double
%17 = fcmp olt double %16, 4.999990e-01
%18 = zext i1 %17 to i32
%19 = load float, float* %4
%20 = fpext float %19 to double
%21 = fcmp olt double %20, 4.999990e-01
%22 = zext i1 %21 to i32
%23 = xor i32 %18, %22
%24 = sitofp i32 %23 to float
ret float %24
}

LLVM IR (-O2):
define float @checkerboard(float %0, float %1) {
%3 = tail call i64 @floor(float %0)
%4 = sitofp i64 %3 to float
%5 = fsub float %0, %4
%6 = tail call i64 @floor(float %1)
%7 = sitofp i64 %6 to float
%8 = fsub float %1, %7
%9 = fpext float %5 to double
%10 = fcmp olt double %9, 4.999990e-01
%11 = fpext float %8 to double
%12 = fcmp olt double %11, 4.999990e-01
%13 = xor i1 %10, %12
%14 = uitofp i1 %13 to float
ret float %14
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
unsigned int fflush(int /*<<< orphan*/);
unsigned int putchar(unsigned int);
int /*<<< orphan*/ stdout;
void Sys_PutChar(unsigned c) {
  unsigned ret;
  ret = putchar(c);
  assert(ret == c);
  ret = fflush(stdout);
  assert(ret == 0);
}


x86 assembly (clang, -O0):
<Sys_PutChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <putchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_PutChar>:
push   %rbx
mov    %edi,%ebx
call   1030 <putchar@plt>
xor    %edi,%edi
cmp    %ebx,%eax
sete   %dil
call   1040 <assert@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rbx
jmp    1040 <assert@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @Sys_PutChar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @putchar(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp eq i32 %6, %7
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* @stdout
%12 = call i32 @fflush(i32 %11)
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @Sys_PutChar(i32 %0) {
%2 = tail call i32 @putchar(i32 %0)
%3 = icmp eq i32 %2, %0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fflush(i32 %6)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
ret void
}
/* Variables and functions */
int close(int);
int file_close(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<file_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @file_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t mp2vpicx_get_intradc(const uint8_t *p_mp2vpicx) {
  return ((p_mp2vpicx[6] & 0x0c) >> 2);
}


x86 assembly (clang, -O0):
<mp2vpicx_get_intradc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
and    $0xc,%eax
sar    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vpicx_get_intradc>:
mov    0x18(%rdi),%eax
shr    $0x2,%eax
and    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @mp2vpicx_get_intradc(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 6
%5 = load i32, i32* %4
%6 = and i32 %5, 12
%7 = ashr i32 %6, 2
ret i32 %7
}

LLVM IR (-O2):
define i32 @mp2vpicx_get_intradc(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 6
%3 = load i32, i32* %2
%4 = lshr i32 %3, 2
%5 = and i32 %4, 3
ret i32 %5
}
void func3() {
  int local_var;
  static char my_static_local_l = 'a';
}


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

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

LLVM IR (-O0):
@func3.my_static_local_l = internal global i8 97
define void @func3() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @func3() {
ret void
}
void if_close_all(void) {}


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

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

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

LLVM IR (-O2):
define void @if_close_all() {
ret void
}
void RTDbgAsCreate(void) {}


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

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

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

LLVM IR (-O2):
define void @RTDbgAsCreate() {
ret void
}
int test_imm_35uint8_reg(unsigned char val) {
  return ((val) & (-0x35 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_35uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffcb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_35uint8_reg>:
test   $0xcb,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_35uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -53
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ test1(char *);
int /*<<< orphan*/ test2(char *);
int /*<<< orphan*/ test3(char *);
int /*<<< orphan*/ test4(char *);
int /*<<< orphan*/ test5(char *);
int /*<<< orphan*/ test6(char *);
int /*<<< orphan*/ test7(char *);
int main() {
  char buf[10];
  test1(buf);
  test2(buf);
  test3(buf);
  test4(buf);
  test5(buf);
  test6(buf);
  test7(buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xe(%rbp),%rdi
call   1060 <test1@plt>
lea    -0xe(%rbp),%rdi
call   1090 <test2@plt>
lea    -0xe(%rbp),%rdi
call   1050 <test3@plt>
lea    -0xe(%rbp),%rdi
call   1080 <test4@plt>
lea    -0xe(%rbp),%rdi
call   1040 <test5@plt>
lea    -0xe(%rbp),%rdi
call   1070 <test6@plt>
lea    -0xe(%rbp),%rdi
call   1030 <test7@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <test1@plt>
mov    %rbx,%rdi
call   1090 <test2@plt>
mov    %rbx,%rdi
call   1050 <test3@plt>
mov    %rbx,%rdi
call   1080 <test4@plt>
mov    %rbx,%rdi
call   1040 <test5@plt>
mov    %rbx,%rdi
call   1070 <test6@plt>
mov    %rbx,%rdi
call   1030 <test7@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = call i32 @test1(i8* %3)
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%6 = call i32 @test2(i8* %5)
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%8 = call i32 @test3(i8* %7)
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%10 = call i32 @test4(i8* %9)
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%12 = call i32 @test5(i8* %11)
%13 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%14 = call i32 @test6(i8* %13)
%15 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%16 = call i32 @test7(i8* %15)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @test1(i8* %2)
%4 = call i32 @test2(i8* %2)
%5 = call i32 @test3(i8* %2)
%6 = call i32 @test4(i8* %2)
%7 = call i32 @test5(i8* %2)
%8 = call i32 @test6(i8* %2)
%9 = call i32 @test7(i8* %2)
ret i32 0
}
/* Variables and functions */
int f413(int *);
int f414(int *p) { return f413(p); }


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

x86 assembly (clang, -O2):
<f414>:
jmp    1030 <f413@plt>

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

LLVM IR (-O2):
define i32 @f414(i32* %0) {
%2 = tail call i32 @f413(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t c_ret_i32() { return -1; }


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

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

LLVM IR (-O0):
define i32 @c_ret_i32() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @c_ret_i32() {
ret i32 -1
}
/* Variables and functions */
int STC31xx_Write(int, int, unsigned char *);
int STC311x_WriteDataToRam(unsigned char *RamData) {
  return (STC31xx_Write(16, 0x20, RamData));
}


x86 assembly (clang, -O0):
<STC311x_WriteDataToRam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x10,%edi
mov    $0x20,%esi
call   1030 <STC31xx_Write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STC311x_WriteDataToRam>:
mov    %rdi,%rdx
mov    $0x10,%edi
mov    $0x20,%esi
jmp    1030 <STC31xx_Write@plt>

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

LLVM IR (-O2):
define i32 @STC311x_WriteDataToRam(i8* %0) {
%2 = tail call i32 @STC31xx_Write(i32 16, i32 32, i8* %0)
ret i32 %2
}
int main(void) {
  unsigned char x;
  x;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ _computeFib(long);
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ scanf(char *, long *);
long _main() {
  long EV_input;
  scanf("%ld", &EV_input);
  printf("%ld\n", (long)_computeFib(EV_input));
  return 0;
}


x86 assembly (clang, -O0):
<_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <_computeFib@plt>
mov    %rax,%rsi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_main>:
push   %rax
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    (%rsp),%rdi
call   1040 <_computeFib@plt>
lea    0xeb4(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i64 @_main() {
%1 = alloca i64
%2 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%3 = load i64, i64* %1
%4 = call i64 @_computeFib(i64 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %4)
ret i64 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i64 @_main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = call i64 @_computeFib(i64 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %5)
ret i64 0
}
/* Variables and functions */
scalar_t__ getuid();
int isAuthenticatedAsRoot(void) {
  if (getuid() == 0) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isAuthenticatedAsRoot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getuid@plt>
cmp    $0x0,%rax
jne    1135 <isAuthenticatedAsRoot+0x25>
movl   $0x1,-0x4(%rbp)
jmp    113c <isAuthenticatedAsRoot+0x2c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAuthenticatedAsRoot>:
push   %rax
xor    %eax,%eax
call   1030 <getuid@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isAuthenticatedAsRoot() {
%1 = alloca i32
%2 = call i64 (...) @getuid()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %6
5: ; preds = %0
store i32 0, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @isAuthenticatedAsRoot() {
%1 = tail call i64 (...) @getuid()
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ random_rand();
float random_float_1(void) {
  return 2.0f * ((float)random_rand() / (unsigned int)0xFFFFFFFF) - 1.0f;
}


x86 assembly (clang, -O0):
<random_float_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <random_rand@plt>
cvtsi2ss %rax,%xmm0
movss  0xedc(%rip),%xmm1
divss  %xmm1,%xmm0
addss  %xmm0,%xmm0
movss  0xec8(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_float_1>:
push   %rax
xor    %eax,%eax
call   1030 <random_rand@plt>
cvtsi2ss %rax,%xmm0
mulss  0xedb(%rip),%xmm0
addss  %xmm0,%xmm0
addss  0xed3(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @random_float_1() {
%1 = call i64 (...) @random_rand()
%2 = sitofp i64 %1 to float
%3 = fdiv float %2, 0x41F0000000000000
%4 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %3, float -1.000000e+00)
ret float %4
}

LLVM IR (-O2):
define float @random_float_1() {
%1 = tail call i64 (...) @random_rand()
%2 = sitofp i64 %1 to float
%3 = fmul float %2, 0x3DF0000000000000
%4 = tail call float @llvm.fmuladd.f32(float %3, float 2.000000e+00, float -1.000000e+00)
ret float %4
}