xunge/DecIR huggingface dataset:
/* Variables and functions */
int getegid();
int geteuid();
int getgid();
int getuid();
int /*<<< orphan*/ printf(char *, int, int);
void EUID_PRINT(void) {
  printf("debug: uid %d, euid %d\n", getuid(), geteuid());
  printf("debug: gid %d, egid %d\n", getgid(), getegid());
}


x86 assembly (clang, -O0):
<EUID_PRINT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <geteuid@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getgid@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1070 <getegid@plt>
mov    -0x4(%rbp),%esi
mov    %eax,%edx
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EUID_PRINT>:
push   %rbx
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <geteuid@plt>
lea    0xe98(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <getgid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <getegid@plt>
lea    0xe90(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"debug: uid %d, euid %d\0A\00"
@.str.1 = [24 x i8] c"debug: gid %d, egid %d\0A\00"
define void @EUID_PRINT() {
%1 = call i32 (...) @getuid()
%2 = call i32 (...) @geteuid()
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = call i32 (...) @getgid()
%5 = call i32 (...) @getegid()
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"debug: uid %d, euid %d\0A\00"
@.str.1 = [24 x i8] c"debug: gid %d, egid %d\0A\00"
define void @EUID_PRINT() {
%1 = tail call i32 (...) @getuid()
%2 = tail call i32 (...) @geteuid()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = tail call i32 (...) @getgid()
%5 = tail call i32 (...) @getegid()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ openseq(int);
void op_openseq() { openseq(1); }


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

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

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

LLVM IR (-O2):
define void @op_openseq() {
%1 = tail call i32 @openseq(i32 1)
ret void
}
int fn2(int a, int b) {
  int tem1 = b + a;
  int tem2 = a | b;
  return tem1 - tem2;
}


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

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

LLVM IR (-O0):
define i32 @fn2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = or i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @fn2(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
int sum(int k) {
  static int y = 0;
  for (int i = 1; i <= k; i++)
    y += i;
  return y;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1137 <sum+0x37>
mov    -0x8(%rbp),%eax
add    0x2f01(%rip),%eax
mov    %eax,0x2efb(%rip)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <sum+0xe>
mov    0x2ee7(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
mov    0x2f1e(%rip),%eax
test   %edi,%edi
jle    1125 <sum+0x25>
lea    (%rax,%rdi,2),%eax
lea    -0x1(%rdi),%ecx
add    $0xfffffffe,%edi
imul   %rcx,%rdi
shr    %rdi
add    %edi,%eax
add    $0xffffffff,%eax
mov    %eax,0x2eff(%rip)
ret

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

LLVM IR (-O2):
@sum.y = internal unnamed_addr global i32 0
define i32 @sum(i32 %0) {
%2 = load i32, i32* @sum.y
%3 = icmp slt i32 %0, 1
br i1 %3, label %16, label %4
4: ; preds = %1
%5 = shl nuw i32 %0, 1
%6 = add i32 %2, %5
%7 = add nsw i32 %0, -1
%8 = zext i32 %7 to i33
%9 = add nsw i32 %0, -2
%10 = zext i32 %9 to i33
%11 = mul i33 %8, %10
%12 = lshr i33 %11, 1
%13 = trunc i33 %12 to i32
%14 = add i32 %6, %13
%15 = add i32 %14, -1
store i32 %15, i32* @sum.y
br label %16
16: ; preds = %4, %1
%17 = phi i32 [ %15, %4 ], [ %2, %1 ]
ret i32 %17
}
unsigned int new_style_hook(const struct nf_hook_ops *ops, struct sk_buff *skb,
                            const struct net_device *in,
                            const struct net_device *out,
                            int (*okfn)(struct sk_buff *)) {
  (void)ops;
  (void)skb;
  (void)in;
  (void)out;
  (void)okfn;
  return 0;
}


x86 assembly (clang, -O0):
<new_style_hook>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.nf_hook_ops = type opaque
%struct.sk_buff = type opaque
%struct.net_device = type opaque
define i32 @new_style_hook(%struct.nf_hook_ops* %0, %struct.sk_buff* %1, %struct.net_device* %2, %struct.net_device* %3, i32 (%struct.sk_buff*)* %4) {
%6 = alloca %struct.nf_hook_ops*
%7 = alloca %struct.sk_buff*
%8 = alloca %struct.net_device*
%9 = alloca %struct.net_device*
%10 = alloca i32 (%struct.sk_buff*)*
store %struct.nf_hook_ops* %0, %struct.nf_hook_ops** %6
store %struct.sk_buff* %1, %struct.sk_buff** %7
store %struct.net_device* %2, %struct.net_device** %8
store %struct.net_device* %3, %struct.net_device** %9
store i32 (%struct.sk_buff*)* %4, i32 (%struct.sk_buff*)** %10
%11 = load %struct.nf_hook_ops*, %struct.nf_hook_ops** %6
%12 = load %struct.sk_buff*, %struct.sk_buff** %7
%13 = load %struct.net_device*, %struct.net_device** %8
%14 = load %struct.net_device*, %struct.net_device** %9
%15 = load i32 (%struct.sk_buff*)*, i32 (%struct.sk_buff*)** %10
ret i32 0
}

LLVM IR (-O2):
%struct.nf_hook_ops = type opaque
%struct.sk_buff = type opaque
%struct.net_device = type opaque
define i32 @new_style_hook(%struct.nf_hook_ops* nocapture readnone %0, %struct.sk_buff* nocapture readnone %1, %struct.net_device* nocapture readnone %2, %struct.net_device* nocapture readnone %3, i32 (%struct.sk_buff*)* nocapture readnone %4) {
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dapxsumpw(int, double, double *, int);
int main() {
  double x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dapxsumpw(N, 5.0, x, stride);
  printf("sum: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x40,%edx
call   1050 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%edx
movsd  0xe93(%rip),%xmm0
call   1030 <stdlib_strided_dapxsumpw@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xecd(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf15(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
movsd  0xea5(%rip),%xmm0
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1030 <stdlib_strided_dapxsumpw@plt>
lea    0xedc(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [10 x i8] c"sum: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dapxsumpw(i32 %6, double 5.000000e+00, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [10 x i8] c"sum: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dapxsumpw(i32 4, double 5.000000e+00, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int omp_get_num_threads();
int main(int argc, char **argv) {
  __VERIFIER_assert(omp_get_num_threads() == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <omp_get_num_threads@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <omp_get_num_threads@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @omp_get_num_threads()
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
%9 = call i32 @__VERIFIER_assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @omp_get_num_threads()
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
%6 = tail call i32 @__VERIFIER_assert(i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ninja();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, long *);
int main() {
  long int num = 0;
  scanf("%ld", &num);
  printf("%ld\n", ninja());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movq   $0x0,(%rsp)
lea    0xec0(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
call   1050 <ninja@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
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 i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %2)
%4 = call i32 (...) @ninja()
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 0, i64* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = call i32 (...) @ninja()
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
void X509_VERIFY_PARAM_set1(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_VERIFY_PARAM_set1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_something_during_setup() { printf("\tI was called during setup\n"); }


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"\09I was called during setup\0A\00"
define void @print_something_during_setup() {
%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"\09I was called during setup\00"
define void @print_something_during_setup() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *display;
};
struct TYPE_4__ {
  TYPE_1__ xselectionclear;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XEvent_xselectionclear_display(void *_p, void *_v) {
  ((XEvent *)_p)->xselectionclear.display = (Display *)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xselectionclear_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
void foo_1_1_2_1_1_1_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_2_1_1_1_2_1_1() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int n_properties;
};
typedef TYPE_1__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_n_properties(void *_p, int _v) {
  ((XFontStruct *)_p)->n_properties = (int)_v;
}


x86 assembly (clang, -O0):
<set_XFontStruct_n_properties>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XFontStruct_n_properties>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XFontStruct_n_properties(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void usage(void) { puts("USAGE: test_simple UID [CGROUP_PATH]"); }


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"USAGE: test_simple UID [CGROUP_PATH]\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"USAGE: test_simple UID [CGROUP_PATH]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void internal_endent(FILE **stream) {
  if (*stream != NULL) {
    fclose(*stream);
    *stream = NULL;
  }
}


x86 assembly (clang, -O0):
<internal_endent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1141 <internal_endent+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <fclose@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<internal_endent>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1128 <internal_endent+0x18>
call   1030 <fclose@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @internal_endent(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
store i32* null, i32** %0
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int hash(int /*<<< orphan*/ *, size_t, int /*<<< orphan*/ const *, size_t, int,
         int);
int keccak_224(uint8_t *out, size_t outlen, const uint8_t *in, size_t inlen) {
  if (outlen > (224 / 8)) {
    return -1;
  }
  return hash(out, outlen, in, inlen, 200 - (224 / 4), 0x01);
}


x86 assembly (clang, -O0):
<keccak_224>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x1c,-0x18(%rbp)
jbe    113f <keccak_224+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <keccak_224+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x90,%r8d
mov    $0x1,%r9d
call   1030 <hash@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keccak_224>:
cmp    $0x1c,%rsi
jbe    111c <keccak_224+0xc>
mov    $0xffffffff,%eax
ret
mov    $0x90,%r8d
mov    $0x1,%r9d
jmp    1030 <hash@plt>

LLVM IR (-O0):
define i32 @keccak_224(i32* %0, i64 %1, i32* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i64
store i32* %0, i32** %6
store i64 %1, i64* %7
store i32* %2, i32** %8
store i64 %3, i64* %9
%10 = load i64, i64* %7
%11 = icmp ugt i64 %10, 28
br i1 %11, label %12, label %13
12: ; preds = %4
store i32 -1, i32* %5
br label %19
13: ; preds = %4
%14 = load i32*, i32** %6
%15 = load i64, i64* %7
%16 = load i32*, i32** %8
%17 = load i64, i64* %9
%18 = call i32 @hash(i32* %14, i64 %15, i32* %16, i64 %17, i32 144, i32 1)
store i32 %18, i32* %5
br label %19
19: ; preds = %13, %12
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @keccak_224(i32* %0, i64 %1, i32* %2, i64 %3) {
%5 = icmp ugt i64 %1, 28
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @hash(i32* %0, i64 %1, i32* %2, i64 %3, i32 144, i32 1)
br label %8
8: ; preds = %4, %6
%9 = phi i32 [ %7, %6 ], [ -1, %4 ]
ret i32 %9
}
/* Type definitions */
struct timeval {
  int tv_sec;
  long long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long long get_time_srad() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (tv.tv_sec * 1000000) + tv.tv_usec;
}


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

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

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

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @get_time_srad() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %9, %7
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ raiseerr(int);
scalar_t__ send(int, char *, int, int /*<<< orphan*/);
int send_repl_client_len(int send_sock, char *msg, int len) {
  if (send(send_sock, msg, len, 0) < 0) {
    raiseerr(4);
    close(send_sock);
  }
  return 0;
}


x86 assembly (clang, -O0):
<send_repl_client_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1040 <send@plt>
cmp    $0x0,%rax
jge    116f <send_repl_client_len+0x3f>
mov    $0x4,%edi
call   1030 <raiseerr@plt>
mov    -0x4(%rbp),%edi
call   1050 <close@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_repl_client_len>:
push   %rbx
mov    %edi,%ebx
xor    %ecx,%ecx
call   1040 <send@plt>
test   %rax,%rax
jns    1150 <send_repl_client_len+0x20>
mov    $0x4,%edi
call   1030 <raiseerr@plt>
mov    %ebx,%edi
call   1050 <close@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @send_repl_client_len(i32 %0, i8* %1, i32 %2) {
%4 = tail call i64 @send(i32 %0, i8* %1, i32 %2, i32 0)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @raiseerr(i32 4)
%8 = tail call i32 @close(i32 %0)
br label %9
9: ; preds = %6, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int main() {
  int x;
  unsigned long long uv = 0x1000000001ULL;
  x = (uv < 0x80) ? 1 : ((uv < 0x800) ? 2 : 3);
  if (x != 3)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movabs $0x1000000001,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x80,-0x10(%rbp)
jae    1148 <main+0x38>
mov    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1163 <main+0x53>
mov    -0x10(%rbp),%rdx
mov    $0x3,%eax
mov    $0x2,%ecx
cmp    $0x800,%rdx
cmovb  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     117a <main+0x6a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
store i32 0, i32* %1
store i64 68719476737, i64* %3
%4 = load i64, i64* %3
%5 = icmp ult i64 %4, 128
br i1 %5, label %6, label %7
6: ; preds = %0
br label %12
7: ; preds = %0
%8 = load i64, i64* %3
%9 = icmp ult i64 %8, 2048
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 2, i32 3
br label %12
12: ; preds = %7, %6
%13 = phi i32 [ 1, %6 ], [ %11, %7 ]
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = icmp ne i32 %14, 3
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number;
  printf("\033[H\033[J");
  printf("Enter your number in the box below\n"
         "+-----------------+\n"
         "|                 |\n"
         "+-----------------+\n");
  printf("\033[%d;%dH", (3), (2));
  scanf("%d", &number);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%rdi
mov    $0x3,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[H\1B[J\00"
@.str.1 = [96 x i8] c"Enter your number in the box below\0A+-----------------+\0A| |\0A+-----------------+\0A\00"
@.str.2 = [9 x i8] c"\1B[%d;%dH\00"
@.str.3 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 3, i32 2)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[H\1B[J\00"
@.str.2 = [9 x i8] c"\1B[%d;%dH\00"
@.str.3 = [3 x i8] c"%d\00"
@str = [95 x i8] c"Enter your number in the box below\0A+-----------------+\0A| |\0A+-----------------+\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 3, i32 2)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
ret i32 0
}
int main(int argc, char **argv) {
  int x;
  float r = argc;
  if (!(0 > r)) {
    x = 7;
  } else {
    x = 42;
  }
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x18(%rbp),%xmm0
ja     1135 <main+0x35>
movl   $0x7,-0x14(%rbp)
jmp    113c <main+0x3c>
movl   $0x2a,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
test   %edi,%edi
mov    $0x2a,%ecx
mov    $0x7,%eax
cmovs  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to float
store float %9, float* %7
%10 = load float, float* %7
%11 = fcmp ogt float 0.000000e+00, %10
br i1 %11, label %13, label %12
12: ; preds = %2
store i32 7, i32* %6
br label %14
13: ; preds = %2
store i32 42, i32* %6
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %6
ret i32 %15
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp slt i32 %0, 0
%4 = select i1 %3, i32 42, i32 7
ret i32 %4
}
void usage(char *prog_name) {
  printf("usage : %s [dev_path] [get|set] [user] (number of queue)\n"
         "%*s [dev_path] [del] [QID]\n",
         prog_name, (int)(8 + strlen(prog_name)), "");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rsi
add    $0x8,%rax
mov    %eax,%edx
lea    0xeb2(%rip),%rdi
lea    0xeff(%rip),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x8(%rax),%edx
lea    0xecd(%rip),%rdi
lea    0xf1a(%rip),%rcx
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [85 x i8] c"usage : %s [dev_path] [get|set] [user] (number of queue)\0A%*s [dev_path] [del] [QID]\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add i64 8, %5
%7 = trunc i64 %6 to i32
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [85 x i8] c"usage : %s [dev_path] [get|set] [user] (number of queue)\0A%*s [dev_path] [del] [QID]\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @usage(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add i32 %3, 8
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char const *, char const *);
int is_substring(const char *haystack, const char *needle) {
  return strstr(haystack, needle) != NULL;
}


x86 assembly (clang, -O0):
<is_substring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_substring(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32* @strstr(i8* %5, i8* %6)
%8 = icmp ne i32* %7, null
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_substring(i8* %0, i8* nocapture %1) {
%3 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_LESS;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ glClearColor(float, float, float, float);
int /*<<< orphan*/ glClearDepth(double);
int /*<<< orphan*/ glDepthFunc(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void InitGL(int Width, int Height) {
  glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
  glClearDepth(1.0);
  glDepthFunc(GL_LESS);
  glEnable(GL_DEPTH_TEST);
  glShadeModel(GL_SMOOTH);
}


x86 assembly (clang, -O0):
<InitGL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1050 <glClearColor@plt>
movsd  0xe89(%rip),%xmm0
call   1060 <glClearDepth@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
call   1040 <glDepthFunc@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%edi
call   1070 <glShadeModel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitGL>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1050 <glClearColor@plt>
movsd  0xe96(%rip),%xmm0
call   1060 <glClearDepth@plt>
mov    0x2e52(%rip),%rax
mov    (%rax),%edi
call   1040 <glDepthFunc@plt>
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1070 <glShadeModel@plt>

LLVM IR (-O0):
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_SMOOTH = global i32 0
define void @InitGL(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00)
%6 = call i32 @glClearDepth(double 1.000000e+00)
%7 = load i32, i32* @GL_LESS
%8 = call i32 @glDepthFunc(i32 %7)
%9 = load i32, i32* @GL_DEPTH_TEST
%10 = call i32 @glEnable(i32 %9)
%11 = load i32, i32* @GL_SMOOTH
%12 = call i32 @glShadeModel(i32 %11)
ret void
}

LLVM IR (-O2):
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_SMOOTH = global i32 0
define void @InitGL(i32 %0, i32 %1) {
%3 = tail call i32 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00)
%4 = tail call i32 @glClearDepth(double 1.000000e+00)
%5 = load i32, i32* @GL_LESS
%6 = tail call i32 @glDepthFunc(i32 %5)
%7 = load i32, i32* @GL_DEPTH_TEST
%8 = tail call i32 @glEnable(i32 %7)
%9 = load i32, i32* @GL_SMOOTH
%10 = tail call i32 @glShadeModel(i32 %9)
ret void
}
int do_699() { return 699; }


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

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

LLVM IR (-O0):
define i32 @do_699() {
ret i32 699
}

LLVM IR (-O2):
define i32 @do_699() {
ret i32 699
}
void bcd_convert_8bit(unsigned char num, char *dest) {
  dest[0] = (num / 100);
  dest[1] = ((num % 100) / 10);
  dest[2] = (num % 10);
}


x86 assembly (clang, -O0):
<bcd_convert_8bit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
movzbl -0x1(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
movzbl -0x1(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %dl,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcd_convert_8bit>:
lea    (%rdi,%rdi,4),%eax
lea    (%rdi,%rax,8),%eax
shr    $0xc,%eax
mov    %al,(%rsi)
imul   $0x64,%eax,%eax
mov    %edi,%ecx
sub    %al,%cl
movzbl %cl,%eax
imul   $0xcd,%eax,%eax
shr    $0xb,%eax
mov    %al,0x1(%rsi)
imul   $0xcd,%edi,%eax
shr    $0xa,%eax
and    $0xfffffffe,%eax
lea    (%rax,%rax,4),%eax
sub    %al,%dil
mov    %dil,0x2(%rsi)
ret

LLVM IR (-O0):
define void @bcd_convert_8bit(i8 zeroext %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 = zext i8 %5 to i32
%7 = sdiv i32 %6, 100
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = srem i32 %12, 100
%14 = sdiv i32 %13, 10
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
%18 = load i8, i8* %3
%19 = zext i8 %18 to i32
%20 = srem i32 %19, 10
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i64 2
store i8 %21, i8* %23
ret void
}

LLVM IR (-O2):
define void @bcd_convert_8bit(i8 zeroext %0, i8* nocapture writeonly %1) {
%3 = udiv i8 %0, 100
store i8 %3, i8* %1
%4 = urem i8 %0, 100
%5 = udiv i8 %4, 10
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = urem i8 %0, 10
%8 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %7, i8* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("powershell -executionpolicy bypass \"IEX (New-Object "
         "Net.WebClient).DownloadString('https://raw.githubusercontent.com/"
         "metalx1000/MyBin/master/games/mame/punisher/punisher.ps1'); \"");
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [179 x i8] c"powershell -executionpolicy bypass \22IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/metalx1000/MyBin/master/games/mame/punisher/punisher.ps1'); \22\00"
define i32 @main() {
%1 = call i32 @system(i8* getelementptr inbounds ([179 x i8], [179 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [179 x i8] c"powershell -executionpolicy bypass \22IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/metalx1000/MyBin/master/games/mame/punisher/punisher.ps1'); \22\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([179 x i8], [179 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double _log(double);
double log(double x) { return _log(x); }


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

x86 assembly (clang, -O2):
<log>:
jmp    1030 <_log@plt>

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

LLVM IR (-O2):
define double @log(double %0) {
%2 = tail call double @_log(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ coolant_stop();
void coolant_init() { coolant_stop(); }


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

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

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

LLVM IR (-O2):
define void @coolant_init() {
%1 = tail call i32 (...) @coolant_stop()
ret void
}
void ARGBToUYVY() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToUYVY() {
ret void
}
void inc_zcache_eph_pageframes(void) {}


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

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

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

LLVM IR (-O2):
define void @inc_zcache_eph_pageframes() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void end_user_section() { write("csv-task.csv", "break\n", NULL); }


x86 assembly (clang, -O0):
<end_user_section>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_user_section>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [7 x i8] c"break\0A\00"
define void @end_user_section() {
%1 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [7 x i8] c"break\0A\00"
define void @end_user_section() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
int GetNumber(int pos) { return pos * pos; }


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

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

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

LLVM IR (-O2):
define i32 @GetNumber(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
int ll_front_merge_fn(struct request_queue *q, struct request *req,
                      struct bio *bio) {
  int a;
  return a;
}


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

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

LLVM IR (-O0):
%struct.request_queue = type opaque
%struct.request = type opaque
%struct.bio = type opaque
define i32 @ll_front_merge_fn(%struct.request_queue* %0, %struct.request* %1, %struct.bio* %2) {
%4 = alloca %struct.request_queue*
%5 = alloca %struct.request*
%6 = alloca %struct.bio*
%7 = alloca i32
store %struct.request_queue* %0, %struct.request_queue** %4
store %struct.request* %1, %struct.request** %5
store %struct.bio* %2, %struct.bio** %6
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
%struct.request_queue = type opaque
%struct.request = type opaque
%struct.bio = type opaque
define i32 @ll_front_merge_fn(%struct.request_queue* nocapture readnone %0, %struct.request* nocapture readnone %1, %struct.bio* nocapture readnone %2) {
ret i32 undef
}
long long unsigned str2llu(str)
char *str;
{
  long long unsigned acc;
  int d;
  acc = *str++ - '0';
  for (;;) {
    d = *str++;
    if (d == '\0')
      break;
    d -= '0';
    acc = acc * 10 + d;
  }
  return acc;
}


x86 assembly (clang, -O0):
<str2llu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
sub    $0x30,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1147 <str2llu+0x47>
jmp    1165 <str2llu+0x65>
mov    -0x14(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x14(%rbp)
imul   $0xa,-0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1123 <str2llu+0x23>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2llu>:
movsbq (%rdi),%rax
add    $0xffffffffffffffd0,%rax
mov    0x1(%rdi),%cl
test   %cl,%cl
je     113b <str2llu+0x3b>
add    $0x2,%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbq %cl,%rcx
lea    (%rax,%rax,4),%rax
lea    (%rcx,%rax,2),%rax
add    $0xffffffffffffffd0,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <str2llu+0x20>
ret

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

LLVM IR (-O2):
define i64 @str2llu(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i64
%4 = add nsw i64 %3, -48
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %19, label %8
8: ; preds = %1, %8
%9 = phi i8 [ %17, %8 ], [ %6, %1 ]
%10 = phi i8* [ %16, %8 ], [ %5, %1 ]
%11 = phi i64 [ %15, %8 ], [ %4, %1 ]
%12 = sext i8 %9 to i64
%13 = mul i64 %11, 10
%14 = add i64 %13, -48
%15 = add i64 %14, %12
%16 = getelementptr inbounds i8, i8* %10, i64 1
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %8
19: ; preds = %8, %1
%20 = phi i64 [ %4, %1 ], [ %15, %8 ]
ret i64 %20
}