xunge/DecIR huggingface dataset:
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double time_micros() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  double result = (double)tv.tv_sec + 0.000001 * (double)tv.tv_usec;
  return result;
}


x86 assembly (clang, -O0):
<time_micros>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm1
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xec7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_micros>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
mulsd  0xeca(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @time_micros() {
%1 = alloca %struct.timeval
%2 = alloca double
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = call double @llvm.fmuladd.f64(double 0x3EB0C6F7A0B5ED8D, double %9, double %6)
store double %10, double* %2
%11 = load double, double* %2
ret double %11
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @time_micros() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0x3EB0C6F7A0B5ED8D, double %6)
ret double %10
}
/* Variables and functions */
int hydra_data_ready_writing_timed(int, int, int /*<<< orphan*/);
int hydra_data_ready_writing(int socket) {
  return (hydra_data_ready_writing_timed(socket, 30, 0));
}


x86 assembly (clang, -O0):
<hydra_data_ready_writing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1e,%esi
xor    %edx,%edx
call   1030 <hydra_data_ready_writing_timed@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hydra_data_ready_writing>:
mov    $0x1e,%esi
xor    %edx,%edx
jmp    1030 <hydra_data_ready_writing_timed@plt>

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

LLVM IR (-O2):
define i32 @hydra_data_ready_writing(i32 %0) {
%2 = tail call i32 @hydra_data_ready_writing_timed(i32 %0, i32 30, i32 0)
ret i32 %2
}
int external_customer(int a, int b) {
  return (a * 10 + b / 10 + a * b + a | b);
}


x86 assembly (clang, -O0):
<external_customer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0xa,-0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    -0x4(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    %ecx,%eax
add    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<external_customer>:
movslq %esi,%rcx
imul   $0x66666667,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rax
add    %edx,%eax
lea    0xa(%rcx),%edx
imul   %edi,%edx
add    %edi,%eax
add    %edx,%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @external_customer(i32 %0, i32 %1) {
%3 = sdiv i32 %1, 10
%4 = add i32 %1, 10
%5 = mul i32 %4, %0
%6 = add i32 %3, %0
%7 = add i32 %6, %5
%8 = or i32 %7, %1
ret i32 %8
}
int numOfDigits(int n) {
  int count = 0;
  while (n != 0) {
    n /= 10;
    ++count;
  }
  return count;
}


x86 assembly (clang, -O0):
<numOfDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <numOfDigits+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <numOfDigits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<numOfDigits>:
xor    %eax,%eax
test   %edi,%edi
je     1132 <numOfDigits+0x32>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x1,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <numOfDigits+0x10>
ret

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

LLVM IR (-O2):
define i32 @numOfDigits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = sdiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = add i32 %5, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Type definitions */
struct timeval {
  int tv_sec;
  long tv_usec;
};

/* Variables and functions */
long getMicroseconds(struct timeval *t) {
  return (t->tv_sec) * 1000000 + (t->tv_usec);
}


x86 assembly (clang, -O0):
<getMicroseconds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0xf4240,(%rax),%eax
cltq
mov    -0x8(%rbp),%rcx
add    0x8(%rcx),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMicroseconds>:
movslq (%rdi),%rax
imul   $0xf4240,%rax,%rax
add    0x8(%rdi),%rax
ret

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

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @getMicroseconds(%struct.timeval* nocapture %0) {
%2 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000000
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%7 = load i64, i64* %6
%8 = add nsw i64 %7, %5
ret i64 %8
}
int test_imm_02int32_reg(int val) { return ((val) & (0x02 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_02int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x2,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_02int32_reg(i32 %0) {
%2 = and i32 %0, 2
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void gtk_tree_store_iter_depth() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_store_iter_depth() {
ret void
}
void testArray() {}


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

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

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

LLVM IR (-O2):
define void @testArray() {
ret void
}
/* Variables and functions */
#define SIGINT 129
#define SIGTERM 128
int /*<<< orphan*/ cp_socket_stop_all();
void cpsvc_signal_handler(int sig) {
  switch (sig) {
  case SIGINT:;
    cp_socket_stop_all();
    break;
  case SIGTERM:;
    cp_socket_stop_all();
    break;
  }
}


x86 assembly (clang, -O0):
<cpsvc_signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x80,%eax
je     1150 <cpsvc_signal_handler+0x40>
jmp    1131 <cpsvc_signal_handler+0x21>
mov    -0x8(%rbp),%eax
sub    $0x81,%eax
jne    1157 <cpsvc_signal_handler+0x47>
jmp    1144 <cpsvc_signal_handler+0x34>
mov    $0x0,%al
call   1030 <cp_socket_stop_all@plt>
jmp    1157 <cpsvc_signal_handler+0x47>
mov    $0x0,%al
call   1030 <cp_socket_stop_all@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpsvc_signal_handler>:
and    $0xfffffffe,%edi
cmp    $0x80,%edi
jne    1122 <cpsvc_signal_handler+0x12>
xor    %eax,%eax
jmp    1030 <cp_socket_stop_all@plt>
ret

LLVM IR (-O0):
define void @cpsvc_signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 129, label %4
i32 128, label %6
]
4: ; preds = %1
%5 = call i32 (...) @cp_socket_stop_all()
br label %8
6: ; preds = %1
%7 = call i32 (...) @cp_socket_stop_all()
br label %8
8: ; preds = %1, %6, %4
ret void
}

LLVM IR (-O2):
define void @cpsvc_signal_handler(i32 %0) {
%2 = and i32 %0, -2
%3 = icmp eq i32 %2, 128
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @cp_socket_stop_all()
br label %6
6: ; preds = %1, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ jas_image_clearfmts();
void jas_cleanup() { jas_image_clearfmts(); }


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

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

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

LLVM IR (-O2):
define void @jas_cleanup() {
%1 = tail call i32 (...) @jas_image_clearfmts()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) { fprintf(stderr, "usage: binread FILE_NAME\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"usage: binread FILE_NAME\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"usage: binread FILE_NAME\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ block_ser_if_client_fault_notification(int);
void __ser_IDL_service_client_fault_notification(int IDL_from_spd) {
  block_ser_if_client_fault_notification(IDL_from_spd);
  return;
}


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

x86 assembly (clang, -O2):
<__ser_IDL_service_client_fault_notification>:
jmp    1030 <block_ser_if_client_fault_notification@plt>

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

LLVM IR (-O2):
define void @__ser_IDL_service_client_fault_notification(i32 %0) {
%2 = tail call i32 @block_ser_if_client_fault_notification(i32 %0)
ret void
}
/* Variables and functions */
char *allocateMemory(scalar_t__);
int /*<<< orphan*/ sprintf(char *, char *, char const *);
scalar_t__ strlen(char const *);
int /*<<< orphan*/ system(char *);
void removeFile(const char *path) {
  char *removeAssertionErrorFileCommand = allocateMemory(3 + strlen(path) + 1);
  sprintf(removeAssertionErrorFileCommand, "rm %s", path);
  system(removeAssertionErrorFileCommand);
}


x86 assembly (clang, -O0):
<removeFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdi
add    $0x3,%rdi
add    $0x1,%rdi
call   1060 <allocateMemory@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe88(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeFile>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x4(%rax),%rdi
call   1060 <allocateMemory@plt>
mov    %rax,%rbx
lea    0xea1(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"rm %s\00"
define void @removeFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 3, %5
%7 = add nsw i64 %6, 1
%8 = call i8* @allocateMemory(i64 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8*, i8** %3
%13 = call i32 @system(i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"rm %s\00"
define void @removeFile(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 4
%4 = tail call i8* @allocateMemory(i64 %3)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = tail call i32 @system(i8* %4)
ret void
}
void yr_heap_alloc() { return; }


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

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

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

LLVM IR (-O2):
define void @yr_heap_alloc() {
ret void
}
/* Variables and functions */
int vrna_file_PS_rnaplot_a(char const *, char const *, char const *,
                           char const *, char const *, int /*<<< orphan*/ *);
int PS_rna_plot_a_gquad(char *string, char *structure, char *ssfile, char *pre,
                        char *post) {
  return vrna_file_PS_rnaplot_a((const char *)string, (const char *)structure,
                                (const char *)ssfile, (const char *)pre,
                                (const char *)post, NULL);
}


x86 assembly (clang, -O0):
<PS_rna_plot_a_gquad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <vrna_file_PS_rnaplot_a@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PS_rna_plot_a_gquad>:
xor    %r9d,%r9d
jmp    1030 <vrna_file_PS_rnaplot_a@plt>

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

LLVM IR (-O2):
define i32 @PS_rna_plot_a_gquad(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i32 @vrna_file_PS_rnaplot_a(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32* null)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ runtime_error(char *);
void __illegal__(void) { runtime_error("Illegal opcode"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Illegal opcode\00"
define void @__illegal__() {
%1 = call i32 @runtime_error(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Illegal opcode\00"
define void @__illegal__() {
%1 = tail call i32 @runtime_error(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
int rl_vi_first_print(count, key)
int count __attribute__((unused)), key;
{ return (rl_vi_back_to_indent(1, key)); }


x86 assembly (clang, -O0):
<rl_vi_first_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <rl_vi_back_to_indent@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rl_vi_first_print>:
mov    $0x1,%edi
xor    %eax,%eax
jmp    1030 <rl_vi_back_to_indent@plt>

LLVM IR (-O0):
define i32 @rl_vi_first_print(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rl_vi_back_to_indent to i32 (i32, i32, ...)*)(i32 1, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @rl_vi_first_print(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @rl_vi_back_to_indent to i32 (i32, i32, ...)*)(i32 1, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_nyuzi_write_control_reg(int, int);
void ack_interrupt(int interrupt) {
  __builtin_nyuzi_write_control_reg(15, 1 << interrupt);
}


x86 assembly (clang, -O0):
<ack_interrupt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    $0xf,%edi
call   1030 <__builtin_nyuzi_write_control_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ack_interrupt>:
mov    %edi,%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    $0xf,%edi
jmp    1030 <__builtin_nyuzi_write_control_reg@plt>

LLVM IR (-O0):
define void @ack_interrupt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 1, %3
%5 = call i32 @__builtin_nyuzi_write_control_reg(i32 15, i32 %4)
ret void
}

LLVM IR (-O2):
define void @ack_interrupt(i32 %0) {
%2 = shl nuw i32 1, %0
%3 = tail call i32 @__builtin_nyuzi_write_control_reg(i32 15, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ guitp(char *, int);
void g_mode_t() { guitp("mode_t", sizeof(mode_t)); }


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

x86 assembly (clang, -O2):
<g_mode_t>:
lea    0xee9(%rip),%rdi
mov    $0x4,%esi
jmp    1030 <guitp@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"mode_t\00"
define void @g_mode_t() {
%1 = call i32 @guitp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"mode_t\00"
define void @g_mode_t() {
%1 = tail call i32 @guitp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
void __DSVERIFIER_assert_msg(_Bool expression, char *msg) {
  printf("%c", msg);
  assert(expression);
}


x86 assembly (clang, -O0):
<__DSVERIFIER_assert_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__DSVERIFIER_assert_msg>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @__DSVERIFIER_assert_msg(i1 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = zext i1 %0 to i8
store i8 %5, i8* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8, i8* %3
%9 = trunc i8 %8 to i1
%10 = zext i1 %9 to i32
%11 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @__DSVERIFIER_assert_msg(i1 zeroext %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = zext i1 %0 to i32
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int count(int *, int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a[] = {3, 4, 5, 10};
  int sz = sizeof(a) / sizeof(int);
  printf("Count  : %d \n", count(a, sz, 14));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x4,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    $0xe,%edx
call   1030 <count@plt>
mov    %eax,%esi
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0xe,%edx
call   1030 <count@plt>
lea    0xec8(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [4 x i32] [i32 3, i32 4, i32 5, i32 10]
@.str = [14 x i8] c"Count : %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [4 x i32]* %2 to i8*
store i32 4, i32* %3
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @count(i32* %5, i32 %6, i32 14)
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [4 x i32] [i32 3, i32 4, i32 5, i32 10]
@.str = [14 x i8] c"Count : %d \0A\00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @count(i32* %3, i32 4, i32 14)
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
scalar_t__ FLT_RADIX;
double radixdbl_(double x) { return (double)FLT_RADIX; }


x86 assembly (clang, -O0):
<radixdbl_>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ed8(%rip),%rax
cvtsi2sdq (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<radixdbl_>:
mov    0x2ee1(%rip),%rax
cvtsi2sdq (%rax),%xmm0
ret

LLVM IR (-O0):
@FLT_RADIX = global i64 0
define double @radixdbl_(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load i64, i64* @FLT_RADIX
%4 = sitofp i64 %3 to double
ret double %4
}

LLVM IR (-O2):
@FLT_RADIX = global i64 0
define double @radixdbl_(double %0) {
%2 = load i64, i64* @FLT_RADIX
%3 = sitofp i64 %2 to double
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double);
int __write_node_value_double(FILE *fout, void *value) {
  double *d = (double *)value;
  fprintf(fout, "%5.2g", *d);
  return (1);
}


x86 assembly (clang, -O0):
<__write_node_value_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__write_node_value_double>:
push   %rax
movsd  (%rsi),%xmm0
lea    0xee4(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%5.2g\00"
define i32 @__write_node_value_double(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca double*
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to double*
store double* %7, double** %5
%8 = load i32*, i32** %3
%9 = load double*, double** %5
%10 = load double, double* %9
%11 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 1
}

LLVM IR (-O2):
@.str = [6 x i8] c"%5.2g\00"
define i32 @__write_node_value_double(i32* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to double*
%4 = load double, double* %3
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 1
}
/* Variables and functions */
int are_all_7bit_characters(const unsigned char *s) {
  size_t i;
  i = 0;
  while (s[i] != '\0' && (s[i] & 0x80) == 0)
    i++;
  return (s[i] == '\0');
}


x86 assembly (clang, -O0):
<are_all_7bit_characters>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1144 <are_all_7bit_characters+0x44>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
and    $0x80,%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1154 <are_all_7bit_characters+0x54>
jmp    1165 <are_all_7bit_characters+0x65>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <are_all_7bit_characters+0x10>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<are_all_7bit_characters>:
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jg     1100 <are_all_7bit_characters>
sete   %al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @are_all_7bit_characters(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
br label %4
4: ; preds = %21, %1
%5 = load i8*, i8** %2
%6 = load i64, i64* %3
%7 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %4
%12 = load i8*, i8** %2
%13 = load i64, i64* %3
%14 = getelementptr inbounds i8, i8* %12, i64 %13
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = and i32 %16, 128
%18 = icmp eq i32 %17, 0
br label %19
19: ; preds = %11, %4
%20 = phi i1 [ false, %4 ], [ %18, %11 ]
br i1 %20, label %21, label %24
21: ; preds = %19
%22 = load i64, i64* %3
%23 = add i64 %22, 1
store i64 %23, i64* %3
br label %4
24: ; preds = %19
%25 = load i8*, i8** %2
%26 = load i64, i64* %3
%27 = getelementptr inbounds i8, i8* %25, i64 %26
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = icmp eq i32 %29, 0
%31 = zext i1 %30 to i32
ret i32 %31
}

LLVM IR (-O2):
define i32 @are_all_7bit_characters(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp sgt i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %2, label %8
8: ; preds = %2
%9 = icmp eq i8 %5, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
int is_eligible_point(double pointx, double pointy, int width, int height) {
  return (pointx >= ((15 - 1) / 2) && pointy >= ((15 - 1) / 2) &&
          pointx + ((15 - 1) / 2) < width && pointy + ((15 - 1) / 2) < height);
}


x86 assembly (clang, -O0):
<is_eligible_point>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
movsd  0xedd(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jb     1189 <is_eligible_point+0x89>
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xec1(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jb     1189 <is_eligible_point+0x89>
movsd  0xeac(%rip),%xmm1
addsd  -0x8(%rbp),%xmm1
cvtsi2sdl -0x14(%rbp),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jbe    1189 <is_eligible_point+0x89>
movsd  0xe8b(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_eligible_point>:
xor    %eax,%eax
ucomisd 0xef6(%rip),%xmm0
jb     1140 <is_eligible_point+0x40>
ucomisd 0xeec(%rip),%xmm1
jb     1140 <is_eligible_point+0x40>
addsd  0xee2(%rip),%xmm0
cvtsi2sd %edi,%xmm2
ucomisd %xmm0,%xmm2
jbe    1140 <is_eligible_point+0x40>
addsd  0xed0(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @is_eligible_point(double %0, double %1, i32 %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
store double %0, double* %5
store double %1, double* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load double, double* %5
%10 = fcmp oge double %9, 7.000000e+00
br i1 %10, label %11, label %26
11: ; preds = %4
%12 = load double, double* %6
%13 = fcmp oge double %12, 7.000000e+00
br i1 %13, label %14, label %26
14: ; preds = %11
%15 = load double, double* %5
%16 = fadd double %15, 7.000000e+00
%17 = load i32, i32* %7
%18 = sitofp i32 %17 to double
%19 = fcmp olt double %16, %18
br i1 %19, label %20, label %26
20: ; preds = %14
%21 = load double, double* %6
%22 = fadd double %21, 7.000000e+00
%23 = load i32, i32* %8
%24 = sitofp i32 %23 to double
%25 = fcmp olt double %22, %24
br label %26
26: ; preds = %20, %14, %11, %4
%27 = phi i1 [ false, %14 ], [ false, %11 ], [ false, %4 ], [ %25, %20 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @is_eligible_point(double %0, double %1, i32 %2, i32 %3) {
%5 = fcmp oge double %0, 7.000000e+00
%6 = fcmp oge double %1, 7.000000e+00
%7 = and i1 %5, %6
br i1 %7, label %8, label %17
8: ; preds = %4
%9 = fadd double %0, 7.000000e+00
%10 = sitofp i32 %2 to double
%11 = fcmp olt double %9, %10
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = fadd double %1, 7.000000e+00
%14 = sitofp i32 %3 to double
%15 = fcmp olt double %13, %14
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %12, %8, %4
%18 = phi i32 [ 0, %8 ], [ 0, %4 ], [ %16, %12 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ xml_deinit();
void glogbook_rd_deinit(void) { xml_deinit(); }


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

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

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

LLVM IR (-O2):
define void @glogbook_rd_deinit() {
%1 = tail call i32 (...) @xml_deinit()
ret void
}
void gpio_initialize_chip_active_pin(void) {}


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

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

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

LLVM IR (-O2):
define void @gpio_initialize_chip_active_pin() {
ret void
}
int any_even_one(unsigned x) { return (x & 0x55555555) != 0; }


x86 assembly (clang, -O0):
<any_even_one>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x55555555,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<any_even_one>:
xor    %eax,%eax
test   $0x55555555,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @any_even_one(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1431655765
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @any_even_one(i32 %0) {
%2 = and i32 %0, 1431655765
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ init(char *);
int ok();
int /*<<< orphan*/ test();
int main() {
  init("operators");
  test();
  return ok();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <init@plt>
mov    $0x0,%al
call   1050 <test@plt>
mov    $0x0,%al
call   1030 <ok@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <init@plt>
xor    %eax,%eax
call   1050 <test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ok@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"operators\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @init(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test()
%4 = call i32 (...) @ok()
ret i32 %4
}

LLVM IR (-O2):
@.str = [10 x i8] c"operators\00"
define i32 @main() {
%1 = tail call i32 @init(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test()
%3 = tail call i32 (...) @ok()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: tserialize\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Usage: tserialize\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
unsigned int align_formula(unsigned int, unsigned int);
int is_align(unsigned int v, unsigned int align) {
  return align_formula(v, align) == v;
}


x86 assembly (clang, -O0):
<is_align>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <align_formula@plt>
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_align>:
push   %rbx
mov    %edi,%ebx
call   1030 <align_formula@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_align(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @align_formula(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_align(i32 %0, i32 %1) {
%3 = tail call i32 @align_formula(i32 %0, i32 %1)
%4 = icmp eq i32 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
void init_fft2() {}


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

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

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

LLVM IR (-O2):
define void @init_fft2() {
ret void
}
int Check(char *A, char *B, int lenght) {
  int i;
  for (i = 0; i < lenght; ++i) {
    if (*(A + i) != *(B + i))
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<Check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1161 <Check+0x61>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     114e <Check+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1168 <Check+0x68>
jmp    1153 <Check+0x53>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <Check+0x16>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Check>:
mov    $0x1,%eax
test   %edx,%edx
jle    1122 <Check+0x22>
mov    %edx,%r8d
xor    %edx,%edx
xchg   %ax,%ax
movzbl (%rdi,%rdx,1),%ecx
cmp    (%rsi,%rdx,1),%cl
jne    1123 <Check+0x23>
add    $0x1,%rdx
cmp    %rdx,%r8
jne    1110 <Check+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @Check(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %1, i64 %10
%14 = load i8, i8* %13
%15 = icmp eq i8 %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %7, label %17
17: ; preds = %9, %7, %3
%18 = phi i32 [ 1, %3 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
size_t pwrite(int, void const *, size_t, int /*<<< orphan*/);
int SeekWriteFile(int fd, const void *address, size_t length, off_t position) {
  assert(fd != -1);
  if (pwrite(fd, address, length, position) != length)
    return (-1);
  return (0);
}


x86 assembly (clang, -O0):
<SeekWriteFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1040 <pwrite@plt>
cmp    -0x18(%rbp),%rax
je     1170 <SeekWriteFile+0x50>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <SeekWriteFile+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SeekWriteFile>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0xffffffff,%ebp
setne  %dil
call   1030 <assert@plt>
mov    %ebp,%edi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
call   1040 <pwrite@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
setne  %cl
neg    %ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @SeekWriteFile(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i32 %3, i32* %9
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, -1
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %6
%15 = load i8*, i8** %7
%16 = load i64, i64* %8
%17 = load i32, i32* %9
%18 = call i64 @pwrite(i32 %14, i8* %15, i64 %16, i32 %17)
%19 = load i64, i64* %8
%20 = icmp ne i64 %18, %19
br i1 %20, label %21, label %22
21: ; preds = %4
store i32 -1, i32* %5
br label %23
22: ; preds = %4
store i32 0, i32* %5
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
define i32 @SeekWriteFile(i32 %0, i8* nocapture %1, i64 %2, i32 %3) {
%5 = icmp ne i32 %0, -1
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i64 @pwrite(i32 %0, i8* %1, i64 %2, i32 %3)
%9 = icmp ne i64 %8, %2
%10 = sext i1 %9 to i32
ret i32 %10
}
int area(int b, int h) { return (b * h); }


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

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

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

LLVM IR (-O2):
define i32 @area(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
char *regprop(char *op) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @regprop(i8* nocapture readnone %0) {
ret i8* undef
}
__attribute__((always_)) void touch_softlockup_watchdog_sync(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ReadWord(char *, int /*<<< orphan*/ *, char *);
int SearchVocab(char *);
int ReadWordIndex(FILE *fin, char *eof) {
  char word[100], eof_l = 0;
  ReadWord(word, fin, &eof_l);
  if (eof_l) {
    *eof = 1;
    return -1;
  }
  return SearchVocab(word);
}


x86 assembly (clang, -O0):
<ReadWordIndex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movb   $0x0,-0x81(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x81(%rbp),%rdx
call   1030 <ReadWord@plt>
cmpb   $0x0,-0x81(%rbp)
je     116e <ReadWordIndex+0x4e>
mov    -0x18(%rbp),%rax
movb   $0x1,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    117a <ReadWordIndex+0x5a>
lea    -0x80(%rbp),%rdi
call   1040 <SearchVocab@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadWordIndex>:
push   %rbx
sub    $0x80,%rsp
mov    %rsi,%rbx
mov    %rdi,%rsi
movb   $0x0,0xf(%rsp)
lea    0x10(%rsp),%rdi
lea    0xf(%rsp),%rdx
call   1030 <ReadWord@plt>
cmpb   $0x0,0xf(%rsp)
je     1153 <ReadWordIndex+0x33>
movb   $0x1,(%rbx)
mov    $0xffffffff,%eax
jmp    115d <ReadWordIndex+0x3d>
lea    0x10(%rsp),%rdi
call   1040 <SearchVocab@plt>
add    $0x80,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ReadWordIndex(i32* %0, i8* nocapture writeonly %1) {
%3 = alloca [100 x i8]
%4 = alloca i8
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
store i8 0, i8* %4
%6 = call i32 @ReadWord(i8* %5, i32* %0, i8* %4)
%7 = load i8, i8* %4
%8 = icmp eq i8 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %2
store i8 1, i8* %1
br label %12
10: ; preds = %2
%11 = call i32 @SearchVocab(i8* %5)
br label %12
12: ; preds = %10, %9
%13 = phi i32 [ -1, %9 ], [ %11, %10 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ unlock(int /*<<< orphan*/ *, char const *);
int ufclose(FILE *file, const char *filename) {
  unlock(file, filename);
  return fclose(file);
}


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

x86 assembly (clang, -O2):
<ufclose>:
push   %rbx
mov    %rdi,%rbx
call   1030 <unlock@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <fclose@plt>

LLVM IR (-O0):
define i32 @ufclose(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 @unlock(i32* %5, i8* %6)
%8 = load i32*, i32** %3
%9 = call i32 @fclose(i32* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @ufclose(i32* %0, i8* %1) {
%3 = tail call i32 @unlock(i32* %0, i8* %1)
%4 = tail call i32 @fclose(i32* %0)
ret i32 %4
}