xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ update();
loose() {
  printf("You win\n");
  update();
}


x86 assembly (clang, -O0):
<loose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <update@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loose>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <update@plt>

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

LLVM IR (-O2):
@str = [8 x i8] c"You win\00"
define i32 @loose() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @update()
ret i32 undef
}
void Weights_init(double *weights) {
  int j;
  for (j = 0; j < 8; j++) {
    *(weights + j) = 0;
  }
}


x86 assembly (clang, -O0):
<Weights_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1137 <Weights_init+0x37>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <Weights_init+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Weights_init>:
xorps  %xmm0,%xmm0
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @Weights_init(double* %0) {
%2 = alloca double*
%3 = alloca i32
store double* %0, double** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 8
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load double*, double** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds double, double* %8, i64 %10
store double 0.000000e+00, double* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @Weights_init(double* nocapture writeonly %0) {
%2 = bitcast double* %0 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int /*<<< orphan*/ g(int);
int /*<<< orphan*/ h(int);
void main(int i) {
  f(1);
  f(1);
  g(1);
  g(1);
  h(1);
  h(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <f@plt>
mov    $0x1,%edi
call   1040 <f@plt>
mov    $0x1,%edi
call   1050 <g@plt>
mov    $0x1,%edi
call   1050 <g@plt>
mov    $0x1,%edi
call   1030 <h@plt>
mov    $0x1,%edi
call   1030 <h@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <f@plt>
mov    $0x1,%edi
call   1040 <f@plt>
mov    $0x1,%edi
call   1050 <g@plt>
mov    $0x1,%edi
call   1050 <g@plt>
mov    $0x1,%edi
call   1030 <h@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <h@plt>

LLVM IR (-O0):
define void @main(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @f(i32 1)
%4 = call i32 @f(i32 1)
%5 = call i32 @g(i32 1)
%6 = call i32 @g(i32 1)
%7 = call i32 @h(i32 1)
%8 = call i32 @h(i32 1)
ret void
}

LLVM IR (-O2):
define void @main(i32 %0) {
%2 = tail call i32 @f(i32 1)
%3 = tail call i32 @f(i32 1)
%4 = tail call i32 @g(i32 1)
%5 = tail call i32 @g(i32 1)
%6 = tail call i32 @h(i32 1)
%7 = tail call i32 @h(i32 1)
ret void
}
int main() {
  const int ntasks = 4;
  int out[4];
#pragma omp target device(smp) copy_out(out [0:ntasks - 1])
#pragma omp task inout(out [0:ntasks - 1])
  { ntasks; }
#pragma omp taskwait
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%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 i32
%3 = alloca [4 x i32]
store i32 0, i32* %1
store i32 4, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void ff_frame_thread_encoder_free() {}


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

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

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

LLVM IR (-O2):
define void @ff_frame_thread_encoder_free() {
ret void
}
/* Variables and functions */
scalar_t__ rng_dbl();
float rng_flt(void) { return (float)rng_dbl(); }


x86 assembly (clang, -O0):
<rng_flt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rng_dbl@plt>
cvtsi2ss %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rng_flt>:
push   %rax
xor    %eax,%eax
call   1030 <rng_dbl@plt>
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @rng_flt() {
%1 = call i64 (...) @rng_dbl()
%2 = sitofp i64 %1 to float
ret float %2
}

LLVM IR (-O2):
define float @rng_flt() {
%1 = tail call i64 (...) @rng_dbl()
%2 = sitofp i64 %1 to float
ret float %2
}
void Resetbufer(unsigned char *buf, int size) {
  int i;
  for (i = 0; i < size; i++) {
    buf[i] = '0';
  }
}


x86 assembly (clang, -O0):
<Resetbufer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1138 <Resetbufer+0x38>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x30,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <Resetbufer+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Resetbufer>:
test   %esi,%esi
jle    1125 <Resetbufer+0x15>
push   %rax
mov    %esi,%edx
mov    $0x30,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @Resetbufer(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 48, i8* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @Resetbufer(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ vector;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ find_duplicates(int *, int);
int main(void) {
  int vector[] = {1, 12, 2,  3,  4,  5,  6,  7,  8,  9,  10,
                  5, 11, 12, 13, 14, 15, 16, 17, 15, 18, 7};
  find_duplicates(vector, sizeof(vector) / sizeof(vector[0]));
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x58,%edx
call   1030 <memcpy@plt>
lea    -0x60(%rbp),%rdi
mov    $0x16,%esi
call   1040 <find_duplicates@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
mov    0xf35(%rip),%rax
mov    %rax,0x50(%rsp)
movaps 0xf19(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x16,%esi
call   1030 <find_duplicates@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.vector = [22 x i32] [i32 1, i32 12, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 5, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 15, i32 18, i32 7]
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [22 x i32]
store i32 0, i32* %1
%3 = bitcast [22 x i32]* %2 to i8*
%4 = getelementptr inbounds [22 x i32], [22 x i32]* %2, i64 0, i64 0
%5 = call i32 @find_duplicates(i32* %4, i32 22)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}

LLVM IR (-O2):
@__const.main.vector = [22 x i32] [i32 1, i32 12, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 5, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 15, i32 18, i32 7]
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [22 x i32]
%2 = bitcast [22 x i32]* %1 to i8*
%3 = getelementptr inbounds [22 x i32], [22 x i32]* %1, i64 0, i64 0
%4 = call i32 @find_duplicates(i32* %3, i32 22)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
void g_value_get_uint64() {}


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

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

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

LLVM IR (-O2):
define void @g_value_get_uint64() {
ret void
}
void test_three(int x, int y) {
#pragma omp target teams distribute simd collapse(1)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      ;
}


x86 assembly (clang, -O0):
<test_three>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <test_three+0x56>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1143 <test_three+0x43>
jmp    1135 <test_three+0x35>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <test_three+0x24>
jmp    1148 <test_three+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <test_three+0x11>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_three(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
store i32 0, i32* %5
br label %7
7: ; preds = %21, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %7
store i32 0, i32* %6
br label %12
12: ; preds = %17, %11
%13 = load i32, i32* %6
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %20
16: ; preds = %12
br label %17
17: ; preds = %16
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %12
20: ; preds = %12
br label %21
21: ; preds = %20
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %7
24: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @test_three(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void assertTrue(int cond, char *msg) {
  if (!cond) {
    printf("error: %s\n", msg);
    exit(0);
  }
}


x86 assembly (clang, -O0):
<assertTrue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1150 <assertTrue+0x30>
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assertTrue>:
test   %edi,%edi
je     1125 <assertTrue+0x5>
ret
push   %rax
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"error: %s\0A\00"
define void @assertTrue(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"error: %s\0A\00"
define void @assertTrue(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
ret void
}
/* Variables and functions */
scalar_t__ memcmp(char *, char *, int);
int range_rls(char *rls_seq) {
  if (0 != memcmp("3RAW", rls_seq, 4) && 0 != memcmp("PX3W", rls_seq, 4)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<range_rls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x4,%edx
call   1030 <memcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     116e <range_rls+0x5e>
mov    -0x10(%rbp),%rsi
lea    0xebb(%rip),%rdi
mov    $0x4,%edx
call   1030 <memcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     116e <range_rls+0x5e>
movl   $0x1,-0x4(%rbp)
jmp    1175 <range_rls+0x65>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<range_rls>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <memcmp@plt>
test   %rax,%rax
je     1150 <range_rls+0x40>
lea    0xed1(%rip),%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <memcmp@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1150 <range_rls+0x40>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"3RAW\00"
@.str.1 = [5 x i8] c"PX3W\00"
define i32 @range_rls(i8* %0) {
%2 = tail call i64 @memcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0, i32 4)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 @memcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4, %1
br label %8
8: ; preds = %4, %7
%9 = phi i32 [ 0, %7 ], [ 1, %4 ]
ret i32 %9
}
/* Variables and functions */
unsigned int w5100_readSn_byte(unsigned int, int);
unsigned w5100_readSnRX_RSR(unsigned sock) {
  unsigned res = w5100_readSn_byte(sock, 0x0026);
  res = (res << 8) + w5100_readSn_byte(sock, 0x0026 + 1);
  return res;
}


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

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x26,%esi
call   1030 <w5100_readSn_byte@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
mov    %ebx,%edi
mov    $0x27,%esi
call   1030 <w5100_readSn_byte@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @w5100_readSnRX_RSR(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @w5100_readSn_byte(i32 %4, i32 38)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = shl i32 %6, 8
%8 = load i32, i32* %2
%9 = call i32 @w5100_readSn_byte(i32 %8, i32 39)
%10 = add i32 %7, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @w5100_readSnRX_RSR(i32 %0) {
%2 = tail call i32 @w5100_readSn_byte(i32 %0, i32 38)
%3 = shl i32 %2, 8
%4 = tail call i32 @w5100_readSn_byte(i32 %0, i32 39)
%5 = add i32 %3, %4
ret i32 %5
}
double Lnet(double Lout, double Lin) { return (Lin - Lout); }


x86 assembly (clang, -O0):
<Lnet>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lnet>:
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @Lnet(double %0, double %1) {
%3 = fsub double %1, %0
ret double %3
}
int sfe_ipv6_create_rule(struct sfe_connection_create *sic) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.sfe_connection_create = type opaque
define i32 @sfe_ipv6_create_rule(%struct.sfe_connection_create* nocapture readnone %0) {
ret i32 -1
}
void tegra_isomgr_unregister(void *handle) {}


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

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

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

LLVM IR (-O2):
define void @tegra_isomgr_unregister(i8* nocapture %0) {
ret void
}
unsigned f2u(float x) { return *(unsigned *)&x; }


x86 assembly (clang, -O0):
<f2u>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2u>:
movd   %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @f2u(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
/* Variables and functions */
int numA(int);
int numB(int);
int main(int argc, char *argv[]) {
  int x = numA(10);
  int y = numB(20);
  return x + y;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%edi
call   1040 <numA@plt>
mov    %eax,-0x14(%rbp)
mov    $0x14,%edi
call   1030 <numB@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
call   1040 <numA@plt>
mov    %eax,%ebx
mov    $0x14,%edi
call   1030 <numB@plt>
add    %ebx,%eax
pop    %rbx
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 i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @numA(i32 10)
store i32 %8, i32* %6
%9 = call i32 @numB(i32 20)
store i32 %9, i32* %7
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @numA(i32 10)
%4 = tail call i32 @numB(i32 20)
%5 = add nsw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ kalkulator();
void main() { kalkulator(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @kalkulator()
ret void
}
unsigned Kit_CubeSetLit(unsigned uCube, int i) {
  return uCube | (unsigned)(1 << i);
}


x86 assembly (clang, -O0):
<Kit_CubeSetLit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @Kit_CubeSetLit(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 = shl i32 1, %6
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @Kit_CubeSetLit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = or i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ do_n_times(int);
void do_half_m2_times_quadratic(int m) {
  for (int i = 0; i < m; i++) {
    do_n_times(i);
  }
}


x86 assembly (clang, -O0):
<do_half_m2_times_quadratic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1144 <do_half_m2_times_quadratic+0x34>
mov    -0x8(%rbp),%edi
call   1030 <do_n_times@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <do_half_m2_times_quadratic+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_half_m2_times_quadratic>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    112e <do_half_m2_times_quadratic+0x1e>
mov    %edi,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <do_n_times@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1120 <do_half_m2_times_quadratic+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @do_half_m2_times_quadratic(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @do_n_times(i32 %5)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
/* Variables and functions */
int /*<<< orphan*/ print_verbose(char *);
void print_declined_incoming() { print_verbose("Declined incoming command\n"); }


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"Declined incoming command\0A\00"
define void @print_declined_incoming() {
%1 = call i32 @print_verbose(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Declined incoming command\0A\00"
define void @print_declined_incoming() {
%1 = tail call i32 @print_verbose(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *, float *);
int main() {
  float a, b, MEDIA;
  scanf("%f%f", &a, &b);
  MEDIA = ((a * 3.5) + (b * 7.5)) / 11;
  printf("MEDIA = %.5f\n", MEDIA);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xeb3(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe9f(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe87(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xeb4(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
mulsd  0xeb0(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  0xeac(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%f%f\00"
@.str.1 = [14 x i8] c"MEDIA = %.5f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %2, float* %3)
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = fmul double %9, 7.500000e+00
%11 = call double @llvm.fmuladd.f64(double %7, double 3.500000e+00, double %10)
%12 = fdiv double %11, 1.100000e+01
%13 = fptrunc double %12 to float
store float %13, float* %4
%14 = load float, float* %4
%15 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), float %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%f%f\00"
@.str.1 = [14 x i8] c"MEDIA = %.5f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = fmul double %9, 7.500000e+00
%11 = call double @llvm.fmuladd.f64(double %7, double 3.500000e+00, double %10)
%12 = fdiv double %11, 1.100000e+01
%13 = fptrunc double %12 to float
%14 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), float %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ blinkdash();
int /*<<< orphan*/ sleep(double);
int blinkT() {
  blinkdash();
  sleep(1.5);
  return 0;
}


x86 assembly (clang, -O0):
<blinkT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <blinkdash@plt>
movsd  0xecd(%rip),%xmm0
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blinkT>:
push   %rax
xor    %eax,%eax
call   1030 <blinkdash@plt>
movsd  0xed0(%rip),%xmm0
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @blinkT() {
%1 = call i32 (...) @blinkdash()
%2 = call i32 @sleep(double 1.500000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @blinkT() {
%1 = tail call i32 (...) @blinkdash()
%2 = tail call i32 @sleep(double 1.500000e+00)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void setgrent(void) {
  assert(!"NYI");
  return;
}


x86 assembly (clang, -O0):
<setgrent>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setgrent>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"NYI\00"
define void @setgrent() {
%1 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @setgrent() {
%1 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
scalar_t__ CreateShaders(int);
scalar_t__ StartGL();
int StartWindow() {
  if (StartGL())
    return -1;
  if (CreateShaders(0) || CreateShaders(1) || CreateShaders(2))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<StartWindow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <StartGL@plt>
cmp    $0x0,%rax
je     1145 <StartWindow+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    1191 <StartWindow+0x71>
xor    %edi,%edi
call   1040 <CreateShaders@plt>
cmp    $0x0,%rax
jne    117e <StartWindow+0x5e>
mov    $0x1,%edi
call   1040 <CreateShaders@plt>
cmp    $0x0,%rax
jne    117e <StartWindow+0x5e>
mov    $0x2,%edi
call   1040 <CreateShaders@plt>
cmp    $0x0,%rax
je     118a <StartWindow+0x6a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1191 <StartWindow+0x71>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StartWindow>:
push   %rbx
xor    %eax,%eax
call   1030 <StartGL@plt>
mov    $0xffffffff,%ebx
test   %rax,%rax
jne    115c <StartWindow+0x3c>
xor    %edi,%edi
call   1040 <CreateShaders@plt>
test   %rax,%rax
jne    115c <StartWindow+0x3c>
mov    $0x1,%edi
call   1040 <CreateShaders@plt>
test   %rax,%rax
jne    115c <StartWindow+0x3c>
mov    $0x2,%edi
call   1040 <CreateShaders@plt>
neg    %rax
sbb    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @StartWindow() {
%1 = tail call i64 (...) @StartGL()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %13
3: ; preds = %0
%4 = tail call i64 @CreateShaders(i32 0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = tail call i64 @CreateShaders(i32 1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = tail call i64 @CreateShaders(i32 2)
%11 = icmp ne i64 %10, 0
%12 = sext i1 %11 to i32
br label %13
13: ; preds = %9, %3, %6, %0
%14 = phi i32 [ -1, %0 ], [ -1, %6 ], [ -1, %3 ], [ %12, %9 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ snprintf(char *, int, char *, char const *, int);
scalar_t__ system(char *);
void write_to_disk(const char *filename, int num_blocks) {
  char buf[1024];
  snprintf(buf, 1024, "dd if=/dev/urandom of=%s count=%d bs=4096 status=none",
           filename, num_blocks);
  assert(system(buf) == 0);
}


x86 assembly (clang, -O0):
<write_to_disk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%r8d
mov    $0x400,%esi
lea    0xea3(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_to_disk>:
push   %rbx
sub    $0x400,%rsp
mov    %esi,%r8d
mov    %rdi,%rcx
lea    0xebb(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [54 x i8] c"dd if=/dev/urandom of=%s count=%d bs=4096 status=none\00"
define void @write_to_disk(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @snprintf(i8* %6, i32 1024, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8)
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = call i64 @system(i8* %10)
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [54 x i8] c"dd if=/dev/urandom of=%s count=%d bs=4096 status=none\00"
define void @write_to_disk(i8* %0, i32 %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 1024, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%6 = call i64 @system(i8* %4)
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret void
}
void main(void) { return; }


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

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
int cairo_code_draw_lushLabel_get_width() { return 273; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_lushLabel_get_width() {
ret i32 273
}

LLVM IR (-O2):
define i32 @cairo_code_draw_lushLabel_get_width() {
ret i32 273
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void mp2vseq_set_horizontal(uint8_t *p_mp2vseq, uint16_t i_horizontal) {
  p_mp2vseq[4] = i_horizontal >> 4;
  p_mp2vseq[5] &= 0xf;
  p_mp2vseq[5] |= (i_horizontal << 4) & 0xff;
}


x86 assembly (clang, -O0):
<mp2vseq_set_horizontal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x4,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
and    $0xf,%ecx
mov    %ecx,0x14(%rax)
mov    -0xc(%rbp),%ecx
shl    $0x4,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
or     0x14(%rax),%ecx
mov    %ecx,0x14(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vseq_set_horizontal>:
mov    %esi,%eax
sar    $0x4,%eax
mov    %eax,0x10(%rdi)
mov    0x14(%rdi),%eax
and    $0xf,%eax
shl    $0x4,%esi
movzbl %sil,%ecx
or     %eax,%ecx
mov    %ecx,0x14(%rdi)
ret

LLVM IR (-O0):
define void @mp2vseq_set_horizontal(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 4
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 4
store i32 %6, i32* %8
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 5
%11 = load i32, i32* %10
%12 = and i32 %11, 15
store i32 %12, i32* %10
%13 = load i32, i32* %4
%14 = shl i32 %13, 4
%15 = and i32 %14, 255
%16 = load i32*, i32** %3
%17 = getelementptr inbounds i32, i32* %16, i64 5
%18 = load i32, i32* %17
%19 = or i32 %18, %15
store i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @mp2vseq_set_horizontal(i32* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 4
%4 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %3, i32* %4
%5 = getelementptr inbounds i32, i32* %0, i64 5
%6 = load i32, i32* %5
%7 = and i32 %6, 15
%8 = shl i32 %1, 4
%9 = and i32 %8, 240
%10 = or i32 %7, %9
store i32 %10, i32* %5
ret void
}
void rop3_166_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~T;
  stk2 = S & stk3;
  stk1 = *D ^ stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


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

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

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

LLVM IR (-O2):
define void @rop3_166_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
ret void
}
/* Variables and functions */
char *calloc(int, size_t);
size_t strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, size_t);
char *copy_init(char *str) {
  char *ret;
  size_t len = strlen(str);
  ret = calloc(1, len);
  ret[0] = '\0';
  strncpy(ret, str, len);
  return ret;
}


x86 assembly (clang, -O0):
<copy_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    $0x1,%edi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_init>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %rax,%r15
mov    $0x1,%edi
mov    %rax,%rsi
call   1050 <calloc@plt>
mov    %rax,%rbx
movb   $0x0,(%rax)
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @copy_init(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = call i8* @calloc(i32 1, i64 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 0, i8* %10
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = load i64, i64* %4
%14 = call i32 @strncpy(i8* %11, i8* %12, i64 %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @copy_init(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = tail call i8* @calloc(i32 1, i64 %2)
store i8 0, i8* %3
%4 = tail call i32 @strncpy(i8* %3, i8* %0, i64 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ OS_ShutdownPending();
void FCGX_ShutdownPending(void) { OS_ShutdownPending(); }


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

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

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

LLVM IR (-O2):
define void @FCGX_ShutdownPending() {
%1 = tail call i32 (...) @OS_ShutdownPending()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printHelp() { printf("Usage: ./webclient [URL]\n"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Usage: ./webclient [URL]\0A\00"
define void @printHelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"Usage: ./webclient [URL]\00"
define void @printHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ p;
typedef int /*<<< orphan*/ bytes;

/* Variables and functions */
scalar_t__ memcmp(char **, char *, int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int main() {
  char *p = NULL;
  char bytes[sizeof(p)];
  memset(bytes, 0, sizeof bytes);
  return memcmp(&p, bytes, sizeof(bytes)) == 0 ? 0 : 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
lea    -0x18(%rbp),%rsi
lea    -0x10(%rbp),%rdi
mov    $0x8,%edx
call   1040 <memcmp@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
mov    %rsp,%rdi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1040 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i8*
%2 = alloca [8 x i8]
%3 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i32 0, i32 8)
%6 = call i64 @memcmp(i8** %1, i8* %4, i32 8)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x1c() {
  Assert_real((isgraph(28) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              145, ("isgraph should be 0 for 0x1c"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x1c>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1c,%edi
call   1040 <isgraph@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x91,%edx
lea    0xf5b(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x1c>:
push   %rax
mov    $0x1c,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x91,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x1c\00"
define void @t_isgraph_0x1c() {
%1 = call i64 @isgraph(i32 28)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 145, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x1c\00"
define void @t_isgraph_0x1c() {
%1 = tail call i64 @isgraph(i32 28)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 145, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ISR_ICP_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @ISR_ICP_Interrupt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_eml_version() { printf("%s\n", "0.1"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"0.1\00"
define void @print_eml_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int);
void show_fun(const char *p, int value) { printf("%10s = %d\n", p, value); }


x86 assembly (clang, -O0):
<show_fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_fun>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%10s = %d\0A\00"
define void @show_fun(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%10s = %d\0A\00"
define void @show_fun(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}