xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(void *args) {
  if (args == NULL)
    printf("Chamou callback\n");
  else
    printf("Chamou callback %d\n", *(int *)args);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113a <print+0x2a>
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    114e <print+0x3e>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
test   %rdi,%rdi
je     1135 <print+0x15>
mov    (%rdi),%esi
lea    0xed2(%rip),%rdi
xor    %eax,%eax
jmp    1040 <printf@plt>
lea    0xed8(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str.1 = [20 x i8] c"Chamou callback %d\0A\00"
@str = [16 x i8] c"Chamou callback\00"
define void @print(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %9
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = load i32, i32* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %5, %3
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ lbearing;
};
typedef TYPE_1__ XCharStruct;

/* Variables and functions */
short get_XCharStruct_lbearing(void *_p) {
  return (short)((XCharStruct *)_p)->lbearing;
}


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

x86 assembly (clang, -O2):
<get_XCharStruct_lbearing>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define signext i16 @get_XCharStruct_lbearing(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define signext i16 @get_XCharStruct_lbearing(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long, unsigned long);
void time_tick_used(unsigned long t2, unsigned long t1) {
  printf("Use Ticks:%llu,Use Time:%.9f\n", (t2 - t1),
         (t2 - t1) * 1.0 / 2000000000);
}


x86 assembly (clang, -O0):
<time_tick_used>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
sub    %rax,%rsi
movq   %rsi,%xmm0
movaps 0xec9(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0xecd(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xec6(%rip),%xmm1
divsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rdx
mov    %rdx,%rcx
sar    $0x3f,%rcx
movsd  0xeb3(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
and    %rcx,%rax
or     %rax,%rdx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_tick_used>:
mov    %rdi,%rax
sub    %rsi,%rax
movq   %rax,%xmm0
punpckldq 0xedd(%rip),%xmm0
subpd  0xee5(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
divsd  0xee1(%rip),%xmm1
cvttsd2si %xmm1,%rcx
mov    %rcx,%rsi
subsd  0xed9(%rip),%xmm1
cvttsd2si %xmm1,%rdx
sar    $0x3f,%rsi
and    %rsi,%rdx
or     %rcx,%rdx
lea    0xecb(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Use Ticks:%llu,Use Time:%.9f\0A\00"
define void @time_tick_used(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub i64 %5, %6
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = sub i64 %8, %9
%11 = uitofp i64 %10 to double
%12 = fmul double %11, 1.000000e+00
%13 = fdiv double %12, 2.000000e+09
%14 = fptoui double %13 to i64
%15 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 %7, i64 %14)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Use Ticks:%llu,Use Time:%.9f\0A\00"
define void @time_tick_used(i64 %0, i64 %1) {
%3 = sub i64 %0, %1
%4 = uitofp i64 %3 to double
%5 = fdiv double %4, 2.000000e+09
%6 = fptoui double %5 to i64
%7 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 %3, i64 %6)
ret void
}
/* Variables and functions */
int _deq(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _f2d(int);
int _feq(int a, int b) { return _deq(_f2d(a), _f2d(b)); }


x86 assembly (clang, -O0):
<_feq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <_f2d@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <_f2d@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1030 <_deq@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_feq>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1040 <_f2d@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <_f2d@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_deq@plt>

LLVM IR (-O0):
define i32 @_feq(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 = call i32 @_f2d(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @_f2d(i32 %7)
%9 = call i32 @_deq(i32 %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @_feq(i32 %0, i32 %1) {
%3 = tail call i32 @_f2d(i32 %0)
%4 = tail call i32 @_f2d(i32 %1)
%5 = tail call i32 @_deq(i32 %3, i32 %4)
ret i32 %5
}
/* Variables and functions */
scalar_t__ isspace(char);
scalar_t__ strlenzero(char *);
extern char *ltrim(char *str) {
  char *cur = str;
  if (strlenzero(str)) {
    return (str);
  }
  while (isspace(cur[0])) {
    cur++;
  }
  return (cur);
}


x86 assembly (clang, -O0):
<ltrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlenzero@plt>
cmp    $0x0,%rax
je     1154 <ltrim+0x34>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1188 <ltrim+0x68>
jmp    1159 <ltrim+0x39>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1180 <ltrim+0x60>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1159 <ltrim+0x39>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltrim>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlenzero@plt>
test   %rax,%rax
jne    1152 <ltrim+0x32>
add    $0xffffffffffffffff,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1140 <ltrim+0x20>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ltrim(i8* %0) {
%2 = tail call i64 @strlenzero(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1, %4
%5 = phi i8* [ %9, %4 ], [ %0, %1 ]
%6 = load i8, i8* %5
%7 = tail call i64 @isspace(i8 signext %6)
%8 = icmp eq i64 %7, 0
%9 = getelementptr inbounds i8, i8* %5, i64 1
br i1 %8, label %10, label %4
10: ; preds = %4, %1
%11 = phi i8* [ %0, %1 ], [ %5, %4 ]
ret i8* %11
}
/* Variables and functions */
char *getenv(const char *name) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @getenv(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
char tolower(char);
char *string_tolower(char *str) {
  char *str_p = str;
  while (*str_p != '\0') {
    *str_p = tolower(*str_p);
    ++str_p;
  }
  return str;
}


x86 assembly (clang, -O0):
<string_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1159 <string_tolower+0x49>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <string_tolower+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_tolower>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1146 <string_tolower+0x36>
lea    0x1(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <string_tolower+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @string_tolower(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @tolower(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ printw(char *, char *);
int /*<<< orphan*/ refresh();
void collpartmesg2(char name[10]) {
  move(8, 63);
  printw("%s ", name);
  refresh();
}


x86 assembly (clang, -O0):
<collpartmesg2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x8,%edi
mov    $0x3f,%esi
call   1050 <move@plt>
mov    -0x8(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printw@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<collpartmesg2>:
push   %rbx
mov    %rdi,%rbx
mov    $0x8,%edi
mov    $0x3f,%esi
call   1050 <move@plt>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printw@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <refresh@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
define void @collpartmesg2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @move(i32 8, i32 63)
%4 = load i8*, i8** %2
%5 = call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define void @collpartmesg2(i8* %0) {
%2 = tail call i32 @move(i32 8, i32 63)
%3 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @refresh()
ret void
}
/* Variables and functions */
int _pack2(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ cosf(unsigned short);
int /*<<< orphan*/ roundf(int /*<<< orphan*/);
int /*<<< orphan*/ sinf(unsigned short);
unsigned cis_fun_ushort(unsigned short t) {
  return _pack2(roundf(cosf(t)), roundf(sinf(t)));
}


x86 assembly (clang, -O0):
<cis_fun_ushort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%ax
movzwl %ax,%edi
call   1050 <cosf@plt>
mov    %eax,%edi
call   1060 <roundf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x2(%rbp),%ax
movzwl %ax,%edi
call   1030 <sinf@plt>
mov    %eax,%edi
call   1060 <roundf@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <_pack2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cis_fun_ushort>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1050 <cosf@plt>
mov    %eax,%edi
call   1060 <roundf@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <sinf@plt>
mov    %eax,%edi
call   1060 <roundf@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <_pack2@plt>

LLVM IR (-O0):
define i32 @cis_fun_ushort(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @cosf(i16 zeroext %3)
%5 = call i32 @roundf(i32 %4)
%6 = load i16, i16* %2
%7 = call i32 @sinf(i16 zeroext %6)
%8 = call i32 @roundf(i32 %7)
%9 = call i32 @_pack2(i32 %5, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @cis_fun_ushort(i16 zeroext %0) {
%2 = tail call i32 @cosf(i16 zeroext %0)
%3 = tail call i32 @roundf(i32 %2)
%4 = tail call i32 @sinf(i16 zeroext %0)
%5 = tail call i32 @roundf(i32 %4)
%6 = tail call i32 @_pack2(i32 %3, i32 %5)
ret i32 %6
}
void gtk_about_dialog_get_logo() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ KEY_INODE(struct bkey const *);
int /*<<< orphan*/ KEY_OFFSET(struct bkey const *);
int /*<<< orphan*/ SET_KEY_INODE(struct bkey *, int /*<<< orphan*/);
int /*<<< orphan*/ SET_KEY_OFFSET(struct bkey *, int /*<<< orphan*/);
void bkey_copy_key(struct bkey *dest, const struct bkey *src) {
  SET_KEY_INODE(dest, KEY_INODE(src));
  SET_KEY_OFFSET(dest, KEY_OFFSET(src));
}


x86 assembly (clang, -O0):
<bkey_copy_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <KEY_INODE@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1030 <SET_KEY_INODE@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <KEY_OFFSET@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1060 <SET_KEY_OFFSET@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bkey_copy_key>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1050 <KEY_INODE@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <SET_KEY_INODE@plt>
mov    %rbx,%rdi
call   1040 <KEY_OFFSET@plt>
mov    %r14,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <SET_KEY_OFFSET@plt>

LLVM IR (-O0):
%struct.bkey = type { i32 }
define void @bkey_copy_key(%struct.bkey* %0, %struct.bkey* %1) {
%3 = alloca %struct.bkey*
%4 = alloca %struct.bkey*
store %struct.bkey* %0, %struct.bkey** %3
store %struct.bkey* %1, %struct.bkey** %4
%5 = load %struct.bkey*, %struct.bkey** %3
%6 = load %struct.bkey*, %struct.bkey** %4
%7 = call i32 @KEY_INODE(%struct.bkey* %6)
%8 = call i32 @SET_KEY_INODE(%struct.bkey* %5, i32 %7)
%9 = load %struct.bkey*, %struct.bkey** %3
%10 = load %struct.bkey*, %struct.bkey** %4
%11 = call i32 @KEY_OFFSET(%struct.bkey* %10)
%12 = call i32 @SET_KEY_OFFSET(%struct.bkey* %9, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.bkey = type { i32 }
define void @bkey_copy_key(%struct.bkey* %0, %struct.bkey* %1) {
%3 = tail call i32 @KEY_INODE(%struct.bkey* %1)
%4 = tail call i32 @SET_KEY_INODE(%struct.bkey* %0, i32 %3)
%5 = tail call i32 @KEY_OFFSET(%struct.bkey* %1)
%6 = tail call i32 @SET_KEY_OFFSET(%struct.bkey* %0, i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ A_BOLD;
int /*<<< orphan*/ wadd_attr_str(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                 char const *);
void waddstr_b(WINDOW *win, const char *s) { wadd_attr_str(win, A_BOLD, s); }


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

x86 assembly (clang, -O2):
<waddstr_b>:
mov    %rsi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
jmp    1030 <wadd_attr_str@plt>

LLVM IR (-O0):
@A_BOLD = global i32 0
define void @waddstr_b(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* @A_BOLD
%7 = load i8*, i8** %4
%8 = call i32 @wadd_attr_str(i32* %5, i32 %6, i8* %7)
ret void
}

LLVM IR (-O2):
@A_BOLD = global i32 0
define void @waddstr_b(i32* %0, i8* %1) {
%3 = load i32, i32* @A_BOLD
%4 = tail call i32 @wadd_attr_str(i32* %0, i32 %3, i8* %1)
ret void
}
void mlx5e_dcbnl_build_rep_netdev(struct net_device *netdev) {}


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

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

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

LLVM IR (-O2):
%struct.net_device = type opaque
define void @mlx5e_dcbnl_build_rep_netdev(%struct.net_device* nocapture %0) {
ret void
}
int test_imm_16int64_lowword_mem(long long *val) {
  return ((*val) & (0x16 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_16int64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 22
%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_16int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 22
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void g_source_set_priority() {}


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

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

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

LLVM IR (-O2):
define void @g_source_set_priority() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t vi_reg(uint32_t address) { return (address & 0xffff) >> 2; }


x86 assembly (clang, -O0):
<vi_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
sar    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vi_reg>:
mov    %edi,%eax
shr    $0x2,%eax
and    $0x3fff,%eax
ret

LLVM IR (-O0):
define i32 @vi_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65535
%5 = ashr i32 %4, 2
ret i32 %5
}

LLVM IR (-O2):
define i32 @vi_reg(i32 %0) {
%2 = lshr i32 %0, 2
%3 = and i32 %2, 16383
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void elm_std_free(void *ptr) {
  char **ref = ptr;
  free(*ref);
  *ref = NULL;
}


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

x86 assembly (clang, -O2):
<elm_std_free>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @elm_std_free(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i8**
store i8** %5, i8*** %3
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = call i32 @free(i8* %7)
%9 = load i8**, i8*** %3
store i8* null, i8** %9
ret void
}

LLVM IR (-O2):
define void @elm_std_free(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
store i8* null, i8** %2
ret void
}
char const *greet(void) { return "Sto mu gromova!"; }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Sto mu gromova!\00"
define i8* @greet() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"Sto mu gromova!\00"
define i8* @greet() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct xcryptorADT {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct xcryptorADT *);
void xc_destroy(struct xcryptorADT *xcryptor) { free(xcryptor); }


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

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

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

LLVM IR (-O2):
%struct.xcryptorADT = type { i32 }
define void @xc_destroy(%struct.xcryptorADT* nocapture %0) {
%2 = tail call i32 @free(%struct.xcryptorADT* %0)
ret void
}
void XTextWidth() {}


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

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

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

LLVM IR (-O2):
define void @XTextWidth() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int foo() {
  bar();
  return 1;
}


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

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 (...) @bar()
ret i32 1
}
int main() { return 1UL > 0UL; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
float sqrtf(double);
double rsqrtf(double x) { return 1.0f / sqrtf(x); }


x86 assembly (clang, -O0):
<rsqrtf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  0xece(%rip),%xmm0
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsqrtf>:
push   %rax
call   1030 <sqrtf@plt>
movss  0xee2(%rip),%xmm1
divss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rsqrtf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call float @sqrtf(double %3)
%5 = fdiv float 1.000000e+00, %4
%6 = fpext float %5 to double
ret double %6
}

LLVM IR (-O2):
define double @rsqrtf(double %0) {
%2 = tail call float @sqrtf(double %0)
%3 = fdiv float 1.000000e+00, %2
%4 = fpext float %3 to double
ret double %4
}
void avio_close_dyn_buf() {}


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

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

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

LLVM IR (-O2):
define void @avio_close_dyn_buf() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void repeatme(int i) { printf("hello %d\n", i); }


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

x86 assembly (clang, -O2):
<repeatme>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"hello %d\0A\00"
define void @repeatme(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
void usage(char *name) {
  fprintf(stdout, "Usage: %s ID_min ID_max outfile.mc\n", name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [36 x i8] c"Usage: %s ID_min ID_max outfile.mc\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [36 x i8] c"Usage: %s ID_min ID_max outfile.mc\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ matNd_mult_vecNd_new(double *, double const *, double *,
                                        int const);
void matNd_mult_vecNd(double vector[], const double matrix[], const int n) {
  matNd_mult_vecNd_new(vector, matrix, vector, n);
}


x86 assembly (clang, -O0):
<matNd_mult_vecNd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <matNd_mult_vecNd_new@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matNd_mult_vecNd>:
mov    %edx,%ecx
mov    %rdi,%rdx
jmp    1030 <matNd_mult_vecNd_new@plt>

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

LLVM IR (-O2):
define void @matNd_mult_vecNd(double* %0, double* %1, i32 %2) {
%4 = tail call i32 @matNd_mult_vecNd_new(double* %0, double* %1, double* %0, i32 %2)
ret void
}
void build_snp_locations(int snp_locations[], char reference_sequence[]) {
  int i;
  int snp_counter = 0;
  for (i = 0; reference_sequence[i]; i++) {
    if (reference_sequence[i] == '*') {
      snp_locations[snp_counter] = i;
      snp_counter++;
    }
  }
}


x86 assembly (clang, -O0):
<build_snp_locations>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     116b <build_snp_locations+0x6b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2a,%eax
jne    1158 <build_snp_locations+0x58>
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115d <build_snp_locations+0x5d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111a <build_snp_locations+0x1a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_snp_locations>:
xor    %eax,%eax
xor    %ecx,%ecx
jmp    111d <build_snp_locations+0x1d>
cs nopw 0x0(%rax,%rax,1)
movslq %ecx,%rcx
mov    %eax,(%rdi,%rcx,4)
add    $0x1,%ecx
add    $0x1,%rax
movzbl (%rsi,%rax,1),%edx
cmp    $0x2a,%dl
je     1110 <build_snp_locations+0x10>
test   %dl,%dl
jne    1119 <build_snp_locations+0x19>
ret

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

LLVM IR (-O2):
define void @build_snp_locations(i32* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %13, %2
%4 = phi i64 [ %15, %13 ], [ 0, %2 ]
%5 = phi i32 [ %14, %13 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %1, i64 %4
%7 = load i8, i8* %6
switch i8 %7, label %13 [
i8 0, label %16
i8 42, label %8
]
8: ; preds = %3
%9 = sext i32 %5 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = trunc i64 %4 to i32
store i32 %11, i32* %10
%12 = add nsw i32 %5, 1
br label %13
13: ; preds = %3, %8
%14 = phi i32 [ %12, %8 ], [ %5, %3 ]
%15 = add nuw i64 %4, 1
br label %3
16: ; preds = %3
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t be16getv(void *p) {
  uint8_t *a;
  uint16_t v;
  a = p;
  v = a[0] << 8;
  v |= a[1];
  return v;
}


x86 assembly (clang, -O0):
<be16getv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<be16getv>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @be16getv(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
store i32 %10, i32* %4
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %12
%14 = load i32, i32* %4
%15 = or i32 %14, %13
store i32 %15, i32* %4
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
define i32 @be16getv(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = or i32 %4, %7
ret i32 %8
}
int test_imm_13uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x13 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_13uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0x13,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_13uint64_highword_reg>:
movabs $0x1300000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_13uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 19
%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_13uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 81604378624
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t min32u(uint32_t a, uint32_t b) { return a <= b ? a : b; }


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

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

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

LLVM IR (-O2):
define i64 @min32u(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ntohs(int /*<<< orphan*/);
uint16_t usys_htons(uint16_t n) { return ntohs(n); }


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

x86 assembly (clang, -O2):
<usys_htons>:
jmp    1030 <ntohs@plt>

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

LLVM IR (-O2):
define i32 @usys_htons(i32 %0) {
%2 = tail call i32 @ntohs(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ int_fast8_t;

/* Variables and functions */
bool SHAREMIND_SET_KEY_EQUALS_int_fast8_t(int_fast8_t const k1,
                                          int_fast8_t const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_EQUALS_int_fast8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_EQUALS_int_fast8_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_EQUALS_int_fast8_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_EQUALS_int_fast8_t(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void handler(int sig) { printf("recv sig=%d\n", sig); }


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

x86 assembly (clang, -O2):
<handler>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"recv sig=%d\0A\00"
define void @handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int getstate(char c, char d) {
  if (c == '-' || d == '-')
    return 2;
  if (c == 'N' || d == 'N')
    return 3;
  return c == d;
}


x86 assembly (clang, -O0):
<getstate>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
je     112a <getstate+0x2a>
movsbl -0x6(%rbp),%eax
cmp    $0x2d,%eax
jne    1136 <getstate+0x36>
movl   $0x2,-0x4(%rbp)
jmp    1171 <getstate+0x71>
movsbl -0x5(%rbp),%eax
cmp    $0x4e,%eax
je     1150 <getstate+0x50>
movsbl -0x6(%rbp),%eax
cmp    $0x4e,%eax
jne    115c <getstate+0x5c>
movl   $0x3,-0x4(%rbp)
jmp    1171 <getstate+0x71>
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getstate>:
mov    $0x2,%eax
cmp    $0x2d,%dil
je     112a <getstate+0x2a>
cmp    $0x2d,%sil
je     112a <getstate+0x2a>
mov    $0x3,%eax
cmp    $0x4e,%dil
je     112a <getstate+0x2a>
cmp    $0x4e,%sil
je     112a <getstate+0x2a>
xor    %eax,%eax
cmp    %sil,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @getstate(i8 signext %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 45
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i8, i8* %5
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 45
br i1 %12, label %13, label %14
13: ; preds = %9, %2
store i32 2, i32* %3
br label %30
14: ; preds = %9
%15 = load i8, i8* %4
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 78
br i1 %17, label %22, label %18
18: ; preds = %14
%19 = load i8, i8* %5
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 78
br i1 %21, label %22, label %23
22: ; preds = %18, %14
store i32 3, i32* %3
br label %30
23: ; preds = %18
%24 = load i8, i8* %4
%25 = sext i8 %24 to i32
%26 = load i8, i8* %5
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %25, %27
%29 = zext i1 %28 to i32
store i32 %29, i32* %3
br label %30
30: ; preds = %23, %22, %13
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @getstate(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, 45
%4 = icmp eq i8 %1, 45
%5 = or i1 %3, %4
br i1 %5, label %13, label %6
6: ; preds = %2
%7 = icmp eq i8 %0, 78
%8 = icmp eq i8 %1, 78
%9 = or i1 %7, %8
br i1 %9, label %13, label %10
10: ; preds = %6
%11 = icmp eq i8 %0, %1
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %6, %2, %10
%14 = phi i32 [ %12, %10 ], [ 2, %2 ], [ 3, %6 ]
ret i32 %14
}
void g_type_remove_class_cache_func() {}


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

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

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

LLVM IR (-O2):
define void @g_type_remove_class_cache_func() {
ret void
}
void dtoverflow(void) {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<dtoverflow>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <dtoverflow+0x9>
jmp    1109 <dtoverflow+0x9>

x86 assembly (clang, -O2):
<dtoverflow>:
jmp    1100 <dtoverflow>

LLVM IR (-O0):
define void @dtoverflow() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @dtoverflow() {
br label %1
1: ; preds = %1, %0
br label %1
}
void XEqualRegion() {}


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

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

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

LLVM IR (-O2):
define void @XEqualRegion() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_head_licence() {
  printf("LFMM  Copyright (C) 2012 Eric Frichot\n"
         "This program comes with ABSOLUTELY NO WARRANTY; for details type "
         "'./LFMM -l'.\n"
         "This is free software, and you are welcome to redistribute it\n"
         "under certain conditions; type './LFMM -l' for details.\n\n");
}


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

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

LLVM IR (-O0):
@.str = [236 x i8] c"LFMM Copyright (C) 2012 Eric Frichot\0AThis program comes with ABSOLUTELY NO WARRANTY; for details type './LFMM -l'.\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions; type './LFMM -l' for details.\0A\0A\00"
define void @print_head_licence() {
%1 = call i32 @printf(i8* getelementptr inbounds ([236 x i8], [236 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [235 x i8] c"LFMM Copyright (C) 2012 Eric Frichot\0AThis program comes with ABSOLUTELY NO WARRANTY; for details type './LFMM -l'.\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions; type './LFMM -l' for details.\0A\00"
define void @print_head_licence() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([235 x i8], [235 x i8]* @str, i64 0, i64 0))
ret void
}
char translate(ch)
char ch;
{
  switch (ch) {
  case '{':
    return '<';
  case '}':
    return '>';
  case 'i':
    return '^';
  case '!':
    return 'v';
  }
  return ch;
}


x86 assembly (clang, -O0):
<translate>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x21,%eax
je     116d <translate+0x6d>
jmp    111f <translate+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x69,%eax
je     1164 <translate+0x64>
jmp    1130 <translate+0x30>
mov    -0x8(%rbp),%eax
sub    $0x7b,%eax
je     1152 <translate+0x52>
jmp    1141 <translate+0x41>
mov    -0x8(%rbp),%eax
sub    $0x7d,%eax
je     115b <translate+0x5b>
jmp    1176 <translate+0x76>
movb   $0x3c,-0x1(%rbp)
jmp    117c <translate+0x7c>
movb   $0x3e,-0x1(%rbp)
jmp    117c <translate+0x7c>
movb   $0x5e,-0x1(%rbp)
jmp    117c <translate+0x7c>
movb   $0x76,-0x1(%rbp)
jmp    117c <translate+0x7c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<translate>:
mov    %edi,%eax
movsbl %al,%ecx
cmp    $0x7a,%ecx
jg     1117 <translate+0x17>
cmp    $0x21,%ecx
je     1124 <translate+0x24>
cmp    $0x69,%ecx
jne    1126 <translate+0x26>
mov    $0x5e,%al
ret
cmp    $0x7b,%ecx
je     1127 <translate+0x27>
cmp    $0x7d,%ecx
jne    1126 <translate+0x26>
mov    $0x3e,%al
ret
mov    $0x76,%al
ret
mov    $0x3c,%al
ret

LLVM IR (-O0):
define signext i8 @translate(i32 %0) {
%2 = alloca i8
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
switch i32 %6, label %11 [
i32 123, label %7
i32 125, label %8
i32 105, label %9
i32 33, label %10
]
7: ; preds = %1
store i8 60, i8* %2
br label %13
8: ; preds = %1
store i8 62, i8* %2
br label %13
9: ; preds = %1
store i8 94, i8* %2
br label %13
10: ; preds = %1
store i8 118, i8* %2
br label %13
11: ; preds = %1
%12 = load i8, i8* %3
store i8 %12, i8* %2
br label %13
13: ; preds = %11, %10, %9, %8, %7
%14 = load i8, i8* %2
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @translate(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
switch i32 %3, label %7 [
i32 123, label %9
i32 125, label %4
i32 105, label %5
i32 33, label %6
]
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = trunc i32 %0 to i8
br label %9
9: ; preds = %1, %7, %6, %5, %4
%10 = phi i8 [ %8, %7 ], [ 118, %6 ], [ 94, %5 ], [ 62, %4 ], [ 60, %1 ]
ret i8 %10
}
unsigned long __ecm_gcd(unsigned long a, unsigned long b) {
  unsigned long t;
  while (b != 0UL) {
    t = a % b;
    a = b;
    b = t;
  }
  return a;
}


x86 assembly (clang, -O0):
<__ecm_gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113c <__ecm_gcd+0x3c>
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    110c <__ecm_gcd+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ecm_gcd>:
mov    %rdi,%rax
test   %rsi,%rsi
je     1135 <__ecm_gcd+0x35>
mov    %rsi,%rdx
jmp    111d <__ecm_gcd+0x1d>
nopl   (%rax)
xor    %edx,%edx
div    %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1132 <__ecm_gcd+0x32>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <__ecm_gcd+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <__ecm_gcd+0x15>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @__ecm_gcd(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %6, %4 ], [ %0, %2 ]
%6 = phi i64 [ %7, %4 ], [ %1, %2 ]
%7 = urem i64 %5, %6
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i64 [ %0, %2 ], [ %6, %4 ]
ret i64 %10
}