xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int, int, int);
int /*<<< orphan*/ stdout;
void print_json_gid_change(int pid, int tgid, int ruid, int euid) {
  fprintf(stdout,
          "{\"type\": \"gid_change\" \"pid\": %d, \"tgid\": %d, "
          "\"ruid\": %d, \"euid\": %d}\n",
          pid, tgid, ruid, euid);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<print_json_gid_change>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x10(%rbp),%r9d
lea    0xeae(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_json_gid_change>:
push   %rbx
mov    %ecx,%r9d
mov    %edx,%r8d
mov    %esi,%ecx
mov    %edi,%edx
mov    0x2eae(%rip),%rbx
mov    (%rbx),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [70 x i8] c"{\22type\22: \22gid_change\22 \22pid\22: %d, \22tgid\22: %d, \22ruid\22: %d, \22euid\22: %d}\0A\00"
define void @print_json_gid_change(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* @stdout
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %12, i32 %13)
%15 = load i32, i32* @stdout
%16 = call i32 @fflush(i32 %15)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [70 x i8] c"{\22type\22: \22gid_change\22 \22pid\22: %d, \22tgid\22: %d, \22ruid\22: %d, \22euid\22: %d}\0A\00"
define void @print_json_gid_change(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3)
%7 = load i32, i32* @stdout
%8 = tail call i32 @fflush(i32 %7)
ret void
}
long ELF32_ST_INFO(long b, long t) { return (b << 4) + (t & 0xf); }


x86 assembly (clang, -O0):
<ELF32_ST_INFO>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x4,%rax
mov    -0x10(%rbp),%rcx
and    $0xf,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ELF32_ST_INFO>:
shl    $0x4,%rdi
and    $0xf,%esi
lea    (%rsi,%rdi,1),%rax
ret

LLVM IR (-O0):
define i64 @ELF32_ST_INFO(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 = shl i64 %5, 4
%7 = load i64, i64* %4
%8 = and i64 %7, 15
%9 = add nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @ELF32_ST_INFO(i64 %0, i64 %1) {
%3 = shl i64 %0, 4
%4 = and i64 %1, 15
%5 = or i64 %4, %3
ret i64 %5
}
/* Variables and functions */
int fac(int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int n = 12, p = 50;
  int i = 1;
  for (; i < 51; ++i)
    printf("fac(%d)=%d\n", i, fac(i));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xc,-0x8(%rbp)
movl   $0x32,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x33,-0x10(%rbp)
jge    117b <main+0x5b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <fac@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1144 <main+0x24>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xed0(%rip),%r14
mov    %ebx,%edi
call   1030 <fac@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0x33,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"fac(%d)=%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %5, %1 ]
%3 = tail call i32 @fac(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 51
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
unsigned addval_469(unsigned x) { return x + 3286272328U; }


x86 assembly (clang, -O0):
<addval_469>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc3e08948,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addval_469>:
lea    -0x3c1f76b8(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @addval_469(i32 %0) {
%2 = add i32 %0, -1008694968
ret i32 %2
}
/* Variables and functions */
float log10f(float);
float lin2db(float lin) {
  if (lin == 0.0f)
    return -200.0f;
  else
    return (20.0f * log10f(lin));
}


x86 assembly (clang, -O0):
<lin2db>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1146 <lin2db+0x36>
jp     1146 <lin2db+0x36>
movss  0xec8(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1164 <lin2db+0x54>
movss  -0x8(%rbp),%xmm0
call   1030 <log10f@plt>
movaps %xmm0,%xmm1
movss  0xea5(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lin2db>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1125 <lin2db+0x15>
jp     1125 <lin2db+0x15>
movss  0xedd(%rip),%xmm0
pop    %rax
ret
call   1030 <log10f@plt>
mulss  0xed2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @lin2db(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp oeq float %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store float -2.000000e+02, float* %2
br label %11
7: ; preds = %1
%8 = load float, float* %3
%9 = call float @log10f(float %8)
%10 = fmul float 2.000000e+01, %9
store float %10, float* %2
br label %11
11: ; preds = %7, %6
%12 = load float, float* %2
ret float %12
}

LLVM IR (-O2):
define float @lin2db(float %0) {
%2 = fcmp oeq float %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call float @log10f(float %0)
%5 = fmul float %4, 2.000000e+01
br label %6
6: ; preds = %1, %3
%7 = phi float [ %5, %3 ], [ -2.000000e+02, %1 ]
ret float %7
}
char *rcps_version() { return "0.3"; }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"0.3\00"
define i8* @rcps_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
int strcmp2(const char *string1, const char *string2) {
  int diff, c;
  for (;;) {
    diff = *string1++ - (c = *string2++);
    if (diff)
      return diff;
    if (c == 0)
      return 0;
  }
}


x86 assembly (clang, -O0):
<strcmp2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
mov    %ecx,-0x20(%rbp)
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     114d <strcmp2+0x4d>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <strcmp2+0x68>
cmpl   $0x0,-0x20(%rbp)
jne    1163 <strcmp2+0x63>
movl   $0x0,-0x4(%rbp)
jmp    1168 <strcmp2+0x68>
jmp    110c <strcmp2+0xc>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp2>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi,%rcx,1),%eax
movsbl (%rsi,%rcx,1),%edx
sub    %edx,%eax
jne    1124 <strcmp2+0x24>
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcmp2+0x10>
ret

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

LLVM IR (-O2):
define i32 @strcmp2(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %12, %3 ]
%5 = phi i8* [ %0, %2 ], [ %13, %3 ]
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %7, %9
%11 = icmp ne i32 %10, 0
%12 = getelementptr inbounds i8, i8* %4, i64 1
%13 = getelementptr inbounds i8, i8* %5, i64 1
%14 = icmp eq i8 %8, 0
%15 = select i1 %11, i1 true, i1 %14
br i1 %15, label %16, label %3
16: ; preds = %3
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ baudrate();
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_int(int /*<<< orphan*/);
void cmd_baudrate(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_int(baudrate());
}


x86 assembly (clang, -O0):
<cmd_baudrate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_baudrate+0x27>
jmp    117f <cmd_baudrate+0x3f>
mov    $0x1,%edi
call   1050 <report_count@plt>
mov    $0x0,%al
call   1030 <baudrate@plt>
mov    %eax,%edi
call   1060 <report_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_baudrate>:
push   %rax
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_baudrate+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1050 <report_count@plt>
xor    %eax,%eax
call   1030 <baudrate@plt>
mov    %eax,%edi
pop    %rax
jmp    1060 <report_int@plt>

LLVM IR (-O0):
define void @cmd_baudrate(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 = call i32 @check_arg_count(i32 %5, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 (...) @baudrate()
%12 = call i32 @report_int(i32 %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_baudrate(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @baudrate()
%8 = tail call i32 @report_int(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a;
  int p;
  int t;
  a = 1;
  p = 0;
  t = 0;
  while (a < 100) {
    printf("%d\n", a);
    t = a;
    a = t + p;
    p = t;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1167 <main+0x57>
mov    -0x8(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x1,%ebx
xor    %ebp,%ebp
lea    0xede(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebp,%eax
add    %ebx,%eax
mov    %ebx,%ebp
mov    %eax,%ebx
cmp    $0x64,%eax
jl     1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %3, %1 ]
%3 = phi i32 [ 1, %0 ], [ %5, %1 ]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = add nsw i32 %2, %3
%6 = icmp slt i32 %5, 100
br i1 %6, label %1, label %7
7: ; preds = %1
ret i32 0
}
/* Variables and functions */
scalar_t__ nrf_drv_usbd_errata_type_52840_proto1();
bool nrf_drv_usbd_errata_154(void) {
  return 1 && nrf_drv_usbd_errata_type_52840_proto1();
}


x86 assembly (clang, -O0):
<nrf_drv_usbd_errata_154>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrf_drv_usbd_errata_type_52840_proto1@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_drv_usbd_errata_154>:
push   %rax
xor    %eax,%eax
call   1030 <nrf_drv_usbd_errata_type_52840_proto1@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nrf_drv_usbd_errata_154() {
%1 = call i64 (...) @nrf_drv_usbd_errata_type_52840_proto1()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @nrf_drv_usbd_errata_154() {
%1 = tail call i64 (...) @nrf_drv_usbd_errata_type_52840_proto1()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
float minimumf(float a, float b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<minimumf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <minimumf+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <minimumf+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<minimumf>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @minimumf(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 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @minimumf(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
char const *fixit(char const *, char const *);
const char *fixtype(const char *type) { return fixit(type, type); }


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

x86 assembly (clang, -O2):
<fixtype>:
mov    %rdi,%rsi
jmp    1030 <fixit@plt>

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

LLVM IR (-O2):
define i8* @fixtype(i8* %0) {
%2 = tail call i8* @fixit(i8* %0, i8* %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int __infer_nondet_int();
int iswlower(wint_t wc) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @iswlower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @__infer_nondet_int()
ret i32 %3
}

LLVM IR (-O2):
define i32 @iswlower(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ another_level_deep();
int function_a() {
  another_level_deep();
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @function_a() {
%1 = tail call i32 (...) @another_level_deep()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int reverse(int, int);
void reverse_test(void) { assert(reverse(14825, 10) == 52841); }


x86 assembly (clang, -O0):
<reverse_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x39e9,%edi
mov    $0xa,%esi
call   1030 <reverse@plt>
cmp    $0xce69,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_test>:
push   %rax
mov    $0x39e9,%edi
mov    $0xa,%esi
call   1030 <reverse@plt>
xor    %edi,%edi
cmp    $0xce69,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @reverse_test() {
%1 = call i32 @reverse(i32 14825, i32 10)
%2 = icmp eq i32 %1, 52841
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
ret void
}

LLVM IR (-O2):
define void @reverse_test() {
%1 = tail call i32 @reverse(i32 14825, i32 10)
%2 = icmp eq i32 %1, 52841
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int tv_is_zero(struct timeval *tv) {
  return tv->tv_sec == 0 && tv->tv_usec == 0;
}


x86 assembly (clang, -O0):
<tv_is_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmpq   $0x0,(%rcx)
mov    %al,-0x9(%rbp)
jne    112a <tv_is_zero+0x2a>
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tv_is_zero>:
xor    %eax,%eax
cmpq   $0x0,(%rdi)
je     1109 <tv_is_zero+0x9>
ret
xor    %eax,%eax
cmpq   $0x0,0x8(%rdi)
sete   %al
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i32 @tv_is_zero(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load %struct.timeval*, %struct.timeval** %2
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%10 = load i64, i64* %9
%11 = icmp eq i64 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i32 @tv_is_zero(%struct.timeval* nocapture %0) {
%2 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%7 = load i64, i64* %6
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void restartall_usage(int code) {
  fprintf(stderr,
          "Restarts all VM instances managed by honeycomb.\n"
          "\n"
          "Usage: %s restartall [-f]\n"
          "\n"
          "	-f: Force stop all VMs prior to restarting\n"
          "\n",
          "hc");
  exit(code);
}


x86 assembly (clang, -O0):
<restartall_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
lea    0xf38(%rip),%rdx
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<restartall_usage>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
lea    0xf40(%rip),%rdx
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [122 x i8] c"Restarts all VM instances managed by honeycomb.\0A\0AUsage: %s restartall [-f]\0A\0A\09-f: Force stop all VMs prior to restarting\0A\0A\00"
@.str.1 = [3 x i8] c"hc\00"
define void @restartall_usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [122 x i8] c"Restarts all VM instances managed by honeycomb.\0A\0AUsage: %s restartall [-f]\0A\0A\09-f: Force stop all VMs prior to restarting\0A\0A\00"
@.str.1 = [3 x i8] c"hc\00"
define void @restartall_usage(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}
const int tol(char c) {
  if (c >= 'A' && c <= 'Z') {
    return c - 'A' + 'a';
  }
  return c;
}


x86 assembly (clang, -O0):
<tol>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1136 <tol+0x36>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1136 <tol+0x36>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    113d <tol+0x3d>
movsbl -0x5(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tol>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%cl
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @tol(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 65
%15 = add nsw i32 %14, 97
store i32 %15, i32* %2
br label %19
16: ; preds = %7, %1
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
store i32 %18, i32* %2
br label %19
19: ; preds = %16, %11
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @tol(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -65
%4 = icmp ult i8 %3, 26
%5 = add nsw i32 %2, 32
%6 = select i1 %4, i32 %5, i32 %2
ret i32 %6
}
void dbgdbg_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @dbgdbg_cleanup() {
ret void
}
__attribute__((always_)) void cl_flush(void *p) {
  asm volatile("clflush (%0)\n\t" : : "r"(p) : "memory");
}


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

x86 assembly (clang, -O2):
<cl_flush>:
clflush (%rdi)
ret

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

LLVM IR (-O2):
define void @cl_flush(i8* %0) {
tail call void asm sideeffect "clflush ($0)\0A\09", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void MEM_Free(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<MEM_Free>:
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):
<MEM_Free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @MEM_Free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
unsigned int usercache_hash(char *nick) {
  unsigned int hash = 0;
  while (*nick)
    hash = (hash << 5) - hash + *nick++;
  return hash & 127;
}


x86 assembly (clang, -O0):
<usercache_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1141 <usercache_hash+0x41>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
sub    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <usercache_hash+0xf>
mov    -0xc(%rbp),%eax
and    $0x7f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<usercache_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112b <usercache_hash+0x2b>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
movzbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <usercache_hash+0x10>
and    $0x7f,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @usercache_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 31
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = zext i8 %5 to i32
%11 = add i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = and i32 %11, 127
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
int GetRed(unsigned int rgb) { return (int)((rgb >> 16) & 0xff); }


x86 assembly (clang, -O0):
<GetRed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetRed>:
shr    $0x10,%edi
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @GetRed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 16
%5 = and i32 %4, 255
ret i32 %5
}

LLVM IR (-O2):
define i32 @GetRed(i32 %0) {
%2 = lshr i32 %0, 16
%3 = and i32 %2, 255
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int info_usage() {
  fprintf(stderr, "Usage: tsdb info [options]\n");
  ;
  fprintf(stderr, " -f filename  db to get info about\n");
  ;
  fprintf(stderr, " -h this help\n");
  ;
  return 1;
}


x86 assembly (clang, -O0):
<info_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xee3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xef2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<info_usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeed(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf03(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"Usage: tsdb info [options]\0A\00"
@.str.1 = [36 x i8] c" -f filename db to get info about\0A\00"
@.str.2 = [15 x i8] c" -h this help\0A\00"
define i32 @info_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"Usage: tsdb info [options]\0A\00"
@.str.1 = [36 x i8] c" -f filename db to get info about\0A\00"
@.str.2 = [15 x i8] c" -h this help\0A\00"
define i32 @info_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
float M_PI;
float sin(float);
float BackEaseIn(float p) { return p * p * p - p * sin(p * M_PI); }


x86 assembly (clang, -O0):
<BackEaseIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mov    0x2e9c(%rip),%rax
mulss  (%rax),%xmm0
call   1030 <sin@plt>
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movaps %xmm0,%xmm3
movss  -0x8(%rbp),%xmm0
mulss  %xmm3,%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BackEaseIn>:
push   %rax
movaps %xmm0,%xmm1
movss  %xmm0,(%rsp)
mulss  %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
mov    0x2ebe(%rip),%rax
movss  (%rax),%xmm0
mulss  %xmm1,%xmm0
call   1030 <sin@plt>
movss  (%rsp),%xmm2
mulss  %xmm2,%xmm0
movss  0x4(%rsp),%xmm1
mulss  %xmm2,%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define float @BackEaseIn(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = load float, float* %2
%7 = load float, float* %2
%8 = load float, float* %2
%9 = load float, float* @M_PI
%10 = fmul float %8, %9
%11 = call float @sin(float %10)
%12 = fmul float %7, %11
%13 = fneg float %12
%14 = call float @llvm.fmuladd.f32(float %5, float %6, float %13)
ret float %14
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define float @BackEaseIn(float %0) {
%2 = fmul float %0, %0
%3 = load float, float* @M_PI
%4 = fmul float %3, %0
%5 = tail call float @sin(float %4)
%6 = fneg float %5
%7 = fmul float %6, %0
%8 = tail call float @llvm.fmuladd.f32(float %2, float %0, float %7)
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void fnop() {
  db(0xD9);
  db(0xD0);
}


x86 assembly (clang, -O0):
<fnop>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xd0,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnop>:
push   %rax
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xd0,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @fnop() {
%1 = call i32 @db(i32 217)
%2 = call i32 @db(i32 208)
ret void
}

LLVM IR (-O2):
define void @fnop() {
%1 = tail call i32 @db(i32 217)
%2 = tail call i32 @db(i32 208)
ret void
}
/* Type definitions */
typedef char *memchr;

/* Variables and functions */
int /*<<< orphan*/ memmove(void *, void const *, size_t);
void *(memcmove)(void *whither, const void *whence, int c, size_t size) {
  char *stop = (memchr)(whence, c, size);
  void *r = NULL;
  if (stop != NULL)
    size = (size_t)(stop - (const char *)whence), r = whither + size;
  memmove(whither, whence, size);
  return r;
}


x86 assembly (clang, -O0):
<memcmove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     115d <memcmove+0x4d>
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <memmove@plt>
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcmove>:
push   %rbx
mov    %rcx,%rdx
sub    %rsi,%rdx
lea    (%rdi,%rdx,1),%rbx
test   %rcx,%rcx
cmove  %rcx,%rdx
cmove  %rcx,%rbx
call   1030 <memmove@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @memcmove(i8* %0, i8* %1, i32 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i64, i64* %8
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %9
store i8* null, i8** %10
%15 = load i8*, i8** %9
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %26
17: ; preds = %4
%18 = load i8*, i8** %9
%19 = load i8*, i8** %6
%20 = ptrtoint i8* %18 to i64
%21 = ptrtoint i8* %19 to i64
%22 = sub i64 %20, %21
store i64 %22, i64* %8
%23 = load i8*, i8** %5
%24 = load i64, i64* %8
%25 = getelementptr i8, i8* %23, i64 %24
store i8* %25, i8** %10
br label %26
26: ; preds = %17, %4
%27 = load i8*, i8** %5
%28 = load i8*, i8** %6
%29 = load i64, i64* %8
%30 = call i32 @memmove(i8* %27, i8* %28, i64 %29)
%31 = load i8*, i8** %10
ret i8* %31
}

LLVM IR (-O2):
define i8* @memcmove(i8* %0, i8* %1, i32 %2, i64 %3) {
%5 = icmp eq i64 %3, 0
%6 = ptrtoint i8* %1 to i64
%7 = sub i64 %3, %6
%8 = getelementptr i8, i8* %0, i64 %7
%9 = select i1 %5, i64 0, i64 %7
%10 = select i1 %5, i8* null, i8* %8
%11 = tail call i32 @memmove(i8* %0, i8* %1, i64 %9)
ret i8* %10
}
/* Variables and functions */
unsigned long long __rdtsc();
void wait_cycles(unsigned long long cycles) {
  unsigned long long t;
  t = __rdtsc();
  while (__rdtsc() - t < cycles) {
  }
}


x86 assembly (clang, -O0):
<wait_cycles>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
rdtsc
shl    $0x20,%rdx
or     %rdx,%rax
mov    %rax,-0x10(%rbp)
rdtsc
shl    $0x20,%rdx
or     %rdx,%rax
sub    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1131 <wait_cycles+0x31>
jmp    1115 <wait_cycles+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_cycles>:
rdtsc
mov    %rdx,%rcx
shl    $0x20,%rcx
or     %rax,%rcx
nopl   0x0(%rax)
rdtsc
shl    $0x20,%rdx
or     %rax,%rdx
sub    %rcx,%rdx
cmp    %rdi,%rdx
jb     1110 <wait_cycles+0x10>
ret

LLVM IR (-O0):
define void @wait_cycles(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = call i64 @llvm.x86.rdtsc()
store i64 %4, i64* %3
br label %5
5: ; preds = %11, %1
%6 = call i64 @llvm.x86.rdtsc()
%7 = load i64, i64* %3
%8 = sub i64 %6, %7
%9 = load i64, i64* %2
%10 = icmp ult i64 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %5
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @wait_cycles(i64 %0) {
%2 = tail call i64 @llvm.x86.rdtsc()
br label %3
3: ; preds = %3, %1
%4 = tail call i64 @llvm.x86.rdtsc()
%5 = sub i64 %4, %2
%6 = icmp ult i64 %5, %0
br i1 %6, label %3, label %7
7: ; preds = %3
ret void
}
/* Type definitions */
struct stat {
  int st_mode;
};

/* Variables and functions */
int S_IRGRP;
scalar_t__ stat(char const *, struct stat *);
int fsop_path_read_group(const char *path) {
  struct stat st;
  if (stat(path, &st) < 0)
    return -1;
  return (st.st_mode & S_IRGRP);
}


x86 assembly (clang, -O0):
<fsop_path_read_group>:
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
jge    113f <fsop_path_read_group+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    114e <fsop_path_read_group+0x3e>
mov    -0x18(%rbp),%eax
mov    0x2e97(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsop_path_read_group>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
and    (%rsp),%ecx
test   %rax,%rax
mov    $0xffffffff,%eax
cmovns %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@S_IRGRP = global i32 0
define i32 @fsop_path_read_group(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 slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %14
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = load i32, i32* @S_IRGRP
%13 = and i32 %11, %12
store i32 %13, i32* %2
br label %14
14: ; preds = %9, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IRGRP = global i32 0
define i32 @fsop_path_read_group(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = load i32, i32* @S_IRGRP
%9 = and i32 %8, %7
%10 = select i1 %5, i32 -1, i32 %9
ret i32 %10
}
void caller_2_1_2_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_1_2_1_1_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _I8080_RET();
void do0xC9() { _I8080_RET(); }


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

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

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

LLVM IR (-O2):
define void @do0xC9() {
%1 = tail call i32 (...) @_I8080_RET()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fputs("Usage: dupenv [-i] [env=val ..] command [args ..]\n", stderr);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"Usage: dupenv [-i] [env=val ..] command [args ..]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [51 x i8] c"Usage: dupenv [-i] [env=val ..] command [args ..]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void abcd9efghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @abcd9efghijklmnopqrstuvwxzy() {
ret void
}
int f() {
  int i;
  int c;
  i = 0;
  c = 0;
  while (i < 100) {
    if (i >= 70) {
      i = i + 1;
      continue;
    }
    c = c + i;
    i = i + 1;
  }
  return c;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    114b <f+0x4b>
cmpl   $0x46,-0x4(%rbp)
jl     1134 <f+0x34>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <f+0x12>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <f+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
xor    %ecx,%ecx
cmp    $0x64,%ecx
mov    $0x63,%esi
cmovge %ecx,%esi
not    %esi
add    %ecx,%esi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
cmp    $0x46,%ecx
jl     1130 <f+0x30>
add    $0xffffffff,%edx
cmp    %edx,%esi
jne    1120 <f+0x20>
jmp    113b <f+0x3b>
xchg   %ax,%ax
add    %ecx,%eax
sub    %edx,%eax
sub    %edx,%ecx
add    $0x1,%ecx
jmp    1104 <f+0x4>
ret

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %12, %9, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %18
6: ; preds = %3
%7 = load i32, i32* %1
%8 = icmp sge i32 %7, 70
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %3
12: ; preds = %6
%13 = load i32, i32* %2
%14 = load i32, i32* %1
%15 = add nsw i32 %13, %14
store i32 %15, i32* %2
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
br label %3
18: ; preds = %3
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @f() {
br label %1
1: ; preds = %11, %0
%2 = phi i32 [ 0, %0 ], [ %12, %11 ]
%3 = phi i32 [ 0, %0 ], [ %13, %11 ]
%4 = call i32 @llvm.smax.i32(i32 %3, i32 99)
%5 = icmp sgt i32 %3, 69
br label %6
6: ; preds = %1, %8
%7 = phi i32 [ %3, %1 ], [ %9, %8 ]
br i1 %5, label %8, label %11
8: ; preds = %6
%9 = add i32 %7, 1
%10 = icmp eq i32 %7, %4
br i1 %10, label %14, label %6
11: ; preds = %6
%12 = add nsw i32 %2, %7
%13 = add nsw i32 %7, 1
br label %1
14: ; preds = %8
ret i32 %2
}
__attribute__((gnu_)) double carmen_knots_to_meters_per_second(double knots) {
  return (0.5148 * knots);
}


x86 assembly (clang, -O0):
<carmen_knots_to_meters_per_second>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @carmen_knots_to_meters_per_second(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 5.148000e-01, %3
ret double %4
}

LLVM IR (-O2):
define double @carmen_knots_to_meters_per_second(double %0) {
%2 = fmul double %0, 5.148000e-01
ret double %2
}
void strupper(char *s) {
  while (*s) {
    if ((*s >= 'a') && (*s <= 'z'))
      *s -= ('a' - 'A');
    s++;
  }
}


x86 assembly (clang, -O0):
<strupper>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <strupper+0x52>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     1141 <strupper+0x41>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jg     1141 <strupper+0x41>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
sub    $0x20,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <strupper+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strupper>:
mov    (%rdi),%al
test   %al,%al
je     112a <strupper+0x2a>
add    $0x1,%rdi
jmp    111b <strupper+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     112a <strupper+0x2a>
lea    -0x61(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <strupper+0x10>
add    $0xe0,%al
mov    %al,-0x1(%rdi)
jmp    1110 <strupper+0x10>
ret

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

LLVM IR (-O2):
define void @strupper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -97
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nsw i8 %5, -32
store i8 %10, i8* %6
br label %11
11: ; preds = %9, %4
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret void
}
int fun1134() { return 1134; }


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

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

LLVM IR (-O0):
define i32 @fun1134() {
ret i32 1134
}

LLVM IR (-O2):
define i32 @fun1134() {
ret i32 1134
}