xunge/DecIR huggingface dataset:
char *skipWS(char *s) {
  while ((*s) == ' ' || (*s) == '\t') {
    s++;
  }
  return s;
}


x86 assembly (clang, -O0):
<skipWS>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <skipWS+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <skipWS+0x3d>
jmp    114e <skipWS+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skipWS+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipWS>:
mov    %rdi,%rax
jmp    1114 <skipWS+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <skipWS+0x10>
cmp    $0x9,%cl
je     1110 <skipWS+0x10>
ret

LLVM IR (-O0):
define i8* @skipWS(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 32
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 9
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ true, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @skipWS(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ sock_sendline(char *, char *);
void ircproto_part(char *chan_name) { sock_sendline("PART %s", chan_name); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"PART %s\00"
define void @ircproto_part(i8* %0) {
%2 = tail call i32 @sock_sendline(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int alg_value(char alg) {
  int value;
  switch (alg) {
  case 'I':
    value = 1;
    break;
  case 'V':
    value = 5;
    break;
  case 'X':
    value = 10;
    break;
  case 'L':
    value = 50;
    break;
  case 'C':
    value = 100;
    break;
  case 'D':
    value = 500;
    break;
  case 'M':
    value = 1000;
    break;
  default:
    value = -1;
  }
  return value;
}


x86 assembly (clang, -O0):
<alg_value>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffffbd,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x15,%eax
ja     1188 <alg_value+0x88>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x8(%rbp)
jmp    118f <alg_value+0x8f>
movl   $0x5,-0x8(%rbp)
jmp    118f <alg_value+0x8f>
movl   $0xa,-0x8(%rbp)
jmp    118f <alg_value+0x8f>
movl   $0x32,-0x8(%rbp)
jmp    118f <alg_value+0x8f>
movl   $0x64,-0x8(%rbp)
jmp    118f <alg_value+0x8f>
movl   $0x1f4,-0x8(%rbp)
jmp    118f <alg_value+0x8f>
movl   $0x3e8,-0x8(%rbp)
jmp    118f <alg_value+0x8f>
movl   $0xffffffff,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alg_value>:
add    $0xffffffbd,%edi
cmp    $0x15,%edi
ja     1129 <alg_value+0x29>
mov    $0x1,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x64,%eax
ret
mov    $0x1f4,%eax
ret
mov    $0xffffffff,%eax
ret
mov    $0x32,%eax
ret
mov    $0x5,%eax
ret
mov    $0xa,%eax
ret
mov    $0x3e8,%eax
ret

LLVM IR (-O0):
define i32 @alg_value(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %13 [
i32 73, label %6
i32 86, label %7
i32 88, label %8
i32 76, label %9
i32 67, label %10
i32 68, label %11
i32 77, label %12
]
6: ; preds = %1
store i32 1, i32* %3
br label %14
7: ; preds = %1
store i32 5, i32* %3
br label %14
8: ; preds = %1
store i32 10, i32* %3
br label %14
9: ; preds = %1
store i32 50, i32* %3
br label %14
10: ; preds = %1
store i32 100, i32* %3
br label %14
11: ; preds = %1
store i32 500, i32* %3
br label %14
12: ; preds = %1
store i32 1000, i32* %3
br label %14
13: ; preds = %1
store i32 -1, i32* %3
br label %14
14: ; preds = %13, %12, %11, %10, %9, %8, %7, %6
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @alg_value(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %9 [
i32 73, label %10
i32 86, label %3
i32 88, label %4
i32 76, label %5
i32 67, label %6
i32 68, label %7
i32 77, label %8
]
3: ; preds = %1
br label %10
4: ; preds = %1
br label %10
5: ; preds = %1
br label %10
6: ; preds = %1
br label %10
7: ; preds = %1
br label %10
8: ; preds = %1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %1, %9, %8, %7, %6, %5, %4, %3
%11 = phi i32 [ -1, %9 ], [ 1000, %8 ], [ 500, %7 ], [ 100, %6 ], [ 50, %5 ], [ 10, %4 ], [ 5, %3 ], [ 1, %1 ]
ret i32 %11
}
void INT_Excep_SuperVisorInst(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SuperVisorInst() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ stderr;
int *int_alloc(int n) {
  int *v;
  if ((v = (int *)malloc(n * sizeof(int))) == NULL) {
    fprintf(stderr, "FATAL ERROR: Out of memory\n");
    exit(1);
  }
  return v;
}


x86 assembly (clang, -O0):
<int_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1177 <int_alloc+0x47>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_alloc>:
push   %rax
shl    $0x2,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <int_alloc+0x10>
pop    %rcx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"FATAL ERROR: Out of memory\0A\00"
define i32* @int_alloc(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 4
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %3
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %1
%16 = load i32*, i32** %3
ret i32* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"FATAL ERROR: Out of memory\0A\00"
define i32* @int_alloc(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
%10 = inttoptr i64 %3 to i32*
ret i32* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int lenth_cpm(const char s[]) {
  int i;
  for (i = 0; s[i] != '\0'; i++) {
  }
  printf("i = %d\n", i);
  return i;
}


x86 assembly (clang, -O0):
<lenth_cpm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114b <lenth_cpm+0x3b>
jmp    113d <lenth_cpm+0x2d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <lenth_cpm+0x13>
mov    -0xc(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lenth_cpm>:
push   %rbx
mov    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%ebx
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1120 <lenth_cpm+0x10>
lea    0xecd(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"i = %d\0A\00"
define i32 @lenth_cpm(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
%10 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ smp_test_link_init();
void smp_test_link_main() {
  smp_test_link_init();
  printf("finished test\n");
}


x86 assembly (clang, -O0):
<smp_test_link_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <smp_test_link_init@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<smp_test_link_main>:
push   %rax
xor    %eax,%eax
call   1040 <smp_test_link_init@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"finished test\0A\00"
define void @smp_test_link_main() {
%1 = call i32 (...) @smp_test_link_init()
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"finished test\00"
define void @smp_test_link_main() {
%1 = tail call i32 (...) @smp_test_link_init()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ FAIL(char *);
int /*<<< orphan*/ PASS(char *);
scalar_t__ getdownsup();
int main() {
  if (getdownsup())
    PASS("upward-dylib");
  else
    FAIL("upward-dylib");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getdownsup@plt>
cmp    $0x0,%rax
je     1161 <main+0x31>
lea    0xea9(%rip),%rdi
call   1030 <PASS@plt>
jmp    116d <main+0x3d>
lea    0xe98(%rip),%rdi
call   1050 <FAIL@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getdownsup@plt>
lea    0xec1(%rip),%rdi
test   %rax,%rax
je     114b <main+0x1b>
call   1030 <PASS@plt>
jmp    1150 <main+0x20>
call   1050 <FAIL@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"upward-dylib\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @getdownsup()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @PASS(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @FAIL(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@.str = [13 x i8] c"upward-dylib\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @getdownsup()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @PASS(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 @FAIL(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Name\tAge\tSalary\taddr\n");
  printf("Tom\t20\t314.2\tNewYork\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Name\09Age\09Salary\09addr\0A\00"
@.str.1 = [22 x i8] c"Tom\0920\09314.2\09NewYork\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [21 x i8] c"Name\09Age\09Salary\09addr\00"
@str.2 = [21 x i8] c"Tom\0920\09314.2\09NewYork\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ free(char *);
scalar_t__ remove(char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void free_temp_devnode(char *device_node) {
  if (remove(device_node)) {
    fprintf(stderr,
            "Warning: Could not remove "
            "temporary file %s: %s",
            device_node, strerror(errno));
  }
  free(device_node);
}


x86 assembly (clang, -O0):
<free_temp_devnode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <remove@plt>
cmp    $0x0,%rax
je     1197 <free_temp_devnode+0x57>
mov    0x2e7a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e5e(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xe6e(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_temp_devnode>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <remove@plt>
test   %rax,%rax
je     117b <free_temp_devnode+0x3b>
mov    0x2e89(%rip),%rax
mov    (%rax),%ebp
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
lea    0xe92(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1050 <fprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [48 x i8] c"Warning: Could not remove temporary file %s: %s\00"
@errno = global i32 0
define void @free_temp_devnode(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @remove(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %2
%9 = load i32, i32* @errno
%10 = call i8* @strerror(i32 %9)
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %10)
br label %12
12: ; preds = %6, %1
%13 = load i8*, i8** %2
%14 = call i32 @free(i8* %13)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [48 x i8] c"Warning: Could not remove temporary file %s: %s\00"
@errno = global i32 0
define void @free_temp_devnode(i8* %0) {
%2 = tail call i64 @remove(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = load i32, i32* @errno
%7 = tail call i8* @strerror(i32 %6)
%8 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %7)
br label %9
9: ; preds = %4, %1
%10 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void safe_free(char *prop) {
  if (prop) {
    free(prop);
  }
}


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

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

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

LLVM IR (-O2):
define void @safe_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_Vec2i_init(void) {
  _hmt_register_covercase("HMM_Vec2i", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_Vec2i_init>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"HMM_Vec2i\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_Vec2i_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"HMM_Vec2i\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_Vec2i_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void writesyminfo(void) {
  int i, j;
  for (i = 0; i < 256; i++) {
  }
}


x86 assembly (clang, -O0):
<writesyminfo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    112b <writesyminfo+0x2b>
jmp    111d <writesyminfo+0x1d>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <writesyminfo+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @writesyminfo() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 256
br i1 %5, label %6, label %10
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %3
10: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @writesyminfo() {
ret void
}
/* Variables and functions */
int rand();
int rnd(int max) {
  if (max < 1)
    return 0;
  return (rand() % max);
}


x86 assembly (clang, -O0):
<rnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1131 <rnd+0x21>
movl   $0x0,-0x4(%rbp)
jmp    113f <rnd+0x2f>
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x8(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd>:
test   %edi,%edi
jle    1125 <rnd+0x15>
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @rnd(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 (...) @rand()
%5 = srem i32 %4, %0
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 0, %1 ]
ret i32 %7
}
unsigned long GPIODirModeGet(unsigned long ulPort, unsigned char ucPin) {
  unsigned long ulDir, ulAFSEL;
  ;
  ;
  ucPin = 1 << ucPin;
  ulDir = (*((volatile unsigned long *)(ulPort + 0x00000400)));
  ulAFSEL = (*((volatile unsigned long *)(ulPort + 0x00000420)));
  return (((ulDir & ucPin) ? 1 : 0) | ((ulAFSEL & ucPin) ? 2 : 0));
}


x86 assembly (clang, -O0):
<GPIODirModeGet>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    0x400(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x420(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdx
movzbl -0x9(%rbp),%eax
and    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    -0x20(%rbp),%rsi
movzbl -0x9(%rbp),%ecx
and    %rcx,%rsi
xor    %ecx,%ecx
mov    $0x2,%edx
cmp    $0x0,%rsi
cmovne %edx,%ecx
or     %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIODirModeGet>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    0x400(%rdi),%rcx
mov    0x420(%rdi),%rdx
movzbl %al,%eax
xor    %esi,%esi
test   %eax,%ecx
setne  %sil
xor    %ecx,%ecx
test   %eax,%edx
setne  %cl
lea    (%rsi,%rcx,2),%rax
ret

LLVM IR (-O0):
define i64 @GPIODirModeGet(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %3
store i8 %1, i8* %4
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = shl i32 1, %8
%10 = trunc i32 %9 to i8
store i8 %10, i8* %4
%11 = load i64, i64* %3
%12 = add i64 %11, 1024
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
store i64 %14, i64* %5
%15 = load i64, i64* %3
%16 = add i64 %15, 1056
%17 = inttoptr i64 %16 to i64*
%18 = load volatile i64, i64* %17
store i64 %18, i64* %6
%19 = load i64, i64* %5
%20 = load i8, i8* %4
%21 = zext i8 %20 to i64
%22 = and i64 %19, %21
%23 = icmp ne i64 %22, 0
%24 = zext i1 %23 to i64
%25 = select i1 %23, i32 1, i32 0
%26 = load i64, i64* %6
%27 = load i8, i8* %4
%28 = zext i8 %27 to i64
%29 = and i64 %26, %28
%30 = icmp ne i64 %29, 0
%31 = zext i1 %30 to i64
%32 = select i1 %30, i32 2, i32 0
%33 = or i32 %25, %32
%34 = sext i32 %33 to i64
ret i64 %34
}

LLVM IR (-O2):
define i64 @GPIODirModeGet(i64 %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = shl nuw i32 1, %3
%5 = add i64 %0, 1024
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = add i64 %0, 1056
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i32 %4, 255
%12 = zext i32 %11 to i64
%13 = and i64 %7, %12
%14 = icmp ne i64 %13, 0
%15 = zext i1 %14 to i64
%16 = and i64 %10, %12
%17 = icmp eq i64 %16, 0
%18 = select i1 %17, i64 0, i64 2
%19 = or i64 %18, %15
ret i64 %19
}
/* Variables and functions */
int /*<<< orphan*/ Sound_Play(int, int);
void Tone2() { Sound_Play(698, 250); }


x86 assembly (clang, -O0):
<Tone2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2ba,%edi
mov    $0xfa,%esi
call   1030 <Sound_Play@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tone2>:
mov    $0x2ba,%edi
mov    $0xfa,%esi
jmp    1030 <Sound_Play@plt>

LLVM IR (-O0):
define void @Tone2() {
%1 = call i32 @Sound_Play(i32 698, i32 250)
ret void
}

LLVM IR (-O2):
define void @Tone2() {
%1 = tail call i32 @Sound_Play(i32 698, i32 250)
ret void
}
void xed_set_log_file(void *o) { (void)o; }


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

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

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

LLVM IR (-O2):
define void @xed_set_log_file(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct yas_mag_data {
  int dummy;
};

/* Variables and functions */
int yas_measure(struct yas_mag_data *, int);
int yas_measure_wrap(struct yas_mag_data *data) { return yas_measure(data, 1); }


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

x86 assembly (clang, -O2):
<yas_measure_wrap>:
mov    $0x1,%esi
jmp    1030 <yas_measure@plt>

LLVM IR (-O0):
%struct.yas_mag_data = type { i32 }
define i32 @yas_measure_wrap(%struct.yas_mag_data* %0) {
%2 = alloca %struct.yas_mag_data*
store %struct.yas_mag_data* %0, %struct.yas_mag_data** %2
%3 = load %struct.yas_mag_data*, %struct.yas_mag_data** %2
%4 = call i32 @yas_measure(%struct.yas_mag_data* %3, i32 1)
ret i32 %4
}

LLVM IR (-O2):
%struct.yas_mag_data = type { i32 }
define i32 @yas_measure_wrap(%struct.yas_mag_data* %0) {
%2 = tail call i32 @yas_measure(%struct.yas_mag_data* %0, i32 1)
ret i32 %2
}
/* Variables and functions */
void *realloc(void *, size_t);
void *chess_realloc(void *ptr, size_t size) { return realloc(ptr, size); }


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

x86 assembly (clang, -O2):
<chess_realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @chess_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
void parse_parameters() {}


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

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

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

LLVM IR (-O2):
define void @parse_parameters() {
ret void
}
/* Variables and functions */
double beta(int, int);
double simfreq2P(double FST, double p_anc) {
  return beta(((1 - FST) / FST) * p_anc, ((1 - FST) / FST) * (1 - p_anc));
}


x86 assembly (clang, -O0):
<simfreq2P>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xed6(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xebb(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  0xea9(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
call   1030 <beta@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simfreq2P>:
movsd  0xee8(%rip),%xmm2
movapd %xmm2,%xmm3
subsd  %xmm0,%xmm3
divsd  %xmm0,%xmm3
subsd  %xmm1,%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm1,%xmm3
cvttsd2si %xmm3,%edi
cvttsd2si %xmm2,%esi
jmp    1030 <beta@plt>

LLVM IR (-O0):
define double @simfreq2P(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 = fsub double 1.000000e+00, %5
%7 = load double, double* %3
%8 = fdiv double %6, %7
%9 = load double, double* %4
%10 = fmul double %8, %9
%11 = fptosi double %10 to i32
%12 = load double, double* %3
%13 = fsub double 1.000000e+00, %12
%14 = load double, double* %3
%15 = fdiv double %13, %14
%16 = load double, double* %4
%17 = fsub double 1.000000e+00, %16
%18 = fmul double %15, %17
%19 = fptosi double %18 to i32
%20 = call double @beta(i32 %11, i32 %19)
ret double %20
}

LLVM IR (-O2):
define double @simfreq2P(double %0, double %1) {
%3 = fsub double 1.000000e+00, %0
%4 = fdiv double %3, %0
%5 = fmul double %4, %1
%6 = fptosi double %5 to i32
%7 = fsub double 1.000000e+00, %1
%8 = fmul double %4, %7
%9 = fptosi double %8 to i32
%10 = tail call double @beta(i32 %6, i32 %9)
ret double %10
}
/* Variables and functions */
int com_strnicmp(char const *, char const *, int);
int com_stricmp(const char *string1, const char *string2) {
  return com_strnicmp(string1, string2, 99999);
}


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

x86 assembly (clang, -O2):
<com_stricmp>:
mov    $0x1869f,%edx
jmp    1030 <com_strnicmp@plt>

LLVM IR (-O0):
define i32 @com_stricmp(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 = call i32 @com_strnicmp(i8* %5, i8* %6, i32 99999)
ret i32 %7
}

LLVM IR (-O2):
define i32 @com_stricmp(i8* %0, i8* %1) {
%3 = tail call i32 @com_strnicmp(i8* %0, i8* %1, i32 99999)
ret i32 %3
}
long long _dpackx2(unsigned int src1, unsigned int src2) {
  unsigned short s1[2], s2[2];
  *((int *)s1) = src1;
  *((int *)s2) = src2;
  return ((unsigned long long)s2[0] << 48) | ((unsigned long long)s1[1] << 32) |
         ((unsigned long long)s1[0] << 16) | ((unsigned long long)s2[1]);
}


x86 assembly (clang, -O0):
<_dpackx2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
movzwl -0x10(%rbp),%eax
shl    $0x30,%rax
movzwl -0xa(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
movzwl -0xc(%rbp),%ecx
shl    $0x10,%rcx
or     %rcx,%rax
movzwl -0xe(%rbp),%ecx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dpackx2>:
mov    %edi,%eax
shr    $0x10,%eax
mov    %esi,%ecx
shr    $0x10,%ecx
shl    $0x30,%rsi
shl    $0x20,%rax
or     %rsi,%rax
shl    $0x10,%edi
or     %rdi,%rax
or     %rcx,%rax
ret

LLVM IR (-O0):
define i64 @_dpackx2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2 x i16]
%6 = alloca [2 x i16]
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = getelementptr inbounds [2 x i16], [2 x i16]* %5, i64 0, i64 0
%9 = bitcast i16* %8 to i32*
store i32 %7, i32* %9
%10 = load i32, i32* %4
%11 = getelementptr inbounds [2 x i16], [2 x i16]* %6, i64 0, i64 0
%12 = bitcast i16* %11 to i32*
store i32 %10, i32* %12
%13 = getelementptr inbounds [2 x i16], [2 x i16]* %6, i64 0, i64 0
%14 = load i16, i16* %13
%15 = zext i16 %14 to i64
%16 = shl i64 %15, 48
%17 = getelementptr inbounds [2 x i16], [2 x i16]* %5, i64 0, i64 1
%18 = load i16, i16* %17
%19 = zext i16 %18 to i64
%20 = shl i64 %19, 32
%21 = or i64 %16, %20
%22 = getelementptr inbounds [2 x i16], [2 x i16]* %5, i64 0, i64 0
%23 = load i16, i16* %22
%24 = zext i16 %23 to i64
%25 = shl i64 %24, 16
%26 = or i64 %21, %25
%27 = getelementptr inbounds [2 x i16], [2 x i16]* %6, i64 0, i64 1
%28 = load i16, i16* %27
%29 = zext i16 %28 to i64
%30 = or i64 %26, %29
ret i64 %30
}

LLVM IR (-O2):
define i64 @_dpackx2(i32 %0, i32 %1) {
%3 = lshr i32 %0, 16
%4 = zext i32 %3 to i64
%5 = lshr i32 %1, 16
%6 = zext i32 %5 to i64
%7 = zext i32 %1 to i64
%8 = shl i64 %7, 48
%9 = shl nuw nsw i64 %4, 32
%10 = or i64 %8, %9
%11 = shl i32 %0, 16
%12 = zext i32 %11 to i64
%13 = or i64 %10, %12
%14 = or i64 %13, %6
ret i64 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(void *, int, size_t, int /*<<< orphan*/ *);
void randomBufferPls(void *buffer, size_t count) {
  FILE *random_file;
  random_file = fopen("/dev/urandom", "r");
  fread(buffer, 1, count, random_file);
  fclose(random_file);
}


x86 assembly (clang, -O0):
<randomBufferPls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomBufferPls>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xebe(%rip),%rdi
lea    0xec4(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    $0x1,%esi
mov    %r14,%rdx
mov    %rax,%rcx
call   1030 <fread@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <fclose@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/urandom\00"
@.str.1 = [2 x i8] c"r\00"
define void @randomBufferPls(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %6, i32** %5
%7 = load i8*, i8** %3
%8 = load i64, i64* %4
%9 = load i32*, i32** %5
%10 = call i32 @fread(i8* %7, i32 1, i64 %8, i32* %9)
%11 = load i32*, i32** %5
%12 = call i32 @fclose(i32* %11)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/urandom\00"
@.str.1 = [2 x i8] c"r\00"
define void @randomBufferPls(i8* nocapture %0, i64 %1) {
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @fread(i8* %0, i32 1, i64 %1, i32* %3)
%5 = tail call i32 @fclose(i32* %3)
ret void
}
/* Variables and functions */
scalar_t__ unknown();
void preciser_widen_Good(int x) {
  int idx = 0;
  int arr[10];
  while (idx < 10) {
    arr[idx] = 0;
    if (unknown()) {
      idx = x;
    }
  }
}


x86 assembly (clang, -O0):
<preciser_widen_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1154 <preciser_widen_Good+0x44>
movslq -0x8(%rbp),%rax
movl   $0x0,-0x30(%rbp,%rax,4)
mov    $0x0,%al
call   1030 <unknown@plt>
cmp    $0x0,%rax
je     114f <preciser_widen_Good+0x3f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <preciser_widen_Good+0x12>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<preciser_widen_Good>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <unknown@plt>
test   %rax,%rax
cmovne %ebx,%ebp
cmp    $0xa,%ebp
jl     1120 <preciser_widen_Good+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @preciser_widen_Good(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [10 x i32]
store i32 %0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 %10
store i32 0, i32* %11
%12 = call i64 (...) @unknown()
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = load i32, i32* %2
store i32 %15, i32* %3
br label %16
16: ; preds = %14, %8
br label %5
17: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @preciser_widen_Good(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %6, %2 ]
%4 = tail call i64 (...) @unknown()
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i32 %3, i32 %0
%7 = icmp slt i32 %6, 10
br i1 %7, label %2, label %8
8: ; preds = %2
ret void
}
int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
                       struct wpa_scan_results *scan_res) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
%struct.wpa_scan_results = type opaque
define i32 @bgscan_notify_scan(%struct.wpa_supplicant* nocapture readnone %0, %struct.wpa_scan_results* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *thr_fn2(void *arg) {
  printf("thread 2 returning\n");
  return ((void *)2);
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"thread 2 returning\0A\00"
define i8* @thr_fn2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i8* inttoptr (i64 2 to i8*)
}

LLVM IR (-O2):
@str = [19 x i8] c"thread 2 returning\00"
define i8* @thr_fn2(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i8* inttoptr (i64 2 to i8*)
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t esp_bt_gap_get_cod_format_type(uint32_t cod) { return (cod & (0x03)); }


x86 assembly (clang, -O0):
<esp_bt_gap_get_cod_format_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @esp_bt_gap_get_cod_format_type(i32 %0) {
%2 = and i32 %0, 3
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ lstate_foldback_entropy(void const *, size_t);
ssize_t foldback_write(int fd, const void *buf, size_t count) {
  return lstate_foldback_entropy(buf, count);
}


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

x86 assembly (clang, -O2):
<foldback_write>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <lstate_foldback_entropy@plt>

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

LLVM IR (-O2):
define i32 @foldback_write(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @lstate_foldback_entropy(i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void termination_handler(int signum) {
  printf("I'M GOING TO KILL SOMEONE!!!!1\n");
  exit(1);
}


x86 assembly (clang, -O0):
<termination_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [32 x i8] c"I'M GOING TO KILL SOMEONE!!!!1\0A\00"
define void @termination_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [31 x i8] c"I'M GOING TO KILL SOMEONE!!!!1\00"
define void @termination_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ endnetent();
void setnetent(int stayopen) {
  (void)stayopen;
  endnetent();
}


x86 assembly (clang, -O0):
<setnetent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <endnetent@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @setnetent(i32 %0) {
%2 = tail call i32 (...) @endnetent()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_property();
int main() {
  test_property();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_property()
ret i32 0
}
/* Variables and functions */
int atoi(int /*<<< orphan*/);
int /*<<< orphan*/ command_GET(char *, int);
int command_INTEGER(char *name, int n) { return atoi(command_GET(name, n)); }


x86 assembly (clang, -O0):
<command_INTEGER>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <command_GET@plt>
mov    %eax,%edi
call   1040 <atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @command_INTEGER(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 i32 @command_GET(i8* %5, i32 %6)
%8 = call i32 @atoi(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @command_INTEGER(i8* %0, i32 %1) {
%3 = tail call i32 @command_GET(i8* %0, i32 %1)
%4 = tail call i32 @atoi(i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned long getcNofail(int /*<<< orphan*/ *const);
int pm_readbiglong(FILE *const ifP, long *const lP) {
  unsigned long l;
  l = getcNofail(ifP) << 24;
  l |= getcNofail(ifP) << 16;
  l |= getcNofail(ifP) << 8;
  l |= getcNofail(ifP) << 0;
  *lP = l;
  return 0;
}


x86 assembly (clang, -O0):
<pm_readbiglong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getcNofail@plt>
shl    $0x18,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getcNofail@plt>
shl    $0x10,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getcNofail@plt>
shl    $0x8,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getcNofail@plt>
shl    $0x0,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm_readbiglong>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <getcNofail@plt>
mov    %rax,%r12
shl    $0x18,%r12
mov    %r15,%rdi
call   1030 <getcNofail@plt>
mov    %rax,%rbx
shl    $0x10,%rbx
or     %r12,%rbx
mov    %r15,%rdi
call   1030 <getcNofail@plt>
mov    %rax,%r12
shl    $0x8,%r12
mov    %r15,%rdi
call   1030 <getcNofail@plt>
or     %r12,%rax
or     %rbx,%rax
mov    %rax,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @pm_readbiglong(i32* %0, i64* nocapture writeonly %1) {
%3 = tail call i64 @getcNofail(i32* %0)
%4 = shl i64 %3, 24
%5 = tail call i64 @getcNofail(i32* %0)
%6 = shl i64 %5, 16
%7 = or i64 %6, %4
%8 = tail call i64 @getcNofail(i32* %0)
%9 = shl i64 %8, 8
%10 = or i64 %7, %9
%11 = tail call i64 @getcNofail(i32* %0)
%12 = or i64 %10, %11
store i64 %12, i64* %1
ret i32 0
}