xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ m_free_(char *, char *, int);
void utarray_str_dtor(void *elt) {
  char **eltc = (char **)elt;
  if (*eltc)
    (m_free_((*eltc),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/"
             "z88dk/src/z80asm/lib/utarray.h",
             227),
     (*eltc) = NULL);
}


x86 assembly (clang, -O0):
<utarray_str_dtor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1155 <utarray_str_dtor+0x45>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xec0(%rip),%rsi
mov    $0xe3,%edx
call   1030 <m_free_@plt>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utarray_str_dtor>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1134 <utarray_str_dtor+0x24>
lea    0xedd(%rip),%rsi
mov    $0xe3,%edx
call   1030 <m_free_@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [160 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/src/z80asm/lib/utarray.h\00"
define void @utarray_str_dtor(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i8**
store i8** %5, i8*** %3
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
%12 = call i32 @m_free_(i8* %11, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 227)
%13 = load i8**, i8*** %3
store i8* null, i8** %13
br label %14
14: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
@.str = [160 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/src/z80asm/lib/utarray.h\00"
define void @utarray_str_dtor(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @m_free_(i8* %3, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 227)
store i8* null, i8** %2
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
unsigned int MiiStationRead(int, int);
unsigned PhyStatus(void) {
  unsigned status = MiiStationRead(0x11, 1);
  unsigned r = 0;
  if (status & (1 << (0)))
    r |= 0x0001;
  if (status & (1 << (14)))
    r |= 0x0002;
  if (status & (1 << (15)))
    r |= 0x0004;
  return r;
}


x86 assembly (clang, -O0):
<PhyStatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x11,%edi
mov    $0x1,%esi
call   1030 <MiiStationRead@plt>
mov    %eax,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1149 <PhyStatus+0x39>
mov    -0x8(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x4000,%eax
cmp    $0x0,%eax
je     1163 <PhyStatus+0x53>
mov    -0x8(%rbp),%eax
or     $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
je     117d <PhyStatus+0x6d>
mov    -0x8(%rbp),%eax
or     $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PhyStatus>:
push   %rax
mov    $0x11,%edi
mov    $0x1,%esi
call   1030 <MiiStationRead@plt>
mov    %eax,%ecx
and    $0x1,%ecx
shr    $0xd,%eax
mov    %eax,%edx
and    $0x2,%edx
or     %ecx,%edx
and    $0x4,%eax
or     %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @PhyStatus() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @MiiStationRead(i32 17, i32 1)
store i32 %3, i32* %1
store i32 0, i32* %2
%4 = load i32, i32* %1
%5 = and i32 %4, 1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %2
%9 = or i32 %8, 1
store i32 %9, i32* %2
br label %10
10: ; preds = %7, %0
%11 = load i32, i32* %1
%12 = and i32 %11, 16384
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i32, i32* %2
%16 = or i32 %15, 2
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %10
%18 = load i32, i32* %1
%19 = and i32 %18, 32768
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = load i32, i32* %2
%23 = or i32 %22, 4
store i32 %23, i32* %2
br label %24
24: ; preds = %21, %17
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @PhyStatus() {
%1 = tail call i32 @MiiStationRead(i32 17, i32 1)
%2 = and i32 %1, 1
%3 = lshr i32 %1, 13
%4 = and i32 %3, 2
%5 = or i32 %4, %2
%6 = and i32 %3, 4
%7 = or i32 %5, %6
ret i32 %7
}
double planet_radius_in_meters(const int planet_idx) { return (6378140.); }


x86 assembly (clang, -O0):
<planet_radius_in_meters>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  0xef1(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<planet_radius_in_meters>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @planet_radius_in_meters(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret double 6.378140e+06
}

LLVM IR (-O2):
define double @planet_radius_in_meters(i32 %0) {
ret double 6.378140e+06
}
/* Variables and functions */
int randomNetF();
int randomInt(int min, int max) {
  return (int)(randomNetF() * (max - min + 1) + min);
}


x86 assembly (clang, -O0):
<randomInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <randomNetF@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomInt>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <randomNetF@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
imul   %ebx,%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @randomInt(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @randomNetF()
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = mul nsw i32 %5, %9
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @randomInt(i32 %0, i32 %1) {
%3 = tail call i32 (...) @randomNetF()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = mul nsw i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *const);
scalar_t__ strpbrk(char const *const, char *);
int filenameValid(char const *const aFileNameWithoutPath) {
  if (!aFileNameWithoutPath || !strlen(aFileNameWithoutPath) ||
      strpbrk(aFileNameWithoutPath, "\\/:*?\"<>|")) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<filenameValid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1163 <filenameValid+0x43>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
je     1163 <filenameValid+0x43>
mov    -0x10(%rbp),%rdi
lea    0xeac(%rip),%rsi
call   1040 <strpbrk@plt>
cmp    $0x0,%rax
je     116f <filenameValid+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1176 <filenameValid+0x56>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filenameValid>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
test   %rdi,%rdi
je     114e <filenameValid+0x2e>
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %eax,%eax
je     114e <filenameValid+0x2e>
lea    0xec3(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strpbrk@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"\\/:*?\22<>|\00"
define i32 @filenameValid(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = call i64 @strpbrk(i8* %11, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %10, %6, %1
store i32 0, i32* %2
br label %16
15: ; preds = %10
store i32 1, i32* %2
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@.str = [10 x i8] c"\\/:*?\22<>|\00"
define i32 @filenameValid(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 @strpbrk(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %1, %3
%11 = phi i32 [ 0, %3 ], [ 0, %1 ], [ %9, %6 ]
ret i32 %11
}
__attribute__((section(".myfunc"))) void bink(void) {}


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

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

LLVM IR (-O0):
define void @bink() section ".myfunc" {
ret void
}

LLVM IR (-O2):
define void @bink() section ".myfunc" {
ret void
}
/* Variables and functions */
size_t strlen(char const *const);
size_t fi_strlen(const char *const s) { return (!s) ? 0 : strlen(s); }


x86 assembly (clang, -O0):
<fi_strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1132 <fi_strlen+0x22>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    113f <fi_strlen+0x2f>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fi_strlen>:
test   %rdi,%rdi
je     111a <fi_strlen+0xa>
jmp    1030 <strlen@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @fi_strlen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @strlen(i8* %7)
br label %9
9: ; preds = %6, %5
%10 = phi i64 [ 0, %5 ], [ %8, %6 ]
ret i64 %10
}

LLVM IR (-O2):
define i64 @fi_strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i64 [ %4, %3 ], [ 0, %1 ]
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *progname) {
  printf("\nUsage: %s grib_file\n", progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [22 x i8] c"\0AUsage: %s grib_file\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [22 x i8] c"\0AUsage: %s grib_file\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void *mem_malloc_func(size_t);
void *mem_malloc(size_t size) {
  if (size == 0)
    return 0;
  return mem_malloc_func(size);
}


x86 assembly (clang, -O0):
<mem_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <mem_malloc+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1141 <mem_malloc+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <mem_malloc_func@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_malloc>:
test   %rdi,%rdi
je     111a <mem_malloc+0xa>
jmp    1030 <mem_malloc_func@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @mem_malloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* null, i8** %2
br label %10
7: ; preds = %1
%8 = load i64, i64* %3
%9 = call i8* @mem_malloc_func(i64 %8)
store i8* %9, i8** %2
br label %10
10: ; preds = %7, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
define i8* @mem_malloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @mem_malloc_func(i64 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
const char *f_lowethan() { return "<"; }


x86 assembly (clang, -O0):
<f_lowethan>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_lowethan>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"<\00"
define i8* @f_lowethan() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [2 x i8] c"<\00"
define i8* @f_lowethan() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
void ti_sleep(unsigned int millisec) { usleep(millisec * 1000); }


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

x86 assembly (clang, -O2):
<ti_sleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @ti_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @ti_sleep(i32 %0) {
%2 = mul i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
int a(int a) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @a(i32 %0) {
ret i32 0
}
utol(l, u) char l[];
unsigned u;
{
  itol(l, u & 0x7FFF);
  if (u > 0x7FFF)
    l[2] += 0x80;
  return (l);
}


x86 assembly (clang, -O0):
<utol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
and    $0x7fff,%esi
mov    $0x0,%al
call   1030 <itol@plt>
cmpl   $0x7fff,-0xc(%rbp)
jbe    1151 <utol+0x41>
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%ecx
add    $0x80,%ecx
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utol>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
and    $0x7fff,%esi
xor    %eax,%eax
call   1030 <itol@plt>
cmp    $0x8000,%ebp
jb     1131 <utol+0x21>
xorb   $0x80,0x2(%rbx)
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @utol(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = and i32 %6, 32767
%8 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @itol to i32 (i8*, i32, ...)*)(i8* %5, i32 %7)
%9 = load i32, i32* %4
%10 = icmp ugt i32 %9, 32767
br i1 %10, label %11, label %18
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = add nsw i32 %15, 128
%17 = trunc i32 %16 to i8
store i8 %17, i8* %13
br label %18
18: ; preds = %11, %2
%19 = load i8*, i8** %3
%20 = ptrtoint i8* %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @utol(i8* %0, i32 %1) {
%3 = and i32 %1, 32767
%4 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @itol to i32 (i8*, i32, ...)*)(i8* %0, i32 %3)
%5 = icmp ugt i32 %1, 32767
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %0, i64 2
%8 = load i8, i8* %7
%9 = xor i8 %8, -128
store i8 %9, i8* %7
br label %10
10: ; preds = %6, %2
%11 = ptrtoint i8* %0 to i64
%12 = trunc i64 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void alarm_handler(int signo) {
  printf("Received alarm\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<alarm_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alarm_handler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Received alarm\0A\00"
@stdout = global i32 0
define void @alarm_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [15 x i8] c"Received alarm\00"
define void @alarm_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_create_polyhedral_homotopy(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(101, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_create_polyhedral_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x65,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_create_polyhedral_homotopy>:
mov    $0x65,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @celcon_create_polyhedral_homotopy() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 101, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_create_polyhedral_homotopy() {
%1 = tail call i32 @_ada_use_c2phc(i32 101, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void clustalfree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<clustalfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @clustalfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct jx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ jx_boolean(int);
int /*<<< orphan*/ jx_insert(struct jx *, int /*<<< orphan*/,
                             int /*<<< orphan*/);
int /*<<< orphan*/ jx_string(char const *);
void jx_insert_boolean(struct jx *j, const char *key, int value) {
  jx_insert(j, jx_string(key), jx_boolean(value));
}


x86 assembly (clang, -O0):
<jx_insert_boolean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <jx_string@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <jx_boolean@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    %eax,%edx
call   1030 <jx_insert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jx_insert_boolean>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1050 <jx_string@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <jx_boolean@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <jx_insert@plt>

LLVM IR (-O0):
%struct.jx = type { i32 }
define void @jx_insert_boolean(%struct.jx* %0, i8* %1, i32 %2) {
%4 = alloca %struct.jx*
%5 = alloca i8*
%6 = alloca i32
store %struct.jx* %0, %struct.jx** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.jx*, %struct.jx** %4
%8 = load i8*, i8** %5
%9 = call i32 @jx_string(i8* %8)
%10 = load i32, i32* %6
%11 = call i32 @jx_boolean(i32 %10)
%12 = call i32 @jx_insert(%struct.jx* %7, i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.jx = type { i32 }
define void @jx_insert_boolean(%struct.jx* %0, i8* %1, i32 %2) {
%4 = tail call i32 @jx_string(i8* %1)
%5 = tail call i32 @jx_boolean(i32 %2)
%6 = tail call i32 @jx_insert(%struct.jx* %0, i32 %4, i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int av_popcount_c(int /*<<< orphan*/);
int av_parity_c(uint32_t v) { return av_popcount_c(v) & 1; }


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

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

LLVM IR (-O0):
define i32 @av_parity_c(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @av_popcount_c(i32 %3)
%5 = and i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @av_parity_c(i32 %0) {
%2 = tail call i32 @av_popcount_c(i32 %0)
%3 = and i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print_input_form(char *, char *, int);
int /*<<< orphan*/ print_line(char *);
int main(void) {
  char str[256] = {0};
  print_input_form("str: ", str, 256);
  print_line(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1040 <memset@plt>
lea    -0x110(%rbp),%rsi
lea    0xe9d(%rip),%rdi
mov    $0x100,%edx
call   1050 <print_input_form@plt>
lea    -0x110(%rbp),%rdi
call   1030 <print_line@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x100,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xe67(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0x100,%edx
call   1040 <print_input_form@plt>
mov    %rbx,%rdi
call   1030 <print_line@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"str: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [256 x i8]
store i32 0, i32* %1
%3 = bitcast [256 x i8]* %2 to i8*
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%5 = call i32 @print_input_form(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4, i32 256)
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%7 = call i32 @print_line(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"str: \00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @print_input_form(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2, i32 256)
%4 = call i32 @print_line(i8* %2)
ret i32 0
}
/* Variables and functions */
int errno;
scalar_t__ read(int, char *, size_t);
int primread(int fildes, char buf[], int nbyte) {
  int n = (int)read(fildes, buf, (size_t)nbyte);
  if (n == -1) {
    return -errno;
  }
  return n;
}


x86 assembly (clang, -O0):
<primread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rdx
call   1030 <read@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1152 <primread+0x42>
xor    %eax,%eax
mov    0x2e98(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <primread+0x48>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primread>:
push   %rax
movslq %edx,%rdx
call   1030 <read@plt>
mov    0x2ec0(%rip),%rcx
xor    %edx,%edx
sub    (%rcx),%edx
cmp    $0xffffffff,%eax
cmove  %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @primread(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = sext i32 %11 to i64
%13 = call i64 @read(i32 %9, i8* %10, i64 %12)
%14 = trunc i64 %13 to i32
store i32 %14, i32* %8
%15 = load i32, i32* %8
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %20
17: ; preds = %3
%18 = load i32, i32* @errno
%19 = sub nsw i32 0, %18
store i32 %19, i32* %4
br label %22
20: ; preds = %3
%21 = load i32, i32* %8
store i32 %21, i32* %4
br label %22
22: ; preds = %20, %17
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @primread(i32 %0, i8* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = tail call i64 @read(i32 %0, i8* %1, i64 %4)
%6 = trunc i64 %5 to i32
%7 = icmp eq i32 %6, -1
%8 = load i32, i32* @errno
%9 = sub nsw i32 0, %8
%10 = select i1 %7, i32 %9, i32 %6
ret i32 %10
}
/* Variables and functions */
scalar_t__ isspace(char);
int find_alpha_count(char *str) {
  int cnt = 0;
  char *s = str;
  while (*s) {
    if (isspace(*s))
      s++, cnt++;
    else
      break;
  }
  return cnt;
}


x86 assembly (clang, -O0):
<find_alpha_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1172 <find_alpha_count+0x62>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1168 <find_alpha_count+0x58>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116d <find_alpha_count+0x5d>
jmp    1172 <find_alpha_count+0x62>
jmp    112b <find_alpha_count+0x1b>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_alpha_count>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     113d <find_alpha_count+0x2d>
mov    %rdi,%r14
xor    %ebx,%ebx
nop
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     113f <find_alpha_count+0x2f>
movzbl 0x1(%r14,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <find_alpha_count+0x10>
jmp    113f <find_alpha_count+0x2f>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @find_alpha_count(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %10
%5 = phi i8 [ %13, %10 ], [ %2, %1 ]
%6 = phi i8* [ %11, %10 ], [ %0, %1 ]
%7 = phi i32 [ %12, %10 ], [ 0, %1 ]
%8 = tail call i64 @isspace(i8 signext %5)
%9 = icmp eq i64 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %4
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = add nuw nsw i32 %7, 1
%13 = load i8, i8* %11
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %10, %4, %1
%16 = phi i32 [ 0, %1 ], [ %7, %4 ], [ %12, %10 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ do_send(int, char *);
void japi_get_graminfo(int sd) { do_send(sd, "GRAMINFO\n"); }


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

x86 assembly (clang, -O2):
<japi_get_graminfo>:
lea    0xee9(%rip),%rsi
jmp    1030 <do_send@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"GRAMINFO\0A\00"
define void @japi_get_graminfo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @do_send(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"GRAMINFO\0A\00"
define void @japi_get_graminfo(i32 %0) {
%2 = tail call i32 @do_send(i32 %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)());
int /*<<< orphan*/ tbl(int, char **);
int main(int argc, char *argv[]) {
  extern init_options();
  void badsig(void);
  signal(SIGPIPE, badsig);
  init_options();
  exit(tbl(argc, argv));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
mov    0x2e6a(%rip),%rsi
call   1050 <signal@plt>
mov    $0x0,%al
call   1030 <init_options@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <tbl@plt>
mov    %eax,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
mov    0x2e78(%rip),%rsi
call   1050 <signal@plt>
xor    %eax,%eax
call   1030 <init_options@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <tbl@plt>
mov    %eax,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@SIGPIPE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @SIGPIPE
%7 = call i32 @signal(i32 %6, void (...)* bitcast (void ()* @badsig to void (...)*))
%8 = call i32 (...) @init_options()
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
%11 = call i32 @tbl(i32 %9, i8** %10)
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@SIGPIPE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = load i32, i32* @SIGPIPE
%4 = tail call i32 @signal(i32 %3, void (...)* bitcast (void ()* @badsig to void (...)*))
%5 = tail call i32 (...) @init_options()
%6 = tail call i32 @tbl(i32 %0, i8** %1)
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpeq_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_loadu_si128(int /*<<< orphan*/ *);
int _mm_movemask_epi8(int /*<<< orphan*/);
int foo(void *p1, void *p2) {
  __m128i d1 = _mm_loadu_si128((__m128i *)p1);
  __m128i d2 = _mm_loadu_si128((__m128i *)p2);
  __m128i result = _mm_cmpeq_epi16(d1, d2);
  return _mm_movemask_epi8(result);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_mm_loadu_si128@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <_mm_loadu_si128@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <_mm_cmpeq_epi16@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1050 <_mm_movemask_epi8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <_mm_loadu_si128@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <_mm_loadu_si128@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <_mm_cmpeq_epi16@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <_mm_movemask_epi8@plt>

LLVM IR (-O0):
define i32 @foo(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = call i32 @_mm_loadu_si128(i32* %9)
store i32 %10, i32* %5
%11 = load i8*, i8** %4
%12 = bitcast i8* %11 to i32*
%13 = call i32 @_mm_loadu_si128(i32* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @_mm_cmpeq_epi16(i32 %14, i32 %15)
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = call i32 @_mm_movemask_epi8(i32 %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @foo(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32*
%4 = tail call i32 @_mm_loadu_si128(i32* %3)
%5 = bitcast i8* %1 to i32*
%6 = tail call i32 @_mm_loadu_si128(i32* %5)
%7 = tail call i32 @_mm_cmpeq_epi16(i32 %4, i32 %6)
%8 = tail call i32 @_mm_movemask_epi8(i32 %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int, int /*<<< orphan*/);
const char *cJSON_Version(void) {
  static char version[15];
  sprintf(version, "%i.%i.%i", 1, 6, 0);
  return version;
}


x86 assembly (clang, -O0):
<cJSON_Version>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f0e(%rip),%rdi
lea    0xede(%rip),%rsi
mov    $0x1,%edx
mov    $0x6,%ecx
xor    %r8d,%r8d
call   1030 <sprintf@plt>
lea    0x2eee(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cJSON_Version>:
push   %rbx
lea    0x2f11(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1,%edx
mov    $0x6,%ecx
xor    %r8d,%r8d
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@cJSON_Version.version = internal global [15 x i8] zeroinitializer
@.str = [9 x i8] c"%i.%i.%i\00"
define i8* @cJSON_Version() {
%1 = call i32 @sprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @cJSON_Version.version, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1, i32 6, i32 0)
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @cJSON_Version.version, i64 0, i64 0)
}

LLVM IR (-O2):
@cJSON_Version.version = internal global [15 x i8] zeroinitializer
@.str = [9 x i8] c"%i.%i.%i\00"
define i8* @cJSON_Version() {
%1 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @cJSON_Version.version, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1, i32 6, i32 0)
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @cJSON_Version.version, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ gain_control(unsigned int, unsigned int, unsigned int);
void gain_control_all(unsigned int rx_power_fil_dB, unsigned int card) {
  unsigned int ant;
  for (ant = 0; ant < 4; ant++)
    gain_control(rx_power_fil_dB, ant, card);
}


x86 assembly (clang, -O0):
<gain_control_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jae    114b <gain_control_all+0x3b>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <gain_control@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <gain_control_all+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gain_control_all>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %esi,%esi
mov    %ebx,%edx
call   1030 <gain_control@plt>
mov    %ebp,%edi
mov    $0x1,%esi
mov    %ebx,%edx
call   1030 <gain_control@plt>
mov    %ebp,%edi
mov    $0x2,%esi
mov    %ebx,%edx
call   1030 <gain_control@plt>
mov    %ebp,%edi
mov    $0x3,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <gain_control@plt>

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

LLVM IR (-O2):
define void @gain_control_all(i32 %0, i32 %1) {
%3 = tail call i32 @gain_control(i32 %0, i32 0, i32 %1)
%4 = tail call i32 @gain_control(i32 %0, i32 1, i32 %1)
%5 = tail call i32 @gain_control(i32 %0, i32 2, i32 %1)
%6 = tail call i32 @gain_control(i32 %0, i32 3, i32 %1)
ret void
}
void SetIndividual(int x, int y, int val, int *Array) {
  Array[x + (10000 * y)] = val;
}


x86 assembly (clang, -O0):
<SetIndividual>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    -0x4(%rbp),%ecx
imul   $0x2710,-0x8(%rbp),%esi
add    %esi,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetIndividual>:
imul   $0x2710,%esi,%eax
add    %edi,%eax
cltq
mov    %edx,(%rcx,%rax,4)
ret

LLVM IR (-O0):
define void @SetIndividual(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i32, i32* %7
%10 = load i32*, i32** %8
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = mul nsw i32 10000, %12
%14 = add nsw i32 %11, %13
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %10, i64 %15
store i32 %9, i32* %16
ret void
}

LLVM IR (-O2):
define void @SetIndividual(i32 %0, i32 %1, i32 %2, i32* nocapture writeonly %3) {
%5 = mul nsw i32 %1, 10000
%6 = add nsw i32 %5, %0
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %3, i64 %7
store i32 %2, i32* %8
ret void
}
/* Variables and functions */
float __nv_fdimf(float, float);
float fdimf(float __a, float __b) { return __nv_fdimf(__a, __b); }


x86 assembly (clang, -O0):
<fdimf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__nv_fdimf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdimf>:
jmp    1030 <__nv_fdimf@plt>

LLVM IR (-O0):
define float @fdimf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @__nv_fdimf(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @fdimf(float %0, float %1) {
%3 = tail call float @__nv_fdimf(float %0, float %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void msffree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<msffree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @msffree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int tputs(char *string, int nlines, int (*outfun)()) {
  while (*string)
    outfun(*string++);
  return 0;
}


x86 assembly (clang, -O0):
<tputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113f <tputs+0x3f>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rax),%edi
mov    $0x0,%al
call   *%rcx
jmp    1113 <tputs+0x13>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tputs>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1133 <tputs+0x33>
mov    %rdx,%r14
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
xor    %eax,%eax
call   *%r14
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <tputs+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @tputs(i8* nocapture %0, i32 %1, i32 (...)* nocapture %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %3
%7 = bitcast i32 (...)* %2 to i32 (i32, ...)*
br label %8
8: ; preds = %6, %8
%9 = phi i8 [ %4, %6 ], [ %14, %8 ]
%10 = phi i8* [ %0, %6 ], [ %11, %8 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = sext i8 %9 to i32
%13 = tail call i32 (i32, ...) %7(i32 %12)
%14 = load i8, i8* %11
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %8
16: ; preds = %8, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glClearColor(float, float, float, float);
int /*<<< orphan*/ gluOrtho2D(int /*<<< orphan*/, int, int /*<<< orphan*/, int);
void setup() {
  glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
  gluOrtho2D(0, 599, 0, 799);
}


x86 assembly (clang, -O0):
<setup>:
push   %rbp
mov    %rsp,%rbp
movss  0xed4(%rip),%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1030 <glClearColor@plt>
xor    %edx,%edx
mov    $0x257,%esi
mov    $0x31f,%ecx
mov    %edx,%edi
call   1040 <gluOrtho2D@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup>:
push   %rax
movss  0xed7(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
movaps %xmm0,%xmm3
call   1030 <glClearColor@plt>
xor    %edi,%edi
mov    $0x257,%esi
xor    %edx,%edx
mov    $0x31f,%ecx
pop    %rax
jmp    1040 <gluOrtho2D@plt>

LLVM IR (-O0):
define void @setup() {
%1 = call i32 @glClearColor(float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%2 = call i32 @gluOrtho2D(i32 0, i32 599, i32 0, i32 799)
ret void
}

LLVM IR (-O2):
define void @setup() {
%1 = tail call i32 @glClearColor(float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%2 = tail call i32 @gluOrtho2D(i32 0, i32 599, i32 0, i32 799)
ret void
}
int compare_function(const void *a, const void *b) {
  int *x = (int *)a;
  int *y = (int *)b;
  return *x - *y;
}


x86 assembly (clang, -O0):
<compare_function>:
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
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @compare_function(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @compare_function(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}
adrreg0adr1_set(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (p0[10000000]) = (*((float *)(11111111 & ~(__alignof__(float) - 1)))); }


x86 assembly (clang, -O0):
<adrreg0adr1_set>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    $0xa98ac4,%eax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x2625a00(%rax)
02
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0adr1_set>:
movss  0xa98ac4,%xmm0
movss  %xmm0,0x2625a00(%rdx)
02
ret

LLVM IR (-O0):
define i32 @adrreg0adr1_set(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float, float* inttoptr (i64 11111108 to float*)
%17 = load float*, float** %12
%18 = getelementptr inbounds float, float* %17, i64 10000000
store float %16, float* %18
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @adrreg0adr1_set(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture readnone %5) {
%7 = load float, float* inttoptr (i64 11111108 to float*)
%8 = getelementptr inbounds float, float* %4, i64 10000000
store float %7, float* %8
ret i32 undef
}
void dm_warn(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @dm_warn(i8* nocapture %0, ...) {
ret void
}