xunge/DecIR huggingface dataset:
/* Variables and functions */
long divmodsi4(int /*<<< orphan*/, unsigned long, unsigned long);
long __udivsi3(unsigned long numerator, unsigned long denominator) {
  int sign;
  long dividend;
  long modul;
  dividend = divmodsi4(0, numerator, denominator);
  return dividend;
}


x86 assembly (clang, -O0):
<__udivsi3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
call   1030 <divmodsi4@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @__udivsi3(i64 %0, i64 %1) {
%3 = tail call i64 @divmodsi4(i32 0, i64 %0, i64 %1)
ret i64 %3
}
int ft_islower(int c) { return (((c >= 97) && (c <= 122)) ? 1 : 0); }


x86 assembly (clang, -O0):
<ft_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <ft_islower+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @ft_islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int volatile uint64_t;

/* Variables and functions */
uint64_t volatile_fetch_xor_u64(volatile uint64_t *dest, uint64_t val) {
  uint64_t result = *dest;
  *dest = result ^ val;
  return result;
}


x86 assembly (clang, -O0):
<volatile_fetch_xor_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%eax
xor    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<volatile_fetch_xor_u64>:
mov    %esi,-0x4(%rsp)
mov    (%rdi),%eax
mov    %eax,-0x8(%rsp)
mov    -0x8(%rsp),%eax
xor    -0x4(%rsp),%eax
mov    %eax,(%rdi)
mov    -0x8(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @volatile_fetch_xor_u64(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store volatile i32 %1, i32* %3
%5 = bitcast i32* %4 to i8*
%6 = load volatile i32, i32* %0
store volatile i32 %6, i32* %4
%7 = load volatile i32, i32* %4
%8 = load volatile i32, i32* %3
%9 = xor i32 %8, %7
store volatile i32 %9, i32* %0
%10 = load volatile i32, i32* %4
ret i32 %10
}
void userlock_release(volatile int *userlock) { *userlock = 0; }


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

x86 assembly (clang, -O2):
<userlock_release>:
movl   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @userlock_release(i32* %0) {
store volatile i32 0, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, char);
char sdt(char ch[50]) {
  int i, j;
  scanf("%d", j);
  for (i = 0; i <= j; i++)
    if (i == '\0')
      break;
    else
      scanf("%c", ch[j]);
}


x86 assembly (clang, -O0):
<sdt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x18(%rbp),%eax
lea    0xeda(%rip),%rdi
movsbl %al,%esi
call   1030 <scanf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     117b <sdt+0x6b>
cmpl   $0x0,-0x14(%rbp)
jne    1150 <sdt+0x40>
jmp    117b <sdt+0x6b>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
lea    0xea4(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <scanf@plt>
jmp    116d <sdt+0x5d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1135 <sdt+0x25>
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdt>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <scanf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%c\00"
define signext i8 @sdt(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i32, i32* %5
%7 = trunc i32 %6 to i8
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %7)
store i32 0, i32* %4
br label %9
9: ; preds = %25, %1
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = icmp sle i32 %10, %11
br i1 %12, label %13, label %28
13: ; preds = %9
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
br label %28
17: ; preds = %13
%18 = load i8*, i8** %3
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext %22)
br label %24
24: ; preds = %17
br label %25
25: ; preds = %24
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %9
28: ; preds = %16, %9
%29 = load i8, i8* %2
ret i8 %29
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define signext i8 @sdt(i8* nocapture readnone %0) {
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext undef)
ret i8 undef
}
/* Variables and functions */
int /*<<< orphan*/ bishops(int, int);
int main(int argc, char **argv) {
  bishops(4, 4);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x4,%esi
call   1030 <bishops@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @bishops(i32 4, i32 4)
ret i32 0
}
__attribute__((always_)) void f1() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ *stdout;
FILE *get_stdout(void) { return stdout; }


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

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

LLVM IR (-O0):
@stdout = global i32* null
define i32* @get_stdout() {
%1 = load i32*, i32** @stdout
ret i32* %1
}

LLVM IR (-O2):
@stdout = global i32* null
define i32* @get_stdout() {
%1 = load i32*, i32** @stdout
ret i32* %1
}
/* Variables and functions */
int strcmp(char const *, char const *);
int safe_strcmp(const char *s1, const char *s2) {
  if (s1 == NULL || s2 == NULL) {
    return (s1 != s2);
  }
  return strcmp(s1, s2);
}


x86 assembly (clang, -O0):
<safe_strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <safe_strcmp+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    114e <safe_strcmp+0x3e>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    115e <safe_strcmp+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_strcmp>:
test   %rdi,%rdi
je     111f <safe_strcmp+0xf>
test   %rsi,%rsi
je     111f <safe_strcmp+0xf>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
cmp    %rsi,%rdi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @safe_strcmp(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = icmp ne i8* %0, %1
%8 = zext i1 %7 to i32
br label %11
9: ; preds = %2
%10 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}
void test81_ArrayReturn_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test81_ArrayReturn_targetInit__I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ new_game();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  printf("press 'w', 's', 'a', 'd' to move number.\n");
  srand(time(NULL));
  while (1) {
    new_game();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0x0,%al
call   1030 <new_game@plt>
jmp    116b <main+0x2b>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <new_game@plt>
jmp    1160 <main+0x20>

LLVM IR (-O0):
@.str = [42 x i8] c"press 'w', 's', 'a', 'd' to move number.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
br label %5
5: ; preds = %0, %5
%6 = call i32 (...) @new_game()
br label %5
}

LLVM IR (-O2):
@str = [41 x i8] c"press 'w', 's', 'a', 'd' to move number.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @srand(i32 %2)
br label %4
4: ; preds = %0, %4
%5 = tail call i32 (...) @new_game()
br label %4
}
signed int MAKE_INT_32(unsigned int value) {
  return (value & 0x80000000) ? value | ~0xffffffff : value & 0xffffffff;
}


x86 assembly (clang, -O0):
<MAKE_INT_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     1126 <MAKE_INT_32+0x26>
mov    -0x4(%rbp),%eax
or     $0x0,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <MAKE_INT_32+0x2f>
mov    -0x4(%rbp),%eax
and    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @MAKE_INT_32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -2147483648
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = or i32 %7, 0
br label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = and i32 %10, -1
br label %12
12: ; preds = %9, %6
%13 = phi i32 [ %8, %6 ], [ %11, %9 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @MAKE_INT_32(i32 returned %0) {
ret i32 %0
}
void CFGMR3DestroyTree(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3DestroyTree() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ error(int /*<<< orphan*/, int /*<<< orphan*/, char *,
                         unsigned long);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *r = malloc(size);
  if (!r)
    error(EXIT_FAILURE, errno, "malloc: allocating %lu bytes",
          (unsigned long)size);
  return r;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1166 <xmalloc+0x46>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
mov    0x2e8c(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rcx
lea    0xe9f(%rip),%rdx
call   1040 <error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1155 <xmalloc+0x35>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
lea    0xeb3(%rip),%rdx
mov    %r14,%rcx
call   1040 <error@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@errno = global i32 0
@.str = [29 x i8] c"malloc: allocating %lu bytes\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i32, i32* @EXIT_FAILURE
%10 = load i32, i32* @errno
%11 = load i64, i64* %2
%12 = call i32 @error(i32 %9, i32 %10, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %11)
br label %13
13: ; preds = %8, %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@errno = global i32 0
@.str = [29 x i8] c"malloc: allocating %lu bytes\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @EXIT_FAILURE
%6 = load i32, i32* @errno
%7 = tail call i32 @error(i32 %5, i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %8
8: ; preds = %4, %1
ret i8* %2
}
void path_done(void) {}


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

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

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

LLVM IR (-O2):
define void @path_done() {
ret void
}
void FlashIntDisable(unsigned long ulIntFlags) {
  (*((volatile unsigned long *)(0x400FD000 + 0x00000010))) &= ~(ulIntFlags);
}


x86 assembly (clang, -O0):
<FlashIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
mov    $0x400fd010,%ecx
mov    (%rcx),%rcx
and    %rax,%rcx
mov    $0x400fd010,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlashIntDisable>:
not    %rdi
and    %rdi,0x400fd010
40
ret

LLVM IR (-O0):
define void @FlashIntDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1074778128 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074778128 to i64*)
ret void
}

LLVM IR (-O2):
define void @FlashIntDisable(i64 %0) {
%2 = xor i64 %0, -1
%3 = load volatile i64, i64* inttoptr (i64 1074778128 to i64*)
%4 = and i64 %3, %2
store volatile i64 %4, i64* inttoptr (i64 1074778128 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print(char dat) {
  switch (dat) {
  case 1: {
    unsigned int a;
    unsigned int b;
    a = 1;
    b = 1;
    printf("aaa\n");
    break;
  }
  case 2:
    break;
  case 3:
    break;
  }
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     1155 <print+0x45>
jmp    1133 <print+0x23>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     1174 <print+0x64>
jmp    1144 <print+0x34>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     1179 <print+0x69>
jmp    117e <print+0x6e>
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    117e <print+0x6e>
jmp    117e <print+0x6e>
jmp    117e <print+0x6e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
cmp    $0x1,%dil
jne    1122 <print+0x12>
lea    0xee3(%rip),%rdi
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@.str = [5 x i8] c"aaa\0A\00"
define void @print(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
switch i32 %6, label %11 [
i32 1, label %7
i32 2, label %9
i32 3, label %10
]
7: ; preds = %1
store i32 1, i32* %3
store i32 1, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %11
9: ; preds = %1
br label %11
10: ; preds = %1
br label %11
11: ; preds = %1, %10, %9, %7
ret void
}

LLVM IR (-O2):
@str = [4 x i8] c"aaa\00"
define void @print(i8 signext %0) {
%2 = icmp eq i8 %0, 1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %1, %3
ret void
}
A() {}


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

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

LLVM IR (-O0):
define i32 @A() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @A() {
ret i32 undef
}
void foo(char *c, unsigned n) {
  while (n--)
    *(c++) = 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
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
je     1136 <foo+0x36>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
jmp    110b <foo+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   %esi,%esi
je     1122 <foo+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @foo(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void drda_dump_buf(FILE *dumpfile, const void *buf, int length) {}


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

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

LLVM IR (-O0):
define void @drda_dump_buf(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @drda_dump_buf(i32* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int cmp_less_int64(const void *p, const void *q) {
  const int64_t a = *(const int64_t *)p;
  const int64_t b = *(const int64_t *)q;
  if (a > b)
    return +1;
  if (b > a)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp_less_int64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jle    113c <cmp_less_int64+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115d <cmp_less_int64+0x5d>
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jle    1156 <cmp_less_int64+0x56>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <cmp_less_int64+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_less_int64>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rax,%rcx
setg   %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_less_int64(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = icmp sgt i64 %6, %4
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
void __swi(void) { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
void set_tweak_in_tweakey(uint8_t *tweakey, uint8_t *tweak) {
  memcpy(tweakey + 16, tweak, 16);
}


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

x86 assembly (clang, -O2):
<set_tweak_in_tweakey>:
add    $0x40,%rdi
mov    $0x10,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @set_tweak_in_tweakey(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 = getelementptr inbounds i32, i32* %5, i64 16
%7 = load i32*, i32** %4
%8 = call i32 @memcpy(i32* %6, i32* %7, i32 16)
ret void
}

LLVM IR (-O2):
define void @set_tweak_in_tweakey(i32* %0, i32* %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 16
%4 = tail call i32 @memcpy(i32* %3, i32* %1, i32 16)
ret void
}
/* Type definitions */
struct ip {
  int ip_ttl;
};

/* Variables and functions */
int get_ip_ttl(struct ip *self) { return self->ip_ttl; }


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

x86 assembly (clang, -O2):
<get_ip_ttl>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.ip = type { i32 }
define i32 @get_ip_ttl(%struct.ip* %0) {
%2 = alloca %struct.ip*
store %struct.ip* %0, %struct.ip** %2
%3 = load %struct.ip*, %struct.ip** %2
%4 = getelementptr inbounds %struct.ip, %struct.ip* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.ip = type { i32 }
define i32 @get_ip_ttl(%struct.ip* nocapture %0) {
%2 = getelementptr inbounds %struct.ip, %struct.ip* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
void PWM_Servo_RestoreConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @PWM_Servo_RestoreConfig() {
ret void
}
/* Variables and functions */
void *malloc(int);
void *naAlloc(int n) { return malloc(n); }


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

x86 assembly (clang, -O2):
<naAlloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @naAlloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ testme();
int main(int argc, char const *argv[]) {
  testme();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @testme()
ret i32 0
}
/* Variables and functions */
int _get_result(int);
int /*<<< orphan*/ _put_char(int, char);
int cmd_boot(int fd) {
  _put_char(fd, 'b');
  _put_char(fd, '\n');
  return _get_result(fd);
}


x86 assembly (clang, -O0):
<cmd_boot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x62,%esi
call   1030 <_put_char@plt>
mov    -0x4(%rbp),%edi
mov    $0xa,%esi
call   1030 <_put_char@plt>
mov    -0x4(%rbp),%edi
call   1040 <_get_result@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_boot>:
push   %rbx
mov    %edi,%ebx
mov    $0x62,%esi
call   1030 <_put_char@plt>
mov    %ebx,%edi
mov    $0xa,%esi
call   1030 <_put_char@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <_get_result@plt>

LLVM IR (-O0):
define i32 @cmd_boot(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_put_char(i32 %3, i8 signext 98)
%5 = load i32, i32* %2
%6 = call i32 @_put_char(i32 %5, i8 signext 10)
%7 = load i32, i32* %2
%8 = call i32 @_get_result(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @cmd_boot(i32 %0) {
%2 = tail call i32 @_put_char(i32 %0, i8 signext 98)
%3 = tail call i32 @_put_char(i32 %0, i8 signext 10)
%4 = tail call i32 @_get_result(i32 %0)
ret i32 %4
}
int get_label() {
  static int label = 0;
  return label++;
}


x86 assembly (clang, -O0):
<get_label>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f0f(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_label>:
mov    0x2f1e(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f15(%rip)
ret

LLVM IR (-O0):
@get_label.label = internal global i32 0
define i32 @get_label() {
%1 = load i32, i32* @get_label.label
%2 = add nsw i32 %1, 1
store i32 %2, i32* @get_label.label
ret i32 %1
}

LLVM IR (-O2):
@get_label.label = internal unnamed_addr global i32 0
define i32 @get_label() {
%1 = load i32, i32* @get_label.label
%2 = add nsw i32 %1, 1
store i32 %2, i32* @get_label.label
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("Please enter only 1 argument.\n"); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"Please enter only 1 argument.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"Please enter only 1 argument.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
uint32_t umod32(uint32_t a, uint32_t b) {
  uint32_t r;
  if (b == 0) {
    fprintf(stderr, "Should not happen\n");
    exit(EXIT_FAILURE);
  }
  r = a % b;
  return r;
}


x86 assembly (clang, -O0):
<umod32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    115b <umod32+0x3b>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umod32>:
test   %esi,%esi
je     112c <umod32+0xc>
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret
push   %rax
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Should not happen\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @umod32(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 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = srem i32 %14, %15
store i32 %16, i32* %5
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Should not happen\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @umod32(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = srem i32 %0, %1
ret i32 %10
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double atanhl(long double x) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<atanhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @atanhl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @atanhl(x86_fp80 %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void badvpn_write_be32(uint32_t x, char *c_ptr) {
  uint8_t *ptr = (uint8_t *)c_ptr;
  ptr[0] = x >> 24;
  ptr[1] = x >> 16;
  ptr[2] = x >> 8;
  ptr[3] = x >> 0;
}


x86 assembly (clang, -O0):
<badvpn_write_be32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x18,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x0,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<badvpn_write_be32>:
mov    %edi,%eax
sar    $0x18,%eax
mov    %eax,(%rsi)
mov    %edi,%eax
sar    $0x10,%eax
mov    %eax,0x4(%rsi)
mov    %edi,%eax
sar    $0x8,%eax
mov    %eax,0x8(%rsi)
mov    %edi,0xc(%rsi)
ret

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

LLVM IR (-O2):
define void @badvpn_write_be32(i32 %0, i8* nocapture writeonly %1) {
%3 = bitcast i8* %1 to i32*
%4 = ashr i32 %0, 24
store i32 %4, i32* %3
%5 = ashr i32 %0, 16
%6 = getelementptr inbounds i8, i8* %1, i64 4
%7 = bitcast i8* %6 to i32*
store i32 %5, i32* %7
%8 = ashr i32 %0, 8
%9 = getelementptr inbounds i8, i8* %1, i64 8
%10 = bitcast i8* %9 to i32*
store i32 %8, i32* %10
%11 = getelementptr inbounds i8, i8* %1, i64 12
%12 = bitcast i8* %11 to i32*
store i32 %0, i32* %12
ret void
}
void isr_enable() { asm volatile(" sti "); }


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

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

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

LLVM IR (-O2):
define void @isr_enable() {
tail call void asm sideeffect " sti ", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
unsigned xrop3_222_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D ^ T;
  stk1 = S | stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_222_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_222_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    $0xff,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_222_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %7
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %6
%26 = load i32, i32* %9
%27 = or i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
ret i32 %28
}

LLVM IR (-O2):
define i32 @xrop3_222_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, 255
%8 = or i32 %7, %4
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ GenPrintInstr1Operand(int, int /*<<< orphan*/, int, int);
void GenJumpUncond(int label) { GenPrintInstr1Operand(0x1F, 0, 0x82, label); }


x86 assembly (clang, -O0):
<GenJumpUncond>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1f,%edi
xor    %esi,%esi
mov    $0x82,%edx
call   1030 <GenPrintInstr1Operand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenJumpUncond>:
mov    %edi,%ecx
mov    $0x1f,%edi
xor    %esi,%esi
mov    $0x82,%edx
jmp    1030 <GenPrintInstr1Operand@plt>

LLVM IR (-O0):
define void @GenJumpUncond(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @GenPrintInstr1Operand(i32 31, i32 0, i32 130, i32 %3)
ret void
}

LLVM IR (-O2):
define void @GenJumpUncond(i32 %0) {
%2 = tail call i32 @GenPrintInstr1Operand(i32 31, i32 0, i32 130, i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ pow(int /*<<< orphan*/, int);
int /*<<< orphan*/ rand_normal_r();
double rand_chisq(int n) {
  int i;
  double x = 0;
  for (i = 0; i < n; i++)
    x += pow(rand_normal_r(), 2);
  return x;
}


x86 assembly (clang, -O0):
<rand_chisq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1176 <rand_chisq+0x56>
mov    $0x0,%al
call   1030 <rand_normal_r@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <rand_chisq+0x1a>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_chisq>:
push   %rbx
sub    $0x10,%rsp
test   %edi,%edi
jle    116e <rand_chisq+0x4e>
mov    %edi,%ebx
xorps  %xmm0,%xmm0
xchg   %ax,%ax
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand_normal_r@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x8(%rsp),%xmm0
add    $0xffffffff,%ebx
jne    1130 <rand_chisq+0x10>
jmp    1171 <rand_chisq+0x51>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @rand_chisq(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %2
store double 0.000000e+00, double* %4
store i32 0, i32* %3
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = call i32 (...) @rand_normal_r()
%11 = call i64 @pow(i32 %10, i32 2)
%12 = sitofp i64 %11 to double
%13 = load double, double* %4
%14 = fadd double %13, %12
store double %14, double* %4
br label %15
15: ; preds = %9
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %5
18: ; preds = %5
%19 = load double, double* %4
ret double %19
}

LLVM IR (-O2):
define double @rand_chisq(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %12
3: ; preds = %1, %3
%4 = phi double [ %9, %3 ], [ 0.000000e+00, %1 ]
%5 = phi i32 [ %10, %3 ], [ 0, %1 ]
%6 = tail call i32 (...) @rand_normal_r()
%7 = tail call i64 @pow(i32 %6, i32 2)
%8 = sitofp i64 %7 to double
%9 = fadd double %4, %8
%10 = add nuw nsw i32 %5, 1
%11 = icmp eq i32 %10, %0
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi double [ 0.000000e+00, %1 ], [ %9, %3 ]
ret double %13
}
/* Variables and functions */
long long output_param(char *, int, int, char *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/);
int dump_IO_Request2(char *buffer, int offset, int small) {
  int length;
  length = 4;
  if (small == 0) {
    offset += 16;
  } else {
    offset += 12;
  }
  long long io_type = output_param(buffer, offset, length, "io_type", NULL, 0);
  return io_type;
}


x86 assembly (clang, -O0):
<dump_IO_Request2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1141 <dump_IO_Request2+0x31>
mov    -0xc(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0xc(%rbp)
jmp    114a <dump_IO_Request2+0x3a>
mov    -0xc(%rbp),%eax
add    $0xc,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xea5(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
call   1030 <output_param@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_IO_Request2>:
xor    %eax,%eax
test   %edx,%edx
sete   %al
lea    (%rsi,%rax,4),%esi
add    $0xc,%esi
lea    0xedc(%rip),%rcx
mov    $0x4,%edx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <output_param@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"io_type\00"
define i32 @dump_IO_Request2(i8* %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = select i1 %4, i32 16, i32 12
%6 = add nsw i32 %5, %1
%7 = tail call i64 @output_param(i8* %0, i32 %6, i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32* null, i32 0)
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Variables and functions */
int hitWay(unsigned int);
int updateOnHit(unsigned int, int);
int updateOnMiss(unsigned int);
int whichSet(unsigned int);
int accessCache(unsigned int address) {
  int way, setIndex, r;
  setIndex = whichSet(address);
  way = hitWay(address);
  if (way >= 0) {
    r = updateOnHit(address, way);
  } else {
    r = updateOnMiss(address);
  }
  return r;
}


x86 assembly (clang, -O0):
<accessCache>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <whichSet@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <hitWay@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     117e <accessCache+0x3e>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <updateOnHit@plt>
mov    %eax,-0x10(%rbp)
jmp    1189 <accessCache+0x49>
mov    -0x4(%rbp),%edi
call   1030 <updateOnMiss@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accessCache>:
push   %rbx
mov    %edi,%ebx
call   1060 <whichSet@plt>
mov    %ebx,%edi
call   1040 <hitWay@plt>
mov    %ebx,%edi
test   %eax,%eax
js     115d <accessCache+0x1d>
mov    %eax,%esi
pop    %rbx
jmp    1050 <updateOnHit@plt>
pop    %rbx
jmp    1030 <updateOnMiss@plt>

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

LLVM IR (-O2):
define i32 @accessCache(i32 %0) {
%2 = tail call i32 @whichSet(i32 %0)
%3 = tail call i32 @hitWay(i32 %0)
%4 = icmp sgt i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @updateOnHit(i32 %0, i32 %3)
br label %9
7: ; preds = %1
%8 = tail call i32 @updateOnMiss(i32 %0)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ abort();
double asin(double);
double minus_zero();
int main(void) {
  double x;
  x = minus_zero();
  x = asin(x);
  if (x != 0.0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <minus_zero@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <asin@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1177 <main+0x47>
jp     1177 <main+0x47>
jmp    117e <main+0x4e>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <minus_zero@plt>
call   1040 <asin@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    114d <main+0x1d>
jp     114d <main+0x1d>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call double (...) @minus_zero()
store double %3, double* %2
%4 = load double, double* %2
%5 = call double @asin(double %4)
store double %5, double* %2
%6 = load double, double* %2
%7 = fcmp une double %6, 0.000000e+00
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double (...) @minus_zero()
%2 = tail call double @asin(double %1)
%3 = fcmp une double %2, 0.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}