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

/* Variables and functions */
int /*<<< orphan*/ SYS_clock_getres;
long syscall(int /*<<< orphan*/, int /*<<< orphan*/, struct timespec *);
long syscall_clock_getres(clockid_t _clkid, struct timespec *_ts) {
  long ret;
  ret = syscall(SYS_clock_getres, _clkid, _ts);
  return ret;
}


x86 assembly (clang, -O0):
<syscall_clock_getres>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eca(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <syscall@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall_clock_getres>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ed4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@SYS_clock_getres = global i32 0
define i64 @syscall_clock_getres(i32 %0, %struct.timespec* %1) {
%3 = alloca i32
%4 = alloca %struct.timespec*
%5 = alloca i64
store i32 %0, i32* %3
store %struct.timespec* %1, %struct.timespec** %4
%6 = load i32, i32* @SYS_clock_getres
%7 = load i32, i32* %3
%8 = load %struct.timespec*, %struct.timespec** %4
%9 = call i64 @syscall(i32 %6, i32 %7, %struct.timespec* %8)
store i64 %9, i64* %5
%10 = load i64, i64* %5
ret i64 %10
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@SYS_clock_getres = global i32 0
define i64 @syscall_clock_getres(i32 %0, %struct.timespec* %1) {
%3 = load i32, i32* @SYS_clock_getres
%4 = tail call i64 @syscall(i32 %3, i32 %0, %struct.timespec* %1)
ret i64 %4
}
main() {
  int i = 5;
  int x[i][++i];
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,%eax
mov    %rsp,%rdx
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i32 0, i32* %1
store i32 5, i32* %2
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %3
%12 = mul nuw i64 %7, %10
%13 = alloca i32, i64 %12
store i64 %7, i64* %4
store i64 %10, i64* %5
%14 = load i32, i32* %2
store i32 %14, i32* %1
%15 = load i8*, i8** %3
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
ret i32 6
}
/* Variables and functions */
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
int S_IWUSR;
int S_IXGRP;
int S_IXOTH;
int S_IXUSR;
scalar_t__ mkdir(char *, int);
bool create_dir(char *fn) {
  return mkdir(fn, (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH |
                    S_IXOTH)) == 0;
}


x86 assembly (clang, -O0):
<create_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e89(%rip),%rax
mov    (%rax),%esi
mov    0x2ea8(%rip),%rax
or     (%rax),%esi
mov    0x2ea7(%rip),%rax
or     (%rax),%esi
mov    0x2e7e(%rip),%rax
or     (%rax),%esi
mov    0x2e85(%rip),%rax
or     (%rax),%esi
mov    0x2e64(%rip),%rax
or     (%rax),%esi
mov    0x2e8b(%rip),%rax
or     (%rax),%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_dir>:
push   %rax
mov    0x2e98(%rip),%rax
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2eb6(%rip),%rax
or     (%rax),%esi
mov    0x2e8d(%rip),%rax
or     (%rax),%esi
mov    0x2e94(%rip),%rax
or     (%rax),%esi
mov    0x2e73(%rip),%rax
or     (%rax),%esi
mov    0x2e9a(%rip),%rax
or     (%rax),%esi
call   1030 <mkdir@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@S_IRGRP = global i32 0
@S_IXGRP = global i32 0
@S_IROTH = global i32 0
@S_IXOTH = global i32 0
define i32 @create_dir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @S_IRUSR
%5 = load i32, i32* @S_IWUSR
%6 = or i32 %4, %5
%7 = load i32, i32* @S_IXUSR
%8 = or i32 %6, %7
%9 = load i32, i32* @S_IRGRP
%10 = or i32 %8, %9
%11 = load i32, i32* @S_IXGRP
%12 = or i32 %10, %11
%13 = load i32, i32* @S_IROTH
%14 = or i32 %12, %13
%15 = load i32, i32* @S_IXOTH
%16 = or i32 %14, %15
%17 = call i64 @mkdir(i8* %3, i32 %16)
%18 = icmp eq i64 %17, 0
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@S_IRGRP = global i32 0
@S_IXGRP = global i32 0
@S_IROTH = global i32 0
@S_IXOTH = global i32 0
define i32 @create_dir(i8* nocapture %0) {
%2 = load i32, i32* @S_IRUSR
%3 = load i32, i32* @S_IWUSR
%4 = or i32 %3, %2
%5 = load i32, i32* @S_IXUSR
%6 = or i32 %4, %5
%7 = load i32, i32* @S_IRGRP
%8 = or i32 %6, %7
%9 = load i32, i32* @S_IXGRP
%10 = or i32 %8, %9
%11 = load i32, i32* @S_IROTH
%12 = or i32 %10, %11
%13 = load i32, i32* @S_IXOTH
%14 = or i32 %12, %13
%15 = tail call i64 @mkdir(i8* %0, i32 %14)
%16 = icmp eq i64 %15, 0
%17 = zext i1 %16 to i32
ret i32 %17
}
/* Variables and functions */
int strlen(const char *buf) {
  int i = 0;
  for (; *buf++; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     113a <strlen+0x3a>
jmp    112c <strlen+0x2c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111c <strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint32_t randLIB_randomise_base(uint32_t base, uint16_t min_factor,
                                uint16_t max_factor) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @randLIB_randomise_base(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @randLIB_randomise_base(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int inumber(int);
int open(char const *);
bool get_inumber(const char *file_name, int *inum) {
  int fd = open(file_name);
  if (fd >= 0) {
    *inum = inumber(fd);
    close(fd);
    return true;
  } else
    return false;
}


x86 assembly (clang, -O0):
<get_inumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <open@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     117a <get_inumber+0x4a>
mov    -0x1c(%rbp),%edi
call   1040 <inumber@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%edi
call   1030 <close@plt>
movl   $0x1,-0x4(%rbp)
jmp    1181 <get_inumber+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_inumber>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1050 <open@plt>
test   %eax,%eax
js     1158 <get_inumber+0x28>
mov    %eax,%ebp
mov    %eax,%edi
call   1040 <inumber@plt>
mov    %eax,(%rbx)
mov    %ebp,%edi
call   1030 <close@plt>
mov    $0x1,%eax
jmp    115a <get_inumber+0x2a>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_inumber(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
%7 = load i8*, i8** %4
%8 = call i32 @open(i8* %7)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i32, i32* %6
%13 = call i32 @inumber(i32 %12)
%14 = load i32*, i32** %5
store i32 %13, i32* %14
%15 = load i32, i32* %6
%16 = call i32 @close(i32 %15)
store i32 1, i32* %3
br label %18
17: ; preds = %2
store i32 0, i32* %3
br label %18
18: ; preds = %17, %11
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @get_inumber(i8* %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @open(i8* %0)
%4 = icmp sgt i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @inumber(i32 %3)
store i32 %6, i32* %1
%7 = tail call i32 @close(i32 %3)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ run(int);
int main() {
  run(31);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @run(i32 31)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @run(i32 31)
ret i32 0
}
void ScaleRowDown38_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown38_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ perhaps_free_something();
void f1(int *p, int a, int b, int cond, int cond2) {
  *p = a;
  if (cond)
    perhaps_free_something();
  if (cond2)
    *p = b;
}


x86 assembly (clang, -O0):
<f1>:
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    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x0,-0x14(%rbp)
je     1143 <f1+0x33>
mov    $0x0,%al
call   1030 <perhaps_free_something@plt>
cmpl   $0x0,-0x18(%rbp)
je     1156 <f1+0x46>
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbp
push   %r14
push   %rbx
mov    %r8d,%ebp
mov    %edx,%r14d
mov    %rdi,%rbx
mov    %esi,(%rdi)
test   %ecx,%ecx
je     112a <f1+0x1a>
xor    %eax,%eax
call   1030 <perhaps_free_something@plt>
test   %ebp,%ebp
je     1131 <f1+0x21>
mov    %r14d,(%rbx)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @f1(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3, i32 %4) {
store i32 %1, i32* %0
%6 = icmp eq i32 %3, 0
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = tail call i32 (...) @perhaps_free_something()
br label %9
9: ; preds = %7, %5
%10 = icmp eq i32 %4, 0
br i1 %10, label %12, label %11
11: ; preds = %9
store i32 %2, i32* %0
br label %12
12: ; preds = %11, %9
ret void
}
/* Variables and functions */
scalar_t__ INT_MIN;
unsigned int test6u(unsigned int x) {
  unsigned int y = (unsigned int)INT_MIN;
  return x - y;
}


x86 assembly (clang, -O0):
<test6u>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%rax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test6u>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@INT_MIN = global i64 0
define i32 @test6u(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i64, i64* @INT_MIN
%5 = trunc i64 %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = sub i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
@INT_MIN = global i64 0
define i32 @test6u(i32 %0) {
%2 = load i64, i64* @INT_MIN
%3 = trunc i64 %2 to i32
%4 = sub i32 %0, %3
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t galois32(uint32_t lfsr) {
  return (lfsr >> 1) ^ (-(lfsr & 1u) & 0xD0000001u);
}


x86 assembly (clang, -O0):
<galois32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    -0x4(%rbp),%edx
and    $0x1,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
and    $0xd0000001,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<galois32>:
mov    %edi,%eax
sar    %eax
and    $0x1,%edi
neg    %edi
and    $0xd0000001,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @galois32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = load i32, i32* %2
%6 = and i32 %5, 1
%7 = sub i32 0, %6
%8 = and i32 %7, -805306367
%9 = xor i32 %4, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @galois32(i32 %0) {
%2 = ashr i32 %0, 1
%3 = and i32 %0, 1
%4 = sub nsw i32 0, %3
%5 = and i32 %4, -805306367
%6 = xor i32 %5, %2
ret i32 %6
}
void gdk_window_destroy() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_destroy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _show_page();
void PAGE_TrimInit(int page) {
  (void)page;
  _show_page();
}


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

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

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

LLVM IR (-O2):
define void @PAGE_TrimInit(i32 %0) {
%2 = tail call i32 (...) @_show_page()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dvvdot_(int *, double *, double *, int *, double *, int *);
void wcc_dvvdot_(int *N, char *DOT, char *X, int *INCX, char *Y, int *INCY) {
  dvvdot_(N, (double *)DOT, (double *)X, INCX, (double *)Y, INCY);
}


x86 assembly (clang, -O0):
<wcc_dvvdot_>:
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    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <dvvdot_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_dvvdot_>:
jmp    1030 <dvvdot_@plt>

LLVM IR (-O0):
define void @wcc_dvvdot_(i32* %0, i8* %1, i8* %2, i32* %3, i8* %4, i32* %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i32*
store i32* %0, i32** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32* %3, i32** %10
store i8* %4, i8** %11
store i32* %5, i32** %12
%13 = load i32*, i32** %7
%14 = load i8*, i8** %8
%15 = bitcast i8* %14 to double*
%16 = load i8*, i8** %9
%17 = bitcast i8* %16 to double*
%18 = load i32*, i32** %10
%19 = load i8*, i8** %11
%20 = bitcast i8* %19 to double*
%21 = load i32*, i32** %12
%22 = call i32 @dvvdot_(i32* %13, double* %15, double* %17, i32* %18, double* %20, i32* %21)
ret void
}

LLVM IR (-O2):
define void @wcc_dvvdot_(i32* %0, i8* %1, i8* %2, i32* %3, i8* %4, i32* %5) {
%7 = bitcast i8* %1 to double*
%8 = bitcast i8* %2 to double*
%9 = bitcast i8* %4 to double*
%10 = tail call i32 @dvvdot_(i32* %0, double* %7, double* %8, i32* %3, double* %9, i32* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void lib_create_disconnect() { printf("create_disconnect \n"); }


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"create_disconnect \00"
define void @lib_create_disconnect() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct sembuf {
  int sem_num;
  int sem_op;
  scalar_t__ sem_flg;
};

/* Variables and functions */
int /*<<< orphan*/ semop(int, struct sembuf *, int);
void sem_wait(int semid, int sem_num, int val) {
  struct sembuf op;
  op.sem_num = sem_num;
  op.sem_op = -val;
  op.sem_flg = 0;
  semop(semid, &op, 1);
}


x86 assembly (clang, -O0):
<sem_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_wait>:
sub    $0x18,%rsp
mov    %esi,0x8(%rsp)
neg    %edx
mov    %edx,0xc(%rsp)
movq   $0x0,0x10(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i64 }
define void @sem_wait(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.sembuf
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %7, i32 0, i32 0
store i32 %8, i32* %9
%10 = load i32, i32* %6
%11 = sub nsw i32 0, %10
%12 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %7, i32 0, i32 1
store i32 %11, i32* %12
%13 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %7, i32 0, i32 2
store i64 0, i64* %13
%14 = load i32, i32* %4
%15 = call i32 @semop(i32 %14, %struct.sembuf* %7, i32 1)
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i64 }
define void @sem_wait(i32 %0, i32 %1, i32 %2) {
%4 = alloca %struct.sembuf
%5 = bitcast %struct.sembuf* %4 to i8*
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %4, i64 0, i32 0
store i32 %1, i32* %6
%7 = sub nsw i32 0, %2
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %4, i64 0, i32 1
store i32 %7, i32* %8
%9 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %4, i64 0, i32 2
store i64 0, i64* %9
%10 = call i32 @semop(i32 %0, %struct.sembuf* %4, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void log_error(const char *message) { printf("ERROR: %s\n", message); }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @log_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sys_puts(char *);
void main(void) {
  sys_puts("hai2u");
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <sys_puts@plt>
jmp    1120 <main+0x10>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <sys_puts@plt>
nopl   (%rax)
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [6 x i8] c"hai2u\00"
define void @main() {
%1 = call i32 @sys_puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}

LLVM IR (-O2):
@.str = [6 x i8] c"hai2u\00"
define void @main() {
%1 = tail call i32 @sys_puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int print_html_tail(void) {
  printf("\n<EM>CGI_FILE</EM>\n");
  printf("</body></html>\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<print_html_tail>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"\0A<EM>CGI_FILE</EM>\0A\00"
@.str.1 = [16 x i8] c"</body></html>\0A\00"
define i32 @print_html_tail() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"\0A<EM>CGI_FILE</EM>\00"
@str.2 = [15 x i8] c"</body></html>\00"
define i32 @print_html_tail() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_dobldobl_polysys_witset(int dim) {
  int *b;
  double *c;
  int fail = _ada_use_c2phc4c(853, &dim, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_dobldobl_polysys_witset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x355,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_dobldobl_polysys_witset>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x355,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @copy_dobldobl_polysys_witset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 853, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
void BYPASS_free(void *priv) {}


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

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

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

LLVM IR (-O2):
define void @BYPASS_free(i8* nocapture %0) {
ret void
}
int empty(char *str) {
  char *s;
  s = str;
  while (*s) {
    if (*s != ' ')
      return 1;
    s++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <empty+0x4a>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1139 <empty+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1151 <empty+0x51>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <empty+0x10>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty>:
movzbl (%rdi),%eax
cmp    $0x20,%al
jne    110d <empty+0xd>
add    $0x1,%rdi
jmp    1100 <empty>
test   %al,%al
jne    1114 <empty+0x14>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @empty(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 0, label %8
i8 32, label %5
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ gs();
int ti(int /*<<< orphan*/);
int gi(void) { return ti(gs()); }


x86 assembly (clang, -O0):
<gi>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gs@plt>
mov    %eax,%edi
call   1040 <ti@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gi>:
push   %rax
xor    %eax,%eax
call   1030 <gs@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <ti@plt>

LLVM IR (-O0):
define i32 @gi() {
%1 = call i32 (...) @gs()
%2 = call i32 @ti(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @gi() {
%1 = tail call i32 (...) @gs()
%2 = tail call i32 @ti(i32 %1)
ret i32 %2
}
void GetWinSize(Lines, Cols) int *Lines, *Cols;
{
  AbsoluteGoToXY(999, 999);
  GetCursorPosn(Cols, Lines);
}


x86 assembly (clang, -O0):
<GetWinSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x3e7,%esi
mov    %esi,%edi
mov    $0x0,%al
call   1040 <AbsoluteGoToXY@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <GetCursorPosn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetWinSize>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    $0x3e7,%edi
mov    $0x3e7,%esi
xor    %eax,%eax
call   1040 <AbsoluteGoToXY@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <GetCursorPosn@plt>

LLVM IR (-O0):
define void @GetWinSize(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @AbsoluteGoToXY to i32 (i32, i32, ...)*)(i32 999, i32 999)
%6 = load i32*, i32** %4
%7 = load i32*, i32** %3
%8 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @GetCursorPosn to i32 (i32*, i32*, ...)*)(i32* %6, i32* %7)
ret void
}

LLVM IR (-O2):
define void @GetWinSize(i32* %0, i32* %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @AbsoluteGoToXY to i32 (i32, i32, ...)*)(i32 999, i32 999)
%4 = tail call i32 (i32*, i32*, ...) bitcast (i32 (...)* @GetCursorPosn to i32 (i32*, i32*, ...)*)(i32* %1, i32* %0)
ret void
}
/* Variables and functions */
unsigned int *malloc(int);
unsigned int *uinttouintp(unsigned int a) {
  unsigned int *p;
  p = malloc(sizeof(*p));
  *p = a;
  return p;
}


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

x86 assembly (clang, -O2):
<uinttouintp>:
push   %rbx
mov    %edi,%ebx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %ebx,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i32* @uinttouintp(i32 %0) {
%2 = tail call i32* @malloc(i32 4)
store i32 %0, i32* %2
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ handle_request(int);
void *thread_main(void *arg) {
  int fd = *((int *)arg);
  handle_request(fd);
  close(fd);
  free((int *)arg);
  return (void *)0;
}


x86 assembly (clang, -O0):
<thread_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <handle_request@plt>
mov    -0xc(%rbp),%edi
call   1040 <close@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_main>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%ebp
mov    %ebp,%edi
call   1050 <handle_request@plt>
mov    %ebp,%edi
call   1040 <close@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @thread_main(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @handle_request(i32 %7)
%9 = load i32, i32* %3
%10 = call i32 @close(i32 %9)
%11 = load i8*, i8** %2
%12 = bitcast i8* %11 to i32*
%13 = call i32 @free(i32* %12)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @thread_main(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @handle_request(i32 %3)
%5 = tail call i32 @close(i32 %3)
%6 = tail call i32 @free(i32* %2)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ create_message(int /*<<< orphan*/ *, char *,
                                  int /*<<< orphan*/, char *);
int /*<<< orphan*/ send_message_and_free(int, int /*<<< orphan*/);
void send_join(int fd, char *channel) {
  send_message_and_free(fd, create_message(NULL, "JOIN", 0, channel));
}


x86 assembly (clang, -O0):
<send_join>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%edi
lea    0xebc(%rip),%rsi
xor    %edx,%edx
call   1030 <create_message@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <send_message_and_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_join>:
push   %rbx
mov    %rsi,%rcx
mov    %edi,%ebx
lea    0xed3(%rip),%rsi
xor    %edi,%edi
xor    %edx,%edx
call   1030 <create_message@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <send_message_and_free@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"JOIN\00"
define void @send_join(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @create_message(i32* null, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0, i8* %6)
%8 = call i32 @send_message_and_free(i32 %5, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"JOIN\00"
define void @send_join(i32 %0, i8* %1) {
%3 = tail call i32 @create_message(i32* null, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0, i8* %1)
%4 = tail call i32 @send_message_and_free(i32 %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hm_free(void *);
extern void stbi_image_free(void *retval_from_stbi_load) {
  hm_free(retval_from_stbi_load);
}


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

x86 assembly (clang, -O2):
<stbi_image_free>:
jmp    1030 <hm_free@plt>

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

LLVM IR (-O2):
define void @stbi_image_free(i8* %0) {
%2 = tail call i32 @hm_free(i8* %0)
ret void
}
/* Variables and functions */
float __nv_fmul_ru(float, float);
float __fmul_ru(float __a, float __b) { return __nv_fmul_ru(__a, __b); }


x86 assembly (clang, -O0):
<__fmul_ru>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__nv_fmul_ru@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fmul_ru>:
jmp    1030 <__nv_fmul_ru@plt>

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

LLVM IR (-O2):
define float @__fmul_ru(float %0, float %1) {
%3 = tail call float @__nv_fmul_ru(float %0, float %1)
ret float %3
}
float compute(float a, float b) { return (a + b) * (a - b); }


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

x86 assembly (clang, -O2):
<compute>:
movaps %xmm0,%xmm2
addss  %xmm1,%xmm2
subss  %xmm1,%xmm0
mulss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @compute(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fadd float %5, %6
%8 = load float, float* %3
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = fmul float %7, %10
ret float %11
}

LLVM IR (-O2):
define float @compute(float %0, float %1) {
%3 = fadd float %0, %1
%4 = fsub float %0, %1
%5 = fmul float %3, %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_CLR_FLASH_OUT_PIN() { clear_io_bit(0x34, 7); }


x86 assembly (clang, -O0):
<TOSH_CLR_FLASH_OUT_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x34,%edi
mov    $0x7,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_CLR_FLASH_OUT_PIN>:
mov    $0x34,%edi
mov    $0x7,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_CLR_FLASH_OUT_PIN() {
%1 = call i32 @clear_io_bit(i32 52, i32 7)
ret void
}

LLVM IR (-O2):
define void @TOSH_CLR_FLASH_OUT_PIN() {
%1 = tail call i32 @clear_io_bit(i32 52, i32 7)
ret void
}
int wifi_stop_supplicant() { return -1; }


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

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

LLVM IR (-O0):
define i32 @wifi_stop_supplicant() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @wifi_stop_supplicant() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ example(int, char **);
int main(int argc, char **argv) {
  (void)example(argc, argv);
  return 0;
}


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <example@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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 i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @example(i32 %6, i8** %7)
ret i32 0
}

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

/* Variables and functions */
int /*<<< orphan*/ eeprom_update_byte(int /*<<< orphan*/ *, int);
void eeconfig_update_handedness(bool val) {
  eeprom_update_byte((uint8_t *)14, !!val);
}


x86 assembly (clang, -O0):
<eeconfig_update_handedness>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
mov    $0xe,%edi
call   1030 <eeprom_update_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eeconfig_update_handedness>:
xor    %esi,%esi
test   %edi,%edi
setne  %sil
mov    $0xe,%edi
jmp    1030 <eeprom_update_byte@plt>

LLVM IR (-O0):
define void @eeconfig_update_handedness(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = call i32 @eeprom_update_byte(i32* inttoptr (i64 14 to i32*), i32 %7)
ret void
}

LLVM IR (-O2):
define void @eeconfig_update_handedness(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @eeprom_update_byte(i32* inttoptr (i64 14 to i32*), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int, int);
int main(void) { f(2, 3); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 2, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ usage(char *);
int badusage(char *exename) {
  fprintf(stderr, "Wrong parameters\n");
  usage(exename);
  return 0;
}


x86 assembly (clang, -O0):
<badusage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <usage@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<badusage>:
push   %rbx
mov    %rdi,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <usage@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"Wrong parameters\0A\00"
define i32 @badusage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @usage(i8* %5)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"Wrong parameters\0A\00"
define i32 @badusage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @usage(i8* %0)
ret i32 0
}
int test2(int c, int d) { return (c ^ 4) != 4; }


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x4,%eax
cmp    $0x4,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @test2(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 = xor i32 %5, 4
%7 = icmp ne i32 %6, 4
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @test2(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void imprimeSerie(int i, int j, int k) {
  if (i > j)
    return;
  printf("%d ", i);
  return imprimeSerie(i + k, j, k);
}


x86 assembly (clang, -O0):
<imprimeSerie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1142 <imprimeSerie+0x22>
jmp    1162 <imprimeSerie+0x42>
mov    -0x4(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
add    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <imprimeSerie@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimeSerie>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %esi,%edi
jg     1141 <imprimeSerie+0x31>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xed7(%rip),%r15
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    %r14d,%ebx
cmp    %ebp,%ebx
jle    1130 <imprimeSerie+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @imprimeSerie(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
br i1 %4, label %10, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %8, %5 ], [ %0, %3 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = add nsw i32 %6, %2
%9 = icmp sgt i32 %8, %1
br i1 %9, label %10, label %5
10: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fun2(int num) { printf("in fun2\n"); }


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"in fun2\00"
define void @fun2(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
void hlt() { __asm__ volatile("hlt"); }


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

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

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

LLVM IR (-O2):
define void @hlt() {
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void __attribute__((annotate("realtime"))) function(void) {}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"realtime\00", section "llvm.metadata"
@.str.1 = [62 x i8] c"/home/jiang/dataset/exebench/tmp/tmp4a15wp62/formatted_code.c\00", section "llvm.metadata"
@llvm.global.annotations = appending global [1 x { i8*, i8*, i8*, i32, i8* }] [{ i8*, i8*, i8*, i32, i8* } { i8* bitcast (void ()* @function to i8*), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0), i32 1, i8* null }], section "llvm.metadata"
define void @function() {
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"realtime\00", section "llvm.metadata"
@.str.1 = [62 x i8] c"/home/jiang/dataset/exebench/tmp/tmp4a15wp62/formatted_code.c\00", section "llvm.metadata"
@llvm.global.annotations = appending global [1 x { i8*, i8*, i8*, i32, i8* }] [{ i8*, i8*, i8*, i32, i8* } { i8* bitcast (void ()* @function to i8*), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0), i32 1, i8* null }], section "llvm.metadata"
define void @function() {
ret void
}
void INT_Excep_MTU6_TGID6(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void OLED_MsDelay(uint32_t ms_delay) { usleep(ms_delay * 1000); }


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

x86 assembly (clang, -O2):
<OLED_MsDelay>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @OLED_MsDelay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @OLED_MsDelay(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
void gdk_window_foreign_new_for_display() {}


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

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

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

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