xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
int /*<<< orphan*/ scanf(char *, long long *, long long *);
int main() {
  long long int a, b, i, n, total = 0;
  scanf("%lld%lld", &a, &b);
  i = a + b;
  n = b - a + 1;
  total = i * n;
  printf("%lld\n", total / 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x30(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
imul   -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,%rsi
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x10(%rsp),%rax
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,1),%rdx
sub    %rax,%rcx
add    $0x1,%rcx
imul   %rdx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
add    %rcx,%rsi
sar    %rsi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%lld%lld\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %6
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64* %2, i64* %3)
%8 = load i64, i64* %2
%9 = load i64, i64* %3
%10 = add nsw i64 %8, %9
store i64 %10, i64* %4
%11 = load i64, i64* %3
%12 = load i64, i64* %2
%13 = sub nsw i64 %11, %12
%14 = add nsw i64 %13, 1
store i64 %14, i64* %5
%15 = load i64, i64* %4
%16 = load i64, i64* %5
%17 = mul nsw i64 %15, %16
store i64 %17, i64* %6
%18 = load i64, i64* %6
%19 = sdiv i64 %18, 2
%20 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%lld%lld\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
%4 = bitcast i64* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2)
%6 = load i64, i64* %1
%7 = load i64, i64* %2
%8 = add nsw i64 %7, %6
%9 = sub i64 1, %6
%10 = add i64 %9, %7
%11 = mul nsw i64 %8, %10
%12 = sdiv i64 %11, 2
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fb_write(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void print(char *buf) { fb_write(buf, strlen(buf)); }


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

x86 assembly (clang, -O2):
<print>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <fb_write@plt>

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

LLVM IR (-O2):
define void @print(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @fb_write(i8* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long long);
int read_msr(int, int, unsigned long long *);
void dump_mtrr(int cpu, int msr) {
  unsigned long long val = 0;
  if (read_msr(cpu, msr, &val) == 1)
    printf("0x%016llx\n", val);
}


x86 assembly (clang, -O0):
<dump_mtrr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0x10(%rbp),%rdx
call   1040 <read_msr@plt>
cmp    $0x1,%eax
jne    115e <dump_mtrr+0x3e>
mov    -0x10(%rbp),%rsi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_mtrr>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rdx
call   1040 <read_msr@plt>
cmp    $0x1,%eax
jne    1146 <dump_mtrr+0x26>
mov    (%rsp),%rsi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"0x%016llx\0A\00"
define void @dump_mtrr(i32 %0, i32 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%5 = call i32 @read_msr(i32 %0, i32 %1, i64* %3)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i64, i64* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %8)
br label %10
10: ; preds = %7, %2
ret void
}
/* Variables and functions */
int asprintf(char **, char *, char const *, char const *);
char *ltr_int_my_strcat(const char *str1, const char *str2) {
  char *res = NULL;
  if (asprintf(&res, "%s%s", str1, str2) != -1) {
    return res;
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<ltr_int_my_strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x20(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1030 <asprintf@plt>
cmp    $0xffffffff,%eax
je     1156 <ltr_int_my_strcat+0x46>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115e <ltr_int_my_strcat+0x4e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltr_int_my_strcat>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
movq   $0x0,(%rsp)
lea    0xeda(%rip),%rsi
mov    %rsp,%rdi
call   1030 <asprintf@plt>
cmp    $0xffffffff,%eax
je     1139 <ltr_int_my_strcat+0x29>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
define i8* @ltr_int_my_strcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @asprintf(i8** %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = icmp eq i32 %5, -1
%7 = load i8*, i8** %3
%8 = select i1 %6, i8* null, i8* %7
ret i8* %8
}
void bucketSort(double vetor[], int n) {}


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

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

LLVM IR (-O0):
define void @bucketSort(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @bucketSort(double* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tab(double tabs) {
  for (int i = 0; i < tabs; i++) {
    printf("");
  }
}


x86 assembly (clang, -O0):
<tab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1152 <tab+0x42>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <tab+0x14>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @tab(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %1
%5 = load i32, i32* %3
%6 = sitofp i32 %5 to double
%7 = load double, double* %2
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = call i32 @printf(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @tab(double %0) {
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void SysCtlLDOSleepSet(uint32_t ui32Voltage) {

  ;
  (*((volatile unsigned long *)(0x400FE1B4))) = ui32Voltage;
}


x86 assembly (clang, -O0):
<SysCtlLDOSleepSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x400fe1b4,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlLDOSleepSet>:
mov    %rdi,0x400fe1b4
40
ret

LLVM IR (-O0):
define void @SysCtlLDOSleepSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074782644 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlLDOSleepSet(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1074782644 to i64*)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int write_integers_to_defined_output_file(int n, int *a) {
  int i, fail;
  double *c;
  fail = _ada_use_c2phc(159, &n, a, c);
  return fail;
}


x86 assembly (clang, -O0):
<write_integers_to_defined_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x9f,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_integers_to_defined_output_file>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x9f,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @write_integers_to_defined_output_file(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%8 = load i32*, i32** %4
%9 = load double*, double** %7
%10 = call i32 @_ada_use_c2phc(i32 159, i32* %3, i32* %8, double* %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
ret i32 %11
}

LLVM IR (-O2):
define i32 @write_integers_to_defined_output_file(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 159, i32* %3, i32* %1, double* undef)
ret i32 %4
}
signed int bkdr_hash(char *str) {
  unsigned int seed = 131;
  unsigned int hash = 0;
  while (*str) {
    hash = hash * seed + (*str++);
  }
  return (hash & 0x7FFFFFFF);
}


x86 assembly (clang, -O0):
<bkdr_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x83,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <bkdr_hash+0x46>
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <bkdr_hash+0x16>
mov    -0x10(%rbp),%eax
and    $0x7fffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bkdr_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <bkdr_hash+0x2c>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
imul   $0x83,%eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <bkdr_hash+0x10>
and    $0x7fffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @bkdr_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 131
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = add i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = and i32 %11, 2147483647
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Type definitions */
struct pavl_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
void **pavl_probe(struct pavl_table *, void *);
void(pavl_assert_insert)(struct pavl_table *table, void *item) {
  void **p = pavl_probe(table, item);
  assert(p != NULL && *p == item);
}


x86 assembly (clang, -O0):
<pavl_assert_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <pavl_probe@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x18(%rbp)
mov    %al,-0x19(%rbp)
je     1162 <pavl_assert_insert+0x42>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pavl_assert_insert>:
push   %rbx
mov    %rsi,%rbx
call   1030 <pavl_probe@plt>
xor    %edi,%edi
test   %rax,%rax
je     1137 <pavl_assert_insert+0x17>
cmp    %rbx,(%rax)
sete   %dil
pop    %rbx
jmp    1040 <assert@plt>

LLVM IR (-O0):
%struct.pavl_table = type { i32 }
define void @pavl_assert_insert(%struct.pavl_table* %0, i8* %1) {
%3 = alloca %struct.pavl_table*
%4 = alloca i8*
%5 = alloca i8**
store %struct.pavl_table* %0, %struct.pavl_table** %3
store i8* %1, i8** %4
%6 = load %struct.pavl_table*, %struct.pavl_table** %3
%7 = load i8*, i8** %4
%8 = call i8** @pavl_probe(%struct.pavl_table* %6, i8* %7)
store i8** %8, i8*** %5
%9 = load i8**, i8*** %5
%10 = icmp ne i8** %9, null
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
%14 = load i8*, i8** %4
%15 = icmp eq i8* %13, %14
br label %16
16: ; preds = %11, %2
%17 = phi i1 [ false, %2 ], [ %15, %11 ]
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
ret void
}

LLVM IR (-O2):
%struct.pavl_table = type { i32 }
define void @pavl_assert_insert(%struct.pavl_table* %0, i8* %1) {
%3 = tail call i8** @pavl_probe(%struct.pavl_table* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %1
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
%11 = tail call i32 @assert(i32 %10)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int initialize_dobldobl_monodromy(int n, int d, int k) {
  int fail;
  double *c;
  int dk[2];
  dk[0] = d;
  dk[1] = k;
  fail = _ada_use_c2phc(640, &n, dk, c);
  return fail;
}


x86 assembly (clang, -O0):
<initialize_dobldobl_monodromy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x280,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_dobldobl_monodromy>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    $0x280,%edi
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @initialize_dobldobl_monodromy(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca [2 x i32]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %5
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
store i32 %12, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
%15 = load double*, double** %8
%16 = call i32 @_ada_use_c2phc(i32 640, i32* %4, i32* %14, double* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @initialize_dobldobl_monodromy(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca [2 x i32]
store i32 %0, i32* %4
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %1, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %2, i32* %8
%9 = call i32 @_ada_use_c2phc(i32 640, i32* %4, i32* %7, double* undef)
ret i32 %9
}
/* Variables and functions */
unsigned int countbits(unsigned int);
unsigned int floorlog2(unsigned int x) {
  x |= x >> 1;
  x |= x >> 2;
  x |= x >> 4;
  x |= x >> 8;
  x |= x >> 16;
  return countbits(x >> 1);
}


x86 assembly (clang, -O0):
<floorlog2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
shr    $0x1,%edi
call   1030 <countbits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floorlog2>:
mov    %edi,%eax
shr    %eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x2,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x8,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x11,%eax
shr    %edi
or     %eax,%edi
jmp    1030 <countbits@plt>

LLVM IR (-O0):
define i32 @floorlog2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 1
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = lshr i32 %7, 2
%9 = load i32, i32* %2
%10 = or i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = lshr i32 %11, 4
%13 = load i32, i32* %2
%14 = or i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = lshr i32 %15, 8
%17 = load i32, i32* %2
%18 = or i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = lshr i32 %19, 16
%21 = load i32, i32* %2
%22 = or i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = lshr i32 %23, 1
%25 = call i32 @countbits(i32 %24)
ret i32 %25
}

LLVM IR (-O2):
define i32 @floorlog2(i32 %0) {
%2 = lshr i32 %0, 1
%3 = or i32 %2, %0
%4 = lshr i32 %3, 2
%5 = or i32 %4, %3
%6 = lshr i32 %5, 4
%7 = or i32 %6, %5
%8 = lshr i32 %7, 8
%9 = or i32 %8, %7
%10 = lshr i32 %9, 17
%11 = lshr i32 %9, 1
%12 = or i32 %10, %11
%13 = tail call i32 @countbits(i32 %12)
ret i32 %13
}
/* Variables and functions */
scalar_t__ COND_HI();
int /*<<< orphan*/ EA_AY_AI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_shi_8_ai(void) {
  m68ki_write_8(EA_AY_AI_8(), COND_HI() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_shi_8_ai>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <EA_AY_AI_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <COND_HI@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_shi_8_ai>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <EA_AY_AI_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <COND_HI@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_shi_8_ai() {
%1 = call i32 (...) @EA_AY_AI_8()
%2 = call i64 (...) @COND_HI()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_shi_8_ai() {
%1 = tail call i32 (...) @EA_AY_AI_8()
%2 = tail call i64 (...) @COND_HI()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void h264sps_set_profile(uint8_t *p_h264sps, uint8_t i_profile) {
  p_h264sps[4] = i_profile;
}


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

x86 assembly (clang, -O2):
<h264sps_set_profile>:
mov    %esi,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @h264sps_set_profile(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %1, i32* %3
ret void
}
void lgtd_lifx_gateway_handle_pan_gateway(
    struct lgtd_lifx_gateway *gw, const struct lgtd_lifx_packet_header *hdr,
    const struct lgtd_lifx_packet_pan_gateway *pkt) {
  (void)gw;
  (void)hdr;
  (void)pkt;
}


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

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

LLVM IR (-O0):
%struct.lgtd_lifx_gateway = type opaque
%struct.lgtd_lifx_packet_header = type opaque
%struct.lgtd_lifx_packet_pan_gateway = type opaque
define void @lgtd_lifx_gateway_handle_pan_gateway(%struct.lgtd_lifx_gateway* %0, %struct.lgtd_lifx_packet_header* %1, %struct.lgtd_lifx_packet_pan_gateway* %2) {
%4 = alloca %struct.lgtd_lifx_gateway*
%5 = alloca %struct.lgtd_lifx_packet_header*
%6 = alloca %struct.lgtd_lifx_packet_pan_gateway*
store %struct.lgtd_lifx_gateway* %0, %struct.lgtd_lifx_gateway** %4
store %struct.lgtd_lifx_packet_header* %1, %struct.lgtd_lifx_packet_header** %5
store %struct.lgtd_lifx_packet_pan_gateway* %2, %struct.lgtd_lifx_packet_pan_gateway** %6
%7 = load %struct.lgtd_lifx_gateway*, %struct.lgtd_lifx_gateway** %4
%8 = load %struct.lgtd_lifx_packet_header*, %struct.lgtd_lifx_packet_header** %5
%9 = load %struct.lgtd_lifx_packet_pan_gateway*, %struct.lgtd_lifx_packet_pan_gateway** %6
ret void
}

LLVM IR (-O2):
%struct.lgtd_lifx_gateway = type opaque
%struct.lgtd_lifx_packet_header = type opaque
%struct.lgtd_lifx_packet_pan_gateway = type opaque
define void @lgtd_lifx_gateway_handle_pan_gateway(%struct.lgtd_lifx_gateway* nocapture %0, %struct.lgtd_lifx_packet_header* nocapture %1, %struct.lgtd_lifx_packet_pan_gateway* nocapture %2) {
ret void
}
int getdate_yyerror(const char *s) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @getdate_yyerror(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int evaluateBoolExpression(char *expression) {
  assert(expression != NULL);
  return 0;
}


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

x86 assembly (clang, -O2):
<evaluateBoolExpression>:
push   %rax
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
mov    %eax,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @evaluateBoolExpression(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @evaluateBoolExpression(i8* readnone %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret i32 0
}
long arithmetic_sequence_sum(long start, long end, long step) {
  if (end <= start)
    return 0;
  long count = 1 + (end - start - 1) / step;
  long last = start + (count - 1) * step;
  return count * (start + last) / 2;
}


x86 assembly (clang, -O0):
<arithmetic_sequence_sum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jg     112b <arithmetic_sequence_sum+0x2b>
movq   $0x0,-0x8(%rbp)
jmp    117b <arithmetic_sequence_sum+0x7b>
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
sub    $0x1,%rax
cqto
idivq  -0x20(%rbp)
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
sub    $0x1,%rcx
imul   -0x20(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    -0x30(%rbp),%rcx
imul   %rcx,%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arithmetic_sequence_sum>:
cmp    %rdi,%rsi
jle    1124 <arithmetic_sequence_sum+0x24>
mov    %rdx,%rcx
mov    %rdi,%rax
not    %rax
add    %rsi,%rax
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1127 <arithmetic_sequence_sum+0x27>
cqto
idiv   %rcx
jmp    112b <arithmetic_sequence_sum+0x2b>
xor    %eax,%eax
ret
xor    %edx,%edx
div    %ecx
lea    0x1(%rax),%rdx
imul   %rax,%rcx
lea    (%rcx,%rdi,2),%rcx
imul   %rdx,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
add    %rcx,%rax
sar    %rax
ret

LLVM IR (-O0):
define i64 @arithmetic_sequence_sum(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%10 = load i64, i64* %6
%11 = load i64, i64* %5
%12 = icmp sle i64 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %3
store i64 0, i64* %4
br label %34
14: ; preds = %3
%15 = load i64, i64* %6
%16 = load i64, i64* %5
%17 = sub nsw i64 %15, %16
%18 = sub nsw i64 %17, 1
%19 = load i64, i64* %7
%20 = sdiv i64 %18, %19
%21 = add nsw i64 1, %20
store i64 %21, i64* %8
%22 = load i64, i64* %5
%23 = load i64, i64* %8
%24 = sub nsw i64 %23, 1
%25 = load i64, i64* %7
%26 = mul nsw i64 %24, %25
%27 = add nsw i64 %22, %26
store i64 %27, i64* %9
%28 = load i64, i64* %8
%29 = load i64, i64* %5
%30 = load i64, i64* %9
%31 = add nsw i64 %29, %30
%32 = mul nsw i64 %28, %31
%33 = sdiv i64 %32, 2
store i64 %33, i64* %4
br label %34
34: ; preds = %14, %13
%35 = load i64, i64* %4
ret i64 %35
}

LLVM IR (-O2):
define i64 @arithmetic_sequence_sum(i64 %0, i64 %1, i64 %2) {
%4 = icmp sgt i64 %1, %0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = xor i64 %0, -1
%7 = add i64 %6, %1
%8 = sdiv i64 %7, %2
%9 = add nsw i64 %8, 1
%10 = mul nsw i64 %8, %2
%11 = shl i64 %0, 1
%12 = add i64 %10, %11
%13 = mul nsw i64 %12, %9
%14 = sdiv i64 %13, 2
br label %15
15: ; preds = %3, %5
%16 = phi i64 [ %14, %5 ], [ 0, %3 ]
ret i64 %16
}
int fun193() { return 193; }


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

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

LLVM IR (-O0):
define i32 @fun193() {
ret i32 193
}

LLVM IR (-O2):
define i32 @fun193() {
ret i32 193
}
/* Type definitions */
struct cdaAli {
  int dummy;
};

/* Variables and functions */
int cdaCloneIsReverse(struct cdaAli *);
char cdaDirChar(struct cdaAli *cda, char chromStrand) {
  int isReverse = cdaCloneIsReverse(cda);
  if (chromStrand == '-')
    isReverse = !isReverse;
  return (isReverse ? '<' : '>');
}


x86 assembly (clang, -O0):
<cdaDirChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cdaCloneIsReverse@plt>
mov    %eax,-0x10(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x2d,%eax
jne    114c <cdaDirChar+0x3c>
cmpl   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    $0x3e,%eax
mov    $0x3c,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdaDirChar>:
push   %rbx
mov    %esi,%ebx
call   1030 <cdaCloneIsReverse@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
cmp    $0x2d,%bl
cmovne %eax,%ecx
test   %ecx,%ecx
sete   %al
add    %al,%al
or     $0x3c,%al
pop    %rbx
ret

LLVM IR (-O0):
%struct.cdaAli = type { i32 }
define signext i8 @cdaDirChar(%struct.cdaAli* %0, i8 signext %1) {
%3 = alloca %struct.cdaAli*
%4 = alloca i8
%5 = alloca i32
store %struct.cdaAli* %0, %struct.cdaAli** %3
store i8 %1, i8* %4
%6 = load %struct.cdaAli*, %struct.cdaAli** %3
%7 = call i32 @cdaCloneIsReverse(%struct.cdaAli* %6)
store i32 %7, i32* %5
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* %5
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
store i32 %15, i32* %5
br label %16
16: ; preds = %11, %2
%17 = load i32, i32* %5
%18 = icmp ne i32 %17, 0
%19 = zext i1 %18 to i64
%20 = select i1 %18, i32 60, i32 62
%21 = trunc i32 %20 to i8
ret i8 %21
}

LLVM IR (-O2):
%struct.cdaAli = type { i32 }
define signext i8 @cdaDirChar(%struct.cdaAli* %0, i8 signext %1) {
%3 = tail call i32 @cdaCloneIsReverse(%struct.cdaAli* %0)
%4 = icmp eq i8 %1, 45
%5 = icmp eq i32 %3, 0
%6 = zext i1 %5 to i32
%7 = select i1 %4, i32 %6, i32 %3
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i8 62, i8 60
ret i8 %9
}
/* Variables and functions */
int /*<<< orphan*/ mxm(double const *, unsigned int *, double const *,
                       unsigned int *, double *, unsigned int *);
void tensor_mtxv(double *y, unsigned int ny, const double *A, const double *x,
                 unsigned int nx) {
  unsigned int one = 1;
  mxm(x, &one, A, &nx, y, &ny);
}


x86 assembly (clang, -O0):
<tensor_mtxv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
movl   $0x1,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%r8
lea    -0x28(%rbp),%rsi
lea    -0x24(%rbp),%rcx
lea    -0xc(%rbp),%r9
call   1030 <mxm@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tensor_mtxv>:
sub    $0x18,%rsp
mov    %rdi,%rax
mov    %esi,0x14(%rsp)
mov    %r8d,0x10(%rsp)
movl   $0x1,0xc(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%r8
lea    0x14(%rsp),%r9
mov    %rcx,%rdi
mov    %r8,%rcx
mov    %rax,%r8
call   1030 <mxm@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @tensor_mtxv(double* %0, i32 %1, double* %2, double* %3, i32 %4) {
%6 = alloca double*
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca i32
store double* %0, double** %6
store i32 %1, i32* %7
store double* %2, double** %8
store double* %3, double** %9
store i32 %4, i32* %10
store i32 1, i32* %11
%12 = load double*, double** %9
%13 = load double*, double** %8
%14 = load double*, double** %6
%15 = call i32 @mxm(double* %12, i32* %11, double* %13, i32* %10, double* %14, i32* %7)
ret void
}

LLVM IR (-O2):
define void @tensor_mtxv(double* %0, i32 %1, double* %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %1, i32* %6
store i32 %4, i32* %7
%9 = bitcast i32* %8 to i8*
store i32 1, i32* %8
%10 = call i32 @mxm(double* %3, i32* %8, double* %2, i32* %7, double* %0, i32* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OutputToLog(int, char *);
int InvalidEntryErrorOutput() {
  OutputToLog(((1) | (2) | (4)),
              "Invalid DNS answer detected while calculating TTL");
  return 0;
}


x86 assembly (clang, -O0):
<InvalidEntryErrorOutput>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
lea    0xee0(%rip),%rsi
call   1030 <OutputToLog@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<InvalidEntryErrorOutput>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x7,%edi
call   1030 <OutputToLog@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Invalid DNS answer detected while calculating TTL\00"
define i32 @InvalidEntryErrorOutput() {
%1 = call i32 @OutputToLog(i32 7, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [50 x i8] c"Invalid DNS answer detected while calculating TTL\00"
define i32 @InvalidEntryErrorOutput() {
%1 = tail call i32 @OutputToLog(i32 7, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int test_imm_D8int64_midword_reg(long long val) {
  return ((val >> 16) & (0xD8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D8int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0xd8,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D8int64_midword_reg>:
test   $0xd80000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D8int64_midword_reg(i64 %0) {
%2 = and i64 %0, 14155776
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void Clean_Frame(unsigned char *Frame, int Height, int Width) {
  int I;
  for (I = 0; I < Width * Height; I++) {
    Frame[3 * I] = Frame[3 * I + 1] = Frame[3 * I + 2] = 0;
  }
}


x86 assembly (clang, -O0):
<Clean_Frame>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    1168 <Clean_Frame+0x68>
mov    -0x8(%rbp),%rax
imul   $0x3,-0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
imul   $0x3,-0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
imul   $0x3,-0x14(%rbp),%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <Clean_Frame+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Clean_Frame>:
imul   %edx,%esi
test   %esi,%esi
jle    1129 <Clean_Frame+0x19>
push   %rax
mov    %esi,%eax
lea    (%rax,%rax,2),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @Clean_Frame(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = mul i32 %2, %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = zext i32 %4 to i64
%8 = mul nuw nsw i64 %7, 3
br label %9
9: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ perror(char const *);
void system_error(const char *message) { perror(message); }


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

x86 assembly (clang, -O2):
<system_error>:
jmp    1030 <perror@plt>

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

LLVM IR (-O2):
define void @system_error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_HIF_SetReg8(int, unsigned char);
void VIM_JPEG_WritetHtable(unsigned char byData) {
  VIM_HIF_SetReg8((0x0000 + 0x01E), byData);
}


x86 assembly (clang, -O0):
<VIM_JPEG_WritetHtable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1e,%edi
movzbl -0x1(%rbp),%esi
call   1030 <VIM_HIF_SetReg8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_JPEG_WritetHtable>:
mov    %edi,%esi
mov    $0x1e,%edi
jmp    1030 <VIM_HIF_SetReg8@plt>

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

LLVM IR (-O2):
define void @VIM_JPEG_WritetHtable(i8 zeroext %0) {
%2 = tail call i32 @VIM_HIF_SetReg8(i32 30, i8 zeroext %0)
ret void
}
void debug_dma_map_single(struct device *dev, const void *addr,
                          unsigned long len) {}


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

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

LLVM IR (-O0):
%struct.device = type opaque
define void @debug_dma_map_single(%struct.device* %0, i8* %1, i64 %2) {
%4 = alloca %struct.device*
%5 = alloca i8*
%6 = alloca i64
store %struct.device* %0, %struct.device** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
ret void
}

LLVM IR (-O2):
%struct.device = type opaque
define void @debug_dma_map_single(%struct.device* nocapture %0, i8* nocapture %1, i64 %2) {
ret void
}
void kheap_initialize(void) {}


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

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

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

LLVM IR (-O2):
define void @kheap_initialize() {
ret void
}
int ipp_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ipp_shutdown() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ digitalWrite(int, int);
int /*<<< orphan*/ usDelay(int);
void C(void) {
  digitalWrite(29, 1);
  usDelay(7000);
  digitalWrite(29, 0);
  usDelay(51000);
}


x86 assembly (clang, -O0):
<C>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1d,%edi
mov    $0x1,%esi
call   1030 <digitalWrite@plt>
mov    $0x1b58,%edi
call   1040 <usDelay@plt>
mov    $0x1d,%edi
xor    %esi,%esi
call   1030 <digitalWrite@plt>
mov    $0xc738,%edi
call   1040 <usDelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<C>:
push   %rax
mov    $0x1d,%edi
mov    $0x1,%esi
call   1030 <digitalWrite@plt>
mov    $0x1b58,%edi
call   1040 <usDelay@plt>
mov    $0x1d,%edi
xor    %esi,%esi
call   1030 <digitalWrite@plt>
mov    $0xc738,%edi
pop    %rax
jmp    1040 <usDelay@plt>

LLVM IR (-O0):
define void @C() {
%1 = call i32 @digitalWrite(i32 29, i32 1)
%2 = call i32 @usDelay(i32 7000)
%3 = call i32 @digitalWrite(i32 29, i32 0)
%4 = call i32 @usDelay(i32 51000)
ret void
}

LLVM IR (-O2):
define void @C() {
%1 = tail call i32 @digitalWrite(i32 29, i32 1)
%2 = tail call i32 @usDelay(i32 7000)
%3 = tail call i32 @digitalWrite(i32 29, i32 0)
%4 = tail call i32 @usDelay(i32 51000)
ret void
}
int main() { return 1UL <= 0UL; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
unsigned int part(unsigned char *, unsigned int);
void sortq(unsigned char *buf, unsigned n) {
  if (n < 2)
    return;
  unsigned m = part(buf, n);
  sortq(buf, m);
  sortq(buf + m + 1, n - m - 1);
}


x86 assembly (clang, -O0):
<sortq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jae    113e <sortq+0x1e>
jmp    1175 <sortq+0x55>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <part@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <sortq@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%eax
add    %rax,%rdi
add    $0x1,%rdi
mov    -0xc(%rbp),%esi
sub    -0x10(%rbp),%esi
sub    $0x1,%esi
call   1030 <sortq@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sortq>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%esi
jb     115b <sortq+0x3b>
mov    %esi,%r14d
mov    %rdi,%rbx
nop
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <part@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <sortq@plt>
mov    %ebp,%eax
add    %rax,%rbx
add    $0x1,%rbx
not    %ebp
add    %ebp,%r14d
cmp    $0x1,%r14d
ja     1130 <sortq+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @sortq(i8* %0, i32 %1) {
%3 = icmp ult i32 %1, 2
br i1 %3, label %14, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %12, %4 ], [ %1, %2 ]
%6 = phi i8* [ %10, %4 ], [ %0, %2 ]
%7 = tail call i32 @part(i8* %6, i32 %5)
tail call void @sortq(i8* %6, i32 %7)
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = getelementptr inbounds i8, i8* %9, i64 %8
%11 = xor i32 %7, -1
%12 = add i32 %5, %11
%13 = icmp ult i32 %12, 2
br i1 %13, label %14, label %4
14: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int uint32_t;
struct pcg_state_64 {
  int dummy;
};

/* Variables and functions */
int pcg_mcg_64_xsh_rs_32_random_r(struct pcg_state_64 *);
uint32_t pcg_mcg_64_xsh_rs_32_boundedrand_r(struct pcg_state_64 *rng,
                                            uint32_t bound) {
  uint32_t threshold = -bound % bound;
  for (;;) {
    uint32_t r = pcg_mcg_64_xsh_rs_32_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_mcg_64_xsh_rs_32_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_mcg_64_xsh_rs_32_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_mcg_64_xsh_rs_32_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_mcg_64_xsh_rs_32_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_mcg_64_xsh_rs_32_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_mcg_64_xsh_rs_32_random_r@plt>
test   %eax,%eax
js     1120 <pcg_mcg_64_xsh_rs_32_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_64 = type { i32 }
define i32 @pcg_mcg_64_xsh_rs_32_boundedrand_r(%struct.pcg_state_64* %0, i32 %1) {
%3 = alloca %struct.pcg_state_64*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_64* %0, %struct.pcg_state_64** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_64*, %struct.pcg_state_64** %3
%13 = call i32 @pcg_mcg_64_xsh_rs_32_random_r(%struct.pcg_state_64* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_64 = type { i32 }
define i32 @pcg_mcg_64_xsh_rs_32_boundedrand_r(%struct.pcg_state_64* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_mcg_64_xsh_rs_32_random_r(%struct.pcg_state_64* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
void av_opt_flag_is_set() {}


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

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

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

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