xunge/DecIR huggingface dataset:
/* Variables and functions */
int *calloc(int, int);
int *freq(unsigned char *c) {
  int i, *a;
  a = calloc(256, sizeof(int));
  i = 0;
  while (c[i] != 0) {
    a[c[i]]++;
    i++;
  }
  return a;
}


x86 assembly (clang, -O0):
<freq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x100,%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1172 <freq+0x62>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <freq+0x26>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freq>:
push   %rbx
mov    %rdi,%rbx
mov    $0x100,%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    (%rbx),%cl
test   %cl,%cl
je     1142 <freq+0x32>
add    $0x1,%rbx
nopl   (%rax)
movzbl %cl,%ecx
addl   $0x1,(%rax,%rcx,4)
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1130 <freq+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i32* @freq(i8* nocapture %0) {
%2 = tail call i32* @calloc(i32 256, i32 4)
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %1, %5
%6 = phi i64 [ %12, %5 ], [ 0, %1 ]
%7 = phi i8 [ %14, %5 ], [ %3, %1 ]
%8 = zext i8 %7 to i64
%9 = getelementptr inbounds i32, i32* %2, i64 %8
%10 = load i32, i32* %9
%11 = add nsw i32 %10, 1
store i32 %11, i32* %9
%12 = add nuw nsw i64 %6, 1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %1
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void mesg(const char *str) {
  if (str == NULL)
    str = "(null)";
  fprintf(stderr, "%s", str);
}


x86 assembly (clang, -O0):
<mesg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1132 <mesg+0x22>
lea    0xed2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mesg>:
test   %rdi,%rdi
lea    0xee6(%rip),%rdx
cmovne %rdi,%rdx
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
lea    0xed9(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"(null)\00"
@stderr = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @mesg(i8* %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}
const char *loader_TAPE_get_name(void) {
  return "loader for raw KC-Tape images";
}


x86 assembly (clang, -O0):
<loader_TAPE_get_name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<loader_TAPE_get_name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [30 x i8] c"loader for raw KC-Tape images\00"
define i8* @loader_TAPE_get_name() {
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [30 x i8] c"loader for raw KC-Tape images\00"
define i8* @loader_TAPE_get_name() {
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int S_IROTH;
int S_IRWXG;
int S_IRWXU;
int S_IXOTH;
int mkpath2(char const *, int);
int mkpath(const char *path) {
  return mkpath2(path, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
}


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

x86 assembly (clang, -O2):
<mkpath>:
mov    0x2ed1(%rip),%rax
mov    0x2eba(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e9f(%rip),%rax
or     (%rax),%esi
mov    0x2eae(%rip),%rax
or     (%rax),%esi
jmp    1030 <mkpath2@plt>

LLVM IR (-O0):
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IROTH = global i32 0
@S_IXOTH = global i32 0
define i32 @mkpath(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @S_IRWXU
%5 = load i32, i32* @S_IRWXG
%6 = or i32 %4, %5
%7 = load i32, i32* @S_IROTH
%8 = or i32 %6, %7
%9 = load i32, i32* @S_IXOTH
%10 = or i32 %8, %9
%11 = call i32 @mkpath2(i8* %3, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IROTH = global i32 0
@S_IXOTH = global i32 0
define i32 @mkpath(i8* %0) {
%2 = load i32, i32* @S_IRWXU
%3 = load i32, i32* @S_IRWXG
%4 = or i32 %3, %2
%5 = load i32, i32* @S_IROTH
%6 = or i32 %4, %5
%7 = load i32, i32* @S_IXOTH
%8 = or i32 %6, %7
%9 = tail call i32 @mkpath2(i8* %0, i32 %8)
ret i32 %9
}
/* Type definitions */
struct stat {
  scalar_t__ st_dev;
  scalar_t__ st_ino;
};

/* Variables and functions */
int file_eq(const struct stat *left, const struct stat *right) {
  return left->st_dev != right->st_dev || left->st_ino != right->st_ino;
}


x86 assembly (clang, -O0):
<file_eq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rdx
mov    $0x1,%al
cmp    (%rdx),%rcx
mov    %al,-0x11(%rbp)
jne    113b <file_eq+0x3b>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    0x8(%rcx),%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_eq>:
mov    (%rdi),%rcx
mov    $0x1,%eax
cmp    (%rsi),%rcx
jne    111a <file_eq+0x1a>
mov    0x8(%rdi),%rcx
xor    %eax,%eax
cmp    0x8(%rsi),%rcx
setne  %al
ret

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

LLVM IR (-O2):
%struct.stat = type { i64, i64 }
define i32 @file_eq(%struct.stat* nocapture %0, %struct.stat* nocapture %1) {
%3 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = icmp eq i64 %4, %6
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 1
%10 = load i64, i64* %9
%11 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 1
%12 = load i64, i64* %11
%13 = icmp ne i64 %10, %12
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %8, %2
%16 = phi i32 [ 1, %2 ], [ %14, %8 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ alwaysInline();
void use75() { alwaysInline(); }


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

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

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

LLVM IR (-O2):
define void @use75() {
%1 = tail call i32 (...) @alwaysInline()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYSCON_StartSystick(int);
void SYSCON_StartSystick_10ms() { SYSCON_StartSystick(0x000AFC7F); }


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

x86 assembly (clang, -O2):
<SYSCON_StartSystick_10ms>:
mov    $0xafc7f,%edi
jmp    1030 <SYSCON_StartSystick@plt>

LLVM IR (-O0):
define void @SYSCON_StartSystick_10ms() {
%1 = call i32 @SYSCON_StartSystick(i32 719999)
ret void
}

LLVM IR (-O2):
define void @SYSCON_StartSystick_10ms() {
%1 = tail call i32 @SYSCON_StartSystick(i32 719999)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ adler32(int /*<<< orphan*/, unsigned char *, size_t);
uint32_t gf_rsync_weak_checksum(unsigned char *buf, size_t len) {
  return adler32(0, buf, len);
}


x86 assembly (clang, -O0):
<gf_rsync_weak_checksum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
call   1030 <adler32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf_rsync_weak_checksum>:
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <adler32@plt>

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

LLVM IR (-O2):
define i32 @gf_rsync_weak_checksum(i8* %0, i64 %1) {
%3 = tail call i32 @adler32(i32 0, i8* %0, i64 %1)
ret i32 %3
}
/* Type definitions */
struct entity_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ destroy_shield(struct entity_t *);
void craft_shield_collision(struct entity_t *craft, struct entity_t *shield) {
  destroy_shield(shield);
}


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

x86 assembly (clang, -O2):
<craft_shield_collision>:
mov    %rsi,%rdi
jmp    1030 <destroy_shield@plt>

LLVM IR (-O0):
%struct.entity_t = type { i32 }
define void @craft_shield_collision(%struct.entity_t* %0, %struct.entity_t* %1) {
%3 = alloca %struct.entity_t*
%4 = alloca %struct.entity_t*
store %struct.entity_t* %0, %struct.entity_t** %3
store %struct.entity_t* %1, %struct.entity_t** %4
%5 = load %struct.entity_t*, %struct.entity_t** %4
%6 = call i32 @destroy_shield(%struct.entity_t* %5)
ret void
}

LLVM IR (-O2):
%struct.entity_t = type { i32 }
define void @craft_shield_collision(%struct.entity_t* nocapture readnone %0, %struct.entity_t* %1) {
%3 = tail call i32 @destroy_shield(%struct.entity_t* %1)
ret void
}
int default_mpgdecoder_volume_get(void *ctx, int *lvol, int *rvol) {
  return -1;
}


x86 assembly (clang, -O0):
<default_mpgdecoder_volume_get>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @default_mpgdecoder_volume_get(i8* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 -1
}
int FUNC_NAME(void) { return 23456; }


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

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

LLVM IR (-O0):
define i32 @FUNC_NAME() {
ret i32 23456
}

LLVM IR (-O2):
define i32 @FUNC_NAME() {
ret i32 23456
}
/* Variables and functions */
int inb(int);
int /*<<< orphan*/ outb(int, unsigned char);
void serial_putchar(unsigned char c) {
  outb(0xfffa, c);
  while (inb(0xfffb) & 0x02)
    continue;
  if (c == '\n')
    serial_putchar('\r');
}


x86 assembly (clang, -O0):
<serial_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0xfffa,%edi
movzbl -0x1(%rbp),%esi
call   1040 <outb@plt>
mov    $0xfffb,%edi
call   1050 <inb@plt>
and    $0x2,%eax
cmp    $0x0,%eax
je     1167 <serial_putchar+0x37>
jmp    114c <serial_putchar+0x1c>
movzbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    117e <serial_putchar+0x4e>
mov    $0xd,%edi
call   1030 <serial_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_putchar>:
push   %rbx
mov    %edi,%ebx
mov    $0xfffa,%edi
mov    %ebx,%esi
call   1030 <outb@plt>
nop
mov    $0xfffb,%edi
call   1040 <inb@plt>
test   $0x2,%al
jne    1130 <serial_putchar+0x10>
cmp    $0xa,%bl
jne    116e <serial_putchar+0x4e>
mov    $0xfffa,%edi
mov    $0xd,%esi
call   1030 <outb@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xfffb,%edi
call   1040 <inb@plt>
test   $0x2,%al
jne    1160 <serial_putchar+0x40>
pop    %rbx
ret

LLVM IR (-O0):
define void @serial_putchar(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @outb(i32 65530, i8 zeroext %3)
br label %5
5: ; preds = %9, %1
%6 = call i32 @inb(i32 65531)
%7 = and i32 %6, 2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %14, label %15
14: ; preds = %10
br label %15
15: ; preds = %14, %10
ret void
}

LLVM IR (-O2):
define void @serial_putchar(i8 zeroext %0) {
%2 = tail call i32 @outb(i32 65530, i8 zeroext %0)
br label %3
3: ; preds = %3, %1
%4 = tail call i32 @inb(i32 65531)
%5 = and i32 %4, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3
%8 = icmp eq i8 %0, 10
br i1 %8, label %9, label %15
9: ; preds = %7
%10 = tail call i32 @outb(i32 65530, i8 zeroext 13)
br label %11
11: ; preds = %11, %9
%12 = tail call i32 @inb(i32 65531)
%13 = and i32 %12, 2
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %11
15: ; preds = %11, %7
ret void
}
void g_set_printerr_handler() {}


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

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

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

LLVM IR (-O2):
define void @g_set_printerr_handler() {
ret void
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_10(int Salt, int Parameter) {
  unsigned b = Salt * 0x7E823B21 + 0x6BB3;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x7e823b21,-0x4(%rbp),%eax
add    $0x6bb3,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_10>:
imul   $0x7e823b21,%edi,%edi
add    $0x6bb3,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_10(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 2122464033
%8 = add nsw i32 %7, 27571
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @yahoo_M1Common(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @yahoo_f01_10(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 2122464033
%4 = add nsw i32 %3, 27571
%5 = tail call i32 @yahoo_M1Common(i32 %4, i32 %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ DelayClk3(int);
void delay_qus(int us) { DelayClk3(us * 125 / 8); }


x86 assembly (clang, -O0):
<delay_qus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x7d,-0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <DelayClk3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_qus>:
imul   $0x7d,%edi,%eax
lea    0x7(%rax),%edi
test   %eax,%eax
cmovns %eax,%edi
sar    $0x3,%edi
jmp    1030 <DelayClk3@plt>

LLVM IR (-O0):
define void @delay_qus(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 125
%5 = sdiv i32 %4, 8
%6 = call i32 @DelayClk3(i32 %5)
ret void
}

LLVM IR (-O2):
define void @delay_qus(i32 %0) {
%2 = mul nsw i32 %0, 125
%3 = sdiv i32 %2, 8
%4 = tail call i32 @DelayClk3(i32 %3)
ret void
}
/* Variables and functions */
int __ocml_isinf_f32(float);
int __isinff(float x) { return __ocml_isinf_f32(x); }


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

x86 assembly (clang, -O2):
<__isinff>:
jmp    1030 <__ocml_isinf_f32@plt>

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

LLVM IR (-O2):
define i32 @__isinff(float %0) {
%2 = tail call i32 @__ocml_isinf_f32(float %0)
ret i32 %2
}
void passByCopy(int n) { n = n + 1; }


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

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

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

LLVM IR (-O2):
define void @passByCopy(i32 %0) {
ret void
}
int switch_eg(int x) {
  int result = x;
  switch (x) {
  case 100:
    result *= 13;
    break;
  case 102:
    result += 10;
  case 103:
    result += 11;
    break;
  case 104:
  case 106:
    result *= result;
    break;
  default:
    result = 0;
  }
  return result;
}


x86 assembly (clang, -O0):
<switch_eg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff9c,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x6,%eax
ja     1168 <switch_eg+0x68>
mov    -0x10(%rbp),%rax
lea    0xed3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
imul   $0xd,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    116f <switch_eg+0x6f>
mov    -0x8(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xb,%eax
mov    %eax,-0x8(%rbp)
jmp    116f <switch_eg+0x6f>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    116f <switch_eg+0x6f>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<switch_eg>:
lea    -0x64(%rdi),%edx
cmp    $0x6,%edx
ja     1128 <switch_eg+0x28>
mov    $0x72,%ecx
mov    $0x514,%eax
lea    0xee7(%rip),%rsi
movslq (%rsi,%rdx,4),%rdx
add    %rsi,%rdx
jmp    *%rdx
imul   %edi,%edi
mov    %edi,%eax
ret
xor    %eax,%eax
ret
mov    $0x7b,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @switch_eg(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %2
switch i32 %5, label %19 [
i32 100, label %6
i32 102, label %9
i32 103, label %12
i32 104, label %15
i32 106, label %15
]
6: ; preds = %1
%7 = load i32, i32* %3
%8 = mul nsw i32 %7, 13
store i32 %8, i32* %3
br label %20
9: ; preds = %1
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 10
store i32 %11, i32* %3
br label %12
12: ; preds = %1, %9
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 11
store i32 %14, i32* %3
br label %20
15: ; preds = %1, %1
%16 = load i32, i32* %3
%17 = load i32, i32* %3
%18 = mul nsw i32 %17, %16
store i32 %18, i32* %3
br label %20
19: ; preds = %1
store i32 0, i32* %3
br label %20
20: ; preds = %19, %15, %12, %6
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @switch_eg(i32 %0) {
switch i32 %0, label %7 [
i32 100, label %8
i32 102, label %2
i32 103, label %3
i32 104, label %5
i32 106, label %5
]
2: ; preds = %1
br label %3
3: ; preds = %1, %2
%4 = phi i32 [ 114, %1 ], [ 123, %2 ]
br label %8
5: ; preds = %1, %1
%6 = mul nuw nsw i32 %0, %0
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %5, %3
%9 = phi i32 [ 0, %7 ], [ %6, %5 ], [ %4, %3 ], [ 1300, %1 ]
ret i32 %9
}
void mode(n) {
  if (n)
    system("stty raw -echo");
  else
    system("stty echo -raw");
}


x86 assembly (clang, -O0):
<mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1138 <mode+0x28>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <system@plt>
jmp    1146 <mode+0x36>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mode>:
test   %edi,%edi
lea    0xef6(%rip),%rax
lea    0xee0(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"stty raw -echo\00"
@.str.1 = [15 x i8] c"stty echo -raw\00"
define void @mode(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"stty raw -echo\00"
@.str.1 = [15 x i8] c"stty echo -raw\00"
define void @mode(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* %3)
ret void
}
/* Variables and functions */
scalar_t__ obtenerDireccionMac(char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char hwaddr[18];
  if (obtenerDireccionMac(hwaddr) == 0)
    printf("hwaddr: %s\n", hwaddr);
  else
    printf("No se ha podido encontrar la dirección MAC del equipo.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <obtenerDireccionMac@plt>
cmp    $0x0,%rax
jne    1159 <main+0x39>
lea    -0x20(%rbp),%rsi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1167 <main+0x47>
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    %rsp,%rdi
call   1030 <obtenerDireccionMac@plt>
test   %rax,%rax
je     114f <main+0x1f>
lea    0xec4(%rip),%rdi
call   1040 <puts@plt>
jmp    1160 <main+0x30>
lea    0xeaa(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"hwaddr: %s\0A\00"
@.str.1 = [57 x i8] c"No se ha podido encontrar la direcci\C3\B3n MAC del equipo.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [18 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [18 x i8], [18 x i8]* %2, i64 0, i64 0
%4 = call i64 @obtenerDireccionMac(i8* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = getelementptr inbounds [18 x i8], [18 x i8]* %2, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %11
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"hwaddr: %s\0A\00"
@str = [56 x i8] c"No se ha podido encontrar la direcci\C3\B3n MAC del equipo.\00"
define i32 @main() {
%1 = alloca [18 x i8]
%2 = getelementptr inbounds [18 x i8], [18 x i8]* %1, i64 0, i64 0
%3 = call i64 @obtenerDireccionMac(i8* %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %9
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int pegaValor(char *texto) {
  printf(texto);
  int valor;
  scanf("%d", &valor);
  return valor;
}


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

x86 assembly (clang, -O2):
<pegaValor>:
push   %rax
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @pegaValor(i8* nocapture %0) {
%2 = alloca i32
%3 = tail call i32 @printf(i8* dereferenceable(1) %0)
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
ret i32 %6
}
/* Type definitions */
struct rb3_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rb3_delete_noninternal(struct rb3_head *);
struct rb3_head *rb3_get_next_descendant(struct rb3_head *);
int /*<<< orphan*/ rb3_replace(struct rb3_head *, struct rb3_head *);
__attribute__((no)) void rb3_delete_internal(struct rb3_head *head) {
  struct rb3_head *subst;
  subst = rb3_get_next_descendant(head);
  rb3_delete_noninternal(subst);
  rb3_replace(head, subst);
}


x86 assembly (clang, -O0):
<rb3_delete_internal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rb3_get_next_descendant@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <rb3_delete_noninternal@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <rb3_replace@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb3_delete_internal>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <rb3_get_next_descendant@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <rb3_delete_noninternal@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <rb3_replace@plt>

LLVM IR (-O0):
%struct.rb3_head = type { i32 }
define void @rb3_delete_internal(%struct.rb3_head* %0) {
%2 = alloca %struct.rb3_head*
%3 = alloca %struct.rb3_head*
store %struct.rb3_head* %0, %struct.rb3_head** %2
%4 = load %struct.rb3_head*, %struct.rb3_head** %2
%5 = call %struct.rb3_head* @rb3_get_next_descendant(%struct.rb3_head* %4)
store %struct.rb3_head* %5, %struct.rb3_head** %3
%6 = load %struct.rb3_head*, %struct.rb3_head** %3
%7 = call i32 @rb3_delete_noninternal(%struct.rb3_head* %6)
%8 = load %struct.rb3_head*, %struct.rb3_head** %2
%9 = load %struct.rb3_head*, %struct.rb3_head** %3
%10 = call i32 @rb3_replace(%struct.rb3_head* %8, %struct.rb3_head* %9)
ret void
}

LLVM IR (-O2):
%struct.rb3_head = type { i32 }
define void @rb3_delete_internal(%struct.rb3_head* %0) {
%2 = tail call %struct.rb3_head* @rb3_get_next_descendant(%struct.rb3_head* %0)
%3 = tail call i32 @rb3_delete_noninternal(%struct.rb3_head* %2)
%4 = tail call i32 @rb3_replace(%struct.rb3_head* %0, %struct.rb3_head* %2)
ret void
}
double equal(double a, double b) { return a == b; }


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

x86 assembly (clang, -O2):
<equal>:
cmpeqsd %xmm1,%xmm0
movsd  0xef3(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @equal(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp oeq double %5, %6
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @equal(double %0, double %1) {
%3 = fcmp oeq double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
/* Variables and functions */
int namei(char *);
int search_file(char *path) { return namei(path); }


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

x86 assembly (clang, -O2):
<search_file>:
jmp    1030 <namei@plt>

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

LLVM IR (-O2):
define i32 @search_file(i8* %0) {
%2 = tail call i32 @namei(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern char *shmem_error(void) { printf("\nOpenSHMEM Analyzer\n"); }


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define noalias i8* @shmem_error() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i8* undef
}
void avio_open_dir() {}


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

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

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

LLVM IR (-O2):
define void @avio_open_dir() {
ret void
}
/* Variables and functions */
double exp(double const);
double _exponential(const int numInputs, const double *inputs,
                    const double *connectionWeights) {
  return exp(inputs[0]);
}


x86 assembly (clang, -O0):
<_exponential>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <exp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_exponential>:
movsd  (%rsi),%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @_exponential(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = call double @exp(double %9)
ret double %10
}

LLVM IR (-O2):
define double @_exponential(i32 %0, double* nocapture %1, double* nocapture readnone %2) {
%4 = load double, double* %1
%5 = tail call double @exp(double %4)
ret double %5
}
void MUTEX_LOCK_WL_SCAN_SET(void) {}


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

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

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

LLVM IR (-O2):
define void @MUTEX_LOCK_WL_SCAN_SET() {
ret void
}
float rintf(float x) {
  float retval;
  __asm__("frndint;" : "=t"(retval) : "0"(x));
  return retval;
}


x86 assembly (clang, -O0):
<rintf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
flds   -0xc(%rbp)
frndint
fstps  -0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rintf>:
movss  %xmm0,-0x4(%rsp)
flds   -0x4(%rsp)
frndint
fstps  -0x8(%rsp)
movss  -0x8(%rsp),%xmm0
ret

LLVM IR (-O0):
define float @rintf(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = call float asm "frndint;", "={st},0,~{dirflag},~{fpsr},~{flags}"(float %4)
store float %5, float* %3
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @rintf(float %0) {
%2 = tail call float asm "frndint;", "={st},0,~{dirflag},~{fpsr},~{flags}"(float %0)
ret float %2
}
int main() {
  int N, D;
  int r, ds, p, q;
  r = N;
  ds = D;
  p = 1;
  q = 0;
  while (p != 1) {
    ds = ds / 2;
    p = p / 2;
    if (r >= ds) {
      r = r - ds;
      q = q + p;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1,-0x18(%rbp)
je     116e <main+0x6e>
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     1169 <main+0x69>
mov    -0x10(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1125 <main+0x25>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;
struct buffer_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ game_process_stream_ooo(int /*<<< orphan*/,
                                           int /*<<< orphan*/,
                                           struct buffer_t *);
void game_process_stream_timed_ooo(uint32_t conn, uint32_t index,
                                   uint64_t *stamp, struct buffer_t *stream) {
  game_process_stream_ooo(conn, index, stream);
}


x86 assembly (clang, -O0):
<game_process_stream_timed_ooo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <game_process_stream_ooo@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<game_process_stream_timed_ooo>:
mov    %rcx,%rdx
jmp    1030 <game_process_stream_ooo@plt>

LLVM IR (-O0):
%struct.buffer_t = type { i32 }
define void @game_process_stream_timed_ooo(i32 %0, i32 %1, i32* %2, %struct.buffer_t* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca %struct.buffer_t*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store %struct.buffer_t* %3, %struct.buffer_t** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load %struct.buffer_t*, %struct.buffer_t** %8
%12 = call i32 @game_process_stream_ooo(i32 %9, i32 %10, %struct.buffer_t* %11)
ret void
}

LLVM IR (-O2):
%struct.buffer_t = type { i32 }
define void @game_process_stream_timed_ooo(i32 %0, i32 %1, i32* nocapture readnone %2, %struct.buffer_t* %3) {
%5 = tail call i32 @game_process_stream_ooo(i32 %0, i32 %1, %struct.buffer_t* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ traverseMaze(char **, int, int, int, int, char);
void print_directions(char **maze, int w, int h) {
  int x = (w / 2) | 1;
  int y = 1;
  char direction = 'S';
  traverseMaze(maze, x, y, w, h, direction);
}


x86 assembly (clang, -O0):
<print_directions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
or     $0x1,%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movb   $0x53,-0x19(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
movsbl -0x19(%rbp),%r9d
call   1030 <traverseMaze@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_directions>:
mov    %edx,%r8d
mov    %esi,%ecx
shr    $0x1f,%esi
add    %ecx,%esi
sar    %esi
or     $0x1,%esi
mov    $0x1,%edx
mov    $0x53,%r9d
jmp    1030 <traverseMaze@plt>

LLVM IR (-O0):
define void @print_directions(i8** %0, i32 %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %5
%11 = sdiv i32 %10, 2
%12 = or i32 %11, 1
store i32 %12, i32* %7
store i32 1, i32* %8
store i8 83, i8* %9
%13 = load i8**, i8*** %4
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = load i8, i8* %9
%19 = call i32 @traverseMaze(i8** %13, i32 %14, i32 %15, i32 %16, i32 %17, i8 signext %18)
ret void
}

LLVM IR (-O2):
define void @print_directions(i8** %0, i32 %1, i32 %2) {
%4 = sdiv i32 %1, 2
%5 = or i32 %4, 1
%6 = tail call i32 @traverseMaze(i8** %0, i32 %5, i32 1, i32 %1, i32 %2, i8 signext 83)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ visited_buff;

/* Variables and functions */
int /*<<< orphan*/ memset(int **, int, int);
int /*<<< orphan*/ top_box_path(char const *, int /*<<< orphan*/, char *,
                                int /*<<< orphan*/, char **, int /*<<< orphan*/,
                                int /*<<< orphan*/, int **);
void top_box(const char *word, char box[][5]) {
  static char buff[1024];
  static int visited_buff[6][5];
  memset(visited_buff, -1, sizeof(visited_buff));
  (void)top_box_path(word, 0, buff, 0, box, 0, 0, visited_buff);
}


x86 assembly (clang, -O0):
<top_box>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0x3309(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0x78,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%r8
xor    %r9d,%r9d
lea    0x2ee8(%rip),%rdx
lea    0x32e1(%rip),%rax
mov    %r9d,%esi
mov    %r9d,%ecx
movl   $0x0,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <top_box_path@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<top_box>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x330e(%rip),%r15
mov    %r15,%rdi
mov    $0xffffffff,%esi
mov    $0x78,%edx
call   1040 <memset@plt>
lea    0x2ef5(%rip),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %ecx,%ecx
mov    %r14,%r8
xor    %r9d,%r9d
push   %r15
push   $0x0
call   1030 <top_box_path@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@top_box.buff = internal global [1024 x i8] zeroinitializer
@top_box.visited_buff = internal global [6 x [5 x i32]] zeroinitializer
define void @top_box(i8* %0, [5 x i8]* %1) {
%3 = alloca i8*
%4 = alloca [5 x i8]*
store i8* %0, i8** %3
store [5 x i8]* %1, [5 x i8]** %4
%5 = call i32 @memset(i32** bitcast ([6 x [5 x i32]]* @top_box.visited_buff to i32**), i32 -1, i32 120)
%6 = load i8*, i8** %3
%7 = load [5 x i8]*, [5 x i8]** %4
%8 = bitcast [5 x i8]* %7 to i8**
%9 = call i32 @top_box_path(i8* %6, i32 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @top_box.buff, i64 0, i64 0), i32 0, i8** %8, i32 0, i32 0, i32** bitcast ([6 x [5 x i32]]* @top_box.visited_buff to i32**))
ret void
}

LLVM IR (-O2):
@top_box.buff = internal global [1024 x i8] zeroinitializer
@top_box.visited_buff = internal global [6 x [5 x i32]] zeroinitializer
define void @top_box(i8* %0, [5 x i8]* %1) {
%3 = tail call i32 @memset(i32** bitcast ([6 x [5 x i32]]* @top_box.visited_buff to i32**), i32 -1, i32 120)
%4 = bitcast [5 x i8]* %1 to i8**
%5 = tail call i32 @top_box_path(i8* %0, i32 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @top_box.buff, i64 0, i64 0), i32 0, i8** %4, i32 0, i32 0, i32** bitcast ([6 x [5 x i32]]* @top_box.visited_buff to i32**))
ret void
}
/* Variables and functions */
const char *get_hypervisor_cpuid(void) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @get_hypervisor_cpuid() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void prp_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @prp_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_f(char *, unsigned int);
void soundb_none_play(const short *sample_map, unsigned sample_count) {
  log_f("sound: soundb_none_play(count:%d)\n", sample_count);
}


x86 assembly (clang, -O0):
<soundb_none_play>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <log_f@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [35 x i8] c"sound: soundb_none_play(count:%d)\0A\00"
define void @soundb_none_play(i16* %0, i32 %1) {
%3 = alloca i16*
%4 = alloca i32
store i16* %0, i16** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @log_f(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"sound: soundb_none_play(count:%d)\0A\00"
define void @soundb_none_play(i16* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @log_f(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_decoders();
int /*<<< orphan*/ test_encoders();
int main(int argc, char *argv[]) {
  (void)argc, (void)argv;
  if (!test_encoders())
    return 1;
  if (!test_decoders())
    return 1;
  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    $0x0,%al
call   1040 <test_encoders@plt>
cmp    $0x0,%eax
jne    1152 <main+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1175 <main+0x55>
mov    $0x0,%al
call   1030 <test_decoders@plt>
cmp    $0x0,%eax
jne    116e <main+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1175 <main+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_encoders@plt>
test   %eax,%eax
je     113e <main+0x1e>
xor    %eax,%eax
call   1030 <test_decoders@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret
mov    $0x1,%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 (...) @test_encoders()
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %2
store i32 1, i32* %3
br label %16
11: ; preds = %2
%12 = call i32 (...) @test_decoders()
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %11
store i32 1, i32* %3
br label %16
15: ; preds = %11
store i32 0, i32* %3
br label %16
16: ; preds = %15, %14, %10
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_encoders()
%4 = icmp eq i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 (...) @test_decoders()
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 1, %2 ], [ %8, %5 ]
ret i32 %10
}