xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  short descent;
};
struct TYPE_4__ {
  TYPE_1__ min_bounds;
};
typedef TYPE_2__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_min_bounds_descent(void *_p, short _v) {
  ((XFontStruct *)_p)->min_bounds.descent = (short)_v;
}


x86 assembly (clang, -O0):
<set_XFontStruct_min_bounds_descent>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XFontStruct_min_bounds_descent>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i16 }
define void @set_XFontStruct_min_bounds_descent(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i16 %5, i16* %9
ret void
}

LLVM IR (-O2):
define void @set_XFontStruct_min_bounds_descent(i8* nocapture writeonly %0, i16 signext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
int isnan(double X) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @isnan(double %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test2();
void test_test2() { test2(); }


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

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

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

LLVM IR (-O2):
define void @test_test2() {
%1 = tail call i32 (...) @test2()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *rearrange(char *, int, int);
int strlen(char *);
void main() {
  char str[] = "daabbcc";
  int len = strlen(str);
  printf(" String after rearrangement is %s", rearrange(str, len, 2));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x2,%edx
call   1050 <rearrange@plt>
mov    %rax,%rsi
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x63636262616164,%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x2,%edx
call   1050 <rearrange@plt>
lea    0xe99(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [8 x i8] c"daabbcc\00"
@.str = [34 x i8] c" String after rearrangement is %s\00"
define void @main() {
%1 = alloca [8 x i8]
%2 = alloca i32
%3 = bitcast [8 x i8]* %1 to i8*
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %2
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i8* @rearrange(i8* %6, i32 %7, i32 2)
%9 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c" String after rearrangement is %s\00"
define void @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 27975296902848868, i64* %1
%3 = call i32 @strlen(i8* %2)
%4 = call i8* @rearrange(i8* %2, i32 %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
float fasterexp(float);
float fastersinh(float p) { return 0.5f * (fasterexp(p) - fasterexp(-p)); }


x86 assembly (clang, -O0):
<fastersinh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fasterexp@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <fasterexp@plt>
movss  -0x8(%rbp),%xmm1
subss  %xmm0,%xmm1
movss  0xeac(%rip),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastersinh>:
sub    $0x28,%rsp
movaps %xmm0,0x10(%rsp)
call   1030 <fasterexp@plt>
movss  %xmm0,0xc(%rsp)
movaps 0x10(%rsp),%xmm0
xorps  0xed0(%rip),%xmm0
call   1030 <fasterexp@plt>
movss  0xc(%rsp),%xmm1
subss  %xmm0,%xmm1
mulss  0xec9(%rip),%xmm1
movaps %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define float @fastersinh(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @fasterexp(float %3)
%5 = load float, float* %2
%6 = fneg float %5
%7 = call float @fasterexp(float %6)
%8 = fsub float %4, %7
%9 = fmul float 5.000000e-01, %8
ret float %9
}

LLVM IR (-O2):
define float @fastersinh(float %0) {
%2 = tail call float @fasterexp(float %0)
%3 = fneg float %0
%4 = tail call float @fasterexp(float %3)
%5 = fsub float %2, %4
%6 = fmul float %5, 5.000000e-01
ret float %6
}
/* Variables and functions */
char hexDigit(int);
int /*<<< orphan*/ write(int, char *, int);
void writeHexByte(int f, char c) {
  char s[2];
  int i = (unsigned int)c;
  s[0] = hexDigit(i >> 4);
  s[1] = hexDigit(i & 0xf);
  write(f, s, 2);
}


x86 assembly (clang, -O0):
<writeHexByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
sar    $0x4,%edi
call   1040 <hexDigit@plt>
mov    %al,-0x7(%rbp)
mov    -0xc(%rbp),%edi
and    $0xf,%edi
call   1040 <hexDigit@plt>
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x7(%rbp),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeHexByte>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
sar    $0x4,%edi
call   1040 <hexDigit@plt>
mov    %al,0x6(%rsp)
and    $0xf,%ebx
mov    %ebx,%edi
call   1040 <hexDigit@plt>
mov    %al,0x7(%rsp)
lea    0x6(%rsp),%rsi
mov    %ebp,%edi
mov    $0x2,%edx
call   1030 <write@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @writeHexByte(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca [2 x i8]
%6 = alloca i32
store i32 %0, i32* %3
store i8 %1, i8* %4
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = ashr i32 %9, 4
%11 = call signext i8 @hexDigit(i32 %10)
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %11, i8* %12
%13 = load i32, i32* %6
%14 = and i32 %13, 15
%15 = call signext i8 @hexDigit(i32 %14)
%16 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 %15, i8* %16
%17 = load i32, i32* %3
%18 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%19 = call i32 @write(i32 %17, i8* %18, i32 2)
ret void
}

LLVM IR (-O2):
define void @writeHexByte(i32 %0, i8 signext %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = sext i8 %1 to i32
%6 = ashr i32 %5, 4
%7 = tail call signext i8 @hexDigit(i32 %6)
store i8 %7, i8* %4
%8 = and i32 %5, 15
%9 = tail call signext i8 @hexDigit(i32 %8)
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %9, i8* %10
%11 = call i32 @write(i32 %0, i8* %4, i32 2)
ret void
}
int number(l) {
  if (l < 'a' && l > 'z' && l < 'A' && l > 'Z')
    return (-1);
  else if (l >= 'a' && l <= 'z')
    return (l - 'a');
  else
    return (l - 'A');
}


x86 assembly (clang, -O0):
<number>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jge    113b <number+0x3b>
cmpl   $0x7a,-0x8(%rbp)
jle    113b <number+0x3b>
cmpl   $0x41,-0x8(%rbp)
jge    113b <number+0x3b>
cmpl   $0x5a,-0x8(%rbp)
jle    113b <number+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <number+0x66>
cmpl   $0x61,-0x8(%rbp)
jl     115d <number+0x5d>
cmpl   $0x7a,-0x8(%rbp)
jg     115d <number+0x5d>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <number+0x66>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<number>:
lea    -0x61(%rdi),%ecx
lea    -0x41(%rdi),%eax
cmp    $0x1a,%ecx
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @number(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -65
%5 = select i1 %3, i32 %2, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ clean_hash();
void clean_routine() { clean_hash(); }


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

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

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

LLVM IR (-O2):
define void @clean_routine() {
%1 = tail call i32 (...) @clean_hash()
ret void
}
void uDMAChannelRequest(unsigned long ulChannelNum) {
  ;
  (*((volatile unsigned long *)(0x400FF000 + 0x00000014))) =
      1 << (ulChannelNum & 0x1f);
}


x86 assembly (clang, -O0):
<uDMAChannelRequest>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1f,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    $0x400ff014,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAChannelRequest>:
mov    %rdi,%rcx
mov    $0x1,%eax
shl    %cl,%eax
cltq
mov    %rax,0x400ff014
40
ret

LLVM IR (-O0):
define void @uDMAChannelRequest(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 31
%5 = trunc i64 %4 to i32
%6 = shl i32 1, %5
%7 = sext i32 %6 to i64
store volatile i64 %7, i64* inttoptr (i64 1074786324 to i64*)
ret void
}

LLVM IR (-O2):
define void @uDMAChannelRequest(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 31
%4 = shl nuw i32 1, %3
%5 = sext i32 %4 to i64
store volatile i64 %5, i64* inttoptr (i64 1074786324 to i64*)
ret void
}
int test_imm_E3uint16_mem(unsigned short *val) {
  return ((*val) & (-0xE3 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E3uint16_mem>:
movzwl (%rdi),%eax
test   $0xff1d,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E3uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -227
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int fun755() { return 755; }


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

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

LLVM IR (-O0):
define i32 @fun755() {
ret i32 755
}

LLVM IR (-O2):
define i32 @fun755() {
ret i32 755
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long long);
int scanf(char *, unsigned long long *);
int main(int argc, char **argv) {
  long long unsigned int x;
  while (scanf("%llu", &x) == 1) {
    printf("%llu\n", x);
  }
  return 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)
lea    0xec3(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1164 <main+0x44>
mov    -0x18(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    117d <main+0x5d>
lea    0xebf(%rip),%r14
lea    0xeb3(%rip),%r15
lea    0x8(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
je     1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [6 x i8] c"%llu\0A\00"
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
br label %7
7: ; preds = %10, %2
%8 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %6)
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i64, i64* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %11)
br label %7
13: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [6 x i8] c"%llu\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %3)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %12
7: ; preds = %2, %7
%8 = load i64, i64* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %8)
%10 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %3)
%11 = icmp eq i32 %10, 1
br i1 %11, label %7, label %12
12: ; preds = %7, %2
ret i32 0
}
int isAddop(char c) { return '+' == c || '-' == c; }


x86 assembly (clang, -O0):
<isAddop>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x2b,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     1131 <isAddop+0x31>
movsbl -0x1(%rbp),%ecx
mov    $0x2d,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAddop>:
add    $0xd5,%dil
xor    %eax,%eax
test   $0xfd,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isAddop(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 43, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 45, %8
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isAddop(i8 signext %0) {
%2 = icmp eq i8 %0, 43
%3 = icmp eq i8 %0, 45
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void gtk_tree_selection_unselect_range() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_selection_unselect_range() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int retrieve_solutions_on_grid(int i) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(49, &i, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<retrieve_solutions_on_grid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x31,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<retrieve_solutions_on_grid>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x31,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @retrieve_solutions_on_grid(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 49, i32* %2, i32* %6, double* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @retrieve_solutions_on_grid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 49, i32* %2, i32* undef, double* undef)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int, int,
                           int);
int /*<<< orphan*/ stderr;
void usage(const char *prog) {
  fprintf(stderr,
          "Usage: %s [options] <input> <output>\n"
          "Options:\n"
          "    -p <pagesize>      NAND page size (default: %d)\n"
          "    -o <oobsize>       NAND OOB size (default: %d)\n"
          "    -e <offset>        NAND ECC offset (default: %d)\n"
          "\n",
          prog, 2048, 64, 0x28);
  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
mov    $0x800,%ecx
mov    $0x40,%r8d
mov    $0x28,%r9d
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    $0x800,%ecx
mov    $0x40,%r8d
mov    $0x28,%r9d
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [204 x i8] c"Usage: %s [options] <input> <output>\0AOptions:\0A -p <pagesize> NAND page size (default: %d)\0A -o <oobsize> NAND OOB size (default: %d)\0A -e <offset> NAND ECC offset (default: %d)\0A\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 ([204 x i8], [204 x i8]* @.str, i64 0, i64 0), i8* %4, i32 2048, i32 64, i32 40)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [204 x i8] c"Usage: %s [options] <input> <output>\0AOptions:\0A -p <pagesize> NAND page size (default: %d)\0A -o <oobsize> NAND OOB size (default: %d)\0A -e <offset> NAND ECC offset (default: %d)\0A\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str, i64 0, i64 0), i8* %0, i32 2048, i32 64, i32 40)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void board_startcmdread(void) {}


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

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

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

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

/* Variables and functions */
int is_broadcast_ether_addr(const void *addr) {
  const __u16 *_addr = addr;
  return (_addr[0] & _addr[1] & _addr[2]) == 0xffff;
}


x86 assembly (clang, -O0):
<is_broadcast_ether_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
and    0x4(%rcx),%eax
mov    -0x10(%rbp),%rcx
and    0x8(%rcx),%eax
cmp    $0xffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_broadcast_ether_addr>:
mov    0x4(%rdi),%ecx
and    (%rdi),%ecx
and    0x8(%rdi),%ecx
xor    %eax,%eax
cmp    $0xffff,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @is_broadcast_ether_addr(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
%12 = and i32 %8, %11
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 2
%15 = load i32, i32* %14
%16 = and i32 %12, %15
%17 = icmp eq i32 %16, 65535
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_broadcast_ether_addr(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = getelementptr inbounds i8, i8* %0, i64 4
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = and i32 %6, %3
%8 = getelementptr inbounds i8, i8* %0, i64 8
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = and i32 %7, %10
%12 = icmp eq i32 %11, 65535
%13 = zext i1 %12 to i32
ret i32 %13
}
int fun611() { return 611; }


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

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

LLVM IR (-O0):
define i32 @fun611() {
ret i32 611
}

LLVM IR (-O2):
define i32 @fun611() {
ret i32 611
}
/* Variables and functions */
int sv_get_current_line(int);
int vox_get_current_line(int slot) { return sv_get_current_line(slot); }


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

x86 assembly (clang, -O2):
<vox_get_current_line>:
jmp    1030 <sv_get_current_line@plt>

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

LLVM IR (-O2):
define i32 @vox_get_current_line(i32 %0) {
%2 = tail call i32 @sv_get_current_line(i32 %0)
ret i32 %2
}
/* Variables and functions */
int pathconN_nm7_f0(double const **, double **, int *, double *, int);
int pathconN_nm7(const double **arg, double **res, int *iw, double *w,
                 int mem) {
  return pathconN_nm7_f0(arg, res, iw, w, mem);
}


x86 assembly (clang, -O0):
<pathconN_nm7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <pathconN_nm7_f0@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathconN_nm7>:
jmp    1030 <pathconN_nm7_f0@plt>

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

LLVM IR (-O2):
define i32 @pathconN_nm7(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = tail call i32 @pathconN_nm7_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4)
ret i32 %6
}
int cmp_ulong_asc(const void *x, const void *y) {
  if (*(unsigned long *)x < *(unsigned long *)y) {
    return -1;
  } else if (*(unsigned long *)x > *(unsigned long *)y) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cmp_ulong_asc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jae    112c <cmp_ulong_asc+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1158 <cmp_ulong_asc+0x58>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jbe    114c <cmp_ulong_asc+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1158 <cmp_ulong_asc+0x58>
jmp    1151 <cmp_ulong_asc+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_ulong_asc>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
seta   %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmp_ulong_asc(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i64*
%8 = load i64, i64* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to i64*
%11 = load i64, i64* %10
%12 = icmp ult i64 %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %25
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to i64*
%17 = load i64, i64* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to i64*
%20 = load i64, i64* %19
%21 = icmp ugt i64 %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 1, i32* %3
br label %25
23: ; preds = %14
br label %24
24: ; preds = %23
store i32 0, i32* %3
br label %25
25: ; preds = %24, %22, %13
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @cmp_ulong_asc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp ult i64 %4, %6
%8 = icmp ugt i64 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int test_imm_ACuint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xAC << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_ACuint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 172
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t read_16b(const uint8_t *buf) {
  uint16_t value = ((uint16_t)buf[0]) << 8 | buf[1];
  return value;
}


x86 assembly (clang, -O0):
<read_16b>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_16b>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @read_16b(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void f(int n) {
  if (n < 3)
    return;
  n--;
  f(n);
  assert(1);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    113a <f+0x1a>
jmp    1155 <f+0x35>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <f@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    $0x2,%edi
jg     1126 <f+0x6>
ret
push   %rax
add    $0xffffffff,%edi
call   1030 <f@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 3
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, -1
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = call i32 @assert(i32 1)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @f(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %3, label %4
3: ; preds = %1, %4
ret void
4: ; preds = %1
%5 = add nsw i32 %0, -1
tail call void @f(i32 %5)
%6 = tail call i32 @assert(i32 1)
br label %3
}
void wait_flash() {
  while ((*(volatile unsigned long *)((void *)0xffffff00 + 0x68) & 0x01) == 0) {
  }
}


x86 assembly (clang, -O0):
<wait_flash>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <wait_flash+0x9>
mov    $0xffffff00,%eax
mov    0x68(%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1125 <wait_flash+0x25>
jmp    1109 <wait_flash+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_flash>:
mov    $0xffffff68,%eax
cs nopw 0x0(%rax,%rax,1)
nop
testq  $0x1,(%rax)
je     1110 <wait_flash+0x10>
ret

LLVM IR (-O0):
define void @wait_flash() {
br label %1
1: ; preds = %5, %0
%2 = load volatile i64, i64* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 4294967040 to i8*), i64 104) to i64*)
%3 = and i64 %2, 1
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @wait_flash() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i64, i64* inttoptr (i64 4294967144 to i64*)
%3 = and i64 %2, 1
%4 = icmp eq i64 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
ret void
}
int mklower(int ch) {
  if ((ch >= 'A') && (ch <= 'Z')) {
    return ch + 0x20;
  } else {
    return ch;
  }
}


x86 assembly (clang, -O0):
<mklower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     1129 <mklower+0x29>
cmpl   $0x5a,-0x8(%rbp)
jg     1129 <mklower+0x29>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <mklower+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mklower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 32
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @mklower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

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


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

x86 assembly (clang, -O2):
<test32>:
jmp    1030 <_mm_sad_pu8@plt>

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

LLVM IR (-O2):
define i32 @test32(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_sad_pu8(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
unsigned int etp_nthreads();
unsigned int eio_nthreads(void) { return etp_nthreads(); }


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

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

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

LLVM IR (-O2):
define i32 @eio_nthreads() {
%1 = tail call i32 (...) @etp_nthreads()
ret i32 %1
}
/* Variables and functions */
char *getenv(char *);
scalar_t__ strcmp(char const *, char *);
int is_method_post() {
  const char *method = getenv("REQUEST_METHOD");
  return (method && strcmp(method, "POST") == 0);
}


x86 assembly (clang, -O0):
<is_method_post>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1162 <is_method_post+0x42>
mov    -0x8(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_method_post>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     114e <is_method_post+0x2e>
lea    0xed6(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"REQUEST_METHOD\00"
@.str.1 = [5 x i8] c"POST\00"
define i32 @is_method_post() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br label %9
9: ; preds = %5, %0
%10 = phi i1 [ false, %0 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@.str = [15 x i8] c"REQUEST_METHOD\00"
@.str.1 = [5 x i8] c"POST\00"
define i32 @is_method_post() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
scalar_t__ next(int);
unsigned int nextBoolean() { return next(1) != 0; }


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

x86 assembly (clang, -O2):
<nextBoolean>:
push   %rax
mov    $0x1,%edi
call   1030 <next@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @nextBoolean() {
%1 = tail call i64 @next(i32 1)
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
int docs_mod_noop_func(const struct cmd_info *ci) { return 1; }


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

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

LLVM IR (-O0):
%struct.cmd_info = type opaque
define i32 @docs_mod_noop_func(%struct.cmd_info* %0) {
%2 = alloca %struct.cmd_info*
store %struct.cmd_info* %0, %struct.cmd_info** %2
ret i32 1
}

LLVM IR (-O2):
%struct.cmd_info = type opaque
define i32 @docs_mod_noop_func(%struct.cmd_info* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int top, score;
  top = score = -(2 + 5) * 6 + (4 + 3 * (2 + 3));
  printf("top = %d, score = %d\n", top, score);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffe9,-0xc(%rbp)
movl   $0xffffffe9,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0xffffffe9,%esi
mov    $0xffffffe9,%edx
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [22 x i8] c"top = %d, score = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 -23, i32 -23)
%2 = tail call i32 (...) @getchar()
ret i32 0
}
int c083(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c083() {
ret i32 0
}
void terminate(void) {}


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

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

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

LLVM IR (-O2):
define void @terminate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bt_send(char *);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
int bt_sendRoom(char *room, char *msg) {
  char *message = malloc(sizeof(char) * 1024);
  sprintf(message, "PRIVMSG %s :%s\r\n", room, msg);
  bt_send(message);
  free(message);
  return 0;
}


x86 assembly (clang, -O0):
<bt_sendRoom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe8f(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <bt_send@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bt_sendRoom>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xea1(%rip),%rsi
mov    %rax,%rdi
mov    %r15,%rdx
mov    %r14,%rcx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <bt_send@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [17 x i8] c"PRIVMSG %s :%s\0D\0A\00"
define i32 @bt_sendRoom(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = call i8* @malloc(i32 1024)
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i8*, i8** %5
%12 = call i32 @bt_send(i8* %11)
%13 = load i8*, i8** %5
%14 = call i32 @free(i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"PRIVMSG %s :%s\0D\0A\00"
define i32 @bt_sendRoom(i8* %0, i8* %1) {
%3 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = tail call i32 @bt_send(i8* %3)
%6 = tail call i32 @free(i8* %3)
ret i32 0
}
/* Variables and functions */
int fibo_lib(int);
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char *argv[]) {
  if (argc == 2) {
    int n = 15;
    int res = fibo_lib(n);
    printf("Fibonacci of %d is %d\n", n, res);
  }
  return 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)
cmpl   $0x2,-0x8(%rbp)
jne    1164 <main+0x44>
movl   $0xf,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <fibo_lib@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jne    1147 <main+0x27>
push   %rax
mov    $0xf,%edi
call   1040 <fibo_lib@plt>
lea    0xec9(%rip),%rdi
mov    $0xf,%esi
mov    %eax,%edx
call   1030 <printf@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Fibonacci of %d is %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
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 %16
10: ; preds = %2
store i32 15, i32* %6
%11 = load i32, i32* %6
%12 = call i32 @fibo_lib(i32 %11)
store i32 %12, i32* %7
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14)
br label %16
16: ; preds = %10, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Fibonacci of %d is %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @fibo_lib(i32 15)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 15, i32 %5)
br label %7
7: ; preds = %4, %2
ret i32 0
}
long __syscall0(long n) {
  long __ret;
  __asm("int $0x95" : "=a"(__ret) : "a"(n) : "memory");
  return __ret;
}


x86 assembly (clang, -O0):
<__syscall0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
int    $0x95
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__syscall0>:
mov    %rdi,%rax
int    $0x95
ret

LLVM IR (-O0):
define i64 @__syscall0(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 asm "int $$0x95", "={ax},{ax},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @__syscall0(i64 %0) {
%2 = tail call i64 asm "int $$0x95", "={ax},{ax},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i64 %2
}
/* Variables and functions */
int ENOSYS;
int errno;
int linkat(const int olddirfd, const char *const oldpath, const int newdirfd,
           const char *const newpath, const int flags) {
  return errno = ENOSYS, -1;
}


x86 assembly (clang, -O0):
<linkat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    0x2ecb(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb2(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @linkat(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32, i32* @ENOSYS
store i32 %11, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @linkat(i32 %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i32 %4) {
%6 = load i32, i32* @ENOSYS
store i32 %6, i32* @errno
ret i32 -1
}
/* Variables and functions */
long double f(long double, long double);
long double euler(long double x, long double y, double h) {
  long double k1;
  k1 = f(x, y);
  y = y + h * k1;
  return y;
}


x86 assembly (clang, -O0):
<euler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <f@plt>
fstpt  -0x40(%rbp)
fldt   -0x20(%rbp)
fldl   -0x28(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<euler>:
sub    $0x48,%rsp
movsd  %xmm0,0x28(%rsp)
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fld    %st(0)
fstpt  0x3c(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <f@plt>
movsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
fmull  0x30(%rsp)
fldt   0x3c(%rsp)
faddp  %st,%st(1)
add    $0x48,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @euler(x86_fp80 %0, x86_fp80 %1, double %2) {
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = alloca double
%7 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
store double %2, double* %6
%8 = load x86_fp80, x86_fp80* %4
%9 = load x86_fp80, x86_fp80* %5
%10 = call x86_fp80 @f(x86_fp80 %8, x86_fp80 %9)
store x86_fp80 %10, x86_fp80* %7
%11 = load x86_fp80, x86_fp80* %5
%12 = load double, double* %6
%13 = fpext double %12 to x86_fp80
%14 = load x86_fp80, x86_fp80* %7
%15 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %13, x86_fp80 %14, x86_fp80 %11)
store x86_fp80 %15, x86_fp80* %5
%16 = load x86_fp80, x86_fp80* %5
ret x86_fp80 %16
}

LLVM IR (-O2):
define x86_fp80 @euler(x86_fp80 %0, x86_fp80 %1, double %2) {
%4 = tail call x86_fp80 @f(x86_fp80 %0, x86_fp80 %1)
%5 = fpext double %2 to x86_fp80
%6 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %5, x86_fp80 %4, x86_fp80 %1)
ret x86_fp80 %6
}
void INT_Excep_MTU2_TGIA2(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU2_TGIA2() {
ret void
}