xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ quicksort_helper(int /*<<< orphan*/, int, int *);
void quicksort(int N, int arr[N]) { quicksort_helper(0, N - 1, arr); }


x86 assembly (clang, -O0):
<quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
sub    $0x1,%esi
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
call   1030 <quicksort_helper@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort>:
mov    %rsi,%rdx
lea    -0x1(%rdi),%esi
xor    %edi,%edi
jmp    1030 <quicksort_helper@plt>

LLVM IR (-O0):
define void @quicksort(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 1
%9 = load i32*, i32** %4
%10 = call i32 @quicksort_helper(i32 0, i32 %8, i32* %9)
ret void
}

LLVM IR (-O2):
define void @quicksort(i32 %0, i32* %1) {
%3 = add nsw i32 %0, -1
%4 = tail call i32 @quicksort_helper(i32 0, i32 %3, i32* %1)
ret void
}
/* Variables and functions */
scalar_t__ is_category_Cn(unsigned int);
int /*<<< orphan*/ is_property_not_a_character(unsigned int);
bool is_property_unassigned_code_value(unsigned int ch) {
  return (is_category_Cn(ch) && !is_property_not_a_character(ch));
}


x86 assembly (clang, -O0):
<is_property_unassigned_code_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <is_category_Cn@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1158 <is_property_unassigned_code_value+0x38>
mov    -0x4(%rbp),%edi
call   1040 <is_property_not_a_character@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_property_unassigned_code_value>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_category_Cn@plt>
test   %rax,%rax
je     113f <is_property_unassigned_code_value+0x1f>
mov    %ebx,%edi
call   1040 <is_property_not_a_character@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_property_unassigned_code_value(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @is_category_Cn(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @is_property_not_a_character(i32 %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_property_unassigned_code_value(i32 %0) {
%2 = tail call i64 @is_category_Cn(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @is_property_not_a_character(i32 %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
unsigned long long int
unsignedlonglongint_ignoring_signedshort(unsigned long long int x,
                                         signed short y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @unsignedlonglongint_ignoring_signedshort(i64 %0, i16 signext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlonglongint_ignoring_signedshort(i64 returned %0, i16 signext %1) {
ret i64 %0
}
/* Type definitions */
struct const_Multiarray_Matrix_T {
  int dummy;
};
struct Multiarray_Matrix_T {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
print_Multiarray_Matrix_T(struct Multiarray_Matrix_T const *);
void print_const_Multiarray_Matrix_T(
    const struct const_Multiarray_Matrix_T *const a) {
  print_Multiarray_Matrix_T((const struct Multiarray_Matrix_T *)a);
}


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

x86 assembly (clang, -O2):
<print_const_Multiarray_Matrix_T>:
jmp    1030 <print_Multiarray_Matrix_T@plt>

LLVM IR (-O0):
%struct.const_Multiarray_Matrix_T = type { i32 }
%struct.Multiarray_Matrix_T = type { i32 }
define void @print_const_Multiarray_Matrix_T(%struct.const_Multiarray_Matrix_T* %0) {
%2 = alloca %struct.const_Multiarray_Matrix_T*
store %struct.const_Multiarray_Matrix_T* %0, %struct.const_Multiarray_Matrix_T** %2
%3 = load %struct.const_Multiarray_Matrix_T*, %struct.const_Multiarray_Matrix_T** %2
%4 = bitcast %struct.const_Multiarray_Matrix_T* %3 to %struct.Multiarray_Matrix_T*
%5 = call i32 @print_Multiarray_Matrix_T(%struct.Multiarray_Matrix_T* %4)
ret void
}

LLVM IR (-O2):
%struct.const_Multiarray_Matrix_T = type { i32 }
%struct.Multiarray_Matrix_T = type { i32 }
define void @print_const_Multiarray_Matrix_T(%struct.const_Multiarray_Matrix_T* %0) {
%2 = bitcast %struct.const_Multiarray_Matrix_T* %0 to %struct.Multiarray_Matrix_T*
%3 = tail call i32 @print_Multiarray_Matrix_T(%struct.Multiarray_Matrix_T* %2)
ret void
}
void *foo(unsigned long x) {
  (void)x;
  static int bar = 0xfeed;
  return &bar;
}


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

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

LLVM IR (-O0):
@foo.bar = internal global i32 65261
define i8* @foo(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret i8* bitcast (i32* @foo.bar to i8*)
}

LLVM IR (-O2):
@foo.bar = internal global i32 65261
define i8* @foo(i64 %0) {
ret i8* bitcast (i32* @foo.bar to i8*)
}
unsigned xrop3_149_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T & S;
  stk1 = D ^ stk2;
  stk1 = ~stk1;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_149_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_149_0_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
lea    (%rcx,%rdi,1),%r8d
mov    %esi,%eax
shl    $0x8,%eax
lea    (%rax,%rsi,1),%edx
and    %r8d,%edx
xor    %ecx,%edx
not    %edi
and    %esi,%edi
or     %edi,%eax
xor    $0xffffff00,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_149_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = and i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %5
%26 = load i32, i32* %9
%27 = xor i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = and i32 %30, %31
%33 = load i32, i32* %8
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = or i32 %32, %36
%38 = load i32, i32* %7
%39 = load i32, i32* %6
%40 = xor i32 %39, -1
%41 = and i32 %38, %40
%42 = load i32, i32* %5
%43 = and i32 %41, %42
%44 = or i32 %37, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_149_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = or i32 %4, %3
%6 = zext i8 %1 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %6
%9 = and i32 %8, %5
%10 = xor i32 %9, %4
%11 = xor i32 %3, -1
%12 = and i32 %11, %6
%13 = or i32 %7, %12
%14 = xor i32 %13, -256
%15 = or i32 %14, %10
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ expand(char *, char *);
int /*<<< orphan*/ zeroout(char *);
int main(void) {
  char testout[200];
  zeroout(testout);
  expand("a-z0-9", testout);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
lea    -0xd0(%rbp),%rdi
call   1040 <zeroout@plt>
lea    -0xd0(%rbp),%rsi
lea    0xebb(%rip),%rdi
call   1030 <expand@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <zeroout@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <expand@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"a-z0-9\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = call i32 @zeroout(i8* %2)
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%5 = call i32 @expand(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"a-z0-9\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = call i32 @zeroout(i8* %2)
%4 = call i32 @expand(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void amd_pmu_enable_virt(void) {}


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

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

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

LLVM IR (-O2):
define void @amd_pmu_enable_virt() {
ret void
}
/* Variables and functions */
int length(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *string = "1234567890";
  printf("Length of array: %i\n", length(string));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <length@plt>
mov    %eax,%esi
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"1234567890\00"
@.str.1 = [21 x i8] c"Length of array: %i\0A\00"
define i32 @main() {
%1 = alloca i8*
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @length(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"1234567890\00"
@.str.1 = [21 x i8] c"Length of array: %i\0A\00"
define i32 @main() {
%1 = tail call i32 @length(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret i32 0
}
void d(int *f, int *g) {
  int e;
  for (e = 0; e < 2; e++)
    g[e] = 1;
  for (e = 0; e < 2; e++)
    g[e] = f[e] + f[e + 1];
}


x86 assembly (clang, -O0):
<d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    113a <d+0x3a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <d+0x13>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    117f <d+0x7f>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
add    (%rax,%rcx,4),%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1141 <d+0x41>
pop    %rbp
ret

x86 assembly (clang, -O2):
<d>:
movabs $0x100000001,%rax
mov    %rax,(%rsi)
mov    0x4(%rdi),%eax
add    (%rdi),%eax
mov    %eax,(%rsi)
mov    0x8(%rdi),%eax
add    0x4(%rdi),%eax
mov    %eax,0x4(%rsi)
ret

LLVM IR (-O0):
define void @d(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 slt i32 %7, 2
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
store i32 1, i32* %13
br label %14
14: ; preds = %9
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
store i32 %16, i32* %5
br label %6
17: ; preds = %6
store i32 0, i32* %5
br label %18
18: ; preds = %38, %17
%19 = load i32, i32* %5
%20 = icmp slt i32 %19, 2
br i1 %20, label %21, label %41
21: ; preds = %18
%22 = load i32*, i32** %3
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* %22, i64 %24
%26 = load i32, i32* %25
%27 = load i32*, i32** %3
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %27, i64 %30
%32 = load i32, i32* %31
%33 = add nsw i32 %26, %32
%34 = load i32*, i32** %4
%35 = load i32, i32* %5
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i32, i32* %34, i64 %36
store i32 %33, i32* %37
br label %38
38: ; preds = %21
%39 = load i32, i32* %5
%40 = add nsw i32 %39, 1
store i32 %40, i32* %5
br label %18
41: ; preds = %18
ret void
}

LLVM IR (-O2):
define void @d(i32* nocapture %0, i32* nocapture writeonly %1) {
store i32 1, i32* %1
%3 = getelementptr inbounds i32, i32* %1, i64 1
store i32 1, i32* %3
%4 = load i32, i32* %0
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = add nsw i32 %6, %4
store i32 %7, i32* %1
%8 = load i32, i32* %5
%9 = getelementptr inbounds i32, i32* %0, i64 2
%10 = load i32, i32* %9
%11 = add nsw i32 %10, %8
store i32 %11, i32* %3
ret void
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strlib_newstr(const char *string) {
  char *new;
  if ((new = malloc(strlen(string) + 1)))
    strcpy(new, string);
  return (new);
}


x86 assembly (clang, -O0):
<strlib_newstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     116c <strlib_newstr+0x3c>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlib_newstr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <strlib_newstr+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strlib_newstr(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
int main() {
  int vec[] = {52, 13, 12, 14};
  printf("Endereço de vetor %p\n", (void *)vec);
  printf("vec[0] = %p, vec[1] = %p, vec[2] = %p, vec[3] = %p\n",
         (void *)&vec[0], (void *)&vec[1], (void *)&vec[2], (void *)&vec[3]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x10(%rbp),%rsi
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rsi
lea    -0x10(%rbp),%rdx
add    $0x4,%rdx
lea    -0x10(%rbp),%rcx
add    $0x8,%rcx
lea    -0x10(%rbp),%r8
add    $0xc,%r8
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movaps 0xee4(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xee9(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x4(%rsp),%rdx
lea    0x8(%rsp),%rcx
lea    0xc(%rsp),%r8
lea    0xedd(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.vec = [4 x i32] [i32 52, i32 13, i32 12, i32 14]
@.str = [23 x i8] c"Endere\C3\A7o de vetor %p\0A\00"
@.str.1 = [52 x i8] c"vec[0] = %p, vec[1] = %p, vec[2] = %p, vec[3] = %p\0A\00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = bitcast i32* %3 to i8*
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%7 = bitcast i32* %6 to i8*
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
%9 = bitcast i32* %8 to i8*
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%11 = bitcast i32* %10 to i8*
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%13 = bitcast i32* %12 to i8*
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %9, i8* %11, i8* %13)
ret i32 0
}

LLVM IR (-O2):
@__const.main.vec = [4 x i32] [i32 52, i32 13, i32 12, i32 14]
@.str = [23 x i8] c"Endere\C3\A7o de vetor %p\0A\00"
@.str.1 = [52 x i8] c"vec[0] = %p, vec[1] = %p, vec[2] = %p, vec[3] = %p\0A\00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), [4 x i32]* %1)
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), [4 x i32]* %1, i32* %4, i32* %5, i32* %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EPOLL_CLOEXEC;
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ close(int);
int epoll_create1(int /*<<< orphan*/);
int fcntl(int, int /*<<< orphan*/);
int main() {
  int ep = epoll_create1(EPOLL_CLOEXEC);
  int r = fcntl(ep, F_GETFL);
  (void)r;
  close(ep);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1050 <epoll_create1@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e85(%rip),%rax
mov    (%rax),%esi
call   1030 <fcntl@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1050 <epoll_create1@plt>
mov    %eax,%ebx
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1030 <fcntl@plt>
mov    %ebx,%edi
call   1040 <close@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EPOLL_CLOEXEC = global i32 0
@F_GETFL = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @EPOLL_CLOEXEC
%4 = call i32 @epoll_create1(i32 %3)
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = load i32, i32* @F_GETFL
%7 = call i32 @fcntl(i32 %5, i32 %6)
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = call i32 @close(i32 %9)
ret i32 0
}

LLVM IR (-O2):
@EPOLL_CLOEXEC = global i32 0
@F_GETFL = global i32 0
define i32 @main() {
%1 = load i32, i32* @EPOLL_CLOEXEC
%2 = tail call i32 @epoll_create1(i32 %1)
%3 = load i32, i32* @F_GETFL
%4 = tail call i32 @fcntl(i32 %2, i32 %3)
%5 = tail call i32 @close(i32 %2)
ret i32 0
}
int hostapd_init_wps(struct hostapd_data *hapd,
                     struct hostapd_bss_config *conf) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.hostapd_data = type opaque
%struct.hostapd_bss_config = type opaque
define i32 @hostapd_init_wps(%struct.hostapd_data* nocapture readnone %0, %struct.hostapd_bss_config* nocapture readnone %1) {
ret i32 0
}
void c_pomp_critical_begin_(struct ompregdescr *r) { (void)0; }


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

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

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

LLVM IR (-O2):
%struct.ompregdescr = type opaque
define void @c_pomp_critical_begin_(%struct.ompregdescr* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
int szstart() {
  char *msg = "No main here\n";
  write(1, msg, strlen(msg));
  _exit(0);
}


x86 assembly (clang, -O0):
<szstart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<szstart>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"No main here\0A\00"
define i32 @szstart() {
%1 = alloca i8*
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @strlen(i8* %3)
%5 = call i32 @write(i32 1, i8* %2, i32 %4)
%6 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"No main here\0A\00"
define i32 @szstart() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @_exit(i32 0)
unreachable
}
void INT_Excep_PERIB_INTB155(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB155() {
ret void
}
void chrreplace(char *source, char old, char new) {
  while (*source) {
    source++;
    if (source[0] == old)
      source[0] = new;
  }
}


x86 assembly (clang, -O0):
<chrreplace>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <chrreplace+0x4d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    1148 <chrreplace+0x48>
mov    -0xa(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
jmp    1113 <chrreplace+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chrreplace>:
cmpb   $0x0,(%rdi)
je     1126 <chrreplace+0x26>
add    $0x1,%rdi
jmp    1118 <chrreplace+0x18>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdi
test   %al,%al
je     1126 <chrreplace+0x26>
movzbl (%rdi),%eax
cmp    %sil,%al
jne    1110 <chrreplace+0x10>
mov    %dl,(%rdi)
mov    %edx,%eax
jmp    1110 <chrreplace+0x10>
ret

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

LLVM IR (-O2):
define void @chrreplace(i8* nocapture %0, i8 signext %1, i8 signext %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %3, %12
%7 = phi i8* [ %8, %12 ], [ %0, %3 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, %1
br i1 %10, label %11, label %12
11: ; preds = %6
store i8 %2, i8* %8
br label %12
12: ; preds = %11, %6
%13 = phi i8 [ %2, %11 ], [ %9, %6 ]
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %12, %3
ret void
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int *calloc_int(int n) { return (int *)calloc(n, sizeof(int)); }


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

x86 assembly (clang, -O2):
<calloc_int>:
mov    $0x4,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i32* @calloc_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @calloc(i32 %3, i32 4)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}

LLVM IR (-O2):
define i32* @calloc_int(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 4)
%3 = inttoptr i64 %2 to i32*
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ Reset();
void Init() { Reset(); }


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

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

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

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

/* Variables and functions */
int digit_to_int(char);
int /*<<< orphan*/ printf(char *);
void reduce(char *key, char *valuesByKey) {
  printf("Iniciando Reduce\n");
  int sum = 0;
  int i = 0;
  for (i = 0; i < sizeof(valuesByKey) / sizeof(int); i++) {
    sum = +digit_to_int(valuesByKey[i]);
  }
}


x86 assembly (clang, -O0):
<reduce>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x18(%rbp)
movslq -0x18(%rbp),%rax
cmp    $0x2,%rax
jae    1181 <reduce+0x61>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <digit_to_int@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1151 <reduce+0x31>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reduce>:
push   %rbx
mov    %rsi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
movsbl (%rbx),%edi
call   1040 <digit_to_int@plt>
movsbl 0x1(%rbx),%edi
pop    %rbx
jmp    1040 <digit_to_int@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Iniciando Reduce\0A\00"
define void @reduce(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 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %6
br label %8
8: ; preds = %19, %2
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = icmp ult i64 %10, 2
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = load i8*, i8** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = call i32 @digit_to_int(i8 signext %17)
store i32 %18, i32* %5
br label %19
19: ; preds = %12
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %8
22: ; preds = %8
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"Iniciando Reduce\00"
define void @reduce(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%4 = load i8, i8* %1
%5 = tail call i32 @digit_to_int(i8 signext %4)
%6 = getelementptr inbounds i8, i8* %1, i64 1
%7 = load i8, i8* %6
%8 = tail call i32 @digit_to_int(i8 signext %7)
ret void
}
int sse_os_support(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @sse_os_support() {
ret i32 1
}

LLVM IR (-O2):
define i32 @sse_os_support() {
ret i32 1
}
int sys_fstat64(tcp)
struct tcb *tcp;
{
  return printargs(tcp);
}


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

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

LLVM IR (-O0):
%struct.tcb = type opaque
define i32 @sys_fstat64(%struct.tcb* %0) {
%2 = alloca %struct.tcb*
store %struct.tcb* %0, %struct.tcb** %2
%3 = load %struct.tcb*, %struct.tcb** %2
%4 = call i32 (%struct.tcb*, ...) bitcast (i32 (...)* @printargs to i32 (%struct.tcb*, ...)*)(%struct.tcb* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.tcb = type opaque
define i32 @sys_fstat64(%struct.tcb* %0) {
%2 = tail call i32 (%struct.tcb*, ...) bitcast (i32 (...)* @printargs to i32 (%struct.tcb*, ...)*)(%struct.tcb* %0)
ret i32 %2
}
int WIFI_GET_PA_MODE(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @WIFI_GET_PA_MODE() {
ret i32 0
}
char _src_iter_current_char(const char *current) { return *current; }


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

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

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

LLVM IR (-O2):
define signext i8 @_src_iter_current_char(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool errata_103(void) {
  if ((*(uint32_t *)0x10000130ul == 0xAul) &&
      (*(uint32_t *)0x10000134ul == 0x0ul)) {
    return true;
  }
  return true;
}


x86 assembly (clang, -O0):
<errata_103>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000130,%eax
movslq (%rax),%rax
cmp    $0xa,%rax
jne    1134 <errata_103+0x34>
mov    $0x10000134,%eax
movslq (%rax),%rax
cmp    $0x0,%rax
jne    1134 <errata_103+0x34>
movl   $0x1,-0x4(%rbp)
jmp    113b <errata_103+0x3b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @errata_103() {
%1 = alloca i32
%2 = load i32, i32* inttoptr (i64 268435760 to i32*)
%3 = sext i32 %2 to i64
%4 = icmp eq i64 %3, 10
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = load i32, i32* inttoptr (i64 268435764 to i32*)
%7 = sext i32 %6 to i64
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
store i32 1, i32* %1
br label %11
10: ; preds = %5, %0
store i32 1, i32* %1
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @errata_103() {
ret i32 1
}
/* Variables and functions */
float powf(float, float);
float lovrMathGammaToLinear(float x) {
  if (x <= .04045f) {
    return x / 12.92f;
  } else {
    return powf((x + .055f) / 1.055f, 2.4f);
  }
}


x86 assembly (clang, -O0):
<lovrMathGammaToLinear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  0xedb(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     114a <lovrMathGammaToLinear+0x3a>
movss  -0x8(%rbp),%xmm0
movss  0xed4(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1175 <lovrMathGammaToLinear+0x65>
movss  0xeba(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  0xea9(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xe99(%rip),%xmm1
call   1030 <powf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lovrMathGammaToLinear>:
movss  0xee8(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    113a <lovrMathGammaToLinear+0x2a>
addss  0xee3(%rip),%xmm0
divss  0xedf(%rip),%xmm0
movss  0xedb(%rip),%xmm1
jmp    1030 <powf@plt>
divss  0xec2(%rip),%xmm0
ret

LLVM IR (-O0):
define float @lovrMathGammaToLinear(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ole float %4, 0x3FA4B5DCC0000000
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load float, float* %3
%8 = fdiv float %7, 0x4029D70A40000000
store float %8, float* %2
br label %14
9: ; preds = %1
%10 = load float, float* %3
%11 = fadd float %10, 0x3FAC28F5C0000000
%12 = fdiv float %11, 0x3FF0E147A0000000
%13 = call float @powf(float %12, float 0x4003333340000000)
store float %13, float* %2
br label %14
14: ; preds = %9, %6
%15 = load float, float* %2
ret float %15
}

LLVM IR (-O2):
define float @lovrMathGammaToLinear(float %0) {
%2 = fcmp ugt float %0, 0x3FA4B5DCC0000000
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = fdiv float %0, 0x4029D70A40000000
br label %9
5: ; preds = %1
%6 = fadd float %0, 0x3FAC28F5C0000000
%7 = fdiv float %6, 0x3FF0E147A0000000
%8 = tail call float @powf(float %7, float 0x4003333340000000)
br label %9
9: ; preds = %5, %3
%10 = phi float [ %4, %3 ], [ %8, %5 ]
ret float %10
}
/* Type definitions */
typedef int int32_t;
typedef int int16_t;

/* Variables and functions */
int16_t clip(int32_t value) {
  if (value > 0x1ff)
    value = 0x1ff;
  if (value < -0x200)
    value = -0x200;
  return value;
}


x86 assembly (clang, -O0):
<clip>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1ff,-0x4(%rbp)
jle    111b <clip+0x1b>
movl   $0x1ff,-0x4(%rbp)
cmpl   $0xfffffe00,-0x4(%rbp)
jge    112f <clip+0x2f>
movl   $0xfffffe00,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clip>:
cmp    $0x1ff,%edi
mov    $0x1ff,%ecx
cmovl  %edi,%ecx
cmp    $0xfffffe01,%ecx
mov    $0xfffffe00,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @clip(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 511
br i1 %4, label %5, label %6
5: ; preds = %1
store i32 511, i32* %2
br label %6
6: ; preds = %5, %1
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, -512
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 -512, i32* %2
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @clip(i32 %0) {
%2 = icmp slt i32 %0, 511
%3 = select i1 %2, i32 %0, i32 511
%4 = icmp sgt i32 %3, -512
%5 = select i1 %4, i32 %3, i32 -512
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ wmbusParser(char *, int);
void multipleValue(void) {
  wmbusParser("\x01\x03\x01\x02\x04\xFE\xFF",
              sizeof("\x01\x03\x01\x02\x04\xFE\xFF") - 1);
  wmbusParser("\x02\xFB\x30\x01\x00\x02\xFD\x08\x05\x00",
              sizeof("\x02\xFB\x30\x01\x00\x02\xFD\x08\x05\x00") - 1);
}


x86 assembly (clang, -O0):
<multipleValue>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x7,%esi
call   1030 <wmbusParser@plt>
lea    0xedc(%rip),%rdi
mov    $0xa,%esi
call   1030 <wmbusParser@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<multipleValue>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x7,%esi
call   1030 <wmbusParser@plt>
lea    0xedf(%rip),%rdi
mov    $0xa,%esi
pop    %rax
jmp    1030 <wmbusParser@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\01\03\01\02\04\FE\FF\00"
@.str.1 = [11 x i8] c"\02\FB0\01\00\02\FD\08\05\00\00"
define void @multipleValue() {
%1 = call i32 @wmbusParser(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%2 = call i32 @wmbusParser(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 10)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\01\03\01\02\04\FE\FF\00"
@.str.1 = [11 x i8] c"\02\FB0\01\00\02\FD\08\05\00\00"
define void @multipleValue() {
%1 = tail call i32 @wmbusParser(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%2 = tail call i32 @wmbusParser(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_RESPDATA;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_RESPDATA_it;
OCSP_RESPDATA *d2i_OCSP_RESPDATA(OCSP_RESPDATA **a, const unsigned char **in,
                                 long len) {
  return (OCSP_RESPDATA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                        &OCSP_RESPDATA_it);
}


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

x86 assembly (clang, -O2):
<d2i_OCSP_RESPDATA>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@OCSP_RESPDATA_it = global i32 0
define i32* @d2i_OCSP_RESPDATA(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @OCSP_RESPDATA_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@OCSP_RESPDATA_it = global i32 0
define i32* @d2i_OCSP_RESPDATA(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @OCSP_RESPDATA_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
long long int max(long long int a, long long int b) {
  if (a > b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1127 <max+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <max+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
double DSlater_3S_4S(double, double, double);
double DSlater_4S_3S(double rij, double xii, double xij) {
  return DSlater_3S_4S(rij, xij, xii);
}


x86 assembly (clang, -O0):
<DSlater_4S_3S>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
call   1030 <DSlater_3S_4S@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DSlater_4S_3S>:
movaps %xmm1,%xmm3
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <DSlater_3S_4S@plt>

LLVM IR (-O0):
define double @DSlater_4S_3S(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %6
%9 = load double, double* %5
%10 = call double @DSlater_3S_4S(double %7, double %8, double %9)
ret double %10
}

LLVM IR (-O2):
define double @DSlater_4S_3S(double %0, double %1, double %2) {
%4 = tail call double @DSlater_3S_4S(double %0, double %2, double %1)
ret double %4
}
void bind_virq() {}


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

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

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

LLVM IR (-O2):
define void @bind_virq() {
ret void
}
/* Variables and functions */
int strlen(const char *str) {
  size_t len = 0;
  while (str[len])
    len++;
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1133 <strlen+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int snprintf(char *, int, char *, int /*<<< orphan*/);
int big2str(char *str, int64_t num) {
  int n;
  n = snprintf(str, 20, "%lld", num);
  return n == 20 + 1;
}


x86 assembly (clang, -O0):
<big2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x14,%esi
lea    0xece(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x15,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<big2str>:
push   %rax
mov    %esi,%ecx
lea    0xee6(%rip),%rdx
mov    $0x14,%esi
call   1030 <snprintf@plt>
xor    %ecx,%ecx
cmp    $0x15,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
define i32 @big2str(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @snprintf(i8* %6, i32 20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 21
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
define i32 @big2str(i8* %0, i32 %1) {
%3 = tail call i32 @snprintf(i8* %0, i32 20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = icmp eq i32 %3, 21
%5 = zext i1 %4 to i32
ret i32 %5
}
void rotr(int *a, int *b, int *c) {
  int tmp = *a;
  *a = *b;
  *a = *c;
  *c = *b;
  *b = tmp;
}


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

x86 assembly (clang, -O2):
<rotr>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    (%rdx),%ecx
mov    %ecx,(%rdi)
mov    (%rsi),%ecx
mov    %ecx,(%rdx)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @rotr(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
store i32 %5, i32* %0
%6 = load i32, i32* %2
store i32 %6, i32* %0
%7 = load i32, i32* %1
store i32 %7, i32* %2
store i32 %4, i32* %1
ret void
}