xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ReadWord(char *, int /*<<< orphan*/ *);
int SearchVocab(int, char *);
scalar_t__ feof(int /*<<< orphan*/ *);
int ReadWordIndex(FILE *fin, int lang_id) {
  char word[100];
  ReadWord(word, fin);
  if (feof(fin))
    return -1;
  return SearchVocab(lang_id, word);
}


x86 assembly (clang, -O0):
<ReadWordIndex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <ReadWord@plt>
mov    -0x10(%rbp),%rdi
call   1030 <feof@plt>
cmp    $0x0,%rax
je     116e <ReadWordIndex+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <ReadWordIndex+0x4d>
mov    -0x14(%rbp),%edi
lea    -0x80(%rbp),%rsi
call   1050 <SearchVocab@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadWordIndex>:
push   %rbp
push   %rbx
sub    $0x68,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1040 <ReadWord@plt>
mov    %rbx,%rdi
call   1030 <feof@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    1165 <ReadWordIndex+0x35>
mov    %rsp,%rsi
mov    %ebp,%edi
call   1050 <SearchVocab@plt>
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ReadWordIndex(i32* %0, i32 %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32 @ReadWord(i8* %4, i32* %0)
%6 = call i64 @feof(i32* %0)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @SearchVocab(i32 %1, i8* %4)
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ %9, %8 ], [ -1, %2 ]
ret i32 %11
}
void PlatformPutc(unsigned char OutCh, union OutputStreamInfo *Stream) {}


x86 assembly (clang, -O0):
<PlatformPutc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%union.OutputStreamInfo = type opaque
define void @PlatformPutc(i8 zeroext %0, %union.OutputStreamInfo* %1) {
%3 = alloca i8
%4 = alloca %union.OutputStreamInfo*
store i8 %0, i8* %3
store %union.OutputStreamInfo* %1, %union.OutputStreamInfo** %4
ret void
}

LLVM IR (-O2):
%union.OutputStreamInfo = type opaque
define void @PlatformPutc(i8 zeroext %0, %union.OutputStreamInfo* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: biff [y | n]\n");
  exit(2);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"usage: biff [y | n]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
void genj_idle() {}


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

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

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

LLVM IR (-O2):
define void @genj_idle() {
ret void
}
int capture_m(const char *carg, void *pvar) {
  char *p = pvar;
  if (!p)
    return 1;
  *p = 'm';
  return 0;
}


x86 assembly (clang, -O0):
<capture_m>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    112b <capture_m+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1139 <capture_m+0x39>
mov    -0x20(%rbp),%rax
movb   $0x6d,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<capture_m>:
test   %rsi,%rsi
je     110b <capture_m+0xb>
movb   $0x6d,(%rsi)
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @capture_m(i8* nocapture readnone %0, i8* writeonly %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %5, label %4
4: ; preds = %2
store i8 109, i8* %1
br label %5
5: ; preds = %2, %4
%6 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %6
}
/* Variables and functions */
int write(int, char *, int);
int magellan_init(int fd, unsigned long *id, unsigned long *extra) {
  if (write(fd, "m3\rpBB\rz\r", 9) != 9)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<magellan_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
lea    0xed3(%rip),%rsi
mov    $0x9,%edx
call   1030 <write@plt>
cmp    $0x9,%eax
je     114c <magellan_init+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1153 <magellan_init+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<magellan_init>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x9,%edx
call   1030 <write@plt>
xor    %ecx,%ecx
cmp    $0x9,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"m3\0DpBB\0Dz\0D\00"
define i32 @magellan_init(i32 %0, i64* %1, i64* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64*
%7 = alloca i64*
store i32 %0, i32* %5
store i64* %1, i64** %6
store i64* %2, i64** %7
%8 = load i32, i32* %5
%9 = call i32 @write(i32 %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
%10 = icmp ne i32 %9, 9
br i1 %10, label %11, label %12
11: ; preds = %3
store i32 -1, i32* %4
br label %13
12: ; preds = %3
store i32 0, i32* %4
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %4
ret i32 %14
}

LLVM IR (-O2):
@.str = [10 x i8] c"m3\0DpBB\0Dz\0D\00"
define i32 @magellan_init(i32 %0, i64* nocapture readnone %1, i64* nocapture readnone %2) {
%4 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
%5 = icmp ne i32 %4, 9
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ memory_insert(void *);
int /*<<< orphan*/ memory_remove(void *, int /*<<< orphan*/);
void *realloc(void *, size_t);
void *my_realloc(void *old_ptr, size_t size) {
  void *tmp = realloc(old_ptr, size);
  if (tmp != NULL) {
    memory_remove(old_ptr, 0);
    memory_insert(tmp);
  }
  return tmp;
}


x86 assembly (clang, -O0):
<my_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1170 <my_realloc+0x40>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <memory_remove@plt>
mov    -0x18(%rbp),%rdi
call   1040 <memory_insert@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_realloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1156 <my_realloc+0x26>
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <memory_remove@plt>
mov    %rbx,%rdi
call   1040 <memory_insert@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @my_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = call i32 @memory_remove(i8* %12, i32 0)
%14 = load i8*, i8** %5
%15 = call i32 @memory_insert(i8* %14)
br label %16
16: ; preds = %11, %2
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @my_realloc(i8* %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @memory_remove(i8* %0, i32 0)
%7 = tail call i32 @memory_insert(i8* %3)
br label %8
8: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ cgcmp(char *);
void cglt() { cgcmp("jge"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"jge\00"
define void @cglt() {
%1 = tail call i32 @cgcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
int foo(int x, int in) {
  short a = in & 0xffff;
  short b = (in & 0xffff0000) >> 16;
  return x + b * a;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffff,%eax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffff0000,%eax
shr    $0x10,%eax
mov    %ax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
movswl -0xc(%rbp),%ecx
movswl -0xa(%rbp),%edx
imul   %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movswl %si,%eax
sar    $0x10,%esi
imul   %esi,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i16
%6 = alloca i16
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = and i32 %7, 65535
%9 = trunc i32 %8 to i16
store i16 %9, i16* %5
%10 = load i32, i32* %4
%11 = and i32 %10, -65536
%12 = lshr i32 %11, 16
%13 = trunc i32 %12 to i16
store i16 %13, i16* %6
%14 = load i32, i32* %3
%15 = load i16, i16* %6
%16 = sext i16 %15 to i32
%17 = load i16, i16* %5
%18 = sext i16 %17 to i32
%19 = mul nsw i32 %16, %18
%20 = add nsw i32 %14, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = ashr i32 %1, 16
%4 = shl i32 %1, 16
%5 = ashr exact i32 %4, 16
%6 = mul nsw i32 %5, %3
%7 = add nsw i32 %6, %0
ret i32 %7
}
void fun_v_in_release_so() { return; }


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

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

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

LLVM IR (-O2):
define void @fun_v_in_release_so() {
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int _strcmp(const void *_a, const void *_b) {
  return strcmp(*(char **)_a, *(char **)_b);
}


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

x86 assembly (clang, -O2):
<_strcmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncmp(char *, char *, int);
void strncmp_embedded_null() {
  clang_analyzer_eval(strncmp("ab\0zz", "ab\0yy", 4) == 0);
}


x86 assembly (clang, -O0):
<strncmp_embedded_null>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_embedded_null>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"ab\00zz\00"
@.str.1 = [6 x i8] c"ab\00yy\00"
define void @strncmp_embedded_null() {
%1 = call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 4)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @clang_analyzer_eval(i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"ab\00zz\00"
@.str.1 = [6 x i8] c"ab\00yy\00"
define void @strncmp_embedded_null() {
%1 = tail call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 4)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
char *brk(a)
char *a;
{ return (a); }


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

x86 assembly (clang, -O2):
<brk>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @brk(i8* readnone returned %0) {
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void fast_memfill32_s20(void *v_to, uint32_t val) {
  uint32_t *to = (uint32_t *)v_to;
  *(to) = val;
  *(to + 1) = val;
  *(to + 2) = val;
  *(to + 3) = val;
  *(to + 4) = val;
}


x86 assembly (clang, -O0):
<fast_memfill32_s20>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_memfill32_s20>:
movd   %esi,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqu %xmm0,(%rdi)
mov    %esi,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @fast_memfill32_s20(i8* nocapture writeonly %0, i32 %1) {
%3 = insertelement <4 x i32> poison, i32 %1, i64 0
%4 = shufflevector <4 x i32> %3, <4 x i32> poison, <4 x i32> zeroinitializer
%5 = bitcast i8* %0 to <4 x i32>*
store <4 x i32> %4, <4 x i32>* %5
%6 = getelementptr inbounds i8, i8* %0, i64 16
%7 = bitcast i8* %6 to i32*
store i32 %1, i32* %7
ret void
}
void api_stream_on_read_timeout(struct api_filter_t *filter) {}


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

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

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

LLVM IR (-O2):
%struct.api_filter_t = type opaque
define void @api_stream_on_read_timeout(%struct.api_filter_t* nocapture %0) {
ret void
}
const char *rcsid(const char *p) {
  return rcsid(p = "@(#)$Id: funcs.c 10 2006-07-10 18:22:27Z hyin $");
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"@(#)$Id: funcs.c 10 2006-07-10 18:22:27Z hyin $\00"
define i8* @rcsid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i8* @rcsid(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @rcsid(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ dasymv_(char *, int *, double *, double *, int *, double *,
                           int *, double *, double *, int *);
void wcc_dasymv_(char *UPLO, int *N, char *ALPHA, char *A, int *LDA, char *X,
                 int *INCX, char *BETA, char *Y, int *INCY) {
  dasymv_(UPLO, N, (double *)ALPHA, (double *)A, LDA, (double *)X, INCX,
          (double *)BETA, (double *)Y, INCY);
}


x86 assembly (clang, -O0):
<wcc_dasymv_>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x58,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x38(%rbp),%r9
mov    0x10(%rbp),%rbx
mov    0x18(%rbp),%r11
mov    0x20(%rbp),%r10
mov    0x28(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <dasymv_@plt>
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_dasymv_>:
jmp    1030 <dasymv_@plt>

LLVM IR (-O0):
define void @wcc_dasymv_(i8* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i32* %6, i8* %7, i8* %8, i32* %9) {
%11 = alloca i8*
%12 = alloca i32*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i32*
%16 = alloca i8*
%17 = alloca i32*
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i32*
store i8* %0, i8** %11
store i32* %1, i32** %12
store i8* %2, i8** %13
store i8* %3, i8** %14
store i32* %4, i32** %15
store i8* %5, i8** %16
store i32* %6, i32** %17
store i8* %7, i8** %18
store i8* %8, i8** %19
store i32* %9, i32** %20
%21 = load i8*, i8** %11
%22 = load i32*, i32** %12
%23 = load i8*, i8** %13
%24 = bitcast i8* %23 to double*
%25 = load i8*, i8** %14
%26 = bitcast i8* %25 to double*
%27 = load i32*, i32** %15
%28 = load i8*, i8** %16
%29 = bitcast i8* %28 to double*
%30 = load i32*, i32** %17
%31 = load i8*, i8** %18
%32 = bitcast i8* %31 to double*
%33 = load i8*, i8** %19
%34 = bitcast i8* %33 to double*
%35 = load i32*, i32** %20
%36 = call i32 @dasymv_(i8* %21, i32* %22, double* %24, double* %26, i32* %27, double* %29, i32* %30, double* %32, double* %34, i32* %35)
ret void
}

LLVM IR (-O2):
define void @wcc_dasymv_(i8* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i32* %6, i8* %7, i8* %8, i32* %9) {
%11 = bitcast i8* %2 to double*
%12 = bitcast i8* %3 to double*
%13 = bitcast i8* %5 to double*
%14 = bitcast i8* %7 to double*
%15 = bitcast i8* %8 to double*
%16 = tail call i32 @dasymv_(i8* %0, i32* %1, double* %11, double* %12, i32* %4, double* %13, i32* %6, double* %14, double* %15, i32* %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void sep() { printf("%s\n", "---------------------------------------"); }


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

x86 assembly (clang, -O2):
<sep>:
lea    0xee9(%rip),%rdi
lea    0xee6(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [40 x i8] c"---------------------------------------\00"
define void @sep() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_main(char *);
int main(int argc, char *argv[], char *envp[]) {
  if (2 == argc && NULL != argv && NULL != argv[1])
    test_main(argv[1]);
  else
    test_main(NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x2,%eax
cmp    -0x8(%rbp),%eax
jne    1166 <main+0x56>
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
je     1166 <main+0x56>
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    0x8(%rcx),%rax
je     1166 <main+0x56>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <test_main@plt>
jmp    116f <main+0x5f>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <test_main@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1124 <main+0x14>
test   %rsi,%rsi
je     1124 <main+0x14>
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
jne    1126 <main+0x16>
xor    %edi,%edi
call   1030 <test_main@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1, i8** nocapture readnone %2) {
%4 = icmp eq i32 %0, 2
%5 = icmp ne i8** %1, null
%6 = and i1 %4, %5
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %7
%12 = tail call i32 @test_main(i8* %9)
br label %15
13: ; preds = %7, %3
%14 = tail call i32 @test_main(i8* null)
br label %15
15: ; preds = %13, %11
ret i32 0
}
/* Variables and functions */
int __gen_ocl_get_local_size0();
int __gen_ocl_get_local_size1();
int __gen_ocl_get_local_size2();
__attribute__((always_)) unsigned get_local_size(unsigned int dim) {
  if (dim == 0)
    return __gen_ocl_get_local_size0();
  else if (dim == 1)
    return __gen_ocl_get_local_size1();
  else if (dim == 2)
    return __gen_ocl_get_local_size2();
  else
    return 1;
}


x86 assembly (clang, -O0):
<get_local_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1154 <get_local_size+0x24>
mov    $0x0,%al
call   1040 <__gen_ocl_get_local_size0@plt>
mov    %eax,-0x4(%rbp)
jmp    118d <get_local_size+0x5d>
cmpl   $0x1,-0x8(%rbp)
jne    116d <get_local_size+0x3d>
mov    $0x0,%al
call   1030 <__gen_ocl_get_local_size1@plt>
mov    %eax,-0x4(%rbp)
jmp    118d <get_local_size+0x5d>
cmpl   $0x2,-0x8(%rbp)
jne    1186 <get_local_size+0x56>
mov    $0x0,%al
call   1050 <__gen_ocl_get_local_size2@plt>
mov    %eax,-0x4(%rbp)
jmp    118d <get_local_size+0x5d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_local_size>:
cmp    $0x2,%edi
je     1145 <get_local_size+0x15>
cmp    $0x1,%edi
je     114c <get_local_size+0x1c>
test   %edi,%edi
jne    1153 <get_local_size+0x23>
xor    %eax,%eax
jmp    1040 <__gen_ocl_get_local_size0@plt>
xor    %eax,%eax
jmp    1050 <__gen_ocl_get_local_size2@plt>
xor    %eax,%eax
jmp    1030 <__gen_ocl_get_local_size1@plt>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @get_local_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @__gen_ocl_get_local_size0()
store i32 %7, i32* %2
br label %19
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @__gen_ocl_get_local_size1()
store i32 %12, i32* %2
br label %19
13: ; preds = %8
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 (...) @__gen_ocl_get_local_size2()
store i32 %17, i32* %2
br label %19
18: ; preds = %13
store i32 1, i32* %2
br label %19
19: ; preds = %18, %16, %11, %6
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @get_local_size(i32 %0) {
switch i32 %0, label %8 [
i32 0, label %2
i32 1, label %4
i32 2, label %6
]
2: ; preds = %1
%3 = tail call i32 (...) @__gen_ocl_get_local_size0()
br label %8
4: ; preds = %1
%5 = tail call i32 (...) @__gen_ocl_get_local_size1()
br label %8
6: ; preds = %1
%7 = tail call i32 (...) @__gen_ocl_get_local_size2()
br label %8
8: ; preds = %1, %6, %4, %2
%9 = phi i32 [ %3, %2 ], [ %5, %4 ], [ %7, %6 ], [ 1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ gmx_kinetics(int, char **);
int main(int argc, char *argv[]) {
  gmx_kinetics(argc, argv);
  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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <gmx_kinetics@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @gmx_kinetics(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_kinetics(i32 %0, i8** %1)
ret i32 0
}
long long idt_create_descriptor_entry(void (*function)(void)) {
  long long entry = 0;
  entry |= 0xE << 8;
  entry |= 1 << 15;
  entry |= (unsigned long)function & 0xFFFF0000;
  entry <<= 32;
  entry |= (unsigned long)function & 0xFFFF;
  entry |= 0x8 << 16;
  return entry;
}


x86 assembly (clang, -O0):
<idt_create_descriptor_entry>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
or     $0xe00,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
or     $0x8000,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movabs $0xffff0000,%rcx
and    %rcx,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffff,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
or     $0x80000,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<idt_create_descriptor_entry>:
movzwl %di,%ecx
and    $0xffff0000,%edi
shl    $0x20,%rdi
or     %rdi,%rcx
movabs $0x8e0000080000,%rax
or     %rcx,%rax
ret

LLVM IR (-O0):
define i64 @idt_create_descriptor_entry(void ()* %0) {
%2 = alloca void ()*
%3 = alloca i64
store void ()* %0, void ()** %2
store i64 0, i64* %3
%4 = load i64, i64* %3
%5 = or i64 %4, 3584
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = or i64 %6, 32768
store i64 %7, i64* %3
%8 = load void ()*, void ()** %2
%9 = ptrtoint void ()* %8 to i64
%10 = and i64 %9, 4294901760
%11 = load i64, i64* %3
%12 = or i64 %11, %10
store i64 %12, i64* %3
%13 = load i64, i64* %3
%14 = shl i64 %13, 32
store i64 %14, i64* %3
%15 = load void ()*, void ()** %2
%16 = ptrtoint void ()* %15 to i64
%17 = and i64 %16, 65535
%18 = load i64, i64* %3
%19 = or i64 %18, %17
store i64 %19, i64* %3
%20 = load i64, i64* %3
%21 = or i64 %20, 524288
store i64 %21, i64* %3
%22 = load i64, i64* %3
ret i64 %22
}

LLVM IR (-O2):
define i64 @idt_create_descriptor_entry(void ()* %0) {
%2 = ptrtoint void ()* %0 to i64
%3 = shl i64 %2, 32
%4 = and i64 %3, -281474976710656
%5 = and i64 %2, 65535
%6 = or i64 %5, %4
%7 = or i64 %6, 156130651668480
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void exit_pluto(int status) { exit(status); }


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

x86 assembly (clang, -O2):
<exit_pluto>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @exit_pluto(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
scalar_t__ wcslen(int /*<<< orphan*/ const *);
int wcsempty(const wchar_t *str) { return wcslen(str) == 0; }


x86 assembly (clang, -O0):
<wcsempty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <wcslen@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcsempty>:
xor    %eax,%eax
cmpl   $0x0,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @wcsempty(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @wcslen(i32* %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @wcsempty(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ nsc_assert(int);
void selrecord(void) {
  nsc_assert(0 && "This function is unimplemented.");
  ;
}


x86 assembly (clang, -O0):
<selrecord>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <nsc_assert@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @selrecord() {
%1 = call i32 @nsc_assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @selrecord() {
%1 = tail call i32 @nsc_assert(i32 0)
ret void
}
int is_end(char c) { return (!c || c == '\n' || c == ';'); }


x86 assembly (clang, -O0):
<is_end>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%al
cmpb   $0x0,-0x1(%rbp)
mov    %al,-0x2(%rbp)
je     1138 <is_end+0x38>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1138 <is_end+0x38>
movsbl -0x1(%rbp),%eax
cmp    $0x3b,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_end>:
mov    $0x1,%eax
test   %dil,%dil
je     1110 <is_end+0x10>
cmp    $0xa,%dil
jne    1111 <is_end+0x11>
ret
xor    %eax,%eax
cmp    $0x3b,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_end(i8 signext %0) {
switch i8 %0, label %2 [
i8 10, label %5
i8 0, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 59
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
scalar_t__ RAND_MAX;
double rand();
float randu(float a, float b) {
  double s = rand() / ((double)RAND_MAX);
  double x = (double)a + ((double)b - (double)a) * s;
  return (float)x;
}


x86 assembly (clang, -O0):
<randu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    0x2eb8(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
subsd  %xmm2,%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randu>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2ebe(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movss  (%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  0x4(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @randu(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca double
%6 = alloca double
store float %0, float* %3
store float %1, float* %4
%7 = call double (...) @rand()
%8 = load i64, i64* @RAND_MAX
%9 = sitofp i64 %8 to double
%10 = fdiv double %7, %9
store double %10, double* %5
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = load float, float* %4
%14 = fpext float %13 to double
%15 = load float, float* %3
%16 = fpext float %15 to double
%17 = fsub double %14, %16
%18 = load double, double* %5
%19 = call double @llvm.fmuladd.f64(double %17, double %18, double %12)
store double %19, double* %6
%20 = load double, double* %6
%21 = fptrunc double %20 to float
ret float %21
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @randu(float %0, float %1) {
%3 = tail call double (...) @rand()
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to double
%6 = fdiv double %3, %5
%7 = fpext float %0 to double
%8 = fpext float %1 to double
%9 = fsub double %8, %7
%10 = tail call double @llvm.fmuladd.f64(double %9, double %6, double %7)
%11 = fptrunc double %10 to float
ret float %11
}
int main(void) {
  int counter = 100352 - 352;
  while (counter) {
    counter = counter - 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x186a0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112a <main+0x2a>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
short test_44_2(short *mem) { return __atomic_fetch_sub(mem + 0, 1, 4); }


x86 assembly (clang, -O0):
<test_44_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
movw   $0x1,-0xa(%rbp)
mov    -0xa(%rbp),%ax
neg    %ax
lock xadd %ax,(%rcx)
mov    %ax,-0xc(%rbp)
movswl -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_44_2>:
mov    $0xffff,%ax
lock xadd %ax,(%rdi)
ret

LLVM IR (-O0):
define signext i16 @test_44_2(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 0
store i16 1, i16* %3
%7 = load i16, i16* %3
%8 = atomicrmw sub i16* %6, i16 %7 acq_rel
store i16 %8, i16* %4
%9 = load i16, i16* %4
ret i16 %9
}

LLVM IR (-O2):
define signext i16 @test_44_2(i16* nocapture %0) {
%2 = atomicrmw sub i16* %0, i16 1 acq_rel
ret i16 %2
}
/* Type definitions */
struct gengetopt_args_info {
  int dummy;
};
struct cmdline_parser_params {
  int dummy;
};

/* Variables and functions */
int cmdline_parser_internal(int, char *const *, struct gengetopt_args_info *,
                            struct cmdline_parser_params *, int /*<<< orphan*/);
int cmdline_parser_ext(int argc, char *const *argv,
                       struct gengetopt_args_info *args_info,
                       struct cmdline_parser_params *params) {
  int result;
  result = cmdline_parser_internal(argc, argv, args_info, params, 0);
  return result;
}


x86 assembly (clang, -O0):
<cmdline_parser_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <cmdline_parser_internal@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdline_parser_ext>:
xor    %r8d,%r8d
jmp    1030 <cmdline_parser_internal@plt>

LLVM IR (-O0):
%struct.gengetopt_args_info = type { i32 }
%struct.cmdline_parser_params = type { i32 }
define i32 @cmdline_parser_ext(i32 %0, i8** %1, %struct.gengetopt_args_info* %2, %struct.cmdline_parser_params* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca %struct.gengetopt_args_info*
%8 = alloca %struct.cmdline_parser_params*
%9 = alloca i32
store i32 %0, i32* %5
store i8** %1, i8*** %6
store %struct.gengetopt_args_info* %2, %struct.gengetopt_args_info** %7
store %struct.cmdline_parser_params* %3, %struct.cmdline_parser_params** %8
%10 = load i32, i32* %5
%11 = load i8**, i8*** %6
%12 = load %struct.gengetopt_args_info*, %struct.gengetopt_args_info** %7
%13 = load %struct.cmdline_parser_params*, %struct.cmdline_parser_params** %8
%14 = call i32 @cmdline_parser_internal(i32 %10, i8** %11, %struct.gengetopt_args_info* %12, %struct.cmdline_parser_params* %13, i32 0)
store i32 %14, i32* %9
%15 = load i32, i32* %9
ret i32 %15
}

LLVM IR (-O2):
%struct.gengetopt_args_info = type { i32 }
%struct.cmdline_parser_params = type { i32 }
define i32 @cmdline_parser_ext(i32 %0, i8** %1, %struct.gengetopt_args_info* %2, %struct.cmdline_parser_params* %3) {
%5 = tail call i32 @cmdline_parser_internal(i32 %0, i8** %1, %struct.gengetopt_args_info* %2, %struct.cmdline_parser_params* %3, i32 0)
ret i32 %5
}
/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/ *);
unsigned long now() { return (unsigned long)time(NULL); }


x86 assembly (clang, -O0):
<now>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @now() {
%1 = call i64 @time(i32* null)
ret i64 %1
}

LLVM IR (-O2):
define i64 @now() {
%1 = tail call i64 @time(i32* null)
ret i64 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
FILE *begin_file(char *name) {
  FILE *f;
  f = fopen(name, "w");
  fprintf(f, "/* THIS FILE IS AUTOMATICALLY GENERATED BY table */\n\n");
  return f;
}


x86 assembly (clang, -O0):
<begin_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb7(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<begin_file>:
push   %rbx
lea    0xed8(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rdi
mov    $0x35,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1040 <fwrite@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@.str.1 = [54 x i8] c"/* THIS FILE IS AUTOMATICALLY GENERATED BY table */\0A\0A\00"
define i32* @begin_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32*, i32** %3
ret i32* %8
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.1 = [54 x i8] c"/* THIS FILE IS AUTOMATICALLY GENERATED BY table */\0A\0A\00"
define noalias i32* @begin_file(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i64 53, i64 1, i32* %2)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(void *, void *);
int hashmap_string_compare(void *a, void *b) { return !strcmp(a, b); }


x86 assembly (clang, -O0):
<hashmap_string_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashmap_string_compare>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @hashmap_string_compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @hashmap_string_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
__attribute__((visibility("hidden"))) int is_eci_convertible(const int eci) {
  if (eci == 26 || (eci > 30 && eci != 170)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_eci_convertible>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1a,-0x8(%rbp)
je     1128 <is_eci_convertible+0x28>
cmpl   $0x1e,-0x8(%rbp)
jle    1134 <is_eci_convertible+0x34>
cmpl   $0xaa,-0x8(%rbp)
je     1134 <is_eci_convertible+0x34>
movl   $0x0,-0x4(%rbp)
jmp    113b <is_eci_convertible+0x3b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_eci_convertible>:
cmp    $0x1a,%edi
setne  %al
cmp    $0x1f,%edi
setl   %cl
cmp    $0xaa,%edi
sete   %dl
or     %cl,%dl
and    %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define hidden i32 @is_eci_convertible(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 26
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 30
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 170
br i1 %11, label %12, label %13
12: ; preds = %9, %1
store i32 0, i32* %2
br label %14
13: ; preds = %9, %6
store i32 1, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define hidden i32 @is_eci_convertible(i32 %0) {
%2 = icmp ne i32 %0, 26
%3 = icmp slt i32 %0, 31
%4 = icmp eq i32 %0, 170
%5 = or i1 %3, %4
%6 = and i1 %2, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ mvwprintw(int /*<<< orphan*/ *, int, int, char *);
int /*<<< orphan*/ wclear(int /*<<< orphan*/ *);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
void keine_neuen_daten(WINDOW *fenster) {
  wclear(fenster);
  mvwprintw(fenster, 12, 25, "Es liegen keine neuen Daten vor.");
  wrefresh(fenster);
}


x86 assembly (clang, -O0):
<keine_neuen_daten>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <wclear@plt>
mov    -0x8(%rbp),%rdi
mov    $0xc,%esi
mov    $0x19,%edx
lea    0xea6(%rip),%rcx
call   1050 <mvwprintw@plt>
mov    -0x8(%rbp),%rdi
call   1030 <wrefresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keine_neuen_daten>:
push   %rbx
mov    %rdi,%rbx
call   1040 <wclear@plt>
lea    0xec0(%rip),%rcx
mov    %rbx,%rdi
mov    $0xc,%esi
mov    $0x19,%edx
call   1050 <mvwprintw@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <wrefresh@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Es liegen keine neuen Daten vor.\00"
define void @keine_neuen_daten(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @wclear(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @mvwprintw(i32* %5, i32 12, i32 25, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 @wrefresh(i32* %7)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Es liegen keine neuen Daten vor.\00"
define void @keine_neuen_daten(i32* %0) {
%2 = tail call i32 @wclear(i32* %0)
%3 = tail call i32 @mvwprintw(i32* %0, i32 12, i32 25, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @wrefresh(i32* %0)
ret void
}