xunge/DecIR huggingface dataset:
/* Variables and functions */
int strcmp(const char *s1, const char *s2) {
  size_t i;
  int diff;
  for (i = 0;; i++) {
    diff = ((unsigned char *)s1)[i] - ((unsigned char *)s2)[i];
    if (diff != 0 || s1[i] == '\0')
      return diff;
  }
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1150 <strcmp+0x50>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1155 <strcmp+0x55>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret
jmp    115a <strcmp+0x5a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <strcmp+0x14>

x86 assembly (clang, -O2):
<strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rcx,1),%edx
movzbl (%rsi,%rcx,1),%r8d
mov    %edx,%eax
sub    %r8d,%eax
jne    1128 <strcmp+0x28>
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcmp+0x10>
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ 0, %2 ], [ %15, %3 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = getelementptr inbounds i8, i8* %1, i64 %4
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = sub nsw i32 %7, %10
%12 = icmp ne i32 %11, 0
%13 = icmp eq i8 %6, 0
%14 = select i1 %12, i1 true, i1 %13
%15 = add i64 %4, 1
br i1 %14, label %16, label %3
16: ; preds = %3
ret i32 %11
}
int getByte(int x, int n) {
  n = n << 3;
  x = (x >> n) & 255;
  return x;
}


x86 assembly (clang, -O0):
<getByte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getByte>:
lea    0x0(,%rsi,8),%ecx
sar    %cl,%edi
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @getByte(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 3
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = ashr i32 %7, %8
%10 = and i32 %9, 255
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @getByte(i32 %0, i32 %1) {
%3 = shl i32 %1, 3
%4 = ashr i32 %0, %3
%5 = and i32 %4, 255
ret i32 %5
}
/* Variables and functions */
double exp(int);
double f(double x, double y, double a, double b) {
  return exp(-1 / (a * a) * (x * x - 2 * b * x * y + y * y));
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xeca(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm3
movsd  0xeac(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mulsd  %xmm2,%xmm2
movsd  0xee4(%rip),%xmm4
divsd  %xmm2,%xmm4
mulsd  0xee0(%rip),%xmm3
mulsd  %xmm0,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm0
addsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm4,%xmm1
cvttsd2si %xmm1,%edi
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @f(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %7
%10 = load double, double* %7
%11 = fmul double %9, %10
%12 = fdiv double -1.000000e+00, %11
%13 = load double, double* %5
%14 = load double, double* %5
%15 = load double, double* %8
%16 = fmul double 2.000000e+00, %15
%17 = load double, double* %5
%18 = fmul double %16, %17
%19 = load double, double* %6
%20 = fmul double %18, %19
%21 = fneg double %20
%22 = call double @llvm.fmuladd.f64(double %13, double %14, double %21)
%23 = load double, double* %6
%24 = load double, double* %6
%25 = call double @llvm.fmuladd.f64(double %23, double %24, double %22)
%26 = fmul double %12, %25
%27 = fptosi double %26 to i32
%28 = call double @exp(i32 %27)
ret double %28
}

LLVM IR (-O2):
define double @f(double %0, double %1, double %2, double %3) {
%5 = fmul double %2, %2
%6 = fdiv double -1.000000e+00, %5
%7 = fmul double %3, -2.000000e+00
%8 = fmul double %7, %0
%9 = fmul double %8, %1
%10 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %9)
%11 = tail call double @llvm.fmuladd.f64(double %1, double %1, double %10)
%12 = fmul double %6, %11
%13 = fptosi double %12 to i32
%14 = tail call double @exp(i32 %13)
ret double %14
}
void foo249(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo249(i32 %0) {
ret void
}
/* Type definitions */
struct confctl {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ confctl_root(struct confctl *);
int /*<<< orphan*/ cv_remove(int /*<<< orphan*/, int /*<<< orphan*/);
void cc_remove(struct confctl *cc, struct confctl *remove) {
  cv_remove(confctl_root(cc), confctl_root(remove));
}


x86 assembly (clang, -O0):
<cc_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <confctl_root@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <confctl_root@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <cv_remove@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.confctl = type { i32 }
define void @cc_remove(%struct.confctl* %0, %struct.confctl* %1) {
%3 = alloca %struct.confctl*
%4 = alloca %struct.confctl*
store %struct.confctl* %0, %struct.confctl** %3
store %struct.confctl* %1, %struct.confctl** %4
%5 = load %struct.confctl*, %struct.confctl** %3
%6 = call i32 @confctl_root(%struct.confctl* %5)
%7 = load %struct.confctl*, %struct.confctl** %4
%8 = call i32 @confctl_root(%struct.confctl* %7)
%9 = call i32 @cv_remove(i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.confctl = type { i32 }
define void @cc_remove(%struct.confctl* %0, %struct.confctl* %1) {
%3 = tail call i32 @confctl_root(%struct.confctl* %0)
%4 = tail call i32 @confctl_root(%struct.confctl* %1)
%5 = tail call i32 @cv_remove(i32 %3, i32 %4)
ret void
}
/* Variables and functions */
double _tanh(double);
double tanh(double x) { return _tanh(x); }


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

x86 assembly (clang, -O2):
<tanh>:
jmp    1030 <_tanh@plt>

LLVM IR (-O0):
define double @tanh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @_tanh(double %3)
ret double %4
}

LLVM IR (-O2):
define double @tanh(double %0) {
%2 = tail call double @_tanh(double %0)
ret double %2
}
long int vg_name_to_uuid(long int vg_name_loc, char *buffer) {
  long int vg_uuid_loc;
  while (buffer[vg_name_loc] != 0x20)
    vg_name_loc++;
  vg_uuid_loc = vg_name_loc + 9;
  return vg_uuid_loc;
}


x86 assembly (clang, -O0):
<vg_name_to_uuid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     1132 <vg_name_to_uuid+0x32>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <vg_name_to_uuid+0xc>
mov    -0x8(%rbp),%rax
add    $0x9,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vg_name_to_uuid>:
mov    %rdi,%rax
add    $0x8,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x20,-0x8(%rsi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <vg_name_to_uuid+0x10>
ret

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

LLVM IR (-O2):
define i64 @vg_name_to_uuid(i64 %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %0, %2 ], [ %8, %3 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 32
%8 = add nsw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = add nsw i64 %4, 9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ abort();
unsigned int mod_rhs(int);
void func_44(unsigned int p_45) {
  if (!((p_45 * -9) % mod_rhs(-9))) {
    abort();
  }
}


x86 assembly (clang, -O0):
<func_44>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0xfffffff7,-0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xfffffff7,%edi
call   1040 <mod_rhs@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %edx,%edx
div    %ecx
cmp    $0x0,%edx
jne    1155 <func_44+0x35>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_44>:
push   %rbx
lea    (%rdi,%rdi,8),%ebx
neg    %ebx
mov    $0xfffffff7,%edi
call   1040 <mod_rhs@plt>
mov    %eax,%ecx
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
test   %edx,%edx
je     113e <func_44+0x1e>
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @func_44(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, -9
%5 = call i32 @mod_rhs(i32 -9)
%6 = urem i32 %4, %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @func_44(i32 %0) {
%2 = mul i32 %0, -9
%3 = tail call i32 @mod_rhs(i32 -9)
%4 = urem i32 %2, %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TwDelay(int);
void TwStop(void) {
  (*((volatile unsigned int *)((0xFFFF0000 + 0x10))) = ((1 << 16)));
  TwDelay(8);
  (*((volatile unsigned int *)((0xFFFF0000 + 0x14))) = ((1 << 17)));
  TwDelay(2 * 8);
  (*((volatile unsigned int *)((0xFFFF0000 + 0x14))) = ((1 << 16)));
  TwDelay(8 * 8);
}


x86 assembly (clang, -O0):
<TwStop>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffff0010,%eax
movl   $0x10000,(%rax)
mov    $0x8,%edi
call   1030 <TwDelay@plt>
mov    $0xffff0014,%eax
movl   $0x20000,(%rax)
mov    $0x10,%edi
call   1030 <TwDelay@plt>
mov    $0xffff0014,%eax
movl   $0x10000,(%rax)
mov    $0x40,%edi
call   1030 <TwDelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TwStop>:
push   %rbx
mov    $0xffff0014,%ebx
movl   $0x10000,-0x4(%rbx)
mov    $0x8,%edi
call   1030 <TwDelay@plt>
movl   $0x20000,(%rbx)
mov    $0x10,%edi
call   1030 <TwDelay@plt>
movl   $0x10000,(%rbx)
mov    $0x40,%edi
pop    %rbx
jmp    1030 <TwDelay@plt>

LLVM IR (-O0):
define void @TwStop() {
store volatile i32 65536, i32* inttoptr (i64 4294901776 to i32*)
%1 = call i32 @TwDelay(i32 8)
store volatile i32 131072, i32* inttoptr (i64 4294901780 to i32*)
%2 = call i32 @TwDelay(i32 16)
store volatile i32 65536, i32* inttoptr (i64 4294901780 to i32*)
%3 = call i32 @TwDelay(i32 64)
ret void
}

LLVM IR (-O2):
define void @TwStop() {
store volatile i32 65536, i32* inttoptr (i64 4294901776 to i32*)
%1 = tail call i32 @TwDelay(i32 8)
store volatile i32 131072, i32* inttoptr (i64 4294901780 to i32*)
%2 = tail call i32 @TwDelay(i32 16)
store volatile i32 65536, i32* inttoptr (i64 4294901780 to i32*)
%3 = tail call i32 @TwDelay(i32 64)
ret void
}
int move(int a) { return a; }


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

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

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

LLVM IR (-O2):
define i32 @move(i32 returned %0) {
ret i32 %0
}
int fgLineChangeHandle(char *bRunStt) {
  if (*bRunStt != 'c') {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<fgLineChangeHandle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x63,%eax
je     1124 <fgLineChangeHandle+0x24>
movl   $0xffffffff,-0x4(%rbp)
jmp    112b <fgLineChangeHandle+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgLineChangeHandle>:
xor    %eax,%eax
cmpb   $0x63,(%rdi)
setne  %al
neg    %eax
ret

LLVM IR (-O0):
define i32 @fgLineChangeHandle(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 99
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @fgLineChangeHandle(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp ne i8 %2, 99
%4 = sext i1 %3 to i32
ret i32 %4
}
char *XGetAtomName() {}


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

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

LLVM IR (-O0):
define i8* @XGetAtomName() {
%1 = alloca i8*
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
define noalias i8* @XGetAtomName() {
ret i8* undef
}
/* Variables and functions */
double _StrtodDelim(char const *, char **, char);
double GTIFStrtod(const char *nptr, char **endptr) {
  return _StrtodDelim(nptr, endptr, '.');
}


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

x86 assembly (clang, -O2):
<GTIFStrtod>:
mov    $0x2e,%edx
jmp    1030 <_StrtodDelim@plt>

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

LLVM IR (-O2):
define double @GTIFStrtod(i8* %0, i8** %1) {
%3 = tail call double @_StrtodDelim(i8* %0, i8** %1, i8 signext 46)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ func(int, int, int, int, int, int, int, int);
main() {
  int a, b, c, d, e, f, g, h;
  a = b = c = d = e = f = g = h = 1;
  func(a, b, c, d, e, f, g, h);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x1,-0x20(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    -0x1c(%rbp),%r10d
mov    -0x20(%rbp),%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <func@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
push   $0x1
push   $0x1
call   1030 <func@plt>
add    $0x10,%rsp
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @func(i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_sw_volume_divide() {
  printf("NOT IMPLEMENTED:"
         "pa_sw_volume_divide"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [36 x i8] c"NOT IMPLEMENTED:pa_sw_volume_divide\00"
define i32 @pa_sw_volume_divide() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ _getppid();
pid_t getppid(void) { return _getppid(); }


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

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

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

LLVM IR (-O2):
define i32 @getppid() {
%1 = tail call i32 (...) @_getppid()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ccdvector_free_(double *pVector) { free((void *)pVector); }


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

x86 assembly (clang, -O2):
<ccdvector_free_>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @ccdvector_free_(double* nocapture %0) {
%2 = bitcast double* %0 to i8*
%3 = tail call i32 @free(i8* %2)
ret void
}
void wcnss_wlan_unregister_pm_ops(void *dev, void *pm_ops) {}


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

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

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

LLVM IR (-O2):
define void @wcnss_wlan_unregister_pm_ops(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_dashed_line();
int /*<<< orphan*/ printf(char *);
void print_header(void) {
  print_dashed_line();
  printf("   Date          D           I           H        X        Y        "
         "Z        F\n");
  printf("   (yr)      (deg min)   (deg min)     (nT)     (nT)     (nT)     "
         "(nT)     (nT)\n");
  return;
}


x86 assembly (clang, -O0):
<print_header>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <print_dashed_line@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_header>:
push   %rax
xor    %eax,%eax
call   1040 <print_dashed_line@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xf14(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [80 x i8] c" Date D I H X Y Z F\0A\00"
@.str.1 = [81 x i8] c" (yr) (deg min) (deg min) (nT) (nT) (nT) (nT) (nT)\0A\00"
define void @print_header() {
%1 = call i32 (...) @print_dashed_line()
%2 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [79 x i8] c" Date D I H X Y Z F\00"
@str.2 = [80 x i8] c" (yr) (deg min) (deg min) (nT) (nT) (nT) (nT) (nT)\00"
define void @print_header() {
%1 = tail call i32 (...) @print_dashed_line()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int factors(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  printf("%d", factors(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <factors@plt>
mov    %eax,%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1040 <factors@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @factors(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
void fillByteBuffer(char *buf, char value, int size) {
  do {
    int i;
    for (i = 0; i < size; ++i)
      buf[i] = value;
  } while (0);
}


x86 assembly (clang, -O0):
<fillByteBuffer>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1140 <fillByteBuffer+0x40>
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1118 <fillByteBuffer+0x18>
jmp    1145 <fillByteBuffer+0x45>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fillByteBuffer>:
test   %edx,%edx
jle    1124 <fillByteBuffer+0x14>
push   %rax
mov    %edx,%edx
movzbl %sil,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @fillByteBuffer(i8* nocapture writeonly %0, i8 signext %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int expf(float);
float sigmoid(float x) { return 1 / (1 + expf(-x)); }


x86 assembly (clang, -O0):
<sigmoid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <expf@plt>
mov    %eax,%ecx
add    $0x1,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigmoid>:
push   %rax
xorps  0xee8(%rip),%xmm0
call   1030 <expf@plt>
lea    0x1(%rax),%ecx
add    $0x2,%eax
xor    %edx,%edx
cmp    $0x3,%eax
cmovb  %ecx,%edx
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sigmoid(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fneg float %3
%5 = call i32 @expf(float %4)
%6 = add nsw i32 1, %5
%7 = sdiv i32 1, %6
%8 = sitofp i32 %7 to float
ret float %8
}

LLVM IR (-O2):
define float @sigmoid(float %0) {
%2 = fneg float %0
%3 = tail call i32 @expf(float %2)
%4 = add nsw i32 %3, 1
%5 = add i32 %3, 2
%6 = icmp ult i32 %5, 3
%7 = select i1 %6, i32 %4, i32 0
%8 = sitofp i32 %7 to float
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncmp(char *, char *, int);
void strncmp_diff_length_6() {
  char *x = "234";
  char *y = "12345";
  clang_analyzer_eval(strncmp(x, y, 3) > 0);
}


x86 assembly (clang, -O0):
<strncmp_diff_length_6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_diff_length_6>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"234\00"
@.str.1 = [6 x i8] c"12345\00"
define void @strncmp_diff_length_6() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strncmp(i8* %3, i8* %4, i32 3)
%6 = icmp sgt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"234\00"
@.str.1 = [6 x i8] c"12345\00"
define void @strncmp_diff_length_6() {
%1 = tail call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 3)
%2 = icmp sgt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
int getCounterId(char *objectName) { return 0; }


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

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

LLVM IR (-O0):
define i32 @getCounterId(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @getCounterId(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int draw_frame(uint8_t *src[]) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @draw_frame(i32** nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ message(char *, int, int);
void henchman_collision_advantage(int k_self, int k_other, float v2) {
  message("colliding advantage henchman %d from %d\n", k_self, k_other);
}


x86 assembly (clang, -O0):
<henchman_collision_advantage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed0(%rip),%rdi
call   1030 <message@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<henchman_collision_advantage>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <message@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"colliding advantage henchman %d from %d\0A\00"
define void @henchman_collision_advantage(i32 %0, i32 %1, float %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
store float %2, float* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 @message(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"colliding advantage henchman %d from %d\0A\00"
define void @henchman_collision_advantage(i32 %0, i32 %1, float %2) {
%4 = tail call i32 @message(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
int f01() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @f01() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _elf_free(void *ptr) {
  if (ptr) {
    free(ptr);
  }
}


x86 assembly (clang, -O0):
<_elf_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <_elf_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_elf_free>:
test   %rdi,%rdi
je     111a <_elf_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @_elf_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @_elf_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef scalar_t__ *__m128d;

/* Variables and functions */
__m128d __attribute__((__always___, __nodebug__))
_mm_sub_sd(__m128d a, __m128d b) {
  a[0] -= b[0];
  return a;
}


x86 assembly (clang, -O0):
<_mm_sub_sd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
sub    %rdx,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_sub_sd>:
mov    %rdi,%rax
mov    (%rsi),%rcx
sub    %rcx,(%rdi)
ret

LLVM IR (-O0):
define i64* @_mm_sub_sd(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = getelementptr inbounds i64, i64* %5, i64 0
%7 = load i64, i64* %6
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 0
%10 = load i64, i64* %9
%11 = sub nsw i64 %10, %7
store i64 %11, i64* %9
%12 = load i64*, i64** %3
ret i64* %12
}

LLVM IR (-O2):
define i64* @_mm_sub_sd(i64* returned %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = load i64, i64* %0
%5 = sub nsw i64 %4, %3
store i64 %5, i64* %0
ret i64* %0
}
int compare_int(void *a, void *b) {
  return ((int)a) < ((int)b) ? -1 : (((int)a) > ((int)b) ? 1 : 0);
}


x86 assembly (clang, -O0):
<compare_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmp    %ecx,%eax
jge    1129 <compare_int+0x29>
mov    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1144 <compare_int+0x44>
mov    -0x8(%rbp),%rax
mov    %eax,%edx
mov    -0x10(%rbp),%rax
mov    %eax,%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovg  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_int>:
xor    %ecx,%ecx
cmp    %esi,%edi
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_int(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i32
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i32
%9 = icmp slt i32 %6, %8
br i1 %9, label %10, label %11
10: ; preds = %2
br label %19
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = ptrtoint i8* %12 to i32
%14 = load i8*, i8** %4
%15 = ptrtoint i8* %14 to i32
%16 = icmp sgt i32 %13, %15
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 1, i32 0
br label %19
19: ; preds = %11, %10
%20 = phi i32 [ -1, %10 ], [ %18, %11 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @compare_int(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i8* %1 to i64
%6 = trunc i64 %5 to i32
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ cos(int /*<<< orphan*/);
int /*<<< orphan*/ wPopNumber();
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasCos() { wPushNumber(cos(wPopNumber())); }


x86 assembly (clang, -O0):
<wBasCos>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <wPopNumber@plt>
mov    %eax,%edi
call   1050 <cos@plt>
mov    %eax,%edi
call   1030 <wPushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasCos>:
push   %rax
xor    %eax,%eax
call   1040 <wPopNumber@plt>
mov    %eax,%edi
call   1050 <cos@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <wPushNumber@plt>

LLVM IR (-O0):
define void @wBasCos() {
%1 = call i32 (...) @wPopNumber()
%2 = call i32 @cos(i32 %1)
%3 = call i32 @wPushNumber(i32 %2)
ret void
}

LLVM IR (-O2):
define void @wBasCos() {
%1 = tail call i32 (...) @wPopNumber()
%2 = tail call i32 @cos(i32 %1)
%3 = tail call i32 @wPushNumber(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cmdAdd(char const);
int /*<<< orphan*/ cmdPut();
int /*<<< orphan*/ cmdSubtract(char const);
void cmdPutChar(const char cChar) {
  cmdAdd(cChar);
  cmdPut();
  cmdSubtract(cChar);
}


x86 assembly (clang, -O0):
<cmdPutChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <cmdAdd@plt>
mov    $0x0,%al
call   1050 <cmdPut@plt>
movsbl -0x1(%rbp),%edi
call   1030 <cmdSubtract@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdPutChar>:
push   %rbx
mov    %edi,%ebx
call   1040 <cmdAdd@plt>
xor    %eax,%eax
call   1050 <cmdPut@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <cmdSubtract@plt>

LLVM IR (-O0):
define void @cmdPutChar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @cmdAdd(i8 signext %3)
%5 = call i32 (...) @cmdPut()
%6 = load i8, i8* %2
%7 = call i32 @cmdSubtract(i8 signext %6)
ret void
}

LLVM IR (-O2):
define void @cmdPutChar(i8 signext %0) {
%2 = tail call i32 @cmdAdd(i8 signext %0)
%3 = tail call i32 (...) @cmdPut()
%4 = tail call i32 @cmdSubtract(i8 signext %0)
ret void
}
void Init_geos_c_impl() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int swap(int);
main() {
  uint32_t x;
  x = 0x13;
  printf("x=0x%x, swap=0x%x\n", x, swap(x));
  x = 0x157;
  printf("x=0x%x, swap=0x%x\n", x, swap(x));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x13,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <swap@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
movl   $0x157,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <swap@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x13,%edi
call   1040 <swap@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    $0x13,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x157,%edi
call   1040 <swap@plt>
mov    %rbx,%rdi
mov    $0x157,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"x=0x%x, swap=0x%x\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 19, i32* %1
%2 = load i32, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @swap(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4)
store i32 343, i32* %1
%6 = load i32, i32* %1
%7 = load i32, i32* %1
%8 = call i32 @swap(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"x=0x%x, swap=0x%x\0A\00"
define i32 @main() {
%1 = tail call i32 @swap(i32 19)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 19, i32 %1)
%3 = tail call i32 @swap(i32 343)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 343, i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LDA_();
int /*<<< orphan*/ c64_memAbsoluteAddr();
void LDA_abs(void) {
  c64_memAbsoluteAddr();
  LDA_();
}


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

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

LLVM IR (-O0):
define void @LDA_abs() {
%1 = call i32 (...) @c64_memAbsoluteAddr()
%2 = call i32 (...) @LDA_()
ret void
}

LLVM IR (-O2):
define void @LDA_abs() {
%1 = tail call i32 (...) @c64_memAbsoluteAddr()
%2 = tail call i32 (...) @LDA_()
ret void
}
/* Variables and functions */
int math_errhandling;
int scalanative_libc_math_errhandling() { return math_errhandling; }


x86 assembly (clang, -O0):
<scalanative_libc_math_errhandling>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalanative_libc_math_errhandling>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@math_errhandling = global i32 0
define i32 @scalanative_libc_math_errhandling() {
%1 = load i32, i32* @math_errhandling
ret i32 %1
}

LLVM IR (-O2):
@math_errhandling = global i32 0
define i32 @scalanative_libc_math_errhandling() {
%1 = load i32, i32* @math_errhandling
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int main(int argc, char *argv[]) {
  struct x {
    signed int i : 7;
    unsigned int u : 7;
  } bit = {0, 0};
  int i;
  unsigned int unsigned_result = -13U % 61;
  int signed_result = -13 % 61;
  bit.i = -13, i = -13;
  if (i % bit.u != signed_result)
    abort();
  if (i % (unsigned int)bit.u != unsigned_result)
    abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0x18(%rbp)
movl   $0x2c,-0x20(%rbp)
movl   $0xfffffff3,-0x24(%rbp)
mov    -0x18(%rbp),%ax
and    $0xff80,%ax
or     $0x73,%ax
mov    %ax,-0x18(%rbp)
movl   $0xfffffff3,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%cx
shr    $0x7,%cx
and    $0x7f,%cx
movzwl %cx,%ecx
cltd
idiv   %ecx
cmp    -0x24(%rbp),%edx
je     1172 <main+0x62>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%cx
shr    $0x7,%cx
and    $0x7f,%cx
movzwl %cx,%ecx
xor    %edx,%edx
div    %ecx
cmp    -0x20(%rbp),%edx
je     1198 <main+0x88>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.x = type { i16, [2 x i8] }
@__const.main.bit = { i8, i8, [2 x i8] } { i8 0, i8 0, [2 x i8] undef }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca %struct.x
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%9 = bitcast %struct.x* %5 to i8*
store i32 44, i32* %7
store i32 -13, i32* %8
%10 = bitcast %struct.x* %5 to i16*
%11 = load i16, i16* %10
%12 = and i16 %11, -128
%13 = or i16 %12, 115
store i16 %13, i16* %10
store i32 -13, i32* %6
%14 = load i32, i32* %6
%15 = bitcast %struct.x* %5 to i16*
%16 = load i16, i16* %15
%17 = lshr i16 %16, 7
%18 = and i16 %17, 127
%19 = zext i16 %18 to i32
%20 = srem i32 %14, %19
%21 = load i32, i32* %8
%22 = icmp ne i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %2
%24 = call i32 (...) @abort()
unreachable
25: ; preds = %2
%26 = load i32, i32* %6
%27 = bitcast %struct.x* %5 to i16*
%28 = load i16, i16* %27
%29 = lshr i16 %28, 7
%30 = and i16 %29, 127
%31 = zext i16 %30 to i32
%32 = urem i32 %26, %31
%33 = load i32, i32* %7
%34 = icmp ne i32 %32, %33
br i1 %34, label %35, label %37
35: ; preds = %25
%36 = call i32 (...) @abort()
unreachable
37: ; preds = %25
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void ping(int i0, short i1, void *i2) {
  printf("PING :localhost\r\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<ping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ping>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"PING :localhost\0D\0A\00"
@stdout = global i32 0
define void @ping(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i8*
store i32 %0, i32* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [17 x i8] c"PING :localhost\0D\00"
define void @ping(i32 %0, i16 signext %1, i8* nocapture readnone %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
ret void
}
/* Variables and functions */
float acosf(float);
scalar_t__ ceilf(float);
int nsvg__curveDivs(float r, float arc, float tol) {
  float da = acosf(r / (r + tol)) * 2.0f;
  int divs = (int)ceilf(arc / da);
  if (divs < 2)
    divs = 2;
  return divs;
}


x86 assembly (clang, -O0):
<nsvg__curveDivs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
addss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
call   1030 <acosf@plt>
movss  0xea9(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
call   1040 <ceilf@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    1183 <nsvg__curveDivs+0x63>
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsvg__curveDivs>:
push   %rax
movss  %xmm1,0x4(%rsp)
addss  %xmm0,%xmm2
divss  %xmm2,%xmm0
call   1030 <acosf@plt>
addss  %xmm0,%xmm0
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
call   1040 <ceilf@plt>
cmp    $0x3,%eax
mov    $0x2,%ecx
cmovl  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nsvg__curveDivs(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca i32
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%9 = load float, float* %4
%10 = load float, float* %4
%11 = load float, float* %6
%12 = fadd float %10, %11
%13 = fdiv float %9, %12
%14 = call float @acosf(float %13)
%15 = fmul float %14, 2.000000e+00
store float %15, float* %7
%16 = load float, float* %5
%17 = load float, float* %7
%18 = fdiv float %16, %17
%19 = call i64 @ceilf(float %18)
%20 = trunc i64 %19 to i32
store i32 %20, i32* %8
%21 = load i32, i32* %8
%22 = icmp slt i32 %21, 2
br i1 %22, label %23, label %24
23: ; preds = %3
store i32 2, i32* %8
br label %24
24: ; preds = %23, %3
%25 = load i32, i32* %8
ret i32 %25
}

LLVM IR (-O2):
define i32 @nsvg__curveDivs(float %0, float %1, float %2) {
%4 = fadd float %0, %2
%5 = fdiv float %0, %4
%6 = tail call float @acosf(float %5)
%7 = fmul float %6, 2.000000e+00
%8 = fdiv float %1, %7
%9 = tail call i64 @ceilf(float %8)
%10 = trunc i64 %9 to i32
%11 = icmp sgt i32 %10, 2
%12 = select i1 %11, i32 %10, i32 2
ret i32 %12
}