xunge/DecIR huggingface dataset:
/* Type definitions */
struct cpufreq_stats {
  int dummy;
};

/* Variables and functions */
struct cpufreq_stats *sysfs_get_stats(unsigned int cpu,
                                      unsigned long long *total_time) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.cpufreq_stats = type { i32 }
define %struct.cpufreq_stats* @sysfs_get_stats(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
ret %struct.cpufreq_stats* null
}

LLVM IR (-O2):
%struct.cpufreq_stats = type { i32 }
define noalias %struct.cpufreq_stats* @sysfs_get_stats(i32 %0, i64* nocapture readnone %1) {
ret %struct.cpufreq_stats* null
}
long arch_iscall(long xt) { return (*(long *)xt & 0xfc000003) == 0x48000001; }


x86 assembly (clang, -O0):
<arch_iscall>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
movabs $0xfc000003,%rax
and    (%rcx),%rax
cmp    $0x48000001,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_iscall>:
mov    $0xfc000003,%ecx
and    (%rdi),%ecx
xor    %eax,%eax
cmp    $0x48000001,%ecx
sete   %al
ret

LLVM IR (-O0):
define i64 @arch_iscall(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i64*
%5 = load i64, i64* %4
%6 = and i64 %5, 4227858435
%7 = icmp eq i64 %6, 1207959553
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @arch_iscall(i64 %0) {
%2 = inttoptr i64 %0 to i64*
%3 = load i64, i64* %2
%4 = and i64 %3, 4227858435
%5 = icmp eq i64 %4, 1207959553
%6 = zext i1 %5 to i64
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128GeneralIOPinP__8__IO__set();
void CC2420TransmitP__CSN__set(void) { HplAtm128GeneralIOPinP__8__IO__set(); }


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

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

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

LLVM IR (-O2):
define void @CC2420TransmitP__CSN__set() {
%1 = tail call i32 (...) @HplAtm128GeneralIOPinP__8__IO__set()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char const *);
void get_pathname(const char *prefix, const char *filename, char *pathname) {
  pathname[0] = 0;
  strcat(pathname, prefix);
  strcat(pathname, "/");
  strcat(pathname, filename);
}


x86 assembly (clang, -O0):
<get_pathname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1030 <strcat@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pathname>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%rsi
movb   $0x0,(%rdx)
mov    %rdx,%rdi
call   1030 <strcat@plt>
lea    0xed1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcat@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define void @get_pathname(i8* %0, i8* %1, i8* %2) {
store i8 0, i8* %2
%4 = tail call i32 @strcat(i8* %2, i8* %0)
%5 = tail call i32 @strcat(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @strcat(i8* %2, i8* %1)
ret void
}
/* Variables and functions */
int rand();
char randChar() { return (char)(rand() % (127 - 32 + 1) + 32); }


x86 assembly (clang, -O0):
<randChar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x60,%ecx
cltd
idiv   %ecx
add    $0x20,%edx
mov    %dl,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<randChar>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x24,%rcx
add    %edx,%ecx
shl    $0x5,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
add    $0x20,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @randChar() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 96
%3 = add nsw i32 %2, 32
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @randChar() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 96
%3 = trunc i32 %2 to i8
%4 = add nsw i8 %3, 32
ret i8 %4
}
void initcgo(void) {}


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

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

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

LLVM IR (-O2):
define void @initcgo() {
ret void
}
/* Variables and functions */
char *malloc(unsigned int);
int /*<<< orphan*/ memcpy(char *, char const *, unsigned int);
char *str_range_copy(const char *start, const char *end) {
  unsigned len = end - start;
  char *val = malloc(len + 1);
  memcpy(val, start, len);
  val[len] = 0;
  return val;
}


x86 assembly (clang, -O0):
<str_range_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    -0x14(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_range_copy>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
sub    %rdi,%rbx
lea    0x1(%rbx),%edi
call   1040 <malloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <memcpy@plt>
mov    %ebx,%eax
movb   $0x0,(%r15,%rax,1)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @str_range_copy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = ptrtoint i8* %7 to i64
%10 = ptrtoint i8* %8 to i64
%11 = sub i64 %9, %10
%12 = trunc i64 %11 to i32
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = add i32 %13, 1
%15 = call i8* @malloc(i32 %14)
store i8* %15, i8** %6
%16 = load i8*, i8** %6
%17 = load i8*, i8** %3
%18 = load i32, i32* %5
%19 = call i32 @memcpy(i8* %16, i8* %17, i32 %18)
%20 = load i8*, i8** %6
%21 = load i32, i32* %5
%22 = zext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
store i8 0, i8* %23
%24 = load i8*, i8** %6
ret i8* %24
}

LLVM IR (-O2):
define i8* @str_range_copy(i8* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = add i32 %6, 1
%8 = tail call i8* @malloc(i32 %7)
%9 = tail call i32 @memcpy(i8* %8, i8* %0, i32 %6)
%10 = and i64 %5, 4294967295
%11 = getelementptr inbounds i8, i8* %8, i64 %10
store i8 0, i8* %11
ret i8* %8
}
int sqlite3_global_recover() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sqlite3_global_recover() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help_print_hint() {
  printf("Use \"displayinfo help\" for valid arguments.\n");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"Use \22displayinfo help\22 for valid arguments.\0A\00"
define void @help_print_hint() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [44 x i8] c"Use \22displayinfo help\22 for valid arguments.\00"
define void @help_print_hint() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret void
}
int isUsableDasd(char *device) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @isUsableDasd(i8* nocapture readnone %0) {
ret i32 0
}
void call_desc_dealloc(struct desc_track *desc) {}


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

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

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

LLVM IR (-O2):
%struct.desc_track = type opaque
define void @call_desc_dealloc(%struct.desc_track* nocapture %0) {
ret void
}
/* Variables and functions */
int parse_int_file(int /*<<< orphan*/, char *, int);
int get_physical_package_id(int cpu) {
  return parse_int_file(
      0, "/sys/devices/system/cpu/cpu%d/topology/physical_package_id", cpu);
}


x86 assembly (clang, -O0):
<get_physical_package_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %edi,%edi
lea    0xed9(%rip),%rsi
call   1030 <parse_int_file@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_physical_package_id>:
mov    %edi,%edx
lea    0xee7(%rip),%rsi
xor    %edi,%edi
jmp    1030 <parse_int_file@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"/sys/devices/system/cpu/cpu%d/topology/physical_package_id\00"
define i32 @get_physical_package_id(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @parse_int_file(i32 0, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [59 x i8] c"/sys/devices/system/cpu/cpu%d/topology/physical_package_id\00"
define i32 @get_physical_package_id(i32 %0) {
%2 = tail call i32 @parse_int_file(i32 0, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ log_message(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
void log_del(char *filename) {
  char buffer[2048];
  sprintf(buffer, "Delete \"%s\" file", filename);
  log_message(buffer);
}


x86 assembly (clang, -O0):
<log_del>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x810(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x810(%rbp),%rdi
call   1030 <log_message@plt>
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_del>:
push   %rbx
sub    $0x800,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <log_message@plt>
add    $0x800,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Delete \22%s\22 file\00"
define void @log_del(i8* %0) {
%2 = alloca i8*
%3 = alloca [2048 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%8 = call i32 @log_message(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Delete \22%s\22 file\00"
define void @log_del(i8* %0) {
%2 = alloca [2048 x i8]
%3 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @log_message(i8* %3)
ret void
}
/* Type definitions */
struct Hero {
  int dummy;
};
struct Ability {
  int dummy;
};

/* Variables and functions */
float Crt_GetRandomInt(int, int);
float ZhenWuWoJianQi_damage(struct Ability *self, struct Hero *attacker,
                            struct Hero *target) {
  return Crt_GetRandomInt(585, 640);
}


x86 assembly (clang, -O0):
<ZhenWuWoJianQi_damage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x249,%edi
mov    $0x280,%esi
call   1030 <Crt_GetRandomInt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZhenWuWoJianQi_damage>:
mov    $0x249,%edi
mov    $0x280,%esi
jmp    1030 <Crt_GetRandomInt@plt>

LLVM IR (-O0):
%struct.Ability = type { i32 }
%struct.Hero = type { i32 }
define float @ZhenWuWoJianQi_damage(%struct.Ability* %0, %struct.Hero* %1, %struct.Hero* %2) {
%4 = alloca %struct.Ability*
%5 = alloca %struct.Hero*
%6 = alloca %struct.Hero*
store %struct.Ability* %0, %struct.Ability** %4
store %struct.Hero* %1, %struct.Hero** %5
store %struct.Hero* %2, %struct.Hero** %6
%7 = call float @Crt_GetRandomInt(i32 585, i32 640)
ret float %7
}

LLVM IR (-O2):
%struct.Ability = type { i32 }
%struct.Hero = type { i32 }
define float @ZhenWuWoJianQi_damage(%struct.Ability* nocapture readnone %0, %struct.Hero* nocapture readnone %1, %struct.Hero* nocapture readnone %2) {
%4 = tail call float @Crt_GetRandomInt(i32 585, i32 640)
ret float %4
}
/* Variables and functions */
int fs_util_create_dir(char *);
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *);
int fs_util_create_dir_in_base(const char *base, const char *dirname) {
  char dir[1024];
  sprintf(dir, "%s/%s", base, dirname);
  return fs_util_create_dir(dir);
}


x86 assembly (clang, -O0):
<fs_util_create_dir_in_base>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb7(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1040 <fs_util_create_dir@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_util_create_dir_in_base>:
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xecb(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <fs_util_create_dir@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
define i32 @fs_util_create_dir_in_base(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = call i32 @fs_util_create_dir(i8* %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
define i32 @fs_util_create_dir_in_base(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i32 @fs_util_create_dir(i8* %4)
ret i32 %6
}
stamp(s, template) register char *s;
char *template;
{
  char *p, *getenv();
  strcpy(s, "/tmp/");
  strcat(s, template);
  numtoa(&s[strlen(s)], getpid());
}


x86 assembly (clang, -O0):
<stamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1070 <strcat@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
mov    $0x0,%al
call   1060 <numtoa@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stamp>:
push   %rbx
mov    %rdi,%rbx
movw   $0x2f,0x4(%rdi)
movl   $0x706d742f,(%rdi)
call   1060 <strcat@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
add    %rax,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
pop    %rbx
jmp    1050 <numtoa@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"/tmp/\00"
define i32 @stamp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = call i8* @strcpy(i8* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i8* @strcat(i8* %9, i8* %10)
%12 = load i8*, i8** %4
%13 = load i8*, i8** %4
%14 = call i64 @strlen(i8* %13)
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = call i32 (...) @getpid()
%17 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @numtoa to i32 (i8*, i32, ...)*)(i8* %15, i32 %16)
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@.str = [6 x i8] c"/tmp/\00"
define i32 @stamp(i8* %0, i8* nocapture %1) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(6) %0, i8* align 1 dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 6, i1 false)
%3 = tail call i8* @strcat(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 (...) @getpid()
%7 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @numtoa to i32 (i8*, i32, ...)*)(i8* %5, i32 %6)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int read_i2c_reg(int, int, int /*<<< orphan*/ *);
int piups_get_vbattconv(int file_i2c, uint16_t *vbattconv) {
  return read_i2c_reg(file_i2c, 0x50, vbattconv);
}


x86 assembly (clang, -O0):
<piups_get_vbattconv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x50,%esi
call   1030 <read_i2c_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<piups_get_vbattconv>:
mov    %rsi,%rdx
mov    $0x50,%esi
jmp    1030 <read_i2c_reg@plt>

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

LLVM IR (-O2):
define i32 @piups_get_vbattconv(i32 %0, i32* %1) {
%3 = tail call i32 @read_i2c_reg(i32 %0, i32 80, i32* %1)
ret i32 %3
}
void ff_hevc_put_hevc_epel_v8_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_v8_10_sse4() {
ret void
}
int lastone(char *s, int c, int n) {
  char *s2 = s + n;
  while (s2 != s) {
    s2--;
    n--;
    if (*s2 == c)
      return (n);
  }
  return (-1);
}


x86 assembly (clang, -O0):
<lastone>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1160 <lastone+0x60>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    115b <lastone+0x5b>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <lastone+0x67>
jmp    111d <lastone+0x1d>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lastone>:
movslq %edx,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %rax,%rax
je     1123 <lastone+0x23>
movsbl -0x1(%rdi,%rax,1),%ecx
add    $0xffffffffffffffff,%rax
cmp    %esi,%ecx
jne    1110 <lastone+0x10>
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @lastone(i8* %0, i32 %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
br label %6
6: ; preds = %10, %3
%7 = phi i32 [ %2, %3 ], [ %12, %10 ]
%8 = phi i8* [ %5, %3 ], [ %11, %10 ]
%9 = icmp eq i8* %8, %0
br i1 %9, label %16, label %10
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %8, i64 -1
%12 = add nsw i32 %7, -1
%13 = load i8, i8* %11
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, %1
br i1 %15, label %16, label %6
16: ; preds = %6, %10
%17 = phi i32 [ %12, %10 ], [ -1, %6 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
extern void mem_free(void *ptr, const char *file, int line) {
  if (ptr) {
    free(ptr);
  }
}


x86 assembly (clang, -O0):
<mem_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1137 <mem_free+0x27>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_free>:
test   %rdi,%rdi
je     111a <mem_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @mem_free(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i8*, i8** %4
%11 = call i32 @free(i8* %10)
br label %12
12: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
define void @mem_free(i8* %0, i8* nocapture readnone %1, i32 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @free(i8* %0)
br label %7
7: ; preds = %5, %3
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ visualid;
};
typedef TYPE_1__ XStandardColormap;

/* Variables and functions */
unsigned long get_XStandardColormap_visualid(void *_p) {
  return (unsigned long)((XStandardColormap *)_p)->visualid;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XStandardColormap_visualid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XStandardColormap_visualid(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void store8(p, a) char *p;
char a;
{ *p = a; }


x86 assembly (clang, -O0):
<store8>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store8>:
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @store8(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ show_backtrace(int);
void *time__TimeT__from_i(void *self, long p0) {
  void *var;
  printf("NOT YET IMPLEMENTED nitni for time#TimeT#from_i at "
         "lib/standard/time.nit:35,2--35\n");
  show_backtrace(1);
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<time__TimeT__from_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <show_backtrace@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time__TimeT__from_i>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <show_backtrace@plt>

LLVM IR (-O0):
@.str = [83 x i8] c"NOT YET IMPLEMENTED nitni for time#TimeT#from_i at lib/standard/time.nit:35,2--35\0A\00"
define i8* @time__TimeT__from_i(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @show_backtrace(i32 1)
br label %8
8: ; preds = %2
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
@str = [82 x i8] c"NOT YET IMPLEMENTED nitni for time#TimeT#from_i at lib/standard/time.nit:35,2--35\00"
define noalias i8* @time__TimeT__from_i(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @show_backtrace(i32 1)
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ NSEEL_quit();
int NSEEL_init() {
  NSEEL_quit();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @NSEEL_init() {
%1 = call i32 (...) @NSEEL_quit()
ret i32 0
}

LLVM IR (-O2):
define i32 @NSEEL_init() {
%1 = tail call i32 (...) @NSEEL_quit()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ stm32f4_ts_check_boundary(int *, int);
int stm32f4_ts_calibrate_x(int x) {
  int tmp_x;
  x = (x <= 3000) ? (3870 - x) : (3800 - x);
  tmp_x = x / 15;
  stm32f4_ts_check_boundary(&tmp_x, 240 - 1);
  return tmp_x;
}


x86 assembly (clang, -O0):
<stm32f4_ts_calibrate_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xbb8,-0x4(%rbp)
jg     1138 <stm32f4_ts_calibrate_x+0x28>
mov    $0xf1e,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <stm32f4_ts_calibrate_x+0x33>
mov    $0xed8,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0xef,%esi
call   1030 <stm32f4_ts_check_boundary@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stm32f4_ts_calibrate_x>:
push   %rax
cmp    $0xbb9,%edi
mov    $0xf1e,%eax
mov    $0xed8,%ecx
cmovl  %eax,%ecx
sub    %edi,%ecx
movslq %ecx,%rax
imul   $0xffffffff88888889,%rax,%rcx
shr    $0x20,%rcx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x3,%eax
add    %ecx,%eax
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0xef,%esi
call   1030 <stm32f4_ts_check_boundary@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @stm32f4_ts_calibrate_x(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 3000
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 3870, %7
br label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = sub nsw i32 3800, %10
br label %12
12: ; preds = %9, %6
%13 = phi i32 [ %8, %6 ], [ %11, %9 ]
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = sdiv i32 %14, 15
store i32 %15, i32* %3
%16 = call i32 @stm32f4_ts_check_boundary(i32* %3, i32 239)
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @stm32f4_ts_calibrate_x(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = icmp slt i32 %0, 3001
%5 = select i1 %4, i32 3870, i32 3800
%6 = sub nsw i32 %5, %0
%7 = sdiv i32 %6, 15
store i32 %7, i32* %2
%8 = call i32 @stm32f4_ts_check_boundary(i32* %2, i32 239)
%9 = load i32, i32* %2
ret i32 %9
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ exercise_3_9(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int size = atoi(argv[1]);
  char *matrix_file = argv[2];
  printf("Exercise 3 (9):\n");
  exercise_3_9(matrix_file);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1050 <exercise_3_9@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x10(%rsi),%rbx
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <exercise_3_9@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@str = [16 x i8] c"Exercise 3 (9):\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 2
%4 = load i8*, i8** %3
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exercise_3_9(i8* %4)
ret i32 0
}
int test_imm_35int32_mem(int *val) {
  return ((*val) & (0x35 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_35int32_mem>:
testb  $0x35,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_35int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 53
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p434_square(uintptr_t, uintptr_t);
void fiat_p434_square(uint64_t out1[7], const uint64_t arg1[7]) {
  internal_fiat_p434_square((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p434_square>:
jmp    1030 <internal_fiat_p434_square@plt>

LLVM IR (-O0):
define void @fiat_p434_square(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p434_square(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p434_square(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p434_square(i64 %3, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("Hello World.");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World.\00"
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 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
double stdlib_strided_dvariancepn(int /*<<< orphan*/ const, double const,
                                  double const *, int /*<<< orphan*/ const);
double stdlib_strided_dvariance(const int64_t N, const double correction,
                                const double *X, const int64_t stride) {
  return stdlib_strided_dvariancepn(N, correction, X, stride);
}


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

x86 assembly (clang, -O2):
<stdlib_strided_dvariance>:
jmp    1030 <stdlib_strided_dvariancepn@plt>

LLVM IR (-O0):
define double @stdlib_strided_dvariance(i32 %0, double %1, double* %2, i32 %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double*
%8 = alloca i32
store i32 %0, i32* %5
store double %1, double* %6
store double* %2, double** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load double, double* %6
%11 = load double*, double** %7
%12 = load i32, i32* %8
%13 = call double @stdlib_strided_dvariancepn(i32 %9, double %10, double* %11, i32 %12)
ret double %13
}

LLVM IR (-O2):
define double @stdlib_strided_dvariance(i32 %0, double %1, double* %2, i32 %3) {
%5 = tail call double @stdlib_strided_dvariancepn(i32 %0, double %1, double* %2, i32 %3)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ Pie174(long, long, long, long, double, double, unsigned long,
                          unsigned long);
void pie(long x, long y, long rx, long ry, double sa, double ea,
         unsigned long cfg, unsigned long cbg) {
  Pie174(x, y, rx, ry, sa, ea, cfg, cbg);
}


x86 assembly (clang, -O0):
<pie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mov    -0x38(%rbp),%r8
mov    -0x40(%rbp),%r9
call   1030 <Pie174@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pie>:
jmp    1030 <Pie174@plt>

LLVM IR (-O0):
define void @pie(i64 %0, i64 %1, i64 %2, i64 %3, double %4, double %5, i64 %6, i64 %7) {
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca double
%14 = alloca double
%15 = alloca i64
%16 = alloca i64
store i64 %0, i64* %9
store i64 %1, i64* %10
store i64 %2, i64* %11
store i64 %3, i64* %12
store double %4, double* %13
store double %5, double* %14
store i64 %6, i64* %15
store i64 %7, i64* %16
%17 = load i64, i64* %9
%18 = load i64, i64* %10
%19 = load i64, i64* %11
%20 = load i64, i64* %12
%21 = load double, double* %13
%22 = load double, double* %14
%23 = load i64, i64* %15
%24 = load i64, i64* %16
%25 = call i32 @Pie174(i64 %17, i64 %18, i64 %19, i64 %20, double %21, double %22, i64 %23, i64 %24)
ret void
}

LLVM IR (-O2):
define void @pie(i64 %0, i64 %1, i64 %2, i64 %3, double %4, double %5, i64 %6, i64 %7) {
%9 = tail call i32 @Pie174(i64 %0, i64 %1, i64 %2, i64 %3, double %4, double %5, i64 %6, i64 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int **);
int main() {
  int *c;
  foo(&c);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32*
%2 = bitcast i32** %1 to i8*
%3 = call i32 @foo(i32** %1)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void I2CSlaveDisable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000804))) = 0;
  (*((volatile uint32_t *)(ui32Base + 0x00000020))) &= ~(0x00000020);
}


x86 assembly (clang, -O0):
<I2CSlaveDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x804,%eax
cltq
movl   $0x0,(%rax)
mov    -0x4(%rbp),%eax
add    $0x20,%eax
cltq
mov    (%rax),%ecx
and    $0xffffffdf,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveDisable>:
movslq %edi,%rax
movl   $0x0,0x804(%rax)
andl   $0xffffffdf,0x20(%rax)
ret

LLVM IR (-O0):
define void @I2CSlaveDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 2052
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
store volatile i32 0, i32* %6
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 32
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, -33
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @I2CSlaveDisable(i32 %0) {
%2 = add nsw i32 %0, 2052
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
store volatile i32 0, i32* %4
%5 = add nsw i32 %0, 32
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, -33
store volatile i32 %9, i32* %7
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wctrans_t;

/* Variables and functions */
wctrans_t wctrans(const char *property) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @wctrans(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, size_t, int /*<<< orphan*/);
size_t ftell(int /*<<< orphan*/ *);
void write_char(FILE *fp, int c, size_t *index) {
  fseek(fp, *index, SEEK_SET);
  fputc(c, fp);
  *index = ftell(fp);
}


x86 assembly (clang, -O0):
<write_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
mov    0x2e8b(%rip),%rax
mov    (%rax),%edx
call   1050 <fseek@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ftell@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_char>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    (%rdx),%rsi
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
call   1050 <fseek@plt>
mov    %r14d,%edi
mov    %rbp,%rsi
call   1030 <fputc@plt>
mov    %rbp,%rdi
call   1040 <ftell@plt>
mov    %rax,(%rbx)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define void @write_char(i32* %0, i32 %1, i64* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i64*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i64* %2, i64** %6
%7 = load i32*, i32** %4
%8 = load i64*, i64** %6
%9 = load i64, i64* %8
%10 = load i32, i32* @SEEK_SET
%11 = call i32 @fseek(i32* %7, i64 %9, i32 %10)
%12 = load i32, i32* %5
%13 = load i32*, i32** %4
%14 = call i32 @fputc(i32 %12, i32* %13)
%15 = load i32*, i32** %4
%16 = call i64 @ftell(i32* %15)
%17 = load i64*, i64** %6
store i64 %16, i64* %17
ret void
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define void @write_char(i32* nocapture %0, i32 %1, i64* nocapture %2) {
%4 = load i64, i64* %2
%5 = load i32, i32* @SEEK_SET
%6 = tail call i32 @fseek(i32* %0, i64 %4, i32 %5)
%7 = tail call i32 @fputc(i32 %1, i32* %0)
%8 = tail call i64 @ftell(i32* %0)
store i64 %8, i64* %2
ret void
}
/* Variables and functions */
unsigned short getBitboardValue(unsigned short, unsigned short);
unsigned short setBitboardValue(unsigned short bitboard,
                                unsigned short indexToRetrieve,
                                unsigned short value) {
  unsigned short bitValue = getBitboardValue(bitboard, indexToRetrieve);
  if (bitValue != value)
    bitboard ^= ((short)1 << indexToRetrieve);
  return bitboard;
}


x86 assembly (clang, -O0):
<setBitboardValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x2(%rbp),%ax
movzwl %ax,%edi
movzwl -0x4(%rbp),%esi
call   1030 <getBitboardValue@plt>
mov    %ax,-0x8(%rbp)
movzwl -0x8(%rbp),%eax
movzwl -0x6(%rbp),%ecx
cmp    %ecx,%eax
je     1168 <setBitboardValue+0x58>
movzwl -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
movzwl -0x2(%rbp),%eax
xor    %ecx,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setBitboardValue>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
call   1030 <getBitboardValue@plt>
mov    $0x1,%edx
mov    %ebp,%ecx
shl    %cl,%edx
xor    %ecx,%ecx
cmp    %r14w,%ax
cmovne %edx,%ecx
xor    %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i16 @setBitboardValue(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%8 = load i16, i16* %4
%9 = load i16, i16* %5
%10 = call zeroext i16 @getBitboardValue(i16 zeroext %8, i16 zeroext %9)
store i16 %10, i16* %7
%11 = load i16, i16* %7
%12 = zext i16 %11 to i32
%13 = load i16, i16* %6
%14 = zext i16 %13 to i32
%15 = icmp ne i32 %12, %14
br i1 %15, label %16, label %24
16: ; preds = %3
%17 = load i16, i16* %5
%18 = zext i16 %17 to i32
%19 = shl i32 1, %18
%20 = load i16, i16* %4
%21 = zext i16 %20 to i32
%22 = xor i32 %21, %19
%23 = trunc i32 %22 to i16
store i16 %23, i16* %4
br label %24
24: ; preds = %16, %3
%25 = load i16, i16* %4
ret i16 %25
}

LLVM IR (-O2):
define zeroext i16 @setBitboardValue(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2) {
%4 = tail call zeroext i16 @getBitboardValue(i16 zeroext %0, i16 zeroext %1)
%5 = icmp eq i16 %4, %2
%6 = zext i16 %1 to i32
%7 = shl nuw i32 1, %6
%8 = trunc i32 %7 to i16
%9 = select i1 %5, i16 0, i16 %8
%10 = xor i16 %9, %0
ret i16 %10
}
int sf_is_ipbc_supported(void) {
  return (0);
  return (1);
}


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

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

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

LLVM IR (-O2):
define i32 @sf_is_ipbc_supported() {
ret i32 0
}
const char *rcsid(const char *p) {
  return rcsid(p = "@(#)$Id: is_tar.c 10 2006-07-10 18:22:27Z hyin $");
}


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

x86 assembly (clang, -O2):
<rcsid>:
jmp    1100 <rcsid>

LLVM IR (-O0):
@.str = [49 x i8] c"@(#)$Id: is_tar.c 10 2006-07-10 18:22:27Z hyin $\00"
define i8* @rcsid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i8* @rcsid(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @rcsid(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ Dbprintf(char *);
int EPA_Setup(void) {
  Dbprintf("No card found");
  return 1;
}


x86 assembly (clang, -O0):
<EPA_Setup>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <Dbprintf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPA_Setup>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <Dbprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"No card found\00"
define i32 @EPA_Setup() {
%1 = call i32 @Dbprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [14 x i8] c"No card found\00"
define i32 @EPA_Setup() {
%1 = tail call i32 @Dbprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 1
}