xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void multipli(int n, int m) {
  for (int i = 1; i <= n; i++) {
    if (i % m == 0) {
      printf("%d\n", i);
    }
  }
}


x86 assembly (clang, -O0):
<multipli>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1163 <multipli+0x53>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1150 <multipli+0x40>
mov    -0xc(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
jmp    1155 <multipli+0x45>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <multipli+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multipli>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    1158 <multipli+0x48>
mov    %esi,%r15d
mov    %edi,%ebx
neg    %ebx
mov    $0x1,%ebp
lea    0xed2(%rip),%r14
jmp    1142 <multipli+0x32>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
je     1158 <multipli+0x48>
mov    %ebp,%eax
cltd
idiv   %r15d
test   %edx,%edx
jne    1130 <multipli+0x20>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
jmp    1130 <multipli+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @multipli(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 1, i32* %5
br label %6
6: ; preds = %19, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %22
10: ; preds = %6
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = srem i32 %11, %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %10
%16 = load i32, i32* %5
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15, %10
br label %19
19: ; preds = %18
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @multipli(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 1
br i1 %3, label %4, label %5
4: ; preds = %11, %2
ret void
5: ; preds = %2, %11
%6 = phi i32 [ %12, %11 ], [ 1, %2 ]
%7 = srem i32 %6, %1
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %11
11: ; preds = %5, %9
%12 = add nuw i32 %6, 1
%13 = icmp eq i32 %6, %0
br i1 %13, label %4, label %5
}
void gdk_drag_find_window_for_screen() {}


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

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

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

LLVM IR (-O2):
define void @gdk_drag_find_window_for_screen() {
ret void
}
/* Type definitions */
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
};

/* Variables and functions */
int /*<<< orphan*/ inet_ntoa(int /*<<< orphan*/);
int /*<<< orphan*/ strncmp(int /*<<< orphan*/, char *, int);
int acctservd_validateAddr(struct sockaddr_in addr) {
  if (!strncmp(inet_ntoa(addr.sin_addr), "206.17.", 7))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<acctservd_validateAddr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <inet_ntoa@plt>
mov    %eax,%edi
lea    0xec4(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    115b <acctservd_validateAddr+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1162 <acctservd_validateAddr+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acctservd_validateAddr>:
push   %rax
call   1040 <inet_ntoa@plt>
lea    0xed3(%rip),%rsi
mov    %eax,%edi
mov    $0x7,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
@.str = [8 x i8] c"206.17.\00"
define i32 @acctservd_validateAddr(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_in
%4 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i32 0, i32 0
store i32 %0, i32* %4
%5 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @inet_ntoa(i32 %6)
%8 = call i32 @strncmp(i32 %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %1
store i32 1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@.str = [8 x i8] c"206.17.\00"
define i32 @acctservd_validateAddr(i32 %0) {
%2 = tail call i32 @inet_ntoa(i32 %0)
%3 = tail call i32 @strncmp(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void firstfunction(void *source, void *dest, int size) {}


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

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

LLVM IR (-O0):
define void @firstfunction(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
ret void
}

LLVM IR (-O2):
define void @firstfunction(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
int test_imm_45uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x45 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_45uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0x45,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_45uint64_highword_reg>:
movabs $0x4500000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_45uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 69
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_45uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 296352743424
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int g(int /*<<< orphan*/);
int h(int w) { return g(f(w)); }


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

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

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

LLVM IR (-O2):
define i32 @h(i32 %0) {
%2 = tail call i32 @f(i32 %0)
%3 = tail call i32 @g(i32 %2)
ret i32 %3
}
/* Variables and functions */
int doc_main(int, char **);
int main(int argc, char **argv) { return doc_main(argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <doc_main@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @doc_main(i32 %0, i8** %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
size_t fmt_s32_dfp(char *, int /*<<< orphan*/, unsigned int);
size_t fmt_s16_dfp(char *out, int16_t val, unsigned fp_digits) {
  return fmt_s32_dfp(out, val, fp_digits);
}


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

x86 assembly (clang, -O2):
<fmt_s16_dfp>:
jmp    1030 <fmt_s32_dfp@plt>

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

LLVM IR (-O2):
define i64 @fmt_s16_dfp(i8* %0, i32 %1, i32 %2) {
%4 = tail call i64 @fmt_s32_dfp(i8* %0, i32 %1, i32 %2)
ret i64 %4
}
/* Variables and functions */
scalar_t__ isspace(int);
void strskp(char **str) {
  char *s;
  if (!str) {
    return;
  }
  s = *str;
  while (isspace((int)*s)) {
    s++;
  }
  *str = s;
}


x86 assembly (clang, -O0):
<strskp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <strskp+0x1c>
jmp    1169 <strskp+0x59>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     115e <strskp+0x4e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <strskp+0x27>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strskp>:
test   %rdi,%rdi
je     114c <strskp+0x3c>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rbx
add    $0xffffffffffffffff,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1130 <strskp+0x20>
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @strskp(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
br label %5
5: ; preds = %5, %3
%6 = phi i8* [ %4, %3 ], [ %11, %5 ]
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = tail call i64 @isspace(i32 %8)
%10 = icmp eq i64 %9, 0
%11 = getelementptr inbounds i8, i8* %6, i64 1
br i1 %10, label %12, label %5
12: ; preds = %5
store i8* %6, i8** %0
br label %13
13: ; preds = %1, %12
ret void
}
int fun985() { return 985; }


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

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

LLVM IR (-O0):
define i32 @fun985() {
ret i32 985
}

LLVM IR (-O2):
define i32 @fun985() {
ret i32 985
}
/* Variables and functions */
char *dcgettext(char const *, char const *, int);
const char *pgettext_aux(const char *domain, const char *msg_ctxt_id,
                         const char *msgid, int category) {
  const char *translation = dcgettext(domain, msg_ctxt_id, category);
  if (translation == msg_ctxt_id)
    return msgid;
  else
    return translation;
}


x86 assembly (clang, -O0):
<pgettext_aux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1030 <dcgettext@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1156 <pgettext_aux+0x46>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115e <pgettext_aux+0x4e>
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pgettext_aux>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %ecx,%edx
call   1030 <dcgettext@plt>
cmp    %rbx,%rax
cmove  %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @pgettext_aux(i8* %0, i8* %1, i8* readnone %2, i32 %3) {
%5 = tail call i8* @dcgettext(i8* %0, i8* %1, i32 %3)
%6 = icmp eq i8* %5, %1
%7 = select i1 %6, i8* %2, i8* %5
ret i8* %7
}
int main(int argc, char *argv[]) {
  int count = 0;
  while (false() || count < -123)
    ++count;
  if (count)
    _exit(-1);
  _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)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1040 <false@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
jne    115e <main+0x3e>
cmpl   $0xffffff85,-0x14(%rbp)
setl   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    116e <main+0x4e>
jmp    117c <main+0x5c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
cmpl   $0x0,-0x14(%rbp)
je     1190 <main+0x70>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <false@plt>
add    $0xffffffff,%ebx
test   %eax,%eax
jne    1130 <main+0x10>
test   %ebx,%ebx
jne    1149 <main+0x29>
xor    %edi,%edi
call   1030 <_exit@plt>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %15, %2
%8 = call i32 (...) @false()
%9 = icmp ne i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = load i32, i32* %6
%12 = icmp slt i32 %11, -123
br label %13
13: ; preds = %10, %7
%14 = phi i1 [ true, %7 ], [ %12, %10 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
br label %7
18: ; preds = %13
%19 = load i32, i32* %6
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %18
unreachable
22: ; preds = %18
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 0, %2 ], [ %7, %3 ]
%5 = tail call i32 (...) @false()
%6 = icmp eq i32 %5, 0
%7 = add nuw nsw i32 %4, 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = icmp eq i32 %4, 0
br i1 %9, label %11, label %10
10: ; preds = %8
tail call void @_exit(i32 -1)
unreachable
11: ; preds = %8
tail call void @_exit(i32 0)
unreachable
}
int strcmp(const char *p, const char *q) {
  while (*p && *p == *q)
    p++, q++;
  return (int)((unsigned char)*p - (unsigned char)*q);
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1137 <strcmp+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <strcmp+0x47>
jmp    1164 <strcmp+0x64>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <strcmp+0xc>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
mov    (%rdi),%al
test   %al,%al
je     1123 <strcmp+0x23>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
cmp    (%rsi),%al
jne    1125 <strcmp+0x25>
add    $0x1,%rsi
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <strcmp+0x10>
xor    %eax,%eax
movzbl %al,%eax
movzbl (%rsi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %20, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %13, %16
br label %18
18: ; preds = %10, %5
%19 = phi i1 [ false, %5 ], [ %17, %10 ]
br i1 %19, label %20, label %25
20: ; preds = %18
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %4
br label %5
25: ; preds = %18
%26 = load i8*, i8** %3
%27 = load i8, i8* %26
%28 = zext i8 %27 to i32
%29 = load i8*, i8** %4
%30 = load i8, i8* %29
%31 = zext i8 %30 to i32
%32 = sub nsw i32 %28, %31
ret i32 %32
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %11
%6 = phi i8 [ %14, %11 ], [ %3, %2 ]
%7 = phi i8* [ %13, %11 ], [ %1, %2 ]
%8 = phi i8* [ %12, %11 ], [ %0, %2 ]
%9 = load i8, i8* %7
%10 = icmp eq i8 %6, %9
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = load i8, i8* %12
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %11, %2
%17 = phi i8* [ %1, %2 ], [ %13, %11 ], [ %7, %5 ]
%18 = phi i8 [ 0, %2 ], [ 0, %11 ], [ %6, %5 ]
%19 = zext i8 %18 to i32
%20 = load i8, i8* %17
%21 = zext i8 %20 to i32
%22 = sub nsw i32 %19, %21
ret i32 %22
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Payoneer() {
  printf("This module is on development process.Please try again later.");
}


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

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

LLVM IR (-O0):
@.str = [62 x i8] c"This module is on development process.Please try again later.\00"
define void @Payoneer() {
%1 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [62 x i8] c"This module is on development process.Please try again later.\00"
define void @Payoneer() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret void
}
int dec_bin(int n) {
  int rem;
  int i = 1;
  int binary = 0;
  while (n != 0) {
    rem = n % 2;
    n /= 2;
    binary += rem * i;
    i *= 10;
  }
  return binary;
}


x86 assembly (clang, -O0):
<dec_bin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1154 <dec_bin+0x54>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <dec_bin+0x15>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec_bin>:
test   %edi,%edi
je     113a <dec_bin+0x3a>
mov    $0x1,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
shr    $0x1f,%edx
add    %edi,%edx
mov    %edx,%r8d
sar    %r8d
and    $0xfffffffe,%edx
mov    %edi,%esi
sub    %edx,%esi
imul   %ecx,%esi
add    %esi,%eax
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
add    $0x1,%edi
cmp    $0x2,%edi
mov    %r8d,%edi
ja     1110 <dec_bin+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @dec_bin(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %9, %1
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %21
9: ; preds = %6
%10 = load i32, i32* %2
%11 = srem i32 %10, 2
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = sdiv i32 %12, 2
store i32 %13, i32* %2
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = mul nsw i32 %14, %15
%17 = load i32, i32* %5
%18 = add nsw i32 %17, %16
store i32 %18, i32* %5
%19 = load i32, i32* %4
%20 = mul nsw i32 %19, 10
store i32 %20, i32* %4
br label %6
21: ; preds = %6
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
define i32 @dec_bin(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %10, %3 ], [ 0, %1 ]
%5 = phi i32 [ %11, %3 ], [ 1, %1 ]
%6 = phi i32 [ %8, %3 ], [ %0, %1 ]
%7 = srem i32 %6, 2
%8 = sdiv i32 %6, 2
%9 = mul nsw i32 %7, %5
%10 = add nsw i32 %4, %9
%11 = mul nsw i32 %5, 10
%12 = add i32 %6, 1
%13 = icmp ult i32 %12, 3
br i1 %13, label %14, label %3
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %10, %3 ]
ret i32 %15
}
void db_lock(unsigned char *lock) {
  char expected = 0;
  while (!__atomic_compare_exchange_1(lock, &expected, -1, 0, 0, 0)) {
    expected = 0;
  }
}


x86 assembly (clang, -O0):
<db_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x9(%rbp),%rsi
mov    $0xffffffff,%edx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    $0x0,%al
call   1030 <__atomic_compare_exchange_1@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1152 <db_lock+0x42>
jmp    115b <db_lock+0x4b>
movb   $0x0,-0x9(%rbp)
jmp    1120 <db_lock+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_lock>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x7(%rsp),%r14
nopl   0x0(%rax)
movb   $0x0,0x7(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xffffffff,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
call   1030 <__atomic_compare_exchange_1@plt>
test   %eax,%eax
je     1120 <db_lock+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @db_lock(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
store i8 0, i8* %3
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %2
%6 = call i32 (i8*, i8*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @__atomic_compare_exchange_1 to i32 (i8*, i8*, i32, i32, i32, i32, ...)*)(i8* %5, i8* %3, i32 -1, i32 0, i32 0, i32 0)
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %9, label %10
9: ; preds = %4
store i8 0, i8* %3
br label %4
10: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @db_lock(i8* %0) {
%2 = alloca i8
br label %3
3: ; preds = %3, %1
store i8 0, i8* %2
%4 = call i32 (i8*, i8*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @__atomic_compare_exchange_1 to i32 (i8*, i8*, i32, i32, i32, i32, ...)*)(i8* %0, i8* %2, i32 -1, i32 0, i32 0, i32 0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %3, label %6
6: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ADD_MALLOC(int /*<<< orphan*/);
char *strdup(char const *);
int /*<<< orphan*/ strlen(char const *);
char *zzstrdup(const char *p) {
  if (!p) {
    return 0;
  }
  ADD_MALLOC(strlen(p));
  return strdup(p);
}


x86 assembly (clang, -O0):
<zzstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <zzstrdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1171 <zzstrdup+0x41>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
call   1030 <ADD_MALLOC@plt>
mov    -0x10(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zzstrdup>:
test   %rdi,%rdi
je     114e <zzstrdup+0x1e>
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%edi
call   1030 <ADD_MALLOC@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <strdup@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @zzstrdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @ADD_MALLOC(i32 %4)
%6 = tail call i8* @strdup(i8* %0)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello, ARM!\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 = [13 x i8] c"Hello, ARM!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello, ARM!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void os_set_save_ext(const char *ext) {}


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

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

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

LLVM IR (-O2):
define void @os_set_save_ext(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ callmealias();
void b() { callmealias(); }


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

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

LLVM IR (-O0):
define void @b() {
%1 = call i32 (...) @callmealias()
ret void
}

LLVM IR (-O2):
define void @b() {
%1 = tail call i32 (...) @callmealias()
ret void
}
/* Variables and functions */
void *calloc(size_t, int);
void *malloc0(size_t size) {
  if (size == 0)
    return NULL;
  return calloc(size, 1);
}


x86 assembly (clang, -O0):
<malloc0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <malloc0+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1146 <malloc0+0x36>
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc0>:
test   %rdi,%rdi
je     111f <malloc0+0xf>
mov    $0x1,%esi
jmp    1030 <calloc@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @malloc0(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @calloc(i64 %0, i32 1)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ EIO;
int /*<<< orphan*/ errno;
int unlink(char *path) {
  (void)path;
  errno = EIO;
  return (-1);
}


x86 assembly (clang, -O0):
<unlink>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed1(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlink>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EIO = global i32 0
@errno = global i32 0
define i32 @unlink(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @EIO
store i32 %4, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EIO = global i32 0
@errno = global i32 0
define i32 @unlink(i8* nocapture readnone %0) {
%2 = load i32, i32* @EIO
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ X_OK;
int access(char *, int /*<<< orphan*/);
int canx(char *filename) { return access(filename, X_OK) == true; }


x86 assembly (clang, -O0):
<canx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<canx>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@X_OK = global i32 0
define i32 @canx(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @X_OK
%5 = call i32 @access(i8* %3, i32 %4)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@X_OK = global i32 0
define i32 @canx(i8* nocapture %0) {
%2 = load i32, i32* @X_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, size_t, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
void *malloc(size_t);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void *xmalloc(size_t size, const char *name) {
  void *buf;
  buf = malloc(size);
  if (!buf) {
    die("Cannot malloc %ld bytes to hold %s: %s\n", size + 0UL, name,
        strerror(errno));
  }
  return buf;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1190 <xmalloc+0x60>
mov    -0x8(%rbp),%rax
add    $0x0,%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
lea    0xe75(%rip),%rdi
call   1040 <die@plt>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    116a <xmalloc+0x3a>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xea3(%rip),%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %eax,%ecx
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Cannot malloc %ld bytes to hold %s: %s\0A\00"
@errno = global i32 0
define i8* @xmalloc(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i64, i64* %3
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %17, label %10
10: ; preds = %2
%11 = load i64, i64* %3
%12 = add i64 %11, 0
%13 = load i8*, i8** %4
%14 = load i32, i32* @errno
%15 = call i32 @strerror(i32 %14)
%16 = call i32 @die(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i64 %12, i8* %13, i32 %15)
br label %17
17: ; preds = %10, %2
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
@.str = [40 x i8] c"Cannot malloc %ld bytes to hold %s: %s\0A\00"
@errno = global i32 0
define noalias i8* @xmalloc(i64 %0, i8* %1) {
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @errno
%7 = tail call i32 @strerror(i32 %6)
%8 = tail call i32 @die(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i64 %0, i8* %1, i32 %7)
br label %9
9: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ assert_fail(char const *, int, char *, double, double);
double fabs(double);
void assert_dbl_equal_(const char *file, int line, double ex, double ac,
                       double dt) {
  if (fabs(ex - ac) > dt) {
    assert_fail(file, line, "Expected <%g> but was <%g>", ex, ac);
  }
}


x86 assembly (clang, -O0):
<assert_dbl_equal_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movaps 0xec1(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    116b <assert_dbl_equal_+0x5b>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xeaa(%rip),%rdx
call   1030 <assert_fail@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_dbl_equal_>:
movapd %xmm0,%xmm3
subsd  %xmm1,%xmm3
andpd  0xee0(%rip),%xmm3
ucomisd %xmm2,%xmm3
jbe    1132 <assert_dbl_equal_+0x22>
lea    0xee3(%rip),%rdx
jmp    1030 <assert_fail@plt>
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Expected <%g> but was <%g>\00"
define void @assert_dbl_equal_(i8* %0, i32 %1, double %2, double %3, double %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i8* %0, i8** %6
store i32 %1, i32* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %8
%12 = load double, double* %9
%13 = fsub double %11, %12
%14 = call double @llvm.fabs.f64(double %13)
%15 = load double, double* %10
%16 = fcmp ogt double %14, %15
br i1 %16, label %17, label %23
17: ; preds = %5
%18 = load i8*, i8** %6
%19 = load i32, i32* %7
%20 = load double, double* %8
%21 = load double, double* %9
%22 = call i32 @assert_fail(i8* %18, i32 %19, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), double %20, double %21)
br label %23
23: ; preds = %17, %5
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Expected <%g> but was <%g>\00"
define void @assert_dbl_equal_(i8* %0, i32 %1, double %2, double %3, double %4) {
%6 = fsub double %2, %3
%7 = tail call double @llvm.fabs.f64(double %6)
%8 = fcmp ogt double %7, %4
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = tail call i32 @assert_fail(i8* %0, i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), double %2, double %3)
br label %11
11: ; preds = %9, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
void rect(int x, int y, int w, int h, int fill) {
  if (!fill)
    printf("%d %d %d %d RS\n", x, y, w, h);
  else
    printf("%d %d %d %d RF\n", x, y, w, h);
}


x86 assembly (clang, -O0):
<rect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1150 <rect+0x40>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    1169 <rect+0x59>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rect>:
mov    %ecx,%eax
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
test   %r8d,%r8d
lea    0xede(%rip),%r8
lea    0xee7(%rip),%rdi
cmove  %r8,%rdi
mov    %eax,%r8d
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"%d %d %d %d RS\0A\00"
@.str.1 = [16 x i8] c"%d %d %d %d RF\0A\00"
define void @rect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp eq i32 %4, 0
%7 = select i1 %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0)
%8 = tail call i32 @printf(i8* %7, i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
unsigned int scrobble_time(unsigned int duration) {
  if (duration > 240 * 2)
    return 240;
  if (duration < 30 * 2)
    return 30;
  return duration / 2;
}


x86 assembly (clang, -O0):
<scrobble_time>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1e0,-0x8(%rbp)
jbe    1120 <scrobble_time+0x20>
movl   $0xf0,-0x4(%rbp)
jmp    113f <scrobble_time+0x3f>
cmpl   $0x3c,-0x8(%rbp)
jae    1136 <scrobble_time+0x36>
movl   $0x1e,-0x4(%rbp)
jmp    113f <scrobble_time+0x3f>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scrobble_time>:
mov    %edi,%eax
shr    %eax
cmp    $0x3c,%edi
mov    $0x1e,%ecx
cmovae %eax,%ecx
cmp    $0x1e1,%edi
mov    $0xf0,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @scrobble_time(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ugt i32 %4, 480
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 240, i32* %2
br label %14
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp ult i32 %8, 60
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 30, i32* %2
br label %14
11: ; preds = %7
%12 = load i32, i32* %3
%13 = udiv i32 %12, 2
store i32 %13, i32* %2
br label %14
14: ; preds = %11, %10, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @scrobble_time(i32 %0) {
%2 = icmp ugt i32 %0, 480
%3 = icmp ult i32 %0, 60
%4 = lshr i32 %0, 1
%5 = select i1 %3, i32 30, i32 %4
%6 = select i1 %2, i32 240, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ np_shared_uninit();
void np_uninit() { np_shared_uninit(); }


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

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

LLVM IR (-O0):
define void @np_uninit() {
%1 = call i32 (...) @np_shared_uninit()
ret void
}

LLVM IR (-O2):
define void @np_uninit() {
%1 = tail call i32 (...) @np_shared_uninit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fD() { printf("Hey! What's up? I'm fD.\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Hey! What's up? I'm fD.\0A\00"
define void @fD() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"Hey! What's up? I'm fD.\00"
define void @fD() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int get_port(int, char **);
int init_socket(int);
int /*<<< orphan*/ main_loop(int);
int main(int argc, char *argv[]) {
  int port = get_port(argc, argv);
  if (-1 == port)
    return -1;
  int listenfd;
  listenfd = init_socket(port);
  main_loop(listenfd);
  close(listenfd);
  return 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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <get_port@plt>
mov    %eax,-0x14(%rbp)
mov    $0xffffffff,%eax
cmp    -0x14(%rbp),%eax
jne    117f <main+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    11a1 <main+0x61>
mov    -0x14(%rbp),%edi
call   1050 <init_socket@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
call   1060 <main_loop@plt>
mov    -0x18(%rbp),%edi
call   1040 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
call   1030 <get_port@plt>
cmp    $0xffffffff,%eax
je     1166 <main+0x26>
mov    %eax,%edi
call   1050 <init_socket@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1060 <main_loop@plt>
mov    %ebx,%edi
call   1040 <close@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @get_port(i32 %0, i8** %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @init_socket(i32 %3)
%7 = tail call i32 @main_loop(i32 %6)
%8 = tail call i32 @close(i32 %6)
br label %9
9: ; preds = %2, %5
%10 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ islower(int);
void t_islower_0x6d() {
  Assert_real((islower(109)),
              "/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_islower.c",
              550, ("islower should be 1 for m"));
}


x86 assembly (clang, -O0):
<t_islower_0x6d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6d,%edi
call   1030 <islower@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x226,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x6d>:
push   %rax
mov    $0x6d,%edi
call   1030 <islower@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x226,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for m\00"
define void @t_islower_0x6d() {
%1 = call i32 @islower(i32 109)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 550, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for m\00"
define void @t_islower_0x6d() {
%1 = tail call i32 @islower(i32 109)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 550, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t
hci_event_encryption_key_refresh_complete_get_status(const uint8_t *event) {
  return event[2];
}


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

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

LLVM IR (-O0):
define i32 @hci_event_encryption_key_refresh_complete_get_status(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hci_event_encryption_key_refresh_complete_get_status(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
ret i32 %3
}
void g_dir_close() {}


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

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

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

LLVM IR (-O2):
define void @g_dir_close() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cli_usage();
int /*<<< orphan*/ printf(char *);
void cli_invalid_option() {
  printf("Invalid option\n");
  cli_usage();
}


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

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

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

LLVM IR (-O2):
@str = [15 x i8] c"Invalid option\00"
define void @cli_invalid_option() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @cli_usage()
ret void
}