xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ foo();
void *thread_func(void *arg) {
  int x;
  for (x = 0; x < 10; x++)
    foo();
  return 0;
}


x86 assembly (clang, -O0):
<thread_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1142 <thread_func+0x32>
mov    $0x0,%al
call   1030 <foo@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <thread_func+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @thread_func(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @foo()
%3 = tail call i32 (...) @foo()
%4 = tail call i32 (...) @foo()
%5 = tail call i32 (...) @foo()
%6 = tail call i32 (...) @foo()
%7 = tail call i32 (...) @foo()
%8 = tail call i32 (...) @foo()
%9 = tail call i32 (...) @foo()
%10 = tail call i32 (...) @foo()
%11 = tail call i32 (...) @foo()
ret i8* null
}
/* Type definitions */
struct catmc_atomic_uint_least8_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct catmc_atomic_uint_least8_t *);
void catmc_atomic_uint_least8_t_destroy(
    struct catmc_atomic_uint_least8_t *wrapper) {
  free(wrapper);
}


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

x86 assembly (clang, -O2):
<catmc_atomic_uint_least8_t_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.catmc_atomic_uint_least8_t = type { i32 }
define void @catmc_atomic_uint_least8_t_destroy(%struct.catmc_atomic_uint_least8_t* nocapture %0) {
%2 = tail call i32 @free(%struct.catmc_atomic_uint_least8_t* %0)
ret void
}
int f_blt_rc2(float a1) { return !(__builtin_isless(a1, 100)); }


x86 assembly (clang, -O0):
<f_blt_rc2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_blt_rc2>:
movss  0xef8(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setbe  %al
ret

LLVM IR (-O0):
define i32 @f_blt_rc2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 1.000000e+02
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f_blt_rc2(float %0) {
%2 = fcmp uge float %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
void my_strcpy(char *dest, const char *src) {
  while ((*dest++ = *src++) != '\0')
    ;
}


x86 assembly (clang, -O0):
<my_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     113f <my_strcpy+0x3f>
jmp    110c <my_strcpy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcpy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <my_strcpy+0x10>
ret

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

LLVM IR (-O2):
define void @my_strcpy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ digi_init();
int app_main() {
  int ii;
  digi_init();
  while (1) {
    (*(volatile unsigned int *)((0x3FF0000 + 0x5008)) = (0x0));
    for (ii = 0; ii < 1000000; ii++)
      ;
    (*(volatile unsigned int *)((0x3FF0000 + 0x5008)) = (0xf));
    for (ii = 0; ii < 1000000; ii++)
      ;
  }
}


x86 assembly (clang, -O0):
<app_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <digi_init@plt>
mov    $0x3ff5008,%eax
movl   $0x0,(%rax)
movl   $0x0,-0x4(%rbp)
cmpl   $0xf4240,-0x4(%rbp)
jge    1151 <app_main+0x41>
jmp    1143 <app_main+0x33>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1131 <app_main+0x21>
mov    $0x3ff5008,%eax
movl   $0xf,(%rax)
movl   $0x0,-0x4(%rbp)
cmpl   $0xf4240,-0x4(%rbp)
jge    1183 <app_main+0x73>
jmp    1175 <app_main+0x65>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <app_main+0x53>
jmp    111f <app_main+0xf>

x86 assembly (clang, -O2):
<app_main>:
push   %rax
xor    %eax,%eax
call   1030 <digi_init@plt>
nopl   0x0(%rax,%rax,1)
movl   $0x0,0x3ff5008
movl   $0xf,0x3ff5008
jmp    1120 <app_main+0x10>

LLVM IR (-O0):
define i32 @app_main() {
%1 = alloca i32
%2 = call i32 (...) @digi_init()
br label %3
3: ; preds = %0, %19
store volatile i32 0, i32* inttoptr (i64 67063816 to i32*)
store i32 0, i32* %1
br label %4
4: ; preds = %8, %3
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 1000000
br i1 %6, label %7, label %11
7: ; preds = %4
br label %8
8: ; preds = %7
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %4
11: ; preds = %4
store volatile i32 15, i32* inttoptr (i64 67063816 to i32*)
store i32 0, i32* %1
br label %12
12: ; preds = %16, %11
%13 = load i32, i32* %1
%14 = icmp slt i32 %13, 1000000
br i1 %14, label %15, label %19
15: ; preds = %12
br label %16
16: ; preds = %15
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %1
br label %12
19: ; preds = %12
br label %3
}

LLVM IR (-O2):
define i32 @app_main() {
%1 = tail call i32 (...) @digi_init()
br label %2
2: ; preds = %2, %0
store volatile i32 0, i32* inttoptr (i64 67063816 to i32*)
store volatile i32 15, i32* inttoptr (i64 67063816 to i32*)
br label %2
}
void gtk_text_buffer_get_iter_at_line_offset() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_get_iter_at_line_offset() {
ret void
}
/* Variables and functions */
size_t next_power_of_two(size_t v) {
  v--;
  v |= v >> 1;
  v |= v >> 2;
  v |= v >> 4;
  v |= v >> 8;
  v |= v >> 16;
  v++;
  return v;
}


x86 assembly (clang, -O0):
<next_power_of_two>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x2,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x4,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_power_of_two>:
lea    -0x1(%rdi),%rax
mov    %rax,%rcx
shr    %rcx
or     %rax,%rcx
mov    %rcx,%rax
shr    $0x2,%rax
or     %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
or     %rax,%rcx
mov    %rcx,%rdx
shr    $0x8,%rdx
or     %rcx,%rdx
mov    %rdx,%rax
shr    $0x10,%rax
or     %rdx,%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @next_power_of_two(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, -1
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = lshr i64 %5, 1
%7 = load i64, i64* %2
%8 = or i64 %7, %6
store i64 %8, i64* %2
%9 = load i64, i64* %2
%10 = lshr i64 %9, 2
%11 = load i64, i64* %2
%12 = or i64 %11, %10
store i64 %12, i64* %2
%13 = load i64, i64* %2
%14 = lshr i64 %13, 4
%15 = load i64, i64* %2
%16 = or i64 %15, %14
store i64 %16, i64* %2
%17 = load i64, i64* %2
%18 = lshr i64 %17, 8
%19 = load i64, i64* %2
%20 = or i64 %19, %18
store i64 %20, i64* %2
%21 = load i64, i64* %2
%22 = lshr i64 %21, 16
%23 = load i64, i64* %2
%24 = or i64 %23, %22
store i64 %24, i64* %2
%25 = load i64, i64* %2
%26 = add i64 %25, 1
store i64 %26, i64* %2
%27 = load i64, i64* %2
ret i64 %27
}

LLVM IR (-O2):
define i64 @next_power_of_two(i64 %0) {
%2 = add i64 %0, -1
%3 = lshr i64 %2, 1
%4 = or i64 %3, %2
%5 = lshr i64 %4, 2
%6 = or i64 %5, %4
%7 = lshr i64 %6, 4
%8 = or i64 %7, %6
%9 = lshr i64 %8, 8
%10 = or i64 %9, %8
%11 = lshr i64 %10, 16
%12 = or i64 %11, %10
%13 = add i64 %12, 1
ret i64 %13
}
int would_overflow(long long a, int b) {
  if (a > 0 && b > 0 && (int)a + b < 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<would_overflow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    113c <would_overflow+0x3c>
cmpl   $0x0,-0x14(%rbp)
jle    113c <would_overflow+0x3c>
mov    -0x10(%rbp),%rax
add    -0x14(%rbp),%eax
cmp    $0x0,%eax
jge    113c <would_overflow+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1143 <would_overflow+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<would_overflow>:
test   %rdi,%rdi
setg   %al
test   %esi,%esi
setg   %cl
and    %al,%cl
add    %esi,%edi
sets   %al
and    %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @would_overflow(i64 %0, i32 %1) {
%3 = icmp sgt i64 %0, 0
%4 = icmp sgt i32 %1, 0
%5 = and i1 %3, %4
%6 = trunc i64 %0 to i32
%7 = add nsw i32 %6, %1
%8 = icmp slt i32 %7, 0
%9 = select i1 %5, i1 %8, i1 false
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int mkfifo(const char *pathname, mode_t mode) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<mkfifo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebd(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkfifo>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @mkfifo(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @mkfifo(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int q();
int /*<<< orphan*/ q1();
int t(void) {
  q1();
  return q();
}


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

x86 assembly (clang, -O2):
<t>:
push   %rax
xor    %eax,%eax
call   1030 <q1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <q@plt>

LLVM IR (-O0):
define i32 @t() {
%1 = call i32 (...) @q1()
%2 = call i32 (...) @q()
ret i32 %2
}

LLVM IR (-O2):
define i32 @t() {
%1 = tail call i32 (...) @q1()
%2 = tail call i32 (...) @q()
ret i32 %2
}
/* Variables and functions */
int txtarray_write2(char const *, char const *, int, double *, int, double *,
                    int);
int txtarray_write_deriv(const char *filename, const char *header,
                         int nstations, double *stations, double *derivatives) {
  return txtarray_write2(filename, header, nstations, stations, 3, derivatives,
                         9);
}


x86 assembly (clang, -O0):
<txtarray_write_deriv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r9
mov    $0x3,%r8d
movl   $0x9,(%rsp)
call   1030 <txtarray_write2@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<txtarray_write_deriv>:
push   %rax
mov    %r8,%r9
movl   $0x9,(%rsp)
mov    $0x3,%r8d
call   1030 <txtarray_write2@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @txtarray_write_deriv(i8* %0, i8* %1, i32 %2, double* %3, double* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca double*
%10 = alloca double*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store double* %3, double** %9
store double* %4, double** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = load double*, double** %9
%15 = load double*, double** %10
%16 = call i32 @txtarray_write2(i8* %11, i8* %12, i32 %13, double* %14, i32 3, double* %15, i32 9)
ret i32 %16
}

LLVM IR (-O2):
define i32 @txtarray_write_deriv(i8* %0, i8* %1, i32 %2, double* %3, double* %4) {
%6 = tail call i32 @txtarray_write2(i8* %0, i8* %1, i32 %2, double* %3, i32 3, double* %4, i32 9)
ret i32 %6
}
int getBEdword(char buf[4]) {
  unsigned char *b = (unsigned char *)buf;
  return (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | (b[3] << 0);
}


x86 assembly (clang, -O0):
<getBEdword>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x0,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBEdword>:
mov    (%rdi),%eax
bswap  %eax
ret

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

LLVM IR (-O2):
define i32 @getBEdword(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int sigsuspend(int /*<<< orphan*/ *);
int sigpause(int mask) { return (sigsuspend((sigset_t *)&mask)); }


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

x86 assembly (clang, -O2):
<sigpause>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <sigsuspend@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sigpause(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @sigsuspend(i32* %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @sigpause(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @sigsuspend(i32* %2)
ret i32 %3
}
main(int argc, char **argv) {}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("value of 'getchar() != EOF' is %d\n", getchar() != EOF);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rcx
xor    %esi,%esi
cmp    (%rcx),%rax
setne  %sil
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"value of 'getchar() != EOF' is %d\0A\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @getchar()
%3 = load i64, i64* @EOF
%4 = icmp ne i64 %2, %3
%5 = zext i1 %4 to i32
%6 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"value of 'getchar() != EOF' is %d\0A\00"
@EOF = global i64 0
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp ne i64 %1, %2
%4 = zext i1 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void g_type_class_ref() {}


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

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

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

LLVM IR (-O2):
define void @g_type_class_ref() {
ret void
}
/* Variables and functions */
char *strtok(char *, char *);
char *parse_key(char *str) {
  char *key;
  key = strtok(str, "=");
  return key;
}


x86 assembly (clang, -O0):
<parse_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strtok@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_key>:
lea    0xee9(%rip),%rsi
jmp    1030 <strtok@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"=\00"
define i8* @parse_key(i8* %0) {
%2 = tail call i8* @strtok(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
double float_div(double a, double b) { return a / b; }


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

x86 assembly (clang, -O2):
<float_div>:
divsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @float_div(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;
typedef long FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(long *);
int read_int32_from_file(long *, int /*<<< orphan*/ *);
int read_long_int_from_file(FILE *f, long int *num) {
  assert(f);
  assert(num);
  return read_int32_from_file(f, (int32_t *)num);
}


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

x86 assembly (clang, -O2):
<read_long_int_from_file>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %r14,%rdi
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <read_int32_from_file@plt>

LLVM IR (-O0):
define i32 @read_long_int_from_file(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %3
%6 = call i32 @assert(i64* %5)
%7 = load i64*, i64** %4
%8 = call i32 @assert(i64* %7)
%9 = load i64*, i64** %3
%10 = load i64*, i64** %4
%11 = bitcast i64* %10 to i32*
%12 = call i32 @read_int32_from_file(i64* %9, i32* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @read_long_int_from_file(i64* %0, i64* %1) {
%3 = tail call i32 @assert(i64* %0)
%4 = tail call i32 @assert(i64* %1)
%5 = bitcast i64* %1 to i32*
%6 = tail call i32 @read_int32_from_file(i64* %0, i32* %5)
ret i32 %6
}
void ath79_nfc_set_scan_fixup(int (*f)(struct mtd_info *mtd)) {}


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

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

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

LLVM IR (-O2):
%struct.mtd_info = type opaque
define void @ath79_nfc_set_scan_fixup(i32 (%struct.mtd_info*)* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void GiveInstructions(void) {
  printf("This program displays a calendar for a full\n");
  printf("year. The year must not be before 1900.\n");
}


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

x86 assembly (clang, -O2):
<GiveInstructions>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf08(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"This program displays a calendar for a full\0A\00"
@.str.1 = [41 x i8] c"year. The year must not be before 1900.\0A\00"
define void @GiveInstructions() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [44 x i8] c"This program displays a calendar for a full\00"
@str.2 = [40 x i8] c"year. The year must not be before 1900.\00"
define void @GiveInstructions() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int main(void) { exit(77); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 77)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
void intersect(int64_t sx, int64_t sy, int64_t sz, int64_t ex, int64_t ey,
               int64_t ez) {}


x86 assembly (clang, -O0):
<intersect>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @intersect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
ret void
}

LLVM IR (-O2):
define void @intersect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void imprimirUso() {
  printf("Uso: mas fichero [opciones]\n");
  printf("\t-h --help\tMuestra la ayuda\n");
  printf("\t-o --output\tEspecifica el nombre del fichero de salida\n");
  printf("\t-v --version\tMuestra la versión\n");
}


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

x86 assembly (clang, -O2):
<imprimirUso>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
lea    0xf34(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Uso: mas fichero [opciones]\0A\00"
@.str.1 = [29 x i8] c"\09-h --help\09Muestra la ayuda\0A\00"
@.str.2 = [57 x i8] c"\09-o --output\09Especifica el nombre del fichero de salida\0A\00"
@.str.3 = [35 x i8] c"\09-v --version\09Muestra la versi\C3\B3n\0A\00"
define void @imprimirUso() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [28 x i8] c"Uso: mas fichero [opciones]\00"
@str.4 = [28 x i8] c"\09-h --help\09Muestra la ayuda\00"
@str.5 = [56 x i8] c"\09-o --output\09Especifica el nombre del fichero de salida\00"
@str.6 = [34 x i8] c"\09-v --version\09Muestra la versi\C3\B3n\00"
define void @imprimirUso() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.6, i64 0, i64 0))
ret void
}
long p_align_to(long size) {
  return ((size - 1) / ((0x1000)) + 1) * ((0x1000));
}


x86 assembly (clang, -O0):
<p_align_to>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
mov    $0x1000,%ecx
cqto
idiv   %rcx
add    $0x1,%rax
shl    $0xc,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_align_to>:
lea    -0x1(%rdi),%rcx
lea    0xffe(%rdi),%rax
test   %rcx,%rcx
cmovns %rcx,%rax
and    $0xfffffffffffff000,%rax
add    $0x1000,%rax
ret

LLVM IR (-O0):
define i64 @p_align_to(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 %3, 1
%5 = sdiv i64 %4, 4096
%6 = add nsw i64 %5, 1
%7 = mul nsw i64 %6, 4096
ret i64 %7
}

LLVM IR (-O2):
define i64 @p_align_to(i64 %0) {
%2 = add nsw i64 %0, -1
%3 = sdiv i64 %2, 4096
%4 = shl nsw i64 %3, 12
%5 = add i64 %4, 4096
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ test;

/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, int *, int);
int main(int argc, char **argv) {
  int test;
  test = 65;
  write(STDOUT_FILENO, &test, sizeof(test));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x41,-0x14(%rbp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    -0x14(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x41,0x4(%rsp)
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 65, i32* %5
%6 = load i32, i32* @STDOUT_FILENO
%7 = call i32 @write(i32 %6, i32* %5, i32 4)
ret i32 0
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 65, i32* %3
%5 = load i32, i32* @STDOUT_FILENO
%6 = call i32 @write(i32 %5, i32* %3, i32 4)
ret i32 0
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_bus_get_name(void *bus,
                                                           const char **name) {
  return -EINVAL;
}


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

x86 assembly (clang, -O2):
<sd_bus_get_name>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_get_name(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_get_name(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void error(const char *prog, const char *msg) {
  fprintf(stderr, "%s: %s\n", prog, msg);
}


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

x86 assembly (clang, -O2):
<error>:
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
define void @error(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
scalar_t__ isalnum(char);
int is_literal_char(char c) { return isalnum(c) || c == '_'; }


x86 assembly (clang, -O0):
<is_literal_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1146 <is_literal_char+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_literal_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_literal_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalnum(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 95
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_literal_char(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 95
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ handle_VTALRM(int /*<<< orphan*/);
int gen_VTALRM() { handle_VTALRM(0); }


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

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

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

LLVM IR (-O2):
define i32 @gen_VTALRM() {
%1 = tail call i32 @handle_VTALRM(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_pcnt_strm_reg_pktin_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_pcnt_strm@%p::reg_pktin (rtpp_pcnt_strm_reg_pktin) is "
          "invoked after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_pcnt_strm_reg_pktin_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_pcnt_strm_reg_pktin_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [93 x i8] c"Method rtpp_pcnt_strm@%p::reg_pktin (rtpp_pcnt_strm_reg_pktin) is invoked after destruction\0A\00"
define void @rtpp_pcnt_strm_reg_pktin_fin(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 ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [93 x i8] c"Method rtpp_pcnt_strm@%p::reg_pktin (rtpp_pcnt_strm_reg_pktin) is invoked after destruction\0A\00"
define void @rtpp_pcnt_strm_reg_pktin_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int scanf(char *, int *, int *);
int main() {
  int v, t;
  while (scanf("%d %d", &v, &t) == 2) {
    printf("%d\n", 2 * v * t);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    1167 <main+0x47>
mov    -0x8(%rbp),%esi
shl    $0x1,%esi
imul   -0xc(%rbp),%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    1185 <main+0x65>
lea    0xebe(%rip),%r14
lea    0xeb1(%rip),%r15
lea    0x4(%rsp),%r12
mov    %rsp,%rbx
nopw   0x0(%rax,%rax,1)
mov    0x4(%rsp),%esi
imul   (%rsp),%esi
add    %esi,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
je     1160 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %7, %0
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %2
%9 = mul nsw i32 2, %8
%10 = load i32, i32* %3
%11 = mul nsw i32 %9, %10
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
br label %4
13: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %15
7: ; preds = %0, %7
%8 = load i32, i32* %1
%9 = shl nsw i32 %8, 1
%10 = load i32, i32* %2
%11 = mul nsw i32 %9, %10
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%14 = icmp eq i32 %13, 2
br i1 %14, label %7, label %15
15: ; preds = %7, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ two_unit_test_c();
void two_unit_test() { two_unit_test_c(); }


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

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

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

LLVM IR (-O2):
define void @two_unit_test() {
%1 = tail call i32 (...) @two_unit_test_c()
ret void
}
void CopyPlane_16() {}


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

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

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

LLVM IR (-O2):
define void @CopyPlane_16() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void answerHello() { printf("Hello !\n"); }


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"Hello !\00"
define void @answerHello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
long rand();
long int random(void) { return rand(); }


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

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

LLVM IR (-O0):
define i64 @random() {
%1 = call i64 (...) @rand()
ret i64 %1
}

LLVM IR (-O2):
define i64 @random() {
%1 = tail call i64 (...) @rand()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ is_prime(int);
unsigned int next_prime(unsigned int start) {
  int i = start + 1;
  while (!is_prime(i))
    i++;
  return i;
}


x86 assembly (clang, -O0):
<next_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <is_prime@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1141 <next_prime+0x31>
jmp    114f <next_prime+0x3f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <next_prime+0x14>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_prime>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebx
mov    %ebx,%edi
call   1030 <is_prime@plt>
test   %eax,%eax
je     1120 <next_prime+0x10>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @next_prime(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %4, %2 ]
%4 = add i32 %3, 1
%5 = tail call i32 @is_prime(i32 %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %2, label %7
7: ; preds = %2
ret i32 %4
}
void EVP_CipherInit_ex(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_CipherInit_ex() {
ret void
}
/* Variables and functions */
int print_help();
int /*<<< orphan*/ printf(char *, char *);
int poclcc_error(char *msg) {
  printf("ERROR: %s", msg);
  return print_help();
}


x86 assembly (clang, -O0):
<poclcc_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <print_help@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poclcc_error>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <print_help@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"ERROR: %s\00"
define i32 @poclcc_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @print_help()
ret i32 %5
}

LLVM IR (-O2):
@.str = [10 x i8] c"ERROR: %s\00"
define i32 @poclcc_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @print_help()
ret i32 %3
}
int test_imm_E5uint8_reg(unsigned char val) {
  return ((val) & (0xE5 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E5uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -27
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *com_malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
int strlen(char const *);
char *com_strdup(const char *s) {
  char *dup;
  int len = strlen(s) + 1;
  dup = com_malloc(len);
  memcpy(dup, s, len);
  return dup;
}


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

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

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

LLVM IR (-O2):
define i8* @com_strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @com_malloc(i32 %3)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i32 %3)
ret i8* %4
}