xunge/DecIR huggingface dataset:
int three(int a, int b, int c) {
  if (a != 1)
    return 1;
  if (b != 2)
    return 1;
  if (c != 3)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<three>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1123 <three+0x23>
movl   $0x1,-0x4(%rbp)
jmp    1156 <three+0x56>
cmpl   $0x2,-0xc(%rbp)
je     1139 <three+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1156 <three+0x56>
cmpl   $0x3,-0x10(%rbp)
je     114f <three+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <three+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<three>:
xor    $0x1,%edi
xor    $0x2,%esi
or     %edi,%esi
xor    $0x3,%edx
xor    %eax,%eax
or     %esi,%edx
setne  %al
ret

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

LLVM IR (-O2):
define i32 @three(i32 %0, i32 %1, i32 %2) {
%4 = icmp ne i32 %0, 1
%5 = icmp ne i32 %1, 2
%6 = icmp ne i32 %2, 3
%7 = or i1 %4, %5
%8 = or i1 %7, %6
%9 = zext i1 %8 to i32
ret i32 %9
}
const char *librtaAbout_MiniNotice(void) {
  return "Copyright (c) 2016, Xerox Corporation (Xerox)and Palo Alto Research "
         "Center (PARC)\nAll rights reserved.\n";
}


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

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

LLVM IR (-O0):
@.str = [104 x i8] c"Copyright (c) 2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC)\0AAll rights reserved.\0A\00"
define i8* @librtaAbout_MiniNotice() {
ret i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [104 x i8] c"Copyright (c) 2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC)\0AAll rights reserved.\0A\00"
define i8* @librtaAbout_MiniNotice() {
ret i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str, i64 0, i64 0)
}
void REMR3NotifyHandlerPhysicalDeregister(void) {}


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

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

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

LLVM IR (-O2):
define void @REMR3NotifyHandlerPhysicalDeregister() {
ret void
}
int test_imm_5Euint16_mem(unsigned short *val) {
  return ((*val) & (-0x5E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_5Euint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -94
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ system(char *);
void calcular_puntos(int cont_sim, int cont_exp) {
  int punts = 0;
  system("cls");
  printf("\n\n\tFI DEL JOC.");
  punts = 500 / (cont_sim + (cont_exp * 2));
  printf("\n\tHas aconseguit %d punts.\n\n", punts);
}


x86 assembly (clang, -O0):
<calcular_puntos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec4(%rip),%rdi
call   1030 <system@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    %eax,%ecx
mov    $0x1f4,%eax
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcular_puntos>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%ebx
lea    0xed0(%rip),%rdi
call   1030 <system@plt>
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    (%rbx,%r14,2),%ecx
mov    $0x1f4,%eax
xor    %edx,%edx
idiv   %ecx
lea    0xebc(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"cls\00"
@.str.1 = [15 x i8] c"\0A\0A\09FI DEL JOC.\00"
@.str.2 = [29 x i8] c"\0A\09Has aconseguit %d punts.\0A\0A\00"
define void @calcular_puntos(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = mul nsw i32 %9, 2
%11 = add nsw i32 %8, %10
%12 = sdiv i32 500, %11
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"cls\00"
@.str.1 = [15 x i8] c"\0A\0A\09FI DEL JOC.\00"
@.str.2 = [29 x i8] c"\0A\09Has aconseguit %d punts.\0A\0A\00"
define void @calcular_puntos(i32 %0, i32 %1) {
%3 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%5 = shl nsw i32 %1, 1
%6 = add nsw i32 %5, %0
%7 = sdiv i32 500, %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
void show_out(char *msg) {
  fprintf(stdout, "This is standard print, msg=%s\n", msg);
}


x86 assembly (clang, -O0):
<show_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_out>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [32 x i8] c"This is standard print, msg=%s\0A\00"
define void @show_out(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [32 x i8] c"This is standard print, msg=%s\0A\00"
define void @show_out(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int ARRAY_SIZE(int *);
int get_hbm_index(int idx) {
  int i = 0;
  int idx_list[] = {10000};
  while (i < ARRAY_SIZE(idx_list)) {
    if (idx < idx_list[i])
      break;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<get_hbm_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <ARRAY_SIZE@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    116b <get_hbm_index+0x5b>
mov    -0x4(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0xc(%rbp,%rcx,4),%eax
jge    115d <get_hbm_index+0x4d>
jmp    116b <get_hbm_index+0x5b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112b <get_hbm_index+0x1b>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_hbm_index>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movl   $0x2710,0xc(%rsp)
mov    $0xffffffff,%ebp
lea    0xc(%rsp),%r14
nopl   0x0(%rax)
add    $0x1,%ebp
mov    %r14,%rdi
call   1030 <ARRAY_SIZE@plt>
cmp    %eax,%ebp
jge    1145 <get_hbm_index+0x35>
cmp    %ebx,0xc(%rsp)
jle    1130 <get_hbm_index+0x20>
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.get_hbm_index.idx_list = [1 x i32] [i32 10000]
define i32 @get_hbm_index(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [1 x i32]
store i32 %0, i32* %2
store i32 0, i32* %3
%5 = bitcast [1 x i32]* %4 to i8*
br label %6
6: ; preds = %19, %1
%7 = load i32, i32* %3
%8 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 0
%9 = call i32 @ARRAY_SIZE(i32* %8)
%10 = icmp slt i32 %7, %9
br i1 %10, label %11, label %22
11: ; preds = %6
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 %14
%16 = load i32, i32* %15
%17 = icmp slt i32 %12, %16
br i1 %17, label %18, label %19
18: ; preds = %11
br label %22
19: ; preds = %11
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %6
22: ; preds = %18, %6
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @get_hbm_index(i32 %0) {
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %2 to i8*
%4 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 10000, i32* %4
br label %5
5: ; preds = %5, %1
%6 = phi i32 [ 0, %1 ], [ %12, %5 ]
%7 = call i32 @ARRAY_SIZE(i32* %4)
%8 = icmp sge i32 %6, %7
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, %0
%11 = select i1 %8, i1 true, i1 %10
%12 = add nuw nsw i32 %6, 1
br i1 %11, label %13, label %5
13: ; preds = %5
ret i32 %6
}
int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem) {
  return 1;
}


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

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

LLVM IR (-O0):
%struct.task_struct = type opaque
%struct.mem_cgroup = type opaque
define i32 @task_in_mem_cgroup(%struct.task_struct* %0, %struct.mem_cgroup* %1) {
%3 = alloca %struct.task_struct*
%4 = alloca %struct.mem_cgroup*
store %struct.task_struct* %0, %struct.task_struct** %3
store %struct.mem_cgroup* %1, %struct.mem_cgroup** %4
ret i32 1
}

LLVM IR (-O2):
%struct.task_struct = type opaque
%struct.mem_cgroup = type opaque
define i32 @task_in_mem_cgroup(%struct.task_struct* nocapture readnone %0, %struct.mem_cgroup* nocapture readnone %1) {
ret i32 1
}
/* Type definitions */
struct cdrom_device_info {
  int dummy;
};

/* Variables and functions */
int cdrom_media_erasable(struct cdrom_device_info *);
int cdrom_dvdram_open_write(struct cdrom_device_info *cdi) {
  int ret = cdrom_media_erasable(cdi);
  if (!ret)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cdrom_dvdram_open_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <cdrom_media_erasable@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    113e <cdrom_dvdram_open_write+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <cdrom_dvdram_open_write+0x35>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdrom_dvdram_open_write>:
push   %rax
call   1030 <cdrom_media_erasable@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.cdrom_device_info = type { i32 }
define i32 @cdrom_dvdram_open_write(%struct.cdrom_device_info* %0) {
%2 = alloca i32
%3 = alloca %struct.cdrom_device_info*
%4 = alloca i32
store %struct.cdrom_device_info* %0, %struct.cdrom_device_info** %3
%5 = load %struct.cdrom_device_info*, %struct.cdrom_device_info** %3
%6 = call i32 @cdrom_media_erasable(%struct.cdrom_device_info* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %1
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
%struct.cdrom_device_info = type { i32 }
define i32 @cdrom_dvdram_open_write(%struct.cdrom_device_info* %0) {
%2 = tail call i32 @cdrom_media_erasable(%struct.cdrom_device_info* %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
char *SzLocalProcNameSz(szProcName)
char *szProcName;
{
  char *pch = (char *)malloc(strlen("_") + strlen(szProcName) + 1);
  strcpy(pch, "_");
  strcat(pch, szProcName);
  return pch;
}


x86 assembly (clang, -O0):
<SzLocalProcNameSz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe8c(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SzLocalProcNameSz>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x2(%rax),%rdi
call   1040 <malloc@plt>
movw   $0x5f,(%rax)
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1050 <strcat@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"_\00"
define i8* @SzLocalProcNameSz(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add i64 1, %5
%7 = add i64 %6, 1
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = call i8* @strcpy(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = call i8* @strcat(i8* %11, i8* %12)
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @SzLocalProcNameSz(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 2
%4 = tail call i8* @malloc(i64 %3)
%5 = bitcast i8* %4 to i16*
store i16 95, i16* %5
%6 = tail call i8* @strcat(i8* dereferenceable(1) %4, i8* dereferenceable(1) %0)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ __sigfillset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigdelset(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ sigsuspend(int /*<<< orphan*/ *);
void wait_for_signal(int signo) {
  sigset_t mask;
  __sigfillset(&mask);
  sigdelset(&mask, signo);
  sigsuspend(&mask);
}


x86 assembly (clang, -O0):
<wait_for_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <__sigfillset@plt>
mov    -0x4(%rbp),%esi
lea    -0x8(%rbp),%rdi
call   1050 <sigdelset@plt>
lea    -0x8(%rbp),%rdi
call   1040 <sigsuspend@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_signal>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1030 <__sigfillset@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <sigdelset@plt>
mov    %r14,%rdi
call   1040 <sigsuspend@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @wait_for_signal(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @__sigfillset(i32* %2)
%5 = call i32 @sigdelset(i32* %2, i32 %0)
%6 = call i32 @sigsuspend(i32* %2)
ret void
}
void initialize_fdt_parser(void) {}


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

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

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

LLVM IR (-O2):
define void @initialize_fdt_parser() {
ret void
}
ISR(TIMER0_OVF_vect) {

#pragma message("System time on timer0 not active")
}


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

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

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

LLVM IR (-O2):
define i32 @ISR(i32 %0) {
ret i32 undef
}
double surface_gravity(double mass, double radius) {
  return 6.67408E-11 * (mass / (radius * radius));
}


x86 assembly (clang, -O0):
<surface_gravity>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  0xed7(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<surface_gravity>:
mulsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
mulsd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @surface_gravity(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = load double, double* %4
%8 = fmul double %6, %7
%9 = fdiv double %5, %8
%10 = fmul double 6.674080e-11, %9
ret double %10
}

LLVM IR (-O2):
define double @surface_gravity(double %0, double %1) {
%3 = fmul double %1, %1
%4 = fdiv double %0, %3
%5 = fmul double %4, 6.674080e-11
ret double %5
}
int test_imm_F6int64_lowword_reg(long long val) {
  return ((val) & (0xF6 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_F6int64_lowword_reg>:
test   $0xf6,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_F6int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 246
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned int flip_dword(unsigned int l) {
  return ((l & 0xff) << 24) | (((l >> 8) & 0xff) << 16) |
         (((l >> 16) & 0xff) << 8) | ((l >> 24) & 0xff);
}


x86 assembly (clang, -O0):
<flip_dword>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x18,%ecx
and    $0xff,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @flip_dword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = lshr i32 %6, 8
%8 = and i32 %7, 255
%9 = shl i32 %8, 16
%10 = or i32 %5, %9
%11 = load i32, i32* %2
%12 = lshr i32 %11, 16
%13 = and i32 %12, 255
%14 = shl i32 %13, 8
%15 = or i32 %10, %14
%16 = load i32, i32* %2
%17 = lshr i32 %16, 24
%18 = and i32 %17, 255
%19 = or i32 %15, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @flip_dword(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ EVP_cleanup();
int /*<<< orphan*/ OPENSSL_config(int /*<<< orphan*/ *);
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
int main(int argc, char const *argv[]) {
  ERR_load_crypto_strings();
  OpenSSL_add_all_algorithms();
  OPENSSL_config(NULL);
  EVP_cleanup();
  CRYPTO_cleanup_all_ex_data();
  ERR_free_strings();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1080 <ERR_load_crypto_strings@plt>
mov    $0x0,%al
call   1050 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <OPENSSL_config@plt>
mov    $0x0,%al
call   1060 <EVP_cleanup@plt>
mov    $0x0,%al
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
mov    $0x0,%al
call   1070 <ERR_free_strings@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1080 <ERR_load_crypto_strings@plt>
xor    %eax,%eax
call   1050 <OpenSSL_add_all_algorithms@plt>
xor    %edi,%edi
call   1030 <OPENSSL_config@plt>
xor    %eax,%eax
call   1060 <EVP_cleanup@plt>
xor    %eax,%eax
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
xor    %eax,%eax
call   1070 <ERR_free_strings@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @ERR_load_crypto_strings()
%7 = call i32 (...) @OpenSSL_add_all_algorithms()
%8 = call i32 @OPENSSL_config(i32* null)
%9 = call i32 (...) @EVP_cleanup()
%10 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%11 = call i32 (...) @ERR_free_strings()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ERR_load_crypto_strings()
%4 = tail call i32 (...) @OpenSSL_add_all_algorithms()
%5 = tail call i32 @OPENSSL_config(i32* null)
%6 = tail call i32 (...) @EVP_cleanup()
%7 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
%8 = tail call i32 (...) @ERR_free_strings()
ret i32 0
}
/* Type definitions */
struct hash_table_entry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ get_hash(char const *, int /*<<< orphan*/);
struct hash_table_entry *hashtable_entry_alloc_hash(void *, char const *,
                                                    int /*<<< orphan*/);
struct hash_table_entry *hashtable_entry_alloc(void *h, const char *key) {
  return hashtable_entry_alloc_hash(h, key, get_hash(key, 0));
}


x86 assembly (clang, -O0):
<hashtable_entry_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <get_hash@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <hashtable_entry_alloc_hash@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashtable_entry_alloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
xor    %esi,%esi
call   1030 <get_hash@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <hashtable_entry_alloc_hash@plt>

LLVM IR (-O0):
%struct.hash_table_entry = type { i32 }
define %struct.hash_table_entry* @hashtable_entry_alloc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @get_hash(i8* %7, i32 0)
%9 = call %struct.hash_table_entry* @hashtable_entry_alloc_hash(i8* %5, i8* %6, i32 %8)
ret %struct.hash_table_entry* %9
}

LLVM IR (-O2):
%struct.hash_table_entry = type { i32 }
define %struct.hash_table_entry* @hashtable_entry_alloc(i8* %0, i8* %1) {
%3 = tail call i32 @get_hash(i8* %1, i32 0)
%4 = tail call %struct.hash_table_entry* @hashtable_entry_alloc_hash(i8* %0, i8* %1, i32 %3)
ret %struct.hash_table_entry* %4
}
/* Variables and functions */
int /*<<< orphan*/ AbsoluteLongIndexedX(int);
int /*<<< orphan*/ STA8(int /*<<< orphan*/);
void Op9FM1(void) { STA8(AbsoluteLongIndexedX(2)); }


x86 assembly (clang, -O0):
<Op9FM1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <AbsoluteLongIndexedX@plt>
mov    %eax,%edi
call   1030 <STA8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op9FM1>:
push   %rax
mov    $0x2,%edi
call   1040 <AbsoluteLongIndexedX@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <STA8@plt>

LLVM IR (-O0):
define void @Op9FM1() {
%1 = call i32 @AbsoluteLongIndexedX(i32 2)
%2 = call i32 @STA8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op9FM1() {
%1 = tail call i32 @AbsoluteLongIndexedX(i32 2)
%2 = tail call i32 @STA8(i32 %1)
ret void
}
void XQueryExtension() {}


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

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

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

LLVM IR (-O2):
define void @XQueryExtension() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, ...);
void gtp_prefix(char prefix, int id) {
  if (id == (-2))
    return;
  if (id >= 0)
    printf("%c%d ", prefix, id);
  else
    printf("%c ", prefix);
}


x86 assembly (clang, -O0):
<gtp_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xfffffffe,-0x8(%rbp)
jne    1130 <gtp_prefix+0x20>
jmp    1168 <gtp_prefix+0x58>
cmpl   $0x0,-0x8(%rbp)
jl     1156 <gtp_prefix+0x46>
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%edx
lea    0xeb9(%rip),%rdi
movsbl %al,%esi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1168 <gtp_prefix+0x58>
lea    0xea9(%rip),%rdi
movsbl -0x1(%rbp),%esi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtp_prefix>:
cmp    $0xfffffffe,%esi
jne    1116 <gtp_prefix+0x6>
ret
mov    %esi,%edx
movsbl %dil,%esi
test   %edx,%edx
js     112e <gtp_prefix+0x1e>
lea    0xed9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xed1(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%c%d \00"
@.str.1 = [4 x i8] c"%c \00"
define void @gtp_prefix(i8 signext %0, i32 %1) {
%3 = icmp eq i32 %1, -2
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp sgt i32 %1, -1
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext %0, i32 %1)
br label %10
8: ; preds = %4
%9 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %0)
br label %10
10: ; preds = %2, %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cblas_dscal(int const, double const, double *, int const);
void c_dscal(const int N, const double alpha, double *X, const int stride) {
  cblas_dscal(N, alpha, X, stride);
}


x86 assembly (clang, -O0):
<c_dscal>:
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 <cblas_dscal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_dscal>:
jmp    1030 <cblas_dscal@plt>

LLVM IR (-O0):
define void @c_dscal(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 i32 @cblas_dscal(i32 %9, double %10, double* %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @c_dscal(i32 %0, double %1, double* %2, i32 %3) {
%5 = tail call i32 @cblas_dscal(i32 %0, double %1, double* %2, i32 %3)
ret void
}
/* Variables and functions */
int _irc_queue_insert(int, char *, char *);
int irc_quote(char *text) { return _irc_queue_insert(5, "%s", text); }


x86 assembly (clang, -O0):
<irc_quote>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x5,%edi
lea    0xed4(%rip),%rsi
call   1030 <_irc_queue_insert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_quote>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
mov    $0x5,%edi
jmp    1030 <_irc_queue_insert@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @irc_quote(i8* %0) {
%2 = tail call i32 @_irc_queue_insert(i32 5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %2
}
int test_imm_4Euint8_mem(unsigned char *val) {
  return ((*val) & (0x4E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_4Euint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 78
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
void rw_after_free() {
  int *i = (int *)malloc(sizeof(int));
  free(i);
  *i = 4;
}


x86 assembly (clang, -O0):
<rw_after_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movl   $0x4,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rw_after_free>:
push   %rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free@plt>
movl   $0x4,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @rw_after_free() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @free(i32* %4)
%6 = load i32*, i32** %1
store i32 4, i32* %6
ret void
}

LLVM IR (-O2):
define void @rw_after_free() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @free(i32* %2)
store i32 4, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int socketpair(int, int, int, int *);
void std_socketpair(int d, int type, int protocol, int sv[2]) {
  if (socketpair(d, type, protocol, sv) == -1) {
    perror("socketpair");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<std_socketpair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1030 <socketpair@plt>
cmp    $0xffffffff,%eax
jne    1176 <std_socketpair+0x46>
lea    0xe99(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_socketpair>:
push   %rax
call   1030 <socketpair@plt>
cmp    $0xffffffff,%eax
je     113d <std_socketpair+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"socketpair\00"
define void @std_socketpair(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* %6
%11 = load i32, i32* %7
%12 = load i32*, i32** %8
%13 = call i32 @socketpair(i32 %9, i32 %10, i32 %11, i32* %12)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %18
15: ; preds = %4
%16 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"socketpair\00"
define void @std_socketpair(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = tail call i32 @socketpair(i32 %0, i32 %1, i32 %2, i32* %3)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %4
ret void
}
/* Variables and functions */
int elevar_n(int, int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int n = 3;
  int k = 3;
  printf("Elevar_n %d: %d", n, elevar_n(k, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <elevar_n@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x3,%esi
call   1030 <elevar_n@plt>
lea    0xec9(%rip),%rdi
mov    $0x3,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"Elevar_n %d: %d\00"
define i32 @main() {
%1 = tail call i32 @elevar_n(i32 3, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 3, i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t psector_Read_MinDeviceId(void) {
  uint64_t (*p_psector_Read_MinDeviceId)(void);
  p_psector_Read_MinDeviceId = (uint64_t(*)(void))0x030053ddU;
  return p_psector_Read_MinDeviceId();
}


x86 assembly (clang, -O0):
<psector_Read_MinDeviceId>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x30053dd,%eax
mov    %rax,-0x8(%rbp)
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psector_Read_MinDeviceId>:
mov    $0x30053dd,%eax
jmp    *%rax

LLVM IR (-O0):
define i32 @psector_Read_MinDeviceId() {
%1 = alloca i32 ()*
store i32 ()* inttoptr (i64 50353117 to i32 ()*), i32 ()** %1
%2 = load i32 ()*, i32 ()** %1
%3 = call i32 %2()
ret i32 %3
}

LLVM IR (-O2):
define i32 @psector_Read_MinDeviceId() {
%1 = tail call i32 inttoptr (i64 50353117 to i32 ()*)()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ handleInput();
unsigned char updatePlayer(unsigned char);
void processGame() {
  unsigned char spr = 0;
  handleInput();
  spr = updatePlayer(spr);
}


x86 assembly (clang, -O0):
<processGame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
mov    $0x0,%al
call   1040 <handleInput@plt>
movzbl -0x1(%rbp),%edi
call   1030 <updatePlayer@plt>
mov    %al,-0x1(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processGame>:
push   %rax
xor    %eax,%eax
call   1040 <handleInput@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <updatePlayer@plt>

LLVM IR (-O0):
define void @processGame() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i32 (...) @handleInput()
%3 = load i8, i8* %1
%4 = call zeroext i8 @updatePlayer(i8 zeroext %3)
store i8 %4, i8* %1
ret void
}

LLVM IR (-O2):
define void @processGame() {
%1 = tail call i32 (...) @handleInput()
%2 = tail call zeroext i8 @updatePlayer(i8 zeroext 0)
ret void
}
void HAI_error(int errorno) {}


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

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

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

LLVM IR (-O2):
define void @HAI_error(i32 %0) {
ret void
}
/* Type definitions */
typedef long pid_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_gettid;
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
long int gettid() { return (pid_t)syscall(__NR_gettid); }


x86 assembly (clang, -O0):
<gettid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettid>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
@__NR_gettid = global i32 0
define i64 @gettid() {
%1 = load i32, i32* @__NR_gettid
%2 = call i32 @syscall(i32 %1)
%3 = sext i32 %2 to i64
ret i64 %3
}

LLVM IR (-O2):
@__NR_gettid = global i32 0
define i64 @gettid() {
%1 = load i32, i32* @__NR_gettid
%2 = tail call i32 @syscall(i32 %1)
%3 = sext i32 %2 to i64
ret i64 %3
}
/* Type definitions */
struct cl_node {
  int dummy;
};

/* Variables and functions */
bool cl_node_is_red(struct cl_node *n) { return ((long)n & 1); }


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

x86 assembly (clang, -O2):
<cl_node_is_red>:
mov    %rdi,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
%struct.cl_node = type { i32 }
define i32 @cl_node_is_red(%struct.cl_node* %0) {
%2 = alloca %struct.cl_node*
store %struct.cl_node* %0, %struct.cl_node** %2
%3 = load %struct.cl_node*, %struct.cl_node** %2
%4 = ptrtoint %struct.cl_node* %3 to i64
%5 = and i64 %4, 1
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.cl_node = type { i32 }
define i32 @cl_node_is_red(%struct.cl_node* %0) {
%2 = ptrtoint %struct.cl_node* %0 to i64
%3 = trunc i64 %2 to i32
%4 = and i32 %3, 1
ret i32 %4
}
/* Type definitions */
struct vec3i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec3i_one(int /*<<< orphan*/ *);
__attribute__((always_)) struct vec3i *psvec3i_one(struct vec3i *result) {
  vec3i_one((int32_t *)result);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec3i_one>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3i_one@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_one(%struct.vec3i* %0) {
%2 = alloca %struct.vec3i*
store %struct.vec3i* %0, %struct.vec3i** %2
%3 = load %struct.vec3i*, %struct.vec3i** %2
%4 = bitcast %struct.vec3i* %3 to i32*
%5 = call i32 @vec3i_one(i32* %4)
%6 = load %struct.vec3i*, %struct.vec3i** %2
ret %struct.vec3i* %6
}

LLVM IR (-O2):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_one(%struct.vec3i* returned %0) {
%2 = getelementptr %struct.vec3i, %struct.vec3i* %0, i64 0, i32 0
%3 = tail call i32 @vec3i_one(i32* %2)
ret %struct.vec3i* %0
}
void watchdog_start() {
  (*((volatile unsigned long *)((0x7E004000) + 0x00))) |= (1 << 5);
}


x86 assembly (clang, -O0):
<watchdog_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7e004000,%eax
mov    (%rax),%rcx
or     $0x20,%rcx
mov    $0x7e004000,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<watchdog_start>:
orq    $0x20,0x7e004000
7e 20
ret

LLVM IR (-O0):
define void @watchdog_start() {
%1 = load volatile i64, i64* inttoptr (i64 2113945600 to i64*)
%2 = or i64 %1, 32
store volatile i64 %2, i64* inttoptr (i64 2113945600 to i64*)
ret void
}

LLVM IR (-O2):
define void @watchdog_start() {
%1 = load volatile i64, i64* inttoptr (i64 2113945600 to i64*)
%2 = or i64 %1, 32
store volatile i64 %2, i64* inttoptr (i64 2113945600 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf(
      "ipredirect [-ovh] -l listen_addr -s send_addr [-f send_from_address]\n");
}


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

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

LLVM IR (-O0):
@.str = [70 x i8] c"ipredirect [-ovh] -l listen_addr -s send_addr [-f send_from_address]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [69 x i8] c"ipredirect [-ovh] -l listen_addr -s send_addr [-f send_from_address]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, int, int);
int get_node_index(int n_rows, int node_col, int node_row) {
  int a = ((node_col * n_rows) + node_row);
  if (a < 0) {
    printf("n_rows %d, node_col %d, node_row %d\n", n_rows, node_col, node_row);
    exit(1);
  }
  return a;
}


x86 assembly (clang, -O0):
<get_node_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1167 <get_node_index+0x47>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_node_index>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %esi,%eax
imul   %edi,%eax
add    %ecx,%eax
js     112e <get_node_index+0xe>
ret
push   %rax
mov    %edi,%esi
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [37 x i8] c"n_rows %d, node_col %d, node_row %d\0A\00"
define i32 @get_node_index(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %1, %0
%5 = add nsw i32 %4, %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %3
ret i32 %5
}
/* Variables and functions */
int binsearch(int, int *, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int arr[] = {2, 4, 5, 7, 8, 9, 11, 23, 45, 50};
  int x, n;
  printf("%d", binsearch(9, arr, 10));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rsi
mov    $0x9,%edi
mov    $0xa,%edx
call   1030 <binsearch@plt>
mov    %eax,%esi
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x9,%edi
mov    $0xa,%edx
call   1030 <binsearch@plt>
lea    0xec8(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [10 x i32] [i32 2, i32 4, i32 5, i32 7, i32 8, i32 9, i32 11, i32 23, i32 45, i32 50]
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [10 x i32]* %2 to i8*
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%7 = call i32 @binsearch(i32 9, i32* %6, i32 10)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [10 x i32] [i32 2, i32 4, i32 5, i32 7, i32 8, i32 9, i32 11, i32 23, i32 45, i32 50]
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @binsearch(i32 9, i32* %3, i32 10)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void init_at(void) { return; }


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

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

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

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


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

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

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

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