xunge/DecIR huggingface dataset:
void do_fldlg2(void *p) {
  asm __volatile__("fninit");
  asm __volatile__("fldlg2");
  asm __volatile__("fstpl (%0)" : : "r"(p) : "memory");
}


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

x86 assembly (clang, -O2):
<do_fldlg2>:
fninit
fldlg2
fstpl  (%rdi)
ret

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

LLVM IR (-O2):
define void @do_fldlg2(i8* %0) {
tail call void asm sideeffect "fninit", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fldlg2", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fstpl ($0)", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
int isNum(char c) {
  if (c < '0' || c > '9')
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isNum>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1124 <isNum+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jle    1130 <isNum+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1137 <isNum+0x37>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNum>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isNum(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 48
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sgt i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 0, i32* %2
br label %13
12: ; preds = %7
store i32 1, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @isNum(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int ruserok2_sa(struct sockaddr *, size_t, int, char const *, char const *,
                char *);
int ruserok_sa(struct sockaddr *ra, size_t ralen, int superuser,
               const char *ruser, const char *luser) {
  return ruserok2_sa(ra, ralen, superuser, ruser, luser, "-");
}


x86 assembly (clang, -O0):
<ruserok_sa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    0xebb(%rip),%r9
call   1030 <ruserok2_sa@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ruserok_sa>:
lea    0xee9(%rip),%r9
jmp    1030 <ruserok2_sa@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@.str = [2 x i8] c"-\00"
define i32 @ruserok_sa(%struct.sockaddr* %0, i64 %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca %struct.sockaddr*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store %struct.sockaddr* %0, %struct.sockaddr** %6
store i64 %1, i64* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load %struct.sockaddr*, %struct.sockaddr** %6
%12 = load i64, i64* %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i8*, i8** %10
%16 = call i32 @ruserok2_sa(%struct.sockaddr* %11, i64 %12, i32 %13, i8* %14, i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 %16
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@.str = [2 x i8] c"-\00"
define i32 @ruserok_sa(%struct.sockaddr* %0, i64 %1, i32 %2, i8* %3, i8* %4) {
%6 = tail call i32 @ruserok2_sa(%struct.sockaddr* %0, i64 %1, i32 %2, i8* %3, i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 %6
}
/* Type definitions */
struct hashlist {
  int dummy;
};

/* Variables and functions */
int CountHashTableEntries(struct hashlist *p) { return ((p != NULL) ? 1 : 0); }


x86 assembly (clang, -O0):
<CountHashTableEntries>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CountHashTableEntries>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
ret

LLVM IR (-O0):
%struct.hashlist = type { i32 }
define i32 @CountHashTableEntries(%struct.hashlist* %0) {
%2 = alloca %struct.hashlist*
store %struct.hashlist* %0, %struct.hashlist** %2
%3 = load %struct.hashlist*, %struct.hashlist** %2
%4 = icmp ne %struct.hashlist* %3, null
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
%struct.hashlist = type { i32 }
define i32 @CountHashTableEntries(%struct.hashlist* readnone %0) {
%2 = icmp ne %struct.hashlist* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
int test_subOK(int x, int y) {
  long long ldiff = (long long)x - y;
  return ldiff == (int)ldiff;
}


x86 assembly (clang, -O0):
<test_subOK>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rax
movslq -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq %ecx,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_subOK>:
movslq %edi,%rcx
movslq %esi,%rax
sub    %rax,%rcx
sub    $0xffffffff80000000,%rcx
xor    %eax,%eax
shr    $0x20,%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @test_subOK(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = sub nsw i64 %7, %9
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
%14 = sext i32 %13 to i64
%15 = icmp eq i64 %11, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @test_subOK(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = sext i32 %1 to i64
%5 = add nsw i64 %3, 2147483648
%6 = sub nsw i64 %5, %4
%7 = icmp ult i64 %6, 4294967296
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef char *uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
__attribute__((always_)) uint8_t
bitw_bit_scan_forward_64_bsf(uint64_t bit_sequence) {
  uint64_t result;
  __asm__ __volatile__("bsf %1, %0;" : "=r"(result) : "r"(bit_sequence));
  return (uint8_t)result;
}


x86 assembly (clang, -O0):
<bitw_bit_scan_forward_64_bsf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
bsf    %eax,%eax
mov    %eax,-0x8(%rbp)
movslq -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitw_bit_scan_forward_64_bsf>:
bsf    %edi,%eax
cltq
ret

LLVM IR (-O0):
define i8* @bitw_bit_scan_forward_64_bsf(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 asm sideeffect "bsf $1, $0;", "=r,r,~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @bitw_bit_scan_forward_64_bsf(i32 %0) {
%2 = tail call i32 asm sideeffect "bsf $1, $0;", "=r,r,~{dirflag},~{fpsr},~{flags}"(i32 %0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
long math__Int__bin_and(long self, long p0) {
  long var;
  long var1;
  var1 = (self & p0);
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<math__Int__bin_and>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @math__Int__bin_and(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = and i64 %7, %8
store i64 %9, i64* %6
%10 = load i64, i64* %6
store i64 %10, i64* %5
br label %11
11: ; preds = %2
%12 = load i64, i64* %5
ret i64 %12
}

LLVM IR (-O2):
define i64 @math__Int__bin_and(i64 %0, i64 %1) {
%3 = and i64 %1, %0
ret i64 %3
}
int process_dmnt_fin() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @process_dmnt_fin() {
ret i32 0
}
void __wait_timeout(toid, filename, lineno) volatile int *toid;
char *filename;
int lineno;
{
  while (!*toid)
    ;
  *toid = 0;
}


x86 assembly (clang, -O0):
<__wait_timeout>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112a <__wait_timeout+0x2a>
jmp    112f <__wait_timeout+0x2f>
jmp    110f <__wait_timeout+0xf>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wait_timeout>:
cmpl   $0x0,(%rdi)
je     1100 <__wait_timeout>
movl   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @__wait_timeout(i32* %0, i8* nocapture readnone %1, i32 %2) {
br label %4
4: ; preds = %4, %3
%5 = load volatile i32, i32* %0
%6 = icmp eq i32 %5, 0
br i1 %6, label %4, label %7
7: ; preds = %4
store volatile i32 0, i32* %0
ret void
}
/* Variables and functions */
int memcmp(unsigned char const *, unsigned char const *, size_t);
int session_strcmp(const unsigned char *o1, const unsigned char *o2,
                   size_t len) {
  if (o1 == NULL && o2 == NULL)
    return (0);
  if (o1 == NULL || o2 == NULL)
    return (1);
  return memcmp(o1, o2, len);
}


x86 assembly (clang, -O0):
<session_strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1146 <session_strcmp+0x36>
cmpq   $0x0,-0x18(%rbp)
jne    1146 <session_strcmp+0x36>
movl   $0x0,-0x4(%rbp)
jmp    117c <session_strcmp+0x6c>
cmpq   $0x0,-0x10(%rbp)
je     115c <session_strcmp+0x4c>
cmpq   $0x0,-0x18(%rbp)
jne    1168 <session_strcmp+0x58>
movl   $0x1,-0x4(%rbp)
jmp    117c <session_strcmp+0x6c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <memcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<session_strcmp>:
xor    %eax,%eax
mov    %rdi,%rcx
or     %rsi,%rcx
je     112e <session_strcmp+0x1e>
mov    $0x1,%eax
test   %rdi,%rdi
je     112e <session_strcmp+0x1e>
test   %rsi,%rsi
je     112e <session_strcmp+0x1e>
jmp    1030 <memcmp@plt>
ret

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

LLVM IR (-O2):
define i32 @session_strcmp(i8* %0, i8* %1, i64 %2) {
%4 = icmp eq i8* %0, null
%5 = icmp eq i8* %1, null
%6 = and i1 %4, %5
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = or i1 %4, %5
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i32 @memcmp(i8* %0, i8* %1, i64 %2)
br label %11
11: ; preds = %7, %3, %9
%12 = phi i32 [ %10, %9 ], [ 0, %3 ], [ 1, %7 ]
ret i32 %12
}
void run_benchmark(void *vargs) {}


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

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

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

LLVM IR (-O2):
define void @run_benchmark(i8* nocapture %0) {
ret void
}
int grwfil(fd, nbytes, buf)
int *fd, *nbytes;
char *buf;
{ return write(*fd, (void *)buf, *nbytes); }


x86 assembly (clang, -O0):
<grwfil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    $0x0,%al
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grwfil>:
mov    (%rdi),%edi
mov    (%rsi),%eax
mov    %rdx,%rsi
mov    %eax,%edx
xor    %eax,%eax
jmp    1030 <write@plt>

LLVM IR (-O0):
define i32 @grwfil(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** %4
%8 = load i32, i32* %7
%9 = load i8*, i8** %6
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %8, i8* %9, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @grwfil(i32* nocapture %0, i32* nocapture %1, i8* %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %4, i8* %2, i32 %5)
ret i32 %6
}
const char *__attribute__((weak)) __attribute__((section(".test.a")))
__attribute__((no)) weak_n2(void) {
  return "weak_n2";
}


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

x86 assembly (clang, -O2):
<weak_n2>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"weak_n2\00"
define weak i8* @weak_n2() section ".test.a" {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"weak_n2\00"
define weak i8* @weak_n2() section ".test.a" {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x01() {
  Assert_real((isalnum(1) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              10, ("isalnum should be 0 for 0x01"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x01>:
push   %rax
mov    $0x1,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xa,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x01\00"
define void @t_isalnum_0x01() {
%1 = call i64 @isalnum(i32 1)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 10, i8* getelementptr inbounds ([29 x i8], [29 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x01\00"
define void @t_isalnum_0x01() {
%1 = tail call i64 @isalnum(i32 1)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 10, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *xstrcat(char *dest, char *src) {
  while (*dest)
    dest++;
  while (*dest++ = *src++)
    ;
  return --dest;
}


x86 assembly (clang, -O0):
<xstrcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     112a <xstrcat+0x2a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <xstrcat+0xc>
jmp    112f <xstrcat+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     115e <xstrcat+0x5e>
jmp    112f <xstrcat+0x2f>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrcat>:
mov    %rdi,%rax
add    $0xfffffffffffffffe,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x2(%rax)
lea    0x1(%rax),%rax
jne    1110 <xstrcat+0x10>
nopw   0x0(%rax,%rax,1)
movzbl (%rsi),%ecx
add    $0x1,%rsi
mov    %cl,0x1(%rax)
add    $0x1,%rax
test   %cl,%cl
jne    1120 <xstrcat+0x20>
ret

LLVM IR (-O0):
define i8* @xstrcat(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 = %9, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
br label %5
12: ; preds = %5
br label %13
13: ; preds = %20, %12
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %4
%16 = load i8, i8* %14
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %3
store i8 %16, i8* %17
%19 = icmp ne i8 %16, 0
br i1 %19, label %20, label %21
20: ; preds = %13
br label %13
21: ; preds = %13
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i32 -1
store i8* %23, i8** %3
ret i8* %23
}

LLVM IR (-O2):
define i8* @xstrcat(i8* %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %13, %8 ], [ %4, %3 ]
%10 = phi i8* [ %11, %8 ], [ %1, %3 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %10
%13 = getelementptr inbounds i8, i8* %9, i64 1
store i8 %12, i8* %9
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %9
}
/* Variables and functions */
void Reserved_Handler35(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Reserved_Handler35>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Reserved_Handler35+0x9>
jmp    1109 <Reserved_Handler35+0x9>

x86 assembly (clang, -O2):
<Reserved_Handler35>:
jmp    1100 <Reserved_Handler35>

LLVM IR (-O0):
define void @Reserved_Handler35() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Reserved_Handler35() {
br label %1
1: ; preds = %0, %1
br label %1
}
void ExitGraphics(void) {}


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

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

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

LLVM IR (-O2):
define void @ExitGraphics() {
ret void
}
void testDeprecatedUnused() {}


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

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

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

LLVM IR (-O2):
define void @testDeprecatedUnused() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(int argc, char **argv) {
  if (argc >= 3) {
    printf("invalid arguments.\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x4(%rbp)
jl     114c <usage+0x2c>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
cmp    $0x3,%edi
jge    1126 <usage+0x6>
ret
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"invalid arguments.\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 3
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %2
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"invalid arguments.\00"
define void @usage(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
ret void
}
int user_guess(void) { return 5; }


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

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

LLVM IR (-O0):
define i32 @user_guess() {
ret i32 5
}

LLVM IR (-O2):
define i32 @user_guess() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void shutdown() {
  endwin();
  return;
}


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

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

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

LLVM IR (-O2):
define void @shutdown() {
%1 = tail call i32 (...) @endwin()
ret void
}
/* Type definitions */
struct eq2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct eq2 *);
void eq2_free(struct eq2 *eq2) { free(eq2); }


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

x86 assembly (clang, -O2):
<eq2_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.eq2 = type { i32 }
define void @eq2_free(%struct.eq2* %0) {
%2 = alloca %struct.eq2*
store %struct.eq2* %0, %struct.eq2** %2
%3 = load %struct.eq2*, %struct.eq2** %2
%4 = call i32 @free(%struct.eq2* %3)
ret void
}

LLVM IR (-O2):
%struct.eq2 = type { i32 }
define void @eq2_free(%struct.eq2* nocapture %0) {
%2 = tail call i32 @free(%struct.eq2* %0)
ret void
}
/* Variables and functions */
void SVC_Handler(void) {}


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

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

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

LLVM IR (-O2):
define void @SVC_Handler() {
ret void
}
void infinite() {
  int z;
  for (int i = 0; i % 2 == (i + 2) % 2; i++) {
    z += i;
  }
}


x86 assembly (clang, -O0):
<infinite>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    -0xc(%rbp),%edx
cmp    %eax,%edx
jne    114b <infinite+0x4b>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110b <infinite+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @infinite() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %2
%5 = srem i32 %4, 2
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 2
%8 = srem i32 %7, 2
%9 = icmp eq i32 %5, %8
br i1 %9, label %10, label %17
10: ; preds = %3
%11 = load i32, i32* %2
%12 = load i32, i32* %1
%13 = add nsw i32 %12, %11
store i32 %13, i32* %1
br label %14
14: ; preds = %10
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %3
17: ; preds = %3
ret void
}

LLVM IR (-O2):
void gtk_toggle_button_toggled() {}


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

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

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

LLVM IR (-O2):
define void @gtk_toggle_button_toggled() {
ret void
}
int SKP_DIV32_arm(int a32, int b32) { return ((int)((a32) / (b32))); }


x86 assembly (clang, -O0):
<SKP_DIV32_arm>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SKP_DIV32_arm>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @SKP_DIV32_arm(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 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @SKP_DIV32_arm(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
int compareLong(void *p1, void *p2) {
  long *n1 = (long *)p1;
  long *n2 = (long *)p2;
  return (*n1 - *n2);
}


x86 assembly (clang, -O0):
<compareLong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x20(%rbp),%rcx
sub    (%rcx),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @compareLong(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i64*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
store i64* %8, i64** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i64*
store i64* %10, i64** %6
%11 = load i64*, i64** %5
%12 = load i64, i64* %11
%13 = load i64*, i64** %6
%14 = load i64, i64* %13
%15 = sub nsw i64 %12, %14
%16 = trunc i64 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @compareLong(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub nsw i64 %5, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}
void b_output(const char *str) {
  asm volatile("call *0x00100010" : : "S"(str));
}


x86 assembly (clang, -O0):
<b_output>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
call   *0x100010
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_output>:
mov    %rdi,%rsi
call   *0x100010
ret

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

LLVM IR (-O2):
define void @b_output(i8* %0) {
tail call void asm sideeffect "call *0x00100010", "{si},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
int fetch_comb_binlog_start(struct tgl_state *TLS, void *extra) { return 0; }


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

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

LLVM IR (-O0):
%struct.tgl_state = type opaque
define i32 @fetch_comb_binlog_start(%struct.tgl_state* %0, i8* %1) {
%3 = alloca %struct.tgl_state*
%4 = alloca i8*
store %struct.tgl_state* %0, %struct.tgl_state** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.tgl_state = type opaque
define i32 @fetch_comb_binlog_start(%struct.tgl_state* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ccnl_do_ageing(void *, void *);
int /*<<< orphan*/ ccnl_set_timer(int, void (*)(void *, void *), void *,
                                  int /*<<< orphan*/);
void ccnl_ageing(void *relay, void *aux) {
  ccnl_do_ageing(relay, aux);
  ccnl_set_timer(1000000, ccnl_ageing, relay, 0);
}


x86 assembly (clang, -O0):
<ccnl_ageing>:
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   1040 <ccnl_do_ageing@plt>
mov    -0x8(%rbp),%rdx
mov    $0xf4240,%edi
mov    0x2e93(%rip),%rsi
xor    %ecx,%ecx
call   1030 <ccnl_set_timer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccnl_ageing>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ccnl_do_ageing@plt>
mov    0x2eb0(%rip),%rsi
mov    $0xf4240,%edi
mov    %rbx,%rdx
xor    %ecx,%ecx
pop    %rbx
jmp    1030 <ccnl_set_timer@plt>

LLVM IR (-O0):
define void @ccnl_ageing(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @ccnl_do_ageing(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 @ccnl_set_timer(i32 1000000, void (i8*, i8*)* @ccnl_ageing, i8* %8, i32 0)
ret void
}

LLVM IR (-O2):
define void @ccnl_ageing(i8* %0, i8* %1) {
%3 = tail call i32 @ccnl_do_ageing(i8* %0, i8* %1)
%4 = tail call i32 @ccnl_set_timer(i32 1000000, void (i8*, i8*)* @ccnl_ageing, i8* %0, i32 0)
ret void
}
long double test2l(long double a) { return __builtin_fabsl(a); }


x86 assembly (clang, -O0):
<test2l>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fabs
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2l>:
fldt   0x8(%rsp)
fabs
ret

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

LLVM IR (-O2):
define x86_fp80 @test2l(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.fabs.f80(x86_fp80 %0)
ret x86_fp80 %2
}
int size_double(void) { return sizeof(double); }


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

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

LLVM IR (-O0):
define i32 @size_double() {
ret i32 8
}

LLVM IR (-O2):
define i32 @size_double() {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *program) {
  fprintf(stderr,
          "Stash v%s  -  by: Peter Kieltyka\n"
          "usage: stash [<infile> <outfile> <datafile> <key>] | [<infile> "
          "<datafile> <key>]\n\n"
          "examples:\n"
          "     to hide: %s image1.bmp image2.bmp secret.doc 'hello 123'\n"
          "  to extract: %s image2.bmp secret2.doc 'hello 123'\n"
          "\n",
          "0.3", program, program);
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
lea    0xebc(%rip),%rsi
lea    0xfa6(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rcx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xfb6(%rip),%rdx
mov    %rcx,%r8
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [241 x i8] c"Stash v%s - by: Peter Kieltyka\0Ausage: stash [<infile> <outfile> <datafile> <key>] | [<infile> <datafile> <key>]\0A\0Aexamples:\0A to hide: %s image1.bmp image2.bmp secret.doc 'hello 123'\0A to extract: %s image2.bmp secret2.doc 'hello 123'\0A\0A\00"
@.str.1 = [4 x i8] c"0.3\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([241 x i8], [241 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %5)
%7 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [241 x i8] c"Stash v%s - by: Peter Kieltyka\0Ausage: stash [<infile> <outfile> <datafile> <key>] | [<infile> <datafile> <key>]\0A\0Aexamples:\0A to hide: %s image1.bmp image2.bmp secret.doc 'hello 123'\0A to extract: %s image2.bmp secret2.doc 'hello 123'\0A\0A\00"
@.str.1 = [4 x i8] c"0.3\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([241 x i8], [241 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ mm_free_pages_close();
void cc_mmclient_fini(void) { mm_free_pages_close(); }


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

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

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

LLVM IR (-O2):
define void @cc_mmclient_fini() {
%1 = tail call i32 (...) @mm_free_pages_close()
ret void
}
int my_abs(int val) {
  if (val < 0) {
    val = -val;
  }
  return val;
}


x86 assembly (clang, -O0):
<my_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1119 <my_abs+0x19>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @my_abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 0, %6
store i32 %7, i32* %2
br label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @my_abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int O_APPEND;
int O_CREAT;
int O_WRONLY;
int /*<<< orphan*/ S_IRWXU;
int open(char *, int, int /*<<< orphan*/);
int createTargetFile(char *fileName) {
  int retValue = -1;
  retValue = open(fileName, O_WRONLY | O_CREAT | O_APPEND, S_IRWXU);
  return retValue;
}


x86 assembly (clang, -O0):
<createTargetFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e9a(%rip),%rax
mov    (%rax),%esi
mov    0x2ec1(%rip),%rax
or     (%rax),%esi
mov    0x2e80(%rip),%rax
or     (%rax),%esi
mov    0x2e97(%rip),%rax
mov    (%rax),%edx
call   1030 <open@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createTargetFile>:
mov    0x2eb1(%rip),%rax
mov    0x2eda(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e97(%rip),%rax
or     (%rax),%esi
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_APPEND = global i32 0
@S_IRWXU = global i32 0
define i32 @createTargetFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 -1, i32* %3
%4 = load i8*, i8** %2
%5 = load i32, i32* @O_WRONLY
%6 = load i32, i32* @O_CREAT
%7 = or i32 %5, %6
%8 = load i32, i32* @O_APPEND
%9 = or i32 %7, %8
%10 = load i32, i32* @S_IRWXU
%11 = call i32 @open(i8* %4, i32 %9, i32 %10)
store i32 %11, i32* %3
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_APPEND = global i32 0
@S_IRWXU = global i32 0
define i32 @createTargetFile(i8* nocapture %0) {
%2 = load i32, i32* @O_WRONLY
%3 = load i32, i32* @O_CREAT
%4 = or i32 %3, %2
%5 = load i32, i32* @O_APPEND
%6 = or i32 %4, %5
%7 = load i32, i32* @S_IRWXU
%8 = tail call i32 @open(i8* %0, i32 %6, i32 %7)
ret i32 %8
}
/* Variables and functions */
scalar_t__ is_string(char const *);
int strlen(char const *);
int strlen2(const char *str) { return is_string(str) ? strlen(str) : 0; }


x86 assembly (clang, -O0):
<strlen2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <is_string@plt>
cmp    $0x0,%rax
je     1150 <strlen2+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
jmp    115a <strlen2+0x3a>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    115a <strlen2+0x3a>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen2>:
push   %rbx
mov    %rdi,%rbx
call   1040 <is_string@plt>
test   %rax,%rax
je     1137 <strlen2+0x17>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @strlen2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @is_string(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @strlen(i8* %7)
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %6
%11 = phi i32 [ %8, %6 ], [ 0, %9 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @strlen2(i8* %0) {
%2 = tail call i64 @is_string(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int getch();
scalar_t__ tui_kbhit();
int tui_getk() {
  int result;
  result = 0;
  if (tui_kbhit()) {
    result = getch();
  }
  return result;
}


x86 assembly (clang, -O0):
<tui_getk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <tui_kbhit@plt>
cmp    $0x0,%rax
je     114a <tui_getk+0x2a>
mov    $0x0,%al
call   1030 <getch@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tui_getk>:
push   %rax
xor    %eax,%eax
call   1040 <tui_kbhit@plt>
test   %rax,%rax
je     1135 <tui_getk+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <getch@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tui_getk() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @tui_kbhit()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @getch()
store i32 %5, i32* %1
br label %6
6: ; preds = %4, %0
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @tui_getk() {
%1 = tail call i64 (...) @tui_kbhit()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @getch()
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ 0, %0 ]
ret i32 %6
}
/* Variables and functions */
int clz(int);
int createRefCost(int ref) {
  if (ref == 0)
    return 0;
  ref = 16 - clz(ref);
  return ((ref << 1) - 1);
}


x86 assembly (clang, -O0):
<createRefCost>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <createRefCost+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1151 <createRefCost+0x41>
mov    -0x8(%rbp),%edi
call   1030 <clz@plt>
mov    %eax,%ecx
mov    $0x10,%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createRefCost>:
test   %edi,%edi
je     112a <createRefCost+0x1a>
push   %rax
call   1030 <clz@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x1f,%eax
sub    %ecx,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @createRefCost(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %14
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @clz(i32 %8)
%10 = sub nsw i32 16, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = shl i32 %11, 1
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %2
br label %14
14: ; preds = %7, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @createRefCost(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @clz(i32 %0)
%5 = mul i32 %4, -2
%6 = add i32 %5, 31
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
void msm_pm_boot_entry(void) {}


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

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

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

LLVM IR (-O2):
define void @msm_pm_boot_entry() {
ret void
}
/* Type definitions */
struct snd_kcontrol {
  int dummy;
};
struct snd_ctl_elem_info {
  int dummy;
};

/* Variables and functions */
int ac97_enum_text_info(struct snd_kcontrol *, struct snd_ctl_elem_info *,
                        char const **, int);
int ac97_surround_jack_mode_info(struct snd_kcontrol *kcontrol,
                                 struct snd_ctl_elem_info *uinfo) {
  static const char *texts[] = {"Shared", "Independent"};
  return ac97_enum_text_info(kcontrol, uinfo, texts, 2);
}


x86 assembly (clang, -O0):
<ac97_surround_jack_mode_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0x2f01(%rip),%rdx
mov    $0x2,%ecx
call   1030 <ac97_enum_text_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ac97_surround_jack_mode_info>:
lea    0x2f19(%rip),%rdx
mov    $0x2,%ecx
jmp    1030 <ac97_enum_text_info@plt>

LLVM IR (-O0):
%struct.snd_kcontrol = type { i32 }
%struct.snd_ctl_elem_info = type { i32 }
@ac97_surround_jack_mode_info.texts = internal global [2 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i32 0, i32 0)]
@.str = [7 x i8] c"Shared\00"
@.str.1 = [12 x i8] c"Independent\00"
define i32 @ac97_surround_jack_mode_info(%struct.snd_kcontrol* %0, %struct.snd_ctl_elem_info* %1) {
%3 = alloca %struct.snd_kcontrol*
%4 = alloca %struct.snd_ctl_elem_info*
store %struct.snd_kcontrol* %0, %struct.snd_kcontrol** %3
store %struct.snd_ctl_elem_info* %1, %struct.snd_ctl_elem_info** %4
%5 = load %struct.snd_kcontrol*, %struct.snd_kcontrol** %3
%6 = load %struct.snd_ctl_elem_info*, %struct.snd_ctl_elem_info** %4
%7 = call i32 @ac97_enum_text_info(%struct.snd_kcontrol* %5, %struct.snd_ctl_elem_info* %6, i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @ac97_surround_jack_mode_info.texts, i64 0, i64 0), i32 2)
ret i32 %7
}

LLVM IR (-O2):
%struct.snd_kcontrol = type { i32 }
%struct.snd_ctl_elem_info = type { i32 }
@ac97_surround_jack_mode_info.texts = internal global [2 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i32 0, i32 0)]
@.str = [7 x i8] c"Shared\00"
@.str.1 = [12 x i8] c"Independent\00"
define i32 @ac97_surround_jack_mode_info(%struct.snd_kcontrol* %0, %struct.snd_ctl_elem_info* %1) {
%3 = tail call i32 @ac97_enum_text_info(%struct.snd_kcontrol* %0, %struct.snd_ctl_elem_info* %1, i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @ac97_surround_jack_mode_info.texts, i64 0, i64 0), i32 2)
ret i32 %3
}
void foo466(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo466(i32 %0) {
ret void
}
void clear_flag(unsigned int *p_flag, unsigned int opt) { *p_flag &= ~opt; }


x86 assembly (clang, -O0):
<clear_flag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_flag>:
not    %esi
and    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @clear_flag(i32* nocapture %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = load i32, i32* %0
%5 = and i32 %4, %3
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
int strlen(char *);
int harf_sayisi(char *kelime) {
  int sayi = strlen(kelime);
  return sayi;
}


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

x86 assembly (clang, -O2):
<harf_sayisi>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i32 @harf_sayisi(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 %2
}
/* Variables and functions */
bool nrf52_errata_121(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_121() {
ret i32 0
}
short dummy_lswap2(short i) { return i; }


x86 assembly (clang, -O0):
<dummy_lswap2>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @dummy_lswap2(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
ret i16 %3
}

LLVM IR (-O2):
define signext i16 @dummy_lswap2(i16 returned signext %0) {
ret i16 %0
}
/* Type definitions */
struct ttfinfo {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void gsubChainingContextSubTable(FILE *ttf, int which, int stoffset,
                                 struct ttfinfo *info) {}


x86 assembly (clang, -O0):
<gsubChainingContextSubTable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ttfinfo = type { i32 }
define void @gsubChainingContextSubTable(i32* %0, i32 %1, i32 %2, %struct.ttfinfo* %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.ttfinfo*
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store %struct.ttfinfo* %3, %struct.ttfinfo** %8
ret void
}

LLVM IR (-O2):
%struct.ttfinfo = type { i32 }
define void @gsubChainingContextSubTable(i32* nocapture %0, i32 %1, i32 %2, %struct.ttfinfo* nocapture %3) {
ret void
}