xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(int);
int main() {
  int a = 1, b = 0, c;
  c = a & b;
  print("c 0");
  printid(c);
  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)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <print@plt>
mov    -0x10(%rbp),%edi
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <print@plt>
xor    %edi,%edi
call   1040 <printid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"c 0\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
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = and i32 %5, %6
store i32 %7, i32* %4
%8 = call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
%10 = call i32 @printid(i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"c 0\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(i32 0)
ret i32 0
}
int isPrime(long long num) {
  long long i = num - 1;
  while (i > 1) {
    if (num % i == 0)
      return 0;
    i--;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x1,-0x18(%rbp)
jle    1150 <isPrime+0x50>
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rdx
jne    113f <isPrime+0x3f>
movl   $0x0,-0x4(%rbp)
jmp    1157 <isPrime+0x57>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <isPrime+0x14>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPrime>:
mov    %rdi,%rcx
jmp    111d <isPrime+0x1d>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rdi,%rax
cqto
idiv   %rcx
test   %rdx,%rdx
je     113e <isPrime+0x3e>
cmp    $0x3,%rcx
jl     1141 <isPrime+0x41>
add    $0xffffffffffffffff,%rcx
mov    %rdi,%rax
or     %rcx,%rax
shr    $0x20,%rax
jne    1110 <isPrime+0x10>
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
test   %rdx,%rdx
jne    111d <isPrime+0x1d>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isPrime(i64 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = sub nsw i64 %5, 1
store i64 %6, i64* %4
br label %7
7: ; preds = %16, %1
%8 = load i64, i64* %4
%9 = icmp sgt i64 %8, 1
br i1 %9, label %10, label %19
10: ; preds = %7
%11 = load i64, i64* %3
%12 = load i64, i64* %4
%13 = srem i64 %11, %12
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 0, i32* %2
br label %20
16: ; preds = %10
%17 = load i64, i64* %4
%18 = add nsw i64 %17, -1
store i64 %18, i64* %4
br label %7
19: ; preds = %7
store i32 1, i32* %2
br label %20
20: ; preds = %19, %15
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @isPrime(i64 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %0, %1 ], [ %4, %6 ]
%4 = add nsw i64 %3, -1
%5 = icmp sgt i64 %3, 2
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = srem i64 %0, %4
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %2
9: ; preds = %2, %6
%10 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %10
}
void test_mulpar(void (*fn)(int, int)) { fn(3, 4); }


x86 assembly (clang, -O0):
<test_mulpar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x3,%edi
mov    $0x4,%esi
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mulpar>:
mov    %rdi,%rax
mov    $0x3,%edi
mov    $0x4,%esi
jmp    *%rax

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

LLVM IR (-O2):
define void @test_mulpar(void (i32, i32)* nocapture %0) {
tail call void %0(i32 3, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __free_cf(void *);
void CGDataProviderRelease(void *item) { __free_cf(item); }


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

x86 assembly (clang, -O2):
<CGDataProviderRelease>:
jmp    1030 <__free_cf@plt>

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

LLVM IR (-O2):
define void @CGDataProviderRelease(i8* %0) {
%2 = tail call i32 @__free_cf(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit_test(int);
int /*<<< orphan*/ print_error(char *, char const *const, int const);
void _fail(const char *const file, const int line) {
  print_error("ERROR: "
              "%s:%d"
              " Failure!\n",
              file, line);
  exit_test(1);
}


x86 assembly (clang, -O0):
<_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xec3(%rip),%rdi
call   1030 <print_error@plt>
mov    $0x1,%edi
call   1040 <exit_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fail>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
call   1030 <print_error@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <exit_test@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"ERROR: %s:%d Failure!\0A\00"
define void @_fail(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 @print_error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = call i32 @exit_test(i32 1)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"ERROR: %s:%d Failure!\0A\00"
define void @_fail(i8* %0, i32 %1) {
%3 = tail call i32 @print_error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%4 = tail call i32 @exit_test(i32 1)
ret void
}
float beyond_dist(float s, float p) {
  if (p > 0)
    return p;
  else if (p < -s)
    return -p - s;
  else
    return 0;
}


x86 assembly (clang, -O0):
<beyond_dist>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    112e <beyond_dist+0x2e>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1177 <beyond_dist+0x77>
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
ucomiss %xmm1,%xmm0
jbe    116f <beyond_dist+0x6f>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1177 <beyond_dist+0x77>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<beyond_dist>:
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm1
ja     1122 <beyond_dist+0x22>
movaps 0xef1(%rip),%xmm3
xorps  %xmm0,%xmm3
ucomiss %xmm1,%xmm3
jbe    1125 <beyond_dist+0x25>
xorps  0xee2(%rip),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @beyond_dist(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %5
%7 = fcmp ogt float %6, 0.000000e+00
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %5
store float %9, float* %3
br label %21
10: ; preds = %2
%11 = load float, float* %5
%12 = load float, float* %4
%13 = fneg float %12
%14 = fcmp olt float %11, %13
br i1 %14, label %15, label %20
15: ; preds = %10
%16 = load float, float* %5
%17 = fneg float %16
%18 = load float, float* %4
%19 = fsub float %17, %18
store float %19, float* %3
br label %21
20: ; preds = %10
store float 0.000000e+00, float* %3
br label %21
21: ; preds = %20, %15, %8
%22 = load float, float* %3
ret float %22
}

LLVM IR (-O2):
define float @beyond_dist(float %0, float %1) {
%3 = fcmp ogt float %1, 0.000000e+00
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = fneg float %0
%6 = fcmp ogt float %5, %1
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = fneg float %1
%9 = fsub float %8, %0
br label %10
10: ; preds = %4, %2, %7
%11 = phi float [ %9, %7 ], [ %1, %2 ], [ 0.000000e+00, %4 ]
ret float %11
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
__attribute__((always_)) uint8_t min_uint8_t(uint8_t a, uint8_t b) {
  return a < b ? a : b;
}


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

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

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

LLVM IR (-O2):
define i64 @min_uint8_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void wtokenfree(char **tokens, int count) {
  while (count--)
    wfree(tokens[count]);
  wfree(tokens);
}


x86 assembly (clang, -O0):
<wtokenfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     114b <wtokenfree+0x3b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <wfree@plt>
jmp    111f <wtokenfree+0xf>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <wfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wtokenfree>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r14
test   %esi,%esi
je     1154 <wtokenfree+0x44>
mov    %esi,%r12d
movslq %esi,%rax
lea    (%r14,%rax,8),%r15
add    $0xfffffffffffffff8,%r15
neg    %r12d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%rbx,8),%rdi
xor    %eax,%eax
call   1030 <wfree@plt>
add    $0xffffffffffffffff,%rbx
cmp    %ebx,%r12d
jne    1140 <wtokenfree+0x30>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <wfree@plt>

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

LLVM IR (-O2):
define void @wtokenfree(i8** %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = sext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = getelementptr inbounds i8*, i8** %0, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 (i8*, ...) bitcast (i32 (...)* @wfree to i32 (i8*, ...)*)(i8* %10)
%12 = trunc i64 %8 to i32
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = tail call i32 (i8**, ...) bitcast (i32 (...)* @wfree to i32 (i8**, ...)*)(i8** %0)
ret void
}
/* Variables and functions */
int cos(double);
double Tween_SinusoidalInOutEasing(double k) {
  return 0.5 * (1 - cos(3.14159265 * k));
}


x86 assembly (clang, -O0):
<Tween_SinusoidalInOutEasing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <cos@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm1
movsd  0xebc(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tween_SinusoidalInOutEasing>:
push   %rax
mulsd  0xee7(%rip),%xmm0
call   1030 <cos@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mulsd  0xed4(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Tween_SinusoidalInOutEasing(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 0x400921FB53C8D4F1, %3
%5 = call i32 @cos(double %4)
%6 = sub nsw i32 1, %5
%7 = sitofp i32 %6 to double
%8 = fmul double 5.000000e-01, %7
ret double %8
}

LLVM IR (-O2):
define double @Tween_SinusoidalInOutEasing(double %0) {
%2 = fmul double %0, 0x400921FB53C8D4F1
%3 = tail call i32 @cos(double %2)
%4 = sub nsw i32 1, %3
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 5.000000e-01
ret double %6
}
/* Variables and functions */
unsigned int bar();
void foo20x3f(void) {
  unsigned int a = bar();
  if (a > 0x3f)
    bar();
}


x86 assembly (clang, -O0):
<foo20x3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <bar@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x3f,-0x4(%rbp)
jbe    1133 <foo20x3f+0x23>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo20x3f>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
cmp    $0x40,%eax
jb     1125 <foo20x3f+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <bar@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @foo20x3f() {
%1 = alloca i32
%2 = call i32 (...) @bar()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ugt i32 %3, 63
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @bar()
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
define void @foo20x3f() {
%1 = tail call i32 (...) @bar()
%2 = icmp ugt i32 %1, 63
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @bar()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char const *, char);
char *strstr(char const *, char *);
int message_is_read(const char *name) {
  const char *flags;
  flags = strstr(name, ":2");
  if (flags == NULL)
    return -1;
  return strchr(flags + 2, 'S') == NULL ? 0 : 1;
}


x86 assembly (clang, -O0):
<message_is_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1157 <message_is_read+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <message_is_read+0x5d>
mov    -0x18(%rbp),%rdi
add    $0x2,%rdi
mov    $0x53,%esi
call   1030 <strchr@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<message_is_read>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <strstr@plt>
test   %rax,%rax
je     1150 <message_is_read+0x30>
add    $0x2,%rax
mov    %rax,%rdi
mov    $0x53,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c":2\00"
define i32 @message_is_read(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strstr(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %17
10: ; preds = %1
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = call i32* @strchr(i8* %12, i8 signext 83)
%14 = icmp eq i32* %13, null
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 0, i32 1
store i32 %16, i32* %2
br label %17
17: ; preds = %10, %9
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [3 x i8] c":2\00"
define i32 @message_is_read(i8* %0) {
%2 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 2
%6 = tail call i32* @strchr(i8* %5, i8 signext 83)
%7 = icmp ne i32* %6, null
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %1, %4
%10 = phi i32 [ %8, %4 ], [ -1, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void answerInsult(char *string) { printf("%s\n", string); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @answerInsult(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
const char *picosat_version(void) { return "960"; }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"960\00"
define i8* @picosat_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ f(int, int, int, int);
main() { f(1, 2, 3, 4); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <f@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @f(i32 1, i32 2, i32 3, i32 4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 1, i32 2, i32 3, i32 4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_and_si64(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_and_si64(__m64 a, __m64 b) { return _mm_and_si64(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_and_si64>:
jmp    1030 <_mm_and_si64@plt>

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

LLVM IR (-O2):
define i32 @test_mm_and_si64(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_and_si64(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Uart_Putch(int);
void Uart_Print(char *UartPrintData) {
  while (*UartPrintData != '\0') {
    Uart_Putch(*UartPrintData);
    if (*UartPrintData == 0x0A)
      Uart_Putch(0x0D);
    UartPrintData++;
  }
}


x86 assembly (clang, -O0):
<Uart_Print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1163 <Uart_Print+0x53>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <Uart_Putch@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1152 <Uart_Print+0x42>
mov    $0xd,%edi
call   1030 <Uart_Putch@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <Uart_Print+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Uart_Print>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1145 <Uart_Print+0x35>
mov    %rdi,%rbx
add    $0x1,%rbx
jmp    112b <Uart_Print+0x1b>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1145 <Uart_Print+0x35>
movsbl %al,%edi
call   1030 <Uart_Putch@plt>
cmpb   $0xa,-0x1(%rbx)
jne    1120 <Uart_Print+0x10>
mov    $0xd,%edi
call   1030 <Uart_Putch@plt>
jmp    1120 <Uart_Print+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @Uart_Print(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %13
%5 = phi i8 [ %15, %13 ], [ %2, %1 ]
%6 = phi i8* [ %14, %13 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i32 @Uart_Putch(i32 %7)
%9 = load i8, i8* %6
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = tail call i32 @Uart_Putch(i32 13)
br label %13
13: ; preds = %11, %4
%14 = getelementptr inbounds i8, i8* %6, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %13, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char mat[200][100];
  strcpy(mat[0], "paulo");
  printf("%s", mat[0]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4e20,%rsp
lea    -0x4e20(%rbp),%rdi
lea    0xec7(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x4e20(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x4e20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x4e20,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x4e20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"paulo\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [200 x [100 x i8]]
%2 = getelementptr inbounds [200 x [100 x i8]], [200 x [100 x i8]]* %1, i64 0, i64 0
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [200 x [100 x i8]], [200 x [100 x i8]]* %1, i64 0, i64 0
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"paulo\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [200 x [100 x i8]]
%2 = getelementptr inbounds [200 x [100 x i8]], [200 x [100 x i8]]* %1, i64 0, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ c_function();
void b_function(void) { c_function(); }


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

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

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

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

/* Variables and functions */
int FE_ALL_EXCEPT;
int /*<<< orphan*/ fegetenv(int *);
int /*<<< orphan*/ feraiseexcept(int);
int /*<<< orphan*/ fesetenv(int /*<<< orphan*/ const *);
int feupdateenv(const fenv_t *__envp) {
  fexcept_t __fpscr;
  fegetenv(&__fpscr);
  fesetenv(__envp);
  feraiseexcept(__fpscr & FE_ALL_EXCEPT);
  return 0;
}


x86 assembly (clang, -O0):
<feupdateenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1050 <fegetenv@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fesetenv@plt>
mov    -0xc(%rbp),%edi
mov    0x2e88(%rip),%rax
and    (%rax),%edi
call   1030 <feraiseexcept@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<feupdateenv>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
call   1050 <fegetenv@plt>
mov    %rbx,%rdi
call   1040 <fesetenv@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
and    0xc(%rsp),%edi
call   1030 <feraiseexcept@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@FE_ALL_EXCEPT = global i32 0
define i32 @feupdateenv(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 @fegetenv(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @fesetenv(i32* %5)
%7 = load i32, i32* %3
%8 = load i32, i32* @FE_ALL_EXCEPT
%9 = and i32 %7, %8
%10 = call i32 @feraiseexcept(i32 %9)
ret i32 0
}

LLVM IR (-O2):
@FE_ALL_EXCEPT = global i32 0
define i32 @feupdateenv(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fegetenv(i32* %2)
%5 = call i32 @fesetenv(i32* %0)
%6 = load i32, i32* %2
%7 = load i32, i32* @FE_ALL_EXCEPT
%8 = and i32 %7, %6
%9 = call i32 @feraiseexcept(i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
scalar_t__ calloc(size_t, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
double *new_vector_double(size_t size) {
  double *pRet = (double *)calloc(size, sizeof(double));
  if (!pRet) {
    perror("Out of memory when initializing double vector\n");
    exit(EXIT_FAILURE);
  }
  return pRet;
}


x86 assembly (clang, -O0):
<new_vector_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <new_vector_double+0x43>
lea    0xea0(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_vector_double>:
push   %rax
mov    $0x8,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1142 <new_vector_double+0x12>
pop    %rcx
ret
lea    0xeb7(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"Out of memory when initializing double vector\0A\00"
@EXIT_FAILURE = global i32 0
define double* @new_vector_double(i64 %0) {
%2 = alloca i64
%3 = alloca double*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @calloc(i64 %4, i32 8)
%6 = inttoptr i64 %5 to double*
store double* %6, double** %3
%7 = load double*, double** %3
%8 = icmp ne double* %7, null
br i1 %8, label %13, label %9
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
%14 = load double*, double** %3
ret double* %14
}

LLVM IR (-O2):
@.str = [47 x i8] c"Out of memory when initializing double vector\0A\00"
@EXIT_FAILURE = global i32 0
define double* @new_vector_double(i64 %0) {
%2 = tail call i64 @calloc(i64 %0, i32 8)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
%9 = inttoptr i64 %2 to double*
ret double* %9
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ pl_setup_mount_ns();
void pl_unshare_mount() {
  char *env = getenv("PLASH_NO_UNSHARE");
  if (env && env[0] != '\0')
    return;
  pl_setup_mount_ns();
}


x86 assembly (clang, -O0):
<pl_unshare_mount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1158 <pl_unshare_mount+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1158 <pl_unshare_mount+0x38>
jmp    115f <pl_unshare_mount+0x3f>
mov    $0x0,%al
call   1040 <pl_setup_mount_ns@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl_unshare_mount>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1139 <pl_unshare_mount+0x19>
cmpb   $0x0,(%rax)
je     1139 <pl_unshare_mount+0x19>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <pl_setup_mount_ns@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"PLASH_NO_UNSHARE\00"
define void @pl_unshare_mount() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %12
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %5
br label %14
12: ; preds = %5, %0
%13 = call i32 (...) @pl_setup_mount_ns()
br label %14
14: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"PLASH_NO_UNSHARE\00"
define void @pl_unshare_mount() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3, %0
%7 = tail call i32 (...) @pl_setup_mount_ns()
br label %8
8: ; preds = %3, %6
ret void
}
void pmu_adc_reset_setting() {}


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

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

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

LLVM IR (-O2):
define void @pmu_adc_reset_setting() {
ret void
}
/* Variables and functions */
int hex2data(int, char const *);
int /*<<< orphan*/ send_servo_to_gain(int, int);
void eval_set_gain_message(const char in[]) {
  int servoid, value;
  servoid = hex2data(2, in);
  value = hex2data(2, &in[2]);
  send_servo_to_gain(servoid, value);
}


x86 assembly (clang, -O0):
<eval_set_gain_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x2,%edi
call   1040 <hex2data@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
add    $0x2,%rsi
mov    $0x2,%edi
call   1040 <hex2data@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <send_servo_to_gain@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_set_gain_message>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x2,%edi
mov    %rbx,%rsi
call   1040 <hex2data@plt>
mov    %eax,%ebp
add    $0x2,%rbx
mov    $0x2,%edi
mov    %rbx,%rsi
call   1040 <hex2data@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <send_servo_to_gain@plt>

LLVM IR (-O0):
define void @eval_set_gain_message(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @hex2data(i32 2, i8* %5)
store i32 %6, i32* %3
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 2
%9 = call i32 @hex2data(i32 2, i8* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @send_servo_to_gain(i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @eval_set_gain_message(i8* %0) {
%2 = tail call i32 @hex2data(i32 2, i8* %0)
%3 = getelementptr inbounds i8, i8* %0, i64 2
%4 = tail call i32 @hex2data(i32 2, i8* %3)
%5 = tail call i32 @send_servo_to_gain(i32 %2, i32 %4)
ret void
}
void ARGBGray() {}


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

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

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

LLVM IR (-O2):
define void @ARGBGray() {
ret void
}
void tiff_lzw_calc_maxcode(int bpc, int *maxcode) {
  *maxcode = ((1L << bpc) - 1) - 1;
}


x86 assembly (clang, -O0):
<tiff_lzw_calc_maxcode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
sub    $0x1,%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tiff_lzw_calc_maxcode>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%rax
add    $0xfffffffe,%eax
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @tiff_lzw_calc_maxcode(i32 %0, i32* nocapture writeonly %1) {
%3 = zext i32 %0 to i64
%4 = shl nuw i64 1, %3
%5 = trunc i64 %4 to i32
%6 = add i32 %5, -2
store i32 %6, i32* %1
ret void
}
__attribute__((visibility("default"))) void ShowCFB(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ perm_cmdline_parser_release(struct perm_args_info *);
void perm_cmdline_parser_free(struct perm_args_info *args_info) {
  perm_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<perm_cmdline_parser_free>:
jmp    1030 <perm_cmdline_parser_release@plt>

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

LLVM IR (-O2):
%struct.perm_args_info = type { i32 }
define void @perm_cmdline_parser_free(%struct.perm_args_info* %0) {
%2 = tail call i32 @perm_cmdline_parser_release(%struct.perm_args_info* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_compression_mode_pg(struct list_head *, int);
uint8_t set_default_comp(struct list_head *l, int lvl) {
  ;
  return set_compression_mode_pg(l, lvl);
}


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

x86 assembly (clang, -O2):
<set_default_comp>:
jmp    1030 <set_compression_mode_pg@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define i32 @set_default_comp(%struct.list_head* %0, i32 %1) {
%3 = alloca %struct.list_head*
%4 = alloca i32
store %struct.list_head* %0, %struct.list_head** %3
store i32 %1, i32* %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = load i32, i32* %4
%7 = call i32 @set_compression_mode_pg(%struct.list_head* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define i32 @set_default_comp(%struct.list_head* %0, i32 %1) {
%3 = tail call i32 @set_compression_mode_pg(%struct.list_head* %0, i32 %1)
ret i32 %3
}
void foo(void) {
  char a[1024];
  char *p = &a[0];
  char *p2;
  p2 = p + 1024;
  do {
    p += 2;
    *(p - 2) = 1;
    *(p - 1) = 1;
  } while (p < p2);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x390,%rsp
lea    -0x400(%rbp),%rax
mov    %rax,-0x408(%rbp)
mov    -0x408(%rbp),%rax
add    $0x400,%rax
mov    %rax,-0x410(%rbp)
mov    -0x408(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x408(%rbp)
mov    -0x408(%rbp),%rax
movb   $0x1,-0x2(%rax)
mov    -0x408(%rbp),%rax
movb   $0x1,-0x1(%rax)
mov    -0x408(%rbp),%rax
cmp    -0x410(%rbp),%rax
jb     112d <foo+0x2d>
add    $0x390,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca [1024 x i8]
%2 = alloca i8*
%3 = alloca i8*
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 1024
store i8* %6, i8** %3
br label %7
7: ; preds = %14, %0
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 2
store i8* %9, i8** %2
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 -2
store i8 1, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 -1
store i8 1, i8* %13
br label %14
14: ; preds = %7
%15 = load i8*, i8** %2
%16 = load i8*, i8** %3
%17 = icmp ult i8* %15, %16
br i1 %17, label %7, label %18
18: ; preds = %14
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ execlp(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  if (argc == 0)
    exit(EXIT_SUCCESS);
  execlp("/proc/self/exe", NULL);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    114e <main+0x2e>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>
lea    0xeab(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <execlp@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
test   %edi,%edi
jne    1133 <main+0x13>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>
lea    0xec6(%rip),%rdi
xor    %esi,%esi
call   1040 <execlp@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
@.str = [15 x i8] c"/proc/self/exe\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @EXIT_SUCCESS
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %2
%12 = call i32 @execlp(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* null)
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@.str = [15 x i8] c"/proc/self/exe\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @EXIT_SUCCESS
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %2
%8 = tail call i32 @execlp(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* null)
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
}
int has_MMX(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @has_MMX() {
ret i32 0
}
/* Variables and functions */
int sprintf(char *, char *, int);
int lengthSet(char *buf, int len) {
  return sprintf(buf, "Content-Length: %d\n", len);
}


x86 assembly (clang, -O0):
<lengthSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lengthSet>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Content-Length: %d\0A\00"
define i32 @lengthSet(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 @sprintf(i8* %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [20 x i8] c"Content-Length: %d\0A\00"
define i32 @lengthSet(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %3
}
void RTManifestEntryAdd(void) {}


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

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

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

LLVM IR (-O2):
define void @RTManifestEntryAdd() {
ret void
}
void jit_patch_external_calls(struct jit *jit) {}


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

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

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

LLVM IR (-O2):
%struct.jit = type opaque
define void @jit_patch_external_calls(%struct.jit* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strlen(char *);
void stub1();
int main(void) {
  char *shellcode = "\xeb\x0a\x5f\x6a\x3b\x58\x31\xf6\x31\xd2\x0f\x05\xe8\xf1"
                    "\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68";
  printf("strlen(shellcode)=%d\n", strlen(shellcode));
  ((void (*)(void))shellcode)();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
lea    0xecd(%rip),%rdi
call   1040 <printf@plt>
call   *-0x10(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [25 x i8] c"\EB\0A_j;X1\F61\D2\0F\05\E8\F1\FF\FF\FF/bin/sh\00"
@.str.1 = [22 x i8] c"strlen(shellcode)=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to void ()*
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"\EB\0A_j;X1\F61\D2\0F\05\E8\F1\FF\FF\FF/bin/sh\00"
@.str.1 = [22 x i8] c"strlen(shellcode)=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %1)
tail call void bitcast ([25 x i8]* @.str to void ()*)()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void fputs() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


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

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

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

LLVM IR (-O2):
define void @fputs() {
%1 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void error(const char *msg) {
  printf("%s\n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ update_job_bar();
void ui_stat_job_bar_redraw(void) { update_job_bar(); }


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

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

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

LLVM IR (-O2):
define void @ui_stat_job_bar_redraw() {
%1 = tail call i32 (...) @update_job_bar()
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOTSUP;
int /*<<< orphan*/ errno;
int _stat(char *file, struct stat *st) {
  errno = ENOTSUP;
  return -1;
}


x86 assembly (clang, -O0):
<_stat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_stat>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @_stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* @ENOTSUP
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @_stat(i8* nocapture readnone %0, %struct.stat* nocapture readnone %1) {
%3 = load i32, i32* @ENOTSUP
store i32 %3, i32* @errno
ret i32 -1
}