xunge/DecIR huggingface dataset:
/* Type definitions */
struct genlist {
  int dummy;
};
struct clause_list_link {
  int dummy;
};
struct clause_list {
  int dummy;
};
struct Clause {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_search(struct genlist const *, struct Clause const *);
struct clause_list_link *clause_list_search(const struct clause_list *tthis,
                                            const struct Clause *pfoo) {
  return ((struct clause_list_link *)genlist_search(
      (const struct genlist *)tthis, pfoo));
}


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

x86 assembly (clang, -O2):
<clause_list_search>:
jmp    1030 <genlist_search@plt>

LLVM IR (-O0):
%struct.clause_list_link = type { i32 }
%struct.clause_list = type { i32 }
%struct.Clause = type { i32 }
%struct.genlist = type { i32 }
define %struct.clause_list_link* @clause_list_search(%struct.clause_list* %0, %struct.Clause* %1) {
%3 = alloca %struct.clause_list*
%4 = alloca %struct.Clause*
store %struct.clause_list* %0, %struct.clause_list** %3
store %struct.Clause* %1, %struct.Clause** %4
%5 = load %struct.clause_list*, %struct.clause_list** %3
%6 = bitcast %struct.clause_list* %5 to %struct.genlist*
%7 = load %struct.Clause*, %struct.Clause** %4
%8 = call i64 @genlist_search(%struct.genlist* %6, %struct.Clause* %7)
%9 = inttoptr i64 %8 to %struct.clause_list_link*
ret %struct.clause_list_link* %9
}

LLVM IR (-O2):
%struct.clause_list_link = type { i32 }
%struct.clause_list = type { i32 }
%struct.Clause = type { i32 }
%struct.genlist = type { i32 }
define %struct.clause_list_link* @clause_list_search(%struct.clause_list* %0, %struct.Clause* %1) {
%3 = bitcast %struct.clause_list* %0 to %struct.genlist*
%4 = tail call i64 @genlist_search(%struct.genlist* %3, %struct.Clause* %1)
%5 = inttoptr i64 %4 to %struct.clause_list_link*
ret %struct.clause_list_link* %5
}
/* Variables and functions */
int /*<<< orphan*/ stacktrace_pop();
unsigned char stacktrace_bpop(unsigned char val) {
  stacktrace_pop();
  return val;
}


x86 assembly (clang, -O0):
<stacktrace_bpop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <stacktrace_pop@plt>
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stacktrace_bpop>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <stacktrace_pop@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define zeroext i8 @stacktrace_bpop(i8 returned zeroext %0) {
%2 = tail call i32 (...) @stacktrace_pop()
ret i8 %0
}
/* Variables and functions */
char *getarg(char *, char *);
scalar_t__ isalpha(char);
int /*<<< orphan*/ strcpy(char *, char *);
char *gettyp(char *s, char *t) {
  char *p;
  s = getarg(p = s, t);
  if (isalpha(*t))
    return (s);
  else {
    strcpy(t, "lin");
    return (p);
  }
}


x86 assembly (clang, -O0):
<gettyp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    %rdi,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
call   1040 <getarg@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1050 <isalpha@plt>
cmp    $0x0,%rax
je     1178 <gettyp+0x48>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1190 <gettyp+0x60>
mov    -0x18(%rbp),%rdi
lea    0xe7d(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettyp>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
call   1040 <getarg@plt>
mov    %rax,%r15
movsbl (%rbx),%edi
call   1050 <isalpha@plt>
test   %rax,%rax
je     1155 <gettyp+0x25>
mov    %r15,%r14
jmp    1164 <gettyp+0x34>
lea    0xea4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"lin\00"
define i8* @gettyp(i8* %0, i8* %1) {
%3 = tail call i8* @getarg(i8* %0, i8* %1)
%4 = load i8, i8* %1
%5 = tail call i64 @isalpha(i8 signext %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %2, %7
%10 = phi i8* [ %0, %7 ], [ %3, %2 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xb0() {
  Assert_real((isodigit(176) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              885, ("isodigit should be 0 for 0xb0"));
}


x86 assembly (clang, -O0):
<t_isodigit_0xb0>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x375,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0xb0>:
push   %rax
mov    $0xb0,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x375,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xb0\00"
define void @t_isodigit_0xb0() {
%1 = call i64 @isodigit(i32 176)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 885, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xb0\00"
define void @t_isodigit_0xb0() {
%1 = tail call i64 @isodigit(i32 176)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 885, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ bswap_64(int /*<<< orphan*/);
uint64_t elf64_to_cpu(uint64_t val) { return bswap_64(val); }


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

x86 assembly (clang, -O2):
<elf64_to_cpu>:
jmp    1030 <bswap_64@plt>

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

LLVM IR (-O2):
define i32 @elf64_to_cpu(i32 %0) {
%2 = tail call i32 @bswap_64(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void exit_if_null(void *ptr, char *message) {
  if (ptr == NULL) {
    fprintf(stderr, "[ERROR]: %s\n", message);
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<exit_if_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115e <exit_if_null+0x3e>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xeb1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exit_if_null>:
test   %rdi,%rdi
je     1126 <exit_if_null+0x6>
ret
push   %rax
mov    %rsi,%rdx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [13 x i8] c"[ERROR]: %s\0A\00"
define void @exit_if_null(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 = icmp eq i8* %5, null
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = call i32 @exit(i32 -1)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"[ERROR]: %s\0A\00"
define void @exit_if_null(i8* readnone %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t const);
void *tmalloc(size_t const);
void *tcalloc(const size_t nelem, const size_t elsize) {
  const size_t size = nelem * elsize;
  void *mem = tmalloc(size);
  memset(mem, 0, size);
  return mem;
}


x86 assembly (clang, -O0):
<tcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <tmalloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <tmalloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @tcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = mul i64 %7, %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = call i8* @tmalloc(i64 %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %6
%13 = load i64, i64* %5
%14 = call i32 @memset(i8* %12, i32 0, i64 %13)
%15 = load i8*, i8** %6
ret i8* %15
}

LLVM IR (-O2):
define i8* @tcalloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @tmalloc(i64 %3)
%5 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
ret i8* %4
}
int path_is_sep(int c) { return c == '/'; }


x86 assembly (clang, -O0):
<path_is_sep>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x2f,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_is_sep>:
xor    %eax,%eax
cmp    $0x2f,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @path_is_sep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 47
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @path_is_sep(i32 %0) {
%2 = icmp eq i32 %0, 47
%3 = zext i1 %2 to i32
ret i32 %3
}
void g_list_delete_link() {}


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

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

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

LLVM IR (-O2):
define void @g_list_delete_link() {
ret void
}
unsigned Qval(int intP) {
  unsigned s, qv;
  qv = 0;
  s = 0;
  if (intP & 0x80000000) {
    intP = -intP;
    s = 1;
  }
  if (intP > (65536 / 2)) {
    return 0;
  }
  qv = (intP << 16);
  if (s)
    qv = -qv;
  return qv;
}


x86 assembly (clang, -O0):
<Qval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     1135 <Qval+0x35>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x8000,-0x8(%rbp)
jle    114e <Qval+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    116f <Qval+0x6f>
mov    -0x8(%rbp),%eax
shl    $0x10,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1169 <Qval+0x69>
xor    %eax,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Qval>:
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
mov    %ecx,%eax
shl    $0x10,%eax
mov    %eax,%edx
neg    %edx
test   %edi,%edi
cmovns %eax,%edx
xor    %eax,%eax
cmp    $0x8001,%ecx
cmovl  %edx,%eax
ret

LLVM IR (-O0):
define i32 @Qval(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %5
store i32 0, i32* %4
%6 = load i32, i32* %3
%7 = and i32 %6, -2147483648
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = sub nsw i32 0, %10
store i32 %11, i32* %3
store i32 1, i32* %4
br label %12
12: ; preds = %9, %1
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, 32768
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 0, i32* %2
br label %26
16: ; preds = %12
%17 = load i32, i32* %3
%18 = shl i32 %17, 16
store i32 %18, i32* %5
%19 = load i32, i32* %4
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %16
%22 = load i32, i32* %5
%23 = sub i32 0, %22
store i32 %23, i32* %5
br label %24
24: ; preds = %21, %16
%25 = load i32, i32* %5
store i32 %25, i32* %2
br label %26
26: ; preds = %24, %15
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @Qval(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = sub nsw i32 0, %0
%4 = select i1 %2, i32 %0, i32 %3
%5 = icmp sgt i32 %4, 32768
%6 = shl i32 %4, 16
%7 = sub i32 0, %6
%8 = select i1 %2, i32 %6, i32 %7
%9 = select i1 %5, i32 0, i32 %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ SCNetCheck(int);
void SCNetCheck2(int option) {
  SCNetCheck(option);
  return;
}


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

x86 assembly (clang, -O2):
<SCNetCheck2>:
jmp    1030 <SCNetCheck@plt>

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

LLVM IR (-O2):
define void @SCNetCheck2(i32 %0) {
%2 = tail call i32 @SCNetCheck(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int mcp6x_shutdown(void *spi_data) {
  free(spi_data);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @mcp6x_shutdown(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
int base16(int c) { return c <= 9 ? c + '0' : c - 10 + 'A'; }


x86 assembly (clang, -O0):
<base16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
jg     111f <base16+0x1f>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    112b <base16+0x2b>
mov    -0x4(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base16>:
lea    0x37(%rdi),%ecx
lea    0x30(%rdi),%eax
cmp    $0xa,%edi
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @base16(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = select i1 %2, i32 48, i32 55
%4 = add nsw i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void assert_print_fail() { printf("\nFAIL\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"\0AFAIL\00"
define void @assert_print_fail() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned long strtoull(char const *, char **, int);
unsigned long int strtoul(const char *nptr, char **endptr, int base) {
  return strtoull(nptr, endptr, base);
}


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

x86 assembly (clang, -O2):
<strtoul>:
jmp    1030 <strtoull@plt>

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

LLVM IR (-O2):
define i64 @strtoul(i8* %0, i8** nocapture %1, i32 %2) {
%4 = tail call i64 @strtoull(i8* %0, i8** %1, i32 %2)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int _isatty(int desc) {
  _exit(-1);
  return 0;
}


x86 assembly (clang, -O0):
<_isatty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<_isatty>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @_isatty(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define i32 @_isatty(i32 %0) {
%2 = tail call i32 @_exit(i32 -1)
unreachable
}
int vde_chain_nm4_n_in(void) { return 4; }


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

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

LLVM IR (-O0):
define i32 @vde_chain_nm4_n_in() {
ret i32 4
}

LLVM IR (-O2):
define i32 @vde_chain_nm4_n_in() {
ret i32 4
}
void ff_hevc_put_hevc_uni_pel_pixels64_12_sse4() {}


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

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

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

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

/* Variables and functions */
uint64_t compress64(uint64_t i) {
  const uint64_t Mask1 = (((uint64_t)4) << 42) + (((uint64_t)4) << 21) + 4;
  const uint64_t Mask2 =
      (((uint64_t)65535) << 42) + (((uint64_t)65535) << 21) + 65535;
  const uint64_t Mask3 = (((uint64_t)32) << 42) + (((uint64_t)32) << 21) + 31;
  return Mask1 + (i & Mask2) - ((i >> 16) & Mask3);
}


x86 assembly (clang, -O0):
<compress64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7fe0ffff,%eax
add    $0x800004,%eax
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
and    $0x400001f,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compress64>:
mov    %edi,%eax
and    $0x7fe0ffff,%eax
sar    $0x10,%edi
and    $0x400001f,%edi
sub    %edi,%eax
add    $0x800004,%eax
ret

LLVM IR (-O0):
define i32 @compress64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 poison, i32* %3
store i32 poison, i32* %4
store i32 poison, i32* %5
%6 = load i32, i32* %2
%7 = and i32 %6, 2145452031
%8 = add nsw i32 8388612, %7
%9 = load i32, i32* %2
%10 = ashr i32 %9, 16
%11 = and i32 %10, 67108895
%12 = sub nsw i32 %8, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @compress64(i32 %0) {
%2 = and i32 %0, 2145452031
%3 = add nuw nsw i32 %2, 8388612
%4 = ashr i32 %0, 16
%5 = and i32 %4, 67108895
%6 = sub nsw i32 %3, %5
ret i32 %6
}
int is_bigendian() {
  unsigned char i[sizeof(int)] = {0};
  i[sizeof(int) - 1] = 1;
  int *p = (int *)i;
  return *p == 1;
}


x86 assembly (clang, -O0):
<is_bigendian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
movb   $0x1,-0x1(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_bigendian() {
%1 = alloca [4 x i8]
%2 = alloca i32*
%3 = bitcast [4 x i8]* %1 to i8*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
store i8 1, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %2
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_bigendian() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void yyerror(const char *msg) { fprintf(stderr, "error parsing: %s\n", msg); }


x86 assembly (clang, -O0):
<yyerror>:
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):
<yyerror>:
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 = [19 x i8] c"error parsing: %s\0A\00"
define void @yyerror(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 ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"error parsing: %s\0A\00"
define void @yyerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yas_bma150_msleep(int);
int yas_bma150_read_reg_byte(int);
int /*<<< orphan*/ yas_bma150_write_reg_byte(int, int);
int yas_bma150_power_up(void) {
  yas_bma150_write_reg_byte(
      0x0a, ((yas_bma150_read_reg_byte(0x0a) & ~0x01) | ((0) << 0)));
  yas_bma150_msleep(1);
  return (0);
}


x86 assembly (clang, -O0):
<yas_bma150_power_up>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1050 <yas_bma150_read_reg_byte@plt>
mov    %eax,%esi
and    $0xfffffffe,%esi
or     $0x0,%esi
mov    $0xa,%edi
call   1040 <yas_bma150_write_reg_byte@plt>
mov    $0x1,%edi
call   1030 <yas_bma150_msleep@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_bma150_power_up>:
push   %rax
mov    $0xa,%edi
call   1050 <yas_bma150_read_reg_byte@plt>
and    $0xfffffffe,%eax
mov    $0xa,%edi
mov    %eax,%esi
call   1040 <yas_bma150_write_reg_byte@plt>
mov    $0x1,%edi
call   1030 <yas_bma150_msleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @yas_bma150_power_up() {
%1 = call i32 @yas_bma150_read_reg_byte(i32 10)
%2 = and i32 %1, -2
%3 = or i32 %2, 0
%4 = call i32 @yas_bma150_write_reg_byte(i32 10, i32 %3)
%5 = call i32 @yas_bma150_msleep(i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @yas_bma150_power_up() {
%1 = tail call i32 @yas_bma150_read_reg_byte(i32 10)
%2 = and i32 %1, -2
%3 = tail call i32 @yas_bma150_write_reg_byte(i32 10, i32 %2)
%4 = tail call i32 @yas_bma150_msleep(i32 1)
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i;
  i = __VERIFIER_nondet_int();
  while (i < 0) {
    if (i != -5) {
      i = i + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    114b <main+0x3b>
cmpl   $0xfffffffb,-0x8(%rbp)
je     1146 <main+0x36>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jns    112f <main+0x1f>
nopl   0x0(%rax)
lea    0x1(%rax),%ecx
cmp    $0xfffffffb,%eax
cmove  %eax,%ecx
mov    %ecx,%eax
test   %ecx,%ecx
js     1120 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0, %3
%4 = phi i32 [ %7, %3 ], [ %1, %0 ]
%5 = icmp eq i32 %4, -5
%6 = add nsw i32 %4, 1
%7 = select i1 %5, i32 -5, i32 %6
%8 = icmp slt i32 %7, 0
br i1 %8, label %3, label %9
9: ; preds = %3, %0
ret i32 0
}
void av_aes_ctr_free() {}


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

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

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

LLVM IR (-O2):
define void @av_aes_ctr_free() {
ret void
}
/* Variables and functions */
scalar_t__ RAND_MAX;
double random();
double uniform_distribution(double min, double max) {
  return random() / ((double)RAND_MAX) * (max - min) + min;
}


x86 assembly (clang, -O0):
<uniform_distribution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    0x2eb8(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniform_distribution>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <random@plt>
mov    0x2eba(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @uniform_distribution(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call double (...) @random()
%6 = load i64, i64* @RAND_MAX
%7 = sitofp i64 %6 to double
%8 = fdiv double %5, %7
%9 = load double, double* %4
%10 = load double, double* %3
%11 = fsub double %9, %10
%12 = load double, double* %3
%13 = call double @llvm.fmuladd.f64(double %8, double %11, double %12)
ret double %13
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @uniform_distribution(double %0, double %1) {
%3 = tail call double (...) @random()
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to double
%6 = fdiv double %3, %5
%7 = fsub double %1, %0
%8 = tail call double @llvm.fmuladd.f64(double %6, double %7, double %0)
ret double %8
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _TimerBaseValid(scalar_t__);
void TimerDMAEventSet(uint32_t ui32Base, uint32_t ui32DMAEvent) {
  ASSERT(_TimerBaseValid(ui32Base));
  (*((volatile uint32_t *)(ui32Base + 0x0000006C))) = ui32DMAEvent;
}


x86 assembly (clang, -O0):
<TimerDMAEventSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_TimerBaseValid@plt>
mov    %eax,%edi
call   1030 <ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x6c(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerDMAEventSet>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <_TimerBaseValid@plt>
mov    %eax,%edi
call   1030 <ASSERT@plt>
mov    %r14,0x6c(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @TimerDMAEventSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i32 @_TimerBaseValid(i64 %5)
%7 = call i32 @ASSERT(i32 %6)
%8 = load i64, i64* %4
%9 = load i64, i64* %3
%10 = add nsw i64 %9, 108
%11 = inttoptr i64 %10 to i64*
store volatile i64 %8, i64* %11
ret void
}

LLVM IR (-O2):
define void @TimerDMAEventSet(i64 %0, i64 %1) {
%3 = tail call i32 @_TimerBaseValid(i64 %0)
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i64 %0, 108
%6 = inttoptr i64 %5 to i64*
store volatile i64 %1, i64* %6
ret void
}
void swapArgs(int *a, int *b) {
  int tmp;
  tmp = *a;
  *a = *b;
  *b = tmp;
}


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

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

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

LLVM IR (-O2):
define void @swapArgs(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void output_label(char *label) { printf("%s:\n", label); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s:\0A\00"
define void @output_label(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *progname) {
  printf("Usage: %s <directory-to-watch>\n", progname);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Usage: %s <directory-to-watch>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [32 x i8] c"Usage: %s <directory-to-watch>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
regx0adrreg1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((p0[x0]) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<regx0adrreg1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
movsd  0x21e888(%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     114b <regx0adrreg1+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1152 <regx0adrreg1+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0adrreg1>:
movslq %edi,%rsi
movsd  0x21e888(%rcx),%xmm0
xor    %eax,%eax
ucomisd (%rdx,%rsi,8),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @regx0adrreg1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load double*, double** %12
%15 = load i32, i32* %10
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %14, i64 %16
%18 = load double, double* %17
%19 = load double*, double** %13
%20 = getelementptr inbounds double, double* %19, i64 277777
%21 = load double, double* %20
%22 = fcmp ole double %18, %21
br i1 %22, label %23, label %24
23: ; preds = %6
store i32 1, i32* %7
br label %25
24: ; preds = %6
store i32 0, i32* %7
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @regx0adrreg1(double %0, double %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds double, double* %4, i64 %7
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %5, i64 277777
%11 = load double, double* %10
%12 = fcmp ole double %9, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("hello, world\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"hello, world\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"hello, world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int FUTEX_PRIVATE_FLAG;
int FUTEX_WAIT;
int futex(int *, int, int, struct timespec const *, int /*<<< orphan*/ *,
          int /*<<< orphan*/);
int muggle_futex_wait(int *futex_addr, int val,
                      const struct timespec *timeout) {
  return futex(futex_addr, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, val, timeout, NULL,
               0);
}


x86 assembly (clang, -O0):
<muggle_futex_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
mov    0x2ea1(%rip),%rax
or     (%rax),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
call   1030 <futex@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<muggle_futex_wait>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    0x2ecc(%rip),%rax
mov    0x2eb5(%rip),%rsi
mov    (%rsi),%esi
or     (%rax),%esi
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <futex@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@FUTEX_WAIT = global i32 0
@FUTEX_PRIVATE_FLAG = global i32 0
define i32 @muggle_futex_wait(i32* %0, i32 %1, %struct.timespec* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca %struct.timespec*
store i32* %0, i32** %4
store i32 %1, i32* %5
store %struct.timespec* %2, %struct.timespec** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* @FUTEX_WAIT
%9 = load i32, i32* @FUTEX_PRIVATE_FLAG
%10 = or i32 %8, %9
%11 = load i32, i32* %5
%12 = load %struct.timespec*, %struct.timespec** %6
%13 = call i32 @futex(i32* %7, i32 %10, i32 %11, %struct.timespec* %12, i32* null, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@FUTEX_WAIT = global i32 0
@FUTEX_PRIVATE_FLAG = global i32 0
define i32 @muggle_futex_wait(i32* %0, i32 %1, %struct.timespec* %2) {
%4 = load i32, i32* @FUTEX_WAIT
%5 = load i32, i32* @FUTEX_PRIVATE_FLAG
%6 = or i32 %5, %4
%7 = tail call i32 @futex(i32* %0, i32 %6, i32 %1, %struct.timespec* %2, i32* null, i32 0)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ __ptr_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __mprotect(__ptr_t addr, size_t len, int prot) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__mprotect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mprotect>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__mprotect(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__mprotect(i32 %0, i64 %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *posix_memalign;
int main(int argc, char *argv[]) {
  void *p;
  (void)argc;
  (void)argv;
  p = posix_memalign;
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
@posix_memalign = global i8* null
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load i8*, i8** @posix_memalign
store i8* %9, i8** %6
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@posix_memalign = global i8* null
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exit(i32 0)
unreachable
}
int test3() {
  int a[2];
  a[0] = test3;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @test3() {
%1 = alloca [2 x i32]
%2 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
store i32 ptrtoint (i32 ()* @test3 to i32), i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @test3() {
ret i32 0
}
void glmGenerateScaleMatrix2f(float m[4], const float s[2]) {
  m[0] = s[0];
  m[2] = 0;
  m[1] = 0;
  m[3] = s[1];
}


x86 assembly (clang, -O0):
<glmGenerateScaleMatrix2f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmGenerateScaleMatrix2f>:
movss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
movq   $0x0,0x4(%rdi)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0xc(%rdi)
ret

LLVM IR (-O0):
define void @glmGenerateScaleMatrix2f(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i64 0
store float %7, float* %9
%10 = load float*, float** %3
%11 = getelementptr inbounds float, float* %10, i64 2
store float 0.000000e+00, float* %11
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i64 1
store float 0.000000e+00, float* %13
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float*, float** %3
%18 = getelementptr inbounds float, float* %17, i64 3
store float %16, float* %18
ret void
}

LLVM IR (-O2):
define void @glmGenerateScaleMatrix2f(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
store float %3, float* %0
%4 = getelementptr inbounds float, float* %0, i64 2
store float 0.000000e+00, float* %4
%5 = getelementptr inbounds float, float* %0, i64 1
store float 0.000000e+00, float* %5
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %0, i64 3
store float %7, float* %8
ret void
}
void arithmetic_init_mul(void) { int x = 1 * 1; }


x86 assembly (clang, -O0):
<arithmetic_init_mul>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @arithmetic_init_mul() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void w_free(void *ptr) {
  if (ptr == NULL)
    return;
  free(ptr);
}


x86 assembly (clang, -O0):
<w_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <w_free+0x1c>
jmp    1135 <w_free+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @w_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Type definitions */
struct rtc_time {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ RTC_RD_TIME;
int ioctl(int, int /*<<< orphan*/, struct rtc_time *);
int do_read_time(int fd, struct rtc_time *tm) {
  return ioctl(fd, RTC_RD_TIME, tm);
}


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

x86 assembly (clang, -O2):
<do_read_time>:
mov    %rsi,%rdx
mov    0x2ebe(%rip),%rax
mov    (%rax),%esi
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
%struct.rtc_time = type { i32 }
@RTC_RD_TIME = global i32 0
define i32 @do_read_time(i32 %0, %struct.rtc_time* %1) {
%3 = alloca i32
%4 = alloca %struct.rtc_time*
store i32 %0, i32* %3
store %struct.rtc_time* %1, %struct.rtc_time** %4
%5 = load i32, i32* %3
%6 = load i32, i32* @RTC_RD_TIME
%7 = load %struct.rtc_time*, %struct.rtc_time** %4
%8 = call i32 @ioctl(i32 %5, i32 %6, %struct.rtc_time* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.rtc_time = type { i32 }
@RTC_RD_TIME = global i32 0
define i32 @do_read_time(i32 %0, %struct.rtc_time* %1) {
%3 = load i32, i32* @RTC_RD_TIME
%4 = tail call i32 @ioctl(i32 %0, i32 %3, %struct.rtc_time* %1)
ret i32 %4
}