xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ set_rounding(int /*<<< orphan*/ const *);
void mul_d(const uint32_t *fcr31, const double *source1, const double *source2,
           double *target) {
  set_rounding(fcr31);
  *target = *source1 * *source2;
}


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

x86 assembly (clang, -O2):
<mul_d>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
call   1030 <set_rounding@plt>
movsd  (%rbx),%xmm0
mulsd  (%r15),%xmm0
movsd  %xmm0,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @mul_d(i32* %0, double* nocapture %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = tail call i32 @set_rounding(i32* %0)
%6 = load double, double* %1
%7 = load double, double* %2
%8 = fmul double %6, %7
store double %8, double* %3
ret void
}
void wext_proc_exit(struct net *net) { return; }


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

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

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

LLVM IR (-O2):
%struct.net = type opaque
define void @wext_proc_exit(%struct.net* nocapture %0) {
ret void
}
unsigned int __max_unsigned_int(unsigned int x, unsigned int y) {
  return ((x) > (y) ? (x) : (y));
}


x86 assembly (clang, -O0):
<__max_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    1121 <__max_unsigned_int+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <__max_unsigned_int+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__max_unsigned_int>:
mov    %esi,%eax
cmp    %esi,%edi
cmova  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @__max_unsigned_int(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void io_cpu_hlt() { asm volatile("hlt"); }


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

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

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

LLVM IR (-O2):
define void @io_cpu_hlt() {
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rot13();
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char c;
  c = 'a';
  while (c != 'q') {
    scanf("%c", &c);
    if (c == 'c' || c == 'd')
      rot13();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x71,%eax
je     1176 <main+0x56>
lea    0xeb9(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x63,%eax
je     116a <main+0x4a>
movsbl -0x5(%rbp),%eax
cmp    $0x64,%eax
jne    1171 <main+0x51>
mov    $0x0,%al
call   1030 <rot13@plt>
jmp    1133 <main+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movb   $0x61,0x7(%rsp)
lea    0xed0(%rip),%r14
lea    0x7(%rsp),%rbx
jmp    1144 <main+0x24>
nopw   0x0(%rax,%rax,1)
cmp    $0x71,%al
je     116a <main+0x4a>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movzbl 0x7(%rsp),%eax
lea    -0x63(%rax),%ecx
cmp    $0x1,%cl
ja     1140 <main+0x20>
xor    %eax,%eax
call   1030 <rot13@plt>
movzbl 0x7(%rsp),%eax
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 97, i8* %2
br label %3
3: ; preds = %18, %0
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp ne i32 %5, 113
br i1 %6, label %7, label %19
7: ; preds = %3
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 99
br i1 %11, label %16, label %12
12: ; preds = %7
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 100
br i1 %15, label %16, label %18
16: ; preds = %12, %7
%17 = call i32 (...) @rot13()
br label %18
18: ; preds = %16, %12
br label %3
19: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i8
store i8 97, i8* %1
br label %2
2: ; preds = %0, %10
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = add i8 %4, -99
%6 = icmp ult i8 %5, 2
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = call i32 (...) @rot13()
%9 = load i8, i8* %1
br label %10
10: ; preds = %2, %7
%11 = phi i8 [ %4, %2 ], [ %9, %7 ]
%12 = icmp eq i8 %11, 113
br i1 %12, label %13, label %2
13: ; preds = %10
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fb_PrintFixString(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ fb_hFloat2Str(double, char *, int, int);
void fb_PrintSingle(int fnum, float val, int mask) {
  char buffer[8 + 1 + 9 + 1];
  fb_PrintFixString(fnum, fb_hFloat2Str((double)val, buffer, 7, 0x00000001),
                    mask);
}


x86 assembly (clang, -O0):
<fb_PrintSingle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    -0x20(%rbp),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
call   1040 <fb_hFloat2Str@plt>
mov    -0x24(%rbp),%edi
mov    %eax,%esi
mov    -0xc(%rbp),%edx
call   1030 <fb_PrintFixString@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_PrintSingle>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
cvtss2sd %xmm0,%xmm0
mov    %rsp,%rdi
mov    $0x7,%esi
mov    $0x1,%edx
call   1040 <fb_hFloat2Str@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %ebx,%edx
call   1030 <fb_PrintFixString@plt>
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @fb_PrintSingle(i32 %0, float %1, i32 %2) {
%4 = alloca i32
%5 = alloca float
%6 = alloca i32
%7 = alloca [19 x i8]
store i32 %0, i32* %4
store float %1, float* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load float, float* %5
%10 = fpext float %9 to double
%11 = getelementptr inbounds [19 x i8], [19 x i8]* %7, i64 0, i64 0
%12 = call i32 @fb_hFloat2Str(double %10, i8* %11, i32 7, i32 1)
%13 = load i32, i32* %6
%14 = call i32 @fb_PrintFixString(i32 %8, i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
define void @fb_PrintSingle(i32 %0, float %1, i32 %2) {
%4 = alloca [19 x i8]
%5 = getelementptr inbounds [19 x i8], [19 x i8]* %4, i64 0, i64 0
%6 = fpext float %1 to double
%7 = call i32 @fb_hFloat2Str(double %6, i8* %5, i32 7, i32 1)
%8 = call i32 @fb_PrintFixString(i32 %0, i32 %7, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_table();
int yyparse();
int main(int argc, char const *argv[]) {
  int i;
  init_table();
  return yyparse();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <init_table@plt>
mov    $0x0,%al
call   1030 <yyparse@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <init_table@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <yyparse@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @init_table()
%8 = call i32 (...) @yyparse()
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_table()
%4 = tail call i32 (...) @yyparse()
ret i32 %4
}
int bitXor(int x, int y) { return ~(x & y) & ~(~x & ~y); }


x86 assembly (clang, -O0):
<bitXor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bitXor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = and i32 %5, %6
%8 = xor i32 %7, -1
%9 = load i32, i32* %3
%10 = xor i32 %9, -1
%11 = load i32, i32* %4
%12 = xor i32 %11, -1
%13 = and i32 %10, %12
%14 = xor i32 %13, -1
%15 = and i32 %8, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @bitXor(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
/* Variables and functions */
char *strcat(char *, char const *);
char *xstr_cat(char *destination, const char *source) {
  return strcat(destination, source);
}


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

x86 assembly (clang, -O2):
<xstr_cat>:
jmp    1030 <strcat@plt>

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

LLVM IR (-O2):
define i8* @xstr_cat(i8* returned %0, i8* nocapture %1) {
%3 = tail call i8* @strcat(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i8* %0
}
/* Variables and functions */
float strtof(char *, char **);
float t19(char **x) { return strtof("123.4", x); }


x86 assembly (clang, -O0):
<t19>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <strtof@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t19>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <strtof@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"123.4\00"
define float @t19(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call float @strtof(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %3)
ret float %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"123.4\00"
define float @t19(i8** nocapture %0) {
%2 = tail call float @strtof(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %0)
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ XEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XEvent(void) {
  XEvent *_p = (XEvent *)malloc(sizeof(XEvent));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XEvent+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XEvent>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XEvent+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XEvent() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XEvent() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
int IsNotPowerOf2(int num) {
  int newnum, pcnt = 0;
  newnum = num;
  while (newnum > 0) {
    newnum >>= 1;
    pcnt++;
  }
  pcnt--;
  newnum = 1 << pcnt;
  if (newnum != num)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<IsNotPowerOf2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1135 <IsNotPowerOf2+0x35>
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <IsNotPowerOf2+0x14>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1163 <IsNotPowerOf2+0x63>
movl   $0x1,-0x4(%rbp)
jmp    116a <IsNotPowerOf2+0x6a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsNotPowerOf2>:
mov    $0xffffffff,%ecx
test   %edi,%edi
jle    111c <IsNotPowerOf2+0x1c>
mov    %edi,%edx
mov    %edi,%eax
nopl   (%rax)
shr    %eax
add    $0x1,%ecx
cmp    $0x1,%edx
mov    %eax,%edx
ja     1110 <IsNotPowerOf2+0x10>
mov    $0x1,%edx
shl    %cl,%edx
xor    %eax,%eax
cmp    %edi,%edx
setne  %al
ret

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

LLVM IR (-O2):
define i32 @IsNotPowerOf2(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ -1, %1 ], [ %4, %3 ]
%11 = shl nuw i32 1, %10
%12 = icmp ne i32 %11, %0
%13 = zext i1 %12 to i32
ret i32 %13
}
float float_add(float a, float b) { return a + b; }


x86 assembly (clang, -O0):
<float_add>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_add>:
addss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @float_add(float %0, float %1) {
%3 = fadd float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ ncss_Ungetc(int);
int /*<<< orphan*/ ncss_Ungets(char *);
void ungettoken(int c, char *s) {
  if (c >= (256 + 20)) {
    ncss_Ungets(s);
  } else {
    ncss_Ungetc(c);
  }
}


x86 assembly (clang, -O0):
<ungettoken>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x114,-0x4(%rbp)
jl     114a <ungettoken+0x2a>
mov    -0x10(%rbp),%rdi
call   1030 <ncss_Ungets@plt>
jmp    1152 <ungettoken+0x32>
mov    -0x4(%rbp),%edi
call   1040 <ncss_Ungetc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ungettoken>:
cmp    $0x114,%edi
jl     1130 <ungettoken+0x10>
mov    %rsi,%rdi
jmp    1030 <ncss_Ungets@plt>
jmp    1040 <ncss_Ungetc@plt>

LLVM IR (-O0):
define void @ungettoken(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 = icmp sge i32 %5, 276
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @ncss_Ungets(i8* %8)
br label %13
10: ; preds = %2
%11 = load i32, i32* %3
%12 = call i32 @ncss_Ungetc(i32 %11)
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
define void @ungettoken(i32 %0, i8* %1) {
%3 = icmp sgt i32 %0, 275
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @ncss_Ungets(i8* %1)
br label %8
6: ; preds = %2
%7 = tail call i32 @ncss_Ungetc(i32 %0)
br label %8
8: ; preds = %6, %4
ret void
}
void pcp_def_io_metrics(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
void print_client_id(const uint8_t *public_key) {
  uint32_t j;
  for (j = 0; j < 32; j++) {
    printf("%02X", public_key[j]);
  }
}


x86 assembly (clang, -O0):
<print_client_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1152 <print_client_id+0x42>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_client_id+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_client_id>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %ebx,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1130 <print_client_id+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%02X\00"
define void @print_client_id(i32* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = add nuw nsw i64 %3, 1
%8 = icmp eq i64 %7, 32
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}
/* Type definitions */
struct c2interface {
  int dummy;
};

/* Variables and functions */
int EIO;
scalar_t__ c2_read_dr(struct c2interface *, unsigned char *);
int /*<<< orphan*/ c2_write_ar(struct c2interface *, unsigned char);
int c2_read_sfr(struct c2interface *c2if, unsigned char sfr) {
  unsigned char data;
  c2_write_ar(c2if, sfr);
  if (c2_read_dr(c2if, &data) < 0)
    return -EIO;
  return data;
}


x86 assembly (clang, -O0):
<c2_read_sfr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
movzbl -0x11(%rbp),%esi
call   1040 <c2_write_ar@plt>
mov    -0x10(%rbp),%rdi
lea    -0x12(%rbp),%rsi
call   1030 <c2_read_dr@plt>
cmp    $0x0,%rax
jge    1169 <c2_read_sfr+0x49>
xor    %eax,%eax
mov    0x2e81(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <c2_read_sfr+0x50>
movzbl -0x12(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c2_read_sfr>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <c2_write_ar@plt>
lea    0xf(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <c2_read_dr@plt>
mov    0x2e9f(%rip),%rcx
xor    %edx,%edx
sub    (%rcx),%edx
test   %rax,%rax
movzbl 0xf(%rsp),%eax
cmovs  %edx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.c2interface = type { i32 }
@EIO = global i32 0
define i32 @c2_read_sfr(%struct.c2interface* %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca %struct.c2interface*
%5 = alloca i8
%6 = alloca i8
store %struct.c2interface* %0, %struct.c2interface** %4
store i8 %1, i8* %5
%7 = load %struct.c2interface*, %struct.c2interface** %4
%8 = load i8, i8* %5
%9 = call i32 @c2_write_ar(%struct.c2interface* %7, i8 zeroext %8)
%10 = load %struct.c2interface*, %struct.c2interface** %4
%11 = call i64 @c2_read_dr(%struct.c2interface* %10, i8* %6)
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32, i32* @EIO
%15 = sub nsw i32 0, %14
store i32 %15, i32* %3
br label %19
16: ; preds = %2
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
store i32 %18, i32* %3
br label %19
19: ; preds = %16, %13
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
%struct.c2interface = type { i32 }
@EIO = global i32 0
define i32 @c2_read_sfr(%struct.c2interface* %0, i8 zeroext %1) {
%3 = alloca i8
%4 = tail call i32 @c2_write_ar(%struct.c2interface* %0, i8 zeroext %1)
%5 = call i64 @c2_read_dr(%struct.c2interface* %0, i8* %3)
%6 = icmp slt i64 %5, 0
%7 = load i32, i32* @EIO
%8 = sub nsw i32 0, %7
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = select i1 %6, i32 %8, i32 %10
ret i32 %11
}
int skip_chars(const char *str, int i, int count) {
  do {
    i++;
    count--;
    if (str[i] == '\0')
      return i;
  } while (count > 0);
  return i;
}


x86 assembly (clang, -O0):
<skip_chars>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1140 <skip_chars+0x40>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <skip_chars+0x55>
jmp    1145 <skip_chars+0x45>
cmpl   $0x0,-0x18(%rbp)
jg     110e <skip_chars+0xe>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_chars>:
mov    %esi,%eax
movslq %esi,%rcx
add    %rdi,%rcx
add    $0x1,%rcx
nopl   0x0(%rax)
add    $0x1,%eax
cmpb   $0x0,(%rcx)
je     1126 <skip_chars+0x26>
lea    -0x1(%rdx),%esi
add    $0x1,%rcx
cmp    $0x1,%edx
mov    %esi,%edx
jg     1110 <skip_chars+0x10>
ret

LLVM IR (-O0):
define i32 @skip_chars(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
br label %8
8: ; preds = %23, %3
%9 = load i32, i32* %6
%10 = add nsw i32 %9, 1
store i32 %10, i32* %6
%11 = load i32, i32* %7
%12 = add nsw i32 %11, -1
store i32 %12, i32* %7
%13 = load i8*, i8** %5
%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 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %8
%21 = load i32, i32* %6
store i32 %21, i32* %4
br label %28
22: ; preds = %8
br label %23
23: ; preds = %22
%24 = load i32, i32* %7
%25 = icmp sgt i32 %24, 0
br i1 %25, label %8, label %26
26: ; preds = %23
%27 = load i32, i32* %6
store i32 %27, i32* %4
br label %28
28: ; preds = %26, %20
%29 = load i32, i32* %4
ret i32 %29
}

LLVM IR (-O2):
define i32 @skip_chars(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
br label %5
5: ; preds = %5, %3
%6 = phi i64 [ %8, %5 ], [ %4, %3 ]
%7 = phi i32 [ %12, %5 ], [ %2, %3 ]
%8 = add nsw i64 %6, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
%12 = add nsw i32 %7, -1
%13 = icmp sgt i32 %7, 1
%14 = select i1 %11, i1 %13, i1 false
br i1 %14, label %5, label %15
15: ; preds = %5
%16 = trunc i64 %8 to i32
ret i32 %16
}
int changeValue() {
  int intArray[10];
  int *intPtr1 = intArray;
  int *intPtr2;
  *(intPtr1 + 5) = 351;
  return intArray[5];
}


x86 assembly (clang, -O0):
<changeValue>:
push   %rbp
mov    %rsp,%rbp
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movl   $0x15f,0x14(%rax)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @changeValue() {
%1 = alloca [10 x i32]
%2 = alloca i32*
%3 = alloca i32*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 5
store i32 351, i32* %6
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @changeValue() {
ret i32 351
}
long int fakt(long int n) {
  if (n < 2)
    return (1);
  else
    return (n * fakt(n - 1));
}


x86 assembly (clang, -O0):
<fakt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x2,-0x10(%rbp)
jge    1134 <fakt+0x24>
movq   $0x1,-0x8(%rbp)
jmp    1158 <fakt+0x48>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
sub    $0x1,%rdi
call   1030 <fakt@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
imul   %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fakt>:
mov    $0x1,%eax
cmp    $0x2,%rdi
jl     1121 <fakt+0x21>
mov    $0x1,%eax
imul   %rdi,%rax
lea    -0x1(%rdi),%rcx
cmp    $0x2,%rdi
mov    %rcx,%rdi
ja     1110 <fakt+0x10>
ret

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

LLVM IR (-O2):
define i64 @fakt(i64 %0) {
%2 = icmp slt i64 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ %0, %1 ]
%5 = phi i64 [ %7, %3 ], [ 1, %1 ]
%6 = add nsw i64 %4, -1
%7 = mul nsw i64 %4, %5
%8 = icmp ult i64 %4, 3
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 1, %1 ], [ %7, %3 ]
ret i64 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long long fwrite(char *, size_t, size_t, int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) long long
softboundmpx_fwrite(char *ptr, size_t size, size_t nmemb, FILE *stream) {
  return fwrite(ptr, size, nmemb, stream);
}


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

x86 assembly (clang, -O2):
<softboundmpx_fwrite>:
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
define weak i64 @softboundmpx_fwrite(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = tail call i64 @fwrite(i8* %0, i64 %1, i64 %2, i32* %3)
ret i64 %5
}
void rop3_87_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T | S;
  stk1 = *D & stk2;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_87_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_87_0_1>:
mov    %edx,%eax
or     %sil,%al
mov    (%rdi),%r8b
and    %r8b,%al
not    %al
mov    %edx,%ecx
not    %cl
or     %sil,%cl
and    %al,%cl
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_87_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = and i8 %5, %4
%7 = xor i8 %6, -1
%8 = xor i8 %2, -1
%9 = or i8 %8, %1
%10 = and i8 %9, %7
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %5
%14 = or i8 %10, %13
store i8 %14, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fp_msg(char *);
int fp_usage(void) {
  fp_msg("usage: fpack ");
  fp_msg("[-r|-h|-g|-p] [-w|-t <axes>] [-q <level>] [-s <scale>] [-n <noise>] "
         "-v <FITS>\n");
  fp_msg("more:   [-T] [-R] [-F] [-D] [-Y] [-S] [-L] [-C] [-H] [-V] [-i2f]\n");
  return (0);
}


x86 assembly (clang, -O0):
<fp_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <fp_msg@plt>
lea    0xee7(%rip),%rdi
call   1030 <fp_msg@plt>
lea    0xf2a(%rip),%rdi
call   1030 <fp_msg@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <fp_msg@plt>
lea    0xeea(%rip),%rdi
call   1030 <fp_msg@plt>
lea    0xf2d(%rip),%rdi
call   1030 <fp_msg@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"usage: fpack \00"
@.str.1 = [79 x i8] c"[-r|-h|-g|-p] [-w|-t <axes>] [-q <level>] [-s <scale>] [-n <noise>] -v <FITS>\0A\00"
@.str.2 = [66 x i8] c"more: [-T] [-R] [-F] [-D] [-Y] [-S] [-L] [-C] [-H] [-V] [-i2f]\0A\00"
define i32 @fp_usage() {
%1 = call i32 @fp_msg(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @fp_msg(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @fp_msg(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"usage: fpack \00"
@.str.1 = [79 x i8] c"[-r|-h|-g|-p] [-w|-t <axes>] [-q <level>] [-s <scale>] [-n <noise>] -v <FITS>\0A\00"
@.str.2 = [66 x i8] c"more: [-T] [-R] [-F] [-D] [-Y] [-S] [-L] [-C] [-H] [-V] [-i2f]\0A\00"
define i32 @fp_usage() {
%1 = tail call i32 @fp_msg(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @fp_msg(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @fp_msg(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Send_MPlayer_Command(int, int);
void MPlayer_VolChange(short dir) {
  int cmd;
  if (dir == 1) {
    cmd = 0x15;
  } else {
    cmd = 0x16;
  }
  Send_MPlayer_Command(cmd, 2);
  Send_MPlayer_Command(cmd, 0);
}


x86 assembly (clang, -O0):
<MPlayer_VolChange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x1,%eax
jne    1138 <MPlayer_VolChange+0x28>
movl   $0x15,-0x8(%rbp)
jmp    113f <MPlayer_VolChange+0x2f>
movl   $0x16,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1030 <Send_MPlayer_Command@plt>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1030 <Send_MPlayer_Command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPlayer_VolChange>:
push   %rbx
xor    %eax,%eax
cmp    $0x1,%di
sete   %al
mov    $0x16,%ebx
sub    %eax,%ebx
mov    %ebx,%edi
mov    $0x2,%esi
call   1030 <Send_MPlayer_Command@plt>
mov    %ebx,%edi
xor    %esi,%esi
pop    %rbx
jmp    1030 <Send_MPlayer_Command@plt>

LLVM IR (-O0):
define void @MPlayer_VolChange(i16 signext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = sext i16 %4 to i32
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 21, i32* %3
br label %9
8: ; preds = %1
store i32 22, i32* %3
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %3
%11 = call i32 @Send_MPlayer_Command(i32 %10, i32 2)
%12 = load i32, i32* %3
%13 = call i32 @Send_MPlayer_Command(i32 %12, i32 0)
ret void
}

LLVM IR (-O2):
define void @MPlayer_VolChange(i16 signext %0) {
%2 = icmp eq i16 %0, 1
%3 = select i1 %2, i32 21, i32 22
%4 = tail call i32 @Send_MPlayer_Command(i32 %3, i32 2)
%5 = tail call i32 @Send_MPlayer_Command(i32 %3, i32 0)
ret void
}
void prefetch(const void *x) {
  __asm volatile("prefetcht0 %0" ::"m"(*(const unsigned long *)x));
}


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

x86 assembly (clang, -O2):
<prefetch>:
prefetcht0 (%rdi)
ret

LLVM IR (-O0):
define void @prefetch(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i64*
ret void
}

LLVM IR (-O2):
define void @prefetch(i8* %0) {
%2 = bitcast i8* %0 to i64*
tail call void asm sideeffect "prefetcht0 $0", "*m,~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_FILE_CLOSE();
int /*<<< orphan*/ LOG_FILE_CREATE(char *);
int /*<<< orphan*/ config_initial();
int /*<<< orphan*/ memory_cache_cleanup();
int /*<<< orphan*/ scil_argument_process(int, char **);
int main(int argc, char **argv) {
  LOG_FILE_CREATE(argv[0]);
  config_initial();
  scil_argument_process(argc - 1, argv + 1);
  memory_cache_cleanup();
  LOG_FILE_CLOSE();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <LOG_FILE_CREATE@plt>
mov    $0x0,%al
call   1060 <config_initial@plt>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1070 <scil_argument_process@plt>
mov    $0x0,%al
call   1030 <memory_cache_cleanup@plt>
mov    $0x0,%al
call   1040 <LOG_FILE_CLOSE@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    (%rsi),%rdi
call   1050 <LOG_FILE_CREATE@plt>
xor    %eax,%eax
call   1060 <config_initial@plt>
add    $0xffffffff,%ebp
add    $0x8,%rbx
mov    %ebp,%edi
mov    %rbx,%rsi
call   1070 <scil_argument_process@plt>
xor    %eax,%eax
call   1030 <memory_cache_cleanup@plt>
xor    %eax,%eax
call   1040 <LOG_FILE_CLOSE@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @LOG_FILE_CREATE(i8* %8)
%10 = call i32 (...) @config_initial()
%11 = load i32, i32* %4
%12 = sub nsw i32 %11, 1
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = call i32 @scil_argument_process(i32 %12, i8** %14)
%16 = call i32 (...) @memory_cache_cleanup()
%17 = call i32 (...) @LOG_FILE_CLOSE()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @LOG_FILE_CREATE(i8* %3)
%5 = tail call i32 (...) @config_initial()
%6 = add nsw i32 %0, -1
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = tail call i32 @scil_argument_process(i32 %6, i8** %7)
%9 = tail call i32 (...) @memory_cache_cleanup()
%10 = tail call i32 (...) @LOG_FILE_CLOSE()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int16_t;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_le16(int /*<<< orphan*/, void *);
void put_unaligned_le16(u_int16_t val, void *p) {
  __put_unaligned_le16(val, p);
}


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

x86 assembly (clang, -O2):
<put_unaligned_le16>:
jmp    1030 <__put_unaligned_le16@plt>

LLVM IR (-O0):
define void @put_unaligned_le16(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 i8*, i8** %4
%7 = call i32 @__put_unaligned_le16(i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @put_unaligned_le16(i32 %0, i8* %1) {
%3 = tail call i32 @__put_unaligned_le16(i32 %0, i8* %1)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int fileExist(char *File) {
  struct stat S;
  if (stat(File, &S) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<fileExist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jne    113f <fileExist+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <fileExist+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileExist>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fileExist(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
void *consume_cpu_thread(void *threadid) {
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<consume_cpu_thread>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
jmp    1108 <consume_cpu_thread+0x8>

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

LLVM IR (-O0):
define i8* @consume_cpu_thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %3, %1
br label %3
}

LLVM IR (-O2):
define noalias i8* @consume_cpu_thread(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
__attribute__((__const__)) int
request_uri_is_valid_char(const unsigned char c) {
  return (c > 32 && c != 127 && c != 255);
}


x86 assembly (clang, -O0):
<request_uri_is_valid_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
jle    113d <request_uri_is_valid_char+0x3d>
movzbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x7f,%ecx
mov    %al,-0x2(%rbp)
je     113d <request_uri_is_valid_char+0x3d>
movzbl -0x1(%rbp),%eax
cmp    $0xff,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<request_uri_is_valid_char>:
cmp    $0x7f,%dil
setne  %al
add    $0xdf,%dil
cmp    $0xde,%dil
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @request_uri_is_valid_char(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sgt i32 %4, 32
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp ne i32 %8, 127
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = icmp ne i32 %12, 255
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ false, %6 ], [ false, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @request_uri_is_valid_char(i8 zeroext %0) {
%2 = icmp ne i8 %0, 127
%3 = add i8 %0, -33
%4 = icmp ult i8 %3, -34
%5 = and i1 %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int IFF_MULTICAST;
int IFF_RUNNING;
int IFF_UP;
uint8_t itf_flags(int if_flags) {
  uint8_t flags;
  flags = 0;
  if (if_flags & IFF_UP) {
    flags |= 1;
  }
  if (if_flags & IFF_RUNNING) {
    flags |= 4;
  }
  if (if_flags & IFF_MULTICAST) {
    flags |= 2;
  }
  return flags;
}


x86 assembly (clang, -O0):
<itf_flags>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec0(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     112c <itf_flags+0x2c>
mov    -0x8(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eaa(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     114a <itf_flags+0x4a>
mov    -0x8(%rbp),%eax
or     $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2e94(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1168 <itf_flags+0x68>
mov    -0x8(%rbp),%eax
or     $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<itf_flags>:
mov    0x2ed1(%rip),%rax
xor    %ecx,%ecx
test   %edi,(%rax)
setne  %cl
mov    0x2ecb(%rip),%rax
lea    0x4(%rcx),%edx
test   %edi,(%rax)
cmove  %ecx,%edx
mov    0x2ec4(%rip),%rcx
lea    0x2(%rdx),%eax
test   %edi,(%rcx)
cmove  %edx,%eax
ret

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

LLVM IR (-O2):
@IFF_UP = global i32 0
@IFF_RUNNING = global i32 0
@IFF_MULTICAST = global i32 0
define i32 @itf_flags(i32 %0) {
%2 = load i32, i32* @IFF_UP
%3 = and i32 %2, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
%6 = load i32, i32* @IFF_RUNNING
%7 = and i32 %6, %0
%8 = icmp eq i32 %7, 0
%9 = or i32 %5, 4
%10 = select i1 %8, i32 %5, i32 %9
%11 = load i32, i32* @IFF_MULTICAST
%12 = and i32 %11, %0
%13 = icmp eq i32 %12, 0
%14 = or i32 %10, 2
%15 = select i1 %13, i32 %10, i32 %14
ret i32 %15
}
/* Type definitions */
struct mcuio_packet {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mcuio_packet_type(struct mcuio_packet *);
int mcuio_type_is_read(int /*<<< orphan*/);
int mcuio_packet_is_read(struct mcuio_packet *p) {
  return mcuio_type_is_read(mcuio_packet_type(p));
}


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

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

LLVM IR (-O0):
%struct.mcuio_packet = type { i32 }
define i32 @mcuio_packet_is_read(%struct.mcuio_packet* %0) {
%2 = alloca %struct.mcuio_packet*
store %struct.mcuio_packet* %0, %struct.mcuio_packet** %2
%3 = load %struct.mcuio_packet*, %struct.mcuio_packet** %2
%4 = call i32 @mcuio_packet_type(%struct.mcuio_packet* %3)
%5 = call i32 @mcuio_type_is_read(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.mcuio_packet = type { i32 }
define i32 @mcuio_packet_is_read(%struct.mcuio_packet* %0) {
%2 = tail call i32 @mcuio_packet_type(%struct.mcuio_packet* %0)
%3 = tail call i32 @mcuio_type_is_read(i32 %2)
ret i32 %3
}
int raw_irqs_disabled_flags(unsigned long flags) { return (flags != 0); }


x86 assembly (clang, -O0):
<raw_irqs_disabled_flags>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<raw_irqs_disabled_flags>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @raw_irqs_disabled_flags(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @raw_irqs_disabled_flags(i64 %0) {
%2 = icmp ne i64 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}