xunge/DecIR huggingface dataset:
/* Variables and functions */
void *get_object(char const *);
int /*<<< orphan*/ pd_float(void *, float);
int libpd_float(const char *recv, float x) {
  void *obj = get_object(recv);
  if (obj == NULL)
    return -1;
  pd_float(obj, x);
  return 0;
}


x86 assembly (clang, -O0):
<libpd_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <get_object@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1155 <libpd_float+0x35>
movl   $0xffffffff,-0x4(%rbp)
jmp    116a <libpd_float+0x4a>
mov    -0x20(%rbp),%rdi
movss  -0x14(%rbp),%xmm0
call   1030 <pd_float@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libpd_float>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1040 <get_object@plt>
test   %rax,%rax
je     1143 <libpd_float+0x23>
mov    %rax,%rdi
movss  0x4(%rsp),%xmm0
call   1030 <pd_float@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @libpd_float(i8* %0, float %1) {
%3 = tail call i8* @get_object(i8* %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @pd_float(i8* %3, float %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %8
}
/* Variables and functions */
scalar_t__ str_to_long(char const *);
int get_pk_pos(const char *pkpos) {
  if (*pkpos == 'N')
    return 0;
  return (int)str_to_long(pkpos);
}


x86 assembly (clang, -O0):
<get_pk_pos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4e,%eax
jne    1138 <get_pk_pos+0x28>
movl   $0x0,-0x4(%rbp)
jmp    1144 <get_pk_pos+0x34>
mov    -0x10(%rbp),%rdi
call   1030 <str_to_long@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pk_pos>:
push   %rax
xor    %eax,%eax
cmpb   $0x4e,(%rdi)
je     111d <get_pk_pos+0xd>
call   1030 <str_to_long@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @get_pk_pos(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 78
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %13
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i64 @str_to_long(i8* %10)
%12 = trunc i64 %11 to i32
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @get_pk_pos(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 78
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 @str_to_long(i8* %0)
%6 = trunc i64 %5 to i32
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ 0, %1 ]
ret i32 %8
}
int signint(int x) {
  if (x > 0) {
    return 1;
  } else if (x < 0) {
    return -1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<signint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    111d <signint+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    113a <signint+0x3a>
cmpl   $0x0,-0x8(%rbp)
jge    1133 <signint+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    113a <signint+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signint>:
mov    %edi,%ecx
sar    $0x1f,%ecx
test   %edi,%edi
mov    $0x1,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @signint(i32 %0) {
%2 = ashr i32 %0, 31
%3 = icmp slt i32 %0, 1
%4 = select i1 %3, i32 %2, i32 1
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
__attribute__((always_)) void BEPackUint32(uint8_t container[4],
                                           uint32_t data) {
  container[0] = (uint8_t)(data >> 24);
  container[1] = (uint8_t)(data >> 16);
  container[2] = (uint8_t)(data >> 8);
  container[3] = (uint8_t)data;
}


x86 assembly (clang, -O0):
<BEPackUint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
movslq -0xc(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BEPackUint32>:
mov    %esi,%eax
sar    $0x18,%eax
cltq
mov    %rax,(%rdi)
mov    %esi,%eax
sar    $0x10,%eax
cltq
mov    %rax,0x8(%rdi)
movslq %esi,%rax
sar    $0x8,%esi
movslq %esi,%rcx
mov    %rcx,0x10(%rdi)
mov    %rax,0x18(%rdi)
ret

LLVM IR (-O0):
define void @BEPackUint32(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 24
%7 = sext i32 %6 to i64
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 0
store i64 %7, i64* %9
%10 = load i32, i32* %4
%11 = ashr i32 %10, 16
%12 = sext i32 %11 to i64
%13 = load i64*, i64** %3
%14 = getelementptr inbounds i64, i64* %13, i64 1
store i64 %12, i64* %14
%15 = load i32, i32* %4
%16 = ashr i32 %15, 8
%17 = sext i32 %16 to i64
%18 = load i64*, i64** %3
%19 = getelementptr inbounds i64, i64* %18, i64 2
store i64 %17, i64* %19
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = load i64*, i64** %3
%23 = getelementptr inbounds i64, i64* %22, i64 3
store i64 %21, i64* %23
ret void
}

LLVM IR (-O2):
define void @BEPackUint32(i64* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
%4 = sext i32 %3 to i64
store i64 %4, i64* %0
%5 = ashr i32 %1, 16
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %6, i64* %7
%8 = ashr i32 %1, 8
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %9, i64* %10
%11 = sext i32 %1 to i64
%12 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %11, i64* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ nondet();
void main() {
  int i, j;
  i = 0;
  j = 0;
  while (nondet()) {
    i++;
    j++;
  }
  assert(i == j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <nondet@plt>
cmp    $0x0,%rax
je     115e <main+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <nondet@plt>
test   %rax,%rax
jne    1130 <main+0x10>
mov    $0x1,%edi
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = call i64 (...) @nondet()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = icmp eq i32 %12, %13
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i64 (...) @nondet()
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0, %3
%4 = tail call i64 (...) @nondet()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3, %0
%7 = tail call i32 @assert(i32 1)
ret void
}
const char *helloWorld() { return "Hello world"; }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello world\00"
define i8* @helloWorld() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello world\00"
define i8* @helloWorld() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ oosmos_ClockSpeedInMHz(int);
int /*<<< orphan*/ oosmos_DelayMS(int);
int /*<<< orphan*/ oosmos_RunStateMachines();
int /*<<< orphan*/ synctestNew();
extern int main(void) {
  oosmos_ClockSpeedInMHz(80);
  for (int I = 1; I <= 1; I++)
    synctestNew();
  while (1) {
    oosmos_RunStateMachines();
    oosmos_DelayMS(25);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x50,%edi
call   1030 <oosmos_ClockSpeedInMHz@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     117f <main+0x3f>
mov    $0x0,%al
call   1040 <synctestNew@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1160 <main+0x20>
jmp    1184 <main+0x44>
mov    $0x0,%al
call   1060 <oosmos_RunStateMachines@plt>
mov    $0x19,%edi
call   1050 <oosmos_DelayMS@plt>
jmp    1184 <main+0x44>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x50,%edi
call   1030 <oosmos_ClockSpeedInMHz@plt>
xor    %eax,%eax
call   1040 <synctestNew@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1060 <oosmos_RunStateMachines@plt>
mov    $0x19,%edi
call   1050 <oosmos_DelayMS@plt>
jmp    1160 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @oosmos_ClockSpeedInMHz(i32 80)
store i32 1, i32* %2
br label %4
4: ; preds = %9, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 1
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = call i32 (...) @synctestNew()
br label %9
9: ; preds = %7
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %4
12: ; preds = %4
br label %13
13: ; preds = %12, %13
%14 = call i32 (...) @oosmos_RunStateMachines()
%15 = call i32 @oosmos_DelayMS(i32 25)
br label %13
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @oosmos_ClockSpeedInMHz(i32 80)
%2 = tail call i32 (...) @synctestNew()
br label %3
3: ; preds = %0, %3
%4 = tail call i32 (...) @oosmos_RunStateMachines()
%5 = tail call i32 @oosmos_DelayMS(i32 25)
br label %3
}
void gtk_file_chooser_set_use_preview_label() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_set_use_preview_label() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *, char *);
char *strerror(int);
void printMsg(char *str, int err) {
  printf("%s:%s\n", str, strerror(err));
  exit(1);
}


x86 assembly (clang, -O0):
<printMsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <strerror@plt>
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printMsg>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1050 <strerror@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s:%s\0A\00"
define void @printMsg(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i8* @strerror(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s:%s\0A\00"
define void @printMsg(i8* %0, i32 %1) {
%3 = tail call i8* @strerror(i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_IntegerLiteralOutOfRange(long p_position) {
  _Error(p_position, "Integer literal too big");
}


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

x86 assembly (clang, -O2):
<Error_IntegerLiteralOutOfRange>:
lea    0xee9(%rip),%rsi
jmp    1030 <_Error@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Integer literal too big\00"
define void @Error_IntegerLiteralOutOfRange(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Integer literal too big\00"
define void @Error_IntegerLiteralOutOfRange(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned long default_hash_cb(const void *ptr) { return (unsigned long)ptr; }


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

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

LLVM IR (-O0):
define i64 @default_hash_cb(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @default_hash_cb(i8* %0) {
%2 = ptrtoint i8* %0 to i64
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void write16(uint16_t val, void *addr) { *(volatile uint16_t *)addr = val; }


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

x86 assembly (clang, -O2):
<write16>:
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @write16(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 = bitcast i8* %6 to i32*
store volatile i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @write16(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i32*
store volatile i32 %0, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
void printfArr(long long int arr[], int len) {
  int i;
  for (i = 0; i < len; i++) {
    printf("%lld ", *(arr + i));
  }
}


x86 assembly (clang, -O0):
<printfArr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <printfArr+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printfArr+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printfArr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printfArr+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printfArr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%lld \00"
define void @printfArr(i64* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i64, i64* %0, i64 %7
%9 = load i64, i64* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char const *, struct stat *);
__attribute__((__weak__, __always___)) int softboundmpx_stat(const char *path,
                                                             struct stat *buf) {
  return stat(path, buf);
}


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

x86 assembly (clang, -O2):
<softboundmpx_stat>:
jmp    1030 <stat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define weak i32 @softboundmpx_stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i32 @stat(i8* %5, %struct.stat* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define weak i32 @softboundmpx_stat(i8* %0, %struct.stat* %1) {
%3 = tail call i32 @stat(i8* %0, %struct.stat* %1)
ret i32 %3
}
float glmDotProduct3f(const float v1[3], const float v2[3]) {
  return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
}


x86 assembly (clang, -O0):
<glmDotProduct3f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmDotProduct3f>:
movss  0x4(%rdi),%xmm0
mulss  0x4(%rsi),%xmm0
movss  (%rdi),%xmm1
mulss  (%rsi),%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  0x8(%rsi),%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @glmDotProduct3f(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = fmul float %13, %16
%18 = call float @llvm.fmuladd.f32(float %7, float %10, float %17)
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 2
%24 = load float, float* %23
%25 = call float @llvm.fmuladd.f32(float %21, float %24, float %18)
ret float %25
}

LLVM IR (-O2):
define float @glmDotProduct3f(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
ret float %15
}
/* Variables and functions */
int rand();
int main(int argc, char **argv) {
  int x, y;
  int r = rand();
  if (r > 0) {
    rand();
    y = rand();
    x = 42;
  } else {
    y = rand();
    x = 7;
  }
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    1157 <main+0x47>
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x18(%rbp)
movl   $0x2a,-0x14(%rbp)
jmp    1168 <main+0x58>
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x18(%rbp)
movl   $0x7,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
test   %ebx,%ebx
jle    1133 <main+0x23>
xor    %eax,%eax
call   1030 <rand@plt>
mov    $0x2a,%eax
pop    %rbx
ret
mov    $0x7,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @rand()
%4 = icmp sgt i32 %3, 0
%5 = tail call i32 (...) @rand()
br i1 %4, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @rand()
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ 42, %6 ], [ 7, %2 ]
ret i32 %9
}
/* Type definitions */
struct rbtree {
  int dummy;
};
struct rbnode {
  int dummy;
};

/* Variables and functions */
struct rbnode *rb_find(struct rbtree *, void *);
struct rbnode *rb_findi(struct rbtree *rb, int key) {
  return rb_find(rb, ((void *)(intptr_t)(key)));
}


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

x86 assembly (clang, -O2):
<rb_findi>:
movslq %esi,%rsi
jmp    1030 <rb_find@plt>

LLVM IR (-O0):
%struct.rbnode = type { i32 }
%struct.rbtree = type { i32 }
define %struct.rbnode* @rb_findi(%struct.rbtree* %0, i32 %1) {
%3 = alloca %struct.rbtree*
%4 = alloca i32
store %struct.rbtree* %0, %struct.rbtree** %3
store i32 %1, i32* %4
%5 = load %struct.rbtree*, %struct.rbtree** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
%9 = call %struct.rbnode* @rb_find(%struct.rbtree* %5, i8* %8)
ret %struct.rbnode* %9
}

LLVM IR (-O2):
%struct.rbnode = type { i32 }
%struct.rbtree = type { i32 }
define %struct.rbnode* @rb_findi(%struct.rbtree* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = inttoptr i64 %3 to i8*
%5 = tail call %struct.rbnode* @rb_find(%struct.rbtree* %0, i8* %4)
ret %struct.rbnode* %5
}
int is_same_group(struct sched_entity *se, struct sched_entity *pse) {
  return 1;
}


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

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

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

LLVM IR (-O2):
%struct.sched_entity = type opaque
define i32 @is_same_group(%struct.sched_entity* nocapture readnone %0, %struct.sched_entity* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void debug_invalid_cmd(const char *cmd) {
  printf("Unknown command \"%s\". See \"help\" for more information.\n", cmd);
}


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

x86 assembly (clang, -O2):
<debug_invalid_cmd>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Unknown command \22%s\22. See \22help\22 for more information.\0A\00"
define void @debug_invalid_cmd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"Unknown command \22%s\22. See \22help\22 for more information.\0A\00"
define void @debug_invalid_cmd(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int cppsub_(y)
int *y;
{ return foo__Fi(*y); }


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

x86 assembly (clang, -O2):
<cppsub_>:
mov    (%rdi),%edi
xor    %eax,%eax
jmp    1030 <foo__Fi@plt>

LLVM IR (-O0):
define i32 @cppsub_(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 (i32, ...) bitcast (i32 (...)* @foo__Fi to i32 (i32, ...)*)(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @cppsub_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @foo__Fi to i32 (i32, ...)*)(i32 %2)
ret i32 %3
}
int main() {
  int a = 6;
  int b = 6;
  int c = 6;
  int d = 8;
  if (a == 6) {
    a = 7;
  } else {
    a = 4;
  }
  if (c == 5) {
  }
  if (a == 99) {
    return 33;
  }
  if (!(a == 6 && b == 6 && c == 6 && d == 6)) {
    a = 33;
  } else {
  ERROR:
    goto ERROR;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
movl   $0x6,-0x10(%rbp)
movl   $0x8,-0x14(%rbp)
cmpl   $0x6,-0x8(%rbp)
jne    113d <main+0x3d>
movl   $0x7,-0x8(%rbp)
jmp    1144 <main+0x44>
movl   $0x4,-0x8(%rbp)
cmpl   $0x5,-0x10(%rbp)
jne    1153 <main+0x53>
jmp    1153 <main+0x53>
cmpl   $0x63,-0x8(%rbp)
jne    1169 <main+0x69>
movl   $0x21,-0x4(%rbp)
jmp    11ae <main+0xae>
cmpl   $0x6,-0x8(%rbp)
jne    1191 <main+0x91>
cmpl   $0x6,-0xc(%rbp)
jne    1191 <main+0x91>
cmpl   $0x6,-0x10(%rbp)
jne    1191 <main+0x91>
cmpl   $0x6,-0x14(%rbp)
je     119d <main+0x9d>
movl   $0x21,-0x8(%rbp)
jmp    11a7 <main+0xa7>
jmp    11a2 <main+0xa2>
jmp    11a2 <main+0xa2>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%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 6, i32* %2
store i32 6, i32* %3
store i32 6, i32* %4
store i32 8, i32* %5
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 6
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 7, i32* %2
br label %10
9: ; preds = %0
store i32 4, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 5
br i1 %12, label %13, label %14
13: ; preds = %10
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 99
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 33, i32* %1
br label %34
18: ; preds = %14
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 6
br i1 %20, label %21, label %30
21: ; preds = %18
%22 = load i32, i32* %3
%23 = icmp eq i32 %22, 6
br i1 %23, label %24, label %30
24: ; preds = %21
%25 = load i32, i32* %4
%26 = icmp eq i32 %25, 6
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = load i32, i32* %5
%29 = icmp eq i32 %28, 6
br i1 %29, label %31, label %30
30: ; preds = %27, %24, %21, %18
store i32 33, i32* %2
br label %33
31: ; preds = %27
br label %32
32: ; preds = %32, %31
br label %32
33: ; preds = %30
store i32 1, i32* %1
br label %34
34: ; preds = %33, %17
%35 = load i32, i32* %1
ret i32 %35
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int TCSADRAIN;
int termios_tcsdrain(void) { return TCSADRAIN; }


x86 assembly (clang, -O0):
<termios_tcsdrain>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<termios_tcsdrain>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@TCSADRAIN = global i32 0
define i32 @termios_tcsdrain() {
%1 = load i32, i32* @TCSADRAIN
ret i32 %1
}

LLVM IR (-O2):
@TCSADRAIN = global i32 0
define i32 @termios_tcsdrain() {
%1 = load i32, i32* @TCSADRAIN
ret i32 %1
}
void num_div(char *num, int num_sz, char *div, int *div_sz, int *rem) {}


x86 assembly (clang, -O0):
<num_div>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @num_div(i8* nocapture %0, i32 %1, i8* nocapture %2, i32* nocapture %3, i32* nocapture %4) {
ret void
}
/* Variables and functions */
unsigned int echo_char_marshal_outputs__camkes_ret_fn_375(unsigned int, int *);
unsigned int echo_char_marshal_outputs(int *_camkes_return_379) {
  unsigned int _camkes_length_380 = 0;
  _camkes_length_380 = echo_char_marshal_outputs__camkes_ret_fn_375(
      _camkes_length_380, _camkes_return_379);
  if (_camkes_length_380 == 0xffffffffU) {
    return 0xffffffffU;
  }
  (void)0;
  return _camkes_length_380;
}


x86 assembly (clang, -O0):
<echo_char_marshal_outputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <echo_char_marshal_outputs__camkes_ret_fn_375@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1148 <echo_char_marshal_outputs+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    114e <echo_char_marshal_outputs+0x3e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @echo_char_marshal_outputs(i32* %0) {
%2 = tail call i32 @echo_char_marshal_outputs__camkes_ret_fn_375(i32 0, i32* %0)
ret i32 %2
}
/* Variables and functions */
int find_num_bits_set_in_num(unsigned int);
int find_num_bits_flipped_to_convert_first_num_into_second_num(unsigned int a,
                                                               unsigned int b) {
  unsigned int xor_a_b = a ^ b;
  return (find_num_bits_set_in_num(xor_a_b));
}


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

x86 assembly (clang, -O2):
<find_num_bits_flipped_to_convert_first_num_into_second_num>:
xor    %esi,%edi
jmp    1030 <find_num_bits_set_in_num@plt>

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

LLVM IR (-O2):
define i32 @find_num_bits_flipped_to_convert_first_num_into_second_num(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = tail call i32 @find_num_bits_set_in_num(i32 %3)
ret i32 %4
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int is_scheme_bootable(const char *part_type) {
  if (strcmp(part_type, "BSD") == 0)
    return (1);
  if (strcmp(part_type, "PC98") == 0)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<is_scheme_bootable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <is_scheme_bootable+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116f <is_scheme_bootable+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1168 <is_scheme_bootable+0x58>
movl   $0x1,-0x4(%rbp)
jmp    116f <is_scheme_bootable+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_scheme_bootable>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <is_scheme_bootable+0x31>
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"BSD\00"
@.str.1 = [5 x i8] c"PC98\00"
define i32 @is_scheme_bootable(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ TCSETA;
int ioctl(int, int /*<<< orphan*/, struct termios const *);
int tcsetattr(int fd, int optional_actions, const struct termios *termios_p) {
  return ioctl(fd, TCSETA, termios_p);
}


x86 assembly (clang, -O0):
<tcsetattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcsetattr>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
%struct.termios = type { i32 }
@TCSETA = global i32 0
define i32 @tcsetattr(i32 %0, i32 %1, %struct.termios* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.termios*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.termios* %2, %struct.termios** %6
%7 = load i32, i32* %4
%8 = load i32, i32* @TCSETA
%9 = load %struct.termios*, %struct.termios** %6
%10 = call i32 @ioctl(i32 %7, i32 %8, %struct.termios* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@TCSETA = global i32 0
define i32 @tcsetattr(i32 %0, i32 %1, %struct.termios* %2) {
%4 = load i32, i32* @TCSETA
%5 = tail call i32 @ioctl(i32 %0, i32 %4, %struct.termios* %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ finalize();
int /*<<< orphan*/ opencscad_init();
int /*<<< orphan*/ sphere(double);
int main(int argc, char *argv[]) {
  opencscad_init();
  sphere(2.0);
  finalize();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <opencscad_init@plt>
movsd  0xeb2(%rip),%xmm0
call   1050 <sphere@plt>
mov    $0x0,%al
call   1030 <finalize@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <opencscad_init@plt>
movsd  0xec0(%rip),%xmm0
call   1050 <sphere@plt>
xor    %eax,%eax
call   1030 <finalize@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @opencscad_init()
%6 = call i32 @sphere(double 2.000000e+00)
%7 = call i32 (...) @finalize()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @opencscad_init()
%4 = tail call i32 @sphere(double 2.000000e+00)
%5 = tail call i32 (...) @finalize()
ret i32 0
}
__attribute__((noipa)) void foo(int *__restrict p, int *__restrict q) {
  p[0] = p[0] ^ 1;
  p[1] = p[1] ^ 2;
  p[2] = p[2] ^ q[2];
  p[3] = p[3] ^ q[3];
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
xor    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
xor    $0x2,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x10(%rbp),%rax
xor    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x10(%rbp),%rax
xor    0xc(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movups (%rdi),%xmm0
movsd  0x8(%rsi),%xmm1
movaps 0xef1(%rip),%xmm2
movlhps %xmm1,%xmm2
xorps  %xmm0,%xmm2
movups %xmm2,(%rdi)
ret

LLVM IR (-O0):
define void @foo(i32* noalias %0, i32* noalias %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = xor i32 %7, 1
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 0
store i32 %8, i32* %10
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %12
%14 = xor i32 %13, 2
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %14, i32* %16
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 2
%19 = load i32, i32* %18
%20 = load i32*, i32** %4
%21 = getelementptr inbounds i32, i32* %20, i64 2
%22 = load i32, i32* %21
%23 = xor i32 %19, %22
%24 = load i32*, i32** %3
%25 = getelementptr inbounds i32, i32* %24, i64 2
store i32 %23, i32* %25
%26 = load i32*, i32** %3
%27 = getelementptr inbounds i32, i32* %26, i64 3
%28 = load i32, i32* %27
%29 = load i32*, i32** %4
%30 = getelementptr inbounds i32, i32* %29, i64 3
%31 = load i32, i32* %30
%32 = xor i32 %28, %31
%33 = load i32*, i32** %3
%34 = getelementptr inbounds i32, i32* %33, i64 3
store i32 %32, i32* %34
ret void
}

LLVM IR (-O2):
define void @foo(i32* noalias nocapture %0, i32* noalias nocapture %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 2
%4 = bitcast i32* %0 to <4 x i32>*
%5 = load <4 x i32>, <4 x i32>* %4
%6 = bitcast i32* %3 to <2 x i32>*
%7 = load <2 x i32>, <2 x i32>* %6
%8 = shufflevector <2 x i32> %7, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%9 = shufflevector <4 x i32> <i32 1, i32 2, i32 poison, i32 poison>, <4 x i32> %8, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
%10 = xor <4 x i32> %5, %9
%11 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %10, <4 x i32>* %11
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ prg8setBank1(int);
void m65setParamsA000(uint16_t addr, uint8_t val) {
  (void)addr;
  prg8setBank1(val << 13);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
shl    $0xd,%edi
call   1030 <prg8setBank1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    %esi,%edi
shl    $0xd,%edi
jmp    1030 <prg8setBank1@plt>

LLVM IR (-O0):
define void @m65setParamsA000(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %6, 13
%8 = call i32 @prg8setBank1(i32 %7)
ret void
}

LLVM IR (-O2):
define void @m65setParamsA000(i32 %0, i32 %1) {
%3 = shl i32 %1, 13
%4 = tail call i32 @prg8setBank1(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *iraf2str(char *, int);
char *irafgetc(char *, int, int);
char *irafgetc2(char *irafheader, int offset, int nc) {
  char *irafstring, *string;
  irafstring = irafgetc(irafheader, offset, 2 * (nc + 1));
  string = iraf2str(irafstring, nc);
  free(irafstring);
  return (string);
}


x86 assembly (clang, -O0):
<irafgetc2>:
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
add    $0x1,%edx
shl    $0x1,%edx
call   1050 <irafgetc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1040 <iraf2str@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irafgetc2>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
lea    (%r14,%r14,1),%edx
add    $0x2,%edx
call   1050 <irafgetc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14d,%esi
call   1040 <iraf2str@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @irafgetc2(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = add nsw i32 %11, 1
%13 = mul nsw i32 2, %12
%14 = call i8* @irafgetc(i8* %9, i32 %10, i32 %13)
store i8* %14, i8** %7
%15 = load i8*, i8** %7
%16 = load i32, i32* %6
%17 = call i8* @iraf2str(i8* %15, i32 %16)
store i8* %17, i8** %8
%18 = load i8*, i8** %7
%19 = call i32 @free(i8* %18)
%20 = load i8*, i8** %8
ret i8* %20
}

LLVM IR (-O2):
define i8* @irafgetc2(i8* %0, i32 %1, i32 %2) {
%4 = shl i32 %2, 1
%5 = add i32 %4, 2
%6 = tail call i8* @irafgetc(i8* %0, i32 %1, i32 %5)
%7 = tail call i8* @iraf2str(i8* %6, i32 %2)
%8 = tail call i32 @free(i8* %6)
ret i8* %7
}
/* Variables and functions */
char lpc_uart_reg_read(int /*<<< orphan*/);
scalar_t__ lpc_uart_rx_empty();
char lpc_uart_read(void) {
  while (lpc_uart_rx_empty()) {
    ;
  }
  return lpc_uart_reg_read(0);
}


x86 assembly (clang, -O0):
<lpc_uart_read>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <lpc_uart_read+0x9>
mov    $0x0,%al
call   1040 <lpc_uart_rx_empty@plt>
cmp    $0x0,%rax
je     113f <lpc_uart_read+0x1f>
jmp    1129 <lpc_uart_read+0x9>
xor    %edi,%edi
call   1030 <lpc_uart_reg_read@plt>
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lpc_uart_read>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <lpc_uart_rx_empty@plt>
test   %rax,%rax
jne    1130 <lpc_uart_read+0x10>
xor    %edi,%edi
pop    %rax
jmp    1030 <lpc_uart_reg_read@plt>

LLVM IR (-O0):
define signext i8 @lpc_uart_read() {
br label %1
1: ; preds = %4, %0
%2 = call i64 (...) @lpc_uart_rx_empty()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
br label %1
5: ; preds = %1
%6 = call signext i8 @lpc_uart_reg_read(i32 0)
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @lpc_uart_read() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @lpc_uart_rx_empty()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
%5 = tail call signext i8 @lpc_uart_reg_read(i32 0)
ret i8 %5
}
void session_rm(struct servermsg *msg, struct _session *session) {}


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

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

LLVM IR (-O0):
%struct.servermsg = type opaque
%struct._session = type opaque
define void @session_rm(%struct.servermsg* %0, %struct._session* %1) {
%3 = alloca %struct.servermsg*
%4 = alloca %struct._session*
store %struct.servermsg* %0, %struct.servermsg** %3
store %struct._session* %1, %struct._session** %4
ret void
}

LLVM IR (-O2):
%struct.servermsg = type opaque
%struct._session = type opaque
define void @session_rm(%struct.servermsg* nocapture %0, %struct._session* nocapture %1) {
ret void
}