xunge/DecIR huggingface dataset:
/* Type definitions */
struct vm_area_struct {
  int dummy;
};
struct page {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, unsigned long);
__attribute__((always_)) void copy_from_user_page(struct vm_area_struct *vma,
                                                  struct page *page,
                                                  unsigned long vaddr,
                                                  void *dst, const void *src,
                                                  unsigned long len) {
  memcpy(dst, src, len);
}


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

x86 assembly (clang, -O2):
<copy_from_user_page>:
mov    %r9,%rdx
mov    %r8,%rsi
mov    %rcx,%rdi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
%struct.vm_area_struct = type { i32 }
%struct.page = type { i32 }
define void @copy_from_user_page(%struct.vm_area_struct* %0, %struct.page* %1, i64 %2, i8* %3, i8* %4, i64 %5) {
%7 = alloca %struct.vm_area_struct*
%8 = alloca %struct.page*
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i64
store %struct.vm_area_struct* %0, %struct.vm_area_struct** %7
store %struct.page* %1, %struct.page** %8
store i64 %2, i64* %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i64 %5, i64* %12
%13 = load i8*, i8** %10
%14 = load i8*, i8** %11
%15 = load i64, i64* %12
%16 = call i32 @memcpy(i8* %13, i8* %14, i64 %15)
ret void
}

LLVM IR (-O2):
%struct.vm_area_struct = type { i32 }
%struct.page = type { i32 }
define void @copy_from_user_page(%struct.vm_area_struct* nocapture readnone %0, %struct.page* nocapture readnone %1, i64 %2, i8* %3, i8* %4, i64 %5) {
%7 = tail call i32 @memcpy(i8* %3, i8* %4, i64 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ is_even(int);
int main() {
  is_even(10);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1030 <is_even@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @is_even(i32 10)
ret i32 0
}
int crawlcanconect(struct collectionFormat *collection,
                   int (*documentError)(struct collectionFormat *collection,
                                        int level, const char *fmt, ...)) {
  return 1;
}


x86 assembly (clang, -O0):
<crawlcanconect>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.collectionFormat = type opaque
define i32 @crawlcanconect(%struct.collectionFormat* %0, i32 (%struct.collectionFormat*, i32, i8*, ...)* %1) {
%3 = alloca %struct.collectionFormat*
%4 = alloca i32 (%struct.collectionFormat*, i32, i8*, ...)*
store %struct.collectionFormat* %0, %struct.collectionFormat** %3
store i32 (%struct.collectionFormat*, i32, i8*, ...)* %1, i32 (%struct.collectionFormat*, i32, i8*, ...)** %4
ret i32 1
}

LLVM IR (-O2):
%struct.collectionFormat = type opaque
define i32 @crawlcanconect(%struct.collectionFormat* nocapture readnone %0, i32 (%struct.collectionFormat*, i32, i8*, ...)* nocapture readnone %1) {
ret i32 1
}
void foo612() {}


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

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

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

LLVM IR (-O2):
define void @foo612() {
ret void
}
void vec3d_sub(double n[3], const double a[3], const double b[3]) {
  for (int j = 0; j < 3; j++)
    n[j] = a[j] - b[j];
}


x86 assembly (clang, -O0):
<vec3d_sub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    1156 <vec3d_sub+0x56>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <vec3d_sub+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3d_sub>:
movsd  (%rsi),%xmm0
subsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
subsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x10(%rsi),%xmm0
subsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @vec3d_sub(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fsub double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %2, i64 1
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 1
store double %11, double* %12
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %2, i64 2
%16 = load double, double* %15
%17 = fsub double %14, %16
%18 = getelementptr inbounds double, double* %0, i64 2
store double %17, double* %18
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x46() {
  Assert_real((isascii(70)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              355, ("isascii should be 1 for F"));
}


x86 assembly (clang, -O0):
<t_isascii_0x46>:
push   %rbp
mov    %rsp,%rbp
mov    $0x46,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x163,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x46>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x163,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for F\00"
define void @t_isascii_0x46() {
%1 = call i32 @isascii(i32 70)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 355, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for F\00"
define void @t_isascii_0x46() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 355, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int need_escape(char c) {
  switch (c) {
  case '\\':
  case '"':
  case '\b':
  case '\n':
  case '\r':
  case '\t':
  case '\f':
    return 1;
  case '\x7f':
    return 5;
  default:
    if (c > 0 && c < ' ') {
      return 5;
    }
    return 0;
  }
}


x86 assembly (clang, -O0):
<need_escape>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff8,%eax
sub    $0x3,%eax
jb     1169 <need_escape+0x69>
jmp    1122 <need_escape+0x22>
mov    -0xc(%rbp),%eax
add    $0xfffffff4,%eax
sub    $0x2,%eax
jb     1169 <need_escape+0x69>
jmp    1136 <need_escape+0x36>
mov    -0xc(%rbp),%eax
sub    $0x22,%eax
je     1169 <need_escape+0x69>
jmp    1147 <need_escape+0x47>
mov    -0xc(%rbp),%eax
sub    $0x5c,%eax
je     1169 <need_escape+0x69>
jmp    1158 <need_escape+0x58>
mov    -0xc(%rbp),%eax
sub    $0x7f,%eax
je     1175 <need_escape+0x75>
jmp    1181 <need_escape+0x81>
movl   $0x1,-0x4(%rbp)
jmp    11ae <need_escape+0xae>
movl   $0x5,-0x4(%rbp)
jmp    11ae <need_escape+0xae>
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jle    11a7 <need_escape+0xa7>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jge    11a7 <need_escape+0xa7>
movl   $0x5,-0x4(%rbp)
jmp    11ae <need_escape+0xae>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<need_escape>:
mov    $0x1,%eax
cmp    $0x22,%edi
ja     111d <need_escape+0x1d>
mov    %edi,%ecx
movabs $0x400003700,%rdx
bt     %rcx,%rdx
jae    111d <need_escape+0x1d>
ret
cmp    $0x5c,%edi
je     111c <need_escape+0x1c>
cmp    $0x7f,%edi
jne    112d <need_escape+0x2d>
mov    $0x5,%eax
ret
add    $0xff,%dil
xor    %eax,%eax
cmp    $0x1f,%dil
setb   %al
lea    (%rax,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @need_escape(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 92, label %6
i32 34, label %6
i32 8, label %6
i32 10, label %6
i32 13, label %6
i32 9, label %6
i32 12, label %6
i32 127, label %7
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %18
7: ; preds = %1
store i32 5, i32* %2
br label %18
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp slt i32 %14, 32
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 5, i32* %2
br label %18
17: ; preds = %12, %8
store i32 0, i32* %2
br label %18
18: ; preds = %17, %16, %7, %6
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @need_escape(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 92, label %8
i32 34, label %8
i32 8, label %8
i32 10, label %8
i32 13, label %8
i32 9, label %8
i32 12, label %8
i32 127, label %3
]
3: ; preds = %1
br label %8
4: ; preds = %1
%5 = add i8 %0, -1
%6 = icmp ult i8 %5, 31
%7 = select i1 %6, i32 5, i32 0
br label %8
8: ; preds = %4, %1, %1, %1, %1, %1, %1, %1, %3
%9 = phi i32 [ 5, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M564_f(char *s) {
  debug("M564_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M564_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M564_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M564_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M564_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M564_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M564_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int show_rusagehead(void) {
  printf("utime   stime    maxrss  ixrss  idrss  isrss  minflt  majflt  nswap  "
         "inblock  oublock  msgsnd  msgrcv  nsignals  nvcsw  nivcsw\n");
}


x86 assembly (clang, -O0):
<show_rusagehead>:
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):
<show_rusagehead>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [128 x i8] c"utime stime maxrss ixrss idrss isrss minflt majflt nswap inblock oublock msgsnd msgrcv nsignals nvcsw nivcsw\0A\00"
define i32 @show_rusagehead() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [127 x i8] c"utime stime maxrss ixrss idrss isrss minflt majflt nswap inblock oublock msgsnd msgrcv nsignals nvcsw nivcsw\00"
define i32 @show_rusagehead() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([127 x i8], [127 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ string_compress_multi(char const *);
void main() {
  const char *str = "abcbc";
  string_compress_multi(str);
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"abcbc\00"
define void @main() {
%1 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @string_compress_multi(i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"abcbc\00"
define void @main() {
%1 = tail call i32 @string_compress_multi(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printXmlFiveDigits(int *data, unsigned int offset, const char *name) {
  if (offset > 0) {
    printf("%*c", offset, ' ');
  }
  printf("<%s>%i</%s>\n", name, *data, name);
}


x86 assembly (clang, -O0):
<printXmlFiveDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    1143 <printXmlFiveDigits+0x33>
mov    -0xc(%rbp),%esi
lea    0xec9(%rip),%rdi
mov    $0x20,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0x18(%rbp),%rcx
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printXmlFiveDigits>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
test   %esi,%esi
je     1131 <printXmlFiveDigits+0x21>
lea    0xedb(%rip),%rdi
mov    $0x20,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%r14),%edx
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rcx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%*c\00"
@.str.1 = [13 x i8] c"<%s>%i</%s>\0A\00"
define void @printXmlFiveDigits(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = icmp ugt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i32, i32* %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10, i32 32)
br label %12
12: ; preds = %9, %3
%13 = load i8*, i8** %6
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = load i8*, i8** %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %13, i32 %15, i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%*c\00"
@.str.1 = [13 x i8] c"<%s>%i</%s>\0A\00"
define void @printXmlFiveDigits(i32* nocapture %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1, i32 32)
br label %7
7: ; preds = %5, %3
%8 = load i32, i32* %0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %8, i8* %2)
ret void
}
int compare_doubles(const void *a1, const void *b1) {
  const double *a = (const double *)a1;
  const double *b = (const double *)b1;
  return (*a > *b) - (*a < *b);
}


x86 assembly (clang, -O0):
<compare_doubles>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
ucomisd (%rax),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x18(%rbp),%rcx
movsd  (%rcx),%xmm1
mov    -0x20(%rbp),%rcx
movsd  (%rcx),%xmm0
ucomisd %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_doubles>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_doubles(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca double*
%6 = alloca double*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to double*
store double* %8, double** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to double*
store double* %10, double** %6
%11 = load double*, double** %5
%12 = load double, double* %11
%13 = load double*, double** %6
%14 = load double, double* %13
%15 = fcmp ogt double %12, %14
%16 = zext i1 %15 to i32
%17 = load double*, double** %5
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = load double, double* %19
%21 = fcmp olt double %18, %20
%22 = zext i1 %21 to i32
%23 = sub nsw i32 %16, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @compare_doubles(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
%8 = zext i1 %7 to i32
%9 = fcmp olt double %5, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerCapComP__5__Compare__default__fired();
void Msp430TimerCapComP__5__Compare__fired(void) {
  Msp430TimerCapComP__5__Compare__default__fired();
}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__5__Compare__fired() {
%1 = tail call i32 (...) @Msp430TimerCapComP__5__Compare__default__fired()
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ udp_send(char *, int);
void udp_send_int32(int32_t value) {
  printf("send value %d\n", value);
  udp_send((char *)&value, sizeof(int32_t));
}


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

x86 assembly (clang, -O2):
<udp_send_int32>:
push   %rax
mov    %edi,%esi
mov    %edi,0x4(%rsp)
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1040 <udp_send@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"send value %d\0A\00"
define void @udp_send_int32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = bitcast i32* %2 to i8*
%6 = call i32 @udp_send(i8* %5, i32 4)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"send value %d\0A\00"
define void @udp_send_int32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = bitcast i32* %2 to i8*
%5 = call i32 @udp_send(i8* %4, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_pre_cxx_alib(void) {
  printf("This is a \"pre/cxx_alib\" recipe.\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<test_pre_cxx_alib>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"This is a \22pre/cxx_alib\22 recipe.\0A\00"
define i32 @test_pre_cxx_alib() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [33 x i8] c"This is a \22pre/cxx_alib\22 recipe.\00"
define i32 @test_pre_cxx_alib() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ serialWriteByte(int, int /*<<< orphan*/);
void serialPrint(int comport_number, const char *text) {
  while (*text != 0)
    serialWriteByte(comport_number, *(text++));
}


x86 assembly (clang, -O0):
<serialPrint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114e <serialPrint+0x3e>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%esi
call   1030 <serialWriteByte@plt>
jmp    111f <serialPrint+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialPrint>:
push   %rbp
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1145 <serialPrint+0x35>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%esi
mov    %ebp,%edi
call   1030 <serialWriteByte@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <serialPrint+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @serialPrint(i32 %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 i8* [ %9, %5 ], [ %1, %2 ]
%8 = sext i8 %6 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = tail call i32 @serialWriteByte(i32 %0, i32 %8)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ comparisonTestdd(double, double);
int /*<<< orphan*/ printf(char *);
void comparisonOpsdd() {
  printf("double op double:\n");
  comparisonTestdd(1.0, 2.0);
  comparisonTestdd(1.0, 1.0);
  comparisonTestdd(2.0, 1.0);
}


x86 assembly (clang, -O0):
<comparisonOpsdd>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
movsd  0xed0(%rip),%xmm0
movsd  0xec0(%rip),%xmm1
call   1040 <comparisonTestdd@plt>
movsd  0xebb(%rip),%xmm1
movaps %xmm1,%xmm0
call   1040 <comparisonTestdd@plt>
movsd  0xea3(%rip),%xmm0
movsd  0xea3(%rip),%xmm1
call   1040 <comparisonTestdd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparisonOpsdd>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
movsd  0xecb(%rip),%xmm0
movsd  0xecb(%rip),%xmm1
call   1040 <comparisonTestdd@plt>
movsd  0xeb6(%rip),%xmm0
movaps %xmm0,%xmm1
call   1040 <comparisonTestdd@plt>
movsd  0xeae(%rip),%xmm0
movsd  0xe9e(%rip),%xmm1
pop    %rax
jmp    1040 <comparisonTestdd@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"double op double:\0A\00"
define void @comparisonOpsdd() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @comparisonTestdd(double 1.000000e+00, double 2.000000e+00)
%3 = call i32 @comparisonTestdd(double 1.000000e+00, double 1.000000e+00)
%4 = call i32 @comparisonTestdd(double 2.000000e+00, double 1.000000e+00)
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"double op double:\00"
define void @comparisonOpsdd() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @comparisonTestdd(double 1.000000e+00, double 2.000000e+00)
%3 = tail call i32 @comparisonTestdd(double 1.000000e+00, double 1.000000e+00)
%4 = tail call i32 @comparisonTestdd(double 2.000000e+00, double 1.000000e+00)
ret void
}
/* Variables and functions */
void arch_init() {}


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

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

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

LLVM IR (-O2):
define void @arch_init() {
ret void
}
/* Type definitions */
struct katcl_parse {
  int dummy;
};

/* Variables and functions */
int add_end_parse_katcl(struct katcl_parse *);
int finalize_parse_katcl(struct katcl_parse *p) {
  return add_end_parse_katcl(p);
}


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

x86 assembly (clang, -O2):
<finalize_parse_katcl>:
jmp    1030 <add_end_parse_katcl@plt>

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

LLVM IR (-O2):
%struct.katcl_parse = type { i32 }
define i32 @finalize_parse_katcl(%struct.katcl_parse* %0) {
%2 = tail call i32 @add_end_parse_katcl(%struct.katcl_parse* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ smm_free(void *);
int csc_extname_filter_close(void *efft) {
  smm_free(efft);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @csc_extname_filter_close(i8* %0) {
%2 = tail call i32 @smm_free(i8* %0)
ret i32 0
}
/* Type definitions */
struct hmm_multi_s {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int read_trans_prior_files_multi(int nr_priorfiles, void *emission_priorsp,
                                 struct hmm_multi_s *hmmp, FILE *file) {
  char s[2048];
  if (fgets(s, 2048, file) != NULL) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<read_trans_prior_files_multi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x820,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x820(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x800,%esi
call   1030 <fgets@plt>
cmp    $0x0,%rax
je     114e <read_trans_prior_files_multi+0x3e>
jmp    114e <read_trans_prior_files_multi+0x3e>
xor    %eax,%eax
add    $0x820,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_trans_prior_files_multi>:
sub    $0x808,%rsp
mov    %rsp,%rdi
mov    $0x800,%esi
mov    %rcx,%rdx
call   1030 <fgets@plt>
xor    %eax,%eax
add    $0x808,%rsp
ret

LLVM IR (-O0):
%struct.hmm_multi_s = type { i32 }
define i32 @read_trans_prior_files_multi(i32 %0, i8* %1, %struct.hmm_multi_s* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca %struct.hmm_multi_s*
%8 = alloca i32*
%9 = alloca [2048 x i8]
store i32 %0, i32* %5
store i8* %1, i8** %6
store %struct.hmm_multi_s* %2, %struct.hmm_multi_s** %7
store i32* %3, i32** %8
%10 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i64 0, i64 0
%11 = load i32*, i32** %8
%12 = call i32* @fgets(i8* %10, i32 2048, i32* %11)
%13 = icmp ne i32* %12, null
br i1 %13, label %14, label %15
14: ; preds = %4
br label %15
15: ; preds = %14, %4
ret i32 0
}

LLVM IR (-O2):
%struct.hmm_multi_s = type { i32 }
define i32 @read_trans_prior_files_multi(i32 %0, i8* nocapture readnone %1, %struct.hmm_multi_s* nocapture readnone %2, i32* nocapture %3) {
%5 = alloca [2048 x i8]
%6 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%7 = call i32* @fgets(i8* %6, i32 2048, i32* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
int func3(int a, int b, int c) {
  int r = 0;
  putchar(a);
  putchar(b);
  putchar(c);
  r = a + b - c;
  return r;
}


x86 assembly (clang, -O0):
<func3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func3>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
call   1030 <putchar@plt>
mov    %ebp,%edi
call   1030 <putchar@plt>
mov    %r14d,%edi
call   1030 <putchar@plt>
add    %ebx,%ebp
sub    %r14d,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @func3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = call i32 @putchar(i32 %8)
%10 = load i32, i32* %5
%11 = call i32 @putchar(i32 %10)
%12 = load i32, i32* %6
%13 = call i32 @putchar(i32 %12)
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = add nsw i32 %14, %15
%17 = load i32, i32* %6
%18 = sub nsw i32 %16, %17
store i32 %18, i32* %7
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @func3(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @putchar(i32 %0)
%5 = tail call i32 @putchar(i32 %1)
%6 = tail call i32 @putchar(i32 %2)
%7 = add nsw i32 %1, %0
%8 = sub i32 %7, %2
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void generate_file_name(char *file_name) {
  time_t calender_time;
  struct tm *tc;
  time(&calender_time);
  tc = localtime(&calender_time);
  strftime(file_name, 15, "%Y%m%d%H%M%S", tc);
}


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

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

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [13 x i8] c"%Y%m%d%H%M%S\00"
define void @generate_file_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm*
store i8* %0, i8** %2
%5 = call i32 @time(i32* %3)
%6 = call %struct.tm* @localtime(i32* %3)
store %struct.tm* %6, %struct.tm** %4
%7 = load i8*, i8** %2
%8 = load %struct.tm*, %struct.tm** %4
%9 = call i32 @strftime(i8* %7, i32 15, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [13 x i8] c"%Y%m%d%H%M%S\00"
define void @generate_file_name(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call %struct.tm* @localtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 15, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret void
}
/* Type definitions */
struct flashrom_flashctx {
  int dummy;
};

/* Variables and functions */
int nicintel_ee_write_82580(struct flashrom_flashctx *, int /*<<< orphan*/ *,
                            unsigned int, unsigned int);
int nicintel_ee_erase_82580(struct flashrom_flashctx *flash, unsigned int addr,
                            unsigned int len) {
  return nicintel_ee_write_82580(flash, NULL, addr, len);
}


x86 assembly (clang, -O0):
<nicintel_ee_erase_82580>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nicintel_ee_write_82580@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nicintel_ee_erase_82580>:
mov    %edx,%ecx
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <nicintel_ee_write_82580@plt>

LLVM IR (-O0):
%struct.flashrom_flashctx = type { i32 }
define i32 @nicintel_ee_erase_82580(%struct.flashrom_flashctx* %0, i32 %1, i32 %2) {
%4 = alloca %struct.flashrom_flashctx*
%5 = alloca i32
%6 = alloca i32
store %struct.flashrom_flashctx* %0, %struct.flashrom_flashctx** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.flashrom_flashctx*, %struct.flashrom_flashctx** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @nicintel_ee_write_82580(%struct.flashrom_flashctx* %7, i32* null, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.flashrom_flashctx = type { i32 }
define i32 @nicintel_ee_erase_82580(%struct.flashrom_flashctx* %0, i32 %1, i32 %2) {
%4 = tail call i32 @nicintel_ee_write_82580(%struct.flashrom_flashctx* %0, i32* null, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
double exp(double);
double exp_test(double x, const void *a) {
  const double *a_ptr = (const double *)a;
  return exp(x) - (*a_ptr);
}


x86 assembly (clang, -O0):
<exp_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp_test>:
push   %rbx
mov    %rdi,%rbx
call   1030 <exp@plt>
subsd  (%rbx),%xmm0
pop    %rbx
ret

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

LLVM IR (-O2):
define double @exp_test(double %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to double*
%4 = tail call double @exp(double %0)
%5 = load double, double* %3
%6 = fsub double %4, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
void gen_logical_negation(void) { gen_call("__lneg"); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"__lneg\00"
define void @gen_logical_negation() {
%1 = tail call i32 @gen_call(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ say(char *, int);
void hit(void) { say("Let me show you MY version of politics, friend!", 1); }


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"Let me show you MY version of politics, friend!\00"
define void @hit() {
%1 = call i32 @say(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"Let me show you MY version of politics, friend!\00"
define void @hit() {
%1 = tail call i32 @say(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
double freqoff_to_period(double freq_0, double foff_c, double foff_x) {
  return (1.0 / freq_0 * (1 + foff_c * foff_x));
}


x86 assembly (clang, -O0):
<freqoff_to_period>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xee5(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeca(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<freqoff_to_period>:
movsd  0xef8(%rip),%xmm3
mulsd  %xmm2,%xmm1
addsd  %xmm3,%xmm1
divsd  %xmm0,%xmm3
mulsd  %xmm1,%xmm3
movapd %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @freqoff_to_period(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = fdiv double 1.000000e+00, %7
%9 = load double, double* %5
%10 = load double, double* %6
%11 = call double @llvm.fmuladd.f64(double %9, double %10, double 1.000000e+00)
%12 = fmul double %8, %11
ret double %12
}

LLVM IR (-O2):
define double @freqoff_to_period(double %0, double %1, double %2) {
%4 = fdiv double 1.000000e+00, %0
%5 = tail call double @llvm.fmuladd.f64(double %1, double %2, double 1.000000e+00)
%6 = fmul double %4, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ x(char *);
main() { x("__LINE__\n"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"__LINE__\0A\00"
define i32 @main() {
%1 = call i32 @x(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"__LINE__\0A\00"
define i32 @main() {
%1 = tail call i32 @x(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f2(int);
int /*<<< orphan*/ func2();
__attribute__((no_reorder)) __attribute__((no)) int bozo(void) {
  f2(3);
  func2();
}


x86 assembly (clang, -O0):
<bozo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3,%edi
call   1030 <f2@plt>
mov    $0x0,%al
call   1040 <func2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bozo>:
push   %rax
mov    $0x3,%edi
call   1030 <f2@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <func2@plt>

LLVM IR (-O0):
define i32 @bozo() {
%1 = alloca i32
%2 = call i32 @f2(i32 3)
%3 = call i32 (...) @func2()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @bozo() {
%1 = tail call i32 @f2(i32 3)
%2 = tail call i32 (...) @func2()
ret i32 undef
}
void dl_G_TEXRECT() {}


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

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

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

LLVM IR (-O2):
define void @dl_G_TEXRECT() {
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int64_t modq(int64_t a, int64_t q) {
  int64_t b = a % q;
  if (b < 0)
    return q + b;
  else
    return b;
}


x86 assembly (clang, -O0):
<modq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jge    1136 <modq+0x36>
mov    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    113e <modq+0x3e>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<modq>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1116 <modq+0x16>
cqto
idiv   %rsi
jmp    111a <modq+0x1a>
xor    %edx,%edx
div    %esi
mov    %rdx,%rax
sar    $0x3f,%rax
and    %rsi,%rax
add    %rdx,%rax
ret

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

LLVM IR (-O2):
define i64 @modq(i64 %0, i64 %1) {
%3 = srem i64 %0, %1
%4 = icmp slt i64 %3, 0
%5 = select i1 %4, i64 %1, i64 0
%6 = add nsw i64 %5, %3
ret i64 %6
}
float cfm(float k_p, float k_d, float s) {
  return (1.f / (((s) * (k_p)) + (k_d)));
}


x86 assembly (clang, -O0):
<cfm>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  0xece(%rip),%xmm0
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfm>:
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xef0(%rip),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @cfm(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = call float @llvm.fmuladd.f32(float %7, float %8, float %9)
%11 = fdiv float 1.000000e+00, %10
ret float %11
}

LLVM IR (-O2):
define float @cfm(float %0, float %1, float %2) {
%4 = tail call float @llvm.fmuladd.f32(float %2, float %0, float %1)
%5 = fdiv float 1.000000e+00, %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int num;
  for (num = 1; num <= 100; num++)
    if (num % 2 == 0)
      printf("%d\n", num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1166 <main+0x56>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1153 <main+0x43>
mov    -0x8(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
jmp    1158 <main+0x48>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
jmp    1138 <main+0x28>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x65,%ebx
je     1149 <main+0x39>
test   $0x1,%bl
jne    1130 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %7
%2 = phi i32 [ 1, %0 ], [ %8, %7 ]
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %7
7: ; preds = %1, %5
%8 = add nuw nsw i32 %2, 1
%9 = icmp eq i32 %8, 101
br i1 %9, label %10, label %1
10: ; preds = %7
ret i32 0
}