xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ __v16qi;
typedef scalar_t__ __m128i;

/* Variables and functions */
int /*<<< orphan*/ __builtin_ia32_storedqu(char *, int /*<<< orphan*/);
void __attribute__((__always___, __nodebug__))
_mm_storeu_si128(__m128i *p, __m128i b) {
  __builtin_ia32_storedqu((char *)p, (__v16qi)b);
}


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

x86 assembly (clang, -O2):
<_mm_storeu_si128>:
jmp    1030 <__builtin_ia32_storedqu@plt>

LLVM IR (-O0):
define void @_mm_storeu_si128(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64*, i64** %3
%6 = bitcast i64* %5 to i8*
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = call i32 @__builtin_ia32_storedqu(i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @_mm_storeu_si128(i64* %0, i64 %1) {
%3 = bitcast i64* %0 to i8*
%4 = trunc i64 %1 to i32
%5 = tail call i32 @__builtin_ia32_storedqu(i8* %3, i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_bsrli_si128(int /*<<< orphan*/, int);
__m128i __mm_bsrli_si128(__m128i A, int const I) {
  return _mm_bsrli_si128(A, 1);
}


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

x86 assembly (clang, -O2):
<__mm_bsrli_si128>:
mov    $0x1,%esi
jmp    1030 <_mm_bsrli_si128@plt>

LLVM IR (-O0):
define i32 @__mm_bsrli_si128(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 = call i32 @_mm_bsrli_si128(i32 %5, i32 1)
ret i32 %6
}

LLVM IR (-O2):
define i32 @__mm_bsrli_si128(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_bsrli_si128(i32 %0, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf_padded(int, char *);
int /*<<< orphan*/ putchar(char);
void print_header(void) {
  printf_padded(4, "CPU ");
  printf_padded(16, "LOCAL");
  printf_padded(16, "LOCAL->REMOTE");
  printf_padded(16, "REMOTE->LOCAL");
  putchar('\n');
}


x86 assembly (clang, -O0):
<print_header>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
lea    0xed0(%rip),%rsi
call   1040 <printf_padded@plt>
mov    $0x10,%edi
lea    0xeda(%rip),%rsi
call   1040 <printf_padded@plt>
mov    $0x10,%edi
lea    0xeb3(%rip),%rsi
call   1040 <printf_padded@plt>
mov    $0x10,%edi
lea    0xeb0(%rip),%rsi
call   1040 <printf_padded@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_header>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x4,%edi
call   1040 <printf_padded@plt>
lea    0xee2(%rip),%rsi
mov    $0x10,%edi
call   1040 <printf_padded@plt>
lea    0xebb(%rip),%rsi
mov    $0x10,%edi
call   1040 <printf_padded@plt>
lea    0xeb8(%rip),%rsi
mov    $0x10,%edi
call   1040 <printf_padded@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"CPU \00"
@.str.1 = [6 x i8] c"LOCAL\00"
@.str.2 = [14 x i8] c"LOCAL->REMOTE\00"
@.str.3 = [14 x i8] c"REMOTE->LOCAL\00"
define void @print_header() {
%1 = call i32 @printf_padded(i32 4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf_padded(i32 16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf_padded(i32 16, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf_padded(i32 16, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"CPU \00"
@.str.1 = [6 x i8] c"LOCAL\00"
@.str.2 = [14 x i8] c"LOCAL->REMOTE\00"
@.str.3 = [14 x i8] c"REMOTE->LOCAL\00"
define void @print_header() {
%1 = tail call i32 @printf_padded(i32 4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf_padded(i32 16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf_padded(i32 16, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf_padded(i32 16, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Type definitions */
struct rtattr {
  int dummy;
};
struct qdisc_util {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int dsmark_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats) {
  return 0;
}


x86 assembly (clang, -O0):
<dsmark_print_xstats>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.qdisc_util = type { i32 }
%struct.rtattr = type { i32 }
define i32 @dsmark_print_xstats(%struct.qdisc_util* %0, i32* %1, %struct.rtattr* %2) {
%4 = alloca %struct.qdisc_util*
%5 = alloca i32*
%6 = alloca %struct.rtattr*
store %struct.qdisc_util* %0, %struct.qdisc_util** %4
store i32* %1, i32** %5
store %struct.rtattr* %2, %struct.rtattr** %6
ret i32 0
}

LLVM IR (-O2):
%struct.qdisc_util = type { i32 }
%struct.rtattr = type { i32 }
define i32 @dsmark_print_xstats(%struct.qdisc_util* nocapture readnone %0, i32* nocapture readnone %1, %struct.rtattr* nocapture readnone %2) {
ret i32 0
}
void glIsTransformFeedback(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glIsTransformFeedback() {
ret void
}
/* Variables and functions */
char *strcpy(char *destination, const char *source) {
  size_t i = 0;
  while (source[i] != 0) {
    destination[i] = source[i];
    i++;
  }
  return destination;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1150 <strcpy+0x50>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1120 <strcpy+0x20>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rax,%rdx,1)
movzbl 0x1(%rsi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i64 [ %9, %5 ], [ 0, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %6, i8* %8
%9 = add i64 %7, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_smoother_set_time_offset() {
  printf("NOT IMPLEMENTED:"
         "pa_smoother_set_time_offset"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"NOT IMPLEMENTED:pa_smoother_set_time_offset\0A\00"
define i32 @pa_smoother_set_time_offset() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [44 x i8] c"NOT IMPLEMENTED:pa_smoother_set_time_offset\00"
define i32 @pa_smoother_set_time_offset() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ iupacComplementLower(char *, int);
int /*<<< orphan*/ reverseBytes(char *, int);
int /*<<< orphan*/ toLowerN(char *, int);
void iupacReverseComplement(char *iu, int iuSize) {
  toLowerN(iu, iuSize);
  reverseBytes(iu, iuSize);
  iupacComplementLower(iu, iuSize);
}


x86 assembly (clang, -O0):
<iupacReverseComplement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <toLowerN@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <reverseBytes@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <iupacComplementLower@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupacReverseComplement>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <toLowerN@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <reverseBytes@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <iupacComplementLower@plt>

LLVM IR (-O0):
define void @iupacReverseComplement(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @toLowerN(i8* %5, i32 %6)
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @reverseBytes(i8* %8, i32 %9)
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = call i32 @iupacComplementLower(i8* %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @iupacReverseComplement(i8* %0, i32 %1) {
%3 = tail call i32 @toLowerN(i8* %0, i32 %1)
%4 = tail call i32 @reverseBytes(i8* %0, i32 %1)
%5 = tail call i32 @iupacComplementLower(i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint64_t;

/* Variables and functions */
void a_and_64(volatile uint64_t *p, uint64_t v) { *p &= v; }


x86 assembly (clang, -O0):
<a_and_64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_and_64>:
mov    %esi,-0x4(%rsp)
mov    -0x4(%rsp),%eax
and    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @a_and_64(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store volatile i32 %1, i32* %4
%5 = load volatile i32, i32* %4
%6 = load i32*, i32** %3
%7 = load volatile i32, i32* %6
%8 = and i32 %7, %5
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @a_and_64(i32* %0, i32 %1) {
%3 = alloca i32
store volatile i32 %1, i32* %3
%4 = load volatile i32, i32* %3
%5 = load volatile i32, i32* %0
%6 = and i32 %5, %4
store volatile i32 %6, i32* %0
ret void
}
void handle_CONT(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_CONT(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_word(char *, ...);
void mark_forward(char *new_p, char *p) {
  unsigned int tag = 0x47;
  set_word(p, &tag);
  set_word(p + 4, &new_p);
}


x86 assembly (clang, -O0):
<mark_forward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x47,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1030 <set_word@plt>
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <set_word@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mark_forward>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,0x8(%rsp)
movl   $0x47,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <set_word@plt>
add    $0x4,%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <set_word@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @mark_forward(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 71, i32* %5
%6 = load i8*, i8** %4
%7 = call i32 (i8*, ...) @set_word(i8* %6, i32* %5)
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 4
%10 = call i32 (i8*, ...) @set_word(i8* %9, i8** %3)
ret void
}

LLVM IR (-O2):
define void @mark_forward(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = bitcast i32* %4 to i8*
store i32 71, i32* %4
%6 = call i32 (i8*, ...) @set_word(i8* %1, i32* %4)
%7 = getelementptr inbounds i8, i8* %1, i64 4
%8 = call i32 (i8*, ...) @set_word(i8* %7, i8** %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int say_hello() { printf("shit \n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"shit \00"
define i32 @say_hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void draw_symbol(int length, char c) {
  for (int i = 0; i < length; i++) {
    printf("%c", c);
  }
}


x86 assembly (clang, -O0):
<draw_symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1152 <draw_symbol+0x42>
lea    0xec5(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <draw_symbol+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_symbol>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    113f <draw_symbol+0x2f>
mov    %edi,%ebx
movsbl %sil,%ebp
lea    0xedb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <draw_symbol+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @draw_symbol(i32 %0, i8 signext %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %5, label %4
4: ; preds = %5, %2
ret void
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 0, %2 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %1)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %4, label %5
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int __api(int, unsigned long);
int rt_set_wcet(struct timeval *tv) {
  unsigned long us = tv->tv_sec * 1000000 + tv->tv_usec;
  return (__api(7, us) == 1) ? 0 : 1;
}


x86 assembly (clang, -O0):
<rt_set_wcet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0xf4240,(%rax),%eax
mov    -0x8(%rbp),%rcx
add    0x4(%rcx),%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x7,%edi
call   1030 <__api@plt>
mov    %eax,%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x1,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rt_set_wcet>:
push   %rax
movslq (%rdi),%rax
imul   $0xf4240,%rax,%rax
movslq 0x4(%rdi),%rsi
add    %rax,%rsi
mov    $0x7,%edi
call   1030 <__api@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @rt_set_wcet(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
%3 = alloca i64
store %struct.timeval* %0, %struct.timeval** %2
%4 = load %struct.timeval*, %struct.timeval** %2
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 1000000
%8 = load %struct.timeval*, %struct.timeval** %2
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%10 = load i32, i32* %9
%11 = add nsw i32 %7, %10
%12 = sext i32 %11 to i64
store i64 %12, i64* %3
%13 = load i64, i64* %3
%14 = call i32 @__api(i32 7, i64 %13)
%15 = icmp eq i32 %14, 1
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 0, i32 1
ret i32 %17
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @rt_set_wcet(%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 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%6 = load i32, i32* %5
%7 = add nsw i32 %4, %6
%8 = sext i32 %7 to i64
%9 = tail call i32 @__api(i32 7, i64 %8)
%10 = icmp ne i32 %9, 1
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int u8_mbtouc_aux(unsigned int *, unsigned char const *, size_t);
int u8_mbtouc(unsigned int *puc, const unsigned char *s, size_t n) {
  unsigned char c = *s;
  if (c < 0x80) {
    *puc = c;
    return 1;
  } else
    return u8_mbtouc_aux(puc, s, n);
}


x86 assembly (clang, -O0):
<u8_mbtouc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x21(%rbp)
movzbl -0x21(%rbp),%eax
cmp    $0x80,%eax
jge    1152 <u8_mbtouc+0x42>
movzbl -0x21(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1166 <u8_mbtouc+0x56>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <u8_mbtouc_aux@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8_mbtouc>:
movzbl (%rsi),%eax
test   %al,%al
js     111f <u8_mbtouc+0xf>
mov    %eax,(%rdi)
mov    $0x1,%eax
ret
jmp    1030 <u8_mbtouc_aux@plt>

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

LLVM IR (-O2):
define i32 @u8_mbtouc(i32* %0, i8* %1, i64 %2) {
%4 = load i8, i8* %1
%5 = icmp sgt i8 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = zext i8 %4 to i32
store i32 %7, i32* %0
br label %10
8: ; preds = %3
%9 = tail call i32 @u8_mbtouc_aux(i32* %0, i8* %1, i64 %2)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ 1, %6 ], [ %9, %8 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
char *translate_rfxsensor_ident(unsigned char *buf) {
  static char outbuf[80];
  sprintf(outbuf, "RFXSensorInit    : Heyu support not configured.");
  return outbuf;
}


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

x86 assembly (clang, -O2):
<translate_rfxsensor_ident>:
movups 0xf19(%rip),%xmm0
movaps %xmm0,0x2f42(%rip)
movups 0xefb(%rip),%xmm0
movaps %xmm0,0x2f24(%rip)
movups 0xedd(%rip),%xmm0
movaps %xmm0,0x2f06(%rip)
lea    0x2eff(%rip),%rax
ret

LLVM IR (-O0):
@translate_rfxsensor_ident.outbuf = internal global [80 x i8] zeroinitializer
@.str = [48 x i8] c"RFXSensorInit : Heyu support not configured.\00"
define i8* @translate_rfxsensor_ident(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @sprintf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @translate_rfxsensor_ident.outbuf, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([80 x i8], [80 x i8]* @translate_rfxsensor_ident.outbuf, i64 0, i64 0)
}

LLVM IR (-O2):
@translate_rfxsensor_ident.outbuf = internal global [80 x i8] zeroinitializer
@.str = [48 x i8] c"RFXSensorInit : Heyu support not configured.\00"
define i8* @translate_rfxsensor_ident(i8* nocapture readnone %0) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(48) getelementptr inbounds ([80 x i8], [80 x i8]* @translate_rfxsensor_ident.outbuf, i64 0, i64 0), i8* align 1 dereferenceable(48) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i64 48, i1 false)
ret i8* getelementptr inbounds ([80 x i8], [80 x i8]* @translate_rfxsensor_ident.outbuf, i64 0, i64 0)
}
/* Variables and functions */
char change(char);
int new_rand();
int strlen(char *);
char *errorProcess(char *read) {
  int length = strlen(read);
  int pos = new_rand() % length;
  read[pos] = change(read[pos]);
  return read;
}


x86 assembly (clang, -O0):
<errorProcess>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <new_rand@plt>
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <change@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errorProcess>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <new_rand@plt>
cltd
idiv   %ebp
movslq %edx,%rbp
movsbl (%rbx,%rbp,1),%edi
call   1030 <change@plt>
mov    %al,(%rbx,%rbp,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @errorProcess(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = call i32 (...) @new_rand()
%8 = load i32, i32* %3
%9 = srem i32 %7, %8
store i32 %9, i32* %4
%10 = load i8*, i8** %2
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = call signext i8 @change(i8 signext %14)
%16 = load i8*, i8** %2
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
store i8 %15, i8* %19
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @errorProcess(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 (...) @new_rand()
%4 = srem i32 %3, %2
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call signext i8 @change(i8 signext %7)
store i8 %8, i8* %6
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ dlclose(void *);
void destroyDllHandle(void *dllHandle) { dlclose(dllHandle); }


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

x86 assembly (clang, -O2):
<destroyDllHandle>:
jmp    1030 <dlclose@plt>

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

LLVM IR (-O2):
define void @destroyDllHandle(i8* %0) {
%2 = tail call i32 @dlclose(i8* %0)
ret void
}
void custody_null_init(void) { return; }


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

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

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

LLVM IR (-O2):
define void @custody_null_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ malloc(size_t);
void *memset(int /*<<< orphan*/, int /*<<< orphan*/, size_t);
void *v_mallocz(size_t length) { return memset(malloc(length), 0, length); }


x86 assembly (clang, -O0):
<v_mallocz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_mallocz>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
mov    %eax,%edi
xor    %esi,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define i8* @v_mallocz(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @malloc(i64 %3)
%5 = load i64, i64* %2
%6 = call i8* @memset(i32 %4, i32 0, i64 %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @v_mallocz(i64 %0) {
%2 = tail call i32 @malloc(i64 %0)
%3 = tail call i8* @memset(i32 %2, i32 0, i64 %0)
ret i8* %3
}
/* Type definitions */
struct demod_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pocsag_deinit(struct demod_state *);
void poc5_deinit(struct demod_state *s) { pocsag_deinit(s); }


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

x86 assembly (clang, -O2):
<poc5_deinit>:
jmp    1030 <pocsag_deinit@plt>

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

LLVM IR (-O2):
%struct.demod_state = type { i32 }
define void @poc5_deinit(%struct.demod_state* %0) {
%2 = tail call i32 @pocsag_deinit(%struct.demod_state* %0)
ret void
}
/* Variables and functions */
int loBit(unsigned long);
int mixBits(unsigned long, unsigned long);
unsigned long twist(unsigned long m, unsigned long s0, unsigned long s1) {
  return m ^ (mixBits(s0, s1) >> 1) ^ (-loBit(s1) & 0x9908b0dfUL);
}


x86 assembly (clang, -O0):
<twist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <mixBits@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
sar    $0x1,%ecx
movslq %ecx,%rcx
xor    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <loBit@plt>
mov    %eax,%edx
mov    -0x20(%rbp),%rax
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
movabs $0x9908b0df,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twist>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1040 <mixBits@plt>
sar    %eax
movslq %eax,%rbx
xor    %r14,%rbx
mov    %r15,%rdi
call   1030 <loBit@plt>
neg    %eax
and    $0x9908b0df,%eax
xor    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @twist(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = call i32 @mixBits(i64 %8, i64 %9)
%11 = ashr i32 %10, 1
%12 = sext i32 %11 to i64
%13 = xor i64 %7, %12
%14 = load i64, i64* %6
%15 = call i32 @loBit(i64 %14)
%16 = sub nsw i32 0, %15
%17 = sext i32 %16 to i64
%18 = and i64 %17, 2567483615
%19 = xor i64 %13, %18
ret i64 %19
}

LLVM IR (-O2):
define i64 @twist(i64 %0, i64 %1, i64 %2) {
%4 = tail call i32 @mixBits(i64 %1, i64 %2)
%5 = ashr i32 %4, 1
%6 = sext i32 %5 to i64
%7 = xor i64 %6, %0
%8 = tail call i32 @loBit(i64 %2)
%9 = sub nsw i32 0, %8
%10 = and i32 %9, -1727483681
%11 = zext i32 %10 to i64
%12 = xor i64 %7, %11
ret i64 %12
}
int ui_joystick_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @ui_joystick_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @ui_joystick_init() {
ret i32 0
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR9E_set(void) { return U_WMRCORENONE_set("U_WMR9E"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR9E\00"
define i8* @U_WMR9E_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR9E\00"
define i8* @U_WMR9E_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(void) {
  int c;
  c = getchar();
  while (c != EOF) {
    putchar(c);
    c = getchar();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2ea5(%rip),%rcx
cmp    (%rcx),%eax
je     1162 <main+0x42>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
jmp    1139 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @getchar()
store i32 %3, i32* %2
br label %4
4: ; preds = %8, %0
%5 = load i32, i32* %2
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = load i32, i32* %2
%10 = call i32 @putchar(i32 %9)
%11 = call i32 (...) @getchar()
store i32 %11, i32* %2
br label %4
12: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %7, %4 ], [ %1, %0 ]
%6 = tail call i32 @putchar(i32 %5)
%7 = tail call i32 (...) @getchar()
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %4
10: ; preds = %4, %0
ret i32 0
}
int g(int (*p)[], int (*q)[3]) { return q < p; }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
cmp    %rcx,%rax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
xor    %eax,%eax
cmp    %rsi,%rdi
seta   %al
ret

LLVM IR (-O0):
define i32 @g([0 x i32]* %0, [3 x i32]* %1) {
%3 = alloca [0 x i32]*
%4 = alloca [3 x i32]*
store [0 x i32]* %0, [0 x i32]** %3
store [3 x i32]* %1, [3 x i32]** %4
%5 = load [3 x i32]*, [3 x i32]** %4
%6 = load [0 x i32]*, [0 x i32]** %3
%7 = bitcast [0 x i32]* %6 to [3 x i32]*
%8 = icmp ult [3 x i32]* %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @g([0 x i32]* readnone %0, [3 x i32]* readnone %1) {
%3 = bitcast [0 x i32]* %0 to [3 x i32]*
%4 = icmp ugt [3 x i32]* %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
int constprop_shutdown(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @constprop_shutdown() {
ret i32 0
}

LLVM IR (-O2):
define i32 @constprop_shutdown() {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void clear_bit_reg16(volatile uint16_t *reg, uint8_t bit) {
  (*(volatile unsigned int *)(((((uint32_t)reg & 0xF0000000) + 0x02000000 +
                                (((uint32_t)reg & 0xFFFFF) << 5) +
                                (bit << 2))))) = 0x0;
}


x86 assembly (clang, -O0):
<clear_bit_reg16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
and    $0xf0000000,%eax
add    $0x2000000,%eax
mov    -0x8(%rbp),%rcx
and    $0xfffff,%ecx
shl    $0x5,%ecx
add    %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
mov    %eax,%eax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_bit_reg16>:
mov    %edi,%eax
and    $0xf0000000,%eax
shl    $0x5,%edi
and    $0x1ffffe0,%edi
or     %eax,%edi
lea    (%rdi,%rsi,4),%eax
add    $0x2000000,%eax
movl   $0x0,(%rax)
ret

LLVM IR (-O0):
define void @clear_bit_reg16(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 = ptrtoint i32* %5 to i32
%7 = and i32 %6, -268435456
%8 = add i32 %7, 33554432
%9 = load i32*, i32** %3
%10 = ptrtoint i32* %9 to i32
%11 = and i32 %10, 1048575
%12 = shl i32 %11, 5
%13 = add i32 %8, %12
%14 = load i32, i32* %4
%15 = shl i32 %14, 2
%16 = add i32 %13, %15
%17 = zext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
store volatile i32 0, i32* %18
ret void
}

LLVM IR (-O2):
define void @clear_bit_reg16(i32* %0, i32 %1) {
%3 = ptrtoint i32* %0 to i64
%4 = trunc i64 %3 to i32
%5 = and i32 %4, -268435456
%6 = shl i32 %4, 5
%7 = and i32 %6, 33554400
%8 = or i32 %5, %7
%9 = shl i32 %1, 2
%10 = add i32 %9, 33554432
%11 = add i32 %10, %8
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 0, i32* %13
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void main() {
  const long num_steps = 10;
  double step = 1.0 / ((double)num_steps);
  double sum = 0.0;
  for (int i = 0; i < num_steps; i++) {
    double x = (i + 0.5) * step;
    sum += 4.0 * step / (1.0 + x * x);
  }
  printf("pi = %6.12f\n", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movq   $0xa,-0x8(%rbp)
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    $0xa,%rax
jge    11a8 <main+0x98>
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  0xec1(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xea3(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe80(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113c <main+0x2c>
movsd  -0x18(%rbp),%xmm0
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xef1(%rip),%rdi
movsd  0xee1(%rip),%xmm0
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"pi = %6.12f\0A\00"
define void @main() {
%1 = alloca i64
%2 = alloca double
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store i64 10, i64* %1
store double 1.000000e-01, double* %2
store double 0.000000e+00, double* %3
store i32 0, i32* %4
br label %6
6: ; preds = %24, %0
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = icmp slt i64 %8, 10
br i1 %9, label %10, label %27
10: ; preds = %6
%11 = load i32, i32* %4
%12 = sitofp i32 %11 to double
%13 = fadd double %12, 5.000000e-01
%14 = load double, double* %2
%15 = fmul double %13, %14
store double %15, double* %5
%16 = load double, double* %2
%17 = fmul double 4.000000e+00, %16
%18 = load double, double* %5
%19 = load double, double* %5
%20 = call double @llvm.fmuladd.f64(double %18, double %19, double 1.000000e+00)
%21 = fdiv double %17, %20
%22 = load double, double* %3
%23 = fadd double %22, %21
store double %23, double* %3
br label %24
24: ; preds = %10
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %6
27: ; preds = %6
%28 = load double, double* %3
%29 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %28)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"pi = %6.12f\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 0x400923B03C1D7142)
ret void
}
double f4_sum_pre_double_double(double v0, double v) {
  return v0 + ((double)(v));
}


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

x86 assembly (clang, -O2):
<f4_sum_pre_double_double>:
addsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @f4_sum_pre_double_double(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_deadlock_header(void) {
  printf("----------------------------------------------\n");
  printf("deadlock loop:\n");
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"----------------------------------------------\0A\00"
@.str.1 = [16 x i8] c"deadlock loop:\0A\00"
define void @print_deadlock_header() {
%1 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [47 x i8] c"----------------------------------------------\00"
@str.2 = [15 x i8] c"deadlock loop:\00"
define void @print_deadlock_header() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.2, i64 0, i64 0))
ret void
}
void do_state_17(char c, int *state, char *word, int *length) {
  word[(*length)++] = c;
  if (c >= '0' && c <= '7') {
    *state = 13;
  } else {
    *state = -1;
  }
}


x86 assembly (clang, -O0):
<do_state_17>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x1(%rbp),%dl
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rsi
mov    (%rsi),%ecx
mov    %ecx,%edi
add    $0x1,%edi
mov    %edi,(%rsi)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1159 <do_state_17+0x59>
movsbl -0x1(%rbp),%eax
cmp    $0x37,%eax
jg     1159 <do_state_17+0x59>
mov    -0x10(%rbp),%rax
movl   $0xd,(%rax)
jmp    1163 <do_state_17+0x63>
mov    -0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_state_17>:
movslq (%rcx),%r8
lea    0x1(%r8),%eax
mov    %eax,(%rcx)
mov    %dil,(%rdx,%r8,1)
and    $0xf8,%dil
cmp    $0x30,%dil
mov    $0xd,%eax
mov    $0xffffffff,%ecx
cmove  %eax,%ecx
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
define void @do_state_17(i8 signext %0, i32* %1, i8* %2, i32* %3) {
%5 = alloca i8
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32*
store i8 %0, i8* %5
store i32* %1, i32** %6
store i8* %2, i8** %7
store i32* %3, i32** %8
%9 = load i8, i8* %5
%10 = load i8*, i8** %7
%11 = load i32*, i32** %8
%12 = load i32, i32* %11
%13 = add nsw i32 %12, 1
store i32 %13, i32* %11
%14 = sext i32 %12 to i64
%15 = getelementptr inbounds i8, i8* %10, i64 %14
store i8 %9, i8* %15
%16 = load i8, i8* %5
%17 = sext i8 %16 to i32
%18 = icmp sge i32 %17, 48
br i1 %18, label %19, label %25
19: ; preds = %4
%20 = load i8, i8* %5
%21 = sext i8 %20 to i32
%22 = icmp sle i32 %21, 55
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = load i32*, i32** %6
store i32 13, i32* %24
br label %27
25: ; preds = %19, %4
%26 = load i32*, i32** %6
store i32 -1, i32* %26
br label %27
27: ; preds = %25, %23
ret void
}

LLVM IR (-O2):
define void @do_state_17(i8 signext %0, i32* nocapture writeonly %1, i8* nocapture writeonly %2, i32* nocapture %3) {
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = sext i32 %5 to i64
%8 = getelementptr inbounds i8, i8* %2, i64 %7
store i8 %0, i8* %8
%9 = and i8 %0, -8
%10 = icmp eq i8 %9, 48
%11 = select i1 %10, i32 13, i32 -1
store i32 %11, i32* %1
ret void
}
int ia64_autoload(void) { return (0); }


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

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

LLVM IR (-O0):
define i32 @ia64_autoload() {
ret i32 0
}

LLVM IR (-O2):
define i32 @ia64_autoload() {
ret i32 0
}
int onecmplabs(int x) {
  if (x < 0)
    x = ~x;
  return x;
}


x86 assembly (clang, -O0):
<onecmplabs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111a <onecmplabs+0x1a>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @onecmplabs(i32 %0) {
%2 = ashr i32 %0, 31
%3 = xor i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("Number is %d\n", 2);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Number is %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Number is %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
void evfilt_user_destroy(struct filter *filt) {}


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

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

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

LLVM IR (-O2):
%struct.filter = type opaque
define void @evfilt_user_destroy(%struct.filter* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g_writeln(char *, int);
void nil_signal_handler(int sig) {
  g_writeln("xrdp-ng-sessvc: nil_signal_handler: got signal %d", sig);
}


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"xrdp-ng-sessvc: nil_signal_handler: got signal %d\00"
define void @nil_signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @g_writeln(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"xrdp-ng-sessvc: nil_signal_handler: got signal %d\00"
define void @nil_signal_handler(i32 %0) {
%2 = tail call i32 @g_writeln(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}