xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct trace_seq {
  int dummy;
};

/* Variables and functions */
scalar_t__ le16toh(int /*<<< orphan*/);
unsigned long long process___le16_to_cpup(struct trace_seq *s,
                                          unsigned long long *args) {
  uint16_t *val = (uint16_t *)args[0];
  return val ? (long long)le16toh(*val) : 0;
}


x86 assembly (clang, -O0):
<process___le16_to_cpup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114a <process___le16_to_cpup+0x3a>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1030 <le16toh@plt>
mov    %rax,-0x20(%rbp)
jmp    1155 <process___le16_to_cpup+0x45>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    1155 <process___le16_to_cpup+0x45>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process___le16_to_cpup>:
mov    (%rsi),%rax
test   %rax,%rax
je     111f <process___le16_to_cpup+0xf>
mov    (%rax),%edi
jmp    1030 <le16toh@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.trace_seq = type { i32 }
define i64 @process___le16_to_cpup(%struct.trace_seq* %0, i64* %1) {
%3 = alloca %struct.trace_seq*
%4 = alloca i64*
%5 = alloca i32*
store %struct.trace_seq* %0, %struct.trace_seq** %3
store i64* %1, i64** %4
%6 = load i64*, i64** %4
%7 = getelementptr inbounds i64, i64* %6, i64 0
%8 = load i64, i64* %7
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = icmp ne i32* %10, null
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = call i64 @le16toh(i32 %14)
br label %17
16: ; preds = %2
br label %17
17: ; preds = %16, %12
%18 = phi i64 [ %15, %12 ], [ 0, %16 ]
ret i64 %18
}

LLVM IR (-O2):
%struct.trace_seq = type { i32 }
define i64 @process___le16_to_cpup(%struct.trace_seq* nocapture readnone %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = inttoptr i64 %3 to i32*
%7 = load i32, i32* %6
%8 = tail call i64 @le16toh(i32 %7)
br label %9
9: ; preds = %2, %5
%10 = phi i64 [ %8, %5 ], [ 0, %2 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ glutPostRedisplay();
void HandleIdle(void) { glutPostRedisplay(); }


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

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

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

LLVM IR (-O2):
define void @HandleIdle() {
%1 = tail call i32 (...) @glutPostRedisplay()
ret void
}
int D(double dx, double dy, double dz) {
  return (dx * dy) * dz == dx * (dy * dz);
}


x86 assembly (clang, -O0):
<D>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
mulsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<D>:
movapd %xmm0,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
cmpeqsd %xmm3,%xmm1
movq   %xmm1,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @D(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fmul double %7, %8
%10 = load double, double* %6
%11 = fmul double %9, %10
%12 = load double, double* %4
%13 = load double, double* %5
%14 = load double, double* %6
%15 = fmul double %13, %14
%16 = fmul double %12, %15
%17 = fcmp oeq double %11, %16
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @D(double %0, double %1, double %2) {
%4 = fmul double %0, %1
%5 = fmul double %4, %2
%6 = fmul double %1, %2
%7 = fmul double %6, %0
%8 = fcmp oeq double %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
int x(void) {
  signed char c = -1;
  return c < 0;
}


x86 assembly (clang, -O0):
<x>:
push   %rbp
mov    %rsp,%rbp
movb   $0xff,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @x() {
%1 = alloca i8
store i8 -1, i8* %1
%2 = load i8, i8* %1
%3 = sext i8 %2 to i32
%4 = icmp slt i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @x() {
ret i32 1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int atoi(char const *);
void set_port(const char *port, uint8_t *buf) {
  int num = atoi(port);
  buf[0] = (num & 0xFF00) >> 8;
  buf[1] = num & 0xFF;
}


x86 assembly (clang, -O0):
<set_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_port>:
push   %rbx
mov    %rsi,%rbx
call   1030 <atoi@plt>
movzbl %ah,%ecx
mov    %ecx,(%rbx)
movzbl %al,%eax
mov    %eax,0x4(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @set_port(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
%7 = call i32 @atoi(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = and i32 %8, 65280
%10 = ashr i32 %9, 8
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i64 0
store i32 %10, i32* %12
%13 = load i32, i32* %5
%14 = and i32 %13, 255
%15 = load i32*, i32** %4
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %14, i32* %16
ret void
}

LLVM IR (-O2):
define void @set_port(i8* nocapture %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @atoi(i8* %0)
%4 = lshr i32 %3, 8
%5 = and i32 %4, 255
store i32 %5, i32* %1
%6 = and i32 %3, 255
%7 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %6, i32* %7
ret void
}
void init_char(void *cc, char *value) {
  char *c = (char *)cc;
  *value = *c;
}


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

x86 assembly (clang, -O2):
<init_char>:
mov    (%rdi),%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @init_char(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = load i8, i8* %7
%9 = load i8*, i8** %4
store i8 %8, i8* %9
ret void
}

LLVM IR (-O2):
define void @init_char(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
store i8 %3, i8* %1
ret void
}
/* Variables and functions */
int O_NONBLOCK;
int O_RDWR;
int open(char const *, int);
int nmcadec_open_nonblock(const char *pathname) {
  return open(pathname, O_RDWR | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<nmcadec_open_nonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb0(%rip),%rax
or     (%rax),%esi
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmcadec_open_nonblock>:
mov    0x2ed1(%rip),%rax
mov    0x2ec2(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDWR = global i32 0
@O_NONBLOCK = global i32 0
define i32 @nmcadec_open_nonblock(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_RDWR
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %4, %5
%7 = call i32 @open(i8* %3, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@O_NONBLOCK = global i32 0
define i32 @nmcadec_open_nonblock(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = load i32, i32* @O_NONBLOCK
%4 = or i32 %3, %2
%5 = tail call i32 @open(i8* %0, i32 %4)
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
uint16_t regread16(uint16_t addr) {
  uint16_t value = *(volatile uint16_t *)addr;
  return value;
}


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

x86 assembly (clang, -O2):
<regread16>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
define i64 @regread16(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
store i64 %6, i64* %3
%7 = load i64, i64* %3
ret i64 %7
}

LLVM IR (-O2):
define i64 @regread16(i64 %0) {
%2 = inttoptr i64 %0 to i64*
%3 = load volatile i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ wmlKeyWBuildTables();
int /*<<< orphan*/ wmlOutputUilKeyTab();
int /*<<< orphan*/ wmlOutputUilTokName();
void wmlOutputKeyWordFiles() {
  wmlKeyWBuildTables();
  wmlOutputUilKeyTab();
  wmlOutputUilTokName();
}


x86 assembly (clang, -O0):
<wmlOutputKeyWordFiles>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <wmlKeyWBuildTables@plt>
mov    $0x0,%al
call   1040 <wmlOutputUilKeyTab@plt>
mov    $0x0,%al
call   1050 <wmlOutputUilTokName@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wmlOutputKeyWordFiles>:
push   %rax
xor    %eax,%eax
call   1030 <wmlKeyWBuildTables@plt>
xor    %eax,%eax
call   1040 <wmlOutputUilKeyTab@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <wmlOutputUilTokName@plt>

LLVM IR (-O0):
define void @wmlOutputKeyWordFiles() {
%1 = call i32 (...) @wmlKeyWBuildTables()
%2 = call i32 (...) @wmlOutputUilKeyTab()
%3 = call i32 (...) @wmlOutputUilTokName()
ret void
}

LLVM IR (-O2):
define void @wmlOutputKeyWordFiles() {
%1 = tail call i32 (...) @wmlKeyWBuildTables()
%2 = tail call i32 (...) @wmlOutputUilKeyTab()
%3 = tail call i32 (...) @wmlOutputUilTokName()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void start_dependency(FILE *f, const char *dependency) {
  if (dependency != NULL) {
    fprintf(f, "#if %s\n", dependency);
  }
}


x86 assembly (clang, -O0):
<start_dependency>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113f <start_dependency+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_dependency>:
test   %rsi,%rsi
je     1124 <start_dependency+0x14>
mov    %rsi,%rdx
lea    0xee1(%rip),%rsi
jmp    1030 <fprintf@plt>
ret

LLVM IR (-O0):
@.str = [8 x i8] c"#if %s\0A\00"
define void @start_dependency(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"#if %s\0A\00"
define void @start_dependency(i32* nocapture %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
double pow(double, double);
double xpow(double x) { return pow(x, 23.4); }


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

x86 assembly (clang, -O2):
<xpow>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @xpow(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, double 2.340000e+01)
ret double %4
}

LLVM IR (-O2):
define double @xpow(double %0) {
%2 = tail call double @pow(double %0, double 2.340000e+01)
ret double %2
}
int isalpha(int c) { return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'); }


x86 assembly (clang, -O0):
<isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x61,%eax
cmp    -0x4(%rbp),%eax
jg     1124 <isalpha+0x24>
mov    $0x1,%al
cmpl   $0x7a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1147 <isalpha+0x47>
xor    %eax,%eax
mov    $0x41,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x6(%rbp)
jg     1141 <isalpha+0x41>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 97, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %16, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sle i32 65, %9
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 90
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br label %16
16: ; preds = %14, %5
%17 = phi i1 [ true, %5 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
double exp(double);
double sinh(double x) {
  double dexpx;
  dexpx = exp(x);
  return (0.5 * (dexpx - (1.0 / dexpx)));
}


x86 assembly (clang, -O0):
<sinh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xecf(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeb6(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinh>:
push   %rax
call   1030 <exp@plt>
movsd  0xee2(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm1,%xmm0
mulsd  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sinh(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @exp(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = load double, double* %3
%8 = fdiv double 1.000000e+00, %7
%9 = fsub double %6, %8
%10 = fmul double 5.000000e-01, %9
ret double %10
}

LLVM IR (-O2):
define double @sinh(double %0) {
%2 = tail call double @exp(double %0)
%3 = fdiv double 1.000000e+00, %2
%4 = fsub double %2, %3
%5 = fmul double %4, 5.000000e-01
ret double %5
}
/* Variables and functions */
int square(int);
main() {
  int i = 99;
  i++;
  i = square(i);
  i--;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x63,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <square@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 99, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @square(i32 %4)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @square(i32 100)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void dummy_afp() { printf("\n"); }


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

x86 assembly (clang, -O2):
<dummy_afp>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @dummy_afp() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
void testExpression() {
  float a = 0.0f;
  float b = 222222222222L + a;
  float g = 22222222 + 22222222;
  float c = 22222222 + 22222223;
  int i = 0;
  double e = 0.0;
  double f = i + e;
}


x86 assembly (clang, -O0):
<testExpression>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xef0(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xecd(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testExpression() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = alloca double
%7 = alloca double
store float 0.000000e+00, float* %1
%8 = load float, float* %1
%9 = fadd float 0x4249DEBD00000000, %8
store float %9, float* %2
store float 0x41853158E0000000, float* %3
store float 0x41853158E0000000, float* %4
store i32 0, i32* %5
store double 0.000000e+00, double* %6
%10 = load i32, i32* %5
%11 = sitofp i32 %10 to double
%12 = load double, double* %6
%13 = fadd double %11, %12
store double %13, double* %7
ret void
}

LLVM IR (-O2):
define void @testExpression() {
ret void
}
void *_Locale_collate_create(const char *__DUMMY_PAR,
                             struct _Locale_name_hint *hint) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct._Locale_name_hint = type opaque
define i8* @_Locale_collate_create(i8* %0, %struct._Locale_name_hint* %1) {
%3 = alloca i8*
%4 = alloca %struct._Locale_name_hint*
store i8* %0, i8** %3
store %struct._Locale_name_hint* %1, %struct._Locale_name_hint** %4
ret i8* null
}

LLVM IR (-O2):
%struct._Locale_name_hint = type opaque
define noalias i8* @_Locale_collate_create(i8* nocapture readnone %0, %struct._Locale_name_hint* nocapture readnone %1) {
ret i8* null
}
/* Variables and functions */
scalar_t__ isspace(char const);
const char *KlelStripSpace(const char *pcInput) {
  ;
  while (isspace(pcInput[0])) {
    pcInput++;
  }
  return pcInput;
}


x86 assembly (clang, -O0):
<KlelStripSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <KlelStripSpace+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <KlelStripSpace+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KlelStripSpace>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <KlelStripSpace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @KlelStripSpace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %9, %1
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = call i64 @isspace(i8 signext %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %2
br label %3
12: ; preds = %3
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
define i8* @KlelStripSpace(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
struct __uportsys_sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ __uportsys_recvfrom(int, void *, size_t, int,
                                       struct __uportsys_sockaddr *,
                                       int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ *);
int /*<<< orphan*/ errno;
ssize_t recvfrom(int sd, void *buf, size_t len, int flags,
                 struct sockaddr *addr, socklen_t *addr_len) {
  return __uportsys_recvfrom(sd, buf, len, flags,
                             (struct __uportsys_sockaddr *)addr, addr_len,
                             &errno);
}


x86 assembly (clang, -O0):
<recvfrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x2e95(%rip),%rax
mov    %rax,(%rsp)
call   1030 <__uportsys_recvfrom@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recvfrom>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    %rax,(%rsp)
call   1030 <__uportsys_recvfrom@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
%struct.__uportsys_sockaddr = type { i32 }
@errno = global i32 0
define i32 @recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca %struct.sockaddr*
%12 = alloca i32*
store i32 %0, i32* %7
store i8* %1, i8** %8
store i64 %2, i64* %9
store i32 %3, i32* %10
store %struct.sockaddr* %4, %struct.sockaddr** %11
store i32* %5, i32** %12
%13 = load i32, i32* %7
%14 = load i8*, i8** %8
%15 = load i64, i64* %9
%16 = load i32, i32* %10
%17 = load %struct.sockaddr*, %struct.sockaddr** %11
%18 = bitcast %struct.sockaddr* %17 to %struct.__uportsys_sockaddr*
%19 = load i32*, i32** %12
%20 = call i32 @__uportsys_recvfrom(i32 %13, i8* %14, i64 %15, i32 %16, %struct.__uportsys_sockaddr* %18, i32* %19, i32* @errno)
ret i32 %20
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
%struct.__uportsys_sockaddr = type { i32 }
@errno = global i32 0
define i32 @recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %5) {
%7 = bitcast %struct.sockaddr* %4 to %struct.__uportsys_sockaddr*
%8 = tail call i32 @__uportsys_recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.__uportsys_sockaddr* %7, i32* %5, i32* @errno)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void funlockfile(FILE *fp) {
  (void)fp;
  return;
}


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

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

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

LLVM IR (-O2):
define void @funlockfile(i32* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ sysfsparser_path_exist(char *);
char *xasprintf(char *, char *);
char *get_docker_memory_stat_path() {
  char *syspath = NULL;
  if (sysfsparser_path_exist("/sys/fs/cgroup"
                             "/memory/docker"
                             "/memory.stat"))
    syspath = xasprintf("%s/memory.stat", "/sys/fs/cgroup"
                                          "/memory/docker");
  return syspath;
}


x86 assembly (clang, -O0):
<get_docker_memory_stat_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
lea    0xec9(%rip),%rdi
call   1040 <sysfsparser_path_exist@plt>
cmp    $0x0,%rax
je     115d <get_docker_memory_stat_path+0x3d>
lea    0xedc(%rip),%rdi
lea    0xee4(%rip),%rsi
call   1030 <xasprintf@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_docker_memory_stat_path>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <sysfsparser_path_exist@plt>
test   %rax,%rax
je     1146 <get_docker_memory_stat_path+0x26>
lea    0xef0(%rip),%rdi
lea    0xef8(%rip),%rsi
pop    %rax
jmp    1030 <xasprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"/sys/fs/cgroup/memory/docker/memory.stat\00"
@.str.1 = [15 x i8] c"%s/memory.stat\00"
@.str.2 = [29 x i8] c"/sys/fs/cgroup/memory/docker\00"
define i8* @get_docker_memory_stat_path() {
%1 = alloca i8*
store i8* null, i8** %1
%2 = call i64 @sysfsparser_path_exist(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i8* @xasprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
store i8* %5, i8** %1
br label %6
6: ; preds = %4, %0
%7 = load i8*, i8** %1
ret i8* %7
}

LLVM IR (-O2):
@.str = [41 x i8] c"/sys/fs/cgroup/memory/docker/memory.stat\00"
@.str.1 = [15 x i8] c"%s/memory.stat\00"
@.str.2 = [29 x i8] c"/sys/fs/cgroup/memory/docker\00"
define i8* @get_docker_memory_stat_path() {
%1 = tail call i64 @sysfsparser_path_exist(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i8* @xasprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = phi i8* [ %4, %3 ], [ null, %0 ]
ret i8* %6
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int countlib(int);
int offset(int /*<<< orphan*/, int, int, int);
int autohelperowl_attackpat0(struct pattern *patt, int transformation, int move,
                             int color, int action) {
  int A;
  (void)patt;
  (void)color;
  (void)action;
  A = offset(0, 1, move, transformation);
  return countlib(A) < 4;
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <countlib@plt>
cmp    $0x4,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat0>:
push   %rax
mov    %esi,%ecx
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <offset@plt>
mov    %eax,%edi
call   1040 <countlib@plt>
xor    %ecx,%ecx
cmp    $0x4,%eax
setl   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat0(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 0, i32 1, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
%19 = call i32 @countlib(i32 %18)
%20 = icmp slt i32 %19, 4
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat0(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 0, i32 1, i32 %2, i32 %1)
%7 = tail call i32 @countlib(i32 %6)
%8 = icmp slt i32 %7, 4
%9 = zext i1 %8 to i32
ret i32 %9
}
void ScrCls(char *fb) {
  int xres, yres;
  int x, y;
  for (y = 0; y < 480; y++) {
    yres = y * 1600;
    for (x = 0; x < 800; x++) {
      xres = x * 2 + yres;
      *((unsigned short *)(fb + xres)) = 0xffff;
    }
  }
}


x86 assembly (clang, -O0):
<ScrCls>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x1e0,-0x18(%rbp)
jge    1175 <ScrCls+0x75>
imul   $0x640,-0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x320,-0x14(%rbp)
jge    1162 <ScrCls+0x62>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movw   $0xffff,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <ScrCls+0x2d>
jmp    1167 <ScrCls+0x67>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    110f <ScrCls+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScrCls>:
push   %rax
mov    $0xbb800,%edx
mov    $0xff,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @ScrCls(i8* nocapture writeonly %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_33(int /*<<< orphan*/);
int gen_33() { handle_33(0); }


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

x86 assembly (clang, -O2):
<gen_33>:
xor    %edi,%edi
jmp    1030 <handle_33@plt>

LLVM IR (-O0):
define i32 @gen_33() {
%1 = alloca i32
%2 = call i32 @handle_33(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gen_33() {
%1 = tail call i32 @handle_33(i32 0)
ret i32 undef
}
/* Variables and functions */
int get_max(char **, int);
int /*<<< orphan*/ print_tux();
int /*<<< orphan*/ printp(char **, int);
int main(int argc, char *argv[]) {
  int width = get_max(argv, argc);
  int col = 0, num = 1;
  int counter = 0, flag = 0;
  printp(argv, argc);
  print_tux();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <get_max@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <printp@plt>
mov    $0x0,%al
call   1040 <print_tux@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
mov    %ebp,%esi
call   1050 <get_max@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <printp@plt>
xor    %eax,%eax
call   1040 <print_tux@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @get_max(i8** %1, i32 %0)
%4 = tail call i32 @printp(i8** %1, i32 %0)
%5 = tail call i32 (...) @print_tux()
ret i32 0
}
int whitespace(unsigned char c) {
  if (c == 0x09 || c == 0x20 || c == 0x00)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     1131 <whitespace+0x31>
movzbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1131 <whitespace+0x31>
movzbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jne    113d <whitespace+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <whitespace+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<whitespace>:
cmp    $0x20,%dil
ja     111e <whitespace+0x1e>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100000201,%rdx
bt     %rcx,%rdx
jae    111e <whitespace+0x1e>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @whitespace(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 9
br i1 %6, label %15, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp eq i32 %9, 32
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11, %7, %1
store i32 1, i32* %2
br label %17
16: ; preds = %11
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @whitespace(i8 zeroext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 9, label %3
i8 0, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int isauth(char *, char *);
int main(int argc, char **argv) { return isauth(argv[1], argv[2]); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <isauth@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
jmp    1030 <isauth@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @isauth(i8* %4, i8* %6)
ret i32 %7
}
/* Variables and functions */
int rc_unbindkey(char *);
int cmd_unbind(int argc, char **argv) {
  if (argc < 2)
    return -1;
  return rc_unbindkey(argv[1]);
}


x86 assembly (clang, -O0):
<cmd_unbind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1135 <cmd_unbind+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    1145 <cmd_unbind+0x35>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <rc_unbindkey@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_unbind>:
cmp    $0x2,%edi
jge    111b <cmd_unbind+0xb>
mov    $0xffffffff,%eax
ret
mov    0x8(%rsi),%rdi
jmp    1030 <rc_unbindkey@plt>

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

LLVM IR (-O2):
define i32 @cmd_unbind(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @rc_unbindkey(i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int return_0();
int return_1();
int return_2();
int main() {
  int r;
  r = return_0();
  r = return_1();
  r = return_2();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <return_0@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <return_1@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <return_2@plt>
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <return_0@plt>
xor    %eax,%eax
call   1050 <return_1@plt>
xor    %eax,%eax
call   1040 <return_2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = call i32 (...) @return_0()
store i32 %2, i32* %1
%3 = call i32 (...) @return_1()
store i32 %3, i32* %1
%4 = call i32 (...) @return_2()
store i32 %4, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @return_0()
%2 = tail call i32 (...) @return_1()
%3 = tail call i32 (...) @return_2()
ret i32 0
}
int gca_cmp2_float(const void *aa, const void *bb, void *p) {
  (void)p;
  const float a = *(const float *)aa;
  const float b = *(const float *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


x86 assembly (clang, -O0):
<gca_cmp2_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
ucomiss -0x20(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
movss  -0x20(%rbp),%xmm0
ucomiss -0x1c(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gca_cmp2_float>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gca_cmp2_float(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca float
%8 = alloca float
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to float*
%12 = load float, float* %11
store float %12, float* %7
%13 = load i8*, i8** %5
%14 = bitcast i8* %13 to float*
%15 = load float, float* %14
store float %15, float* %8
%16 = load float, float* %7
%17 = load float, float* %8
%18 = fcmp ogt float %16, %17
%19 = zext i1 %18 to i32
%20 = load float, float* %8
%21 = load float, float* %7
%22 = fcmp ogt float %20, %21
%23 = zext i1 %22 to i32
%24 = sub nsw i32 %19, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @gca_cmp2_float(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to float*
%5 = load float, float* %4
%6 = bitcast i8* %1 to float*
%7 = load float, float* %6
%8 = fcmp ogt float %5, %7
%9 = zext i1 %8 to i32
%10 = fcmp ogt float %7, %5
%11 = sext i1 %10 to i32
%12 = add nsw i32 %11, %9
ret i32 %12
}
int func(int x) {
#pragma critTer : 3 :../ test / resources / functionCommentReturn.c:
  return 0;
#pragma critTer : 4 :../ test / resources / functionCommentReturn.c:
}


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

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

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

LLVM IR (-O2):
define i32 @func(i32 %0) {
ret i32 0
}
/* Variables and functions */
unsigned long crc32(unsigned long, unsigned char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int HashString(char *str, int size) {
  unsigned long crc;
  crc = crc32(0L, NULL, 0);
  crc = crc32(crc, (unsigned char *)str, strlen(str));
  return (crc % size);
}


x86 assembly (clang, -O0):
<HashString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
mov    %rsi,%rdi
call   1030 <crc32@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1030 <crc32@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HashString>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <crc32@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <crc32@plt>
movslq %r14d,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1166 <HashString+0x46>
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
jmp    116d <HashString+0x4d>
xor    %edx,%edx
div    %r14d
mov    %edx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @HashString(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = call i64 @crc32(i64 0, i8* null, i32 0)
store i64 %6, i64* %5
%7 = load i64, i64* %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @strlen(i8* %9)
%11 = call i64 @crc32(i64 %7, i8* %8, i32 %10)
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = urem i64 %12, %14
%16 = trunc i64 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @HashString(i8* %0, i32 %1) {
%3 = tail call i64 @crc32(i64 0, i8* null, i32 0)
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i64 @crc32(i64 %3, i8* %0, i32 %4)
%6 = sext i32 %1 to i64
%7 = urem i64 %5, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ memset(short *, int /*<<< orphan*/, int);
int TK_EmitAudioClear() {
  short *sbufl, *sbufr;
  int *sreg;
  int dma, rov2, idma;
  int i, j, k;
  sbufl = (short *)0x007F0000;
  sbufr = (short *)0x007F4000;
  memset(sbufl, 0, 16384);
  memset(sbufr, 0, 16384);
}


x86 assembly (clang, -O0):
<TK_EmitAudioClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    $0x7f0000,%eax
mov    %rax,-0x10(%rbp)
mov    $0x7f4000,%eax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x4000,%edx
call   1030 <memset@plt>
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x4000,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TK_EmitAudioClear>:
push   %rax
mov    $0x7f0000,%edi
xor    %esi,%esi
mov    $0x4000,%edx
call   1030 <memset@plt>
mov    $0x7f4000,%edi
xor    %esi,%esi
mov    $0x4000,%edx
pop    %rax
jmp    1030 <memset@plt>

LLVM IR (-O0):
define i32 @TK_EmitAudioClear() {
%1 = alloca i32
%2 = alloca i16*
%3 = alloca i16*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i16* inttoptr (i64 8323072 to i16*), i16** %2
store i16* inttoptr (i64 8339456 to i16*), i16** %3
%11 = load i16*, i16** %2
%12 = call i32 @memset(i16* %11, i32 0, i32 16384)
%13 = load i16*, i16** %3
%14 = call i32 @memset(i16* %13, i32 0, i32 16384)
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @TK_EmitAudioClear() {
%1 = tail call i32 @memset(i16* inttoptr (i64 8323072 to i16*), i32 0, i32 16384)
%2 = tail call i32 @memset(i16* inttoptr (i64 8339456 to i16*), i32 0, i32 16384)
ret i32 undef
}
/* Type definitions */
typedef float int32_t;

/* Variables and functions */
float ConvertSampleInt32ToFloat(int32_t sample) {
  return sample / 2147483648.0f;
}


x86 assembly (clang, -O0):
<ConvertSampleInt32ToFloat>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertSampleInt32ToFloat>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @ConvertSampleInt32ToFloat(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fdiv float %3, 0x41E0000000000000
ret float %4
}

LLVM IR (-O2):
define float @ConvertSampleInt32ToFloat(float %0) {
%2 = fmul float %0, 0x3E00000000000000
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ dis_GpG_to_ffsol();
int /*<<< orphan*/ dis_PERT(int);
void dis_PERT_GpG() {
  dis_GpG_to_ffsol();
  dis_PERT(1);
}


x86 assembly (clang, -O0):
<dis_PERT_GpG>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <dis_GpG_to_ffsol@plt>
mov    $0x1,%edi
call   1030 <dis_PERT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dis_PERT_GpG>:
push   %rax
xor    %eax,%eax
call   1040 <dis_GpG_to_ffsol@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <dis_PERT@plt>

LLVM IR (-O0):
define void @dis_PERT_GpG() {
%1 = call i32 (...) @dis_GpG_to_ffsol()
%2 = call i32 @dis_PERT(i32 1)
ret void
}

LLVM IR (-O2):
define void @dis_PERT_GpG() {
%1 = tail call i32 (...) @dis_GpG_to_ffsol()
%2 = tail call i32 @dis_PERT(i32 1)
ret void
}