xunge/DecIR huggingface dataset:
int toint(ch)
char ch;
{
  int return_value;
  switch (ch) {
  case '0': {
    return_value = 0;
    break;
  }
  case '1': {
    return_value = 1;
    break;
  }
  case '2': {
    return_value = 2;
    break;
  }
  case '3': {
    return_value = 3;
    break;
  }
  case '4': {
    return_value = 4;
    break;
  }
  case '5': {
    return_value = 5;
    break;
  }
  case '6': {
    return_value = 6;
    break;
  }
  case '7': {
    return_value = 7;
    break;
  }
  case '8': {
    return_value = 8;
    break;
  }
  case '9': {
    return_value = 9;
    break;
  }
  default:
    return_value = 0;
  }
  return (return_value);
}


x86 assembly (clang, -O0):
<toint>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x9,%eax
ja     11ac <toint+0xac>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x8(%rbp)
jmp    11b3 <toint+0xb3>
movl   $0x1,-0x8(%rbp)
jmp    11b3 <toint+0xb3>
movl   $0x2,-0x8(%rbp)
jmp    11b3 <toint+0xb3>
movl   $0x3,-0x8(%rbp)
jmp    11b3 <toint+0xb3>
movl   $0x4,-0x8(%rbp)
jmp    11b3 <toint+0xb3>
movl   $0x5,-0x8(%rbp)
jmp    11b3 <toint+0xb3>
movl   $0x6,-0x8(%rbp)
jmp    11b3 <toint+0xb3>
movl   $0x7,-0x8(%rbp)
jmp    11b3 <toint+0xb3>
movl   $0x8,-0x8(%rbp)
jmp    11b3 <toint+0xb3>
movl   $0x9,-0x8(%rbp)
jmp    11b3 <toint+0xb3>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toint>:
movsbl %dil,%ecx
lea    -0x31(%rcx),%edx
add    $0xffffffd0,%ecx
xor    %eax,%eax
cmp    $0x9,%edx
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @toint(i32 %0) {
%2 = alloca i8
%3 = alloca i32
%4 = trunc i32 %0 to i8
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
switch i32 %6, label %17 [
i32 48, label %7
i32 49, label %8
i32 50, label %9
i32 51, label %10
i32 52, label %11
i32 53, label %12
i32 54, label %13
i32 55, label %14
i32 56, label %15
i32 57, label %16
]
7: ; preds = %1
store i32 0, i32* %3
br label %18
8: ; preds = %1
store i32 1, i32* %3
br label %18
9: ; preds = %1
store i32 2, i32* %3
br label %18
10: ; preds = %1
store i32 3, i32* %3
br label %18
11: ; preds = %1
store i32 4, i32* %3
br label %18
12: ; preds = %1
store i32 5, i32* %3
br label %18
13: ; preds = %1
store i32 6, i32* %3
br label %18
14: ; preds = %1
store i32 7, i32* %3
br label %18
15: ; preds = %1
store i32 8, i32* %3
br label %18
16: ; preds = %1
store i32 9, i32* %3
br label %18
17: ; preds = %1
store i32 0, i32* %3
br label %18
18: ; preds = %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @toint(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = add nsw i32 %3, -49
%5 = icmp ult i32 %4, 9
%6 = add nsw i32 %3, -48
%7 = select i1 %5, i32 %6, i32 0
ret i32 %7
}
int test_imm_04uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x04 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_04uint64_lowword_reg>:
test   $0x4,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_04uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 4
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISDIR(int /*<<< orphan*/);
int stat(char const *, struct stat *);
int isdir(const char *filename) {
  struct stat st;
  return !(stat(filename, &st) == -1 || !S_ISDIR(st.st_mode));
}


x86 assembly (clang, -O0):
<isdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0xffffffff,%ecx
mov    %al,-0x11(%rbp)
je     115c <isdir+0x3c>
mov    -0x10(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
cmp    $0xffffffff,%eax
je     1141 <isdir+0x21>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @isdir(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i32 %5, -1
br i1 %6, label %13, label %7
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @S_ISDIR(i32 %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
br label %13
13: ; preds = %7, %1
%14 = phi i1 [ true, %1 ], [ %12, %7 ]
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @isdir(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i32 @S_ISDIR(i32 %8)
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
scalar_t__ pow(double, double);
double radians(scalar_t__);
double sun_geometric_mean_anomaly(double tm) {
  return radians(pow(-0.0001537 * tm, 2.0) + 35999.05029 * tm + 357.52911);
}


x86 assembly (clang, -O0):
<sun_geometric_mean_anomaly>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xece(%rip),%xmm1
call   1040 <pow@plt>
cvtsi2sd %rax,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xeaf(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe97(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <radians@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sun_geometric_mean_anomaly>:
push   %rax
movapd %xmm0,%xmm1
movsd  %xmm0,(%rsp)
movsd  0xece(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
call   1040 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm1
mulsd  0xeb8(%rip),%xmm1
addsd  %xmm0,%xmm1
addsd  0xeb4(%rip),%xmm1
cvttsd2si %xmm1,%rdi
pop    %rax
jmp    1030 <radians@plt>

LLVM IR (-O0):
define double @sun_geometric_mean_anomaly(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double -1.537000e-04, %3
%5 = call i64 @pow(double %4, double 2.000000e+00)
%6 = sitofp i64 %5 to double
%7 = load double, double* %2
%8 = call double @llvm.fmuladd.f64(double 0x40E193E19BF9C62A, double %7, double %6)
%9 = fadd double %8, 0x407658773C0C1FC9
%10 = fptosi double %9 to i64
%11 = call double @radians(i64 %10)
ret double %11
}

LLVM IR (-O2):
define double @sun_geometric_mean_anomaly(double %0) {
%2 = fmul double %0, -1.537000e-04
%3 = tail call i64 @pow(double %2, double 2.000000e+00)
%4 = sitofp i64 %3 to double
%5 = tail call double @llvm.fmuladd.f64(double %0, double 0x40E193E19BF9C62A, double %4)
%6 = fadd double %5, 0x407658773C0C1FC9
%7 = fptosi double %6 to i64
%8 = tail call double @radians(i64 %7)
ret double %8
}
/* Variables and functions */
int cache_glob_lookup_file_name(char const *, char const **, int);
int _xdg_mime_cache_get_mime_types_from_file_name(const char *file_name,
                                                  const char *mime_types[],
                                                  int n_mime_types) {
  return cache_glob_lookup_file_name(file_name, mime_types, n_mime_types);
}


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

x86 assembly (clang, -O2):
<_xdg_mime_cache_get_mime_types_from_file_name>:
jmp    1030 <cache_glob_lookup_file_name@plt>

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

LLVM IR (-O2):
define i32 @_xdg_mime_cache_get_mime_types_from_file_name(i8* %0, i8** %1, i32 %2) {
%4 = tail call i32 @cache_glob_lookup_file_name(i8* %0, i8** %1, i32 %2)
ret i32 %4
}
double f5(double x, double y, double z) {
  return (x * (-1.0 / 12)) * z * __builtin_copysign(2.0, y);
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xf05(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movaps 0xecf(%rip),%xmm2
pand   %xmm2,%xmm1
movaps 0xed4(%rip),%xmm2
por    %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
mulsd  0xef8(%rip),%xmm0
andpd  0xf00(%rip),%xmm1
mulsd  %xmm2,%xmm0
orpd   0xf04(%rip),%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f5(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = fmul double %7, 0xBFB5555555555555
%9 = load double, double* %6
%10 = fmul double %8, %9
%11 = load double, double* %5
%12 = call double @llvm.copysign.f64(double 2.000000e+00, double %11)
%13 = fmul double %10, %12
ret double %13
}

LLVM IR (-O2):
define double @f5(double %0, double %1, double %2) {
%4 = fmul double %0, 0xBFB5555555555555
%5 = fmul double %4, %2
%6 = tail call double @llvm.copysign.f64(double 2.000000e+00, double %1)
%7 = fmul double %6, %5
ret double %7
}
int strcmp(const char *cs, const char *ct) {
  register int __res;
  __asm__("cld\n"
          "1:\tlodsb\n\t"
          "scasb\n\t"
          "jne 2f\n\t"
          "testb %%al,%%al\n\t"
          "jne 1b\n\t"
          "xorl %%eax,%%eax\n\t"
          "jmp 3f\n"
          "2:\tmovl $1,%%eax\n\t"
          "jl 3f\n\t"
          "negl %%eax\n"
          "3:"
          : "=a"(__res)
          : "D"(cs), "S"(ct));
  return __res;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
cld
lods   %ds:(%rsi),%al
scas   %es:(%rdi),%al
jne    112c <strcmp+0x2c>
test   %al,%al
jne    1115 <strcmp+0x15>
xor    %eax,%eax
jmp    1139 <strcmp+0x39>
mov    $0x1,%eax
jl     1139 <strcmp+0x39>
neg    %eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
cld
lods   %ds:(%rsi),%al
scas   %es:(%rdi),%al
jne    110d <strcmp+0xd>
test   %al,%al
jne    1101 <strcmp+0x1>
xor    %eax,%eax
jmp    1116 <strcmp+0x16>
mov    $0x1,%eax
jl     1116 <strcmp+0x16>
neg    %eax
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 asm "cld\0A1:\09lodsb\0A\09scasb\0A\09jne 2f\0A\09testb %al,%al\0A\09jne 1b\0A\09xorl %eax,%eax\0A\09jmp 3f\0A2:\09movl $$1,%eax\0A\09jl 3f\0A\09negl %eax\0A3:", "={ax},{di},{si},~{dirflag},~{fpsr},~{flags}"(i8* %6, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @strcmp(i8* readnone %0, i8* readnone %1) {
%3 = tail call i32 asm "cld\0A1:\09lodsb\0A\09scasb\0A\09jne 2f\0A\09testb %al,%al\0A\09jne 1b\0A\09xorl %eax,%eax\0A\09jmp 3f\0A2:\09movl $$1,%eax\0A\09jl 3f\0A\09negl %eax\0A3:", "={ax},{di},{si},~{dirflag},~{fpsr},~{flags}"(i8* %0, i8* %1)
ret i32 %3
}
main() {
  int i;
  for (i = 0; i < 5; i++) {
  }
  printf(i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1143 <main+0x33>
jmp    1135 <main+0x25>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
movslq -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %10
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %3
10: ; preds = %3
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
%14 = call i32 (i8*, ...) @printf(i8* %13)
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 5 to i8*))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ reset_ctour();
void Reset_Contour() { reset_ctour(); }


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

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

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

LLVM IR (-O2):
define void @Reset_Contour() {
%1 = tail call i32 (...) @reset_ctour()
ret void
}
void helper_double_1(double *buf) {
  for (int j = 0; j < 2; j += 2) {
    __asm__ volatile("movupd (%0), %%xmm0\n"
                     "movapd %%xmm0, %%xmm8\n"
                     "haddpd %%xmm8, %%xmm8\n"
                     "movapd %%xmm0, %%xmm9\n"
                     "hsubpd %%xmm9, %%xmm9\n"
                     "blendpd $1, %%xmm8, %%xmm9\n"
                     "movapd %%xmm9, %%xmm0\n"
                     "movupd %%xmm0, (%0)\n" ::"r"(buf + j)
                     : "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5",
                       "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11",
                       "%xmm12", "%xmm13", "%xmm14", "%xmm15", "memory");
  }
}


x86 assembly (clang, -O0):
<helper_double_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    115e <helper_double_1+0x5e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movupd (%rax),%xmm0
movapd %xmm0,%xmm8
haddpd %xmm8,%xmm8
movapd %xmm0,%xmm9
hsubpd %xmm9,%xmm9
blendpd $0x1,%xmm8,%xmm9
movapd %xmm9,%xmm0
movupd %xmm0,(%rax)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <helper_double_1+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper_double_1>:
movupd (%rdi),%xmm0
movapd %xmm0,%xmm8
haddpd %xmm8,%xmm8
movapd %xmm0,%xmm9
hsubpd %xmm9,%xmm9
blendpd $0x1,%xmm8,%xmm9
movapd %xmm9,%xmm0
movupd %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @helper_double_1(double* %0) {
tail call void asm sideeffect "movupd ($0), %xmm0\0Amovapd %xmm0, %xmm8\0Ahaddpd %xmm8, %xmm8\0Amovapd %xmm0, %xmm9\0Ahsubpd %xmm9, %xmm9\0Ablendpd $$1, %xmm8, %xmm9\0Amovapd %xmm9, %xmm0\0Amovupd %xmm0, ($0)\0A", "r,~{xmm0},~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{memory},~{dirflag},~{fpsr},~{flags}"(double* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_tagstruct_putu64() {
  printf("NOT IMPLEMENTED:"
         "pa_tagstruct_putu64"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"NOT IMPLEMENTED:pa_tagstruct_putu64\0A\00"
define i32 @pa_tagstruct_putu64() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [36 x i8] c"NOT IMPLEMENTED:pa_tagstruct_putu64\00"
define i32 @pa_tagstruct_putu64() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ count_secrets(char *);
char *test_with_bzero();
void do_test_with_bzero(int signo) {
  char *buf = test_with_bzero();
  assert((count_secrets(buf)) == (0));
}


x86 assembly (clang, -O0):
<do_test_with_bzero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_with_bzero@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <count_secrets@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_test_with_bzero>:
push   %rax
xor    %eax,%eax
call   1050 <test_with_bzero@plt>
mov    %rax,%rdi
call   1030 <count_secrets@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @do_test_with_bzero(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* (...) @test_with_bzero()
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @count_secrets(i8* %5)
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret void
}

LLVM IR (-O2):
define void @do_test_with_bzero(i32 %0) {
%2 = tail call i8* (...) @test_with_bzero()
%3 = tail call i32 @count_secrets(i8* %2)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret void
}
float iteracao(float a) {
  float soma;
  int i;
  for (i = 1; i <= a; i++) {
    soma = soma + (1 / i);
  }
  return soma;
}


x86 assembly (clang, -O0):
<iteracao>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     114c <iteracao+0x4c>
movss  -0x8(%rbp),%xmm0
mov    $0x1,%eax
cltd
idivl  -0xc(%rbp)
cvtsi2ss %eax,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1110 <iteracao+0x10>
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<iteracao>:
ucomiss 0xef9(%rip),%xmm0
jb     1133 <iteracao+0x33>
mov    $0x2,%eax
xor    %ecx,%ecx
lea    -0x1(%rax),%edx
cmp    $0x2,%edx
cmovae %ecx,%edx
xorps  %xmm2,%xmm2
cvtsi2ss %edx,%xmm2
xorps  %xmm3,%xmm3
cvtsi2ss %eax,%xmm3
addss  %xmm2,%xmm1
add    $0x1,%eax
ucomiss %xmm3,%xmm0
jae    1110 <iteracao+0x10>
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @iteracao(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca i32
store float %0, float* %2
store i32 1, i32* %4
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %4
%7 = sitofp i32 %6 to float
%8 = load float, float* %2
%9 = fcmp ole float %7, %8
br i1 %9, label %10, label %19
10: ; preds = %5
%11 = load float, float* %3
%12 = load i32, i32* %4
%13 = sdiv i32 1, %12
%14 = sitofp i32 %13 to float
%15 = fadd float %11, %14
store float %15, float* %3
br label %16
16: ; preds = %10
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
br label %5
19: ; preds = %5
%20 = load float, float* %3
ret float %20
}

LLVM IR (-O2):
define float @iteracao(float %0) {
%2 = fcmp ult float %0, 1.000000e+00
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %10, %3 ], [ 1, %1 ]
%5 = phi float [ %9, %3 ], [ undef, %1 ]
%6 = icmp ult i32 %4, 2
%7 = select i1 %6, i32 %4, i32 0
%8 = sitofp i32 %7 to float
%9 = fadd float %5, %8
%10 = add nuw nsw i32 %4, 1
%11 = sitofp i32 %10 to float
%12 = fcmp ugt float %11, %0
br i1 %12, label %13, label %3
13: ; preds = %3, %1
%14 = phi float [ undef, %1 ], [ %9, %3 ]
ret float %14
}
void halt(void) {
  sanders_print("halting");
  asm("hlt");
}


x86 assembly (clang, -O0):
<halt>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <sanders_print@plt>
hlt
pop    %rbp
ret

x86 assembly (clang, -O2):
<halt>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <sanders_print@plt>
hlt
pop    %rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"halting\00"
define void @halt() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @sanders_print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"halting\00"
define void @halt() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @sanders_print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ val;

/* Variables and functions */
int /*<<< orphan*/ _doread(unsigned int, unsigned char, unsigned char,
                           unsigned char *, int);
unsigned short do_smbus_read_word(unsigned smbus_io_base, unsigned char device,
                                  unsigned char address) {
  unsigned short val = 0;
  _doread(smbus_io_base, device, address, (unsigned char *)&val, sizeof(val));
  return val;
}


x86 assembly (clang, -O0):
<do_smbus_read_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %edi,-0x4(%rbp)
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movw   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x5(%rbp),%dl
mov    -0x6(%rbp),%al
lea    -0x8(%rbp),%rcx
mov    $0x2,%r8d
movzbl %dl,%esi
movzbl %al,%edx
call   1030 <_doread@plt>
movzwl -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_smbus_read_word>:
push   %rax
movw   $0x0,0x6(%rsp)
lea    0x6(%rsp),%rcx
mov    $0x2,%r8d
call   1030 <_doread@plt>
movzwl 0x6(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @do_smbus_read_word(i32 %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
%7 = alloca i16
store i32 %0, i32* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
store i16 0, i16* %7
%8 = load i32, i32* %4
%9 = load i8, i8* %5
%10 = load i8, i8* %6
%11 = bitcast i16* %7 to i8*
%12 = call i32 @_doread(i32 %8, i8 zeroext %9, i8 zeroext %10, i8* %11, i32 2)
%13 = load i16, i16* %7
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @do_smbus_read_word(i32 %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i16
%5 = bitcast i16* %4 to i8*
store i16 0, i16* %4
%6 = call i32 @_doread(i32 %0, i8 zeroext %1, i8 zeroext %2, i8* %5, i32 2)
%7 = load i16, i16* %4
ret i16 %7
}
int square(int i) { return i * i; }


x86 assembly (clang, -O0):
<square>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<square>:
mov    %edi,%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @square(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @square(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
void dimensions(int x[]) {
  x[0] = 3;
  x[1] = 9;
  x[2] = 1;
  x[3] = 3;
}


x86 assembly (clang, -O0):
<dimensions>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x9,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dimensions>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @dimensions(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 3, i32 9, i32 1, i32 3>, <4 x i32>* %2
ret void
}
void SB_SetCard(int port, int irq, int dma) {}


x86 assembly (clang, -O0):
<SB_SetCard>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @SB_SetCard(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @SB_SetCard(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ current_view();
int /*<<< orphan*/ insertc(int /*<<< orphan*/, char);
void tab_action() { insertc(current_view(), '\t'); }


x86 assembly (clang, -O0):
<tab_action>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <current_view@plt>
mov    %eax,%edi
mov    $0x9,%esi
call   1040 <insertc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tab_action>:
push   %rax
xor    %eax,%eax
call   1030 <current_view@plt>
mov    %eax,%edi
mov    $0x9,%esi
pop    %rax
jmp    1040 <insertc@plt>

LLVM IR (-O0):
define void @tab_action() {
%1 = call i32 (...) @current_view()
%2 = call i32 @insertc(i32 %1, i8 signext 9)
ret void
}

LLVM IR (-O2):
define void @tab_action() {
%1 = tail call i32 (...) @current_view()
%2 = tail call i32 @insertc(i32 %1, i8 signext 9)
ret void
}
signed short signedshort_ignoring_signedshort(signed short x, signed short y) {
  return x;
}


x86 assembly (clang, -O0):
<signedshort_ignoring_signedshort>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i16 @signedshort_ignoring_signedshort(i16 returned signext %0, i16 signext %1) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a;
  a = 10;
#pragma omp target data map(tofrom : a)
  {
#pragma omp target map(tofrom : a)
      {a = a + 1;
}
#pragma omp target update from(a)
}
a = -15;
#pragma omp target update from(a)
printf("test 1: a is %d\n", a);
a = 10;
#pragma omp target map(tofrom : a)
{ a = a + 1; }
#pragma omp target update from(a)
a = -15;
#pragma omp target update from(a)
printf("test 2: a is %d\n", a);
return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0xfffffff1,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0xfffffff1,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xfffffff1,%esi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0xfffffff1,%esi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"test 1: a is %d\0A\00"
@.str.1 = [17 x i8] c"test 2: a is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
store i32 -15, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %5)
store i32 10, i32* %2
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
store i32 -15, i32* %2
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 1
}

LLVM IR (-O2):
@.str = [17 x i8] c"test 1: a is %d\0A\00"
@.str.1 = [17 x i8] c"test 2: a is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 -15)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 -15)
ret i32 1
}
/* Variables and functions */
scalar_t__ isalnum(int);
bool is_ident(int ch) {
  return isalnum(ch) || ch == '_' || ch == '.' || ch == '/';
}


x86 assembly (clang, -O0):
<is_ident>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    115d <is_ident+0x4d>
mov    $0x1,%al
cmpl   $0x5f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115d <is_ident+0x4d>
mov    $0x1,%al
cmpl   $0x2e,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115d <is_ident+0x4d>
cmpl   $0x2f,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ident>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1127 <is_ident+0x17>
pop    %rbx
ret
cmp    $0x2e,%ebx
je     1125 <is_ident+0x15>
cmp    $0x5f,%ebx
je     1125 <is_ident+0x15>
xor    %eax,%eax
cmp    $0x2f,%ebx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_ident(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isalnum(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 95
br i1 %8, label %15, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 46
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 47
br label %15
15: ; preds = %12, %9, %6, %1
%16 = phi i1 [ true, %9 ], [ true, %6 ], [ true, %1 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @is_ident(i32 %0) {
%2 = tail call i64 @isalnum(i32 %0)
%3 = freeze i64 %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
switch i32 %0, label %6 [
i32 95, label %9
i32 46, label %9
]
6: ; preds = %5
%7 = icmp eq i32 %0, 47
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %5, %1, %6
%10 = phi i32 [ 1, %5 ], [ %8, %6 ], [ 1, %1 ], [ 1, %5 ]
ret i32 %10
}
/* Variables and functions */
int strlen(char *);
char *strrchr(char *, char);
char *_optstr(char *s) {
  char *p = strrchr(s, '=');
  return p ? p + 1 : s + strlen(s);
}


x86 assembly (clang, -O0):
<_optstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3d,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115a <_optstr+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    117b <_optstr+0x5b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_optstr>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3d,%esi
call   1040 <strrchr@plt>
test   %rax,%rax
je     1139 <_optstr+0x19>
add    $0x1,%rax
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @_optstr(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 61)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 1
br label %10
6: ; preds = %1
%7 = tail call i32 @strlen(i8* %0)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
br label %10
10: ; preds = %6, %4
%11 = phi i8* [ %5, %4 ], [ %9, %6 ]
ret i8* %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

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


x86 assembly (clang, -O0):
<add_s>:
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
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
addss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @add_s(i32* %0, float* nocapture %1, float* nocapture %2, float* nocapture writeonly %3) {
%5 = tail call i32 @set_rounding(i32* %0)
%6 = load float, float* %1
%7 = load float, float* %2
%8 = fadd float %6, %7
store float %8, float* %3
ret void
}
void fc8300_isr(void *handle) { print_log(0, "%s \n", __func__); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
lea    0xedb(%rip),%rsi
lea    0xed9(%rip),%rdx
mov    $0x0,%al
call   1030 <print_log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
lea    0xee9(%rip),%rsi
lea    0xee7(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <print_log@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%s \0A\00"
@__func__.fc8300_isr = [11 x i8] c"fc8300_isr\00"
define void @fc8300_isr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @print_log to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.fc8300_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s \0A\00"
@__func__.fc8300_isr = [11 x i8] c"fc8300_isr\00"
define void @fc8300_isr(i8* nocapture readnone %0) {
%2 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @print_log to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.fc8300_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OTIR(int, int, int, int);
void op_ED_0xb3(void) {
  OTIR(12, 17, 5, 9);
  return;
}


x86 assembly (clang, -O0):
<op_ED_0xb3>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
mov    $0x11,%esi
mov    $0x5,%edx
mov    $0x9,%ecx
call   1030 <OTIR@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_ED_0xb3>:
mov    $0xc,%edi
mov    $0x11,%esi
mov    $0x5,%edx
mov    $0x9,%ecx
jmp    1030 <OTIR@plt>

LLVM IR (-O0):
define void @op_ED_0xb3() {
%1 = call i32 @OTIR(i32 12, i32 17, i32 5, i32 9)
ret void
}

LLVM IR (-O2):
define void @op_ED_0xb3() {
%1 = tail call i32 @OTIR(i32 12, i32 17, i32 5, i32 9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __sum16;

/* Variables and functions */
int /*<<< orphan*/ csum_fold(int /*<<< orphan*/);
int /*<<< orphan*/ csum_partial(void const *, int, int /*<<< orphan*/);
__sum16 ip_compute_csum(const void *buff, int len) {
  return csum_fold(csum_partial(buff, len, 0));
}


x86 assembly (clang, -O0):
<ip_compute_csum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <csum_partial@plt>
mov    %eax,%edi
call   1040 <csum_fold@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_compute_csum>:
push   %rax
xor    %edx,%edx
call   1030 <csum_partial@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <csum_fold@plt>

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

LLVM IR (-O2):
define i32 @ip_compute_csum(i8* %0, i32 %1) {
%3 = tail call i32 @csum_partial(i8* %0, i32 %1, i32 0)
%4 = tail call i32 @csum_fold(i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int maxSum(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int arr[] = {4, 6, 1, 3, 8, 4, 6};
  int n = sizeof(arr) / sizeof(arr[0]);
  printf("Sum of maximum sum increasing subsequence is %d", maxSum(arr, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x7,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <maxSum@plt>
mov    %eax,%esi
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movups 0xee1(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x7,%esi
call   1030 <maxSum@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [7 x i32] [i32 4, i32 6, i32 1, i32 3, i32 8, i32 4, i32 6]
@.str = [48 x i8] c"Sum of maximum sum increasing subsequence is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [7 x i32]* %2 to i8*
store i32 7, i32* %3
%5 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @maxSum(i32* %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [7 x i32] [i32 4, i32 6, i32 1, i32 3, i32 8, i32 4, i32 6]
@.str = [48 x i8] c"Sum of maximum sum increasing subsequence is %d\00"
define i32 @main() {
%1 = alloca [7 x i32]
%2 = bitcast [7 x i32]* %1 to i8*
%3 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%4 = call i32 @maxSum(i32* %3, i32 7)
%5 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
__attribute__((visibility("default"))) char echo_char(char arg, ...) {
  return arg;
}


x86 assembly (clang, -O0):
<echo_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i8 @echo_char(i8 returned signext %0, ...) {
ret i8 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int mc_getdelim(char **, int *, char, int /*<<< orphan*/ *);
int mc_getline(char **lineptr, int *n, FILE *stream) {
  return mc_getdelim(lineptr, n, '\n', stream);
}


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

x86 assembly (clang, -O2):
<mc_getline>:
mov    %rdx,%rcx
mov    $0xa,%edx
jmp    1030 <mc_getdelim@plt>

LLVM IR (-O0):
define i32 @mc_getline(i8** %0, i32* %1, i32* %2) {
%4 = alloca i8**
%5 = alloca i32*
%6 = alloca i32*
store i8** %0, i8*** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i8**, i8*** %4
%8 = load i32*, i32** %5
%9 = load i32*, i32** %6
%10 = call i32 @mc_getdelim(i8** %7, i32* %8, i8 signext 10, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @mc_getline(i8** %0, i32* %1, i32* %2) {
%4 = tail call i32 @mc_getdelim(i8** %0, i32* %1, i8 signext 10, i32* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void do_top_border(void) {
  printf("\n\n************************************************************\n");
  printf("* MM4PC Game      M=Magenta; Y=Yellow    | Colour   Colour *\n");
  printf("* R=Red; G=Green; B=Blue;    C=Cyan      | & Place    only *\n");
  printf("* -------------------------------------------------------- *\n");
}


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

x86 assembly (clang, -O2):
<do_top_border>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"\0A\0A************************************************************\0A\00"
@.str.1 = [62 x i8] c"* MM4PC Game M=Magenta; Y=Yellow | Colour Colour *\0A\00"
@.str.2 = [62 x i8] c"* R=Red; G=Green; B=Blue; C=Cyan | & Place only *\0A\00"
@.str.3 = [62 x i8] c"* -------------------------------------------------------- *\0A\00"
define void @do_top_border() {
%1 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [63 x i8] c"\0A\0A************************************************************\00"
@str.4 = [61 x i8] c"* MM4PC Game M=Magenta; Y=Yellow | Colour Colour *\00"
@str.5 = [61 x i8] c"* R=Red; G=Green; B=Blue; C=Cyan | & Place only *\00"
@str.6 = [61 x i8] c"* -------------------------------------------------------- *\00"
define void @do_top_border() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
scalar_t__ test1();
int main() {
  int pass = 0;
  pass += test1();
  printf("Tests failed: %i\n", pass);
  if (pass > 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <test1@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    116f <main+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1176 <main+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <test1@plt>
mov    %rax,%rbx
lea    0xece(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
test   %ebx,%ebx
setg   %al
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"Tests failed: %i\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @test1()
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = icmp sgt i32 %2, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void TDB_cmd_help_print_bootstrap() { printf("bootstrap help goes here.\n"); }


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"bootstrap help goes here.\0A\00"
define void @TDB_cmd_help_print_bootstrap() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [26 x i8] c"bootstrap help goes here.\00"
define void @TDB_cmd_help_print_bootstrap() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret void
}