xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ WriteInstruction(char *);
void CR_Exit(void) { WriteInstruction("ret"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"ret\00"
define void @CR_Exit() {
%1 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int memcmp(void const *, void const *, int);
int short_cmp(const void *elt1, const void *elt2) {
  return memcmp(elt1, elt2, sizeof(short));
}


x86 assembly (clang, -O0):
<short_cmp>:
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    $0x2,%edx
call   1030 <memcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<short_cmp>:
mov    $0x2,%edx
jmp    1030 <memcmp@plt>

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

LLVM IR (-O2):
define i32 @short_cmp(i8* %0, i8* %1) {
%3 = tail call i32 @memcmp(i8* %0, i8* %1, i32 2)
ret i32 %3
}
char *ERR_error_string_n(int code, char str[], int siz) {
  *str = 0;
  return str;
}


x86 assembly (clang, -O0):
<ERR_error_string_n>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ERR_error_string_n>:
mov    %rsi,%rax
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define i8* @ERR_error_string_n(i32 %0, i8* returned writeonly %1, i32 %2) {
store i8 0, i8* %1
ret i8* %1
}
unsigned long str$copy_dx(struct dsc$descriptor_s *destination_string,
                          const struct dsc$descriptor_s *source_string) {
  char *s1_ptr;
  unsigned short s1_length;
  unsigned long result = 1;
  str$analyze_sdesc(source_string, &s1_length, &s1_ptr);
  result = str$copy_r(destination_string, &s1_length, s1_ptr);
  return result;
}


x86 assembly (clang, -O0):
<str$copy_dx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x1a(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1040 <str$analyze_sdesc@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    -0x1a(%rbp),%rsi
mov    $0x0,%al
call   1030 <str$copy_r@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str$copy_dx>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
lea    0xe(%rsp),%r14
lea    0x10(%rsp),%rdx
mov    %rsi,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <str$analyze_sdesc@plt>
mov    0x10(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <str$copy_r@plt>
cltq
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%"struct.dsc$descriptor_s" = type opaque
define i64 @"str$copy_dx"(%"struct.dsc$descriptor_s"* %0, %"struct.dsc$descriptor_s"* %1) {
%3 = alloca %"struct.dsc$descriptor_s"*
%4 = alloca %"struct.dsc$descriptor_s"*
%5 = alloca i8*
%6 = alloca i16
%7 = alloca i64
store %"struct.dsc$descriptor_s"* %0, %"struct.dsc$descriptor_s"** %3
store %"struct.dsc$descriptor_s"* %1, %"struct.dsc$descriptor_s"** %4
store i64 1, i64* %7
%8 = load %"struct.dsc$descriptor_s"*, %"struct.dsc$descriptor_s"** %4
%9 = call i32 (%"struct.dsc$descriptor_s"*, i16*, i8**, ...) bitcast (i32 (...)* @"str$analyze_sdesc" to i32 (%"struct.dsc$descriptor_s"*, i16*, i8**, ...)*)(%"struct.dsc$descriptor_s"* %8, i16* %6, i8** %5)
%10 = load %"struct.dsc$descriptor_s"*, %"struct.dsc$descriptor_s"** %3
%11 = load i8*, i8** %5
%12 = call i32 (%"struct.dsc$descriptor_s"*, i16*, i8*, ...) bitcast (i32 (...)* @"str$copy_r" to i32 (%"struct.dsc$descriptor_s"*, i16*, i8*, ...)*)(%"struct.dsc$descriptor_s"* %10, i16* %6, i8* %11)
%13 = sext i32 %12 to i64
store i64 %13, i64* %7
%14 = load i64, i64* %7
ret i64 %14
}

LLVM IR (-O2):
%"struct.dsc$descriptor_s" = type opaque
define i64 @"str$copy_dx"(%"struct.dsc$descriptor_s"* %0, %"struct.dsc$descriptor_s"* %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = bitcast i8** %3 to i8*
%6 = bitcast i16* %4 to i8*
%7 = call i32 (%"struct.dsc$descriptor_s"*, i16*, i8**, ...) bitcast (i32 (...)* @"str$analyze_sdesc" to i32 (%"struct.dsc$descriptor_s"*, i16*, i8**, ...)*)(%"struct.dsc$descriptor_s"* %1, i16* %4, i8** %3)
%8 = load i8*, i8** %3
%9 = call i32 (%"struct.dsc$descriptor_s"*, i16*, i8*, ...) bitcast (i32 (...)* @"str$copy_r" to i32 (%"struct.dsc$descriptor_s"*, i16*, i8*, ...)*)(%"struct.dsc$descriptor_s"* %0, i16* %4, i8* %8)
%10 = sext i32 %9 to i64
ret i64 %10
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void kill(const char *msg) {
  if (errno) {
    perror(msg);
  } else {
    fprintf(stderr, "%s\n", msg);
  }
  exit(1);
}


x86 assembly (clang, -O0):
<kill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e95(%rip),%rax
cmpq   $0x0,(%rax)
je     115b <kill+0x2b>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
jmp    1174 <kill+0x44>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<kill>:
push   %rax
mov    %rdi,%rdx
mov    0x2e9d(%rip),%rax
cmpq   $0x0,(%rax)
je     1153 <kill+0x23>
mov    %rdx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xe9d(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i64 0
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @kill(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i64, i64* @errno
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @perror(i8* %6)
br label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %8, %5
%13 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@errno = global i64 0
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @kill(i8* %0) {
%2 = load i64, i64* @errno
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* %0)
br label %9
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %6, %4
%10 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
double unif_dist();
int bino_dist(int n, double p) {
  int x = 0;
  for (int i = 0; i < n; i++) {
    if (unif_dist() < p) {
      x++;
    }
  }
  return x;
}


x86 assembly (clang, -O0):
<bino_dist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    116f <bino_dist+0x5f>
mov    $0x0,%al
call   1030 <unif_dist@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    115c <bino_dist+0x4c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1161 <bino_dist+0x51>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112e <bino_dist+0x1e>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bino_dist>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    113e <bino_dist+0x2e>
mov    %edi,%ebx
xor    %ebp,%ebp
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <unif_dist@plt>
xor    %eax,%eax
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
add    %eax,%ebp
add    $0xffffffff,%ebx
jne    1120 <bino_dist+0x10>
jmp    1140 <bino_dist+0x30>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @bino_dist(i32 %0, double %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %6, %2
%5 = phi i32 [ 0, %2 ], [ %12, %6 ]
ret i32 %5
6: ; preds = %2, %6
%7 = phi i32 [ %13, %6 ], [ 0, %2 ]
%8 = phi i32 [ %12, %6 ], [ 0, %2 ]
%9 = tail call double (...) @unif_dist()
%10 = fcmp olt double %9, %1
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %8, %11
%13 = add nuw nsw i32 %7, 1
%14 = icmp eq i32 %13, %0
br i1 %14, label %4, label %6
}
/* Variables and functions */
scalar_t__ estColonneRempliePuissance4(int);
int hasard(int /*<<< orphan*/, int);
int /*<<< orphan*/ placerPuissance4(int, int);
void IAPuissance4Facile(void) {
  int colonneAjouer;
  do {
    colonneAjouer = hasard(0, 6);
  } while (estColonneRempliePuissance4(colonneAjouer + 1));
  placerPuissance4(colonneAjouer, 1);
}


x86 assembly (clang, -O0):
<IAPuissance4Facile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0x6,%esi
call   1030 <hasard@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1040 <estColonneRempliePuissance4@plt>
cmp    $0x0,%rax
jne    1138 <IAPuissance4Facile+0x8>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1050 <placerPuissance4@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IAPuissance4Facile>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    $0x6,%esi
call   1030 <hasard@plt>
mov    %eax,%ebx
lea    0x1(%rbx),%edi
call   1040 <estColonneRempliePuissance4@plt>
test   %rax,%rax
jne    1140 <IAPuissance4Facile+0x10>
mov    %ebx,%edi
mov    $0x1,%esi
pop    %rbx
jmp    1050 <placerPuissance4@plt>

LLVM IR (-O0):
define void @IAPuissance4Facile() {
%1 = alloca i32
br label %2
2: ; preds = %4, %0
%3 = call i32 @hasard(i32 0, i32 6)
store i32 %3, i32* %1
br label %4
4: ; preds = %2
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
%7 = call i64 @estColonneRempliePuissance4(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %2, label %9
9: ; preds = %4
%10 = load i32, i32* %1
%11 = call i32 @placerPuissance4(i32 %10, i32 1)
ret void
}

LLVM IR (-O2):
define void @IAPuissance4Facile() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @hasard(i32 0, i32 6)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @estColonneRempliePuissance4(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @placerPuissance4(i32 %2, i32 1)
ret void
}
void cprop_result11(int *data) {
  int i;
  int stop = data[0];
  for (i = 1; i < stop; i++)
    ;
  data[1] = 1;
  data[2] = i;
}


x86 assembly (clang, -O0):
<cprop_result11>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1137 <cprop_result11+0x37>
jmp    1129 <cprop_result11+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1118 <cprop_result11+0x18>
mov    -0x8(%rbp),%rax
movl   $0x1,0x4(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprop_result11>:
mov    (%rdi),%eax
cmp    $0x2,%eax
mov    $0x1,%ecx
cmovge %eax,%ecx
movl   $0x1,0x4(%rdi)
mov    %ecx,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @cprop_result11(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = call i32 @llvm.smax.i32(i32 %2, i32 1)
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 1, i32* %4
%5 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %3, i32* %5
ret void
}
/* Variables and functions */
int foo();
int main(int i) {
  int k = foo();
  if (1) {
    foo();
  } else {
    foo();
  }
  foo();
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @foo()
store i32 %4, i32* %3
%5 = call i32 (...) @foo()
%6 = call i32 (...) @foo()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = tail call i32 (...) @foo()
%3 = tail call i32 (...) @foo()
%4 = tail call i32 (...) @foo()
ret i32 0
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(int);
int main() {
  int c;
  printf("Enter a Value:");
  c = getchar();
  printf("\nYou entered: ");
  putchar(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %eax,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
mov    %ebx,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter a Value:\00"
@.str.1 = [15 x i8] c"\0AYou entered: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 @putchar(i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter a Value:\00"
@.str.1 = [15 x i8] c"\0AYou entered: \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 %2)
ret i32 0
}
int f(long long b, long long a) {
  long long aa = b << (a & (32 - 1));
  return aa;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
and    $0x1f,%rcx
shl    %cl,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %rsi,%rcx
mov    %rdi,%rax
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @f(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = and i64 %7, 31
%9 = shl i64 %6, %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @f(i64 %0, i64 %1) {
%3 = and i64 %1, 31
%4 = shl i64 %0, %3
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int input();
int lex_input() { return input(); }


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

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

LLVM IR (-O0):
define i32 @lex_input() {
%1 = call i32 (...) @input()
ret i32 %1
}

LLVM IR (-O2):
define i32 @lex_input() {
%1 = tail call i32 (...) @input()
ret i32 %1
}
/* Variables and functions */
int Ack(int, int);
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  int y = __VERIFIER_nondet_int();
  if (x < 0 || y < 0) {
    return 0;
  }
  int r = Ack(x, y);
  return r;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1157 <main+0x37>
cmpl   $0x0,-0xc(%rbp)
jge    1163 <main+0x43>
movl   $0x0,-0x4(%rbp)
jmp    1177 <main+0x57>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <Ack@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %ebx,%ebx
js     1143 <main+0x23>
test   %eax,%eax
js     1143 <main+0x23>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <Ack@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = icmp slt i32 %1, 0
%4 = icmp slt i32 %2, 0
%5 = select i1 %3, i1 true, i1 %4
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = tail call i32 @Ack(i32 %1, i32 %2)
br label %8
8: ; preds = %0, %6
%9 = phi i32 [ %7, %6 ], [ 0, %0 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ relay_client_valid(void *);
int /*<<< orphan*/ relay_irc_hook_signals(void *);
int /*<<< orphan*/ relay_irc_send_join_channels(void *);
int relay_irc_timer_hooks_and_joins_cb(void *data, int remaining_calls) {
  (void)remaining_calls;
  if (relay_client_valid(data)) {
    relay_irc_hook_signals(data);
    relay_irc_send_join_channels(data);
  }
  return 0;
}


x86 assembly (clang, -O0):
<relay_irc_timer_hooks_and_joins_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <relay_client_valid@plt>
cmp    $0x0,%rax
je     1164 <relay_irc_timer_hooks_and_joins_cb+0x34>
mov    -0x8(%rbp),%rdi
call   1030 <relay_irc_hook_signals@plt>
mov    -0x8(%rbp),%rdi
call   1040 <relay_irc_send_join_channels@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<relay_irc_timer_hooks_and_joins_cb>:
push   %rbx
mov    %rdi,%rbx
call   1050 <relay_client_valid@plt>
test   %rax,%rax
je     114e <relay_irc_timer_hooks_and_joins_cb+0x1e>
mov    %rbx,%rdi
call   1030 <relay_irc_hook_signals@plt>
mov    %rbx,%rdi
call   1040 <relay_irc_send_join_channels@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @relay_irc_timer_hooks_and_joins_cb(i8* %0, i32 %1) {
%3 = tail call i64 @relay_client_valid(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @relay_irc_hook_signals(i8* %0)
%7 = tail call i32 @relay_irc_send_join_channels(i8* %0)
br label %8
8: ; preds = %5, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memmove(void *, void const *, unsigned int);
void MoveMemory(void *dest, const void *src, unsigned int size) {
  memmove(dest, src, size);
}


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

x86 assembly (clang, -O2):
<MoveMemory>:
jmp    1030 <memmove@plt>

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

LLVM IR (-O2):
define void @MoveMemory(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memmove(i8* %0, i8* %1, i32 %2)
ret void
}
void CFGMR3GetNameLen(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3GetNameLen() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void fe_free_2d(void **arr) {
  {
    if ((unsigned long)arr != (unsigned long)((void *)0)) {
      free(*(arr + 0));
      free((void *)arr);
    }
    return;
  }
}


x86 assembly (clang, -O0):
<fe_free_2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x0,%rax
je     113f <fe_free_2d+0x2f>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fe_free_2d>:
test   %rdi,%rdi
je     112a <fe_free_2d+0x1a>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @fe_free_2d(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = ptrtoint i8** %3 to i64
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8**, i8*** %2
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = call i32 @free(i8* %9)
%11 = load i8**, i8*** %2
%12 = bitcast i8** %11 to i8*
%13 = call i32 @free(i8* %12)
br label %14
14: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @fe_free_2d(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = tail call i32 @free(i8* %4)
%6 = bitcast i8** %0 to i8*
%7 = tail call i32 @free(i8* %6)
br label %8
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EnvPrintRouter(void *, char const *, char const *);
char *FloatToString(void *, double);
void PrintFloat(void *theEnv, const char *fileid, double number) {
  const char *theString;
  theString = FloatToString(theEnv, number);
  EnvPrintRouter(theEnv, fileid, theString);
}


x86 assembly (clang, -O0):
<PrintFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
call   1040 <FloatToString@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <EnvPrintRouter@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintFloat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <FloatToString@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <EnvPrintRouter@plt>

LLVM IR (-O0):
define void @PrintFloat(i8* %0, i8* %1, double %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store double %2, double* %6
%8 = load i8*, i8** %4
%9 = load double, double* %6
%10 = call i8* @FloatToString(i8* %8, double %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i8*, i8** %7
%14 = call i32 @EnvPrintRouter(i8* %11, i8* %12, i8* %13)
ret void
}

LLVM IR (-O2):
define void @PrintFloat(i8* %0, i8* %1, double %2) {
%4 = tail call i8* @FloatToString(i8* %0, double %2)
%5 = tail call i32 @EnvPrintRouter(i8* %0, i8* %1, i8* %4)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int base_height;
};
typedef TYPE_1__ XSizeHints;

/* Variables and functions */
void set_XSizeHints_base_height(void *_p, int _v) {
  ((XSizeHints *)_p)->base_height = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XSizeHints_base_height>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XSizeHints_base_height(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XSizeHints_base_height(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int execute_sched_yield() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_sched_yield() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;
struct in_addr {
  int /*<<< orphan*/ s_addr;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int inet_pton(int /*<<< orphan*/, char const *, struct in_addr *);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
uint get_ip_val(const char *ipv4) {
  struct in_addr addr;
  return inet_pton(AF_INET, ipv4, &addr) == 1 ? ntohl(addr.s_addr) : 0;
}


x86 assembly (clang, -O0):
<get_ip_val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <inet_pton@plt>
cmp    $0x1,%eax
jne    115b <get_ip_val+0x3b>
mov    -0x10(%rbp),%edi
call   1040 <ntohl@plt>
mov    %eax,-0x14(%rbp)
jmp    1165 <get_ip_val+0x45>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1165 <get_ip_val+0x45>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ip_val>:
push   %rax
mov    %rdi,%rsi
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rdx
call   1030 <inet_pton@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
jne    1146 <get_ip_val+0x26>
mov    (%rsp),%edi
call   1040 <ntohl@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@AF_INET = global i32 0
define i32 @get_ip_val(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.in_addr
store i8* %0, i8** %2
%4 = load i32, i32* @AF_INET
%5 = load i8*, i8** %2
%6 = call i32 @inet_pton(i32 %4, i8* %5, %struct.in_addr* %3)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @ntohl(i32 %10)
br label %13
12: ; preds = %1
br label %13
13: ; preds = %12, %8
%14 = phi i32 [ %11, %8 ], [ 0, %12 ]
ret i32 %14
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
@AF_INET = global i32 0
define i32 @get_ip_val(i8* %0) {
%2 = alloca %struct.in_addr
%3 = bitcast %struct.in_addr* %2 to i8*
%4 = load i32, i32* @AF_INET
%5 = call i32 @inet_pton(i32 %4, i8* %0, %struct.in_addr* %2)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i64 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @ntohl(i32 %9)
br label %11
11: ; preds = %1, %7
%12 = phi i32 [ %10, %7 ], [ 0, %1 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t si470x_seekup() {}


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

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

LLVM IR (-O0):
define i32 @si470x_seekup() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @si470x_seekup() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int8_t;

/* Variables and functions */
void isakmp_setup_situation(u_int8_t *buf) {}


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

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

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

LLVM IR (-O2):
define void @isakmp_setup_situation(i32* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ is_digit(char);
scalar_t__ is_ident_first(char);
int is_ident_next(char x) { return (is_ident_first(x) || is_digit(x)); }


x86 assembly (clang, -O0):
<is_ident_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <is_ident_first@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <is_ident_next+0x3c>
movsbl -0x1(%rbp),%edi
call   1040 <is_digit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ident_next>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_ident_first@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <is_ident_next+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1040 <is_digit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_ident_next(i8 signext %0) {
%2 = tail call i64 @is_ident_first(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @is_digit(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
void memory_fence() { __sync_synchronize(); }


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

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

LLVM IR (-O0):
define void @memory_fence() {
fence seq_cst
ret void
}

LLVM IR (-O2):
define void @memory_fence() {
fence seq_cst
ret void
}
void yy_1_TableInlineHeaderPlus(char *yytext, int yyleng) {
  ;
  ;
}


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

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

LLVM IR (-O0):
define void @yy_1_TableInlineHeaderPlus(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @yy_1_TableInlineHeaderPlus(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int isascii(int c) { return ((c & ~0x7F) == 0); }


x86 assembly (clang, -O0):
<isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffff80,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -128
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
void glColor4ub(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glColor4ub() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ polyglot_array_typeid(int /*<<< orphan*/,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ polyglot_float_typeid();
void *polyglot_from_typed(float *, int /*<<< orphan*/);
__attribute__((always_)) void *polyglot_from_float_array(float *arr,
                                                         uint64_t len) {
  return polyglot_from_typed(
      arr, polyglot_array_typeid(polyglot_float_typeid(), len));
}


x86 assembly (clang, -O0):
<polyglot_from_float_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <polyglot_float_typeid@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1050 <polyglot_array_typeid@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <polyglot_from_typed@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polyglot_from_float_array>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <polyglot_float_typeid@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1050 <polyglot_array_typeid@plt>
mov    %r14,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <polyglot_from_typed@plt>

LLVM IR (-O0):
define i8* @polyglot_from_float_array(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
%5 = load float*, float** %3
%6 = call i32 (...) @polyglot_float_typeid()
%7 = load i32, i32* %4
%8 = call i32 @polyglot_array_typeid(i32 %6, i32 %7)
%9 = call i8* @polyglot_from_typed(float* %5, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @polyglot_from_float_array(float* %0, i32 %1) {
%3 = tail call i32 (...) @polyglot_float_typeid()
%4 = tail call i32 @polyglot_array_typeid(i32 %3, i32 %1)
%5 = tail call i8* @polyglot_from_typed(float* %0, i32 %4)
ret i8* %5
}
void display_reset(void) {}


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

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

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

LLVM IR (-O2):
define void @display_reset() {
ret void
}
int IsStringDelimiter(c)
char c;
{ return ((c == '\'') || (c == '"')); }


x86 assembly (clang, -O0):
<IsStringDelimiter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x27,%ecx
mov    %al,-0x2(%rbp)
je     1129 <IsStringDelimiter+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x22,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsStringDelimiter>:
shl    $0x18,%edi
cmp    $0x27000000,%edi
sete   %al
cmp    $0x22000000,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @IsStringDelimiter(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 39
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 34
br label %11
11: ; preds = %7, %1
%12 = phi i1 [ true, %1 ], [ %10, %7 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @IsStringDelimiter(i32 %0) {
%2 = shl i32 %0, 24
%3 = icmp eq i32 %2, 654311424
%4 = icmp eq i32 %2, 570425344
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
float minf(float a, float b) { return (a >= b) ? b : a; }


x86 assembly (clang, -O0):
<minf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     112c <minf+0x2c>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <minf+0x36>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<minf>:
movaps %xmm1,%xmm2
cmpless %xmm0,%xmm2
andps  %xmm2,%xmm1
andnps %xmm0,%xmm2
orps   %xmm1,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @minf(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 = fcmp oge float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %4
br label %12
10: ; preds = %2
%11 = load float, float* %3
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @minf(float %0, float %1) {
%3 = fcmp oge float %0, %1
%4 = select i1 %3, float %1, float %0
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ fb(int);
int /*<<< orphan*/ printf(char *);
int main() {
  int i;
  for (i = 0; i < 101; i++) {
    fb(i);
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x65,-0x8(%rbp)
jge    1162 <main+0x42>
mov    -0x8(%rbp),%edi
call   1030 <fb@plt>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1040 <fb@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 101
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @fb(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %3
13: ; preds = %3
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @fb(i32 %2)
%4 = tail call i32 @putchar(i32 10)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 101
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
void fake_sysoff_set_block_onkey(int block) {}


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

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

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

LLVM IR (-O2):
define void @fake_sysoff_set_block_onkey(i32 %0) {
ret void
}
int nonl() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @nonl() {
ret i32 0
}
/* Variables and functions */
scalar_t__ sci_is_recv_enable();
int /*<<< orphan*/ sci_send(int);
void xmodem_wait(void) {
  long cnt = 0;
  while (sci_is_recv_enable() == 0) {
    if (++cnt >= 2000000 * 8) {
      cnt = 0;
      sci_send((0x15));
    }
  }
}


x86 assembly (clang, -O0):
<xmodem_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <sci_is_recv_enable@plt>
cmp    $0x0,%rax
jne    1170 <xmodem_wait+0x50>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
cmp    $0xf42400,%rax
jl     116b <xmodem_wait+0x4b>
movq   $0x0,-0x8(%rbp)
mov    $0x15,%edi
call   1030 <sci_send@plt>
jmp    1130 <xmodem_wait+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmodem_wait>:
push   %rbx
xor    %eax,%eax
call   1040 <sci_is_recv_enable@plt>
test   %rax,%rax
je     112f <xmodem_wait+0xf>
pop    %rbx
ret
xor    %ebx,%ebx
jmp    1158 <xmodem_wait+0x38>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x15,%edi
call   1030 <sci_send@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <sci_is_recv_enable@plt>
test   %rax,%rax
jne    112d <xmodem_wait+0xd>
cmp    $0xf423ff,%rbx
jge    1140 <xmodem_wait+0x20>
add    $0x1,%rbx
jmp    114c <xmodem_wait+0x2c>

LLVM IR (-O0):
define void @xmodem_wait() {
%1 = alloca i64
store i64 0, i64* %1
br label %2
2: ; preds = %11, %0
%3 = call i64 (...) @sci_is_recv_enable()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = load i64, i64* %1
%7 = add nsw i64 %6, 1
store i64 %7, i64* %1
%8 = icmp sge i64 %7, 16000000
br i1 %8, label %9, label %11
9: ; preds = %5
store i64 0, i64* %1
%10 = call i32 @sci_send(i32 21)
br label %11
11: ; preds = %9, %5
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @xmodem_wait() {
%1 = tail call i64 (...) @sci_is_recv_enable()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %13
3: ; preds = %0, %9
%4 = phi i64 [ %10, %9 ], [ 0, %0 ]
%5 = add nsw i64 %4, 1
%6 = icmp sgt i64 %4, 15999998
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @sci_send(i32 21)
br label %9
9: ; preds = %7, %3
%10 = phi i64 [ 0, %7 ], [ %5, %3 ]
%11 = tail call i64 (...) @sci_is_recv_enable()
%12 = icmp eq i64 %11, 0
br i1 %12, label %3, label %13
13: ; preds = %9, %0
ret void
}
void _TFC4Blog5Assetg5widthCSo8NSNumber() {}


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

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

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

LLVM IR (-O2):
define void @_TFC4Blog5Assetg5widthCSo8NSNumber() {
ret void
}
void save(char c, void *p) {
  **(char **)p = c;
  ++*(char **)p;
}


x86 assembly (clang, -O0):
<save>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<save>:
mov    (%rsi),%rax
mov    %dil,(%rax)
addq   $0x1,(%rsi)
ret

LLVM IR (-O0):
define void @save(i8 signext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8, i8* %3
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i8**
%8 = load i8*, i8** %7
store i8 %5, i8* %8
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %10
ret void
}

LLVM IR (-O2):
define void @save(i8 signext %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = load i8*, i8** %3
store i8 %0, i8* %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 1
store i8* %6, i8** %3
ret void
}
/* Variables and functions */
int Fib(int);
int CountFib1(int n) {
  if (n < 2) {
    return n;
  } else {
    return Fib(n - 1) + Fib(n - 2);
  }
}


x86 assembly (clang, -O0):
<CountFib1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1130 <CountFib1+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <CountFib1+0x43>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <Fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <Fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CountFib1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
cmp    $0x2,%edi
jl     1132 <CountFib1+0x22>
lea    -0x1(%rbx),%edi
call   1030 <Fib@plt>
mov    %eax,%ebp
add    $0xfffffffe,%ebx
mov    %ebx,%edi
call   1030 <Fib@plt>
mov    %eax,%ebx
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @CountFib1(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @Fib(i32 %4)
%6 = add nsw i32 %0, -2
%7 = tail call i32 @Fib(i32 %6)
%8 = add nsw i32 %7, %5
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ %8, %3 ], [ %0, %1 ]
ret i32 %10
}