xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
char *getenv(char *);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  char *str = getenv("TEST_ENV");
  write(STDOUT_FILENO, str, strlen(str));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1040 <write@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rbx
mov    0x2ea7(%rip),%rax
mov    (%rax),%ebp
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"TEST_ENV\00"
@STDOUT_FILENO = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* @getenv(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %6
%8 = load i32, i32* @STDOUT_FILENO
%9 = load i8*, i8** %6
%10 = load i8*, i8** %6
%11 = call i32 @strlen(i8* %10)
%12 = call i32 @write(i32 %8, i8* %9, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"TEST_ENV\00"
@STDOUT_FILENO = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @getenv(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @STDOUT_FILENO
%5 = tail call i32 @strlen(i8* %3)
%6 = tail call i32 @write(i32 %4, i8* %3, i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f8();
void f7() { f8(); }


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

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

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

LLVM IR (-O2):
define void @f7() {
%1 = tail call i32 (...) @f8()
ret void
}
void reverse(unsigned char *first, unsigned char *last) {
  unsigned char c;
  while (first < last) {
    c = *first;
    *first++ = *last;
    *last-- = c;
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1153 <reverse+0x53>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
jmp    110c <reverse+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
cmp    %rsi,%rdi
jae    112c <reverse+0x2c>
add    $0xffffffffffffffff,%rsi
nopl   0x0(%rax)
movzbl (%rdi),%eax
movzbl 0x1(%rsi),%ecx
mov    %cl,(%rdi)
add    $0x1,%rdi
mov    %al,0x1(%rsi)
lea    -0x1(%rsi),%rax
cmp    %rsi,%rdi
mov    %rax,%rsi
jb     1110 <reverse+0x10>
ret

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

LLVM IR (-O2):
define void @reverse(i8* %0, i8* %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i8* [ %9, %4 ], [ %0, %2 ]
%6 = phi i8* [ %10, %4 ], [ %1, %2 ]
%7 = load i8, i8* %5
%8 = load i8, i8* %6
%9 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %8, i8* %5
%10 = getelementptr inbounds i8, i8* %6, i64 -1
store i8 %7, i8* %6
%11 = icmp ult i8* %9, %10
br i1 %11, label %4, label %12
12: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("floats are %d bytes.\n", sizeof(float));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [22 x i8] c"floats are %d bytes.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
int ld_ne_rr2(long double a1, long double a2) { return !(((a1) != (a2))); }


x86 assembly (clang, -O0):
<ld_ne_rr2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setp   %cl
setne  %al
or     %cl,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_ne_rr2>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fucomip %st(1),%st
fstp   %st(0)
setnp  %al
sete   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ld_ne_rr2(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fcmp une x86_fp80 %5, %6
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @ld_ne_rr2(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp oeq x86_fp80 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct QuerySegment {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ FreeQuerySegment(struct QuerySegment *);
void free_qu(struct QuerySegment *handle) { FreeQuerySegment(handle); }


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

x86 assembly (clang, -O2):
<free_qu>:
jmp    1030 <FreeQuerySegment@plt>

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

LLVM IR (-O2):
%struct.QuerySegment = type { i32 }
define void @free_qu(%struct.QuerySegment* %0) {
%2 = tail call i32 @FreeQuerySegment(%struct.QuerySegment* %0)
ret void
}
/* Variables and functions */
unsigned long DIV_ROUND_UP(unsigned long, unsigned long);
unsigned long iommu_num_pages(unsigned long addr, unsigned long len,
                              unsigned long io_page_size) {
  unsigned long size = (addr & (io_page_size - 1)) + len;
  return DIV_ROUND_UP(size, io_page_size);
}


x86 assembly (clang, -O0):
<iommu_num_pages>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
and    %rcx,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <DIV_ROUND_UP@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iommu_num_pages>:
lea    -0x1(%rdx),%rax
and    %rax,%rdi
add    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <DIV_ROUND_UP@plt>

LLVM IR (-O0):
define i64 @iommu_num_pages(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %6
%10 = sub i64 %9, 1
%11 = and i64 %8, %10
%12 = load i64, i64* %5
%13 = add i64 %11, %12
store i64 %13, i64* %7
%14 = load i64, i64* %7
%15 = load i64, i64* %6
%16 = call i64 @DIV_ROUND_UP(i64 %14, i64 %15)
ret i64 %16
}

LLVM IR (-O2):
define i64 @iommu_num_pages(i64 %0, i64 %1, i64 %2) {
%4 = add i64 %2, -1
%5 = and i64 %4, %0
%6 = add i64 %5, %1
%7 = tail call i64 @DIV_ROUND_UP(i64 %6, i64 %2)
ret i64 %7
}
const char *testchararray() {
  const char arr[] = {'1', '2', '3'};
  return arr;
}


x86 assembly (clang, -O0):
<testchararray>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xeed(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x3(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testchararray>:
lea    -0x3(%rsp),%rax
ret

LLVM IR (-O0):
@__const.testchararray.arr = [3 x i8] c"123"
define i8* @testchararray() {
%1 = alloca [3 x i8]
%2 = bitcast [3 x i8]* %1 to i8*
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @testchararray() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ copro_pdp11_write8(int /*<<< orphan*/,
                                      int /*<<< orphan*/ const);
void write8(uint16_t a, const uint16_t v) { copro_pdp11_write8(a, v); }


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

x86 assembly (clang, -O2):
<write8>:
jmp    1030 <copro_pdp11_write8@plt>

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

LLVM IR (-O2):
define void @write8(i32 %0, i32 %1) {
%3 = tail call i32 @copro_pdp11_write8(i32 %0, i32 %1)
ret void
}
int HelpItem148(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem148() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ MAIN__();
int zblat1_() {
  MAIN__();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @zblat1_() {
%1 = call i32 (...) @MAIN__()
ret i32 0
}

LLVM IR (-O2):
define i32 @zblat1_() {
%1 = tail call i32 (...) @MAIN__()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  unsigned long long int physmem = -1;
  unsigned long int pages = -1;
  unsigned long int pagesizeKB = -1;
  if ((pages != -1) && (pagesizeKB != -1)) {
    physmem = pages * pagesizeKB;
    printf("%lld\n", physmem);
    exit(0);
  } else {
    printf("-1\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
movq   $0xffffffffffffffff,-0x20(%rbp)
ff
cmpq   $0xffffffffffffffff,-0x18(%rbp)
je     1183 <main+0x63>
cmpq   $0xffffffffffffffff,-0x20(%rbp)
je     1183 <main+0x63>
mov    -0x18(%rbp),%rax
imul   -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@str = [3 x i8] c"-1\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct dirent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __opendir(char const *);
int __scandir_tail(int /*<<< orphan*/, struct dirent ***,
                   int (*)(struct dirent const *),
                   int (*)(struct dirent const **, struct dirent const **));
int scandir(const char *dir, struct dirent ***namelist,
            int (*select)(const struct dirent *),
            int (*cmp)(const struct dirent **, const struct dirent **)) {
  return __scandir_tail(__opendir(dir), namelist, select, cmp);
}


x86 assembly (clang, -O0):
<scandir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__opendir@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <__scandir_tail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scandir>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
call   1030 <__opendir@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <__scandir_tail@plt>

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

LLVM IR (-O2):
%struct.dirent = type { i32 }
define i32 @scandir(i8* %0, %struct.dirent*** %1, i32 (%struct.dirent*)* %2, i32 (%struct.dirent**, %struct.dirent**)* %3) {
%5 = tail call i32 @__opendir(i8* %0)
%6 = tail call i32 @__scandir_tail(i32 %5, %struct.dirent*** %1, i32 (%struct.dirent*)* %2, i32 (%struct.dirent**, %struct.dirent**)* %3)
ret i32 %6
}
/* Type definitions */
typedef unsigned int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
unsigned int bytes_to_uint24(unsigned int *);
void uint24_to_bytes(unsigned int num, uint8_t *bytes) {
  assert(num < (1 << 24));
  bytes[0] = num >> 16;
  bytes[1] = num >> 8;
  bytes[2] = num;
  assert(bytes_to_uint24(bytes) == num);
}


x86 assembly (clang, -O0):
<uint24_to_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1000000,-0x4(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x10(%rbp),%rdi
call   1040 <bytes_to_uint24@plt>
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint24_to_bytes>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x1000000,%ebp
setb   %dil
call   1030 <assert@plt>
mov    %ebp,%eax
shr    $0x10,%eax
mov    %eax,(%rbx)
mov    %ebp,%eax
shr    $0x8,%eax
mov    %eax,0x4(%rbx)
mov    %ebp,0x8(%rbx)
mov    %rbx,%rdi
call   1040 <bytes_to_uint24@plt>
xor    %edi,%edi
cmp    %ebp,%eax
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @uint24_to_bytes(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = icmp ult i32 %5, 16777216
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %3
%10 = lshr i32 %9, 16
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i64 0
store i32 %10, i32* %12
%13 = load i32, i32* %3
%14 = lshr i32 %13, 8
%15 = load i32*, i32** %4
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %14, i32* %16
%17 = load i32, i32* %3
%18 = load i32*, i32** %4
%19 = getelementptr inbounds i32, i32* %18, i64 2
store i32 %17, i32* %19
%20 = load i32*, i32** %4
%21 = call i32 @bytes_to_uint24(i32* %20)
%22 = load i32, i32* %3
%23 = icmp eq i32 %21, %22
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
ret void
}

LLVM IR (-O2):
define void @uint24_to_bytes(i32 %0, i32* %1) {
%3 = icmp ult i32 %0, 16777216
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = lshr i32 %0, 16
store i32 %6, i32* %1
%7 = lshr i32 %0, 8
%8 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %7, i32* %8
%9 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %0, i32* %9
%10 = tail call i32 @bytes_to_uint24(i32* %1)
%11 = icmp eq i32 %10, %0
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fortchartoc(char *);
int /*<<< orphan*/ gmvwrite_traceids_fromfile(int /*<<< orphan*/);
void fgmvwrite_traceids_fromfile_(char filnam[]) {
  gmvwrite_traceids_fromfile(fortchartoc(filnam));
}


x86 assembly (clang, -O0):
<fgmvwrite_traceids_fromfile_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fortchartoc@plt>
mov    %eax,%edi
call   1040 <gmvwrite_traceids_fromfile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgmvwrite_traceids_fromfile_>:
push   %rax
call   1030 <fortchartoc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <gmvwrite_traceids_fromfile@plt>

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

LLVM IR (-O2):
define void @fgmvwrite_traceids_fromfile_(i8* %0) {
%2 = tail call i32 @fortchartoc(i8* %0)
%3 = tail call i32 @gmvwrite_traceids_fromfile(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ADC0_SEQB_DriverIRQHandler();
__attribute__((weak)) void ADC0_SEQB_IRQHandler(void) {
  ADC0_SEQB_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @ADC0_SEQB_IRQHandler() {
%1 = call i32 (...) @ADC0_SEQB_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @ADC0_SEQB_IRQHandler() {
%1 = tail call i32 (...) @ADC0_SEQB_DriverIRQHandler()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fscanf(FILE *stream __attribute__((unused)),
           const char *format __attribute__((unused)), ...) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @fscanf(i32* nocapture readnone %0, i8* nocapture readnone %1, ...) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __glut2Warning(char const *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void __glut2FatalError(const char *msg) {
  __glut2Warning(msg);
  exit(0);
}


x86 assembly (clang, -O0):
<__glut2FatalError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__glut2Warning@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<__glut2FatalError>:
push   %rax
call   1030 <__glut2Warning@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @__glut2FatalError(i8* %0) {
%2 = tail call i32 @__glut2Warning(i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ alloca(int);
int /*<<< orphan*/ free(int *);
int *malloc(int);
void test_alloca(void) {
  int *x = (int *)alloca(128 * 1024);
  x[0] = 4;
  x = malloc(128 * 1024);
  x[64 * 1024 / sizeof(int)] = 1;
  free(x);
}


x86 assembly (clang, -O0):
<test_alloca>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x20000,%edi
call   1040 <alloca@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x4,(%rax)
mov    $0x20000,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,0x10000(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_alloca>:
push   %rax
mov    $0x20000,%edi
call   1040 <alloca@plt>
movl   $0x4,(%rax)
mov    $0x20000,%edi
call   1050 <malloc@plt>
movl   $0x1,0x10000(%rax)
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @test_alloca() {
%1 = alloca i32*
%2 = call i64 @alloca(i32 131072)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = getelementptr inbounds i32, i32* %4, i64 0
store i32 4, i32* %5
%6 = call i32* @malloc(i32 131072)
store i32* %6, i32** %1
%7 = load i32*, i32** %1
%8 = getelementptr inbounds i32, i32* %7, i64 16384
store i32 1, i32* %8
%9 = load i32*, i32** %1
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @test_alloca() {
%1 = tail call i64 @alloca(i32 131072)
%2 = inttoptr i64 %1 to i32*
store i32 4, i32* %2
%3 = tail call i32* @malloc(i32 131072)
%4 = getelementptr inbounds i32, i32* %3, i64 16384
store i32 1, i32* %4
%5 = tail call i32 @free(i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ find_range(char *);
void find_range_large_test() {
  find_range("benchmarks"
             ".index.large");
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"benchmarks.index.large\00"
define void @find_range_large_test() {
%1 = call i32 @find_range(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"benchmarks.index.large\00"
define void @find_range_large_test() {
%1 = tail call i32 @find_range(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_number(size_t len, unsigned char *data) {
  for (size_t i = 0; i < len; i++) {
    printf("%02X", data[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1161 <print_number+0x51>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <print_number+0x18>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_number>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     1158 <print_number+0x38>
mov    %rsi,%r14
mov    %rdi,%r12
lea    0xec6(%rip),%r15
xor    %ebx,%ebx
nopl   0x0(%rax)
movzbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_number+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%02X\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_number(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i64
store i64 %0, i64* %3
store i8* %1, i8** %4
store i64 0, i64* %5
br label %6
6: ; preds = %17, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %3
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8*, i8** %4
%12 = load i64, i64* %5
%13 = getelementptr inbounds i8, i8* %11, i64 %12
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i64, i64* %5
%19 = add i64 %18, 1
store i64 %19, i64* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%02X\00"
define void @print_number(i64 %0, i8* nocapture %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %2
%5 = tail call i32 @putchar(i32 10)
ret void
6: ; preds = %2, %6
%7 = phi i64 [ %12, %6 ], [ 0, %2 ]
%8 = getelementptr inbounds i8, i8* %1, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw i64 %7, 1
%13 = icmp eq i64 %12, %0
br i1 %13, label %4, label %6
}
int doMultiplication(int val1, int val2) { return val1 * val2; }


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

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

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

LLVM IR (-O2):
define i32 @doMultiplication(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
long wmx2_samples_to_bytes(long samples, int channels) {
  long bytes = samples / 2;
  if (bytes * 2 < samples)
    bytes++;
  bytes *= channels;
  bytes += 3 * channels;
  return bytes;
}


x86 assembly (clang, -O0):
<wmx2_samples_to_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
cmp    -0x8(%rbp),%rax
jge    113b <wmx2_samples_to_bytes+0x3b>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
movslq -0xc(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
imul   $0x3,-0xc(%rbp),%eax
cltq
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wmx2_samples_to_bytes>:
mov    %rdi,%rax
shr    $0x3f,%rax
add    %rdi,%rax
mov    %rax,%rcx
sar    %rcx
and    $0xfffffffffffffffe,%rax
xor    %edx,%edx
cmp    %rdi,%rax
setl   %dl
add    %rcx,%rdx
movslq %esi,%rax
imul   %rax,%rdx
lea    (%rax,%rax,2),%eax
cltq
add    %rdx,%rax
ret

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

LLVM IR (-O2):
define i64 @wmx2_samples_to_bytes(i64 %0, i32 %1) {
%3 = sdiv i64 %0, 2
%4 = shl nsw i64 %3, 1
%5 = icmp slt i64 %4, %0
%6 = zext i1 %5 to i64
%7 = add nsw i64 %3, %6
%8 = sext i32 %1 to i64
%9 = mul nsw i64 %7, %8
%10 = mul nsw i32 %1, 3
%11 = sext i32 %10 to i64
%12 = add nsw i64 %9, %11
ret i64 %12
}
/* Variables and functions */
int zip();
__attribute__((no)) int foo() { return zip(); }


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

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

LLVM IR (-O0):
define i32 @foo() {
%1 = call i32 (...) @zip()
ret i32 %1
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 (...) @zip()
ret i32 %1
}
void test45_M_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test45_M_targetInit__I() {
ret void
}
int test_imm_28int8_mem(signed char *val) {
  return ((*val) & (0x28 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_28int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x28,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_28int8_mem>:
testb  $0x28,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_28int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 40
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *StrDuplicate(const char *source) {
  char *target;
  assert((0 != (source)));
  target = (char *)malloc(strlen((source)) + 1);
  if (target) {
    strcpy((target), (source));
  }
  return target;
}


x86 assembly (clang, -O0):
<StrDuplicate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1190 <StrDuplicate+0x50>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrDuplicate>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1050 <assert@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1179 <StrDuplicate+0x39>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @StrDuplicate(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* null, %4
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i8*, i8** %2
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %9, 1
%11 = call i64 @malloc(i64 %10)
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %3
%13 = load i8*, i8** %3
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %19
15: ; preds = %1
%16 = load i8*, i8** %3
%17 = load i8*, i8** %2
%18 = call i32 @strcpy(i8* %16, i8* %17)
br label %19
19: ; preds = %15, %1
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
define i8* @StrDuplicate(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%6 = add nsw i64 %5, 1
%7 = tail call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
%9 = icmp eq i64 %7, 0
br i1 %9, label %12, label %10
10: ; preds = %1
%11 = tail call i32 @strcpy(i8* %8, i8* %0)
br label %12
12: ; preds = %10, %1
ret i8* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_NAME;

/* Variables and functions */
int /*<<< orphan*/ NID_organizationName;
char const *req_GetNameNid(int /*<<< orphan*/ *, int /*<<< orphan*/);
const char *req_GetName_O(X509_NAME *name) {
  return req_GetNameNid(name, NID_organizationName);
}


x86 assembly (clang, -O0):
<req_GetName_O>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <req_GetNameNid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<req_GetName_O>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <req_GetNameNid@plt>

LLVM IR (-O0):
@NID_organizationName = global i32 0
define i8* @req_GetName_O(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @NID_organizationName
%5 = call i8* @req_GetNameNid(i32* %3, i32 %4)
ret i8* %5
}

LLVM IR (-O2):
@NID_organizationName = global i32 0
define i8* @req_GetName_O(i32* %0) {
%2 = load i32, i32* @NID_organizationName
%3 = tail call i8* @req_GetNameNid(i32* %0, i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ AtmegaCompareP__0__Alarm__stop();
void TransformAlarmC__0__AlarmFrom__stop(void) {
  AtmegaCompareP__0__Alarm__stop();
}


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

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

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

LLVM IR (-O2):
define void @TransformAlarmC__0__AlarmFrom__stop() {
%1 = tail call i32 (...) @AtmegaCompareP__0__Alarm__stop()
ret void
}
void A_audioinit() {}


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

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

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

LLVM IR (-O2):
define void @A_audioinit() {
ret void
}
void RTDirExists(void) {}


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

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

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

LLVM IR (-O2):
define void @RTDirExists() {
ret void
}
void swap(char *c1, char *c2) {
  char tmp = *c2;
  *c2 = *c1;
  *c1 = tmp;
}


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

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

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = load i8, i8* %0
store i8 %4, i8* %1
store i8 %3, i8* %0
ret void
}
unsigned addval_187(unsigned x) { return x + 3224948361U; }


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

x86 assembly (clang, -O2):
<addval_187>:
lea    -0x3fc73177(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @addval_187(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, -1070018935
ret i32 %4
}

LLVM IR (-O2):
define i32 @addval_187(i32 %0) {
%2 = add i32 %0, -1070018935
ret i32 %2
}
/* Variables and functions */
scalar_t__ field_exist(char const *, char *);
int get_dimlen(char const *, char *);
int read_mosaic_ncontacts(const char *mosaic_file) {
  int ncontacts;
  if (field_exist(mosaic_file, "contacts"))
    ncontacts = get_dimlen(mosaic_file, "ncontact");
  else
    ncontacts = 0;
  return ncontacts;
}


x86 assembly (clang, -O0):
<read_mosaic_ncontacts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <field_exist@plt>
cmp    $0x0,%rax
je     115e <read_mosaic_ncontacts+0x3e>
mov    -0x8(%rbp),%rdi
lea    0xeb8(%rip),%rsi
call   1040 <get_dimlen@plt>
mov    %eax,-0xc(%rbp)
jmp    1165 <read_mosaic_ncontacts+0x45>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_mosaic_ncontacts>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1030 <field_exist@plt>
test   %rax,%rax
je     1145 <read_mosaic_ncontacts+0x25>
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <get_dimlen@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"contacts\00"
@.str.1 = [9 x i8] c"ncontact\00"
define i32 @read_mosaic_ncontacts(i8* %0) {
%2 = tail call i64 @field_exist(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @get_dimlen(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
char const *opt_find(char const *, char const *);
const char *opt_get_str(const char *group, const char *option) {
  return (opt_find(group, option));
}


x86 assembly (clang, -O0):
<opt_get_str>:
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 <opt_find@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_get_str>:
jmp    1030 <opt_find@plt>

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

LLVM IR (-O2):
define i8* @opt_get_str(i8* %0, i8* %1) {
%3 = tail call i8* @opt_find(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
unsigned int sqrt(unsigned int);
int check(unsigned int n) {
  unsigned int s = sqrt(n);
  if (s * s == n)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sqrt@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1142 <check+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <check+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @check(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @sqrt(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %4
%9 = mul i32 %7, %8
%10 = load i32, i32* %3
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 1, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @check(i32 %0) {
%2 = tail call i32 @sqrt(i32 %0)
%3 = mul i32 %2, %2
%4 = icmp eq i32 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fread_unlocked(void *, size_t, size_t, int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) size_t
softboundcets_fread_unlocked(void *ptr, size_t size, size_t n, FILE *stream) {
  return fread_unlocked(ptr, size, n, stream);
}


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

x86 assembly (clang, -O2):
<softboundcets_fread_unlocked>:
jmp    1030 <fread_unlocked@plt>

LLVM IR (-O0):
define weak i64 @softboundcets_fread_unlocked(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32*, i32** %8
%13 = call i64 @fread_unlocked(i8* %9, i64 %10, i64 %11, i32* %12)
ret i64 %13
}

LLVM IR (-O2):
define weak i64 @softboundcets_fread_unlocked(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = tail call i64 @fread_unlocked(i8* %0, i64 %1, i64 %2, i32* %3)
ret i64 %5
}
int twenty() { return 20; }


x86 assembly (clang, -O0):
<twenty>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @twenty() {
ret i32 20
}

LLVM IR (-O2):
define i32 @twenty() {
ret i32 20
}
/* Variables and functions */
scalar_t__ strlen(char *);
scalar_t__ tolower(int);
void mystrlwr(char *string) {
  register int i;
  ;
  for (i = 0; i < (int)strlen(string); ++i)
    string[i] = (char)tolower((int)string[i]);
}


x86 assembly (clang, -O0):
<mystrlwr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    117c <mystrlwr+0x5c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <mystrlwr+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrlwr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    1161 <mystrlwr+0x41>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1040 <tolower@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <mystrlwr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @mystrlwr(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i64 [ %12, %5 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = tail call i64 @tolower(i32 %9)
%11 = trunc i64 %10 to i8
store i8 %11, i8* %7
%12 = add nuw nsw i64 %6, 1
%13 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%14 = shl i64 %13, 32
%15 = ashr exact i64 %14, 32
%16 = icmp slt i64 %12, %15
br i1 %16, label %5, label %17
17: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int vidattr(int /*<<< orphan*/);
int __darwin_vidattr(uint32_t c) { return vidattr(c); }


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

x86 assembly (clang, -O2):
<__darwin_vidattr>:
jmp    1030 <vidattr@plt>

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

LLVM IR (-O2):
define i32 @__darwin_vidattr(i32 %0) {
%2 = tail call i32 @vidattr(i32 %0)
ret i32 %2
}