xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ strstr(char const *, char *);
int is_uri(const char *path) {
  if (strstr(path, "://"))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_uri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     1142 <is_uri+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <is_uri+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_uri>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"://\00"
define i32 @is_uri(i8* %0) {
%2 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void processEnvironment(void) {
  { return; }
}


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

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

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

LLVM IR (-O2):
define void @processEnvironment() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(unsigned short, int);
void serial_configure_buffers(unsigned short com) { outb((com + 2), 0xC7); }


x86 assembly (clang, -O0):
<serial_configure_buffers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x2,%eax
mov    $0xc7,%esi
movzwl %ax,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_configure_buffers>:
add    $0x2,%edi
movzwl %di,%edi
mov    $0xc7,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @serial_configure_buffers(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = add nsw i32 %4, 2
%6 = trunc i32 %5 to i16
%7 = call i32 @outb(i16 zeroext %6, i32 199)
ret void
}

LLVM IR (-O2):
define void @serial_configure_buffers(i16 zeroext %0) {
%2 = add i16 %0, 2
%3 = tail call i32 @outb(i16 zeroext %2, i32 199)
ret void
}
int __attribute((stdcall)) stdcall(int x, int y, int z) { return x + y + z; }


x86 assembly (clang, -O0):
<stdcall>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdcall>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @stdcall(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* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @stdcall(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
int is_white_char(char c) {
  int white = 0;
  switch (c) {
  case ' ':
  case '\t':
  case '\n':
  case '\r':
    white = 1;
  }
  return white;
}


x86 assembly (clang, -O0):
<is_white_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     114b <is_white_char+0x4b>
jmp    1129 <is_white_char+0x29>
mov    -0xc(%rbp),%eax
sub    $0xd,%eax
je     114b <is_white_char+0x4b>
jmp    113a <is_white_char+0x3a>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    1152 <is_white_char+0x52>
jmp    114b <is_white_char+0x4b>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_white_char>:
xor    %eax,%eax
cmp    $0x20,%edi
ja     111e <is_white_char+0x1e>
mov    %edi,%ecx
movabs $0x100002600,%rdx
bt     %rcx,%rdx
jae    111e <is_white_char+0x1e>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_white_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 32, label %6
i32 9, label %6
i32 10, label %6
i32 13, label %6
]
6: ; preds = %1, %1, %1, %1
store i32 1, i32* %3
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_white_char(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 32, label %3
i32 9, label %3
i32 10, label %3
i32 13, label %3
]
3: ; preds = %1, %1, %1, %1
br label %4
4: ; preds = %3, %1
%5 = phi i32 [ 0, %1 ], [ 1, %3 ]
ret i32 %5
}
void foo_TestFoo(void *t) {
  int bar = 1;
  int foo = foo_Foo(bar);
  printf("%s: foo=%d t=%p\n", __func__, foo, t);
}


x86 assembly (clang, -O0):
<foo_TestFoo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1040 <foo_Foo@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rcx
lea    0xeb2(%rip),%rdi
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_TestFoo>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%edi
xor    %eax,%eax
call   1040 <foo_Foo@plt>
lea    0xec9(%rip),%rdi
lea    0xed3(%rip),%rsi
mov    %eax,%edx
mov    %rbx,%rcx
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"%s: foo=%d t=%p\0A\00"
@__func__.foo_TestFoo = [12 x i8] c"foo_TestFoo\00"
define void @foo_TestFoo(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 1, i32* %3
%5 = load i32, i32* %3
%6 = call i32 (i32, ...) bitcast (i32 (...)* @foo_Foo to i32 (i32, ...)*)(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = load i8*, i8** %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.foo_TestFoo, i64 0, i64 0), i32 %7, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%s: foo=%d t=%p\0A\00"
@__func__.foo_TestFoo = [12 x i8] c"foo_TestFoo\00"
define void @foo_TestFoo(i8* %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @foo_Foo to i32 (i32, ...)*)(i32 1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.foo_TestFoo, i64 0, i64 0), i32 %2, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dmmcadd_(int *, int *, double *, double *, int *, double *,
                            double *, int *);
void wcc_dmmcadd_(int *M, int *N, char *ALPHA, char *A, int *LDA, char *BETA,
                  char *B, int *LDB) {
  dmmcadd_(M, N, (double *)ALPHA, (double *)A, LDA, (double *)BETA, (double *)B,
           LDB);
}


x86 assembly (clang, -O0):
<wcc_dmmcadd_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <dmmcadd_@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_dmmcadd_>:
jmp    1030 <dmmcadd_@plt>

LLVM IR (-O0):
define void @wcc_dmmcadd_(i32* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i8* %6, i32* %7) {
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i32*
store i32* %0, i32** %9
store i32* %1, i32** %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i32* %4, i32** %13
store i8* %5, i8** %14
store i8* %6, i8** %15
store i32* %7, i32** %16
%17 = load i32*, i32** %9
%18 = load i32*, i32** %10
%19 = load i8*, i8** %11
%20 = bitcast i8* %19 to double*
%21 = load i8*, i8** %12
%22 = bitcast i8* %21 to double*
%23 = load i32*, i32** %13
%24 = load i8*, i8** %14
%25 = bitcast i8* %24 to double*
%26 = load i8*, i8** %15
%27 = bitcast i8* %26 to double*
%28 = load i32*, i32** %16
%29 = call i32 @dmmcadd_(i32* %17, i32* %18, double* %20, double* %22, i32* %23, double* %25, double* %27, i32* %28)
ret void
}

LLVM IR (-O2):
define void @wcc_dmmcadd_(i32* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i8* %6, i32* %7) {
%9 = bitcast i8* %2 to double*
%10 = bitcast i8* %3 to double*
%11 = bitcast i8* %5 to double*
%12 = bitcast i8* %6 to double*
%13 = tail call i32 @dmmcadd_(i32* %0, i32* %1, double* %9, double* %10, i32* %4, double* %11, double* %12, i32* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ iothub_messaging_sample_run();
int main(void) {
  iothub_messaging_sample_run();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @iothub_messaging_sample_run()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _rt0_ppc64_aix_lib();
void libinit() { _rt0_ppc64_aix_lib(); }


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

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

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

LLVM IR (-O2):
define void @libinit() {
%1 = tail call i32 (...) @_rt0_ppc64_aix_lib()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("mkzeros -b blocksize -r ratio -s size -q filelist\n");
}


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

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

LLVM IR (-O0):
@.str = [51 x i8] c"mkzeros -b blocksize -r ratio -s size -q filelist\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [50 x i8] c"mkzeros -b blocksize -r ratio -s size -q filelist\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
ret void
}
const char *lsx_rate_version_string(void) { return "0.4.2\0"; }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"0.4.2\00\00"
define i8* @lsx_rate_version_string() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"0.4.2\00\00"
define i8* @lsx_rate_version_string() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
const char *LZ4_versionString(void) { return "1.8.0"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"1.8.0\00"
define i8* @LZ4_versionString() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"1.8.0\00"
define i8* @LZ4_versionString() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
char *skpspace(chp) const char *chp;
{
  for (;; chp++)
    switch (*chp) {
    case ' ':
    case '\t':
      continue;
    default:
      return (char *)chp;
    }
}


x86 assembly (clang, -O0):
<skpspace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
sub    $0x9,%eax
je     1131 <skpspace+0x31>
jmp    1120 <skpspace+0x20>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    1136 <skpspace+0x36>
jmp    1131 <skpspace+0x31>
jmp    113c <skpspace+0x3c>
mov    -0x8(%rbp),%rax
pop    %rbp
ret
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skpspace+0x8>

x86 assembly (clang, -O2):
<skpspace>:
mov    %rdi,%rax
jmp    1114 <skpspace+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movsbl (%rax),%ecx
cmp    $0x9,%ecx
je     1110 <skpspace+0x10>
cmp    $0x20,%ecx
je     1110 <skpspace+0x10>
ret

LLVM IR (-O0):
define i8* @skpspace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %10, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
switch i32 %6, label %8 [
i32 32, label %7
i32 9, label %7
]
7: ; preds = %3, %3
br label %10
8: ; preds = %3
%9 = load i8*, i8** %2
ret i8* %9
10: ; preds = %7
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
br label %3
}

LLVM IR (-O2):
define i8* @skpspace(i8* %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i8* [ %0, %1 ], [ %8, %7 ]
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %6 [
i32 32, label %7
i32 9, label %7
]
6: ; preds = %2
ret i8* %3
7: ; preds = %2, %2
%8 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int visitor_free(const char *key, void *data, void *arg) {
  (void)key;
  (void)arg;
  free(data);
  return 0;
}


x86 assembly (clang, -O0):
<visitor_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<visitor_free>:
push   %rax
mov    %rsi,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @visitor_free(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void testlib_hello() { printf("hello, world from testlib!\n"); }


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

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

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

LLVM IR (-O2):
@str = [27 x i8] c"hello, world from testlib!\00"
define void @testlib_hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret void
}
void d_rehash(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<d_rehash>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_rehash>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.d_rehash = [9 x i8] c"d_rehash\00"
define void @d_rehash() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.d_rehash, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.d_rehash = [9 x i8] c"d_rehash\00"
define void @d_rehash() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.d_rehash, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ longjmp(int /*<<< orphan*/, int);
void tst3(jmp_buf loc) {
  int i, a[2], b[2];
  for (i = 0; i < 2; i++)
    a[i] = 0;
  for (i = 0; i < 2; i++)
    b[i] = 0;
  longjmp(loc, 1);
}


x86 assembly (clang, -O0):
<tst3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1146 <tst3+0x36>
movslq -0x8(%rbp),%rax
movl   $0x0,-0x10(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <tst3+0x12>
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1171 <tst3+0x61>
movslq -0x8(%rbp),%rax
movl   $0x0,-0x18(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114d <tst3+0x3d>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <longjmp@plt>

x86 assembly (clang, -O2):
<tst3>:
push   %rax
mov    $0x1,%esi
call   1030 <longjmp@plt>

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

LLVM IR (-O2):
define void @tst3(i32 %0) {
%2 = tail call i32 @longjmp(i32 %0, i32 1)
unreachable
}
int test_imm_BCint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xBC << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_BCint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 12320768
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void __attribute__((weak)) dma1_channel6_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<dma1_channel6_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dma1_channel6_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.dma1_channel6_isr = [18 x i8] c"dma1_channel6_isr\00"
define weak void @dma1_channel6_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.dma1_channel6_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.dma1_channel6_isr = [18 x i8] c"dma1_channel6_isr\00"
define weak void @dma1_channel6_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.dma1_channel6_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solve_with_quad_doubles(int max, double eps, int *nit) {
  int fail = _ada_use_c2phc4c(274, &max, nit, &eps, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solve_with_quad_doubles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
mov    $0x112,%edi
lea    -0x4(%rbp),%rsi
lea    -0x10(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_with_quad_doubles>:
sub    $0x18,%rsp
mov    %rsi,%rdx
mov    %edi,0xc(%rsp)
movsd  %xmm0,0x10(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rcx
mov    $0x112,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @solve_with_quad_doubles(i32 %0, double %1, i32* %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %4
store double %1, double* %5
store i32* %2, i32** %6
%8 = load i32*, i32** %6
%9 = call i32 @_ada_use_c2phc4c(i32 274, i32* %4, i32* %8, double* %5, i32 0)
store i32 %9, i32* %7
%10 = load i32, i32* %7
ret i32 %10
}

LLVM IR (-O2):
define i32 @solve_with_quad_doubles(i32 %0, double %1, i32* %2) {
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %4
store double %1, double* %5
%6 = call i32 @_ada_use_c2phc4c(i32 274, i32* %4, i32* %2, double* %5, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ backend_init(void *);
int /*<<< orphan*/ parallel_init();
void bomp_custom_init(void *args) {
  parallel_init();
  backend_init(args);
}


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

x86 assembly (clang, -O2):
<bomp_custom_init>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <parallel_init@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <backend_init@plt>

LLVM IR (-O0):
define void @bomp_custom_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @parallel_init()
%4 = load i8*, i8** %2
%5 = call i32 @backend_init(i8* %4)
ret void
}

LLVM IR (-O2):
define void @bomp_custom_init(i8* %0) {
%2 = tail call i32 (...) @parallel_init()
%3 = tail call i32 @backend_init(i8* %0)
ret void
}
/* Variables and functions */
int getint();
int /*<<< orphan*/ putint(int);
int main() {
  int x = getint();
  putint(x);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @getint()
%2 = tail call i32 @putint(i32 %1)
ret i32 0
}
/* Variables and functions */
void *hThrowError(int, char const *);
void *fb_ArraySngBoundChk(unsigned int idx, unsigned int ubound, int linenum,
                          const char *fname) {
  if (idx > ubound)
    return hThrowError(linenum, fname);
  else
    return 0;
}


x86 assembly (clang, -O0):
<fb_ArraySngBoundChk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jbe    1146 <fb_ArraySngBoundChk+0x36>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1030 <hThrowError@plt>
mov    %rax,-0x8(%rbp)
jmp    114e <fb_ArraySngBoundChk+0x3e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_ArraySngBoundChk>:
cmp    %esi,%edi
jbe    111e <fb_ArraySngBoundChk+0xe>
mov    %edx,%edi
mov    %rcx,%rsi
jmp    1030 <hThrowError@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @fb_ArraySngBoundChk(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = icmp ugt i32 %0, %1
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i8* @hThrowError(i32 %2, i8* %3)
br label %8
8: ; preds = %4, %6
%9 = phi i8* [ %7, %6 ], [ null, %4 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ foo_defined_in_subtarget1();
void goo() {
  foo_defined_in_subtarget1();
  int *s = NULL;
  *s = 42;
}


x86 assembly (clang, -O0):
<goo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <foo_defined_in_subtarget1@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2a,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goo>:
push   %rax
xor    %eax,%eax
call   1030 <foo_defined_in_subtarget1@plt>

LLVM IR (-O0):
define void @goo() {
%1 = alloca i32*
%2 = call i32 (...) @foo_defined_in_subtarget1()
store i32* null, i32** %1
%3 = load i32*, i32** %1
store i32 42, i32* %3
ret void
}

LLVM IR (-O2):
define void @goo() {
%1 = tail call i32 (...) @foo_defined_in_subtarget1()
unreachable
}
void gtk_tree_view_column_get_resizable() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_get_resizable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(int *, int);
int /*<<< orphan*/ sortColors(int *, int);
int main(int argc, char **argv) {
  int a[10] = {0, 2, 1, 2, 2};
  print(a, 5);
  sortColors(a, 5);
  print(a, 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
movl   $0x2,-0x3c(%rbp)
movl   $0x1,-0x38(%rbp)
movl   $0x2,-0x34(%rbp)
movl   $0x2,-0x30(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x5,%esi
call   1050 <print@plt>
lea    -0x40(%rbp),%rdi
mov    $0x5,%esi
call   1030 <sortColors@plt>
lea    -0x40(%rbp),%rdi
mov    $0x5,%esi
call   1050 <print@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0x20(%rsp)
movaps 0xebf(%rip),%xmm0
movups %xmm0,0x4(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <print@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <sortColors@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [10 x i32]* %6 to i8*
%8 = bitcast i8* %7 to [10 x i32]*
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i32 0, i32 1
store i32 2, i32* %9
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i32 0, i32 2
store i32 1, i32* %10
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i32 0, i32 3
store i32 2, i32* %11
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i32 0, i32 4
store i32 2, i32* %12
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%14 = call i32 @print(i32* %13, i32 5)
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%16 = call i32 @sortColors(i32* %15, i32 5)
%17 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%18 = call i32 @print(i32* %17, i32 5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i32]
%4 = bitcast [10 x i32]* %3 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 1
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 2, i32 1, i32 2, i32 2>, <4 x i32>* %6
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%8 = call i32 @print(i32* %7, i32 5)
%9 = call i32 @sortColors(i32* %7, i32 5)
%10 = call i32 @print(i32* %7, i32 5)
ret i32 0
}
/* Variables and functions */
const char *get_arg(int argc, char **argv, int *pi, const char *arg) {
  if (arg[0] != 0)
    return arg;
  else {
    (*pi)++;
    if (*pi == argc)
      return NULL;
    else
      return argv[*pi];
  }
}


x86 assembly (clang, -O0):
<get_arg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1130 <get_arg+0x30>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116a <get_arg+0x6a>
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    1157 <get_arg+0x57>
movq   $0x0,-0x8(%rbp)
jmp    116a <get_arg+0x6a>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_arg>:
mov    %rcx,%rax
cmpb   $0x0,(%rcx)
je     1109 <get_arg+0x9>
ret
movslq (%rdx),%rax
lea    0x1(%rax),%ecx
mov    %ecx,(%rdx)
cmp    %edi,%ecx
jne    1118 <get_arg+0x18>
xor    %eax,%eax
ret
mov    0x8(%rsi,%rax,8),%rax
ret

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

LLVM IR (-O2):
define i8* @get_arg(i32 %0, i8** nocapture %1, i32* nocapture %2, i8* %3) {
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
%10 = icmp eq i32 %9, %0
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = sext i32 %9 to i64
%13 = getelementptr inbounds i8*, i8** %1, i64 %12
%14 = load i8*, i8** %13
br label %15
15: ; preds = %7, %4, %11
%16 = phi i8* [ %14, %11 ], [ %3, %4 ], [ null, %7 ]
ret i8* %16
}
/* Variables and functions */
int startRouting(int, int, int);
int routeCursor_RealScreen(int column, int row, int screen) {
  return startRouting(column, row, screen);
}


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

x86 assembly (clang, -O2):
<routeCursor_RealScreen>:
jmp    1030 <startRouting@plt>

LLVM IR (-O0):
define i32 @routeCursor_RealScreen(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* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @startRouting(i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @routeCursor_RealScreen(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @startRouting(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ measure();
int /*<<< orphan*/ resolution();
int main(void) {
  resolution();
  measure();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @resolution()
%2 = tail call i32 (...) @measure()
ret i32 0
}
int comp(void *a, void *b) { return *(int *)a - *(int *)b; }


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

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

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

LLVM IR (-O2):
define i32 @comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
double pop();
int /*<<< orphan*/ push(double);
void Swap(void) {
  double temp1 = pop();
  double temp2 = pop();
  push(temp1);
  push(temp2);
}


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

x86 assembly (clang, -O2):
<Swap>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1030 <pop@plt>
movsd  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1030 <pop@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <push@plt>
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
jmp    1040 <push@plt>

LLVM IR (-O0):
define void @Swap() {
%1 = alloca double
%2 = alloca double
%3 = call double (...) @pop()
store double %3, double* %1
%4 = call double (...) @pop()
store double %4, double* %2
%5 = load double, double* %1
%6 = call i32 @push(double %5)
%7 = load double, double* %2
%8 = call i32 @push(double %7)
ret void
}

LLVM IR (-O2):
define void @Swap() {
%1 = tail call double (...) @pop()
%2 = tail call double (...) @pop()
%3 = tail call i32 @push(double %1)
%4 = tail call i32 @push(double %2)
ret void
}
/* Variables and functions */
scalar_t__ isPrime(long long);
long long nPrimeNumber(int n) {
  long long result = 0;
  long long i = 2;
  int count = 0;
  while (count < n) {
    if (isPrime(i)) {
      result = i;
      count++;
    }
    i++;
  }
  return result;
}


x86 assembly (clang, -O0):
<nPrimeNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x2,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1173 <nPrimeNumber+0x63>
mov    -0x18(%rbp),%rdi
call   1030 <isPrime@plt>
cmp    $0x0,%rax
je     1162 <nPrimeNumber+0x52>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1132 <nPrimeNumber+0x22>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nPrimeNumber>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %ebp,%ebp
test   %edi,%edi
jle    1151 <nPrimeNumber+0x41>
mov    %edi,%r14d
mov    $0x2,%ebx
xor    %r15d,%r15d
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <isPrime@plt>
xor    %ecx,%ecx
test   %rax,%rax
cmovne %rbx,%r15
setne  %cl
add    %ecx,%ebp
add    $0x1,%rbx
cmp    %r14d,%ebp
jl     1130 <nPrimeNumber+0x20>
jmp    1154 <nPrimeNumber+0x44>
xor    %r15d,%r15d
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i64 @nPrimeNumber(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %15
3: ; preds = %1, %3
%4 = phi i32 [ %12, %3 ], [ 0, %1 ]
%5 = phi i64 [ %13, %3 ], [ 2, %1 ]
%6 = phi i64 [ %9, %3 ], [ 0, %1 ]
%7 = tail call i64 @isPrime(i64 %5)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i64 %6, i64 %5
%10 = xor i1 %8, true
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %4, %11
%13 = add nuw nsw i64 %5, 1
%14 = icmp slt i32 %12, %0
br i1 %14, label %3, label %15
15: ; preds = %3, %1
%16 = phi i64 [ 0, %1 ], [ %9, %3 ]
ret i64 %16
}
unsigned djb2(char *str) {
  unsigned hash = 5381;
  int c;
  while (c = *str++)
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<djb2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     1141 <djb2+0x41>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <djb2+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<djb2>:
mov    (%rdi),%cl
test   %cl,%cl
je     1138 <djb2+0x38>
add    $0x1,%rdi
mov    $0x1505,%edx
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %cl,%ecx
shl    $0x5,%eax
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1120 <djb2+0x20>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @djb2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = mul i32 %7, 33
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
int five();
char *test_five() {
  int out = five();
  do {
    if (!(out == 5))
      return "error, five != 5";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_five>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <five@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
je     113c <test_five+0x2c>
lea    0xecd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1149 <test_five+0x39>
jmp    1141 <test_five+0x31>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_five>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <five@plt>
cmp    $0x5,%eax
lea    0xedc(%rip),%rax
cmovne %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"error, five != 5\00"
define i8* @test_five() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i32 (...) @five()
store i32 %3, i32* %2
br label %4
4: ; preds = %0
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 5
br i1 %6, label %8, label %7
7: ; preds = %4
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %1
br label %10
8: ; preds = %4
br label %9
9: ; preds = %8
store i8* null, i8** %1
br label %10
10: ; preds = %9, %7
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
@.str = [17 x i8] c"error, five != 5\00"
define i8* @test_five() {
%1 = tail call i32 (...) @five()
%2 = icmp eq i32 %1, 5
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
void aFunctionWithDeclaration() {}


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

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

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

LLVM IR (-O2):
define void @aFunctionWithDeclaration() {
ret void
}
/* Variables and functions */
short USBSTK5505_LED_off(int /*<<< orphan*/);
short USBSTK5505_LED_init() { return USBSTK5505_LED_off(0); }


x86 assembly (clang, -O0):
<USBSTK5505_LED_init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <USBSTK5505_LED_off@plt>
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBSTK5505_LED_init>:
xor    %edi,%edi
jmp    1030 <USBSTK5505_LED_off@plt>

LLVM IR (-O0):
define signext i16 @USBSTK5505_LED_init() {
%1 = call signext i16 @USBSTK5505_LED_off(i32 0)
ret i16 %1
}

LLVM IR (-O2):
define signext i16 @USBSTK5505_LED_init() {
%1 = tail call signext i16 @USBSTK5505_LED_off(i32 0)
ret i16 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, int);
void print_ptr(char *name, char *type, int offset) {
  printf("#define %s(task) ((%s *) &(((char *) (task))[%d]))\n", name, type,
         offset);
}


x86 assembly (clang, -O0):
<print_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_ptr>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"#define %s(task) ((%s *) &(((char *) (task))[%d]))\0A\00"
define void @print_ptr(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"#define %s(task) ((%s *) &(((char *) (task))[%d]))\0A\00"
define void @print_ptr(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_name() { printf("print_name\n"); }


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"print_name\00"
define void @print_name() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;
typedef scalar_t__ int16_t;

/* Variables and functions */
int16_t saturate(int32_t amp) {
  int16_t amp16;
  amp16 = (int16_t)amp;
  if (amp == amp16)
    return amp16;
  if (amp > 32767)
    return 32767;
  return (-32768);
}


x86 assembly (clang, -O0):
<saturate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    112b <saturate+0x2b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114e <saturate+0x4e>
cmpq   $0x7fff,-0x10(%rbp)
jle    1146 <saturate+0x46>
movq   $0x7fff,-0x8(%rbp)
jmp    114e <saturate+0x4e>
movq   $0xffffffffffff8000,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @saturate(i64 returned %0) {
ret i64 %0
}