xunge/DecIR huggingface dataset:
void func7(int *ptr1, int *ptr2) {
  if (!ptr1 && !ptr2) {
    *ptr1 = 100;
    *ptr2 = 200;
  } else {
    return;
  }
  *ptr1 = 300;
  *ptr2 = 400;
}


x86 assembly (clang, -O0):
<func7>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113b <func7+0x3b>
cmpq   $0x0,-0x10(%rbp)
jne    113b <func7+0x3b>
mov    -0x8(%rbp),%rax
movl   $0x64,(%rax)
mov    -0x10(%rbp),%rax
movl   $0xc8,(%rax)
jmp    1140 <func7+0x40>
jmp    1154 <func7+0x54>
mov    -0x8(%rbp),%rax
movl   $0x12c,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x190,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @func7(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 = icmp ne i32* %5, null
br i1 %6, label %13, label %7
7: ; preds = %2
%8 = load i32*, i32** %4
%9 = icmp ne i32* %8, null
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = load i32*, i32** %3
store i32 100, i32* %11
%12 = load i32*, i32** %4
store i32 200, i32* %12
br label %14
13: ; preds = %7, %2
br label %17
14: ; preds = %10
%15 = load i32*, i32** %3
store i32 300, i32* %15
%16 = load i32*, i32** %4
store i32 400, i32* %16
br label %17
17: ; preds = %14, %13
ret void
}

LLVM IR (-O2):
define void @func7(i32* readnone %0, i32* readnone %1) {
%3 = icmp ne i32* %0, null
%4 = icmp ne i32* %1, null
%5 = or i1 %3, %4
tail call void @llvm.assume(i1 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
f(int i) {
  if (((1 << i) & 1) == 0)
    abort();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1138 <f+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %edi,%edi
jne    1115 <f+0x5>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = shl i32 1, %4
%6 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %1
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret i32 undef
}
void init_charmap(void) {}


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

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

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

LLVM IR (-O2):
define void @init_charmap() {
ret void
}
int t(int a) {
  if (a)
    return t(a - 1);
  else
    return 0;
}


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1138 <t+0x28>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <t@plt>
mov    %eax,-0x4(%rbp)
jmp    113f <t+0x2f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @t(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void parse_snapfile(int argc, char **argv, int *option, int *opt_all,
                    int *bad_arg) {
  if (argc != 1 || *option)
    *bad_arg = 1;
  *option = 1;
  if (argc == 1)
    strcpy((char *)opt_all, argv[0]);
}


x86 assembly (clang, -O0):
<parse_snapfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1142 <parse_snapfile+0x32>
mov    -0x18(%rbp),%rax
cmpl   $0x0,(%rax)
je     114c <parse_snapfile+0x3c>
mov    -0x28(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
cmpl   $0x1,-0x4(%rbp)
jne    1170 <parse_snapfile+0x60>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_snapfile>:
cmp    $0x1,%edi
jne    1132 <parse_snapfile+0x22>
cmpl   $0x0,(%rdx)
je     1121 <parse_snapfile+0x11>
movl   $0x1,(%r8)
movl   $0x1,(%rdx)
mov    (%rsi),%rsi
mov    %rcx,%rdi
jmp    1030 <strcpy@plt>
movl   $0x1,(%r8)
movl   $0x1,(%rdx)
ret

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

LLVM IR (-O2):
define void @parse_snapfile(i32 %0, i8** nocapture %1, i32* nocapture %2, i32* %3, i32* nocapture writeonly %4) {
%6 = icmp eq i32 %0, 1
br i1 %6, label %7, label %11
7: ; preds = %5
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7
store i32 1, i32* %4
br label %12
11: ; preds = %5
store i32 1, i32* %4
store i32 1, i32* %2
br label %16
12: ; preds = %7, %10
store i32 1, i32* %2
%13 = bitcast i32* %3 to i8*
%14 = load i8*, i8** %1
%15 = tail call i32 @strcpy(i8* %13, i8* %14)
br label %16
16: ; preds = %11, %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strrev(char *);
int main(void) {
  char test[] = "test";
  strrev(test);
  printf("%s\n", test);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x9(%rbp),%rdi
call   1040 <strrev@plt>
lea    -0x9(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x74736574,0x8(%rsp)
74
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strrev@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.test = [5 x i8] c"test\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
store i32 0, i32* %1
%3 = bitcast [5 x i8]* %2 to i8*
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i32 @strrev(i8* %4)
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.test = [5 x i8] c"test\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 @strrev(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
struct ns_mgr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ns_mgr_poll(struct ns_mgr *, int);
void poll_mgr(struct ns_mgr *mgr, int num_iterations) {
  while (num_iterations-- > 0) {
    ns_mgr_poll(mgr, 1);
  }
}


x86 assembly (clang, -O0):
<poll_mgr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    1146 <poll_mgr+0x36>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <ns_mgr_poll@plt>
jmp    111f <poll_mgr+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poll_mgr>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1135 <poll_mgr+0x25>
mov    %esi,%ebx
mov    %rdi,%r14
add    $0x1,%ebx
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <ns_mgr_poll@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1120 <poll_mgr+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.ns_mgr = type { i32 }
define void @poll_mgr(%struct.ns_mgr* %0, i32 %1) {
%3 = alloca %struct.ns_mgr*
%4 = alloca i32
store %struct.ns_mgr* %0, %struct.ns_mgr** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %4
%7 = add nsw i32 %6, -1
store i32 %7, i32* %4
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load %struct.ns_mgr*, %struct.ns_mgr** %3
%11 = call i32 @ns_mgr_poll(%struct.ns_mgr* %10, i32 1)
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
%struct.ns_mgr = type { i32 }
define void @poll_mgr(%struct.ns_mgr* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @ns_mgr_poll(%struct.ns_mgr* %0, i32 1)
%8 = icmp ugt i32 %5, 1
br i1 %8, label %4, label %9
9: ; preds = %4, %2
ret void
}
void os_wait_sample(void) {}


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

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

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

LLVM IR (-O2):
define void @os_wait_sample() {
ret void
}
int main() {
  int i;
  i = 2;
  switch (i) {
  case 1 ... 5:
    goto L1;
  default:
    abort();
    goto L1;
  }
L1:
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
sub    $0x4,%eax
ja     114f <main+0x2f>
jmp    114a <main+0x2a>
jmp    1154 <main+0x34>
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define i32 @main() {
tail call void @exit(i32 0)
unreachable
}
void playSound(int sound) {}


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

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

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

LLVM IR (-O2):
define void @playSound(i32 %0) {
ret void
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int a = 0, b = 0;
#pragma omp parallel
  {
    int me = omp_get_thread_num();
    if (me == 0)
      a = 1;
    if (me == 1)
      b = 1;
#pragma omp flush(a, b)
  }
  printf("%d,%d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1158 <main+0x38>
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    1169 <main+0x49>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
xor    %edx,%edx
cmp    $0x1,%eax
sete   %dl
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d,%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = icmp eq i32 %1, 1
%5 = zext i1 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
scalar_t__ test(int /*<<< orphan*/);
int main() {
  if (test(0)) {
    __VERIFIER_error();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <test@plt>
cmp    $0x0,%rax
je     1147 <main+0x27>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <test@plt>
test   %rax,%rax
je     1134 <main+0x14>
xor    %eax,%eax
call   1030 <__VERIFIER_error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @test(i32 0)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @__VERIFIER_error()
br label %6
6: ; preds = %4, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @test(i32 0)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @__VERIFIER_error()
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int length;
int /*<<< orphan*/ snprintf(char *, int, char *, double);
char *strdup(char *);
char *xml_float(double d) {
  const length = 128;
  char buffer[length];
  snprintf(buffer, length, "<number>%G</number>", d);
  return strdup(buffer);
}


x86 assembly (clang, -O0):
<xml_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x8(%rbp)
movl   $0x80,-0xc(%rbp)
mov    %rsp,%rax
mov    %rax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0xa0(%rbp),%rdi
mov    $0x80,%esi
lea    0xeaa(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0xa0(%rbp),%rdi
call   1040 <strdup@plt>
mov    -0x18(%rbp),%rcx
mov    %rcx,%rsp
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xml_float>:
push   %rbx
sub    $0x80,%rsp
lea    0xed1(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x80,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"<number>%G</number>\00"
@length = global i32 0
define i8* @xml_float(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i8*
store double %0, double* %2
store i32 128, i32* %3
%5 = call i8* @llvm.stacksave()
store i8* %5, i8** %4
%6 = alloca i8, i64 128
%7 = load double, double* %2
%8 = call i32 @snprintf(i8* %6, i32 128, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), double %7)
%9 = call i8* @strdup(i8* %6)
%10 = load i8*, i8** %4
ret i8* %9
}

LLVM IR (-O2):
@.str = [20 x i8] c"<number>%G</number>\00"
@length = global i32 0
define noalias i8* @xml_float(double %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 128, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), double %0)
%5 = call i8* @strdup(i8* %3)
ret i8* %5
}
main() {
  int x[] = {1, 0};
  return x[1];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0xeee(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.x = [2 x i32] [i32 1, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
store i32 0, i32* %1
%3 = bitcast [2 x i32]* %2 to i8*
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
__attribute__((unused)) void qsim_sig_handler(int signo) {
  char c;
  asm volatile("cpuid;" ::"a"(0xfa11dead) : "ebx", "ecx", "edx");
  ;
  printf("Callbacks disabled. Quit(y/n)?");
  scanf("%c", &c);
  if (c == 'y')
    exit(0);
}


x86 assembly (clang, -O0):
<qsim_sig_handler>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    %edi,-0xc(%rbp)
mov    $0xfa11dead,%eax
cpuid
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0xd(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0xd(%rbp),%eax
cmp    $0x79,%eax
jne    1174 <qsim_sig_handler+0x44>
xor    %edi,%edi
call   1050 <exit@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsim_sig_handler>:
push   %rbx
sub    $0x10,%rsp
mov    $0xfa11dead,%eax
cpuid
lea    0xebd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    0xf(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpb   $0x79,0xf(%rsp)
je     116a <qsim_sig_handler+0x3a>
add    $0x10,%rsp
pop    %rbx
ret
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Callbacks disabled. Quit(y/n)?\00"
@.str.1 = [3 x i8] c"%c\00"
define void @qsim_sig_handler(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 121
br i1 %8, label %9, label %10
9: ; preds = %1
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Callbacks disabled. Quit(y/n)?\00"
@.str.1 = [3 x i8] c"%c\00"
define void @qsim_sig_handler(i32 %0) {
%2 = alloca i8
tail call void asm sideeffect "cpuid;", "{ax},~{ebx},~{ecx},~{edx},~{dirflag},~{fpsr},~{flags}"(i32 -99492179)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = icmp eq i8 %5, 121
br i1 %6, label %7, label %8
7: ; preds = %1
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(void *, char *, char const *);
void f_putstr(void *data, const char *str) { fprintf(data, "%s", str); }


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

x86 assembly (clang, -O2):
<f_putstr>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @f_putstr(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 @fprintf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
define void @f_putstr(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @fputs(i8* %1, i8* %0)
ret void
}
__attribute__((weak)) void NMI_Handler() {}


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

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

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

LLVM IR (-O2):
define weak void @NMI_Handler() {
ret void
}
int apr_netstart(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @apr_netstart() {
ret i32 0
}
int main(void) {
  int numero = 6;
  teste((void *)&numero);
  teste();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x6,0x4(%rsp)
lea    0x4(%rsp),%rdi
xor    %eax,%eax
call   1030 <teste@plt>
xor    %eax,%eax
call   1030 <teste@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 6, i32* %1
%2 = bitcast i32* %1 to i8*
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @teste to i32 (i8*, ...)*)(i8* %2)
%4 = call i32 (...) @teste()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 6, i32* %1
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @teste to i32 (i8*, ...)*)(i8* %2)
%4 = call i32 (...) @teste()
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ i386_out8(int, int);
void vga_early_set_cursor(int col, int row) {
  int pos = row * 80 + col;
  i386_out8((0x3D4), 0x0F);
  i386_out8((0x3D5), (uint8_t)(pos & 0xFF));
  i386_out8((0x3D4), 0x0E);
  i386_out8((0x3D5), (uint8_t)((pos >> 8) & 0xFF));
}


x86 assembly (clang, -O0):
<vga_early_set_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x50,-0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <i386_out8@plt>
mov    -0xc(%rbp),%esi
and    $0xff,%esi
mov    $0x3d5,%edi
call   1030 <i386_out8@plt>
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <i386_out8@plt>
mov    -0xc(%rbp),%esi
sar    $0x8,%esi
and    $0xff,%esi
mov    $0x3d5,%edi
call   1030 <i386_out8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vga_early_set_cursor>:
push   %rbx
lea    (%rsi,%rsi,4),%ebx
shl    $0x4,%ebx
add    %edi,%ebx
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <i386_out8@plt>
movzbl %bl,%esi
mov    $0x3d5,%edi
call   1030 <i386_out8@plt>
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <i386_out8@plt>
movzbl %bh,%esi
mov    $0x3d5,%edi
pop    %rbx
jmp    1030 <i386_out8@plt>

LLVM IR (-O0):
define void @vga_early_set_cursor(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* %4
%7 = mul nsw i32 %6, 80
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
store i32 %9, i32* %5
%10 = call i32 @i386_out8(i32 980, i32 15)
%11 = load i32, i32* %5
%12 = and i32 %11, 255
%13 = call i32 @i386_out8(i32 981, i32 %12)
%14 = call i32 @i386_out8(i32 980, i32 14)
%15 = load i32, i32* %5
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = call i32 @i386_out8(i32 981, i32 %17)
ret void
}

LLVM IR (-O2):
define void @vga_early_set_cursor(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, 80
%4 = add nsw i32 %3, %0
%5 = tail call i32 @i386_out8(i32 980, i32 15)
%6 = and i32 %4, 255
%7 = tail call i32 @i386_out8(i32 981, i32 %6)
%8 = tail call i32 @i386_out8(i32 980, i32 14)
%9 = lshr i32 %4, 8
%10 = and i32 %9, 255
%11 = tail call i32 @i386_out8(i32 981, i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void err(const char *s) { fprintf(stderr, "Error reading %s\n", s); }


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"Error reading %s\0A\00"
define void @err(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"Error reading %s\0A\00"
define void @err(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
extern char ArglessChar() { return 2; }


x86 assembly (clang, -O0):
<ArglessChar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ArglessChar>:
mov    $0x2,%al
ret

LLVM IR (-O0):
define signext i8 @ArglessChar() {
ret i8 2
}

LLVM IR (-O2):
define signext i8 @ArglessChar() {
ret i8 2
}
int main0() {
  int *arr1 = (int *)0x02000000;
  *(arr1 + 0) = 0;
  for (int i = 0; i < 10; i++) {
    *(arr1 + 0) += 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2000000,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1141 <main0+0x41>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111e <main0+0x1e>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main0>:
movl   $0xa,0x2000000
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main0() {
%1 = alloca i32*
%2 = alloca i32
store i32* inttoptr (i64 33554432 to i32*), i32** %1
%3 = load i32*, i32** %1
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 0, i32* %4
store i32 0, i32* %2
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32*, i32** %1
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
%12 = add nsw i32 %11, 1
store i32 %12, i32* %10
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %5
16: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main0() {
store i32 10, i32* inttoptr (i64 33554432 to i32*)
ret i32 0
}
const char *eraVersion() { return "1.4.0"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"1.4.0\00"
define i8* @eraVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int snprintf(char *, size_t, char *, char const *, char const *);
int spx_reporter_full_build_metadata_file_name(const char *data_dir,
                                               const char *key, char *file_name,
                                               size_t size) {
  return snprintf(file_name, size, "%s/%s.json", data_dir, key);
}


x86 assembly (clang, -O0):
<spx_reporter_full_build_metadata_file_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xec1(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spx_reporter_full_build_metadata_file_name>:
mov    %rdx,%rax
mov    %rsi,%r8
mov    %rdi,%r9
lea    0xee0(%rip),%rdx
mov    %rax,%rdi
mov    %rcx,%rsi
mov    %r9,%rcx
jmp    1030 <snprintf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"%s/%s.json\00"
define i32 @spx_reporter_full_build_metadata_file_name(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 @snprintf(i8* %2, i64 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i32 %5
}
void HandleDestroy() {}


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

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

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

LLVM IR (-O2):
define void @HandleDestroy() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ iterate48(unsigned short *);
double erand48(unsigned short subi[3]) {
  uint64_t r = iterate48(subi);
  return ((double)r) / 281474976710655.;
}


x86 assembly (clang, -O0):
<erand48>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <iterate48@plt>
mov    %rax,-0x10(%rbp)
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xec9(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erand48>:
push   %rax
call   1030 <iterate48@plt>
cvtsi2sd %rax,%xmm0
divsd  0xedd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @erand48(i16* %0) {
%2 = alloca i16*
%3 = alloca i64
store i16* %0, i16** %2
%4 = load i16*, i16** %2
%5 = call i64 @iterate48(i16* %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = sitofp i64 %6 to double
%8 = fdiv double %7, 0x42EFFFFFFFFFFFE0
ret double %8
}

LLVM IR (-O2):
define double @erand48(i16* %0) {
%2 = tail call i64 @iterate48(i16* %0)
%3 = sitofp i64 %2 to double
%4 = fdiv double %3, 0x42EFFFFFFFFFFFE0
ret double %4
}
void nav_write(void) {}


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

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

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

LLVM IR (-O2):
define void @nav_write() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ s;

/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
char *strdupl(char *s) {
  char *t;
  t = (char *)malloc(sizeof(s) + 1);
  if (t != NULL)
    strcpy(t, s);
  return t;
}


x86 assembly (clang, -O0):
<strdupl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x9,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1152 <strdupl+0x32>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdupl>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x9,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1144 <strdupl+0x24>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strdupl(i8* %0) {
%2 = tail call i64 @malloc(i32 9)
%3 = inttoptr i64 %2 to i8*
%4 = icmp eq i64 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @strcpy(i8* %3, i8* %0)
br label %7
7: ; preds = %5, %1
ret i8* %3
}
int Operand_uimm8x2_encode(unsigned int *valp) {
  unsigned imm8_0, uimm8x2_0;
  uimm8x2_0 = *valp;
  imm8_0 = ((uimm8x2_0 >> 1) & 0xff);
  *valp = imm8_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_uimm8x2_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shr    $0x1,%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_uimm8x2_encode>:
mov    (%rdi),%eax
shr    %eax
movzbl %al,%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_uimm8x2_encode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = lshr i32 %7, 1
%9 = and i32 %8, 255
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = load i32*, i32** %2
store i32 %10, i32* %11
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_uimm8x2_encode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = lshr i32 %2, 1
%4 = and i32 %3, 255
store i32 %4, i32* %0
ret i32 0
}
void console_set_prompt(char ch) {}


x86 assembly (clang, -O0):
<console_set_prompt>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @console_set_prompt(i8 signext %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ load_xmm(int, void *);
int /*<<< orphan*/ print_vec_int8(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
void print_xmm_int8(int i) {
  static int8_t v[16];
  load_xmm(i, (void *)v);
  printf("xmm%d = ", i);
  print_vec_int8(v);
}


x86 assembly (clang, -O0):
<print_xmm_int8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0x2f0b(%rip),%rsi
call   1040 <load_xmm@plt>
mov    -0x4(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
lea    0x2ef0(%rip),%rdi
call   1050 <print_vec_int8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_xmm_int8>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x2f13(%rip),%r14
mov    %r14,%rsi
call   1040 <load_xmm@plt>
lea    0xeb4(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <print_vec_int8@plt>

LLVM IR (-O0):
@print_xmm_int8.v = internal global [16 x i32] zeroinitializer
@.str = [9 x i8] c"xmm%d = \00"
define void @print_xmm_int8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @load_xmm(i32 %3, i8* bitcast ([16 x i32]* @print_xmm_int8.v to i8*))
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @print_vec_int8(i32* getelementptr inbounds ([16 x i32], [16 x i32]* @print_xmm_int8.v, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@print_xmm_int8.v = internal global [16 x i32] zeroinitializer
@.str = [9 x i8] c"xmm%d = \00"
define void @print_xmm_int8(i32 %0) {
%2 = tail call i32 @load_xmm(i32 %0, i8* bitcast ([16 x i32]* @print_xmm_int8.v to i8*))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @print_vec_int8(i32* getelementptr inbounds ([16 x i32], [16 x i32]* @print_xmm_int8.v, i64 0, i64 0))
ret void
}
int separatorAtmt(char entryChar) {
  if ((entryChar == ' ') || (entryChar == ';') || (entryChar == ':') ||
      (entryChar == ',') || (entryChar == ':')) {
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<separatorAtmt>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     114b <separatorAtmt+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x3b,%eax
je     114b <separatorAtmt+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x3a,%eax
je     114b <separatorAtmt+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x2c,%eax
je     114b <separatorAtmt+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x3a,%eax
jne    1157 <separatorAtmt+0x57>
movl   $0x0,-0x4(%rbp)
jmp    115e <separatorAtmt+0x5e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<separatorAtmt>:
cmp    $0x3b,%dil
ja     111d <separatorAtmt+0x1d>
xor    %eax,%eax
movzbl %dil,%ecx
movabs $0xc00100100000000,%rdx
bt     %rcx,%rdx
jae    111d <separatorAtmt+0x1d>
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @separatorAtmt(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 32
br i1 %6, label %23, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 59
br i1 %10, label %23, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 58
br i1 %14, label %23, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 44
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 58
br i1 %22, label %23, label %24
23: ; preds = %19, %15, %11, %7, %1
store i32 0, i32* %2
br label %25
24: ; preds = %19
store i32 -1, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @separatorAtmt(i8 signext %0) {
switch i8 %0, label %2 [
i8 59, label %3
i8 58, label %3
i8 44, label %3
i8 32, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i32 [ -1, %2 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ]
ret i32 %4
}
/* Variables and functions */
int sqrt(int);
int exact_square(int in) {
  int tmp = sqrt(in);
  if (tmp * tmp == in)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<exact_square>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sqrt@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1142 <exact_square+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <exact_square+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_square>:
push   %rbx
mov    %edi,%ebx
call   1030 <sqrt@plt>
imul   %eax,%eax
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @exact_square(i32 %0) {
%2 = tail call i32 @sqrt(i32 %0)
%3 = mul nsw i32 %2, %2
%4 = icmp eq i32 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "klines and dlines now go in separate files:\n");
  fprintf(stderr,
          "convertklines kline.conf.old kline.conf.new dline.conf.new\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xee4(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeee(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [45 x i8] c"klines and dlines now go in separate files:\0A\00"
@.str.1 = [60 x i8] c"convertklines kline.conf.old kline.conf.new dline.conf.new\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [45 x i8] c"klines and dlines now go in separate files:\0A\00"
@.str.1 = [60 x i8] c"convertklines kline.conf.old kline.conf.new dline.conf.new\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 -1)
unreachable
}
unsigned int dbm_hash(str)
register char *str;
{
  register unsigned int n = 0;
  while (*str != '\0')
    n = *str++ + 65599 * n;
  return (n);
}


x86 assembly (clang, -O0):
<dbm_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1142 <dbm_hash+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
imul   $0x1003f,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <dbm_hash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbm_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <dbm_hash+0x27>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
imul   $0x1003f,%eax,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <dbm_hash+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @dbm_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %2
%12 = load i8, i8* %10
%13 = sext i8 %12 to i32
%14 = load i32, i32* %3
%15 = mul i32 65599, %14
%16 = add i32 %13, %15
store i32 %16, i32* %3
br label %4
17: ; preds = %4
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @dbm_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul i32 %6, 65599
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
int sum2(int n) { return (n == 1) ? 1 : (n + sum2(n - 1)); }


x86 assembly (clang, -O0):
<sum2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1132 <sum2+0x22>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114d <sum2+0x3d>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <sum2@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum2>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     1124 <sum2+0x24>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %ecx,%eax
lea    -0x3(%rdi),%edx
imul   %rcx,%rdx
shr    %rdx
add    %edi,%eax
sub    %edx,%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @sum2(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = add i32 %0, -2
%6 = mul i32 %4, %5
%7 = zext i32 %5 to i33
%8 = add i32 %0, -3
%9 = zext i32 %8 to i33
%10 = mul i33 %7, %9
%11 = lshr i33 %10, 1
%12 = trunc i33 %11 to i32
%13 = add i32 %6, %0
%14 = sub i32 %13, %12
%15 = add i32 %14, 1
br label %16
16: ; preds = %3, %1
%17 = phi i32 [ 1, %1 ], [ %15, %3 ]
ret i32 %17
}
/* Variables and functions */
scalar_t__ nondet_bool();
int main() {
  int *p = 0;
  int x;
  if (nondet_bool())
    p = &x;
  if (p)
    *p = 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <nondet_bool@plt>
cmp    $0x0,%rax
je     1140 <main+0x30>
lea    -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1155 <main+0x45>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

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