xunge/DecIR huggingface dataset:
long __attribute__((no)) foo(long ct, long cf, _Bool p1, _Bool p2, _Bool p3) {
  long diff;
  diff = ct - cf;
  if (p1) {
    if (p2) {
      if (p3) {
        long tmp = ct;
        ct = cf;
        cf = tmp;
      }
      diff = ct - cf;
    }
    return diff;
  }
  abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %r8b,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
and    $0x1,%dl
mov    %dl,-0x11(%rbp)
and    $0x1,%cl
mov    %cl,-0x12(%rbp)
and    $0x1,%al
mov    %al,-0x13(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
testb  $0x1,-0x11(%rbp)
je     118c <foo+0x7c>
testb  $0x1,-0x12(%rbp)
je     1182 <foo+0x72>
testb  $0x1,-0x13(%rbp)
je     1176 <foo+0x66>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<foo>:
test   %edx,%edx
je     1135 <foo+0x25>
mov    %rdi,%rax
sub    %rsi,%rax
test   %r8b,%r8b
mov    %rsi,%rdx
cmovne %rdi,%rdx
cmovne %rsi,%rdi
sub    %rdx,%rdi
test   %cl,%cl
cmove  %rax,%rdi
mov    %rdi,%rax
ret
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define i64 @foo(i64 %0, i64 %1, i1 zeroext %2, i1 zeroext %3, i1 zeroext %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
%11 = alloca i64
%12 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
%13 = zext i1 %2 to i8
store i8 %13, i8* %8
%14 = zext i1 %3 to i8
store i8 %14, i8* %9
%15 = zext i1 %4 to i8
store i8 %15, i8* %10
%16 = load i64, i64* %6
%17 = load i64, i64* %7
%18 = sub nsw i64 %16, %17
store i64 %18, i64* %11
%19 = load i8, i8* %8
%20 = trunc i8 %19 to i1
br i1 %20, label %21, label %37
21: ; preds = %5
%22 = load i8, i8* %9
%23 = trunc i8 %22 to i1
br i1 %23, label %24, label %35
24: ; preds = %21
%25 = load i8, i8* %10
%26 = trunc i8 %25 to i1
br i1 %26, label %27, label %31
27: ; preds = %24
%28 = load i64, i64* %6
store i64 %28, i64* %12
%29 = load i64, i64* %7
store i64 %29, i64* %6
%30 = load i64, i64* %12
store i64 %30, i64* %7
br label %31
31: ; preds = %27, %24
%32 = load i64, i64* %6
%33 = load i64, i64* %7
%34 = sub nsw i64 %32, %33
store i64 %34, i64* %11
br label %35
35: ; preds = %31, %21
%36 = load i64, i64* %11
ret i64 %36
37: ; preds = %5
unreachable
}

LLVM IR (-O2):
define i64 @foo(i64 %0, i64 %1, i1 zeroext %2, i1 zeroext %3, i1 zeroext %4) {
br i1 %2, label %6, label %12
6: ; preds = %5
%7 = sub nsw i64 %0, %1
%8 = select i1 %4, i64 %0, i64 %1
%9 = select i1 %4, i64 %1, i64 %0
%10 = sub nsw i64 %9, %8
%11 = select i1 %3, i64 %10, i64 %7
ret i64 %11
12: ; preds = %5
tail call void @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ohta17() { printf("Charlie likes  Hemlock.\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Charlie likes Hemlock.\0A\00"
define void @ohta17() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"Charlie likes Hemlock.\00"
define void @ohta17() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
float icsi_log_v2(const float val, register float *const pTable,
                  register const unsigned precision) {
  union _ {
    int i;
    float f;
  };
  register const int *const pVal = &((union _ *)&val)->i;
  register const int exp = ((*pVal >> 23) & 255) - 127;
  register const int man = (*pVal & 0x7FFFFF) >> (23 - precision);
  return ((float)(exp) + pTable[man]) * 0.69314718055995f;
}


x86 assembly (clang, -O0):
<icsi_log_v2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
sar    $0x17,%eax
and    $0xff,%eax
sub    $0x7f,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
and    $0x7fffff,%eax
mov    $0x17,%ecx
sub    -0x14(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x28(%rbp)
cvtsi2ssl -0x24(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
movss  0xea2(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<icsi_log_v2>:
movd   %xmm0,%eax
mov    %eax,%ecx
shr    $0x17,%ecx
movzbl %cl,%edx
and    $0x7fffff,%eax
mov    $0x17,%cl
sub    %sil,%cl
shr    %cl,%eax
add    $0xffffff81,%edx
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
addss  (%rdi,%rax,4),%xmm0
mulss  0xed1(%rip),%xmm0
ret

LLVM IR (-O0):
%union._ = type { i32 }
define float @icsi_log_v2(float %0, float* %1, i32 %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
store float %0, float* %4
store float* %1, float** %5
store i32 %2, i32* %6
%10 = bitcast float* %4 to %union._*
%11 = bitcast %union._* %10 to i32*
store i32* %11, i32** %7
%12 = load i32*, i32** %7
%13 = load i32, i32* %12
%14 = ashr i32 %13, 23
%15 = and i32 %14, 255
%16 = sub nsw i32 %15, 127
store i32 %16, i32* %8
%17 = load i32*, i32** %7
%18 = load i32, i32* %17
%19 = and i32 %18, 8388607
%20 = load i32, i32* %6
%21 = sub i32 23, %20
%22 = ashr i32 %19, %21
store i32 %22, i32* %9
%23 = load i32, i32* %8
%24 = sitofp i32 %23 to float
%25 = load float*, float** %5
%26 = load i32, i32* %9
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds float, float* %25, i64 %27
%29 = load float, float* %28
%30 = fadd float %24, %29
%31 = fmul float %30, 0x3FE62E4300000000
ret float %31
}

LLVM IR (-O2):
define float @icsi_log_v2(float %0, float* nocapture %1, i32 %2) {
%4 = bitcast float %0 to i32
%5 = lshr i32 %4, 23
%6 = and i32 %5, 255
%7 = add nsw i32 %6, -127
%8 = and i32 %4, 8388607
%9 = sub i32 23, %2
%10 = lshr i32 %8, %9
%11 = sitofp i32 %7 to float
%12 = zext i32 %10 to i64
%13 = getelementptr inbounds float, float* %1, i64 %12
%14 = load float, float* %13
%15 = fadd float %14, %11
%16 = fmul float %15, 0x3FE62E4300000000
ret float %16
}
void X509_get1_email(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_get1_email() {
ret void
}
void lm_dump_qam(float si, float sq) {}


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

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

LLVM IR (-O0):
define void @lm_dump_qam(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
ret void
}

LLVM IR (-O2):
define void @lm_dump_qam(float %0, float %1) {
ret void
}
int fun435() { return 435; }


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

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

LLVM IR (-O0):
define i32 @fun435() {
ret i32 435
}

LLVM IR (-O2):
define i32 @fun435() {
ret i32 435
}
/* Variables and functions */
size_t binarytree_tests();
int main(int argc, const char *argv[]) {
  size_t results = binarytree_tests();
  return results != 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <binarytree_tests@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i64 (...) @binarytree_tests()
store i64 %7, i64* %6
%8 = load i64, i64* %6
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @binarytree_tests()
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int abs(int);
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(int);
void main() {
  int x = abs(4);
  print("x 4");
  x = abs(-4);
  printid(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <abs@plt>
mov    %eax,-0x4(%rbp)
lea    0xeb4(%rip),%rdi
call   1040 <print@plt>
mov    $0xfffffffc,%edi
call   1030 <abs@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <printid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <print@plt>
mov    $0x4,%edi
pop    %rax
jmp    1040 <printid@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"x 4\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @abs(i32 4)
store i32 %2, i32* %1
%3 = call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @abs(i32 -4)
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @printid(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"x 4\00"
define void @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 4)
ret void
}
signed int signedint_ignoring_signedint(signed int x, signed int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i32 @signedint_ignoring_signedint(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
ret i32 %5
}

LLVM IR (-O2):
define i32 @signedint_ignoring_signedint(i32 returned %0, i32 %1) {
ret i32 %0
}
void write32le(int in, unsigned char *buf) {
  buf[0] = in & 0xff;
  buf[1] = (in >> 8) & 0xff;
  buf[2] = (in >> 16) & 0xff;
  buf[3] = (in >> 24) & 0xff;
}


x86 assembly (clang, -O0):
<write32le>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write32le>:
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @write32le(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = and i32 %5, 255
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i32, i32* %3
%11 = ashr i32 %10, 8
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i32, i32* %3
%17 = ashr i32 %16, 16
%18 = and i32 %17, 255
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %4
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i32, i32* %3
%23 = ashr i32 %22, 24
%24 = and i32 %23, 255
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %4
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @write32le(i32 %0, i8* nocapture writeonly %1) {
%3 = trunc i32 %0 to i8
store i8 %3, i8* %1
%4 = lshr i32 %0, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %0, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %0, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tag_enable(int);
int /*<<< orphan*/ usleep(int);
void tag_assert(void) {
  ;
  tag_enable(0);
  usleep(10 * 1000);
  tag_enable(1);
}


x86 assembly (clang, -O0):
<tag_assert>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <tag_enable@plt>
mov    $0x2710,%edi
call   1040 <usleep@plt>
mov    $0x1,%edi
call   1030 <tag_enable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tag_assert>:
push   %rax
xor    %edi,%edi
call   1030 <tag_enable@plt>
mov    $0x2710,%edi
call   1040 <usleep@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <tag_enable@plt>

LLVM IR (-O0):
define void @tag_assert() {
%1 = call i32 @tag_enable(i32 0)
%2 = call i32 @usleep(i32 10000)
%3 = call i32 @tag_enable(i32 1)
ret void
}

LLVM IR (-O2):
define void @tag_assert() {
%1 = tail call i32 @tag_enable(i32 0)
%2 = tail call i32 @usleep(i32 10000)
%3 = tail call i32 @tag_enable(i32 1)
ret void
}
int gcd(int m, int n) {
  if (m == n)
    return m;
  if (m > n)
    gcd(m - n, n);
  else
    gcd(m, n - m);
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1135 <gcd+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1162 <gcd+0x52>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1154 <gcd+0x44>
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <gcd@plt>
jmp    1162 <gcd+0x52>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    -0x8(%rbp),%esi
call   1030 <gcd@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
cmp    %esi,%edi
jne    1107 <gcd+0x7>
mov    %edi,%eax
ret
xor    %ecx,%ecx
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
sub    %edi,%edx
jl     1130 <gcd+0x30>
test   $0x1,%cl
cmove  %edi,%eax
mov    $0x1,%cl
mov    %edx,%esi
cmp    %edx,%edi
jne    1110 <gcd+0x10>
jmp    1142 <gcd+0x42>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%edx
sub    %esi,%edx
test   $0x1,%cl
cmove  %edi,%eax
mov    $0x1,%cl
mov    %edx,%edi
cmp    %edx,%esi
jne    1109 <gcd+0x9>
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 returned %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %22, label %4
4: ; preds = %2, %14
%5 = phi i1 [ true, %14 ], [ false, %2 ]
%6 = phi i32 [ %16, %14 ], [ undef, %2 ]
%7 = phi i32 [ %12, %14 ], [ %1, %2 ]
%8 = phi i32 [ %15, %14 ], [ %0, %2 ]
br label %9
9: ; preds = %4, %18
%10 = phi i1 [ %5, %4 ], [ true, %18 ]
%11 = phi i32 [ %6, %4 ], [ %20, %18 ]
%12 = phi i32 [ %7, %4 ], [ %19, %18 ]
%13 = icmp slt i32 %12, %8
br i1 %13, label %14, label %18
14: ; preds = %9
%15 = sub nsw i32 %8, %12
%16 = select i1 %10, i32 %11, i32 %8
%17 = icmp eq i32 %15, %12
br i1 %17, label %22, label %4
18: ; preds = %9
%19 = sub nsw i32 %12, %8
%20 = select i1 %10, i32 %11, i32 %8
%21 = icmp eq i32 %8, %19
br i1 %21, label %22, label %9
22: ; preds = %14, %18, %2
%23 = phi i32 [ %0, %2 ], [ %20, %18 ], [ %16, %14 ]
ret i32 %23
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ strcmp(char *, char *);
char *strdup(char *);
int main() {
  char *e;
  char *p = strdup("Whatever");
  if (!p || strcmp(p, "Whatever"))
    exit(1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1174 <main+0x44>
mov    -0x18(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     117e <main+0x4e>
mov    $0x1,%edi
call   1040 <exit@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <strdup@plt>
test   %rax,%rax
je     115a <main+0x2a>
lea    0xeb7(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    115a <main+0x2a>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Whatever\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i8* @strdup(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load i8*, i8** %3
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %7, %0
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Whatever\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(9) i8* @strdup(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3, %0
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %3
ret i32 0
}
int ft_isnumber(char c) {
  return ((c < '9' && c > '0') || (c < 'e' && c > 'a') || c == '0' || c == 'x');
}


x86 assembly (clang, -O0):
<ft_isnumber>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jge    1129 <ft_isnumber+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jg     1167 <ft_isnumber+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x65,%eax
jge    1148 <ft_isnumber+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x61,%ecx
mov    %al,-0x2(%rbp)
jg     1167 <ft_isnumber+0x67>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
je     1167 <ft_isnumber+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x78,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isnumber>:
lea    -0x31(%rdi),%ecx
mov    $0x1,%eax
cmp    $0x8,%cl
jb     1128 <ft_isnumber+0x28>
lea    -0x30(%rdi),%ecx
cmp    $0x34,%cl
ja     1129 <ft_isnumber+0x29>
movzbl %cl,%ecx
movabs $0x1c000000000001,%rdx
bt     %rcx,%rdx
jae    1129 <ft_isnumber+0x29>
ret
xor    %eax,%eax
cmp    $0x78,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @ft_isnumber(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp slt i32 %4, 57
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sgt i32 %8, 48
br i1 %9, label %26, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp slt i32 %12, 101
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sgt i32 %16, 97
br i1 %17, label %26, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 48
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 120
br label %26
26: ; preds = %22, %18, %14, %6
%27 = phi i1 [ true, %18 ], [ true, %14 ], [ true, %6 ], [ %25, %22 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @ft_isnumber(i8 signext %0) {
%2 = add i8 %0, -49
%3 = icmp ult i8 %2, 8
br i1 %3, label %8, label %4
4: ; preds = %1
switch i8 %0, label %5 [
i8 100, label %8
i8 99, label %8
i8 98, label %8
i8 48, label %8
]
5: ; preds = %4
%6 = icmp eq i8 %0, 120
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %4, %4, %4, %1, %5
%9 = phi i32 [ %7, %5 ], [ 1, %1 ], [ 1, %4 ], [ 1, %4 ], [ 1, %4 ], [ 1, %4 ]
ret i32 %9
}
int test_imm_6Fuint32_mem(unsigned int *val) {
  return ((*val) & (0x6F << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_6Fuint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 111
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ clearLCDLine(int);
void clearline() {
  clearLCDLine(0);
  clearLCDLine(1);
}


x86 assembly (clang, -O0):
<clearline>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <clearLCDLine@plt>
mov    $0x1,%edi
call   1030 <clearLCDLine@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearline>:
push   %rax
xor    %edi,%edi
call   1030 <clearLCDLine@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <clearLCDLine@plt>

LLVM IR (-O0):
define void @clearline() {
%1 = call i32 @clearLCDLine(i32 0)
%2 = call i32 @clearLCDLine(i32 1)
ret void
}

LLVM IR (-O2):
define void @clearline() {
%1 = tail call i32 @clearLCDLine(i32 0)
%2 = tail call i32 @clearLCDLine(i32 1)
ret void
}
void _malloc_postfork(void) { ; }


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

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

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

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

/* Variables and functions */
__attribute__((unused)) uint_fast32_t cop_ld_ule32(const void *buf) {
  const unsigned char *b = buf;
  return ((uint_fast32_t)b[0] << 0) | ((uint_fast32_t)b[1] << 8) |
         ((uint_fast32_t)b[2] << 16) | ((uint_fast32_t)b[3] << 24);
}


x86 assembly (clang, -O0):
<cop_ld_ule32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
shl    $0x0,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cop_ld_ule32>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @cop_ld_ule32(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 0
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = or i32 %9, %14
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 2
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 16
%21 = or i32 %15, %20
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 3
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = shl i32 %25, 24
%27 = or i32 %21, %26
ret i32 %27
}

LLVM IR (-O2):
define i32 @cop_ld_ule32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Variables and functions */
int atol(char *);
int /*<<< orphan*/ itoa(int, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  int n;
  if (argc == 2)
    n = atol(argv[1]);
  else
    n = 0;
  char buf[0x100];
  itoa(n, buf);
  printf("%s\n", buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1168 <main+0x38>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atol@plt>
mov    %eax,-0x14(%rbp)
jmp    116f <main+0x3f>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x120(%rbp),%rsi
call   1050 <itoa@plt>
lea    -0x120(%rbp),%rsi
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x100,%rsp
mov    %edi,%eax
xor    %edi,%edi
cmp    $0x2,%eax
jne    114c <main+0x1c>
mov    0x8(%rsi),%rdi
call   1040 <atol@plt>
mov    %eax,%edi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <itoa@plt>
lea    0xea2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [256 x i8]
%4 = icmp eq i32 %0, 2
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @atol(i8* %7)
br label %9
9: ; preds = %2, %5
%10 = phi i32 [ %8, %5 ], [ 0, %2 ]
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%12 = call i32 @itoa(i32 %10, i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
ret i32 0
}
void sys_exit(int status) {
  asm volatile("movl $1, %%eax;\n\t"
               "int $0x80;"
               :
               : "b"(status)
               :);
}


x86 assembly (clang, -O0):
<sys_exit>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%ebx
mov    $0x1,%eax
int    $0x80
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_exit>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%eax
int    $0x80
pop    %rbx
ret

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

LLVM IR (-O2):
define void @sys_exit(i32 %0) {
tail call void asm sideeffect "movl $$1, %eax;\0A\09int $$0x80;", "{bx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret void
}
/* Variables and functions */
int roadmap_point_count();
int /*<<< orphan*/ roadmap_square_set_current(int);
int roadmap_square_points_count(int square) {
  roadmap_square_set_current(square);
  return roadmap_point_count();
}


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

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

LLVM IR (-O0):
define i32 @roadmap_square_points_count(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @roadmap_square_set_current(i32 %3)
%5 = call i32 (...) @roadmap_point_count()
ret i32 %5
}

LLVM IR (-O2):
define i32 @roadmap_square_points_count(i32 %0) {
%2 = tail call i32 @roadmap_square_set_current(i32 %0)
%3 = tail call i32 (...) @roadmap_point_count()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_nearbyintf();
scalar_t__ nearbyintf(float);
void test_nearbyintf(float f) {
  if (nearbyintf(f) != nearbyintf(f))
    link_failure_nearbyintf();
}


x86 assembly (clang, -O0):
<test_nearbyintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <nearbyintf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <nearbyintf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_nearbyintf+0x3c>
mov    $0x0,%al
call   1030 <link_failure_nearbyintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_nearbyintf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <nearbyintf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1040 <nearbyintf@plt>
cmp    %rax,%rbx
jne    1149 <test_nearbyintf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_nearbyintf@plt>

LLVM IR (-O0):
define void @test_nearbyintf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @nearbyintf(float %3)
%5 = load float, float* %2
%6 = call i64 @nearbyintf(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_nearbyintf()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_nearbyintf(float %0) {
%2 = tail call i64 @nearbyintf(float %0)
%3 = tail call i64 @nearbyintf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_nearbyintf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
void h() {
  int malloc(int);
  int strcpy(int);
}


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

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

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

LLVM IR (-O2):
define void @h() {
ret void
}
/* Variables and functions */
float expf(float);
float sqrtf(float);
float nvGaussian(float x, float s) {
  float c = s * sqrtf(2.0f * 3.14159265358979323846f);
  return expf(-(x * x) / (2.0f * s * s)) / c;
}


x86 assembly (clang, -O0):
<nvGaussian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xec0(%rip),%xmm0
call   1040 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xe87(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
call   1030 <expf@plt>
divss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvGaussian>:
push   %rax
movss  0xee7(%rip),%xmm2
mulss  %xmm1,%xmm2
movss  %xmm2,0x4(%rsp)
movaps 0xee6(%rip),%xmm2
xorps  %xmm0,%xmm2
mulss  %xmm2,%xmm0
movaps %xmm1,%xmm2
addss  %xmm1,%xmm2
mulss  %xmm1,%xmm2
divss  %xmm2,%xmm0
call   1030 <expf@plt>
divss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @nvGaussian(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %4
%7 = call float @sqrtf(float 0x401921FB60000000)
%8 = fmul float %6, %7
store float %8, float* %5
%9 = load float, float* %3
%10 = load float, float* %3
%11 = fmul float %9, %10
%12 = fneg float %11
%13 = load float, float* %4
%14 = fmul float 2.000000e+00, %13
%15 = load float, float* %4
%16 = fmul float %14, %15
%17 = fdiv float %12, %16
%18 = call float @expf(float %17)
%19 = load float, float* %5
%20 = fdiv float %18, %19
ret float %20
}

LLVM IR (-O2):
define float @nvGaussian(float %0, float %1) {
%3 = fmul float %1, 0x40040D9320000000
%4 = fneg float %0
%5 = fmul float %4, %0
%6 = fmul float %1, 2.000000e+00
%7 = fmul float %6, %1
%8 = fdiv float %5, %7
%9 = tail call float @expf(float %8)
%10 = fdiv float %9, %3
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void editorQuit(void) {
  write(STDOUT_FILENO, "\x1b[2J", 4);
  write(STDOUT_FILENO, "\x1b[H", 3);
  exit(0);
}


x86 assembly (clang, -O0):
<editorQuit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<editorQuit>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    (%rbx),%edi
lea    0xec1(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [4 x i8] c"\1B[H\00"
define void @editorQuit() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = call i32 @write(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @write(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [4 x i8] c"\1B[H\00"
define void @editorQuit() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = load i32, i32* @STDOUT_FILENO
%4 = tail call i32 @write(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
int ft_chrpos(const char *chars, char c) {
  int i;
  i = 0;
  while (chars[i] != '\0') {
    if (chars[i] == c)
      return (i);
    i++;
  }
  return (-1);
}


x86 assembly (clang, -O0):
<ft_chrpos>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115b <ft_chrpos+0x5b>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114d <ft_chrpos+0x4d>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1162 <ft_chrpos+0x62>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <ft_chrpos+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_chrpos>:
mov    (%rdi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1122 <ft_chrpos+0x22>
xor    %ecx,%ecx
nopl   (%rax)
cmp    %sil,%dl
je     1123 <ft_chrpos+0x23>
movzbl 0x1(%rdi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <ft_chrpos+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_chrpos(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %9
%6 = phi i64 [ %10, %9 ], [ 0, %2 ]
%7 = phi i8 [ %12, %9 ], [ %3, %2 ]
%8 = icmp eq i8 %7, %1
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = add nuw i64 %6, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %16, label %5
14: ; preds = %5
%15 = trunc i64 %6 to i32
br label %16
16: ; preds = %9, %14, %2
%17 = phi i32 [ -1, %2 ], [ %15, %14 ], [ -1, %9 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ __pfcq_debug(int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ basename(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void __usage(char *_argv0) {
  __pfcq_debug(1,
               "Usage: %s <host> <port> [-c attempts] [-i interval] [-t "
               "timeout] [--tor | -6]\n",
               basename(_argv0));
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<__usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <basename@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xead(%rip),%rsi
call   1040 <__pfcq_debug@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<__usage>:
push   %rax
call   1030 <basename@plt>
lea    0xec3(%rip),%rsi
mov    $0x1,%edi
mov    %eax,%edx
call   1040 <__pfcq_debug@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [79 x i8] c"Usage: %s <host> <port> [-c attempts] [-i interval] [-t timeout] [--tor | -6]\0A\00"
@EX_USAGE = global i32 0
define void @__usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @basename(i8* %3)
%5 = call i32 @__pfcq_debug(i32 1, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @EX_USAGE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@.str = [79 x i8] c"Usage: %s <host> <port> [-c attempts] [-i interval] [-t timeout] [--tor | -6]\0A\00"
@EX_USAGE = global i32 0
define void @__usage(i8* %0) {
%2 = tail call i32 @basename(i8* %0)
%3 = tail call i32 @__pfcq_debug(i32 1, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @EX_USAGE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
int permcmp(int *perm1, int *perm2, int n) {
  int i;
  for (i = 0; i < n; i++)
    if (perm1[i] != perm2[i])
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<permcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    115d <permcmp+0x5d>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     114a <permcmp+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1164 <permcmp+0x64>
jmp    114f <permcmp+0x4f>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <permcmp+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<permcmp>:
test   %edx,%edx
jle    1121 <permcmp+0x21>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    (%rdi,%rcx,4),%edx
cmp    (%rsi,%rcx,4),%edx
jne    1124 <permcmp+0x24>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <permcmp+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @permcmp(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %1, i64 %10
%14 = load i32, i32* %13
%15 = icmp eq i32 %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %7, label %17
17: ; preds = %9, %7, %3
%18 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %18
}
/* Variables and functions */
char *ENOMEM;
char *errno;
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(const char *s) {
  char *new_string = malloc(strlen(s) + 1);
  if (!new_string)
    return errno = ENOMEM, NULL;
  strcpy(new_string, s);
  return new_string;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1181 <strdup+0x51>
mov    0x2e79(%rip),%rax
mov    (%rax),%rcx
mov    0x2e67(%rip),%rax
mov    %rcx,(%rax)
movq   $0x0,-0x8(%rbp)
jmp    1196 <strdup+0x66>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     115a <strdup+0x2a>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    116e <strdup+0x3e>
mov    0x2e7f(%rip),%rax
mov    (%rax),%rax
mov    0x2e6d(%rip),%rcx
mov    %rax,(%rcx)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@ENOMEM = global i8* null
@errno = global i8* null
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %6, 1
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %1
%12 = load i8*, i8** @ENOMEM
store i8* %12, i8** @errno
store i8* null, i8** %2
br label %18
13: ; preds = %1
%14 = load i8*, i8** %4
%15 = load i8*, i8** %3
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i8*, i8** %4
store i8* %17, i8** %2
br label %18
18: ; preds = %13, %11
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
@ENOMEM = global i8* null
@errno = global i8* null
define i8* @strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i8*, i8** @ENOMEM
store i8* %7, i8** @errno
br label %10
8: ; preds = %1
%9 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %10
10: ; preds = %8, %6
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
long CDRgetTD(unsigned char track, unsigned char *buffer) {
  memset(buffer + 1, 0, 3);
  return 0;
}


x86 assembly (clang, -O0):
<CDRgetTD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <memset@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CDRgetTD>:
push   %rax
lea    0x1(%rsi),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <memset@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @CDRgetTD(i8 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = call i32 @memset(i8* %6, i32 0, i32 3)
ret i64 0
}

LLVM IR (-O2):
define i64 @CDRgetTD(i8 zeroext %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = tail call i32 @memset(i8* %3, i32 0, i32 3)
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *argv0) {
  fprintf(stderr, "Usage: %s {+key} {file name(s) ...\n", argv0);
  fprintf(stderr, "Or:    %s {-key} {file name(s) ...\n", argv0);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xeda(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"Usage: %s {+key} {file name(s) ...\0A\00"
@.str.1 = [36 x i8] c"Or: %s {-key} {file name(s) ...\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"Usage: %s {+key} {file name(s) ...\0A\00"
@.str.1 = [36 x i8] c"Or: %s {-key} {file name(s) ...\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = tail call i32 @exit(i32 1)
unreachable
}