xunge/DecIR huggingface dataset:
unsigned int get_shift(unsigned int x) {
  unsigned int s = 0;
  ;
  for (s = 0; s < sizeof(x) * 8; s++) {
    if ((1 << s) == x) {
      break;
    }
  }
  return s;
}


x86 assembly (clang, -O0):
<get_shift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x20,%rax
jae    114d <get_shift+0x4d>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cmp    -0x4(%rbp),%eax
jne    113a <get_shift+0x3a>
jmp    114d <get_shift+0x4d>
jmp    113f <get_shift+0x3f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <get_shift+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_shift>:
mov    $0xffffffff,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cmp    $0x1f,%ecx
ja     1123 <get_shift+0x23>
cmp    %edi,%eax
jne    1110 <get_shift+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @get_shift(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %3
br label %4
4: ; preds = %15, %1
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = icmp ult i64 %6, 32
br i1 %7, label %8, label %18
8: ; preds = %4
%9 = load i32, i32* %3
%10 = shl i32 1, %9
%11 = load i32, i32* %2
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %8
br label %18
14: ; preds = %8
br label %15
15: ; preds = %14
%16 = load i32, i32* %3
%17 = add i32 %16, 1
store i32 %17, i32* %3
br label %4
18: ; preds = %13, %4
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @get_shift(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %8, %2 ]
%4 = icmp ugt i32 %3, 31
%5 = shl nuw i32 1, %3
%6 = icmp eq i32 %5, %0
%7 = select i1 %4, i1 true, i1 %6
%8 = add nuw nsw i32 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret i32 %3
}
int freecell_solver_user_get_max_num_freecells(void) { return 4; }


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

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

LLVM IR (-O0):
define i32 @freecell_solver_user_get_max_num_freecells() {
ret i32 4
}

LLVM IR (-O2):
define i32 @freecell_solver_user_get_max_num_freecells() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void PrintArgs(char *name) {
  fprintf(stderr,
          "                                                   \n"
          "Usage: %s [max] < input > output                   \n"
          "                                                   \n"
          "It analyses the maximal scores of a FASTQ file.    \n"
          "max stands for the lenght of the maximum window.   \n",
          name);
}


x86 assembly (clang, -O0):
<PrintArgs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintArgs>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [261 x i8] c" \0AUsage: %s [max] < input > output \0A \0AIt analyses the maximal scores of a FASTQ file. \0Amax stands for the lenght of the maximum window. \0A\00"
define void @PrintArgs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([261 x i8], [261 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [261 x i8] c" \0AUsage: %s [max] < input > output \0A \0AIt analyses the maximal scores of a FASTQ file. \0Amax stands for the lenght of the maximum window. \0A\00"
define void @PrintArgs(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([261 x i8], [261 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
unsigned int pack_b(int b) { return (unsigned int)b << 16; }


x86 assembly (clang, -O0):
<pack_b>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_b>:
mov    %edi,%eax
shl    $0x10,%eax
ret

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

LLVM IR (-O2):
define i32 @pack_b(i32 %0) {
%2 = shl i32 %0, 16
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(unsigned char);
unsigned char *advanceToNextChunk(unsigned char *ptr) {
  ptr++;
  while (!isdigit(*ptr)) {
    ptr += sizeof(char);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<advanceToNextChunk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1149 <advanceToNextChunk+0x39>
jmp    115a <advanceToNextChunk+0x4a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1128 <advanceToNextChunk+0x18>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<advanceToNextChunk>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isdigit@plt>
test   %eax,%eax
je     1120 <advanceToNextChunk+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @advanceToNextChunk(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = tail call i32 @isdigit(i8 zeroext %5)
%7 = icmp eq i32 %6, 0
br i1 %7, label %2, label %8
8: ; preds = %2
ret i8* %4
}
void gtk_toolbar_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_toolbar_get_type() {
ret void
}
void I422ToUYVYRow_NEON() {}


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

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

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

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

/* Variables and functions */
float u2f(uint32_t u) {
  union {
    float f;
    uint32_t i;
  } tmp;
  tmp.i = u;
  return tmp.f;
}


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

x86 assembly (clang, -O2):
<u2f>:
movd   %edi,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { float }
define float @u2f(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = bitcast %union.anon* %3 to i32*
store i32 %4, i32* %5
%6 = bitcast %union.anon* %3 to float*
%7 = load float, float* %6
ret float %7
}

LLVM IR (-O2):
define float @u2f(i32 %0) {
%2 = bitcast i32 %0 to float
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ grid_node_putchar(char);
void grid_node_indent(int indent) {
  int i;
  for (i = 0; i != indent * 4; ++i)
    grid_node_putchar(' ');
}


x86 assembly (clang, -O0):
<grid_node_indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x2,%ecx
cmp    %ecx,%eax
je     114b <grid_node_indent+0x3b>
mov    $0x20,%edi
call   1030 <grid_node_putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <grid_node_indent+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grid_node_indent>:
push   %rbx
test   %edi,%edi
je     112f <grid_node_indent+0x1f>
mov    %edi,%ebx
shl    $0x2,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <grid_node_putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <grid_node_indent+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @grid_node_indent(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 = mul nsw i32 %6, 4
%8 = icmp ne i32 %5, %7
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = call i32 @grid_node_putchar(i8 signext 32)
br label %11
11: ; preds = %9
%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 @grid_node_indent(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = icmp eq i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @grid_node_putchar(i8 signext 32)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %2
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}
void foo727() {}


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

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

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

LLVM IR (-O2):
define void @foo727() {
ret void
}
/* Variables and functions */
double *malloc(int);
double *vector(int n) {
  double *v;
  v = malloc(n * sizeof(double));
  for (int i = 0; i < n; i++)
    v[i] = 0.0;
  return v;
}


x86 assembly (clang, -O0):
<vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115f <vector+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1135 <vector+0x25>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x0(,%rbx,8),%edi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %ebx,%ebx
jle    1149 <vector+0x29>
mov    %ebx,%edx
shl    $0x3,%rdx
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define double* @vector(i32 %0) {
%2 = alloca i32
%3 = alloca double*
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = mul i64 %6, 8
%8 = trunc i64 %7 to i32
%9 = call double* @malloc(i32 %8)
store double* %9, double** %3
store i32 0, i32* %4
br label %10
10: ; preds = %19, %1
%11 = load i32, i32* %4
%12 = load i32, i32* %2
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %22
14: ; preds = %10
%15 = load double*, double** %3
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds double, double* %15, i64 %17
store double 0.000000e+00, double* %18
br label %19
19: ; preds = %14
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %10
22: ; preds = %10
%23 = load double*, double** %3
ret double* %23
}

LLVM IR (-O2):
define noalias double* @vector(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call double* @malloc(i32 %2)
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = bitcast double* %3 to i8*
%7 = zext i32 %0 to i64
%8 = shl nuw nsw i64 %7, 3
br label %9
9: ; preds = %5, %1
ret double* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
int ivory_serialize_unpack_prim_4_be(int /*<<< orphan*/ const *);
int /*<<< orphan*/ memcpy(int *, int *, int);
void ivory_serialize_unpack_uint32_be(const uint8_t *src, uint32_t offs,
                                      uint32_t *dst) {
  uint32_t tmp = ivory_serialize_unpack_prim_4_be(src + offs);
  memcpy(dst, &tmp, sizeof(*dst));
}


x86 assembly (clang, -O0):
<ivory_serialize_unpack_uint32_be>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <ivory_serialize_unpack_prim_4_be@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivory_serialize_unpack_uint32_be>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
movslq %esi,%rax
lea    (%rdi,%rax,4),%rdi
call   1030 <ivory_serialize_unpack_prim_4_be@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @ivory_serialize_unpack_uint32_be(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = call i32 @ivory_serialize_unpack_prim_4_be(i32* %11)
store i32 %12, i32* %7
%13 = load i32*, i32** %6
%14 = call i32 @memcpy(i32* %13, i32* %7, i32 4)
ret void
}

LLVM IR (-O2):
define void @ivory_serialize_unpack_uint32_be(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = tail call i32 @ivory_serialize_unpack_prim_4_be(i32* %7)
store i32 %8, i32* %4
%9 = call i32 @memcpy(i32* %2, i32* %4, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ state_0();
int main() { state_0(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @state_0()
ret i32 0
}
void *get_rnd_addr() {
  long long unsigned rnd_addr = 0;
  if (getrandom(&rnd_addr, sizeof(rnd_addr), 0) != sizeof(rnd_addr)) {
    err(1, "getrandom");
  }
  rnd_addr &= 0x00007ffffffff000llu;
  return (void *)rnd_addr;
}


x86 assembly (clang, -O0):
<get_rnd_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x8,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <getrandom@plt>
cltq
cmp    $0x8,%rax
je     1161 <get_rnd_addr+0x41>
mov    $0x1,%edi
lea    0xea6(%rip),%rsi
mov    $0x0,%al
call   1030 <err@plt>
movabs $0x7ffffffff000,%rax
and    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rnd_addr>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <getrandom@plt>
cmp    $0x8,%eax
je     1152 <get_rnd_addr+0x32>
lea    0xeba(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <err@plt>
movabs $0x7ffffffff000,%rax
and    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"getrandom\00"
define i8* @get_rnd_addr() {
%1 = alloca i64
store i64 0, i64* %1
%2 = call i32 (i64*, i64, i32, ...) bitcast (i32 (...)* @getrandom to i32 (i64*, i64, i32, ...)*)(i64* %1, i64 8, i32 0)
%3 = sext i32 %2 to i64
%4 = icmp ne i64 %3, 8
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @err to i32 (i32, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load i64, i64* %1
%9 = and i64 %8, 140737488351232
store i64 %9, i64* %1
%10 = load i64, i64* %1
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
@.str = [10 x i8] c"getrandom\00"
define i8* @get_rnd_addr() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 0, i64* %1
%3 = call i32 (i64*, i64, i32, ...) bitcast (i32 (...)* @getrandom to i32 (i64*, i64, i32, ...)*)(i64* %1, i64 8, i32 0)
%4 = icmp eq i32 %3, 8
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @err to i32 (i32, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load i64, i64* %1
%9 = and i64 %8, 140737488351232
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}
void PDMR3UsbCreateProxyDevice(void) {}


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

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

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

LLVM IR (-O2):
define void @PDMR3UsbCreateProxyDevice() {
ret void
}
void ComputeSumSquareError() {}


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

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

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

LLVM IR (-O2):
define void @ComputeSumSquareError() {
ret void
}
int cmp(const void *x, const void *y) {
  return *(long long *)x - *(long long *)y;
}


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

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

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = sub nsw i64 %7, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}

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


x86 assembly (clang, -O0):
<code_astore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <makeCODEastore@plt>
mov    %eax,%edi
call   1030 <appendCODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<code_astore>:
push   %rax
xor    %esi,%esi
call   1040 <makeCODEastore@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <appendCODE@plt>

LLVM IR (-O0):
define void @code_astore(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @makeCODEastore(i32 %3, i32* null)
%5 = call i32 @appendCODE(i32 %4)
ret void
}

LLVM IR (-O2):
define void @code_astore(i32 %0) {
%2 = tail call i32 @makeCODEastore(i32 %0, i32* null)
%3 = tail call i32 @appendCODE(i32 %2)
ret void
}
void RTRandU64(void) {}


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

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

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

LLVM IR (-O2):
define void @RTRandU64() {
ret void
}
/* Variables and functions */
double swe_deg_midp(double, double);
double swe_rad_midp(double x1, double x0) {
  return 0.0174532925199433 *
         swe_deg_midp(x1 * 57.2957795130823, x0 * 57.2957795130823);
}


x86 assembly (clang, -O0):
<swe_rad_midp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xede(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
call   1030 <swe_deg_midp@plt>
movaps %xmm0,%xmm1
movsd  0xeb4(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swe_rad_midp>:
push   %rax
movsd  0xee7(%rip),%xmm2
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm1
call   1030 <swe_deg_midp@plt>
mulsd  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @swe_rad_midp(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fmul double %5, 0x404CA5DC1A63C1F5
%7 = load double, double* %4
%8 = fmul double %7, 0x404CA5DC1A63C1F5
%9 = call double @swe_deg_midp(double %6, double %8)
%10 = fmul double 0x3F91DF46A2529D3A, %9
ret double %10
}

LLVM IR (-O2):
define double @swe_rad_midp(double %0, double %1) {
%3 = fmul double %0, 0x404CA5DC1A63C1F5
%4 = fmul double %1, 0x404CA5DC1A63C1F5
%5 = tail call double @swe_deg_midp(double %3, double %4)
%6 = fmul double %5, 0x3F91DF46A2529D3A
ret double %6
}
/* Variables and functions */
scalar_t__ in_set(unsigned char, char const);
void match_xset(char const **str, char const *end, unsigned char set) {
  while (*str < end && in_set(set, **str)) {
    ++*str;
  }
}


x86 assembly (clang, -O0):
<match_xset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
xor    %eax,%eax
cmp    -0x10(%rbp),%rcx
mov    %al,-0x12(%rbp)
jae    115a <match_xset+0x4a>
mov    -0x11(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl %cl,%edi
movsbl (%rax),%esi
call   1030 <in_set@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
test   $0x1,%al
jne    116a <match_xset+0x5a>
jmp    117d <match_xset+0x6d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1125 <match_xset+0x15>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_xset>:
push   %rbp
push   %r14
push   %rbx
mov    (%rdi),%rax
cmp    %rsi,%rax
jae    114e <match_xset+0x3e>
mov    %rsi,%r14
mov    %rdi,%rbx
movzbl %dl,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movsbl (%rax),%esi
mov    %ebp,%edi
call   1030 <in_set@plt>
test   %rax,%rax
je     114e <match_xset+0x3e>
mov    (%rbx),%rax
add    $0x1,%rax
mov    %rax,(%rbx)
cmp    %r14,%rax
jb     1130 <match_xset+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @match_xset(i8** %0, i8* %1, i8 zeroext %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i8
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i8 %2, i8* %6
br label %7
7: ; preds = %21, %3
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = load i8*, i8** %5
%11 = icmp ult i8* %9, %10
br i1 %11, label %12, label %19
12: ; preds = %7
%13 = load i8, i8* %6
%14 = load i8**, i8*** %4
%15 = load i8*, i8** %14
%16 = load i8, i8* %15
%17 = call i64 @in_set(i8 zeroext %13, i8 signext %16)
%18 = icmp ne i64 %17, 0
br label %19
19: ; preds = %12, %7
%20 = phi i1 [ false, %7 ], [ %18, %12 ]
br i1 %20, label %21, label %25
21: ; preds = %19
%22 = load i8**, i8*** %4
%23 = load i8*, i8** %22
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %22
br label %7
25: ; preds = %19
ret void
}

LLVM IR (-O2):
define void @match_xset(i8** nocapture %0, i8* readnone %1, i8 zeroext %2) {
%4 = load i8*, i8** %0
%5 = icmp ult i8* %4, %1
br i1 %5, label %6, label %15
6: ; preds = %3, %11
%7 = phi i8* [ %13, %11 ], [ %4, %3 ]
%8 = load i8, i8* %7
%9 = tail call i64 @in_set(i8 zeroext %2, i8 signext %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %6
%12 = load i8*, i8** %0
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8* %13, i8** %0
%14 = icmp ult i8* %13, %1
br i1 %14, label %6, label %15
15: ; preds = %6, %11, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ random_float_array(float *, int, double, double);
size_t random_integer(int /*<<< orphan*/, int);
void test_random_choice_from_array() {
  float arr[5], value;
  random_float_array(arr, 5, -1.5, 5.25);
  (*&value = arr[random_integer(0, 5)]);
}


x86 assembly (clang, -O0):
<test_random_choice_from_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
movsd  0xec7(%rip),%xmm0
movsd  0xec7(%rip),%xmm1
call   1040 <random_float_array@plt>
xor    %edi,%edi
mov    $0x5,%esi
call   1030 <random_integer@plt>
movss  -0x20(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x24(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_random_choice_from_array>:
sub    $0x18,%rsp
mov    %rsp,%rdi
movsd  0xed1(%rip),%xmm0
movsd  0xed1(%rip),%xmm1
mov    $0x5,%esi
call   1040 <random_float_array@plt>
xor    %edi,%edi
mov    $0x5,%esi
call   1030 <random_integer@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @test_random_choice_from_array() {
%1 = alloca [5 x float]
%2 = alloca float
%3 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
%4 = call i32 @random_float_array(float* %3, i32 5, double -1.500000e+00, double 5.250000e+00)
%5 = call i64 @random_integer(i32 0, i32 5)
%6 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 %5
%7 = load float, float* %6
store float %7, float* %2
ret void
}

LLVM IR (-O2):
define void @test_random_choice_from_array() {
%1 = alloca [5 x float]
%2 = bitcast [5 x float]* %1 to i8*
%3 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
%4 = call i32 @random_float_array(float* %3, i32 5, double -1.500000e+00, double 5.250000e+00)
%5 = call i64 @random_integer(i32 0, i32 5)
ret void
}
/* Variables and functions */
int v5dWrite(int const, int const, float const *);
int v5dwrite_(const int *time, const int *var, const float *data) {
  return v5dWrite(*time, *var, data);
}


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

x86 assembly (clang, -O2):
<v5dwrite_>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <v5dWrite@plt>

LLVM IR (-O0):
define i32 @v5dwrite_(i32* %0, i32* %1, float* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca float*
store i32* %0, i32** %4
store i32* %1, i32** %5
store float* %2, float** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load float*, float** %6
%12 = call i32 @v5dWrite(i32 %8, i32 %10, float* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @v5dwrite_(i32* nocapture %0, i32* nocapture %1, float* %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = tail call i32 @v5dWrite(i32 %4, i32 %5, float* %2)
ret i32 %6
}
int security_sb_umount(struct vfsmount *mnt, int flags) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.vfsmount = type opaque
define i32 @security_sb_umount(%struct.vfsmount* nocapture readnone %0, i32 %1) {
ret i32 0
}
void print_comp_data(design) struct Design *design;
{
  void fprint_data();
  int i;
  i = 0;
  while (++i <= 7)
    fprint_data(design, i);
}


x86 assembly (clang, -O0):
<print_comp_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x7,%eax
jg     1148 <print_comp_data+0x38>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <fprint_data@plt>
jmp    1123 <print_comp_data+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_comp_data>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <fprint_data@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <fprint_data@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <fprint_data@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <fprint_data@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <fprint_data@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1030 <fprint_data@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprint_data@plt>

LLVM IR (-O0):
%struct.Design = type opaque
define void @print_comp_data(%struct.Design* %0) {
%2 = alloca %struct.Design*
%3 = alloca i32
store %struct.Design* %0, %struct.Design** %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = icmp sle i32 %6, 7
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load %struct.Design*, %struct.Design** %2
%10 = load i32, i32* %3
br label %4
11: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.Design = type opaque
define void @print_comp_data(%struct.Design* %0) {
tail call void (%struct.Design*, i32, ...) bitcast (void (...)* @fprint_data to void (%struct.Design*, i32, ...)*)(%struct.Design* %0, i32 1)
tail call void (%struct.Design*, i32, ...) bitcast (void (...)* @fprint_data to void (%struct.Design*, i32, ...)*)(%struct.Design* %0, i32 2)
tail call void (%struct.Design*, i32, ...) bitcast (void (...)* @fprint_data to void (%struct.Design*, i32, ...)*)(%struct.Design* %0, i32 3)
tail call void (%struct.Design*, i32, ...) bitcast (void (...)* @fprint_data to void (%struct.Design*, i32, ...)*)(%struct.Design* %0, i32 4)
tail call void (%struct.Design*, i32, ...) bitcast (void (...)* @fprint_data to void (%struct.Design*, i32, ...)*)(%struct.Design* %0, i32 5)
tail call void (%struct.Design*, i32, ...) bitcast (void (...)* @fprint_data to void (%struct.Design*, i32, ...)*)(%struct.Design* %0, i32 6)
tail call void (%struct.Design*, i32, ...) bitcast (void (...)* @fprint_data to void (%struct.Design*, i32, ...)*)(%struct.Design* %0, i32 7)
ret void
}
float degrees(float radians) {
  return (180.0f / (3.14159265358979323846f)) * radians;
}


x86 assembly (clang, -O0):
<degrees>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @degrees(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 0x404CA5DC00000000, %3
ret float %4
}

LLVM IR (-O2):
define float @degrees(float %0) {
%2 = fmul float %0, 0x404CA5DC00000000
ret float %2
}
void lcd_showvbat() {}


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

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

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

LLVM IR (-O2):
define void @lcd_showvbat() {
ret void
}
int null_portmatch(a1)
struct sockaddr *a1;
{
  return (0);
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ LIST_INIT(struct mpk_pkgreflist *);
int mpk_pkgreflist_init(struct mpk_pkgreflist *list) {
  LIST_INIT(list);
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.mpk_pkgreflist = type { i32 }
define i32 @mpk_pkgreflist_init(%struct.mpk_pkgreflist* %0) {
%2 = tail call i32 @LIST_INIT(%struct.mpk_pkgreflist* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ flob_1();
int /*<<< orphan*/ flob_2();
int main(void) {
  flob_1();
  flob_2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @flob_1()
%2 = tail call i32 (...) @flob_2()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ box(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ *newwin(int, int, int, int);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
WINDOW *create_win(int win_y, int win_x, int starty, int startx) {
  WINDOW *local_win;
  refresh();
  local_win = newwin(win_y, win_x, starty, startx);
  box(local_win, 0, 0);
  wrefresh(local_win);
  refresh();
  return local_win;
}


x86 assembly (clang, -O0):
<create_win>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    $0x0,%al
call   1060 <refresh@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <newwin@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1050 <box@plt>
mov    -0x18(%rbp),%rdi
call   1030 <wrefresh@plt>
mov    $0x0,%al
call   1060 <refresh@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_win>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1060 <refresh@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1040 <newwin@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <box@plt>
mov    %rbx,%rdi
call   1030 <wrefresh@plt>
xor    %eax,%eax
call   1060 <refresh@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32* @create_win(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = call i32 (...) @refresh()
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = call i32* @newwin(i32 %11, i32 %12, i32 %13, i32 %14)
store i32* %15, i32** %9
%16 = load i32*, i32** %9
%17 = call i32 @box(i32* %16, i32 0, i32 0)
%18 = load i32*, i32** %9
%19 = call i32 @wrefresh(i32* %18)
%20 = call i32 (...) @refresh()
%21 = load i32*, i32** %9
ret i32* %21
}

LLVM IR (-O2):
define i32* @create_win(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (...) @refresh()
%6 = tail call i32* @newwin(i32 %0, i32 %1, i32 %2, i32 %3)
%7 = tail call i32 @box(i32* %6, i32 0, i32 0)
%8 = tail call i32 @wrefresh(i32* %6)
%9 = tail call i32 (...) @refresh()
ret i32* %6
}
int test0(long long n) {
  if (n < 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<test0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    111f <test0+0x1f>
movl   $0x1,-0x4(%rbp)
jmp    1126 <test0+0x26>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test0(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @test0(i64 %0) {
%2 = lshr i64 %0, 63
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ posix_memalign(void **, size_t, size_t);
int /*<<< orphan*/ sys_abort(char *);
void *sys_aligned_malloc(size_t size, size_t alignment) {
  ((void)0);
  void *ptr;
  if (posix_memalign(&ptr, alignment, size) != 0)
    sys_abort("sys_aligned_malloc: out of memory");
  return ptr;
}


x86 assembly (clang, -O0):
<sys_aligned_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    -0x18(%rbp),%rdi
call   1040 <posix_memalign@plt>
cmp    $0x0,%rax
je     1157 <sys_aligned_malloc+0x37>
lea    0xeae(%rip),%rdi
call   1030 <sys_abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_aligned_malloc>:
push   %rax
mov    %rdi,%rdx
mov    %rsp,%rdi
call   1040 <posix_memalign@plt>
test   %rax,%rax
je     113d <sys_aligned_malloc+0x1d>
lea    0xec8(%rip),%rdi
call   1030 <sys_abort@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [34 x i8] c"sys_aligned_malloc: out of memory\00"
define i8* @sys_aligned_malloc(i64 %0, i64 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i64 @posix_memalign(i8** %3, i64 %1, i64 %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 @sys_abort(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = load i8*, i8** %3
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ HDMITX_WriteI2C_Byte(int, int /*<<< orphan*/);
void HDCP_StopAnCipher(void) { HDMITX_WriteI2C_Byte(0x1F, 0); }


x86 assembly (clang, -O0):
<HDCP_StopAnCipher>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1f,%edi
xor    %esi,%esi
call   1030 <HDMITX_WriteI2C_Byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HDCP_StopAnCipher>:
mov    $0x1f,%edi
xor    %esi,%esi
jmp    1030 <HDMITX_WriteI2C_Byte@plt>

LLVM IR (-O0):
define void @HDCP_StopAnCipher() {
%1 = call i32 @HDMITX_WriteI2C_Byte(i32 31, i32 0)
ret void
}

LLVM IR (-O2):
define void @HDCP_StopAnCipher() {
%1 = tail call i32 @HDMITX_WriteI2C_Byte(i32 31, i32 0)
ret void
}
void RTThreadGetAffinity(void) {}


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

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

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

LLVM IR (-O2):
define void @RTThreadGetAffinity() {
ret void
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};

/* Variables and functions */
char *submissionSetPart(struct sqlConnection *, int, char *);
char *bioImageSetUrl(struct sqlConnection *conn, int id) {
  return submissionSetPart(conn, id, "setUrl");
}


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

x86 assembly (clang, -O2):
<bioImageSetUrl>:
lea    0xee9(%rip),%rdx
jmp    1030 <submissionSetPart@plt>

LLVM IR (-O0):
%struct.sqlConnection = type { i32 }
@.str = [7 x i8] c"setUrl\00"
define i8* @bioImageSetUrl(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i32, i32* %4
%7 = call i8* @submissionSetPart(%struct.sqlConnection* %5, i32 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
%struct.sqlConnection = type { i32 }
@.str = [7 x i8] c"setUrl\00"
define i8* @bioImageSetUrl(%struct.sqlConnection* %0, i32 %1) {
%3 = tail call i8* @submissionSetPart(%struct.sqlConnection* %0, i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float const *, int);
void floats_copy(const float *src, float *dst, int n) {
  memcpy(dst, src, n * sizeof(float));
}


x86 assembly (clang, -O0):
<floats_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floats_copy>:
mov    %rdi,%rax
shl    $0x2,%edx
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @floats_copy(float* %0, float* %1, i32 %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca i32
store float* %0, float** %4
store float* %1, float** %5
store i32 %2, i32* %6
%7 = load float*, float** %5
%8 = load float*, float** %4
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i32 @memcpy(float* %7, float* %8, i32 %12)
ret void
}

LLVM IR (-O2):
define void @floats_copy(float* %0, float* %1, i32 %2) {
%4 = shl i32 %2, 2
%5 = tail call i32 @memcpy(float* %1, float* %0, i32 %4)
ret void
}
void AES256_IRQHandler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<AES256_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <AES256_IRQHandler+0x9>
jmp    1109 <AES256_IRQHandler+0x9>

x86 assembly (clang, -O2):
<AES256_IRQHandler>:
jmp    1100 <AES256_IRQHandler>

LLVM IR (-O0):
define void @AES256_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @AES256_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void fun3(int a) {
  printf("You shoud not see this. Value of a is %d\n", a + 2);
}


x86 assembly (clang, -O0):
<fun3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
add    $0x2,%esi
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun3>:
lea    0x2(%rdi),%esi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"You shoud not see this. Value of a is %d\0A\00"
define void @fun3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 2
%5 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"You shoud not see this. Value of a is %d\0A\00"
define void @fun3(i32 %0) {
%2 = add nsw i32 %0, 2
%3 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar1();
void foo1(void) {
#pragma omp target teams
  {
#pragma omp parallel
    {}
    bar1();
#pragma omp parallel
    {}
  }
}


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

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

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

LLVM IR (-O2):
define void @foo1() {
%1 = tail call i32 (...) @bar1()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void Usage() {
  printf("usage ...\n");
  exit(0);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"usage ...\0A\00"
define void @Usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [10 x i8] c"usage ...\00"
define void @Usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int main() {
  char val = 3;
  return val;
}


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

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

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

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