xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int netlong;

/* Variables and functions */
scalar_t__ little_endian();
unsigned int ntohl(unsigned int netlong) {
  if (little_endian())
    return ((((netlong)&0xff000000) >> 24) | (((netlong)&0x00ff0000) >> 8) |
            (((netlong)&0x0000ff00) << 8) | (((netlong)&0x000000ff) << 24));
  return netlong;
}


x86 assembly (clang, -O0):
<ntohl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <little_endian@plt>
cmp    $0x0,%rax
je     1169 <ntohl+0x59>
mov    -0x8(%rbp),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
mov    -0x8(%rbp),%ecx
and    $0xff0000,%ecx
shr    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    116f <ntohl+0x5f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntohl>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <little_endian@plt>
test   %rax,%rax
mov    %ebx,%eax
bswap  %eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ntohl(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i64 (...) @little_endian()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %22
6: ; preds = %1
%7 = load i32, i32* %3
%8 = and i32 %7, -16777216
%9 = lshr i32 %8, 24
%10 = load i32, i32* %3
%11 = and i32 %10, 16711680
%12 = lshr i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %3
%15 = and i32 %14, 65280
%16 = shl i32 %15, 8
%17 = or i32 %13, %16
%18 = load i32, i32* %3
%19 = and i32 %18, 255
%20 = shl i32 %19, 24
%21 = or i32 %17, %20
store i32 %21, i32* %2
br label %24
22: ; preds = %1
%23 = load i32, i32* %3
store i32 %23, i32* %2
br label %24
24: ; preds = %22, %6
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @ntohl(i32 %0) {
%2 = tail call i64 (...) @little_endian()
%3 = icmp eq i64 %2, 0
%4 = tail call i32 @llvm.bswap.i32(i32 %0)
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
void lifebook_module_init(void) {}


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

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

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

LLVM IR (-O2):
define void @lifebook_module_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
int /*<<< orphan*/ wrap_send(int, char *);
void sprintf_send2(int fd, char *to, char *one, char *two) {
  char tmp[1024];
  memset(tmp, '\0', 1024);
  sprintf(tmp, "PRIVMSG %s %s%s\r\n", to, one, two);
  wrap_send(fd, tmp);
}


x86 assembly (clang, -O0):
<sprintf_send2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xe89(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x4(%rbp),%edi
lea    -0x420(%rbp),%rsi
call   1030 <wrap_send@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprintf_send2>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x400,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %edi,%r12d
mov    %rsp,%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
lea    0xe9c(%rip),%rsi
mov    %rbp,%rdi
mov    %rbx,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   1050 <sprintf@plt>
mov    %r12d,%edi
mov    %rbp,%rsi
call   1030 <wrap_send@plt>
add    $0x400,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"PRIVMSG %s %s%s\0D\0A\00"
define void @sprintf_send2(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [1024 x i8]
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%11 = call i32 @memset(i8* %10, i8 signext 0, i32 1024)
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%13 = load i8*, i8** %6
%14 = load i8*, i8** %7
%15 = load i8*, i8** %8
%16 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14, i8* %15)
%17 = load i32, i32* %5
%18 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%19 = call i32 @wrap_send(i32 %17, i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"PRIVMSG %s %s%s\0D\0A\00"
define void @sprintf_send2(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca [1024 x i8]
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = call i32 @memset(i8* %6, i8 signext 0, i32 1024)
%8 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
%9 = call i32 @wrap_send(i32 %0, i8* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fputc(int c, FILE *stream) {
  int rc;
  unsigned char ch = (unsigned char)c;
  return c;
}


x86 assembly (clang, -O0):
<fputc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x15(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @fputc(i32 returned %0, i32* nocapture readnone %1) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void shell_exit(void) { exit(EXIT_SUCCESS); }


x86 assembly (clang, -O0):
<shell_exit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<shell_exit>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @shell_exit() {
%1 = load i32, i32* @EXIT_SUCCESS
%2 = call i32 @exit(i32 %1)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @shell_exit() {
%1 = load i32, i32* @EXIT_SUCCESS
%2 = tail call i32 @exit(i32 %1)
unreachable
}
int abs(j)
int j;
{ return (j < 0 ? -j : j); }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
int namelength(name)
char *name;
{
  char *equal;
  equal = strchr(name, '=');
  return ((equal == 0) ? strlen(name) : (equal - name));
}


x86 assembly (clang, -O0):
<namelength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3d,%esi
call   1040 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <namelength+0x3b>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
jmp    116a <namelength+0x4a>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<namelength>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3d,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1138 <namelength+0x18>
sub    %rbx,%rax
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @namelength(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i32 61)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i64 @strlen(i8* %9)
br label %17
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = ptrtoint i8* %12 to i64
%15 = ptrtoint i8* %13 to i64
%16 = sub i64 %14, %15
br label %17
17: ; preds = %11, %8
%18 = phi i64 [ %10, %8 ], [ %16, %11 ]
%19 = trunc i64 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @namelength(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 61)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i64 @strlen(i8* dereferenceable(1) %0)
br label %10
6: ; preds = %1
%7 = ptrtoint i8* %2 to i64
%8 = ptrtoint i8* %0 to i64
%9 = sub i64 %7, %8
br label %10
10: ; preds = %6, %4
%11 = phi i64 [ %5, %4 ], [ %9, %6 ]
%12 = trunc i64 %11 to i32
ret i32 %12
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int);
void print_addr_hex(uint8_t *addr) {
  printf("%x:%x:%x:%x:%x:%x\n", addr[0], addr[1], addr[2], addr[3], addr[4],
         addr[5]);
}


x86 assembly (clang, -O0):
<print_addr_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%r9d
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
lea    0xeb2(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_addr_hex>:
push   %rax
mov    (%rdi),%esi
mov    0x4(%rdi),%edx
mov    0x8(%rdi),%ecx
mov    0xc(%rdi),%r8d
mov    0x10(%rdi),%r9d
mov    0x14(%rdi),%eax
mov    %eax,(%rsp)
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"%x:%x:%x:%x:%x:%x\0A\00"
define void @print_addr_hex(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %0, i64 3
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %0, i64 4
%10 = load i32, i32* %9
%11 = getelementptr inbounds i32, i32* %0, i64 5
%12 = load i32, i32* %11
%13 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 %6, i32 %8, i32 %10, i32 %12)
ret void
}
/* Variables and functions */
bool isempty(const char *p) { return !p || !p[0]; }


x86 assembly (clang, -O0):
<isempty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1127 <isempty+0x27>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isempty>:
test   %rdi,%rdi
je     110e <isempty+0xe>
xor    %eax,%eax
cmpb   $0x0,(%rdi)
sete   %al
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isempty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %5, %1
%12 = phi i1 [ true, %1 ], [ %10, %5 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @isempty(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
void LoadFiles() {}


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

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

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

LLVM IR (-O2):
define void @LoadFiles() {
ret void
}
f1(int *a) {
  *a = 6;
  a++;
  print_i(a);
  print_i(*a);
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x6,(%rax)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <print_i@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    $0x0,%al
call   1030 <print_i@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbx
mov    %rdi,%rbx
movl   $0x6,(%rdi)
add    $0x4,%rdi
xor    %eax,%eax
call   1030 <print_i@plt>
mov    0x4(%rbx),%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <print_i@plt>

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

LLVM IR (-O2):
define i32 @f1(i32* %0) {
store i32 6, i32* %0
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = tail call i32 (i32*, ...) bitcast (i32 (...)* @print_i to i32 (i32*, ...)*)(i32* %2)
%4 = load i32, i32* %2
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @print_i to i32 (i32, ...)*)(i32 %4)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void output_license() {
  printf("\nWebC - a basic web server written in c.\n");
  printf("Copyright (C) 2016 Brandon M. Kelley\n\n");
}


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

x86 assembly (clang, -O2):
<output_license>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"\0AWebC - a basic web server written in c.\0A\00"
@.str.1 = [39 x i8] c"Copyright (C) 2016 Brandon M. Kelley\0A\0A\00"
define void @output_license() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [41 x i8] c"\0AWebC - a basic web server written in c.\00"
@str.2 = [38 x i8] c"Copyright (C) 2016 Brandon M. Kelley\0A\00"
define void @output_license() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.2, i64 0, i64 0))
ret void
}
int test12(int a, int b, int c, int d) {
  int x = a != b;
  int y = c != d;
  return x != y;
}


x86 assembly (clang, -O0):
<test12>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test12>:
cmp    %esi,%edi
setne  %al
cmp    %ecx,%edx
setne  %cl
xor    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @test12(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = icmp ne i32 %11, %12
%14 = zext i1 %13 to i32
store i32 %14, i32* %9
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = icmp ne i32 %15, %16
%18 = zext i1 %17 to i32
store i32 %18, i32* %10
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = icmp ne i32 %19, %20
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @test12(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp ne i32 %0, %1
%6 = icmp ne i32 %2, %3
%7 = xor i1 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void alternatives_smp_switch(int smp) {}


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

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

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

LLVM IR (-O2):
define void @alternatives_smp_switch(i32 %0) {
ret void
}
float calcFovFermatFloret(float fieldOfView, float kr, float a0) {
  return 2 * a0 * fieldOfView * fieldOfView * kr;
}


x86 assembly (clang, -O0):
<calcFovFermatFloret>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  0xee5(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @calcFovFermatFloret(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = fmul float 2.000000e+00, %7
%9 = load float, float* %4
%10 = fmul float %8, %9
%11 = load float, float* %4
%12 = fmul float %10, %11
%13 = load float, float* %5
%14 = fmul float %12, %13
ret float %14
}

LLVM IR (-O2):
define float @calcFovFermatFloret(float %0, float %1, float %2) {
%4 = fmul float %2, 2.000000e+00
%5 = fmul float %4, %0
%6 = fmul float %5, %0
%7 = fmul float %6, %1
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ LBA_REG_WRITE(void *, int, int);
int mercury_util_start(void *phys_addr) {
  LBA_REG_WRITE(phys_addr, 0x0500, 0x3);
  return 0;
}


x86 assembly (clang, -O0):
<mercury_util_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x500,%esi
mov    $0x3,%edx
call   1030 <LBA_REG_WRITE@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mercury_util_start>:
push   %rax
mov    $0x500,%esi
mov    $0x3,%edx
call   1030 <LBA_REG_WRITE@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @mercury_util_start(i8* %0) {
%2 = tail call i32 @LBA_REG_WRITE(i8* %0, i32 1280, i32 3)
ret i32 0
}
int set_update_int(int *value, int new_value) {
  if (*value == new_value) {
    return 0;
  } else {
    *value = new_value;
    return 1;
  }
}


x86 assembly (clang, -O0):
<set_update_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    1126 <set_update_int+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1136 <set_update_int+0x36>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_update_int>:
xor    %eax,%eax
cmp    %esi,(%rdi)
je     110d <set_update_int+0xd>
mov    %esi,(%rdi)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @set_update_int(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp eq i32 %3, %1
br i1 %4, label %6, label %5
5: ; preds = %2
store i32 %1, i32* %0
br label %6
6: ; preds = %2, %5
%7 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %7
}
void report_jobs(void) {}


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

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

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

LLVM IR (-O2):
define void @report_jobs() {
ret void
}
void InitializeIvr723Player(unsigned int chid, void *pIvrPlay) {}


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

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

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

LLVM IR (-O2):
define void @InitializeIvr723Player(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
char *longestPalindrome(char *);
int /*<<< orphan*/ puts(char *);
int main() {
  char s[] = "cbbd";
  char *result = longestPalindrome(s);
  puts(result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x9(%rbp),%rdi
call   1040 <longestPalindrome@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x0,0x4(%rsp)
movl   $0x64626263,(%rsp)
mov    %rsp,%rdi
call   1040 <longestPalindrome@plt>
mov    %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.s = [5 x i8] c"cbbd\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [5 x i8]* %2 to i8*
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%6 = call i8* @longestPalindrome(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @puts(i8* %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [5 x i8] c"cbbd\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i8* @longestPalindrome(i8* %2)
%4 = call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_gint_sts(int);
void handle_start_fram_interrupt(void) { set_gint_sts((1 << 3)); }


x86 assembly (clang, -O0):
<handle_start_fram_interrupt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
call   1030 <set_gint_sts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_start_fram_interrupt>:
mov    $0x8,%edi
jmp    1030 <set_gint_sts@plt>

LLVM IR (-O0):
define void @handle_start_fram_interrupt() {
%1 = call i32 @set_gint_sts(i32 8)
ret void
}

LLVM IR (-O2):
define void @handle_start_fram_interrupt() {
%1 = tail call i32 @set_gint_sts(i32 8)
ret void
}
void ff_hevc_put_hevc_epel_v6_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_v6_10_sse4() {
ret void
}
void fpga_mgr_debugfs_remove(struct fpga_manager *mgr) {}


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

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

LLVM IR (-O0):
%struct.fpga_manager = type opaque
define void @fpga_mgr_debugfs_remove(%struct.fpga_manager* %0) {
%2 = alloca %struct.fpga_manager*
store %struct.fpga_manager* %0, %struct.fpga_manager** %2
ret void
}

LLVM IR (-O2):
%struct.fpga_manager = type opaque
define void @fpga_mgr_debugfs_remove(%struct.fpga_manager* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output_0();
int /*<<< orphan*/ output_1();
void energenie_plug4() {
  output_0();
  output_0();
  output_1();
}


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

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

LLVM IR (-O0):
define void @energenie_plug4() {
%1 = call i32 (...) @output_0()
%2 = call i32 (...) @output_0()
%3 = call i32 (...) @output_1()
ret void
}

LLVM IR (-O2):
define void @energenie_plug4() {
%1 = tail call i32 (...) @output_0()
%2 = tail call i32 (...) @output_0()
%3 = tail call i32 (...) @output_1()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

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


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

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

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

LLVM IR (-O2):
define i32 @__getpid() {
%1 = tail call i32 (...) @getpid()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char *, char);
int isbase64(char c) {
  return !!(
      c &&
      strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
             c) != NULL);
}


x86 assembly (clang, -O0):
<isbase64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
je     114a <isbase64+0x3a>
lea    0xec9(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isbase64>:
test   %dil,%dil
je     1136 <isbase64+0x26>
push   %rax
movsbl %dil,%esi
lea    0xedf(%rip),%rdi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define i32 @isbase64(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i32* @strchr(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8 signext %7)
%9 = icmp ne i32* %8, null
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = xor i1 %11, true
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
@.str = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define i32 @isbase64(i8 signext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32* @strchr(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
float sq_side_perimeter(float perimeter) {
  float side = perimeter / 4;
  return side;
}


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

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

LLVM IR (-O0):
define float @sq_side_perimeter(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fdiv float %4, 4.000000e+00
store float %5, float* %3
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @sq_side_perimeter(float %0) {
%2 = fmul float %0, 2.500000e-01
ret float %2
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
void cast_unsigned_to_signed_Bad_FN() {
  char arr[10];
  uint32_t x = 4294967295;
  int32_t y = (int32_t)x;
  if (y < 10) {
    arr[y] = 0;
  }
}


x86 assembly (clang, -O0):
<cast_unsigned_to_signed_Bad_FN>:
push   %rbp
mov    %rsp,%rbp
movl   $0xffffffff,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1124 <cast_unsigned_to_signed_Bad_FN+0x24>
movslq -0x14(%rbp),%rax
movb   $0x0,-0xa(%rbp,%rax,1)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @cast_unsigned_to_signed_Bad_FN() {
%1 = alloca [10 x i8]
%2 = alloca i32
%3 = alloca i32
store i32 -1, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 %9
store i8 0, i8* %10
br label %11
11: ; preds = %7, %0
ret void
}

LLVM IR (-O2):
define void @cast_unsigned_to_signed_Bad_FN() {
ret void
}
void cleanup(int nSignal) {}


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

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

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

LLVM IR (-O2):
define void @cleanup(i32 %0) {
ret void
}
/* Variables and functions */
char *errorFunc() { return NULL; }


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

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

LLVM IR (-O0):
define i8* @errorFunc() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @errorFunc() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ mikenet_matrix_vec_mult_p(float *, int, float *, int,
                                             float **);
void mikenet_matrix_vec_mult(float *outvec, int nout, float *invec, int nin,
                             float **mat) {
  mikenet_matrix_vec_mult_p(outvec, nout, invec, nin, mat);
}


x86 assembly (clang, -O0):
<mikenet_matrix_vec_mult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
call   1030 <mikenet_matrix_vec_mult_p@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mikenet_matrix_vec_mult>:
jmp    1030 <mikenet_matrix_vec_mult_p@plt>

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

LLVM IR (-O2):
define void @mikenet_matrix_vec_mult(float* %0, i32 %1, float* %2, i32 %3, float** %4) {
%6 = tail call i32 @mikenet_matrix_vec_mult_p(float* %0, i32 %1, float* %2, i32 %3, float** %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void print_version() { printf("%s version %s\n", "wait4ports", "0.3.1"); }


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

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rdi
lea    0xef1(%rip),%rsi
lea    0xef5(%rip),%rdx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"%s version %s\0A\00"
@.str.1 = [11 x i8] c"wait4ports\00"
@.str.2 = [6 x i8] c"0.3.1\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void reactor_exec_event_loop(struct timeval *tv) { return; }


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

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

LLVM IR (-O0):
%struct.timeval = type opaque
define void @reactor_exec_event_loop(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
ret void
}

LLVM IR (-O2):
%struct.timeval = type opaque
define void @reactor_exec_event_loop(%struct.timeval* nocapture %0) {
ret void
}
void INT_Excep_TPU7_TCI7U(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU7_TCI7U() {
ret void
}
int main() {
label$$1:;
  if (1)
    goto label$$2;
  else
    goto label$$1;
label$$2:;
  return 10;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
jmp    1110 <main+0x10>
mov    $0xa,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
br label %3
3: ; preds = %2
ret i32 10
}

LLVM IR (-O2):
define i32 @main() {
ret i32 10
}
int test_imm_DDuint16_mem(unsigned short *val) {
  return ((*val) & (-0xDD << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_DDuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -221
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int myinb(int);
int /*<<< orphan*/ myoutb(int, int);
void direction_reverse(int reverse) {
  int ctrl;
  static int cur_mode = -1;
  if (cur_mode == reverse)
    return;
  ctrl = myinb((0x378 + 2));
  if (reverse) {
    ctrl |= 0x20;
  } else {
    ctrl &= ~0x20;
  }
  myoutb(ctrl, (0x378 + 2));
  cur_mode = reverse;
}


x86 assembly (clang, -O0):
<direction_reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eff(%rip),%eax
cmp    -0x4(%rbp),%eax
jne    113f <direction_reverse+0x1f>
jmp    1183 <direction_reverse+0x63>
mov    $0x37a,%edi
call   1040 <myinb@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1164 <direction_reverse+0x44>
mov    -0x8(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    116d <direction_reverse+0x4d>
mov    -0x8(%rbp),%eax
and    $0xffffffdf,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x37a,%esi
call   1030 <myoutb@plt>
mov    -0x4(%rbp),%eax
mov    %eax,0x2ead(%rip)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<direction_reverse>:
push   %rbx
cmp    %edi,0x2f09(%rip)
je     1155 <direction_reverse+0x35>
mov    %edi,%ebx
mov    $0x37a,%edi
call   1040 <myinb@plt>
xor    %edi,%edi
test   %ebx,%ebx
setne  %dil
and    $0xffffffdf,%eax
shl    $0x5,%edi
or     %eax,%edi
mov    $0x37a,%esi
call   1030 <myoutb@plt>
mov    %ebx,0x2edb(%rip)
pop    %rbx
ret

LLVM IR (-O0):
@direction_reverse.cur_mode = internal global i32 -1
define void @direction_reverse(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @direction_reverse.cur_mode
%5 = load i32, i32* %2
%6 = icmp eq i32 %4, %5
br i1 %6, label %7, label %8
7: ; preds = %1
br label %22
8: ; preds = %1
%9 = call i32 @myinb(i32 890)
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i32, i32* %3
%14 = or i32 %13, 32
store i32 %14, i32* %3
br label %18
15: ; preds = %8
%16 = load i32, i32* %3
%17 = and i32 %16, -33
store i32 %17, i32* %3
br label %18
18: ; preds = %15, %12
%19 = load i32, i32* %3
%20 = call i32 @myoutb(i32 %19, i32 890)
%21 = load i32, i32* %2
store i32 %21, i32* @direction_reverse.cur_mode
br label %22
22: ; preds = %18, %7
ret void
}

LLVM IR (-O2):
@direction_reverse.cur_mode = internal unnamed_addr global i32 -1
define void @direction_reverse(i32 %0) {
%2 = load i32, i32* @direction_reverse.cur_mode
%3 = icmp eq i32 %2, %0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i32 @myinb(i32 890)
%6 = icmp eq i32 %0, 0
%7 = and i32 %5, -33
%8 = select i1 %6, i32 0, i32 32
%9 = or i32 %7, %8
%10 = tail call i32 @myoutb(i32 %9, i32 890)
store i32 %0, i32* @direction_reverse.cur_mode
br label %11
11: ; preds = %1, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int test();
int main(int argc, char const *argv[]) {
  printf("%s\n", "Hello World");
  printf("%c\n", test());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rdi
lea    0xec7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <test@plt>
mov    %eax,%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <test@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [12 x i8] c"Hello World\00"
@.str.2 = [4 x i8] c"%c\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @test()
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %4)
ret i32 0
}
reg0adrx1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if (r0 <= (((short *)(11111111 & ~(__alignof__(short) - 1)))[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<reg0adrx1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movswl -0x6(%rbp),%eax
movslq -0x10(%rbp),%rdx
mov    $0xa98ac6,%ecx
movswl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     1144 <reg0adrx1+0x44>
movl   $0x1,-0x4(%rbp)
jmp    114b <reg0adrx1+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg0adrx1>:
movswl %di,%edx
movslq %ecx,%rax
movswl 0xa98ac6(%rax,%rax,1),%ecx
xor    %eax,%eax
cmp    %ecx,%edx
setle  %al
ret

LLVM IR (-O0):
define i32 @reg0adrx1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16, i16* %8
%17 = sext i16 %16 to i32
%18 = load i32, i32* %11
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i16, i16* inttoptr (i64 11111110 to i16*), i64 %19
%21 = load i16, i16* %20
%22 = sext i16 %21 to i32
%23 = icmp sle i32 %17, %22
br i1 %23, label %24, label %25
24: ; preds = %6
store i32 1, i32* %7
br label %26
25: ; preds = %6
store i32 0, i32* %7
br label %26
26: ; preds = %25, %24
%27 = load i32, i32* %7
ret i32 %27
}

LLVM IR (-O2):
define i32 @reg0adrx1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = shl i32 %0, 16
%8 = ashr exact i32 %7, 16
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds i16, i16* inttoptr (i64 11111110 to i16*), i64 %9
%11 = load i16, i16* %10
%12 = sext i16 %11 to i32
%13 = icmp sle i32 %8, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
size_t uiceil(double x) {
  size_t c;
  if (x < 0)
    return 0;
  c = (size_t)x;
  if ((x - c) > 0.0)
    c++;
  return c;
}


x86 assembly (clang, -O0):
<uiceil>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1124 <uiceil+0x24>
movq   $0x0,-0x8(%rbp)
jmp    11a4 <uiceil+0xa4>
movsd  -0x10(%rbp),%xmm0
movsd  0xecf(%rip),%xmm2
movaps %xmm0,%xmm1
subsd  %xmm2,%xmm1
cvttsd2si %xmm1,%rcx
cvttsd2si %xmm0,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
and    %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movaps 0xeb1(%rip),%xmm2
movq   -0x18(%rbp),%xmm1
punpckldq %xmm2,%xmm1
movapd 0xeb0(%rip),%xmm2
subpd  %xmm2,%xmm1
movaps %xmm1,%xmm2
unpckhpd %xmm1,%xmm1
addsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    119c <uiceil+0x9c>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uiceil>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    110d <uiceil+0xd>
xor    %eax,%eax
ret
cvttsd2si %xmm0,%rax
mov    %rax,%rcx
movapd %xmm0,%xmm2
subsd  0xedf(%rip),%xmm2
sar    $0x3f,%rcx
cvttsd2si %xmm2,%rdx
and    %rcx,%rdx
or     %rax,%rdx
movq   %rdx,%xmm2
punpckldq 0xed3(%rip),%xmm2
subpd  0xedb(%rip),%xmm2
movapd %xmm2,%xmm3
unpckhpd %xmm2,%xmm3
addsd  %xmm2,%xmm3
subsd  %xmm3,%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
add    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @uiceil(double %0) {
%2 = alloca i64
%3 = alloca double
%4 = alloca i64
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp olt double %5, 0.000000e+00
br i1 %6, label %7, label %8
7: ; preds = %1
store i64 0, i64* %2
br label %21
8: ; preds = %1
%9 = load double, double* %3
%10 = fptoui double %9 to i64
store i64 %10, i64* %4
%11 = load double, double* %3
%12 = load i64, i64* %4
%13 = uitofp i64 %12 to double
%14 = fsub double %11, %13
%15 = fcmp ogt double %14, 0.000000e+00
br i1 %15, label %16, label %19
16: ; preds = %8
%17 = load i64, i64* %4
%18 = add i64 %17, 1
store i64 %18, i64* %4
br label %19
19: ; preds = %16, %8
%20 = load i64, i64* %4
store i64 %20, i64* %2
br label %21
21: ; preds = %19, %7
%22 = load i64, i64* %2
ret i64 %22
}

LLVM IR (-O2):
define i64 @uiceil(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = fptoui double %0 to i64
%5 = uitofp i64 %4 to double
%6 = fsub double %0, %5
%7 = fcmp ogt double %6, 0.000000e+00
%8 = zext i1 %7 to i64
%9 = add i64 %8, %4
br label %10
10: ; preds = %1, %3
%11 = phi i64 [ %9, %3 ], [ 0, %1 ]
ret i64 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
void putshort(FILE *outf, unsigned short val) {
  unsigned char buf[2];
  buf[0] = val >> 8;
  buf[1] = val & 0xff;
  fwrite(buf, 2, 1, outf);
}


x86 assembly (clang, -O0):
<putshort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,-0xc(%rbp)
movzwl -0xa(%rbp),%eax
and    $0xff,%eax
mov    %al,-0xb(%rbp)
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putshort>:
push   %rax
mov    %rdi,%rcx
rol    $0x8,%si
mov    %si,0x6(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @putshort(i32* %0, i16 zeroext %1) {
%3 = alloca i32*
%4 = alloca i16
%5 = alloca [2 x i8]
store i32* %0, i32** %3
store i16 %1, i16* %4
%6 = load i16, i16* %4
%7 = zext i16 %6 to i32
%8 = ashr i32 %7, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %9, i8* %10
%11 = load i16, i16* %4
%12 = zext i16 %11 to i32
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 %14, i8* %15
%16 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%17 = load i32*, i32** %3
%18 = call i32 @fwrite(i8* %16, i32 2, i32 1, i32* %17)
ret void
}

LLVM IR (-O2):
define void @putshort(i32* nocapture %0, i16 zeroext %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = lshr i16 %1, 8
%6 = trunc i16 %5 to i8
store i8 %6, i8* %4
%7 = trunc i16 %1 to i8
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %7, i8* %8
%9 = call i32 @fwrite(i8* %4, i32 2, i32 1, i32* %0)
ret void
}