xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ wfile_filename_compare(char *, char *);
int wfile_correct_exe(char *basename, char *correctname, char *fullname) {
  if (wfile_filename_compare(basename, correctname))
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<wfile_correct_exe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <wfile_filename_compare@plt>
cmp    $0x0,%rax
je     1147 <wfile_correct_exe+0x37>
movl   $0x0,-0x4(%rbp)
jmp    114e <wfile_correct_exe+0x3e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @wfile_correct_exe(i8* %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i64 @wfile_filename_compare(i8* %0, i8* %1)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int c099(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c099() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int);
int main(int argc, char **argv) {
  printf("%d %d %d %d %d\n", sizeof(int), sizeof(long), sizeof(long *),
         sizeof(short), sizeof(long long));
  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
mov    $0x4,%esi
mov    $0x8,%r9d
mov    $0x2,%r8d
mov    %r9d,%edx
mov    %r9d,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
mov    $0x8,%edx
mov    $0x8,%ecx
mov    $0x2,%r8d
mov    $0x8,%r9d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"%d %d %d %d %d\0A\00"
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 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 4, i32 8, i32 8, i32 2, i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"%d %d %d %d %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 4, i32 8, i32 8, i32 2, i32 8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIGSTOP;
int /*<<< orphan*/ kill(int, int /*<<< orphan*/);
int SuspendTask(int pid) {
  kill(pid, SIGSTOP);
  return 0;
}


x86 assembly (clang, -O0):
<SuspendTask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SuspendTask>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGSTOP = global i32 0
define i32 @SuspendTask(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGSTOP
%5 = call i32 @kill(i32 %3, i32 %4)
ret i32 0
}

LLVM IR (-O2):
@SIGSTOP = global i32 0
define i32 @SuspendTask(i32 %0) {
%2 = load i32, i32* @SIGSTOP
%3 = tail call i32 @kill(i32 %0, i32 %2)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t HibernateWakeGet(void) {
  uint32_t ui32Ctrl;
  if ((((*((volatile uint32_t *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) ==
       (0x10000000 | 0x000A0000))) {
    ui32Ctrl = (*((volatile uint32_t *)(0x400FC010)));
    return ((ui32Ctrl & (0x00000010 | 0x00000008 | 0x00000200)) |
            (((*((volatile uint32_t *)(0x400FC02C))) << 16) &
             (0x00100010 | 0x00000010)));
  } else {
    return ((*((volatile uint32_t *)(0x400FC010))) &
            (0x00000010 | 0x00000008 | 0x00000200));
  }
}


x86 assembly (clang, -O0):
<HibernateWakeGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x100a0000,%eax
jne    1147 <HibernateWakeGet+0x47>
mov    $0x400fc010,%eax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x218,%eax
mov    $0x400fc02c,%ecx
mov    (%rcx),%ecx
shl    $0x10,%ecx
and    $0x100010,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1156 <HibernateWakeGet+0x56>
mov    $0x400fc010,%eax
mov    (%rax),%eax
and    $0x218,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateWakeGet>:
mov    $0x70ff0000,%ecx
and    0x400fe000,%ecx
mov    $0x218,%eax
and    0x400fc010,%eax
cmp    $0x100a0000,%ecx
jne    112f <HibernateWakeGet+0x2f>
mov    0x400fc02c,%ecx
and    $0x10,%ecx
shl    $0x10,%ecx
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @HibernateWakeGet() {
%1 = alloca i32
%2 = alloca i32
%3 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%4 = and i32 %3, 1895759872
%5 = icmp eq i32 %4, 269090816
br i1 %5, label %6, label %14
6: ; preds = %0
%7 = load volatile i32, i32* inttoptr (i64 1074774032 to i32*)
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = and i32 %8, 536
%10 = load volatile i32, i32* inttoptr (i64 1074774060 to i32*)
%11 = shl i32 %10, 16
%12 = and i32 %11, 1048592
%13 = or i32 %9, %12
store i32 %13, i32* %1
br label %17
14: ; preds = %0
%15 = load volatile i32, i32* inttoptr (i64 1074774032 to i32*)
%16 = and i32 %15, 536
store i32 %16, i32* %1
br label %17
17: ; preds = %14, %6
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @HibernateWakeGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%2 = and i32 %1, 1895759872
%3 = icmp eq i32 %2, 269090816
%4 = load volatile i32, i32* inttoptr (i64 1074774032 to i32*)
%5 = and i32 %4, 536
br i1 %3, label %6, label %11
6: ; preds = %0
%7 = load volatile i32, i32* inttoptr (i64 1074774060 to i32*)
%8 = shl i32 %7, 16
%9 = and i32 %8, 1048576
%10 = or i32 %9, %5
br label %11
11: ; preds = %0, %6
%12 = phi i32 [ %10, %6 ], [ %5, %0 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           unsigned int, unsigned int);
int /*<<< orphan*/ stderr;
void check_unsigned_ints(unsigned int actual, unsigned int expected,
                         const char *msg) {
  if (expected == actual) {
    return;
  }
  fprintf(stderr, "FAIL: %s Expected %d but was %d\n", msg, expected, actual);
  exit(1);
}


x86 assembly (clang, -O0):
<check_unsigned_ints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    1144 <check_unsigned_ints+0x24>
add    $0x10,%rsp
pop    %rbp
ret
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%r8d
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<check_unsigned_ints>:
cmp    %edi,%esi
jne    1125 <check_unsigned_ints+0x5>
ret
push   %rax
mov    %esi,%ecx
mov    %edi,%r8d
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"FAIL: %s Expected %d but was %d\0A\00"
define void @check_unsigned_ints(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %3
ret void
11: ; preds = %3
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %6
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %14, i32 %15)
%17 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"FAIL: %s Expected %d but was %d\0A\00"
define void @check_unsigned_ints(i32 %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %1, %0
br i1 %4, label %5, label %6
5: ; preds = %3
ret void
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %1, i32 %0)
%9 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void *stSafeCMalloc(size_t);
void *stSafeCCopyMem(void *mem, size_t size) {
  void *mem2 = stSafeCMalloc(size);
  memcpy(mem2, mem, size);
  return mem2;
}


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

x86 assembly (clang, -O2):
<stSafeCCopyMem>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <stSafeCMalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @stSafeCCopyMem(i8* %0, i64 %1) {
%3 = tail call i8* @stSafeCMalloc(i64 %1)
%4 = tail call i32 @memcpy(i8* %3, i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_254() {
  Assert_real((isqrt(254) == 15),
              "/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/stdlib/isqrt.c",
              1275, ("Integer square root of 254 should be 15"));
}


x86 assembly (clang, -O0):
<t_sqrt_254>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfe,%edi
call   1030 <isqrt@plt>
cmp    $0xf,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x4fb,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_254>:
push   %rax
mov    $0xfe,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xf,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x4fb,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 254 should be 15\00"
define void @t_sqrt_254() {
%1 = call i32 @isqrt(i32 254)
%2 = icmp eq i32 %1, 15
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1275, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 254 should be 15\00"
define void @t_sqrt_254() {
%1 = tail call i32 @isqrt(i32 254)
%2 = icmp eq i32 %1, 15
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1275, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int foo(int x, int y) {
  {
    int x$1 = 20;
    if (0)
      return (x$1 + y);
    else
      goto x$$1;
  }
  return (x + y);
  int x$1 = 2;
x$$1:;
  return 10;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
mov    $0xa,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 20, i32* %5
br label %7
7: ; preds = %2
ret i32 10
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
ret i32 10
}
void foo() {
  int *p = (int *)0x10000;
  *p = 3;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x3,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x3,0x10000
ret

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32*
store i32* inttoptr (i64 65536 to i32*), i32** %1
%2 = load i32*, i32** %1
store i32 3, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo() {
store i32 3, i32* inttoptr (i64 65536 to i32*)
ret void
}
/* Variables and functions */
void *k(size_t);
void *l(size_t n) { return k(n); }


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

x86 assembly (clang, -O2):
<l>:
jmp    1030 <k@plt>

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

LLVM IR (-O2):
define i8* @l(i64 %0) {
%2 = tail call i8* @k(i64 %0)
ret i8* %2
}
long double GSL_MAX_LDBL(long double a, long double b) {
  return ((a) > (b) ? (a) : (b));
}


x86 assembly (clang, -O0):
<GSL_MAX_LDBL>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jbe    1132 <GSL_MAX_LDBL+0x32>
jmp    1127 <GSL_MAX_LDBL+0x27>
fldt   -0x10(%rbp)
fstpt  -0x2c(%rbp)
jmp    1138 <GSL_MAX_LDBL+0x38>
fldt   -0x20(%rbp)
fstpt  -0x2c(%rbp)
fldt   -0x2c(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GSL_MAX_LDBL>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fucomi %st(1),%st
fxch   %st(1)
fcmovnbe %st(1),%st
fstp   %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @GSL_MAX_LDBL(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fcmp ogt x86_fp80 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load x86_fp80, x86_fp80* %3
br label %12
10: ; preds = %2
%11 = load x86_fp80, x86_fp80* %4
br label %12
12: ; preds = %10, %8
%13 = phi x86_fp80 [ %9, %8 ], [ %11, %10 ]
ret x86_fp80 %13
}

LLVM IR (-O2):
define x86_fp80 @GSL_MAX_LDBL(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp ogt x86_fp80 %0, %1
%4 = select i1 %3, x86_fp80 %0, x86_fp80 %1
ret x86_fp80 %4
}
extern void *phys_to_virt(unsigned long address) { return (void *)address; }


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

x86 assembly (clang, -O2):
<phys_to_virt>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @phys_to_virt(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}

LLVM IR (-O2):
define i8* @phys_to_virt(i64 %0) {
%2 = inttoptr i64 %0 to i8*
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void SHAREMIND_MAP_KEY_FREE_uint32_t(uint32_t *const dest) { (void)dest; }


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

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

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

LLVM IR (-O2):
define void @SHAREMIND_MAP_KEY_FREE_uint32_t(i32* nocapture %0) {
ret void
}
int __isinff(float x) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__isinff(float %0) {
ret i32 0
}
int hammingDistance(int x, int y) { return __builtin_popcount(x ^ y); }


x86 assembly (clang, -O0):
<hammingDistance>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
xor    -0x8(%rbp),%ecx
mov    %ecx,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%ecx
mov    %ecx,%eax
and    $0x33333333,%eax
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hammingDistance>:
xor    %esi,%edi
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
ret

LLVM IR (-O0):
define i32 @hammingDistance(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = xor i32 %5, %6
%8 = call i32 @llvm.ctpop.i32(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @hammingDistance(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = tail call i32 @llvm.ctpop.i32(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ test_function(int, int, int, int);
int main() {
  test_function(1, 2, 3, 4);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_function(i32 1, i32 2, i32 3, i32 4)
ret i32 0
}
void test_one() {
#pragma omp sections
  { ; }
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ *malloc(int);
int /*<<< orphan*/ wlite_wcscpy(int /*<<< orphan*/ *,
                                int /*<<< orphan*/ const *);
int wlite_wcslen(int /*<<< orphan*/ const *);
wchar_t *wlite_wcsdup(const wchar_t *s) {
  wchar_t *dup;
  dup = malloc(sizeof(wchar_t) * (wlite_wcslen(s) + 1));
  if (dup != NULL) {
    wlite_wcscpy(dup, s);
  }
  return dup;
}


x86 assembly (clang, -O0):
<wlite_wcsdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <wlite_wcslen@plt>
add    $0x1,%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1171 <wlite_wcsdup+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <wlite_wcscpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wlite_wcsdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <wlite_wcslen@plt>
lea    0x4(,%rax,4),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     115b <wlite_wcsdup+0x2b>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <wlite_wcscpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @wlite_wcsdup(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @wlite_wcslen(i32* %4)
%6 = add nsw i32 %5, 1
%7 = sext i32 %6 to i64
%8 = mul i64 4, %7
%9 = trunc i64 %8 to i32
%10 = call i32* @malloc(i32 %9)
store i32* %10, i32** %3
%11 = load i32*, i32** %3
%12 = icmp ne i32* %11, null
br i1 %12, label %13, label %17
13: ; preds = %1
%14 = load i32*, i32** %3
%15 = load i32*, i32** %2
%16 = call i32 @wlite_wcscpy(i32* %14, i32* %15)
br label %17
17: ; preds = %13, %1
%18 = load i32*, i32** %3
ret i32* %18
}

LLVM IR (-O2):
define i32* @wlite_wcsdup(i32* %0) {
%2 = tail call i32 @wlite_wcslen(i32* %0)
%3 = shl i32 %2, 2
%4 = add i32 %3, 4
%5 = tail call i32* @malloc(i32 %4)
%6 = icmp eq i32* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @wlite_wcscpy(i32* %5, i32* %0)
br label %9
9: ; preds = %7, %1
ret i32* %5
}
int base64_decode_value(int value_in) {
  static const char decoding[] = {
      62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1,
      -1, -1, -2, -1, -1, -1, 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,
      10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
      -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
      36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51};
  static const char decoding_size = sizeof(decoding);
  value_in -= 43;
  if (value_in < 0 || value_in > decoding_size)
    return -1;
  return decoding[value_in];
}


x86 assembly (clang, -O0):
<base64_decode_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x2b,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1124 <base64_decode_value+0x24>
cmpl   $0x50,-0x8(%rbp)
jle    1130 <base64_decode_value+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1142 <base64_decode_value+0x42>
movslq -0x8(%rbp),%rcx
lea    0xec5(%rip),%rax
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_decode_value>:
lea    -0x7c(%rdi),%ecx
mov    $0xffffffff,%eax
cmp    $0xffffffaf,%ecx
jb     111b <base64_decode_value+0x1b>
add    $0xffffffd5,%edi
lea    0xee9(%rip),%rax
movsbl (%rdi,%rax,1),%eax
ret

LLVM IR (-O0):
@base64_decode_value.decoding = internal constant [80 x i8] c">\FF\FF\FF?456789:;<=\FF\FF\FF\FE\FF\FF\FF\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\FF\FF\FF\FF\FF\FF\1A\1B\1C\1D\1E\1F !\22#$%&'()*+,-./0123"
@base64_decode_value.decoding_size = internal constant i8 80
define i32 @base64_decode_value(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = sub nsw i32 %4, 43
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 80
br i1 %10, label %11, label %12
11: ; preds = %8, %1
store i32 -1, i32* %2
br label %18
12: ; preds = %8
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [80 x i8], [80 x i8]* @base64_decode_value.decoding, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
store i32 %17, i32* %2
br label %18
18: ; preds = %12, %11
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@base64_decode_value.decoding = internal unnamed_addr constant [80 x i8] c">\FF\FF\FF?456789:;<=\FF\FF\FF\FE\FF\FF\FF\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\FF\FF\FF\FF\FF\FF\1A\1B\1C\1D\1E\1F !\22#$%&'()*+,-./0123"
define i32 @base64_decode_value(i32 %0) {
%2 = add i32 %0, -124
%3 = icmp ult i32 %2, -81
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = add nsw i32 %0, -43
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds [80 x i8], [80 x i8]* @base64_decode_value.decoding, i64 0, i64 %6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
br label %10
10: ; preds = %1, %4
%11 = phi i32 [ %9, %4 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ bucket_sort(int *, int);
int /*<<< orphan*/ print_array(int *, int);
int /*<<< orphan*/ random_array(int *, int);
int main(void) {
  int a[20];
  random_array(a, 20);
  print_array(a, 20);
  bucket_sort(a, 20);
  print_array(a, 20);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
mov    $0x14,%esi
call   1050 <random_array@plt>
lea    -0x60(%rbp),%rdi
mov    $0x14,%esi
call   1030 <print_array@plt>
lea    -0x60(%rbp),%rdi
mov    $0x14,%esi
call   1040 <bucket_sort@plt>
lea    -0x60(%rbp),%rdi
mov    $0x14,%esi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x14,%esi
call   1050 <random_array@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1030 <print_array@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1040 <bucket_sort@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%4 = call i32 @random_array(i32* %3, i32 20)
%5 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%6 = call i32 @print_array(i32* %5, i32 20)
%7 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%8 = call i32 @bucket_sort(i32* %7, i32 20)
%9 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%10 = call i32 @print_array(i32* %9, i32 20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [20 x i32]
%2 = bitcast [20 x i32]* %1 to i8*
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%4 = call i32 @random_array(i32* %3, i32 20)
%5 = call i32 @print_array(i32* %3, i32 20)
%6 = call i32 @bucket_sort(i32* %3, i32 20)
%7 = call i32 @print_array(i32* %3, i32 20)
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(int *, char, int);
void initVisited(int **visit) {
  int *visited;
  visited = (int *)malloc(sizeof(int) * 6);
  if (visited == NULL)
    return;
  memset(visited, '\0', sizeof(int) * 6);
  *visit = visited;
  return;
}


x86 assembly (clang, -O0):
<initVisited>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x18,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114a <initVisited+0x2a>
jmp    1165 <initVisited+0x45>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initVisited>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x18,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     114b <initVisited+0x2b>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @initVisited(i32** nocapture writeonly %0) {
%2 = tail call i64 @malloc(i32 24)
%3 = inttoptr i64 %2 to i32*
%4 = icmp eq i64 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @memset(i32* %3, i8 signext 0, i32 24)
store i32* %3, i32** %0
br label %7
7: ; preds = %1, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Ello Chap\?\n");
  printf("Ello Chap\v\n");
  printf("Ello Chap\a\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>
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
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>
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Ello Chap?\0A\00"
@.str.1 = [12 x i8] c"Ello Chap\0B\0A\00"
@.str.2 = [12 x i8] c"Ello Chap\07\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"Ello Chap?\00"
@str.3 = [11 x i8] c"Ello Chap\0B\00"
@str.4 = [11 x i8] c"Ello Chap\07\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
scalar_t__ __tcgetattr(int, struct termios *);
int __isatty(int fd) {
  struct termios term;
  return __tcgetattr(fd, &term) == 0;
}


x86 assembly (clang, -O0):
<__isatty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1030 <__tcgetattr@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.termios = type { i32 }
define i32 @__isatty(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.termios
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @__tcgetattr(i32 %4, %struct.termios* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.termios = type { i32 }
define i32 @__isatty(i32 %0) {
%2 = alloca %struct.termios
%3 = bitcast %struct.termios* %2 to i8*
%4 = call i64 @__tcgetattr(i32 %0, %struct.termios* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void lemon() { printf("FRUIT:: This is lemon !\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"FRUIT:: This is lemon !\0A\00"
define void @lemon() {
%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"FRUIT:: This is lemon !\00"
define void @lemon() {
%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 inb(int);
int serial_received(int port) { return inb(port + 5) & (0x01 << 0); }


x86 assembly (clang, -O0):
<serial_received>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x5,%edi
call   1030 <inb@plt>
and    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_received>:
push   %rax
add    $0x5,%edi
call   1030 <inb@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @serial_received(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 5
%5 = call i32 @inb(i32 %4)
%6 = and i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @serial_received(i32 %0) {
%2 = add nsw i32 %0, 5
%3 = tail call i32 @inb(i32 %2)
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gmx_enemat(int, char **);
int main(int argc, char *argv[]) {
  gmx_enemat(argc, argv);
  return 0;
}


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

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

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

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

/* Variables and functions */
int wcscmp(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *);
int wcscoll(const wchar_t *s1, const wchar_t *s2) { return (wcscmp(s1, s2)); }


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

x86 assembly (clang, -O2):
<wcscoll>:
jmp    1030 <wcscmp@plt>

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

LLVM IR (-O2):
define i32 @wcscoll(i32* %0, i32* %1) {
%3 = tail call i32 @wcscmp(i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ noproto(float, double);
int /*<<< orphan*/ vari(float, double, float, double);
g(float f, double d) {
  vari(f, d, f, d);
  noproto(f, d);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
call   1040 <vari@plt>
movss  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <noproto@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movss  %xmm0,0xc(%rsp)
movaps %xmm0,%xmm2
movaps %xmm1,%xmm3
call   1040 <vari@plt>
movss  0xc(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
add    $0x18,%rsp
jmp    1030 <noproto@plt>

LLVM IR (-O0):
define i32 @g(float %0, double %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca double
store float %0, float* %4
store double %1, double* %5
%6 = load float, float* %4
%7 = load double, double* %5
%8 = load float, float* %4
%9 = load double, double* %5
%10 = call i32 @vari(float %6, double %7, float %8, double %9)
%11 = load float, float* %4
%12 = load double, double* %5
%13 = call i32 @noproto(float %11, double %12)
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @g(float %0, double %1) {
%3 = tail call i32 @vari(float %0, double %1, float %0, double %1)
%4 = tail call i32 @noproto(float %0, double %1)
ret i32 undef
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t _allignedSize(int32_t size) { return (size + (8 - 1)) & ~(8 - 1); }


x86 assembly (clang, -O0):
<_allignedSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x7,%eax
and    $0xfffffff8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_allignedSize>:
lea    0x7(%rdi),%eax
and    $0xfffffff8,%eax
ret

LLVM IR (-O0):
define i32 @_allignedSize(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 7
%5 = and i32 %4, -8
ret i32 %5
}

LLVM IR (-O2):
define i32 @_allignedSize(i32 %0) {
%2 = add nsw i32 %0, 7
%3 = and i32 %2, -8
ret i32 %3
}
int __a_internal(int e) { return e + 10; }


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

x86 assembly (clang, -O2):
<__a_internal>:
lea    0xa(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @__a_internal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 10
ret i32 %4
}

LLVM IR (-O2):
define i32 @__a_internal(i32 %0) {
%2 = add nsw i32 %0, 10
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void printYel(char *str) { printf("%s%s%s", "\x1B[33m", str, "\x1B[0m"); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%s%s%s\00"
@.str.1 = [6 x i8] c"\1B[33m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define void @printYel(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ dump_int(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite_safe(char *, int, int, int /*<<< orphan*/ *);
int strlen(char *);
void dump_string(char *string, FILE *fp) {
  int len;
  if (string == NULL) {
    dump_int(-1, fp);
  } else {
    len = strlen(string);
    dump_int(len, fp);
    fwrite_safe(string, sizeof(char), len + 1, fp);
  }
  return;
}


x86 assembly (clang, -O0):
<dump_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115e <dump_string+0x2e>
mov    -0x10(%rbp),%rsi
mov    $0xffffffff,%edi
call   1030 <dump_int@plt>
jmp    118e <dump_string+0x5e>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <dump_int@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
add    $0x1,%edx
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
call   1050 <fwrite_safe@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_string>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
test   %rdi,%rdi
je     1169 <dump_string+0x39>
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <dump_int@plt>
add    $0x1,%ebp
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %ebp,%edx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <fwrite_safe@plt>
mov    $0xffffffff,%edi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <dump_int@plt>

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

LLVM IR (-O2):
define void @dump_string(i8* %0, i32* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @dump_int(i32 -1, i32* %1)
br label %11
6: ; preds = %2
%7 = tail call i32 @strlen(i8* %0)
%8 = tail call i32 @dump_int(i32 %7, i32* %1)
%9 = add nsw i32 %7, 1
%10 = tail call i32 @fwrite_safe(i8* %0, i32 1, i32 %9, i32* %1)
br label %11
11: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ generate_gf();
int /*<<< orphan*/ init_mul_table();
void reed_solomon_init(void) {
  generate_gf();
  init_mul_table();
}


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

x86 assembly (clang, -O2):
<reed_solomon_init>:
push   %rax
xor    %eax,%eax
call   1030 <generate_gf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <init_mul_table@plt>

LLVM IR (-O0):
define void @reed_solomon_init() {
%1 = call i32 (...) @generate_gf()
%2 = call i32 (...) @init_mul_table()
ret void
}

LLVM IR (-O2):
define void @reed_solomon_init() {
%1 = tail call i32 (...) @generate_gf()
%2 = tail call i32 (...) @init_mul_table()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void helpOthers() { printf("Helping others..."); }


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

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"Helping others...\00"
define void @helpOthers() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}
float foo(int w, float A[][w], int g, int h) { return A[g][0]; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   %rdx,%rcx
movss  (%rax,%rcx,4),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
movslq %edx,%rcx
imul   %rax,%rcx
movss  (%rsi,%rcx,4),%xmm0
ret

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

LLVM IR (-O2):
define float @foo(i32 %0, float* nocapture %1, i32 %2, i32 %3) {
%5 = zext i32 %0 to i64
%6 = sext i32 %2 to i64
%7 = mul nsw i64 %6, %5
%8 = getelementptr inbounds float, float* %1, i64 %7
%9 = load float, float* %8
ret float %9
}
/* Variables and functions */
char *strrchr(char *, char);
char *my_dirname(char *path) {
  char *p = strrchr(path, '/');
  if (!p)
    return ".";
  if (p == path)
    return p;
  *p = 0;
  return path;
}


x86 assembly (clang, -O0):
<my_dirname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1149 <my_dirname+0x39>
lea    0xec0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1173 <my_dirname+0x63>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1164 <my_dirname+0x54>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1173 <my_dirname+0x63>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_dirname>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     112d <my_dirname+0x1d>
cmp    %rbx,%rax
je     1134 <my_dirname+0x24>
movb   $0x0,(%rax)
jmp    1134 <my_dirname+0x24>
lea    0xecc(%rip),%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i8* @my_dirname(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = icmp eq i8* %2, %0
br i1 %5, label %7, label %6
6: ; preds = %4
store i8 0, i8* %2
br label %7
7: ; preds = %4, %1, %6
%8 = phi i8* [ %0, %6 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ], [ %0, %4 ]
ret i8* %8
}