xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_and_set_bit(unsigned int, void volatile *);
__attribute__((always_)) void set_bit(unsigned int bit, volatile void *bits) {
  test_and_set_bit(bit, bits);
}


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

x86 assembly (clang, -O2):
<set_bit>:
jmp    1030 <test_and_set_bit@plt>

LLVM IR (-O0):
define void @set_bit(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 @test_and_set_bit(i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @set_bit(i32 %0, i8* %1) {
%3 = tail call i32 @test_and_set_bit(i32 %0, i8* %1)
ret void
}
void mdea_boolean_node_destroy(void *p) {}


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

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

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

LLVM IR (-O2):
define void @mdea_boolean_node_destroy(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int int64_t;
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) int32_t __checkint_is_mixed_sign64(int64_t x,
                                                            int64_t y) {
  return ((x ^ y) < 0);
}


x86 assembly (clang, -O0):
<__checkint_is_mixed_sign64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
cmp    $0x0,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__checkint_is_mixed_sign64>:
mov    %edi,%eax
xor    %esi,%eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @__checkint_is_mixed_sign64(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 = xor i32 %5, %6
%8 = icmp slt i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @__checkint_is_mixed_sign64(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = lshr i32 %3, 31
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC_RAW;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
uint64_t time_now(void) {
  struct timespec now;
  clock_gettime(CLOCK_MONOTONIC_RAW, &now);
  return (now.tv_sec * 1000000) + (now.tv_nsec / 1000);
}


x86 assembly (clang, -O0):
<time_now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0xf4240,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_now>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
imul   $0xf4240,(%rsp),%ecx
movslq 0x4(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC_RAW = global i32 0
define i32 @time_now() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC_RAW
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = add nsw i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC_RAW = global i32 0
define i32 @time_now() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC_RAW
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000
%11 = add nsw i32 %10, %7
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void catcher(int sig) {
  printf("   Signal catcher called for signal %d\n", sig);
}


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

x86 assembly (clang, -O2):
<catcher>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [40 x i8] c" Signal catcher called for signal %d\0A\00"
define void @catcher(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c" Signal catcher called for signal %d\0A\00"
define void @catcher(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *generateLogTime(char *timeStr) {
  time_t timep;
  struct tm *tm;
  time(&timep);
  tm = localtime(&timep);
  strftime(timeStr, 100 - 1, "%a %b %e %T %Y", tm);
  return timeStr;
}


x86 assembly (clang, -O0):
<generateLogTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x63,%esi
lea    0xe9a(%rip),%rdx
call   1050 <strftime@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateLogTime>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <time@plt>
mov    %r14,%rdi
call   1030 <localtime@plt>
lea    0xead(%rip),%rdx
mov    %rbx,%rdi
mov    $0x63,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [15 x i8] c"%a %b %e %T %Y\00"
define i8* @generateLogTime(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm*
store i8* %0, i8** %2
%5 = call i32 @time(i32* %3)
%6 = call %struct.tm* @localtime(i32* %3)
store %struct.tm* %6, %struct.tm** %4
%7 = load i8*, i8** %2
%8 = load %struct.tm*, %struct.tm** %4
%9 = call i32 @strftime(i8* %7, i32 99, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [15 x i8] c"%a %b %e %T %Y\00"
define i8* @generateLogTime(i8* returned %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call %struct.tm* @localtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 99, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* %0
}
int toc_remove_input_stream(int fd) { return 1; }


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

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

LLVM IR (-O0):
define i32 @toc_remove_input_stream(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 1
}

LLVM IR (-O2):
define i32 @toc_remove_input_stream(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
__attribute__((always_)) __attribute__((noreturn)) void
out_fatal_abort(const char *file, int line, const char *func, const char *fmt,
                ...) {
  (void)file;
  (void)line;
  (void)func;
  (void)fmt;
  abort();
}


x86 assembly (clang, -O0):
<out_fatal_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<out_fatal_abort>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @out_fatal_abort(i8* %0, i32 %1, i8* %2, i8* %3, ...) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @out_fatal_abort(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* nocapture readnone %3, ...) {
%5 = tail call i32 (...) @abort()
unreachable
}
void foo824() {}


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

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

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

LLVM IR (-O2):
define void @foo824() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ RAND_load_file(char *, int);
void init_crypto(void) {
  RAND_load_file("/dev/urandom", 1024);
  ERR_load_crypto_strings();
}


x86 assembly (clang, -O0):
<init_crypto>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x400,%esi
call   1030 <RAND_load_file@plt>
mov    $0x0,%al
call   1040 <ERR_load_crypto_strings@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_crypto>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x400,%esi
call   1030 <RAND_load_file@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ERR_load_crypto_strings@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/urandom\00"
define void @init_crypto() {
%1 = call i32 @RAND_load_file(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1024)
%2 = call i32 (...) @ERR_load_crypto_strings()
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/urandom\00"
define void @init_crypto() {
%1 = tail call i32 @RAND_load_file(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1024)
%2 = tail call i32 (...) @ERR_load_crypto_strings()
ret void
}
void genc_seq_d() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ coin_output_ascii85(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                       unsigned char *, unsigned char *, int *,
                                       int *, int const, int);
void coin_flush_ascii85(FILE *fp, unsigned char *tuple, unsigned char *linebuf,
                        int *tuplecnt, int *linecnt, const int rowlen) {
  coin_output_ascii85(fp, 0, tuple, linebuf, tuplecnt, linecnt, rowlen, 1);
}


x86 assembly (clang, -O0):
<coin_flush_ascii85>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x2c(%rbp),%eax
xor    %esi,%esi
mov    %eax,(%rsp)
movl   $0x1,0x8(%rsp)
call   1030 <coin_output_ascii85@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coin_flush_ascii85>:
push   %rax
mov    %r9d,%eax
mov    %r8,%r9
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
xor    %esi,%esi
push   $0x1
push   %rax
call   1030 <coin_output_ascii85@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @coin_flush_ascii85(i32* %0, i8* %1, i8* %2, i32* %3, i32* %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32
store i32* %0, i32** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i8*, i8** %8
%15 = load i8*, i8** %9
%16 = load i32*, i32** %10
%17 = load i32*, i32** %11
%18 = load i32, i32* %12
%19 = call i32 @coin_output_ascii85(i32* %13, i32 0, i8* %14, i8* %15, i32* %16, i32* %17, i32 %18, i32 1)
ret void
}

LLVM IR (-O2):
define void @coin_flush_ascii85(i32* %0, i8* %1, i8* %2, i32* %3, i32* %4, i32 %5) {
%7 = tail call i32 @coin_output_ascii85(i32* %0, i32 0, i8* %1, i8* %2, i32* %3, i32* %4, i32 %5, i32 1)
ret void
}
/* Type definitions */
struct completion {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __wait_completion(struct completion *);
unsigned long wait_for_completion_timeout(struct completion *work,
                                          unsigned long timeout) {
  __wait_completion(work);
  return 1;
}


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

x86 assembly (clang, -O2):
<wait_for_completion_timeout>:
push   %rax
call   1030 <__wait_completion@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.completion = type { i32 }
define i64 @wait_for_completion_timeout(%struct.completion* %0, i64 %1) {
%3 = alloca %struct.completion*
%4 = alloca i64
store %struct.completion* %0, %struct.completion** %3
store i64 %1, i64* %4
%5 = load %struct.completion*, %struct.completion** %3
%6 = call i32 @__wait_completion(%struct.completion* %5)
ret i64 1
}

LLVM IR (-O2):
%struct.completion = type { i32 }
define i64 @wait_for_completion_timeout(%struct.completion* %0, i64 %1) {
%3 = tail call i32 @__wait_completion(%struct.completion* %0)
ret i64 1
}
void d_putub(register unsigned char *ptr, register unsigned char data) {
  *ptr = data;
}


x86 assembly (clang, -O0):
<d_putub>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_putub>:
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @d_putub(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i8*, i8** %3
store i8 %5, i8* %6
ret void
}

LLVM IR (-O2):
define void @d_putub(i8* nocapture writeonly %0, i8 zeroext %1) {
store i8 %1, i8* %0
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long event;
};
struct TYPE_4__ {
  TYPE_1__ xmap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xmap_event(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xmap.event = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xmap_event(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help_cds() {
  printf("\nHELP: ./createDataSet options \n\n"
         "mandatory:\n"
         "        -x input_file         -- genotype file (in .geno format)\n\n"
         "optional:\n"
         "        -h                    -- help\n"
         "        -s seed               -- seed random init             "
         "(default: random)\n"
         "        -r percentage         -- percentage of masked data    "
         "(default: 0.05)\n\n"
         "        -o output_file        -- output file (in .geno "
         "format)(default: input_file_I.geno)\n\n");
}


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

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

LLVM IR (-O0):
@.str = [411 x i8] c"\0AHELP: ./createDataSet\C2\A0options \0A\0Amandatory:\0A -x input_file -- genotype file (in .geno format)\0A\0Aoptional:\0A -h -- help\0A -s seed -- seed random init (default: random)\0A -r percentage -- percentage of masked data (default: 0.05)\0A\0A -o output_file -- output file (in .geno format)(default: input_file_I.geno)\0A\0A\00"
define void @print_help_cds() {
%1 = call i32 @printf(i8* getelementptr inbounds ([411 x i8], [411 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [410 x i8] c"\0AHELP: ./createDataSet\C2\A0options \0A\0Amandatory:\0A -x input_file -- genotype file (in .geno format)\0A\0Aoptional:\0A -h -- help\0A -s seed -- seed random init (default: random)\0A -r percentage -- percentage of masked data (default: 0.05)\0A\0A -o output_file -- output file (in .geno format)(default: input_file_I.geno)\0A\00"
define void @print_help_cds() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([410 x i8], [410 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_int(int);
int /*<<< orphan*/ print_string(char *);
void main(void) {
  int num;
  num = 11111111111;
  print_string("Should get some negative number\n");
  print_int(num);
  print_string("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x964619c7,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xed5(%rip),%rdi
call   1030 <print_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <print_string@plt>
mov    $0x964619c7,%edi
call   1040 <print_int@plt>
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1030 <print_string@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Should get some negative number\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca i32
store i32 -1773790777, i32* %1
%2 = call i32 @print_string(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
%4 = call i32 @print_int(i32 %3)
%5 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Should get some negative number\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @main() {
%1 = tail call i32 @print_string(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_int(i32 -1773790777)
%3 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int update_osii(char *, int, int);
int restore_osii(char *destination) {
  return update_osii(destination, 0x01100000, 0x01101000);
}


x86 assembly (clang, -O0):
<restore_osii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1100000,%esi
mov    $0x1101000,%edx
call   1030 <update_osii@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restore_osii>:
mov    $0x1100000,%esi
mov    $0x1101000,%edx
jmp    1030 <update_osii@plt>

LLVM IR (-O0):
define i32 @restore_osii(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @update_osii(i8* %3, i32 17825792, i32 17829888)
ret i32 %4
}

LLVM IR (-O2):
define i32 @restore_osii(i8* %0) {
%2 = tail call i32 @update_osii(i8* %0, i32 17825792, i32 17829888)
ret i32 %2
}
void daemonize(void) {}


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

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

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

LLVM IR (-O2):
define void @daemonize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) { fprintf(stderr, "USAGE: %s <number>\n", name); }


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"USAGE: %s <number>\0A\00"
define void @usage(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 ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"USAGE: %s <number>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void ext2fs_fast_clear_bit(unsigned int nr, void *addr) {
  unsigned char *ADDR = (unsigned char *)addr;
  ADDR += nr >> 3;
  *ADDR &= ~(1 << (nr & 0x07));
}


x86 assembly (clang, -O0):
<ext2fs_fast_clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
shr    $0x3,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext2fs_fast_clear_bit>:
mov    %edi,%ecx
mov    %edi,%eax
shr    $0x3,%rax
and    $0x7,%cl
mov    $0x1,%edx
shl    %cl,%edx
not    %dl
and    %dl,(%rsi,%rax,1)
ret

LLVM IR (-O0):
define void @ext2fs_fast_clear_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
store i8* %6, i8** %5
%7 = load i32, i32* %3
%8 = lshr i32 %7, 3
%9 = load i8*, i8** %5
%10 = zext i32 %8 to i64
%11 = getelementptr inbounds i8, i8* %9, i64 %10
store i8* %11, i8** %5
%12 = load i32, i32* %3
%13 = and i32 %12, 7
%14 = shl i32 1, %13
%15 = xor i32 %14, -1
%16 = load i8*, i8** %5
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = and i32 %18, %15
%20 = trunc i32 %19 to i8
store i8 %20, i8* %16
ret void
}

LLVM IR (-O2):
define void @ext2fs_fast_clear_bit(i32 %0, i8* nocapture %1) {
%3 = lshr i32 %0, 3
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = and i32 %0, 7
%7 = shl nuw nsw i32 1, %6
%8 = load i8, i8* %5
%9 = trunc i32 %7 to i8
%10 = xor i8 %9, -1
%11 = and i8 %8, %10
store i8 %11, i8* %5
ret void
}
void IV_POPEN_REQUEST_INIT(struct iv_popen_request *this) {}


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

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

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

LLVM IR (-O2):
%struct.iv_popen_request = type opaque
define void @IV_POPEN_REQUEST_INIT(%struct.iv_popen_request* nocapture %0) {
ret void
}
unsigned short unsignedshort_ignoring_signedlong(unsigned short x,
                                                 signed long y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedshort_ignoring_signedlong>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @unsignedshort_ignoring_signedlong(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define zeroext i16 @unsignedshort_ignoring_signedlong(i16 returned zeroext %0, i64 %1) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void Yamete(const char *s) {
  write(STDOUT_FILENO, "\x1b[2J", 4);
  write(STDOUT_FILENO, "\x1b[H", 3);
  perror(s);
  exit(1);
  return;
}


x86 assembly (clang, -O0):
<Yamete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xe9f(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<Yamete>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xeb8(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%r14),%edi
lea    0xea9(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [4 x i8] c"\1B[H\00"
define void @Yamete(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @write(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%5 = load i32, i32* @STDOUT_FILENO
%6 = call i32 @write(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%7 = load i8*, i8** %2
%8 = call i32 @perror(i8* %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [4 x i8] c"\1B[H\00"
define void @Yamete(i8* nocapture %0) {
%2 = load i32, i32* @STDOUT_FILENO
%3 = tail call i32 @write(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = load i32, i32* @STDOUT_FILENO
%5 = tail call i32 @write(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%6 = tail call i32 @perror(i8* %0)
%7 = tail call i32 @exit(i32 1)
unreachable
}
int check_phys_apicid_present(int boot_cpu_physical_apicid) { return (1); }


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

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

LLVM IR (-O0):
define i32 @check_phys_apicid_present(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 1
}

LLVM IR (-O2):
define i32 @check_phys_apicid_present(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void cmp_eax_imm32(unsigned int imm32) {
  put8(0x3D);
  put32(imm32);
}


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

x86 assembly (clang, -O2):
<cmp_eax_imm32>:
push   %rbx
mov    %edi,%ebx
mov    $0x3d,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @cmp_eax_imm32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 61)
%4 = load i32, i32* %2
%5 = call i32 @put32(i32 %4)
ret void
}

LLVM IR (-O2):
define void @cmp_eax_imm32(i32 %0) {
%2 = tail call i32 @put8(i32 61)
%3 = tail call i32 @put32(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ server_config(int *, int);
int main() {
  int server;
  server_config(&server, 7000);
  printf("Lyssnar på port '7000', max = %d\n", 2000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x1b58,%esi
call   1030 <server_config@plt>
lea    0xebc(%rip),%rdi
mov    $0x7d0,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
mov    $0x1b58,%esi
call   1030 <server_config@plt>
lea    0xec9(%rip),%rdi
mov    $0x7d0,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Lyssnar p\C3\A5 port '7000', max = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @server_config(i32* %2, i32 7000)
%4 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 2000)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"Lyssnar p\C3\A5 port '7000', max = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @server_config(i32* %1, i32 7000)
%4 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 2000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ error(int, int /*<<< orphan*/, char *);
void sig_pipe(int signo) { error(1, 0, "broken pipe"); }


x86 assembly (clang, -O0):
<sig_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
lea    0xed7(%rip),%rdx
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_pipe>:
lea    0xee9(%rip),%rdx
mov    $0x1,%edi
xor    %esi,%esi
jmp    1030 <error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"broken pipe\00"
define void @sig_pipe(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @error(i32 1, i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"broken pipe\00"
define void @sig_pipe(i32 %0) {
%2 = tail call i32 @error(i32 1, i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float floor(float);
float __glsl_mod(float x, float y) { return x - y * floor(x / y); }


x86 assembly (clang, -O0):
<__glsl_mod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movss  -0x10(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__glsl_mod>:
push   %rax
movss  %xmm1,(%rsp)
movss  %xmm0,0x4(%rsp)
divss  %xmm1,%xmm0
call   1030 <floorf@plt>
mulss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @__glsl_mod(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = load float, float* %3
%8 = load float, float* %4
%9 = fdiv float %7, %8
%10 = call float @floor(float %9)
%11 = fneg float %6
%12 = call float @llvm.fmuladd.f32(float %11, float %10, float %5)
ret float %12
}

LLVM IR (-O2):
define float @__glsl_mod(float %0, float %1) {
%3 = fdiv float %0, %1
%4 = tail call float @llvm.floor.f32(float %3)
%5 = fneg float %1
%6 = tail call float @llvm.fmuladd.f32(float %5, float %4, float %0)
ret float %6
}
int main() {
  int x = 2;
  int z = 3;
  return x + z;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 5
}
void ff_hevc_put_hevc_uni_w_epel_v16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_v16_12_sse4() {
ret void
}
__attribute__((always_)) int api1(int api_no, int arg1) {
  int ret = 0;
  __asm__ __volatile__("int $0x44" : "=a"(ret) : "0"(api_no), "b"(arg1));
  return ret;
}


x86 assembly (clang, -O0):
<api1>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ebx
int    $0x44
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<api1>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%eax
int    $0x44
pop    %rbx
ret

LLVM IR (-O0):
define i32 @api1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 asm sideeffect "int $$0x44", "={ax},0,{bx},~{dirflag},~{fpsr},~{flags}"(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @api1(i32 %0, i32 %1) {
%3 = tail call i32 asm sideeffect "int $$0x44", "={ax},0,{bx},~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
long double tanl(long double);
__attribute__((__weak__, __always___)) long double
softboundmpx_tanl(long double x) {
  return tanl(x);
}


x86 assembly (clang, -O0):
<softboundmpx_tanl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <tanl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_tanl>:
jmp    1030 <tanl@plt>

LLVM IR (-O0):
define weak x86_fp80 @softboundmpx_tanl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @tanl(x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define weak x86_fp80 @softboundmpx_tanl(x86_fp80 %0) {
%2 = tail call x86_fp80 @tanl(x86_fp80 %0)
ret x86_fp80 %2
}
void kw(int signum) { (void)signum; }


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

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

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

LLVM IR (-O2):
define void @kw(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
void foo(int *inptr) {
  int *bar;
  bar = (int *)malloc(sizeof(int));
  *bar = 100;
  inptr = bar;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x64,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0x64,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @foo(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %2
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
store i32 100, i32* %6
%7 = load i32*, i32** %3
store i32* %7, i32** %2
ret void
}

LLVM IR (-O2):
define void @foo(i32* nocapture readnone %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32 100, i32* %3
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t EEPROMBlockLock(uint32_t ui32Block) {
  ;
  (*((volatile unsigned long *)(0x400AF004))) = ui32Block;
  (*((volatile unsigned long *)(0x400AF020))) = 0xFFFFFFFF;
  return ((*((volatile unsigned long *)(0x400AF020))));
}


x86 assembly (clang, -O0):
<EEPROMBlockLock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x400af004,%eax
mov    %rcx,(%rax)
mov    $0x400af020,%eax
mov    $0xffffffff,%ecx
mov    %rcx,(%rax)
mov    $0x400af020,%eax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROMBlockLock>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    %rax,0x400af004
40
mov    $0xffffffff,%eax
mov    %rax,0x400af020
40
mov    0x400af020,%rax
40
ret

LLVM IR (-O0):
define i64 @EEPROMBlockLock(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074458628 to i64*)
store volatile i64 4294967295, i64* inttoptr (i64 1074458656 to i64*)
%4 = load volatile i64, i64* inttoptr (i64 1074458656 to i64*)
ret i64 %4
}

LLVM IR (-O2):
define i64 @EEPROMBlockLock(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074458628 to i64*)
store volatile i64 4294967295, i64* inttoptr (i64 1074458656 to i64*)
%4 = load volatile i64, i64* inttoptr (i64 1074458656 to i64*)
ret i64 %4
}
int strmatch(const char *s, const char *prefix) {
  int i;
  for (i = 0; prefix[i]; i++) {
    if (prefix[i] != s[i])
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<strmatch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1164 <strmatch+0x64>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1151 <strmatch+0x51>
movl   $0x0,-0x4(%rbp)
jmp    116b <strmatch+0x6b>
jmp    1156 <strmatch+0x56>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <strmatch+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strmatch>:
mov    (%rsi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1122 <strmatch+0x22>
xor    %edx,%edx
nopl   (%rax)
cmp    (%rdi,%rdx,1),%cl
jne    1123 <strmatch+0x23>
movzbl 0x1(%rsi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <strmatch+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strmatch(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %9
5: ; preds = %9
%6 = getelementptr inbounds i8, i8* %1, i64 %15
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %2, %5
%10 = phi i64 [ %15, %5 ], [ 0, %2 ]
%11 = phi i8 [ %7, %5 ], [ %3, %2 ]
%12 = getelementptr inbounds i8, i8* %0, i64 %10
%13 = load i8, i8* %12
%14 = icmp eq i8 %11, %13
%15 = add nuw i64 %10, 1
br i1 %14, label %5, label %16
16: ; preds = %9, %5, %2
%17 = phi i32 [ 1, %2 ], [ 1, %5 ], [ 0, %9 ]
ret i32 %17
}
void led_putnum(num) char num;
{
  print("Sorry, no LED's on the WinBond W89k board, using putnum instead\r\n");
  putnum(num);
}


x86 assembly (clang, -O0):
<led_putnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1040 <putnum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_putnum>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <print@plt>
movsbl %bl,%edi
xor    %eax,%eax
pop    %rbx
jmp    1040 <putnum@plt>

LLVM IR (-O0):
@.str = [66 x i8] c"Sorry, no LED's on the WinBond W89k board, using putnum instead\0D\0A\00"
define void @led_putnum(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = call i32 (i32, ...) bitcast (i32 (...)* @putnum to i32 (i32, ...)*)(i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [66 x i8] c"Sorry, no LED's on the WinBond W89k board, using putnum instead\0D\0A\00"
define void @led_putnum(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%3 = shl i32 %0, 24
%4 = ashr exact i32 %3, 24
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @putnum to i32 (i32, ...)*)(i32 %4)
ret void
}
void gcont_(scan_no, feed_no, actualpoints, maxpoints, record,
            return_code) int *scan_no,
    *feed_no, *actualpoints, *maxpoints;
float *record;
int *return_code;
{}


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

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

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

LLVM IR (-O2):
define void @gcont_(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3, float* nocapture %4, i32* nocapture %5) {
ret void
}
void __hv_gte_f(float bIn0, float bIn1, float *bOut) {
  *bOut = (bIn0 >= bIn1) ? 1.0f : 0.0f;
}


x86 assembly (clang, -O0):
<__hv_gte_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
movss  0xedc(%rip),%xmm3
xorps  %xmm2,%xmm2
cmpless %xmm1,%xmm0
movaps %xmm0,%xmm1
andps  %xmm3,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hv_gte_f>:
cmpless %xmm0,%xmm1
movss  0xef3(%rip),%xmm0
andps  %xmm1,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @__hv_gte_f(float %0, float %1, float* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float*
store float %0, float* %4
store float %1, float* %5
store float* %2, float** %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fcmp oge float %7, %8
%10 = zext i1 %9 to i64
%11 = select i1 %9, float 1.000000e+00, float 0.000000e+00
%12 = load float*, float** %6
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @__hv_gte_f(float %0, float %1, float* nocapture writeonly %2) {
%4 = fcmp oge float %0, %1
%5 = select i1 %4, float 1.000000e+00, float 0.000000e+00
store float %5, float* %2
ret void
}
int toupper(int c) { return (c >= 'a' && c <= 'z') ? c - ('a' - 'A') : c; }


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1129 <toupper+0x29>
cmpl   $0x7a,-0x4(%rbp)
jg     1129 <toupper+0x29>
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <toupper+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 32
br label %13
11: ; preds = %5, %1
%12 = load i32, i32* %2
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ %12, %11 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ read(int, char *, int);
void msg_recv(int comm, char *msg, int size) {
  memset(msg, 0, size);
  read(comm, msg, size);
  printf("recv <- %s", msg);
}


x86 assembly (clang, -O0):
<msg_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <read@plt>
mov    -0x10(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_recv>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %edi,%r14d
mov    %rsi,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1050 <read@plt>
lea    0xea6(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"recv <- %s\00"
define void @msg_recv(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i32 @memset(i8* %7, i32 0, i32 %8)
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @read(i32 %10, i8* %11, i32 %12)
%14 = load i8*, i8** %5
%15 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %14)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"recv <- %s\00"
define void @msg_recv(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @memset(i8* %1, i32 0, i32 %2)
%5 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}