xunge/DecIR huggingface dataset:
/* Variables and functions */
void test() {
  int *i = NULL;
  *i = 2;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @test() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = load i32*, i32** %1
store i32 2, i32* %2
ret void
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ show_prompt();
int /*<<< orphan*/ stdout;
void handle_signal(int signum) {
  printf("\n");
  show_prompt();
  fflush(stdout);
}


x86 assembly (clang, -O0):
<handle_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <show_prompt@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_signal>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <show_prompt@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1050 <fflush@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@stdout = global i32 0
define void @handle_signal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @show_prompt()
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @handle_signal(i32 %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 (...) @show_prompt()
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
ret void
}
int rb_isspace(int c) { return c == ' ' || ('\t' <= c && c <= '\r'); }


x86 assembly (clang, -O0):
<rb_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1139 <rb_isspace+0x39>
xor    %eax,%eax
mov    $0x9,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x6(%rbp)
jg     1133 <rb_isspace+0x33>
cmpl   $0xd,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb_isspace>:
cmp    $0x20,%edi
sete   %al
add    $0xfffffff7,%edi
cmp    $0x5,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @rb_isspace(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = add i32 %0, -9
%4 = icmp ult i32 %3, 5
%5 = or i1 %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ main2();
int /*<<< orphan*/ system(char *);
int main() {
  main2();
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <main2@plt>
lea    0xece(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"pause\00"
define i32 @main() {
%1 = call i32 (...) @main2()
%2 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"pause\00"
define i32 @main() {
%1 = tail call i32 (...) @main2()
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, char const *, int);
void die_cl(const char *func, int err) {
  die("Call to %s failed with code %d\n", func, err);
}


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

x86 assembly (clang, -O2):
<die_cl>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <die@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Call to %s failed with code %d\0A\00"
define void @die_cl(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @die(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Call to %s failed with code %d\0A\00"
define void @die_cl(i8* %0, i32 %1) {
%3 = tail call i32 @die(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
void endianTest(int *endian_ness) {
  if ((*(unsigned short *)("#S") >> 8) == '#') {
    *endian_ness = !(0);
  } else {
    *endian_ness = 0;
  }
}


x86 assembly (clang, -O0):
<endianTest>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movzwl 0xef1(%rip),%eax
sar    $0x8,%eax
cmp    $0x23,%eax
jne    112a <endianTest+0x2a>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
jmp    1134 <endianTest+0x34>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<endianTest>:
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
@.str = [3 x i8] c"#S\00"
define void @endianTest(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i16, i16* bitcast ([3 x i8]* @.str to i16*)
%4 = zext i16 %3 to i32
%5 = ashr i32 %4, 8
%6 = icmp eq i32 %5, 35
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32*, i32** %2
store i32 1, i32* %8
br label %11
9: ; preds = %1
%10 = load i32*, i32** %2
store i32 0, i32* %10
br label %11
11: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
define void @endianTest(i32* nocapture writeonly %0) {
store i32 0, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exec_shell(int);
void child_process(int sock) { exec_shell(sock); }


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

x86 assembly (clang, -O2):
<child_process>:
jmp    1030 <exec_shell@plt>

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

LLVM IR (-O2):
define void @child_process(i32 %0) {
%2 = tail call i32 @exec_shell(i32 %0)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void *run_container_create_range(int /*<<< orphan*/, int /*<<< orphan*/);
void *container_range_of_ones(uint32_t range_start, uint32_t range_end,
                              uint8_t *result_type) {
  *result_type = 3;
  return run_container_create_range(range_start, range_end);
}


x86 assembly (clang, -O0):
<container_range_of_ones>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <run_container_create_range@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<container_range_of_ones>:
movl   $0x3,(%rdx)
jmp    1030 <run_container_create_range@plt>

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

LLVM IR (-O2):
define i8* @container_range_of_ones(i32 %0, i32 %1, i32* nocapture writeonly %2) {
store i32 3, i32* %2
%4 = tail call i8* @run_container_create_range(i32 %0, i32 %1)
ret i8* %4
}
void fa111(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    a:
      goto a;
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa111>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa111+0x4>

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

LLVM IR (-O0):
define void @fa111() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; preds = %19
br label %19
20: ; No predecessors!
br label %21
21: ; preds = %21, %20
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
br label %24
24: ; preds = %24, %23
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
27: ; preds = %27
br label %27
}

LLVM IR (-O2):
define void @fa111() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int mystrncpy(char *, char *, int /*<<< orphan*/, int);
int mystrcpy(char *source, char *dest) {
  return mystrncpy(source, dest, 0, -1);
}


x86 assembly (clang, -O0):
<mystrcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
mov    $0xffffffff,%ecx
call   1030 <mystrncpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrcpy>:
xor    %edx,%edx
mov    $0xffffffff,%ecx
jmp    1030 <mystrncpy@plt>

LLVM IR (-O0):
define i32 @mystrcpy(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 @mystrncpy(i8* %5, i8* %6, i32 0, i32 -1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @mystrcpy(i8* %0, i8* %1) {
%3 = tail call i32 @mystrncpy(i8* %0, i8* %1, i32 0, i32 -1)
ret i32 %3
}
/* Variables and functions */
char *strip_cr(char const *);
const char *help_fix(const char *text) {
  char *fixed;
  if (!text)
    return "";
  fixed = strip_cr(text);
  if (fixed[0] == ' ')
    fixed[0] = '.';
  return fixed;
}


x86 assembly (clang, -O0):
<help_fix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <help_fix+0x27>
lea    0xed2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1163 <help_fix+0x53>
mov    -0x10(%rbp),%rdi
call   1030 <strip_cr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    115b <help_fix+0x4b>
mov    -0x18(%rbp),%rax
movb   $0x2e,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_fix>:
push   %rax
test   %rdi,%rdi
je     1125 <help_fix+0x15>
call   1030 <strip_cr@plt>
cmpb   $0x20,(%rax)
jne    1123 <help_fix+0x13>
movb   $0x2e,(%rax)
pop    %rcx
ret
lea    0xed4(%rip),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @help_fix(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @strip_cr(i8* %0)
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 32
br i1 %6, label %7, label %8
7: ; preds = %3
store i8 46, i8* %4
br label %8
8: ; preds = %3, %7, %1
%9 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %1 ], [ %4, %7 ], [ %4, %3 ]
ret i8* %9
}
void gtk_text_iter_forward_to_line_end() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_forward_to_line_end() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void setBgColour(int code) { printf("\033[%dm", (code % 8) + 40); }


x86 assembly (clang, -O0):
<setBgColour>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x28,%esi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setBgColour>:
lea    0x7(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
and    $0xfffffff8,%eax
neg    %eax
lea    (%rdi,%rax,1),%esi
add    $0x28,%esi
lea    0xed6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[%dm\00"
define void @setBgColour(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 8
%5 = add nsw i32 %4, 40
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%dm\00"
define void @setBgColour(i32 %0) {
%2 = srem i32 %0, 8
%3 = add nsw i32 %2, 40
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
void test9(int n, int a[n]) {}


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

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

LLVM IR (-O0):
define void @test9(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 = zext i32 %5 to i64
ret void
}

LLVM IR (-O2):
define void @test9(i32 %0, i32* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x7c() {
  Assert_real((isspace(124) == 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_isspace.c",
              625, ("isspace should be 0 for |"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x7c>:
push   %rax
mov    $0x7c,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x271,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for |\00"
define void @t_isspace_0x7c() {
%1 = call i64 @isspace(i32 124)
%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 625, 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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for |\00"
define void @t_isspace_0x7c() {
%1 = tail call i64 @isspace(i32 124)
%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 625, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int mktemp_internal(char *, int /*<<< orphan*/, int);
char *mkdtemp(char *path) {
  int error;
  error = mktemp_internal(path, 0, 2);
  return (error ? NULL : path);
}


x86 assembly (clang, -O0):
<mkdtemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <mktemp_internal@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1144 <mkdtemp+0x34>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    114c <mkdtemp+0x3c>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdtemp>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <mktemp_internal@plt>
test   %eax,%eax
cmove  %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @mkdtemp(i8* %0) {
%2 = tail call i32 @mktemp_internal(i8* %0, i32 0, i32 2)
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i8* %0, i8* null
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("jhhi1");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"jhhi1\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"jhhi1\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _out(int, int);
int /*<<< orphan*/ yield_hw();
void goto_sector(unsigned int c, unsigned int s) {
  _out(0x110, (c >> 8) & 0xFF);
  _out(0x110 + 1, c & 0xFF);
  _out(0x110 + 2, (s >> 8) & 0xFF);
  _out(0x110 + 3, s & 0xFF);
  _out(0x3F6, 0x02);
  yield_hw();
}


x86 assembly (clang, -O0):
<goto_sector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
shr    $0x8,%esi
and    $0xff,%esi
mov    $0x110,%edi
call   1030 <_out@plt>
mov    -0x4(%rbp),%esi
and    $0xff,%esi
mov    $0x111,%edi
call   1030 <_out@plt>
mov    -0x8(%rbp),%esi
shr    $0x8,%esi
and    $0xff,%esi
mov    $0x112,%edi
call   1030 <_out@plt>
mov    -0x8(%rbp),%esi
and    $0xff,%esi
mov    $0x113,%edi
call   1030 <_out@plt>
mov    $0x3f6,%edi
mov    $0x2,%esi
call   1030 <_out@plt>
mov    $0x0,%al
call   1040 <yield_hw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goto_sector>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
movzbl %bh,%esi
mov    $0x110,%edi
call   1030 <_out@plt>
movzbl %bl,%esi
mov    $0x111,%edi
call   1030 <_out@plt>
mov    %ebp,%ebx
movzbl %bh,%esi
mov    $0x112,%edi
call   1030 <_out@plt>
movzbl %bl,%esi
mov    $0x113,%edi
call   1030 <_out@plt>
mov    $0x3f6,%edi
mov    $0x2,%esi
call   1030 <_out@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <yield_hw@plt>

LLVM IR (-O0):
define void @goto_sector(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 = lshr i32 %5, 8
%7 = and i32 %6, 255
%8 = call i32 @_out(i32 272, i32 %7)
%9 = load i32, i32* %3
%10 = and i32 %9, 255
%11 = call i32 @_out(i32 273, i32 %10)
%12 = load i32, i32* %4
%13 = lshr i32 %12, 8
%14 = and i32 %13, 255
%15 = call i32 @_out(i32 274, i32 %14)
%16 = load i32, i32* %4
%17 = and i32 %16, 255
%18 = call i32 @_out(i32 275, i32 %17)
%19 = call i32 @_out(i32 1014, i32 2)
%20 = call i32 (...) @yield_hw()
ret void
}

LLVM IR (-O2):
define void @goto_sector(i32 %0, i32 %1) {
%3 = lshr i32 %0, 8
%4 = and i32 %3, 255
%5 = tail call i32 @_out(i32 272, i32 %4)
%6 = and i32 %0, 255
%7 = tail call i32 @_out(i32 273, i32 %6)
%8 = lshr i32 %1, 8
%9 = and i32 %8, 255
%10 = tail call i32 @_out(i32 274, i32 %9)
%11 = and i32 %1, 255
%12 = tail call i32 @_out(i32 275, i32 %11)
%13 = tail call i32 @_out(i32 1014, i32 2)
%14 = tail call i32 (...) @yield_hw()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ motorKontrol(int, int);
int ileriGit(int deger) {
  if (deger < 0) {
    motorKontrol(deger * -1, deger * -1);
  } else {
    motorKontrol(deger, deger);
  }
}


x86 assembly (clang, -O0):
<ileriGit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1137 <ileriGit+0x27>
imul   $0xffffffff,-0x8(%rbp),%edi
imul   $0xffffffff,-0x8(%rbp),%esi
call   1030 <motorKontrol@plt>
jmp    1142 <ileriGit+0x32>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <motorKontrol@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ileriGit>:
push   %rax
test   %edi,%edi
jns    1117 <ileriGit+0x7>
neg    %edi
mov    %edi,%esi
call   1030 <motorKontrol@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ileriGit(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = sub nsw i32 0, %0
%5 = tail call i32 @motorKontrol(i32 %4, i32 %4)
br label %8
6: ; preds = %1
%7 = tail call i32 @motorKontrol(i32 %0, i32 %0)
br label %8
8: ; preds = %6, %3
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ _DIAGASSERT(int /*<<< orphan*/);
int strcmp(char const *, char const *);
int strcoll(const char *s1, const char *s2) {
  _DIAGASSERT(s1 != NULL);
  _DIAGASSERT(s2 != NULL);
  return (strcmp(s1, s2));
}


x86 assembly (clang, -O0):
<strcoll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <_DIAGASSERT@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <_DIAGASSERT@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcoll>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <_DIAGASSERT@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1040 <_DIAGASSERT@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @strcoll(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 = icmp ne i8* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @_DIAGASSERT(i32 %7)
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @_DIAGASSERT(i32 %11)
%13 = load i8*, i8** %3
%14 = load i8*, i8** %4
%15 = call i32 @strcmp(i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @strcoll(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @_DIAGASSERT(i32 %4)
%6 = icmp ne i8* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @_DIAGASSERT(i32 %7)
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %9
}
int degrees_to_drive_encoder(float degrees_value) {
  return (degrees_value * (1308.0 / 360) * .5);
}


x86 assembly (clang, -O0):
<degrees_to_drive_encoder>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeee(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeda(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<degrees_to_drive_encoder>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @degrees_to_drive_encoder(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double %4, 0x400D111111111111
%6 = fmul double %5, 5.000000e-01
%7 = fptosi double %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @degrees_to_drive_encoder(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 0x400D111111111111
%4 = fmul double %3, 5.000000e-01
%5 = fptosi double %4 to i32
ret i32 %5
}
int kgsl_get_ptname_from_ptbase(unsigned int pt_base) {}


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

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

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

LLVM IR (-O2):
define i32 @kgsl_get_ptname_from_ptbase(i32 %0) {
ret i32 undef
}
/* Type definitions */
struct cec_msg {
  int len;
  int /*<<< orphan*/ *msg;
};
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
int /*<<< orphan*/ CEC_MSG_SYSTEM_AUDIO_MODE_STATUS;
void cec_msg_system_audio_mode_status(struct cec_msg *msg,
                                      __u8 sys_aud_status) {
  msg->len = 3;
  msg->msg[1] = CEC_MSG_SYSTEM_AUDIO_MODE_STATUS;
  msg->msg[2] = sys_aud_status;
}


x86 assembly (clang, -O0):
<cec_msg_system_audio_mode_status>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x3,(%rax)
mov    0x2ecc(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_msg_system_audio_mode_status>:
movl   $0x3,(%rdi)
mov    0x2edb(%rip),%rax
mov    (%rax),%eax
mov    0x8(%rdi),%rcx
mov    %eax,0x4(%rcx)
mov    %esi,0x8(%rcx)
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32, i32* }
@CEC_MSG_SYSTEM_AUDIO_MODE_STATUS = global i32 0
define void @cec_msg_system_audio_mode_status(%struct.cec_msg* %0, i32 %1) {
%3 = alloca %struct.cec_msg*
%4 = alloca i32
store %struct.cec_msg* %0, %struct.cec_msg** %3
store i32 %1, i32* %4
%5 = load %struct.cec_msg*, %struct.cec_msg** %3
%6 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %5, i32 0, i32 0
store i32 3, i32* %6
%7 = load i32, i32* @CEC_MSG_SYSTEM_AUDIO_MODE_STATUS
%8 = load %struct.cec_msg*, %struct.cec_msg** %3
%9 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %8, i32 0, i32 1
%10 = load i32*, i32** %9
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32 %7, i32* %11
%12 = load i32, i32* %4
%13 = load %struct.cec_msg*, %struct.cec_msg** %3
%14 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %13, i32 0, i32 1
%15 = load i32*, i32** %14
%16 = getelementptr inbounds i32, i32* %15, i64 2
store i32 %12, i32* %16
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32, i32* }
@CEC_MSG_SYSTEM_AUDIO_MODE_STATUS = global i32 0
define void @cec_msg_system_audio_mode_status(%struct.cec_msg* nocapture %0, i32 %1) {
%3 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
store i32 3, i32* %3
%4 = load i32, i32* @CEC_MSG_SYSTEM_AUDIO_MODE_STATUS
%5 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 1
%6 = load i32*, i32** %5
%7 = getelementptr inbounds i32, i32* %6, i64 1
store i32 %4, i32* %7
%8 = getelementptr inbounds i32, i32* %6, i64 2
store i32 %1, i32* %8
ret void
}
/* Type definitions */
struct _similarity {
  int dummy;
};

/* Variables and functions */
double sqrtf(float);
float similarity_query_norm(struct _similarity *_sml,
                            float _sum_of_squared_weights) {
  return 1.0 / sqrtf(_sum_of_squared_weights);
}


x86 assembly (clang, -O0):
<similarity_query_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm1
movsd  0xeca(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<similarity_query_norm>:
push   %rax
call   1030 <sqrtf@plt>
movsd  0xee2(%rip),%xmm1
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct._similarity = type { i32 }
define float @similarity_query_norm(%struct._similarity* %0, float %1) {
%3 = alloca %struct._similarity*
%4 = alloca float
store %struct._similarity* %0, %struct._similarity** %3
store float %1, float* %4
%5 = load float, float* %4
%6 = call double @sqrtf(float %5)
%7 = fdiv double 1.000000e+00, %6
%8 = fptrunc double %7 to float
ret float %8
}

LLVM IR (-O2):
%struct._similarity = type { i32 }
define float @similarity_query_norm(%struct._similarity* nocapture readnone %0, float %1) {
%3 = tail call double @sqrtf(float %1)
%4 = fdiv double 1.000000e+00, %3
%5 = fptrunc double %4 to float
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *xrealloc(void *ptr, size_t size) {
  void *newptr = realloc(ptr, size);
  if (newptr)
    return newptr;
  fprintf(stderr, "xrealloc(): Could not allocate %zd bytes\n", size);
  abort();
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1166 <xrealloc+0x36>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe86(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
mov    %rsi,%rbx
call   1050 <realloc@plt>
test   %rax,%rax
je     1140 <xrealloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"xrealloc(): Could not allocate %zd bytes\0A\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i8*, i8** %5
ret i8* %12
13: ; preds = %2
%14 = load i32, i32* @stderr
%15 = load i64, i64* %4
%16 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %15)
%17 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"xrealloc(): Could not allocate %zd bytes\0A\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %2
ret i8* %3
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %1)
%9 = tail call i32 (...) @abort()
unreachable
}
int solcheck(int x, int y) {
  if (x % 2 == 0 && x > y)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<solcheck>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1136 <solcheck+0x36>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1136 <solcheck+0x36>
movl   $0x1,-0x4(%rbp)
jmp    113d <solcheck+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcheck>:
test   $0x1,%dil
sete   %al
cmp    %esi,%edi
setg   %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @solcheck(i32 %0, i32 %1) {
%3 = and i32 %0, 1
%4 = icmp eq i32 %3, 0
%5 = icmp sgt i32 %0, %1
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
struct timespec {
  long tv_sec;
  long tv_nsec;
};

/* Variables and functions */
void double_to_timespec(double time, struct timespec *ts) {
  ts->tv_sec = (long)time;
  ts->tv_nsec = (long)((time - (double)ts->tv_sec) * 1000000000);
}


x86 assembly (clang, -O0):
<double_to_timespec>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
cvttsd2si -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
cvtsi2sdq (%rax),%xmm1
subsd  %xmm1,%xmm0
movsd  0xecc(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_to_timespec>:
cvttsd2si %xmm0,%rax
cvtsi2sd %rax,%xmm1
subsd  %xmm1,%xmm0
mulsd  0xeea(%rip),%xmm0
mov    %rax,(%rdi)
cvttsd2si %xmm0,%rax
mov    %rax,0x8(%rdi)
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define void @double_to_timespec(double %0, %struct.timespec* %1) {
%3 = alloca double
%4 = alloca %struct.timespec*
store double %0, double* %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load double, double* %3
%6 = fptosi double %5 to i64
%7 = load %struct.timespec*, %struct.timespec** %4
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 0
store i64 %6, i64* %8
%9 = load double, double* %3
%10 = load %struct.timespec*, %struct.timespec** %4
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %10, i32 0, i32 0
%12 = load i64, i64* %11
%13 = sitofp i64 %12 to double
%14 = fsub double %9, %13
%15 = fmul double %14, 1.000000e+09
%16 = fptosi double %15 to i64
%17 = load %struct.timespec*, %struct.timespec** %4
%18 = getelementptr inbounds %struct.timespec, %struct.timespec* %17, i32 0, i32 1
store i64 %16, i64* %18
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define void @double_to_timespec(double %0, %struct.timespec* nocapture writeonly %1) {
%3 = fptosi double %0 to i64
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
store i64 %3, i64* %4
%5 = sitofp i64 %3 to double
%6 = fsub double %0, %5
%7 = fmul double %6, 1.000000e+09
%8 = fptosi double %7 to i64
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
store i64 %8, i64* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void CallLib(void) { printf("CallLib() from Library\n"); }


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

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

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

LLVM IR (-O2):
@str = [23 x i8] c"CallLib() from Library\00"
define void @CallLib() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
int ft_n_count(int n, int i) {
  while (n > 9 || n < 0) {
    i++;
    n /= 10;
  }
  return (i);
}


x86 assembly (clang, -O0):
<ft_n_count>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jg     1123 <ft_n_count+0x23>
cmpl   $0x0,-0x4(%rbp)
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1133 <ft_n_count+0x33>
jmp    114f <ft_n_count+0x4f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110a <ft_n_count+0xa>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_n_count>:
mov    %esi,%eax
cmp    $0xa,%edi
jb     112f <ft_n_count+0x2f>
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdi
add    %ecx,%edi
cmp    $0x9,%edi
ja     1110 <ft_n_count+0x10>
ret

LLVM IR (-O0):
define i32 @ft_n_count(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %13, %2
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 9
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 0
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ true, %5 ], [ %10, %8 ]
br i1 %12, label %13, label %18
13: ; preds = %11
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
%16 = load i32, i32* %3
%17 = sdiv i32 %16, 10
store i32 %17, i32* %3
br label %5
18: ; preds = %11
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
define i32 @ft_n_count(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, 9
br i1 %3, label %4, label %10
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %8, %4 ], [ %0, %2 ]
%7 = add nsw i32 %5, 1
%8 = sdiv i32 %6, 10
%9 = icmp ugt i32 %8, 9
br i1 %9, label %4, label %10
10: ; preds = %4, %2
%11 = phi i32 [ %1, %2 ], [ %7, %4 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void worker(void *a) { printf("Worker #%d\n", *((int *)a)); }


x86 assembly (clang, -O0):
<worker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<worker>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"Worker #%d\0A\00"
define void @worker(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printIntArray(int *, int);
int /*<<< orphan*/ selection_sort(int *, int);
int main(int argc, char **argv) {
  int array[] = {23, 54, 6, 12, 76, 3, 5, 8};
  selection_sort(array, 8);
  printIntArray(array, 8);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xebd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x8,%esi
call   1030 <selection_sort@plt>
lea    -0x30(%rbp),%rdi
mov    $0x8,%esi
call   1040 <printIntArray@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <selection_sort@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1040 <printIntArray@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.array = [8 x i32] [i32 23, i32 54, i32 6, i32 12, i32 76, i32 3, i32 5, i32 8]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [8 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [8 x i32]* %6 to i8*
%8 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 0
%9 = call i32 @selection_sort(i32* %8, i32 8)
%10 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 0
%11 = call i32 @printIntArray(i32* %10, i32 8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [8 x i32] [i32 23, i32 54, i32 6, i32 12, i32 76, i32 3, i32 5, i32 8]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [8 x i32]
%4 = bitcast [8 x i32]* %3 to i8*
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%6 = call i32 @selection_sort(i32* %5, i32 8)
%7 = call i32 @printIntArray(i32* %5, i32 8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ MergeSort(int *, int /*<<< orphan*/, int);
void mergeSort(int *list, int n) { MergeSort(list, 0, n - 1); }


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

x86 assembly (clang, -O2):
<mergeSort>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <MergeSort@plt>

LLVM IR (-O0):
define void @mergeSort(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 = sub nsw i32 %6, 1
%8 = call i32 @MergeSort(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @mergeSort(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @MergeSort(i32* %0, i32 0, i32 %3)
ret void
}
void X509_ATTRIBUTE_set1_object(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_ATTRIBUTE_set1_object() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dwa();
int /*<<< orphan*/ printf(char *);
raz_trzy() {
  printf("raz\n");
  dwa();
  printf("trzy\n");
}


x86 assembly (clang, -O0):
<raz_trzy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <dwa@plt>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"raz\0A\00"
@.str.1 = [6 x i8] c"trzy\0A\00"
define i32 @raz_trzy() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @dwa()
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@str = [4 x i8] c"raz\00"
@str.2 = [5 x i8] c"trzy\00"
define i32 @raz_trzy() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @dwa()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.2, i64 0, i64 0))
ret i32 undef
}
void default_cmd_cb(char *name, int argc, char **argv, void *user_data) {}


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

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

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

LLVM IR (-O2):
define void @default_cmd_cb(i8* nocapture %0, i32 %1, i8** nocapture %2, i8* nocapture %3) {
ret void
}
int functionCalled() { return (0x5A); }


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

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

LLVM IR (-O0):
define i32 @functionCalled() {
ret i32 90
}

LLVM IR (-O2):
define i32 @functionCalled() {
ret i32 90
}
/* Variables and functions */
int tosFile_write1(int, char *, int /*<<< orphan*/, int);
int tosFile_writeChar(int fd, char ch) {
  char buf[1];
  buf[0] = ch;
  return tosFile_write1(fd, buf, 0, 1);
}


x86 assembly (clang, -O0):
<tosFile_writeChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x6(%rbp),%rsi
xor    %edx,%edx
mov    $0x1,%ecx
call   1030 <tosFile_write1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tosFile_writeChar>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
xor    %edx,%edx
mov    $0x1,%ecx
call   1030 <tosFile_write1@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tosFile_writeChar(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca [1 x i8]
store i32 %0, i32* %3
store i8 %1, i8* %4
%6 = load i8, i8* %4
%7 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %6, i8* %7
%8 = load i32, i32* %3
%9 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%10 = call i32 @tosFile_write1(i32 %8, i8* %9, i32 0, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @tosFile_writeChar(i32 %0, i8 signext %1) {
%3 = alloca [1 x i8]
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
store i8 %1, i8* %4
%5 = call i32 @tosFile_write1(i32 %0, i8* %4, i32 0, i32 1)
ret i32 %5
}