xunge/DecIR huggingface dataset:
/* Type definitions */
struct dir_entry_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dir_entry_name(struct dir_entry_info const *);
int strcmp(int /*<<< orphan*/, int /*<<< orphan*/);
int sort_comp(const void *pa, const void *pb) {
  const struct dir_entry_info *a = *(const struct dir_entry_info **)pa;
  const struct dir_entry_info *b = *(const struct dir_entry_info **)pb;
  return strcmp(dir_entry_name(a), dir_entry_name(b));
}


x86 assembly (clang, -O0):
<sort_comp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <dir_entry_name@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <dir_entry_name@plt>
mov    -0x24(%rbp),%edi
mov    %eax,%esi
call   1040 <strcmp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort_comp>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%rdi
mov    (%rsi),%rbx
call   1030 <dir_entry_name@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <dir_entry_name@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <strcmp@plt>

LLVM IR (-O0):
%struct.dir_entry_info = type { i32 }
define i32 @sort_comp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.dir_entry_info*
%6 = alloca %struct.dir_entry_info*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.dir_entry_info**
%9 = load %struct.dir_entry_info*, %struct.dir_entry_info** %8
store %struct.dir_entry_info* %9, %struct.dir_entry_info** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to %struct.dir_entry_info**
%12 = load %struct.dir_entry_info*, %struct.dir_entry_info** %11
store %struct.dir_entry_info* %12, %struct.dir_entry_info** %6
%13 = load %struct.dir_entry_info*, %struct.dir_entry_info** %5
%14 = call i32 @dir_entry_name(%struct.dir_entry_info* %13)
%15 = load %struct.dir_entry_info*, %struct.dir_entry_info** %6
%16 = call i32 @dir_entry_name(%struct.dir_entry_info* %15)
%17 = call i32 @strcmp(i32 %14, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
%struct.dir_entry_info = type { i32 }
define i32 @sort_comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to %struct.dir_entry_info**
%4 = load %struct.dir_entry_info*, %struct.dir_entry_info** %3
%5 = bitcast i8* %1 to %struct.dir_entry_info**
%6 = load %struct.dir_entry_info*, %struct.dir_entry_info** %5
%7 = tail call i32 @dir_entry_name(%struct.dir_entry_info* %4)
%8 = tail call i32 @dir_entry_name(%struct.dir_entry_info* %6)
%9 = tail call i32 @strcmp(i32 %7, i32 %8)
ret i32 %9
}
/* Variables and functions */
long strtol(char const *, char **, int);
long hexStrToLong(const char *adhex) {
  char *p;
  long n = strtol(adhex, &p, 16);
  if (*p != '\0') {
    return -1;
  }
  return n;
}


x86 assembly (clang, -O0):
<hexStrToLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x10,%edx
call   1030 <strtol@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114f <hexStrToLong+0x3f>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1157 <hexStrToLong+0x47>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexStrToLong>:
push   %rax
mov    %rsp,%rsi
mov    $0x10,%edx
call   1030 <strtol@plt>
mov    (%rsp),%rcx
xor    %edx,%edx
cmp    (%rcx),%dl
sbb    %rcx,%rcx
or     %rcx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @hexStrToLong(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtol(i8* %0, i8** %2, i32 16)
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = select i1 %7, i64 %4, i64 -1
ret i64 %8
}
void fd35(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  a : {
    typedef int(*c)[n];
  p012A:
    goto p012A;
    goto a;
  P012A:
    goto P012A;
    0;
  }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd35>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd35+0x7>

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

LLVM IR (-O0):
define void @fd35(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %4
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
br label %10
10: ; preds = %10, %7
br label %10
11: ; preds = %11
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd35(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int chaz_CC_test_macro(char const *, char const *);
int chaz_CC_test_gcc_version(const char *predicate) {
  static const char version[] =
      "10000 * __GNUC__ + 100 * __GNUC_MINOR__ + __GNUC_PATCHLEVEL__";
  return chaz_CC_test_macro(version, predicate);
}


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

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

LLVM IR (-O0):
@chaz_CC_test_gcc_version.version = internal constant [62 x i8] c"10000 * __GNUC__ + 100 * __GNUC_MINOR__ + __GNUC_PATCHLEVEL__\00"
define i32 @chaz_CC_test_gcc_version(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @chaz_CC_test_macro(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @chaz_CC_test_gcc_version.version, i64 0, i64 0), i8* %3)
ret i32 %4
}

LLVM IR (-O2):
@chaz_CC_test_gcc_version.version = internal constant [62 x i8] c"10000 * __GNUC__ + 100 * __GNUC_MINOR__ + __GNUC_PATCHLEVEL__\00"
define i32 @chaz_CC_test_gcc_version(i8* %0) {
%2 = tail call i32 @chaz_CC_test_macro(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @chaz_CC_test_gcc_version.version, i64 0, i64 0), i8* %0)
ret i32 %2
}
void foo808(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo808(i32 %0) {
ret void
}
/* Variables and functions */
char *ocuridecodeonly(char *, int /*<<< orphan*/ *);
char *ocuridecode(char *s) { return ocuridecodeonly(s, NULL); }


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

x86 assembly (clang, -O2):
<ocuridecode>:
xor    %esi,%esi
jmp    1030 <ocuridecodeonly@plt>

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

LLVM IR (-O2):
define i8* @ocuridecode(i8* %0) {
%2 = tail call i8* @ocuridecodeonly(i8* %0, i32* null)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x57() {
  Assert_real((ispunct(87) == 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_ispunct.c",
              440, ("ispunct should be 0 for W"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x57>:
push   %rax
mov    $0x57,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1b8,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for W\00"
define void @t_ispunct_0x57() {
%1 = call i64 @ispunct(i32 87)
%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 440, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for W\00"
define void @t_ispunct_0x57() {
%1 = tail call i64 @ispunct(i32 87)
%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 440, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int max_of_four(int, int, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main() {
  int a, b, c, d;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  int ans = max_of_four(a, b, c, d);
  printf("%d", ans);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <max_of_four@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1050 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
call   1030 <max_of_four@plt>
lea    0xe99(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @max_of_four(i32 %8, i32 %9, i32 %10, i32 %11)
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @max_of_four(i32 %10, i32 %11, i32 %12, i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %14)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ readFile(int, void *, size_t);
int /*<<< orphan*/ seekFile(int, size_t);
void readFileAt(int fileIndex, size_t offset, void *dest, size_t size) {
  seekFile(fileIndex, offset);
  readFile(fileIndex, dest, size);
}


x86 assembly (clang, -O0):
<readFileAt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <seekFile@plt>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <readFile@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readFileAt>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %edi,%ebp
call   1030 <seekFile@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <readFile@plt>

LLVM IR (-O0):
define void @readFileAt(i32 %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i32 %0, i32* %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
%10 = load i64, i64* %6
%11 = call i32 @seekFile(i32 %9, i64 %10)
%12 = load i32, i32* %5
%13 = load i8*, i8** %7
%14 = load i64, i64* %8
%15 = call i32 @readFile(i32 %12, i8* %13, i64 %14)
ret void
}

LLVM IR (-O2):
define void @readFileAt(i32 %0, i64 %1, i8* %2, i64 %3) {
%5 = tail call i32 @seekFile(i32 %0, i64 %1)
%6 = tail call i32 @readFile(i32 %0, i8* %2, i64 %3)
ret void
}
byebye(mesg) char *mesg;
{
  printf("%s\n", mesg);
  xxit(1);
}


x86 assembly (clang, -O0):
<byebye>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x0,%al
call   1040 <xxit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<byebye>:
push   %rax
call   1030 <puts@plt>
mov    $0x1,%edi
xor    %eax,%eax
pop    %rcx
jmp    1040 <xxit@plt>

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

LLVM IR (-O2):
define i32 @byebye(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @xxit to i32 (i32, ...)*)(i32 1)
ret i32 undef
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
size_t strlen(char *);
char *hvm_sym_strclone(char *str) {
  size_t len = strlen(str);
  char *clone = malloc(sizeof(char) * (size_t)(len + 1));
  strcpy(clone, str);
  return clone;
}


x86 assembly (clang, -O0):
<hvm_sym_strclone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hvm_sym_strclone>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @hvm_sym_strclone(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = add i64 %7, 1
%9 = mul i64 1, %8
%10 = trunc i64 %9 to i32
%11 = call i8* @malloc(i32 %10)
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = load i8*, i8** %2
%14 = call i32 @strcpy(i8* %12, i8* %13)
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
define i8* @hvm_sym_strclone(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add i32 %3, 1
%5 = tail call i8* @malloc(i32 %4)
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
int execute_settimeofday() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_settimeofday() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *argv) {
  printf("usage: %s [integer]\n", argv);
  printf("This program takes a numbers and finds the next smallest prime.\n");
  exit(0);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"usage: %s [integer]\0A\00"
@.str.1 = [65 x i8] c"This program takes a numbers and finds the next smallest prime.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"usage: %s [integer]\0A\00"
@str = [64 x i8] c"This program takes a numbers and finds the next smallest prime.\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char);
int /*<<< orphan*/ puts(char *);
void dumpData(unsigned char *data, unsigned int len) {
  unsigned int i = 0;
  for (i = 0; i < len; i++) {
    printf("%02x  ", *(data + i));
  }
  puts("");
}


x86 assembly (clang, -O0):
<dumpData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    116e <dumpData+0x4e>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
lea    0xea9(%rip),%rdi
movzbl (%rax,%rcx,1),%esi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <dumpData+0x1d>
lea    0xe91(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpData>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
je     1156 <dumpData+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movzbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <dumpData+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%02x \00"
define void @dumpData(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 zeroext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
int ft_toupper(int c) {
  if (c <= 122 && c >= 97)
    return (c - 32);
  return (c);
}


x86 assembly (clang, -O0):
<ft_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x7a,-0x8(%rbp)
jg     1129 <ft_toupper+0x29>
cmpl   $0x61,-0x8(%rbp)
jl     1129 <ft_toupper+0x29>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <ft_toupper+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_toupper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @ft_toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 122
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 97
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 32
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @ft_toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
int have_first_special_num(int number, int special_num) {
  int num_tmp;
  while (number > 0) {
    num_tmp = number % 10;
    number /= 10;
    if (num_tmp == special_num)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<have_first_special_num>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    114d <have_first_special_num+0x4d>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1148 <have_first_special_num+0x48>
movl   $0x1,-0x4(%rbp)
jmp    1154 <have_first_special_num+0x54>
jmp    110a <have_first_special_num+0xa>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<have_first_special_num>:
mov    $0xcccccccd,%eax
cs nopw 0x0(%rax,%rax,1)
nop
test   %edi,%edi
jle    1132 <have_first_special_num+0x32>
mov    %edi,%ecx
imul   %rax,%rcx
shr    $0x23,%rcx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%edi
cmp    %esi,%edi
mov    %ecx,%edi
jne    1110 <have_first_special_num+0x10>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @have_first_special_num(i32 %0, i32 %1) {
br label %3
3: ; preds = %6, %2
%4 = phi i32 [ %0, %2 ], [ %8, %6 ]
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = urem i32 %4, 10
%8 = udiv i32 %4, 10
%9 = icmp eq i32 %7, %1
br i1 %9, label %10, label %3
10: ; preds = %3, %6
%11 = phi i32 [ 1, %6 ], [ 0, %3 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ add(int /*<<< orphan*/, int /*<<< orphan*/);
uint32_t dbl(uint32_t x) { return add(x, x); }


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

x86 assembly (clang, -O2):
<dbl>:
mov    %edi,%esi
jmp    1030 <add@plt>

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

LLVM IR (-O2):
define i32 @dbl(i32 %0) {
%2 = tail call i32 @add(i32 %0, i32 %0)
ret i32 %2
}
/* Variables and functions */
size_t cli_val_address_sizeof(void) { return sizeof(void *); }


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

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

LLVM IR (-O0):
define i64 @cli_val_address_sizeof() {
ret i64 8
}

LLVM IR (-O2):
define i64 @cli_val_address_sizeof() {
ret i64 8
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int fuzix_isgraph(int c) { return ((uint8_t)c >= 33) && ((uint8_t)c <= 126); }


x86 assembly (clang, -O0):
<fuzix_isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x21,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <fuzix_isgraph+0x20>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fuzix_isgraph>:
add    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x5e,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @fuzix_isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 33
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 126
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @fuzix_isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
bool isSafe(int x, int y, int sol[8][8]) {
  return (x >= 0 && x < 8 && y >= 0 && y < 8 && sol[x][y] == -1);
}


x86 assembly (clang, -O0):
<isSafe>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x11(%rbp)
jl     1167 <isSafe+0x67>
xor    %eax,%eax
cmpl   $0x8,-0x4(%rbp)
mov    %al,-0x11(%rbp)
jge    1167 <isSafe+0x67>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jl     1167 <isSafe+0x67>
xor    %eax,%eax
cmpl   $0x8,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jge    1167 <isSafe+0x67>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
cmpl   $0xffffffff,(%rax,%rcx,4)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSafe>:
mov    %esi,%ecx
or     %edi,%ecx
xor    %eax,%eax
cmp    $0x7,%ecx
ja     111f <isSafe+0x1f>
mov    %edi,%eax
mov    %esi,%ecx
shl    $0x5,%rax
add    %rax,%rdx
xor    %eax,%eax
cmpl   $0xffffffff,(%rdx,%rcx,4)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isSafe(i32 %0, i32 %1, [8 x i32]* nocapture %2) {
%4 = or i32 %1, %0
%5 = icmp ult i32 %4, 8
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = zext i32 %0 to i64
%8 = zext i32 %1 to i64
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 %7, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, -1
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %6, %3
%14 = phi i32 [ 0, %3 ], [ %12, %6 ]
ret i32 %14
}
int yuiIsCharAlphaNum(char c) {
  return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
         (c >= '0' && c <= '9');
}


x86 assembly (clang, -O0):
<yuiIsCharAlphaNum>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <yuiIsCharAlphaNum+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    116d <yuiIsCharAlphaNum+0x6d>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1148 <yuiIsCharAlphaNum+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    116d <yuiIsCharAlphaNum+0x6d>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x3(%rbp)
jl     1167 <yuiIsCharAlphaNum+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yuiIsCharAlphaNum>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
add    $0xd0,%dil
cmp    $0xa,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @yuiIsCharAlphaNum(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %28, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br i1 %17, label %28, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 48
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 57
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %14, %6
%29 = phi i1 [ true, %14 ], [ true, %6 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @yuiIsCharAlphaNum(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = add i8 %0, -48
%6 = icmp ult i8 %5, 10
%7 = or i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
int test_imm_73int64_lowword_mem(long long *val) {
  return ((*val) & (0x73 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_73int64_lowword_mem>:
testb  $0x73,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_73int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 115
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int main() {
  int a;
  a++;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void tr_onArrayStart(char *name) { ; }


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

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

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

LLVM IR (-O2):
define void @tr_onArrayStart(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Widget;

/* Variables and functions */
int /*<<< orphan*/ XRaiseWindow(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ XtDisplay(int /*<<< orphan*/);
int /*<<< orphan*/ XtWindow(int /*<<< orphan*/);
void RaiseWidget(Widget wWidget) {
  XRaiseWindow(XtDisplay(wWidget), XtWindow(wWidget));
}


x86 assembly (clang, -O0):
<RaiseWidget>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <XtDisplay@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <XtWindow@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1050 <XRaiseWindow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RaiseWidget>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <XtDisplay@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <XtWindow@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <XRaiseWindow@plt>

LLVM IR (-O0):
define void @RaiseWidget(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @XtDisplay(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @XtWindow(i32 %5)
%7 = call i32 @XRaiseWindow(i32 %4, i32 %6)
ret void
}

LLVM IR (-O2):
define void @RaiseWidget(i32 %0) {
%2 = tail call i32 @XtDisplay(i32 %0)
%3 = tail call i32 @XtWindow(i32 %0)
%4 = tail call i32 @XRaiseWindow(i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void init() { printf("Zero Shell (c) 2015, Marc Sances\n"); }


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"Zero Shell (c) 2015, Marc Sances\0A\00"
define void @init() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [33 x i8] c"Zero Shell (c) 2015, Marc Sances\00"
define void @init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double tune_mpres_mul(size_t, int);
double tune_mpres_mul_mpz(size_t n) { return tune_mpres_mul(n, 1); }


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

x86 assembly (clang, -O2):
<tune_mpres_mul_mpz>:
mov    $0x1,%esi
jmp    1030 <tune_mpres_mul@plt>

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

LLVM IR (-O2):
define double @tune_mpres_mul_mpz(i64 %0) {
%2 = tail call double @tune_mpres_mul(i64 %0, i32 1)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ buffer_underflow();
void buffer_underflow_test(void **state) { buffer_underflow(); }


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

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

LLVM IR (-O0):
define void @buffer_underflow_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 (...) @buffer_underflow()
ret void
}

LLVM IR (-O2):
define void @buffer_underflow_test(i8** nocapture readnone %0) {
%2 = tail call i32 (...) @buffer_underflow()
ret void
}
/* Variables and functions */
scalar_t__ ASRT_Double(double, double, double);
int /*<<< orphan*/ ASRT_Mark(char *, int, char *);
int test_DoubleOk() {
  do {
    ASRT_Mark("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/"
              "src/asrt_tests.c",
              90,
              "123.45"
              " == "
              "123.55");
    if (ASRT_Double(123.45, 123.55, 0.2)) {
      return 1;
    };
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_DoubleOk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee9(%rip),%rdi
mov    $0x5a,%esi
lea    0xf6d(%rip),%rdx
call   1040 <ASRT_Mark@plt>
movsd  0xeb8(%rip),%xmm0
movsd  0xeb8(%rip),%xmm1
movsd  0xeb8(%rip),%xmm2
call   1030 <ASRT_Double@plt>
cmp    $0x0,%rax
je     1173 <test_DoubleOk+0x53>
movl   $0x1,-0x4(%rbp)
jmp    117f <test_DoubleOk+0x5f>
jmp    1178 <test_DoubleOk+0x58>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_DoubleOk>:
push   %rax
lea    0xef0(%rip),%rdi
lea    0xf79(%rip),%rdx
mov    $0x5a,%esi
call   1040 <ASRT_Mark@plt>
movsd  0xebf(%rip),%xmm0
movsd  0xebf(%rip),%xmm1
movsd  0xebf(%rip),%xmm2
call   1030 <ASRT_Double@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/src/asrt_tests.c\00"
@.str.1 = [17 x i8] c"123.45 == 123.55\00"
define i32 @test_DoubleOk() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = call i32 @ASRT_Mark(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 90, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%4 = call i64 @ASRT_Double(double 1.234500e+02, double 1.235500e+02, double 2.000000e-01)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %2
store i32 1, i32* %1
br label %9
7: ; preds = %2
br label %8
8: ; preds = %7
store i32 0, i32* %1
br label %9
9: ; preds = %8, %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/src/asrt_tests.c\00"
@.str.1 = [17 x i8] c"123.45 == 123.55\00"
define i32 @test_DoubleOk() {
%1 = tail call i32 @ASRT_Mark(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 90, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @ASRT_Double(double 1.234500e+02, double 1.235500e+02, double 2.000000e-01)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void CG_VoiceChat(int mode) {}


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

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

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

LLVM IR (-O2):
define void @CG_VoiceChat(i32 %0) {
ret void
}
int shgetc(char *input, int *index) {
  int res = input[*index];
  (*index)++;
  return res;
}


x86 assembly (clang, -O0):
<shgetc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shgetc>:
movslq (%rsi),%rcx
movsbl (%rdi,%rcx,1),%eax
add    $0x1,%ecx
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
define i32 @shgetc(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 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
store i32 %12, i32* %5
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = add nsw i32 %14, 1
store i32 %15, i32* %13
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @shgetc(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = add nsw i32 %3, 1
store i32 %8, i32* %1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ PR_SET_NAME;
int prctl(int /*<<< orphan*/, char *);
void kore_platform_proctitle(char *title) {
  if (prctl(PR_SET_NAME, title) == -1) {
    ;
  }
}


x86 assembly (clang, -O0):
<kore_platform_proctitle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <prctl@plt>
cmp    $0xffffffff,%eax
jne    113c <kore_platform_proctitle+0x2c>
jmp    113c <kore_platform_proctitle+0x2c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kore_platform_proctitle>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
jmp    1030 <prctl@plt>

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

LLVM IR (-O2):
@PR_SET_NAME = global i32 0
define void @kore_platform_proctitle(i8* %0) {
%2 = load i32, i32* @PR_SET_NAME
%3 = tail call i32 @prctl(i32 %2, i8* %0)
ret void
}
char *gov_sym(int gov) {
  if (gov)
    return "g";
  else
    return "a";
}


x86 assembly (clang, -O0):
<gov_sym>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1121 <gov_sym+0x21>
lea    0xee8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112c <gov_sym+0x2c>
lea    0xeda(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gov_sym>:
test   %edi,%edi
lea    0xef9(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"g\00"
@.str.1 = [2 x i8] c"a\00"
define i8* @gov_sym(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [2 x i8] c"g\00"
@.str.1 = [2 x i8] c"a\00"
define i8* @gov_sym(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}