xunge/DecIR huggingface dataset:
/* Variables and functions */
int sum(int, int);
int main(void) {
  int i = 2;
  int j = 3;
  int a = sum(i, j);
  a++;
  int b = a + 3;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sum(i32 2, i32 3)
ret i32 0
}
/* Variables and functions */
int INT_MAX;
int /*<<< orphan*/ puts(char *);
void doit() {
  int y;
  if (y > INT_MAX)
    puts("y > INT_MAX");
}


x86 assembly (clang, -O0):
<doit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%eax
mov    0x2ec6(%rip),%rcx
cmp    (%rcx),%eax
jle    1136 <doit+0x26>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@INT_MAX = global i32 0
@.str = [12 x i8] c"y > INT_MAX\00"
define void @doit() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = load i32, i32* @INT_MAX
%4 = icmp sgt i32 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@INT_MAX = global i32 0
define void @doit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cglognot();
int /*<<< orphan*/ commit();
int /*<<< orphan*/ gentext();
void genlognot(void) {
  gentext();
  commit();
  cglognot();
}


x86 assembly (clang, -O0):
<genlognot>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gentext@plt>
mov    $0x0,%al
call   1050 <commit@plt>
mov    $0x0,%al
call   1040 <cglognot@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<genlognot>:
push   %rax
xor    %eax,%eax
call   1030 <gentext@plt>
xor    %eax,%eax
call   1050 <commit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <cglognot@plt>

LLVM IR (-O0):
define void @genlognot() {
%1 = call i32 (...) @gentext()
%2 = call i32 (...) @commit()
%3 = call i32 (...) @cglognot()
ret void
}

LLVM IR (-O2):
define void @genlognot() {
%1 = tail call i32 (...) @gentext()
%2 = tail call i32 (...) @commit()
%3 = tail call i32 (...) @cglognot()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printArr(int arr[], int m) {
  for (int i = 0; i < m; i++) {
    printf("%d", arr[i]);
  }
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @printArr(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
int ehnlc_isspace(int c) {
  switch (c) {
  case '\t':
  case '\n':
  case '\v':
  case '\f':
  case '\r':
  case ' ':
    return 8192;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<ehnlc_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff7,%eax
sub    $0x5,%eax
jb     112f <ehnlc_isspace+0x2f>
jmp    111e <ehnlc_isspace+0x1e>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    113b <ehnlc_isspace+0x3b>
jmp    112f <ehnlc_isspace+0x2f>
movl   $0x2000,-0x4(%rbp)
jmp    1142 <ehnlc_isspace+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehnlc_isspace>:
mov    $0x2000,%eax
lea    -0x9(%rdi),%ecx
cmp    $0x5,%ecx
jae    110e <ehnlc_isspace+0xe>
ret
cmp    $0x20,%edi
je     110d <ehnlc_isspace+0xd>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ehnlc_isspace(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 9, label %5
i32 10, label %5
i32 11, label %5
i32 12, label %5
i32 13, label %5
i32 32, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1
store i32 8192, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @ehnlc_isspace(i32 %0) {
switch i32 %0, label %2 [
i32 9, label %3
i32 10, label %3
i32 11, label %3
i32 12, label %3
i32 13, label %3
i32 32, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 8192, %1 ], [ 8192, %1 ], [ 8192, %1 ], [ 8192, %1 ], [ 8192, %1 ], [ 8192, %1 ]
ret i32 %4
}
regx0reg1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((p0[x0]) <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<regx0reg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
movswl -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     1143 <regx0reg1+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <regx0reg1+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0reg1>:
movslq %edx,%rax
movswl (%r8,%rax,2),%ecx
movswl %si,%edx
xor    %eax,%eax
cmp    %ecx,%edx
setge  %al
ret

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

LLVM IR (-O2):
define i32 @regx0reg1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* %4, i64 %7
%9 = load i16, i16* %8
%10 = sext i16 %9 to i32
%11 = shl i32 %1, 16
%12 = ashr exact i32 %11, 16
%13 = icmp sge i32 %12, %10
%14 = zext i1 %13 to i32
ret i32 %14
}
unsigned read_3bytes(char *val) {
  return (*(val + 0) + (*(val + 1) << 8) + (*(val + 2) << 16));
}


x86 assembly (clang, -O0):
<read_3bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_3bytes>:
movsbl (%rdi),%eax
movsbl 0x1(%rdi),%ecx
shl    $0x8,%ecx
add    %eax,%ecx
movsbl 0x2(%rdi),%eax
shl    $0x10,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @read_3bytes(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = add nsw i32 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = shl i32 %16, 16
%18 = add nsw i32 %12, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @read_3bytes(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = shl nsw i32 %6, 8
%8 = add nsw i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = shl nsw i32 %11, 16
%13 = add nsw i32 %8, %12
ret i32 %13
}
/* Variables and functions */
void *dlsym(void *, char const *);
void *getDllProc(void *aLibrary, const char *aProcName) {
  return dlsym(aLibrary, aProcName);
}


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

x86 assembly (clang, -O2):
<getDllProc>:
jmp    1030 <dlsym@plt>

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

LLVM IR (-O2):
define i8* @getDllProc(i8* %0, i8* %1) {
%3 = tail call i8* @dlsym(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ pthread_self();
int /*<<< orphan*/ sleep(int);
void *thread_entry(void *p __attribute__((unused))) {
  printf("pthread_self()=%lu\n", pthread_self());
  sleep(1);
  return NULL;
}


x86 assembly (clang, -O0):
<thread_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_entry>:
push   %rax
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"pthread_self()=%lu\0A\00"
define i8* @thread_entry(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @pthread_self()
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @sleep(i32 1)
ret i8* null
}

LLVM IR (-O2):
@.str = [20 x i8] c"pthread_self()=%lu\0A\00"
define noalias i8* @thread_entry(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @sleep(i32 1)
ret i8* null
}
/* Variables and functions */
double ceil(double);
double c_ceil(double arg0) { return ceil(arg0); }


x86 assembly (clang, -O0):
<c_ceil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ceil@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_ceil>:
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define double @c_ceil(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.ceil.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @c_ceil(double %0) {
%2 = tail call double @llvm.ceil.f64(double %0)
ret double %2
}
/* Variables and functions */
void *cs2qhcb();
void *cs2qhcb_(void) { return cs2qhcb(); }


x86 assembly (clang, -O0):
<cs2qhcb_>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cs2qhcb@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @cs2qhcb_() {
%1 = call i8* (...) @cs2qhcb()
ret i8* %1
}

LLVM IR (-O2):
define i8* @cs2qhcb_() {
%1 = tail call i8* (...) @cs2qhcb()
ret i8* %1
}
extern int __attribute__((always_)) gui_ksys_get_skin_height(void) {
  int value;
  __asm__ __volatile__("int $0x40" : "=a"(value) : "a"(48), "b"(4));
  return (value);
}


x86 assembly (clang, -O0):
<gui_ksys_get_skin_height>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    $0x30,%eax
mov    $0x4,%ebx
int    $0x40
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_ksys_get_skin_height>:
push   %rbx
mov    $0x30,%eax
mov    $0x4,%ebx
int    $0x40
pop    %rbx
ret

LLVM IR (-O0):
define i32 @gui_ksys_get_skin_height() {
%1 = alloca i32
%2 = call i32 asm sideeffect "int $$0x40", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 48, i32 4)
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gui_ksys_get_skin_height() {
%1 = tail call i32 asm sideeffect "int $$0x40", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 48, i32 4)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ __nvvm_bar_sync(int /*<<< orphan*/);
__attribute__((device)) void sync() { __nvvm_bar_sync(0); }


x86 assembly (clang, -O0):
<sync>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <__nvvm_bar_sync@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync>:
xor    %edi,%edi
jmp    1030 <__nvvm_bar_sync@plt>

LLVM IR (-O0):
define void @sync() {
%1 = call i32 @__nvvm_bar_sync(i32 0)
ret void
}

LLVM IR (-O2):
define void @sync() {
%1 = tail call i32 @__nvvm_bar_sync(i32 0)
ret void
}
void x002_fun_b() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @x002_fun_b() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sanitize_str(char *);
char *strdup(char *);
void load_str(char **str, char *value) {
  if (value) {
    sanitize_str(value);
    *str = strdup(value);
  } else {
    *str = strdup("");
  }
}


x86 assembly (clang, -O0):
<load_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115c <load_str+0x3c>
mov    -0x10(%rbp),%rdi
call   1030 <sanitize_str@plt>
mov    -0x10(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1172 <load_str+0x52>
lea    0xe9d(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_str>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rsi,%rsi
je     113c <load_str+0x1c>
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1030 <sanitize_str@plt>
mov    %rbx,%rdi
jmp    1143 <load_str+0x23>
lea    0xebd(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @load_str(i8** nocapture writeonly %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @sanitize_str(i8* %1)
%6 = tail call i8* @strdup(i8* %1)
br label %9
7: ; preds = %2
%8 = tail call dereferenceable_or_null(1) i8* @strdup(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
%10 = phi i8* [ %8, %7 ], [ %6, %4 ]
store i8* %10, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wprintf(char *);
int main(int argc, char **argv) {
  wprintf(L"hello world\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <wprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i32] [i32 104, i32 101, i32 108, i32 108, i32 111, i32 32, i32 119, i32 111, i32 114, i32 108, i32 100, i32 10, i32 0]
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 @wprintf(i8* bitcast ([13 x i32]* @.str to i8*))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i32] [i32 104, i32 101, i32 108, i32 108, i32 111, i32 32, i32 119, i32 111, i32 114, i32 108, i32 100, i32 10, i32 0]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @wprintf(i8* bitcast ([13 x i32]* @.str to i8*))
ret i32 0
}
/* Variables and functions */
int exponent(double);
scalar_t__ mantissa(double);
int isnan(double d) {
  return exponent(d) == (0x7ffull << 52) && mantissa(d) != 0;
}


x86 assembly (clang, -O0):
<isnan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exponent@plt>
movslq %eax,%rcx
xor    %eax,%eax
movabs $0x7ff0000000000000,%rdx
cmp    %rdx,%rcx
mov    %al,-0x9(%rbp)
jne    1166 <isnan+0x46>
movsd  -0x8(%rbp),%xmm0
call   1040 <mantissa@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isnan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @exponent(double %3)
%5 = sext i32 %4 to i64
%6 = icmp eq i64 %5, 9218868437227405312
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load double, double* %2
%9 = call i64 @mantissa(double %8)
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %7, %1
%12 = phi i1 [ false, %1 ], [ %10, %7 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @isnan(double %0) {
%2 = tail call i32 @exponent(double %0)
ret i32 0
}
unsigned random(unsigned x) { return (x * 16807) % ((2 << 31) - 1); }


x86 assembly (clang, -O0):
<random>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x41a7,-0x4(%rbp),%eax
mov    $0xffffffff,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<random>:
imul   $0x41a7,%edi,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @random(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 16807
%5 = urem i32 %4, -1
ret i32 %5
}

LLVM IR (-O2):
define i32 @random(i32 %0) {
%2 = mul i32 %0, 16807
%3 = icmp eq i32 %2, -1
%4 = select i1 %3, i32 0, i32 %2
ret i32 %4
}
/* Variables and functions */
int __nv_ilogbf(float);
int ilogbf(float __a) { return __nv_ilogbf(__a); }


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

x86 assembly (clang, -O2):
<ilogbf>:
jmp    1030 <__nv_ilogbf@plt>

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

LLVM IR (-O2):
define i32 @ilogbf(float %0) {
%2 = tail call i32 @__nv_ilogbf(float %0)
ret i32 %2
}
/* Variables and functions */
int core3_safe(char const *);
int U_EMRSETSTRETCHBLTMODE_safe(const char *record) {
  return (core3_safe(record));
}


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

x86 assembly (clang, -O2):
<U_EMRSETSTRETCHBLTMODE_safe>:
jmp    1030 <core3_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSETSTRETCHBLTMODE_safe(i8* %0) {
%2 = tail call i32 @core3_safe(i8* %0)
ret i32 %2
}
/* Variables and functions */
int strcmp(char const *, char const *);
int _tcscmp(const char *str1, const char *str2) { return strcmp(str1, str2); }


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

x86 assembly (clang, -O2):
<_tcscmp>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @_tcscmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void clearBuf(char *buffer, int len) { memset(buffer, 0, len); }


x86 assembly (clang, -O0):
<clearBuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearBuf>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @clearBuf(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vec_free(char *);
void str_free(char *str) { vec_free(str); }


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

x86 assembly (clang, -O2):
<str_free>:
jmp    1030 <vec_free@plt>

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

LLVM IR (-O2):
define void @str_free(i8* %0) {
%2 = tail call i32 @vec_free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __ftruncate(int fd, off_t length) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__ftruncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ftruncate>:
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 @__ftruncate(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__ftruncate(i32 %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC_COARSE;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
void stamp_now(struct timespec *s) { clock_gettime(CLOCK_MONOTONIC_COARSE, s); }


x86 assembly (clang, -O0):
<stamp_now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stamp_now>:
mov    %rdi,%rsi
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
jmp    1030 <clock_gettime@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC_COARSE = global i32 0
define void @stamp_now(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load i32, i32* @CLOCK_MONOTONIC_COARSE
%4 = load %struct.timespec*, %struct.timespec** %2
%5 = call i32 @clock_gettime(i32 %3, %struct.timespec* %4)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC_COARSE = global i32 0
define void @stamp_now(%struct.timespec* %0) {
%2 = load i32, i32* @CLOCK_MONOTONIC_COARSE
%3 = tail call i32 @clock_gettime(i32 %2, %struct.timespec* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
void scan_l(char *result_l, int *printed) {
  read(0, result_l, 1024);
  (*printed)++;
}


x86 assembly (clang, -O0):
<scan_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
mov    $0x400,%edx
call   1030 <read@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_l>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
xor    %edi,%edi
mov    $0x400,%edx
call   1030 <read@plt>
addl   $0x1,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @scan_l(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = call i32 @read(i32 0, i8* %5, i32 1024)
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 1
store i32 %9, i32* %7
ret void
}

LLVM IR (-O2):
define void @scan_l(i8* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @read(i32 0, i8* %0, i32 1024)
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
ret void
}
void stop_timer_1(void) {
  (*(volatile unsigned int *)(0x7F006008)) &= ~(1 << 8);
  return;
}


x86 assembly (clang, -O0):
<stop_timer_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f006008,%eax
mov    (%rax),%ecx
and    $0xfffffeff,%ecx
mov    $0x7f006008,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_timer_1>:
andl   $0xfffffeff,0x7f006008
ff fe ff ff
ret

LLVM IR (-O0):
define void @stop_timer_1() {
%1 = load volatile i32, i32* inttoptr (i64 2130731016 to i32*)
%2 = and i32 %1, -257
store volatile i32 %2, i32* inttoptr (i64 2130731016 to i32*)
ret void
}

LLVM IR (-O2):
define void @stop_timer_1() {
%1 = load volatile i32, i32* inttoptr (i64 2130731016 to i32*)
%2 = and i32 %1, -257
store volatile i32 %2, i32* inttoptr (i64 2130731016 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void mark2() { printf("inside mark2\n"); }


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"inside mark2\00"
define void @mark2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ malloc(int);
void fun() { malloc(1000); }


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e8,%edi
call   1030 <malloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
mov    $0x3e8,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define void @fun() {
%1 = call i32 @malloc(i32 1000)
ret void
}

LLVM IR (-O2):
define void @fun() {
%1 = tail call i32 @malloc(i32 1000)
ret void
}
/* Variables and functions */
scalar_t__ __VERIFIER_nondet_int();
int main_test() {
  int x = 0;
  int y = 0;
  int z = 0;
  int w = 0;
  while (__VERIFIER_nondet_int()) {
    if (1) {
      x++;
      y = y + 100;
    } else if (__VERIFIER_nondet_int()) {
      if (x >= 4) {
        x = x + 1;
        y = y + 1;
      }
    } else if (y > 10 * w)
      if (z >= 100 * x) {
        y = -y;
      }
    w = w + 1;
    z = z + 10;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     116e <main_test+0x5e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x64,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <main_test+0x24>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_test>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %rax,%rax
jne    1120 <main_test+0x10>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main_test() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @__VERIFIER_nondet_int()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
ret i32 1
}
/* Variables and functions */
int fsync(int);
__attribute__((__weak__, __always___)) int softboundmpx_fsync(int fd) {
  return fsync(fd);
}


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

x86 assembly (clang, -O2):
<softboundmpx_fsync>:
jmp    1030 <fsync@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_fsync(i32 %0) {
%2 = tail call i32 @fsync(i32 %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ strcasecmp(char const *, char const *);
unsigned MATCHESZ(const char *lhs, const char *rhs) {
  return strcasecmp(lhs, rhs) == 0;
}


x86 assembly (clang, -O0):
<MATCHESZ>:
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 <strcasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MATCHESZ>:
push   %rax
call   1030 <strcasecmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @MATCHESZ(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcasecmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @MATCHESZ(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strcasecmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i;
  int a[] = {1, 2, 3};
  int n = sizeof(a) / sizeof(int);
  for (i = 0; i <= n; i++)
    printf("a[%d]=%d\n", i, a[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x14(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0xc(%rbp)
movl   $0x3,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1172 <main+0x62>
mov    -0x8(%rbp),%esi
movslq -0x8(%rbp),%rax
mov    -0x14(%rbp,%rax,4),%edx
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <main+0x31>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"a[%d]=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 3, i32 undef)
ret i32 0
}
/* Variables and functions */
char *string_commas_dollar(double);
char *string_commas_money(double d) { return string_commas_dollar(d); }


x86 assembly (clang, -O0):
<string_commas_money>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <string_commas_dollar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_commas_money>:
jmp    1030 <string_commas_dollar@plt>

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

LLVM IR (-O2):
define i8* @string_commas_money(double %0) {
%2 = tail call i8* @string_commas_dollar(double %0)
ret i8* %2
}
/* Type definitions */
struct DSHashMap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ds_hashmap_put_str(struct DSHashMap *, char *, void *);
void ds_puts(struct DSHashMap *hash, char *key, void *data) {
  ds_hashmap_put_str(hash, key, data);
}


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

x86 assembly (clang, -O2):
<ds_puts>:
jmp    1030 <ds_hashmap_put_str@plt>

LLVM IR (-O0):
%struct.DSHashMap = type { i32 }
define void @ds_puts(%struct.DSHashMap* %0, i8* %1, i8* %2) {
%4 = alloca %struct.DSHashMap*
%5 = alloca i8*
%6 = alloca i8*
store %struct.DSHashMap* %0, %struct.DSHashMap** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.DSHashMap*, %struct.DSHashMap** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @ds_hashmap_put_str(%struct.DSHashMap* %7, i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
%struct.DSHashMap = type { i32 }
define void @ds_puts(%struct.DSHashMap* %0, i8* %1, i8* %2) {
%4 = tail call i32 @ds_hashmap_put_str(%struct.DSHashMap* %0, i8* %1, i8* %2)
ret void
}
void __attribute__((weak)) _or1k_board_init(void) { return; }


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

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

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

LLVM IR (-O2):
define weak void @_or1k_board_init() {
ret void
}
void ff_hevc_put_hevc_bi_qpel_hv64_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv64_10_avx2() {
ret void
}
/* Variables and functions */
long double floorl(long double);
long double libm_floorl(long double x) { return floorl(x); }


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

x86 assembly (clang, -O2):
<libm_floorl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <floorl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @libm_floorl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @llvm.floor.f80(x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @libm_floorl(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.floor.f80(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
bool ST32_DIV_OVFCHK(unsigned int a, unsigned int b) {
  return (!b || (a == 0x80000000U && b == 0xFFFFFFFFU));
}


x86 assembly (clang, -O0):
<ST32_DIV_OVFCHK>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     113b <ST32_DIV_OVFCHK+0x3b>
xor    %eax,%eax
cmpl   $0x80000000,-0x4(%rbp)
mov    %al,-0xa(%rbp)
jne    1135 <ST32_DIV_OVFCHK+0x35>
cmpl   $0xffffffff,-0x8(%rbp)
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ST32_DIV_OVFCHK>:
test   %esi,%esi
sete   %al
xor    $0x80000000,%edi
not    %esi
or     %edi,%esi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ST32_DIV_OVFCHK(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, -2147483648
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, -1
br label %13
13: ; preds = %10, %7
%14 = phi i1 [ false, %7 ], [ %12, %10 ]
br label %15
15: ; preds = %13, %2
%16 = phi i1 [ true, %2 ], [ %14, %13 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @ST32_DIV_OVFCHK(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = icmp eq i32 %0, -2147483648
%5 = icmp eq i32 %1, -1
%6 = and i1 %4, %5
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_lseek;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int, int /*<<< orphan*/, int);
__attribute__((always_)) off_t _syscall_lseek(int fd, off_t offset,
                                              int whence) {
  return syscall(__NR_lseek, fd, offset, whence);
}


x86 assembly (clang, -O0):
<_syscall_lseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_lseek>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_lseek = global i32 0
define i32 @_syscall_lseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @__NR_lseek
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @syscall(i32 %7, i32 %8, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@__NR_lseek = global i32 0
define i32 @_syscall_lseek(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @__NR_lseek
%5 = tail call i32 @syscall(i32 %4, i32 %0, i32 %1, i32 %2)
ret i32 %5
}
/* Type definitions */
struct dentry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __fist_print_dentry(char const *, struct dentry const *,
                                       int);
void fist_print_dentry(const char *str, const struct dentry *dentry) {
  __fist_print_dentry(str, dentry, 1);
}


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

x86 assembly (clang, -O2):
<fist_print_dentry>:
mov    $0x1,%edx
jmp    1030 <__fist_print_dentry@plt>

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

LLVM IR (-O2):
%struct.dentry = type { i32 }
define void @fist_print_dentry(i8* %0, %struct.dentry* %1) {
%3 = tail call i32 @__fist_print_dentry(i8* %0, %struct.dentry* %1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MI_log_pkg_error2(int, char *);
void MI2_log_pkg_error2(int p1, char *p2) { MI_log_pkg_error2(p1, p2); }


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

x86 assembly (clang, -O2):
<MI2_log_pkg_error2>:
jmp    1030 <MI_log_pkg_error2@plt>

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

LLVM IR (-O2):
define void @MI2_log_pkg_error2(i32 %0, i8* %1) {
%3 = tail call i32 @MI_log_pkg_error2(i32 %0, i8* %1)
ret void
}
/* Type definitions */
struct timer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fc_usleep(long);
void usleep_since_timer_start(struct timer *t, long usec) { fc_usleep(usec); }


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

x86 assembly (clang, -O2):
<usleep_since_timer_start>:
mov    %rsi,%rdi
jmp    1030 <fc_usleep@plt>

LLVM IR (-O0):
%struct.timer = type { i32 }
define void @usleep_since_timer_start(%struct.timer* %0, i64 %1) {
%3 = alloca %struct.timer*
%4 = alloca i64
store %struct.timer* %0, %struct.timer** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i32 @fc_usleep(i64 %5)
ret void
}

LLVM IR (-O2):
%struct.timer = type { i32 }
define void @usleep_since_timer_start(%struct.timer* nocapture readnone %0, i64 %1) {
%3 = tail call i32 @fc_usleep(i64 %1)
ret void
}
/* Variables and functions */
double rndint(double, int, int /*<<< orphan*/);
double nearbyint(double x) { return rndint(x, 0x0020, ~0); }


x86 assembly (clang, -O0):
<nearbyint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x20,%edi
mov    $0xffffffff,%esi
call   1030 <rndint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nearbyint>:
mov    $0x20,%edi
mov    $0xffffffff,%esi
jmp    1030 <rndint@plt>

LLVM IR (-O0):
define double @nearbyint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @rndint(double %3, i32 32, i32 -1)
ret double %4
}

LLVM IR (-O2):
define double @nearbyint(double %0) {
%2 = tail call double @rndint(double %0, i32 32, i32 -1)
ret double %2
}