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

/* Variables and functions */
int _destroy_comp_channel(struct ibv_comp_channel *);
int /*<<< orphan*/ dmtcp_plugin_disable_ckpt();
int /*<<< orphan*/ dmtcp_plugin_enable_ckpt();
int ibv_destroy_comp_channel(struct ibv_comp_channel *channel) {
  dmtcp_plugin_disable_ckpt();
  int rslt = _destroy_comp_channel(channel);
  dmtcp_plugin_enable_ckpt();
  return rslt;
}


x86 assembly (clang, -O0):
<ibv_destroy_comp_channel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dmtcp_plugin_disable_ckpt@plt>
mov    -0x8(%rbp),%rdi
call   1040 <_destroy_comp_channel@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibv_destroy_comp_channel>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <dmtcp_plugin_disable_ckpt@plt>
mov    %rbx,%rdi
call   1040 <_destroy_comp_channel@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ibv_comp_channel = type { i32 }
define i32 @ibv_destroy_comp_channel(%struct.ibv_comp_channel* %0) {
%2 = alloca %struct.ibv_comp_channel*
%3 = alloca i32
store %struct.ibv_comp_channel* %0, %struct.ibv_comp_channel** %2
%4 = call i32 (...) @dmtcp_plugin_disable_ckpt()
%5 = load %struct.ibv_comp_channel*, %struct.ibv_comp_channel** %2
%6 = call i32 @_destroy_comp_channel(%struct.ibv_comp_channel* %5)
store i32 %6, i32* %3
%7 = call i32 (...) @dmtcp_plugin_enable_ckpt()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
%struct.ibv_comp_channel = type { i32 }
define i32 @ibv_destroy_comp_channel(%struct.ibv_comp_channel* %0) {
%2 = tail call i32 (...) @dmtcp_plugin_disable_ckpt()
%3 = tail call i32 @_destroy_comp_channel(%struct.ibv_comp_channel* %0)
%4 = tail call i32 (...) @dmtcp_plugin_enable_ckpt()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ system(char *);
void speichert_ldap_name_in_Datei(char *uid) {
  char syscall_ldap_name[60] = "ldapsearch -x uid=";
  strcat(syscall_ldap_name, uid);
  strcat(syscall_ldap_name, " | grep displayName: > ldap_name");
  system(syscall_ldap_name);
}


x86 assembly (clang, -O0):
<speichert_ldap_name_in_Datei>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x3c,%edx
call   1040 <memcpy@plt>
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x50(%rbp),%rdi
lea    0xed3(%rip),%rsi
call   1050 <strcat@plt>
lea    -0x50(%rbp),%rdi
call   1030 <system@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<speichert_ldap_name_in_Datei>:
push   %rbx
sub    $0x40,%rsp
mov    %rdi,%rsi
movups 0xefd(%rip),%xmm0
movups %xmm0,0x2c(%rsp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xead(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strcat@plt>
lea    0xed3(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.speichert_ldap_name_in_Datei.syscall_ldap_name = [60 x i8] c"ldapsearch -x uid=\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [33 x i8] c" | grep displayName: > ldap_name\00"
define void @speichert_ldap_name_in_Datei(i8* %0) {
%2 = alloca i8*
%3 = alloca [60 x i8]
store i8* %0, i8** %2
%4 = bitcast [60 x i8]* %3 to i8*
%5 = getelementptr inbounds [60 x i8], [60 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @strcat(i8* %5, i8* %6)
%8 = getelementptr inbounds [60 x i8], [60 x i8]* %3, i64 0, i64 0
%9 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [60 x i8], [60 x i8]* %3, i64 0, i64 0
%11 = call i32 @system(i8* %10)
ret void
}

LLVM IR (-O2):
@__const.speichert_ldap_name_in_Datei.syscall_ldap_name = [60 x i8] c"ldapsearch -x uid=\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [33 x i8] c" | grep displayName: > ldap_name\00"
define void @speichert_ldap_name_in_Datei(i8* %0) {
%2 = alloca [60 x i8]
%3 = getelementptr inbounds [60 x i8], [60 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcat(i8* %3, i8* %0)
%5 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @system(i8* %3)
ret void
}
int board_dhcp_wait(char *ip, char *sn, char *gw) {
  ((void)ip);
  ((void)sn);
  ((void)gw);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @board_dhcp_wait(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** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @board_dhcp_wait(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Type definitions */
typedef unsigned int __u32;

/* Variables and functions */
__u32 tipc_addr(unsigned int zone, unsigned int cluster, unsigned int node) {
  return (zone << 24) | (cluster << 12) | node;
}


x86 assembly (clang, -O0):
<tipc_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%ecx
shl    $0xc,%ecx
or     %ecx,%eax
or     -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tipc_addr>:
mov    %esi,%eax
shl    $0x18,%edi
shl    $0xc,%eax
or     %edi,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @tipc_addr(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = shl i32 %7, 24
%9 = load i32, i32* %5
%10 = shl i32 %9, 12
%11 = or i32 %8, %10
%12 = load i32, i32* %6
%13 = or i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @tipc_addr(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 24
%5 = shl i32 %1, 12
%6 = or i32 %5, %4
%7 = or i32 %6, %2
ret i32 %7
}
/* Variables and functions */
double log(int);
int st_log2(int x) { return log(x) * 1.442695040888963407359925; }


x86 assembly (clang, -O0):
<st_log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <log@plt>
movsd  0xed5(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<st_log2>:
push   %rax
call   1030 <log@plt>
mulsd  0xee2(%rip),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @st_log2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call double @log(i32 %3)
%5 = fmul double %4, 0x3FF71547652B82FE
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @st_log2(i32 %0) {
%2 = tail call double @log(i32 %0)
%3 = fmul double %2, 0x3FF71547652B82FE
%4 = fptosi double %3 to i32
ret i32 %4
}
int register_devfreq_cooling_notifier(struct notifier_block *nb) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.notifier_block = type opaque
define i32 @register_devfreq_cooling_notifier(%struct.notifier_block* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void write_mtd(unsigned char *buffer, FILE *fp, unsigned long offset,
               unsigned long len) {
  return;
}


x86 assembly (clang, -O0):
<write_mtd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @write_mtd(i8* %0, i32* %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i32* %1, i32** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
ret void
}

LLVM IR (-O2):
define void @write_mtd(i8* nocapture %0, i32* nocapture %1, i64 %2, i64 %3) {
ret void
}
void baz(int j) { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *rle_open_f_noexit(char const *, char const *, char const *);
FILE *rle_open_f(const char *prog_name, const char *file_name,
                 const char *mode) {
  FILE *fp;
  if ((fp = rle_open_f_noexit(prog_name, file_name, mode)) == NULL)
    exit(-1);
  return fp;
}


x86 assembly (clang, -O0):
<rle_open_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <rle_open_f_noexit@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    115d <rle_open_f+0x3d>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rle_open_f>:
push   %rax
call   1030 <rle_open_f_noexit@plt>
test   %rax,%rax
je     112d <rle_open_f+0xd>
pop    %rcx
ret
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i32* @rle_open_f(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32* @rle_open_f_noexit(i8* %0, i8* %1, i8* %2)
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %3
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int mkostemps(char *, int, int);
void no_resourceLeak_mkostemps_01(char *template, int suffixlen, int flags) {
  int fp = mkostemps(template, suffixlen, flags);
  close(fp);
}


x86 assembly (clang, -O0):
<no_resourceLeak_mkostemps_01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <mkostemps@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<no_resourceLeak_mkostemps_01>:
push   %rax
call   1040 <mkostemps@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <close@plt>

LLVM IR (-O0):
define void @no_resourceLeak_mkostemps_01(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @mkostemps(i8* %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = call i32 @close(i32 %12)
ret void
}

LLVM IR (-O2):
define void @no_resourceLeak_mkostemps_01(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @mkostemps(i8* %0, i32 %1, i32 %2)
%5 = tail call i32 @close(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ time(long *);
long int ssecs(void) {
  long int seconds;
  time(&seconds);
  return seconds;
}


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

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

LLVM IR (-O0):
define i64 @ssecs() {
%1 = alloca i64
%2 = call i32 @time(i64* %1)
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @ssecs() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @time(i64* %1)
%4 = load i64, i64* %1
ret i64 %4
}
/* Variables and functions */
double M_PI;
double to_radian(double deg) { return (deg * M_PI) / 180; }


x86 assembly (clang, -O0):
<to_radian>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2ed3(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xedf(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_radian>:
mov    0x2ee1(%rip),%rax
mulsd  (%rax),%xmm0
divsd  0xeed(%rip),%xmm0
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @to_radian(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* @M_PI
%5 = fmul double %3, %4
%6 = fdiv double %5, 1.800000e+02
ret double %6
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @to_radian(double %0) {
%2 = load double, double* @M_PI
%3 = fmul double %2, %0
%4 = fdiv double %3, 1.800000e+02
ret double %4
}
void gtk_window_set_wmclass() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_set_wmclass() {
ret void
}
int memory_is_range_type_available(int type) {
  switch (type) {
  case 1:
  case 3:
    return 1;
  case 2:
  case 4:
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<memory_is_range_type_available>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     1141 <memory_is_range_type_available+0x41>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1148 <memory_is_range_type_available+0x48>
jmp    1141 <memory_is_range_type_available+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memory_is_range_type_available>:
and    $0xfffffffd,%edi
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @memory_is_range_type_available(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 1, label %5
i32 3, label %5
i32 2, label %6
i32 4, label %6
]
5: ; preds = %1, %1
store i32 1, i32* %2
br label %8
6: ; preds = %1, %1
br label %7
7: ; preds = %1, %6
store i32 0, i32* %2
br label %8
8: ; preds = %7, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @memory_is_range_type_available(i32 %0) {
%2 = and i32 %0, -3
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ wwviaudio_cancel_sound(int /*<<< orphan*/);
void wwviaudio_cancel_music(void) { wwviaudio_cancel_sound((0)); }


x86 assembly (clang, -O0):
<wwviaudio_cancel_music>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <wwviaudio_cancel_sound@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @wwviaudio_cancel_music() {
%1 = call i32 @wwviaudio_cancel_sound(i32 0)
ret void
}

LLVM IR (-O2):
define void @wwviaudio_cancel_music() {
%1 = tail call i32 @wwviaudio_cancel_sound(i32 0)
ret void
}
double max_d(double a, double b) {
  if (a >= b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<max_d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     112d <max_d+0x2d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1137 <max_d+0x37>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_d>:
movapd %xmm1,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define double @max_d(double %0, double %1) {
%3 = fcmp oge double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
int isPrime(int num, int divisor) {
  if (num < 2)
    return 1;
  if (divisor == 1)
    return 1;
  else {
    if (num % divisor == 0)
      return 0;
  }
}


x86 assembly (clang, -O0):
<isPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1120 <isPrime+0x20>
movl   $0x1,-0x4(%rbp)
jmp    1157 <isPrime+0x57>
cmpl   $0x1,-0xc(%rbp)
jne    1136 <isPrime+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1157 <isPrime+0x57>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1152 <isPrime+0x52>
movl   $0x0,-0x4(%rbp)
jmp    1157 <isPrime+0x57>
jmp    1157 <isPrime+0x57>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPrime>:
cmp    $0x2,%edi
setl   %al
cmp    $0x1,%esi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @isPrime(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 2
%4 = icmp eq i32 %1, 1
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ netCoreSysctlInit();
void usrNetSysctlInit(void) { netCoreSysctlInit(); }


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

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

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

LLVM IR (-O2):
define void @usrNetSysctlInit() {
%1 = tail call i32 (...) @netCoreSysctlInit()
ret void
}
unsigned f(void) {
  int i = -1;
  unsigned larg = 4;
  int test1 = (i << 3);
  int test2 = (larg << 32);
  int test3 = (i << larg);
  int test4 = (larg << larg);
  return 3;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0xffffffff,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x18(%rbp)
mov    $0x3,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 -1, i32* %1
store i32 4, i32* %2
%7 = load i32, i32* %1
%8 = shl i32 %7, 3
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = shl i32 %9, 32
store i32 %10, i32* %4
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = shl i32 %11, %12
store i32 %13, i32* %5
%14 = load i32, i32* %2
%15 = load i32, i32* %2
%16 = shl i32 %14, %15
store i32 %16, i32* %6
ret i32 3
}

LLVM IR (-O2):
define i32 @f() {
ret i32 3
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float randf() { return ((float)rand() / (float)(RAND_MAX)); }


x86 assembly (clang, -O0):
<randf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec1(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<randf>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @randf() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
ret float %5
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @randf() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
ret float %5
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ waitpid(int /*<<< orphan*/, int *, int);
pid_t octave_waitpid_wrapper(pid_t pid, int *statusp, int options) {
  return waitpid(pid, statusp, options);
}


x86 assembly (clang, -O0):
<octave_waitpid_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <waitpid@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<octave_waitpid_wrapper>:
jmp    1030 <waitpid@plt>

LLVM IR (-O0):
define i32 @octave_waitpid_wrapper(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %6
%10 = call i32 @waitpid(i32 %7, i32* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @octave_waitpid_wrapper(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @waitpid(i32 %0, i32* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ func3();
int main(void) {
  do {
    unsigned int i;
    for (i = 0; i < (1000); ++i)
      func3();
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jae    1148 <main+0x38>
mov    $0x0,%al
call   1030 <func3@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
jmp    114d <main+0x3d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3e8,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <func3@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0
store i32 0, i32* %2
br label %4
4: ; preds = %9, %3
%5 = load i32, i32* %2
%6 = icmp ult i32 %5, 1000
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = call i32 (...) @func3()
br label %9
9: ; preds = %7
%10 = load i32, i32* %2
%11 = add i32 %10, 1
store i32 %11, i32* %2
br label %4
12: ; preds = %4
br label %13
13: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 (...) @func3()
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 1000
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void av_calloc() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo_2_2_2_2_1_2_1_1_2() {
ret void
}
int ascii_to_control(void *baton, int c, int *ctrl_char) {
  *ctrl_char = (c & 037);
  return 1;
}


x86 assembly (clang, -O0):
<ascii_to_control>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascii_to_control>:
and    $0x1f,%esi
mov    %esi,(%rdx)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @ascii_to_control(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
%7 = load i32, i32* %5
%8 = and i32 %7, 31
%9 = load i32*, i32** %6
store i32 %8, i32* %9
ret i32 1
}

LLVM IR (-O2):
define i32 @ascii_to_control(i8* nocapture readnone %0, i32 %1, i32* nocapture writeonly %2) {
%4 = and i32 %1, 31
store i32 %4, i32* %2
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void f11(long j) {
  if ((j & ((1UL << (11)) - 1)) >= ((1UL << ((11) - 1)) + 2))
    abort();
}


x86 assembly (clang, -O0):
<f11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x7ff,%rax
cmp    $0x402,%rax
jb     1139 <f11+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f11>:
and    $0x7fe,%edi
cmp    $0x402,%edi
jae    111f <f11+0xf>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @f11(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 2047
%5 = icmp uge i64 %4, 1026
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @f11(i64 %0) {
%2 = and i64 %0, 2046
%3 = icmp ugt i64 %2, 1025
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
double exp(double);
double DBO(double DBO) {
  double Q3, A = 102.6, B = -0.1101;
  if (DBO > 30) {
    return 2.0;
  } else {
    Q3 = A * exp((B * DBO));
  }
  return Q3;
}


x86 assembly (clang, -O0):
<DBO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xeeb(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xed6(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xebc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1160 <DBO+0x50>
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1194 <DBO+0x84>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DBO>:
push   %rax
ucomisd 0xeef(%rip),%xmm0
jbe    1125 <DBO+0x15>
movsd  0xedd(%rip),%xmm0
pop    %rax
ret
mulsd  0xee3(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0xede(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @DBO(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double 1.026000e+02, double* %5
store double -1.101000e-01, double* %6
%7 = load double, double* %3
%8 = fcmp ogt double %7, 3.000000e+01
br i1 %8, label %9, label %10
9: ; preds = %1
store double 2.000000e+00, double* %2
br label %19
10: ; preds = %1
%11 = load double, double* %5
%12 = load double, double* %6
%13 = load double, double* %3
%14 = fmul double %12, %13
%15 = call double @exp(double %14)
%16 = fmul double %11, %15
store double %16, double* %4
br label %17
17: ; preds = %10
%18 = load double, double* %4
store double %18, double* %2
br label %19
19: ; preds = %17, %9
%20 = load double, double* %2
ret double %20
}

LLVM IR (-O2):
define double @DBO(double %0) {
%2 = fcmp ogt double %0, 3.000000e+01
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = fmul double %0, -1.101000e-01
%5 = tail call double @exp(double %4)
%6 = fmul double %5, 1.026000e+02
br label %7
7: ; preds = %1, %3
%8 = phi double [ %6, %3 ], [ 2.000000e+00, %1 ]
ret double %8
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *get_basename(const char *filename) {
  const char *retval = strrchr(filename, '/');
  return retval ? retval + 1 : filename;
}


x86 assembly (clang, -O0):
<get_basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <get_basename+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <get_basename+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_basename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @get_basename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
int test_032(int a, int b, int c, int d) { return a + ((d >> 31) & 1) + b + c; }


x86 assembly (clang, -O0):
<test_032>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%ecx
sar    $0x1f,%ecx
and    $0x1,%ecx
add    %ecx,%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_032>:
shr    $0x1f,%ecx
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_032(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %8
%11 = ashr i32 %10, 31
%12 = and i32 %11, 1
%13 = add nsw i32 %9, %12
%14 = load i32, i32* %6
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %7
%17 = add nsw i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @test_032(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = lshr i32 %3, 31
%6 = add i32 %1, %0
%7 = add i32 %6, %2
%8 = add i32 %7, %5
ret i32 %8
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i;
  int j;
  i = __VERIFIER_nondet_int();
  while (i < 10) {
    j = i;
    while (j > 0) {
      j = j + 1;
    }
    i = i + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    115f <main+0x4f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1151 <main+0x41>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1139 <main+0x29>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
br label %5
5: ; preds = %16, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i32, i32* %2
store i32 %9, i32* %3
br label %10
10: ; preds = %13, %8
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %10
16: ; preds = %10
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %5
19: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void Keyboard_Init() {}


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

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

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

LLVM IR (-O2):
define void @Keyboard_Init() {
ret void
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
double timespec2secd(const struct timespec *ts_in) {
  return ((double)ts_in->tv_sec) + ((double)ts_in->tv_nsec) * (1e-9);
}


x86 assembly (clang, -O0):
<timespec2secd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2sdq 0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
cvtsi2sdq (%rax),%xmm0
movsd  0xedd(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec2secd>:
cvtsi2sdq 0x8(%rdi),%xmm1
cvtsi2sdq (%rdi),%xmm0
mulsd  0xeed(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define double @timespec2secd(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = load %struct.timespec*, %struct.timespec** %2
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 0
%9 = load i64, i64* %8
%10 = sitofp i64 %9 to double
%11 = call double @llvm.fmuladd.f64(double %10, double 1.000000e-09, double %6)
ret double %11
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define double @timespec2secd(%struct.timespec* nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to double
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = tail call double @llvm.fmuladd.f64(double %7, double 1.000000e-09, double %4)
ret double %8
}
void kgsl_mh_intrcallback(struct kgsl_device *device) {}


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

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

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

LLVM IR (-O2):
%struct.kgsl_device = type opaque
define void @kgsl_mh_intrcallback(%struct.kgsl_device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int bus_crash(int n) {
  int b;
  int *a = &b;
  a = (int *)((int)a | 0x1);
  if (n > 0)
    bus_crash(n - 1);
  *a = 3;
  printf("well, well, well.\n");
  return 1;
}


x86 assembly (clang, -O0):
<bus_crash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
or     $0x1,%eax
cltq
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1155 <bus_crash+0x35>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <bus_crash@plt>
mov    -0x10(%rbp),%rax
movl   $0x3,(%rax)
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bus_crash>:
push   %rax
test   %edi,%edi
jle    112d <bus_crash+0xd>
add    $0xffffffff,%edi
call   1040 <bus_crash@plt>
lea    0x4(%rsp),%rax
cltq
movl   $0x3,0x1(%rax)
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [18 x i8] c"well, well, well.\00"
define i32 @bus_crash(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = add nsw i32 %0, -1
%7 = tail call i32 @bus_crash(i32 %6)
br label %8
8: ; preds = %5, %1
%9 = ptrtoint i32* %2 to i64
%10 = shl i64 %9, 32
%11 = ashr exact i64 %10, 32
%12 = or i64 %11, 1
%13 = inttoptr i64 %12 to i32*
store i32 3, i32* %13
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 1
}
int config_IRDETO_GUESSING(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_IRDETO_GUESSING() {
ret i32 0
}
int main() {
  int a, b, c, i;
  for (i = 0; i < 10; i = i + 1) {
    if (a) {
      b = 0;
      c = 0;
    } else {
      b = 1;
      c = 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    115a <main+0x5a>
cmpl   $0x0,-0x8(%rbp)
je     1139 <main+0x39>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
jmp    1147 <main+0x47>
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
jmp    114c <main+0x4c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <main+0x12>
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
store i32 0, i32* %1
store i32 0, i32* %5
br label %6
6: ; preds = %15, %0
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 0, i32* %3
store i32 0, i32* %4
br label %14
13: ; preds = %9
store i32 1, i32* %3
store i32 1, i32* %4
br label %14
14: ; preds = %13, %12
br label %15
15: ; preds = %14
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int test_nested5(int fooTEST, char barTEST2) {
  int i = fooTEST;
  return barTEST2;
}


x86 assembly (clang, -O0):
<test_nested5>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_nested5>:
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @test_nested5(i32 %0, i8 signext %1) {
%3 = sext i8 %1 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ arm_data_regi_op();
int /*<<< orphan*/ arm_logic_tst(int /*<<< orphan*/);
void arm_tst_regi() { arm_logic_tst(arm_data_regi_op()); }


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

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

LLVM IR (-O0):
define void @arm_tst_regi() {
%1 = call i32 (...) @arm_data_regi_op()
%2 = call i32 @arm_logic_tst(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_tst_regi() {
%1 = tail call i32 (...) @arm_data_regi_op()
%2 = tail call i32 @arm_logic_tst(i32 %1)
ret void
}
/* Variables and functions */
int cdops_exec_cmd(int, int /*<<< orphan*/);
int cdops_stop_cdda() { return cdops_exec_cmd(22, 0); }


x86 assembly (clang, -O0):
<cdops_stop_cdda>:
push   %rbp
mov    %rsp,%rbp
mov    $0x16,%edi
xor    %esi,%esi
call   1030 <cdops_exec_cmd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdops_stop_cdda>:
mov    $0x16,%edi
xor    %esi,%esi
jmp    1030 <cdops_exec_cmd@plt>

LLVM IR (-O0):
define i32 @cdops_stop_cdda() {
%1 = call i32 @cdops_exec_cmd(i32 22, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @cdops_stop_cdda() {
%1 = tail call i32 @cdops_exec_cmd(i32 22, i32 0)
ret i32 %1
}
/* Type definitions */
struct sun_predefined_drives {
  int dummy;
};

/* Variables and functions */
struct sun_predefined_drives *sun_autoconfigure_scsi(void) {
  struct sun_predefined_drives *p = NULL;
  return p;
}


x86 assembly (clang, -O0):
<sun_autoconfigure_scsi>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sun_predefined_drives = type { i32 }
define %struct.sun_predefined_drives* @sun_autoconfigure_scsi() {
%1 = alloca %struct.sun_predefined_drives*
store %struct.sun_predefined_drives* null, %struct.sun_predefined_drives** %1
%2 = load %struct.sun_predefined_drives*, %struct.sun_predefined_drives** %1
ret %struct.sun_predefined_drives* %2
}

LLVM IR (-O2):
%struct.sun_predefined_drives = type { i32 }
define noalias %struct.sun_predefined_drives* @sun_autoconfigure_scsi() {
ret %struct.sun_predefined_drives* null
}
int compare_config_sigtran(const void *sigtran1, void *sigtran2) {
  return (int)0;
}


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

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

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

LLVM IR (-O2):
define i32 @compare_config_sigtran(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
int Binary2BCD(int a) {
  int t1, t2;
  t1 = a % 10;
  t1 = t1 & 0x0F;
  a = a / 10;
  t2 = a % 10;
  t2 = 0x0F & t2;
  t2 = t2 << 4;
  t2 = 0xF0 & t2;
  t1 = t1 | t2;
  return t1;
}


x86 assembly (clang, -O0):
<Binary2BCD>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xf0,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Binary2BCD>:
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rax
add    %edx,%eax
lea    (%rax,%rax,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
and    $0xf,%ecx
cltq
imul   $0x66666667,%rax,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
shr    $0x22,%rdx
add    %esi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
shl    $0x4,%eax
movzbl %al,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Binary2BCD(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = srem i32 %5, 10
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = and i32 %7, 15
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = sdiv i32 %9, 10
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = srem i32 %11, 10
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = and i32 15, %13
store i32 %14, i32* %4
%15 = load i32, i32* %4
%16 = shl i32 %15, 4
store i32 %16, i32* %4
%17 = load i32, i32* %4
%18 = and i32 240, %17
store i32 %18, i32* %4
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = or i32 %19, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @Binary2BCD(i32 %0) {
%2 = srem i32 %0, 10
%3 = and i32 %2, 15
%4 = sdiv i32 %0, 10
%5 = srem i32 %4, 10
%6 = shl nsw i32 %5, 4
%7 = and i32 %6, 240
%8 = or i32 %7, %3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int write(int, char const *, int /*<<< orphan*/);
int write_text(int fd, const char *str) { return write(fd, str, strlen(str)); }


x86 assembly (clang, -O0):
<write_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_text>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define i32 @write_text(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
ret i32 %4
}