xunge/DecIR huggingface dataset:
int main() {
  char *string_database[4] = {'\0'};
  string_database[0] = "Florida";
  string_database[1] = "Oregon";
  string_database[2] = "California";
  string_database[3] = "Georgia";
  sort(string_database, 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    0xeba(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xeb7(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xeb3(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xeb3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <sort@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xee5(%rip),%rax
mov    %rax,(%rsp)
lea    0xee2(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0xedd(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xedc(%rip),%rax
mov    %rax,0x18(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <sort@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Florida\00"
@.str.1 = [7 x i8] c"Oregon\00"
@.str.2 = [11 x i8] c"California\00"
@.str.3 = [8 x i8] c"Georgia\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8*]
store i32 0, i32* %1
%3 = bitcast [4 x i8*]* %2 to i8*
%4 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 2
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 3
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
%9 = call i32 (i8**, i32, ...) bitcast (i32 (...)* @sort to i32 (i8**, i32, ...)*)(i8** %8, i32 4)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"Florida\00"
@.str.1 = [7 x i8] c"Oregon\00"
@.str.2 = [11 x i8] c"California\00"
@.str.3 = [8 x i8] c"Georgia\00"
define i32 @main() {
%1 = alloca [4 x i8*]
%2 = bitcast [4 x i8*]* %1 to i8*
%3 = getelementptr inbounds [4 x i8*], [4 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds [4 x i8*], [4 x i8*]* %1, i64 0, i64 1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %1, i64 0, i64 2
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [4 x i8*], [4 x i8*]* %1, i64 0, i64 3
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %6
%7 = call i32 (i8**, i32, ...) bitcast (i32 (...)* @sort to i32 (i8**, i32, ...)*)(i8** %3, i32 4)
ret i32 0
}
void testfunc7(void) {
  unsigned char chararroct[7U];
  chararroct[0U] = '\100';
  chararroct[1U] = '\109';
  chararroct[2U] = 010;
  chararroct[3U] = 055;
  chararroct[4U] = 125;
  chararroct[5U] = '\x12';
}


x86 assembly (clang, -O0):
<testfunc7>:
push   %rbp
mov    %rsp,%rbp
movb   $0x40,-0x7(%rbp)
movb   $0x39,-0x6(%rbp)
movb   $0x8,-0x5(%rbp)
movb   $0x2d,-0x4(%rbp)
movb   $0x7d,-0x3(%rbp)
movb   $0x12,-0x2(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testfunc7() {
%1 = alloca [7 x i8]
%2 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 0
store i8 64, i8* %2
%3 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 1
store i8 57, i8* %3
%4 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 2
store i8 8, i8* %4
%5 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 3
store i8 45, i8* %5
%6 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 4
store i8 125, i8* %6
%7 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 5
store i8 18, i8* %7
ret void
}

LLVM IR (-O2):
define void @testfunc7() {
ret void
}
int strcoll(const char *str1, const char *str2) { return -1; }


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

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

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
ret i32 -1
}

LLVM IR (-O2):
define i32 @strcoll(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
void receiveBegin() {}


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

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

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

LLVM IR (-O2):
define void @receiveBegin() {
ret void
}
int match_home_imsm(struct supertype *st, char *homehost) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.supertype = type opaque
define i32 @match_home_imsm(%struct.supertype* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int /*<<< orphan*/ swap(int *, int *);
int main() {
  int i, j;
  printf("Enter the value of x and y :\n");
  scanf("%d %d", &i, &j);
  swap(&i, &j);
  printf("%d %d", i, j);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <swap@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
lea    0xea4(%rip),%r14
lea    0xc(%rsp),%rbx
lea    0x8(%rsp),%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <swap@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Enter the value of x and y :\0A\00"
@.str.1 = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = call i32 @swap(i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d %d\00"
@str = [29 x i8] c"Enter the value of x and y :\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = call i32 @swap(i32* %1, i32* %2)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
ret i32 0
}
/* Variables and functions */
char *duplica_string(char *);
int /*<<< orphan*/ free(char *);
char *malloc(scalar_t__);
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ strlen(char *);
int main(void) {
  char *s = "Campos Verdes";
  char *p;
  p = malloc(strlen(s) + 1);
  p = s;
  char *s_duplicado;
  s_duplicado = duplica_string(s);
  printf("%s\n", s_duplicado);
  free(s_duplicado);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <duplica_string@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe6b(%rip),%rdi
call   1050 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1050 <duplica_string@plt>
mov    %rax,%rbx
lea    0xec7(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Campos Verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %6, 1
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %2
store i8* %9, i8** %3
%10 = load i8*, i8** %2
%11 = call i8* @duplica_string(i8* %10)
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %4
%15 = call i32 @free(i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Campos Verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @duplica_string(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Msp430AlarmC__2__Msp430Compare__fired();
void Msp430TimerCapComP__6__Compare__fired(void) {
  Msp430AlarmC__2__Msp430Compare__fired();
}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__6__Compare__fired() {
%1 = tail call i32 (...) @Msp430AlarmC__2__Msp430Compare__fired()
ret void
}
unsigned xrop3_206_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = D & stk3;
  stk1 = S | stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_206_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_206_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
not    %ecx
mov    %esi,%edx
xor    $0xff,%edx
or     %eax,%edx
and    %ecx,%edx
or     %esi,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_206_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %5
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = and i32 %31, %32
%34 = load i32, i32* %8
%35 = load i32, i32* %7
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = or i32 %33, %37
%39 = load i32, i32* %7
%40 = load i32, i32* %6
%41 = xor i32 %40, -1
%42 = and i32 %39, %41
%43 = load i32, i32* %5
%44 = and i32 %42, %43
%45 = or i32 %38, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @xrop3_206_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, -1
%8 = xor i32 %5, 255
%9 = or i32 %4, %8
%10 = and i32 %9, %7
%11 = or i32 %4, %5
%12 = or i32 %11, %10
ret i32 %12
}
/* Variables and functions */
const char *strnchr(const char *s, int c, size_t maxlen) {
  int i;
  for (i = 0; i < maxlen && *s != c; s++, i++)
    ;
  return s;
}


x86 assembly (clang, -O0):
<strnchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rcx
xor    %eax,%eax
cmp    -0x18(%rbp),%rcx
mov    %al,-0x1d(%rbp)
jae    1139 <strnchr+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
setne  %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    1149 <strnchr+0x49>
jmp    1168 <strnchr+0x68>
jmp    114e <strnchr+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1116 <strnchr+0x16>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnchr>:
mov    %rdi,%rax
test   %rdx,%rdx
je     1124 <strnchr+0x24>
lea    (%rax,%rdx,1),%rcx
nopl   0x0(%rax)
movsbl (%rax),%edi
cmp    %esi,%edi
je     1124 <strnchr+0x24>
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1110 <strnchr+0x10>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i8* @strnchr(i8* %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %17, label %5
5: ; preds = %3
%6 = getelementptr i8, i8* %0, i64 %2
br label %7
7: ; preds = %5, %13
%8 = phi i64 [ 0, %5 ], [ %15, %13 ]
%9 = phi i8* [ %0, %5 ], [ %14, %13 ]
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, %1
br i1 %12, label %17, label %13
13: ; preds = %7
%14 = getelementptr inbounds i8, i8* %9, i64 1
%15 = add nuw i64 %8, 1
%16 = icmp eq i64 %15, %2
br i1 %16, label %17, label %7
17: ; preds = %7, %13, %3
%18 = phi i8* [ %0, %3 ], [ %6, %13 ], [ %9, %7 ]
ret i8* %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fA() { printf("Hey! What's up? I'm fA.\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Hey! What's up? I'm fA.\0A\00"
define void @fA() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"Hey! What's up? I'm fA.\00"
define void @fA() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
void shiftLeft(int rowBits[8]) {
  int i;
  for (i = 0; i < 8; i++) {
    rowBits[i] = rowBits[i] << 1;
  }
}


x86 assembly (clang, -O0):
<shiftLeft>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1140 <shiftLeft+0x40>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
shl    $0x1,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <shiftLeft+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<shiftLeft>:
movdqu (%rdi),%xmm0
movdqu 0x10(%rdi),%xmm1
paddd  %xmm0,%xmm0
movdqu %xmm0,(%rdi)
paddd  %xmm1,%xmm1
movdqu %xmm1,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @shiftLeft(i32* nocapture %0) {
%2 = bitcast i32* %0 to <4 x i32>*
%3 = load <4 x i32>, <4 x i32>* %2
%4 = shl <4 x i32> %3, <i32 1, i32 1, i32 1, i32 1>
%5 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %4, <4 x i32>* %5
%6 = getelementptr inbounds i32, i32* %0, i64 4
%7 = bitcast i32* %6 to <4 x i32>*
%8 = load <4 x i32>, <4 x i32>* %7
%9 = shl <4 x i32> %8, <i32 1, i32 1, i32 1, i32 1>
%10 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> %9, <4 x i32>* %10
ret void
}
/* Variables and functions */
float __nv_fmodf(float, float);
float fmodf(float __a, float __b) { return __nv_fmodf(__a, __b); }


x86 assembly (clang, -O0):
<fmodf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__nv_fmodf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmodf>:
jmp    1030 <__nv_fmodf@plt>

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

LLVM IR (-O2):
define float @fmodf(float %0, float %1) {
%3 = tail call float @__nv_fmodf(float %0, float %1)
ret float %3
}
int main(void) {
  if (99.5 > 99.4 ? 99.4 < 99.5 : 0) {
    return 42;
  } else {
    return 0;
  }
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
void av_reallocp() {}


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

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

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

LLVM IR (-O2):
define void @av_reallocp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "tcpstream client [ip] [port] [seed]\n");
  fprintf(stderr, "tcpstream server [port] [seed]\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xee6(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"tcpstream client [ip] [port] [seed]\0A\00"
@.str.1 = [32 x i8] c"tcpstream server [port] [seed]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"tcpstream client [ip] [port] [seed]\0A\00"
@.str.1 = [32 x i8] c"tcpstream server [port] [seed]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 -1)
unreachable
}
void nanos_red_0x1a14720_380301290(int *const omp_out, int *const omp_in) {
  (*omp_out) += (*omp_in);
}


x86 assembly (clang, -O0):
<nanos_red_0x1a14720_380301290>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @nanos_red_0x1a14720_380301290(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
%5 = add nsw i32 %4, %3
store i32 %5, i32* %0
ret void
}
OP(ed, e7) { illegal_2(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
int lz77_hash(unsigned char *data) {
  return (257 * data[0] + 263 * data[1] + 269 * data[2]) % 2039;
}


x86 assembly (clang, -O0):
<lz77_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
imul   $0x101,%eax,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
imul   $0x107,%ecx,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
imul   $0x10d,%ecx,%ecx
add    %ecx,%eax
mov    $0x7f7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lz77_hash>:
movzbl (%rdi),%eax
mov    %eax,%ecx
shl    $0x8,%ecx
or     %eax,%ecx
movzbl 0x1(%rdi),%eax
imul   $0x107,%eax,%edx
add    %ecx,%edx
movzbl 0x2(%rdi),%eax
imul   $0x10d,%eax,%eax
add    %edx,%eax
imul   $0x121456f,%rax,%rcx
shr    $0x20,%rcx
mov    %eax,%edx
sub    %ecx,%edx
shr    %edx
add    %ecx,%edx
shr    $0xa,%edx
imul   $0x7f7,%edx,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @lz77_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = mul nsw i32 257, %6
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = mul nsw i32 263, %11
%13 = add nsw i32 %7, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = mul nsw i32 269, %17
%19 = add nsw i32 %13, %18
%20 = srem i32 %19, 2039
ret i32 %20
}

LLVM IR (-O2):
define i32 @lz77_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = mul nuw nsw i32 %7, 263
%9 = add nuw nsw i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = mul nuw nsw i32 %12, 269
%14 = add nuw nsw i32 %9, %13
%15 = urem i32 %14, 2039
ret i32 %15
}
int bla(int p) {
  unsigned i, s = 1;
  for (i = 4; i < 100; i++) {
    if (p)
      s += i / 2;
    else
      s *= i / 2;
  }
  return s;
}


x86 assembly (clang, -O0):
<bla>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x4,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jae    115a <bla+0x5a>
cmpl   $0x0,-0x4(%rbp)
je     113a <bla+0x3a>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <bla+0x47>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    114c <bla+0x4c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <bla+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bla>:
mov    $0x1,%eax
mov    $0x2,%ecx
mov    $0xa,%edx
nop
lea    0x1(%rcx),%r8d
mov    %ecx,%esi
imul   %r8d,%esi
lea    (%rdx,%rax,1),%r9d
imul   %ecx,%eax
imul   %r8d,%eax
imul   %esi,%eax
test   %edi,%edi
cmovne %r9d,%eax
add    $0x2,%ecx
add    $0x8,%edx
cmp    $0xca,%edx
jne    1110 <bla+0x10>
ret

LLVM IR (-O0):
define i32 @bla(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %4
store i32 4, i32* %3
br label %5
5: ; preds = %22, %1
%6 = load i32, i32* %3
%7 = icmp ult i32 %6, 100
br i1 %7, label %8, label %25
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %3
%13 = udiv i32 %12, 2
%14 = load i32, i32* %4
%15 = add i32 %14, %13
store i32 %15, i32* %4
br label %21
16: ; preds = %8
%17 = load i32, i32* %3
%18 = udiv i32 %17, 2
%19 = load i32, i32* %4
%20 = mul i32 %19, %18
store i32 %20, i32* %4
br label %21
21: ; preds = %16, %11
br label %22
22: ; preds = %21
%23 = load i32, i32* %3
%24 = add i32 %23, 1
store i32 %24, i32* %3
br label %5
25: ; preds = %5
%26 = load i32, i32* %4
ret i32 %26
}

LLVM IR (-O2):
define i32 @bla(i32 %0) {
%2 = icmp eq i32 %0, 0
br label %3
3: ; preds = %3, %1
%4 = phi i32 [ 1, %1 ], [ %19, %3 ]
%5 = phi i32 [ 4, %1 ], [ %20, %3 ]
%6 = lshr exact i32 %5, 1
%7 = add i32 %4, %6
%8 = mul i32 %4, %6
%9 = lshr exact i32 %5, 1
%10 = add i32 %7, %9
%11 = mul i32 %8, %9
%12 = or i32 %5, 2
%13 = lshr exact i32 %12, 1
%14 = add i32 %10, %13
%15 = mul i32 %11, %13
%16 = lshr exact i32 %12, 1
%17 = add i32 %14, %16
%18 = mul i32 %15, %16
%19 = select i1 %2, i32 %18, i32 %17
%20 = add nuw nsw i32 %5, 4
%21 = icmp eq i32 %20, 100
br i1 %21, label %22, label %3
22: ; preds = %3
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int v[4] = {0x0A, 0xBB, 0x4B, 0x18};
  int resultado = 0;
  for (int i = 0; i < 4; i++) {
    resultado *= 256;
    resultado += v[i];
  }
  printf("%08X", resultado);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x4,-0x28(%rbp)
jge    1172 <main+0x62>
mov    -0x24(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x24(%rbp)
movslq -0x28(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1143 <main+0x33>
mov    -0x24(%rbp),%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.v = [4 x i32] [i32 10, i32 187, i32 75, i32 24]
@.str = [5 x i8] c"%08X\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [4 x i32]* %2 to i8*
store i32 0, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %18, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %21
9: ; preds = %6
%10 = load i32, i32* %3
%11 = mul nsw i32 %10, 256
store i32 %11, i32* %3
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = load i32, i32* %3
%17 = add nsw i32 %16, %15
store i32 %17, i32* %3
br label %18
18: ; preds = %9
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %6
21: ; preds = %6
%22 = load i32, i32* %3
%23 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@.str = [5 x i8] c"%08X\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 180046616)
ret i32 0
}
const char *const asdb_get_module_name() { return "dummy"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"dummy\00"
define i8* @asdb_get_module_name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ renderer_search_and_load(char const *);
int renderer_init(const char *name) {
  if (renderer_search_and_load(name))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<renderer_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <renderer_search_and_load@plt>
cmp    $0x0,%rax
je     113b <renderer_init+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <renderer_init+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @renderer_init(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @renderer_search_and_load(i8* %4)
%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):
define i32 @renderer_init(i8* %0) {
%2 = tail call i64 @renderer_search_and_load(i8* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int lputs(void *unused, int level, const char *str) { return 1; }


x86 assembly (clang, -O0):
<lputs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @lputs(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
ret i32 1
}

LLVM IR (-O2):
define i32 @lputs(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
ret i32 1
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i;
  i = __VERIFIER_nondet_int();
  while (i >= -5 && i <= 5) {
    if (i > 0) {
      i = i - 1;
    }
    if (i < 0) {
      i = i + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0xfffffffb,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1142 <main+0x32>
cmpl   $0x5,-0x8(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1152 <main+0x42>
jmp    117d <main+0x6d>
cmpl   $0x0,-0x8(%rbp)
jle    1165 <main+0x55>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1178 <main+0x68>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
br label %4
4: ; preds = %24, %0
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, -5
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 5
br label %10
10: ; preds = %7, %4
%11 = phi i1 [ false, %4 ], [ %9, %7 ]
br i1 %11, label %12, label %25
12: ; preds = %10
%13 = load i32, i32* %2
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %2
%17 = sub nsw i32 %16, 1
store i32 %17, i32* %2
br label %18
18: ; preds = %15, %12
%19 = load i32, i32* %2
%20 = icmp slt i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %24
24: ; preds = %21, %18
br label %4
25: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
void *xnrealloc_inline(void *, size_t, int);
void *xrealloc(void *p, size_t n) { return xnrealloc_inline(p, n, 1); }


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

x86 assembly (clang, -O2):
<xrealloc>:
mov    $0x1,%edx
jmp    1030 <xnrealloc_inline@plt>

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

LLVM IR (-O2):
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = tail call i8* @xnrealloc_inline(i8* %0, i64 %1, i32 1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ execlp(char *, char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int main(int argc, char *argv[]) {
  execlp("cmdtest", "cmdtest", ".", NULL);
  perror("Unable to execute 'cmdtest'. Make sure, that it is installed");
  exit(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rsi
lea    0xeb4(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
mov    %rsi,%rdi
call   1050 <execlp@plt>
lea    0xea3(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec9(%rip),%rdx
mov    %rdi,%rsi
xor    %ecx,%ecx
call   1050 <execlp@plt>
lea    0xeba(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"cmdtest\00"
@.str.1 = [2 x i8] c".\00"
@.str.2 = [61 x i8] c"Unable to execute 'cmdtest'. Make sure, that it is installed\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @execlp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
%7 = call i32 @perror(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"cmdtest\00"
@.str.1 = [2 x i8] c".\00"
@.str.2 = [61 x i8] c"Unable to execute 'cmdtest'. Make sure, that it is installed\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @execlp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
%4 = tail call i32 @perror(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
void test10() {
  goto c;
d:
  goto e;
c:;
  int i;
  return;
  goto b;
  goto a;
b:
  i = 1;
a:
  i = 2;
  goto f;
e:
  goto d;
f:;
}


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

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

LLVM IR (-O0):
define void @test10() {
%1 = alloca i32
br label %3
2: ; preds = %6
br label %6
3: ; preds = %0
br label %8
4: ; No predecessors!
store i32 1, i32* %1
br label %5
5: ; preds = %4
store i32 2, i32* %1
br label %7
6: ; preds = %2
br label %2
7: ; preds = %5
br label %8
8: ; preds = %7, %3
ret void
}

LLVM IR (-O2):
define void @test10() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ControlSpeak();
int main(void) {
  ControlSpeak();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ControlSpeak()
ret i32 0
}
void my_increment(int *c, int *charac) {
  (*c)++;
  (*charac)++;
}


x86 assembly (clang, -O0):
<my_increment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_increment>:
addl   $0x1,(%rdi)
addl   $0x1,(%rsi)
ret

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

LLVM IR (-O2):
define void @my_increment(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = add nsw i32 %3, 1
store i32 %4, i32* %0
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
store i32 %6, i32* %1
ret void
}
void gtk_arg_flags_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_arg_flags_get_type() {
ret void
}
/* Variables and functions */
double M_PI;
double fmod(double, double);
double tolon(double a) {
  double b = fmod(a, 2.0 * M_PI);
  return b < 0 ? b + 2.0 * M_PI : b;
}


x86 assembly (clang, -O0):
<tolon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
mov    0x2eb7(%rip),%rax
mulsd  (%rax),%xmm1
call   1030 <fmod@plt>
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    116f <tolon+0x5f>
movsd  -0x10(%rbp),%xmm1
mov    0x2e8f(%rip),%rax
movsd  (%rax),%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1179 <tolon+0x69>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolon>:
push   %rbx
mov    0x2ed0(%rip),%rbx
movsd  (%rbx),%xmm1
addsd  %xmm1,%xmm1
call   1030 <fmod@plt>
movsd  (%rbx),%xmm2
addsd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
movapd %xmm1,%xmm3
andnpd %xmm0,%xmm3
andpd  %xmm2,%xmm1
orpd   %xmm3,%xmm1
movapd %xmm1,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @tolon(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* @M_PI
%6 = fmul double 2.000000e+00, %5
%7 = call double @fmod(double %4, double %6)
store double %7, double* %3
%8 = load double, double* %3
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load double, double* %3
%12 = load double, double* @M_PI
%13 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %12, double %11)
br label %16
14: ; preds = %1
%15 = load double, double* %3
br label %16
16: ; preds = %14, %10
%17 = phi double [ %13, %10 ], [ %15, %14 ]
ret double %17
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @tolon(double %0) {
%2 = load double, double* @M_PI
%3 = fmul double %2, 2.000000e+00
%4 = tail call double @fmod(double %0, double %3)
%5 = fcmp olt double %4, 0.000000e+00
%6 = load double, double* @M_PI
%7 = tail call double @llvm.fmuladd.f64(double %6, double 2.000000e+00, double %4)
%8 = select i1 %5, double %7, double %4
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ yield();
void uslessPs() {
  printf("Dont mind me, im just gonna be here for a while");
  while (1) {
    yield();
  }
}


x86 assembly (clang, -O0):
<uslessPs>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <yield@plt>
jmp    1130 <uslessPs+0x10>

x86 assembly (clang, -O2):
<uslessPs>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
nopl   (%rax)
xor    %eax,%eax
call   1030 <yield@plt>
jmp    1130 <uslessPs+0x10>

LLVM IR (-O0):
@.str = [48 x i8] c"Dont mind me, im just gonna be here for a while\00"
define void @uslessPs() {
%1 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @yield()
br label %2
}

LLVM IR (-O2):
@.str = [48 x i8] c"Dont mind me, im just gonna be here for a while\00"
define void @uslessPs() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = tail call i32 (...) @yield()
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ largeint_add_gen(unsigned int const, unsigned int *,
                                    int const, int /*<<< orphan*/);
void Ptngc_largeint_add(const unsigned int v1, unsigned int *largeint,
                        const int n) {
  largeint_add_gen(v1, largeint, n, 0);
}


x86 assembly (clang, -O0):
<Ptngc_largeint_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <largeint_add_gen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ptngc_largeint_add>:
xor    %ecx,%ecx
jmp    1030 <largeint_add_gen@plt>

LLVM IR (-O0):
define void @Ptngc_largeint_add(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 @largeint_add_gen(i32 %7, i32* %8, i32 %9, i32 0)
ret void
}

LLVM IR (-O2):
define void @Ptngc_largeint_add(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @largeint_add_gen(i32 %0, i32* %1, i32 %2, i32 0)
ret void
}
int main(void) {
  if (99.5 >= 99.4 && 2 <= 2) {
    return 42;
  } else {
    return 0;
  }
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
void strcmp_constant0() {
  if (strcmp("123", "123") != 0)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strcmp_constant0>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rsi
mov    %rsi,%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     112d <strcmp_constant0+0x1d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_constant0>:
lea    0xee9(%rip),%rdi
mov    %rdi,%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
define void @strcmp_constant0() {
%1 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = load i8, i8* null
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
define void @strcmp_constant0() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
void X509_supported_extension(void) {}


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

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

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

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