xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strftime(char *, int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void print_time() {
  static char buf[32];
  static time_t t;
  time(&t);
  strftime(buf, sizeof(buf), "%F %T", localtime(&t));
  fprintf(stderr, "%s| ", buf);
}


x86 assembly (clang, -O0):
<print_time>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
call   1050 <time@plt>
lea    0x2f19(%rip),%rdi
call   1030 <localtime@plt>
mov    %eax,%ecx
lea    0x2eeb(%rip),%rdi
mov    $0x20,%esi
lea    0xe8f(%rip),%rdx
call   1060 <strftime@plt>
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
lea    0xe80(%rip),%rsi
lea    0x2ec3(%rip),%rdx
call   1040 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_time>:
push   %rbx
lea    0x2f28(%rip),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
lea    0x2ef1(%rip),%rbx
lea    0xe9a(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    %eax,%ecx
call   1060 <strftime@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
lea    0xe81(%rip),%rsi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@print_time.buf = internal global [32 x i8] zeroinitializer
@print_time.t = internal global i32 0
@.str = [6 x i8] c"%F %T\00"
@stderr = global i32 0
@.str.1 = [5 x i8] c"%s| \00"
define void @print_time() {
%1 = call i32 @time(i32* @print_time.t)
%2 = call i32 @localtime(i32* @print_time.t)
%3 = call i32 @strftime(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @print_time.buf, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @print_time.buf, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@print_time.buf = internal global [32 x i8] zeroinitializer
@print_time.t = internal global i32 0
@.str = [6 x i8] c"%F %T\00"
@stderr = global i32 0
@.str.1 = [5 x i8] c"%s| \00"
define void @print_time() {
%1 = tail call i32 @time(i32* @print_time.t)
%2 = tail call i32 @localtime(i32* @print_time.t)
%3 = tail call i32 @strftime(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @print_time.buf, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @print_time.buf, i64 0, i64 0))
ret void
}
void RTMemTmpFree(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemTmpFree() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ initLoganon(char *, char *);
int /*<<< orphan*/ loganonAnonymize(int);
int /*<<< orphan*/ terminateLoganon();
int /*<<< orphan*/ usage(char *);
int main(int argc, char *argv[]) {
  if (argc < 3)
    usage(argv[0]);
  initLoganon(argv[1], argv[2]);
  loganonAnonymize(1);
  terminateLoganon();
  return 0;
}


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)
cmpl   $0x3,-0x8(%rbp)
jge    116c <main+0x2c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <initLoganon@plt>
mov    $0x1,%edi
call   1060 <loganonAnonymize@plt>
mov    $0x0,%al
call   1030 <terminateLoganon@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
jg     1151 <main+0x11>
mov    (%rbx),%rdi
call   1050 <usage@plt>
mov    0x8(%rbx),%rdi
mov    0x10(%rbx),%rsi
call   1040 <initLoganon@plt>
mov    $0x1,%edi
call   1060 <loganonAnonymize@plt>
xor    %eax,%eax
call   1030 <terminateLoganon@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @usage(i8* %11)
br label %13
13: ; preds = %8, %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call i32 @initLoganon(i8* %16, i8* %19)
%21 = call i32 @loganonAnonymize(i32 1)
%22 = call i32 (...) @terminateLoganon()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @usage(i8* %5)
br label %7
7: ; preds = %4, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 @initLoganon(i8* %9, i8* %11)
%13 = tail call i32 @loganonAnonymize(i32 1)
%14 = tail call i32 (...) @terminateLoganon()
ret i32 0
}
void XtAppAddConverter() {}


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

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

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

LLVM IR (-O2):
define void @XtAppAddConverter() {
ret void
}
void prune_alias_exp2_CAF(int x) {
  int a[1];
  if (x + 1 != 1 + x) {
    a[1] = 0;
  }
}


x86 assembly (clang, -O0):
<prune_alias_exp2_CAF>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
je     1122 <prune_alias_exp2_CAF+0x22>
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @prune_alias_exp2_CAF(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
%6 = load i32, i32* %2
%7 = add nsw i32 1, %6
%8 = icmp ne i32 %5, %7
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 1
store i32 0, i32* %10
br label %11
11: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
define void @prune_alias_exp2_CAF(i32 %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rol(uint32_t x, int i) { return (x << i) | (x >> (32 - i)); }


x86 assembly (clang, -O0):
<rol>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rol>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rol(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rol(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ _gf256v_add(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               unsigned int);
void gf256v_set_zero(uint8_t *b, unsigned _num_byte) {
  _gf256v_add(b, b, _num_byte);
}


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

x86 assembly (clang, -O2):
<gf256v_set_zero>:
mov    %esi,%edx
mov    %rdi,%rsi
jmp    1030 <_gf256v_add@plt>

LLVM IR (-O0):
define void @gf256v_set_zero(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** %3
%7 = load i32, i32* %4
%8 = call i32 @_gf256v_add(i32* %5, i32* %6, i32 %7)
ret void
}

LLVM IR (-O2):
define void @gf256v_set_zero(i32* %0, i32 %1) {
%3 = tail call i32 @_gf256v_add(i32* %0, i32* %0, i32 %1)
ret void
}
int next_id(int no_iterate_flag) {
  static int id = 0;
  if (id == 2000000000) {
    return 2000000000;
  } else {
    if (no_iterate_flag) {
      return id;
    } else {
      return id++;
    }
  }
}


x86 assembly (clang, -O0):
<next_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x77359400,0x2f13(%rip)
94 35 77
jne    1123 <next_id+0x23>
movl   $0x77359400,-0x4(%rbp)
jmp    114f <next_id+0x4f>
cmpl   $0x0,-0x8(%rbp)
je     113b <next_id+0x3b>
mov    0x2ef1(%rip),%eax
mov    %eax,-0x4(%rbp)
jmp    114f <next_id+0x4f>
mov    0x2ee3(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2ed8(%rip)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_id>:
mov    0x2f1e(%rip),%eax
test   %edi,%edi
jne    111a <next_id+0x1a>
cmp    $0x77359400,%eax
je     111a <next_id+0x1a>
lea    0x1(%rax),%ecx
mov    %ecx,0x2f0a(%rip)
ret

LLVM IR (-O0):
@next_id.id = internal global i32 0
define i32 @next_id(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* @next_id.id
%5 = icmp eq i32 %4, 2000000000
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 2000000000, i32* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = load i32, i32* @next_id.id
store i32 %11, i32* %2
br label %15
12: ; preds = %7
%13 = load i32, i32* @next_id.id
%14 = add nsw i32 %13, 1
store i32 %14, i32* @next_id.id
store i32 %13, i32* %2
br label %15
15: ; preds = %12, %10, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@next_id.id = internal unnamed_addr global i32 0
define i32 @next_id(i32 %0) {
%2 = load i32, i32* @next_id.id
%3 = icmp ne i32 %2, 2000000000
%4 = icmp eq i32 %0, 0
%5 = and i1 %4, %3
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = add nsw i32 %2, 1
store i32 %7, i32* @next_id.id
br label %8
8: ; preds = %1, %6
ret i32 %2
}
/* Variables and functions */
unsigned long atol(char *);
unsigned long fib(unsigned long);
int /*<<< orphan*/ printf(char *, unsigned long, unsigned long);
int main(int argc, char *argv[]) {
  unsigned long IMax, value;
  IMax = 40;
  if (argc > 1)
    IMax = atol(argv[1]);
  value = fib(IMax);
  printf("The %02ld'th Fibonacci Number is: %ld\n", IMax, value);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x28,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1169 <main+0x39>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atol@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <fib@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x28,%ebx
cmp    $0x2,%edi
jl     1147 <main+0x17>
mov    0x8(%rsi),%rdi
call   1050 <atol@plt>
mov    %rax,%rbx
mov    %rbx,%rdi
call   1040 <fib@plt>
lea    0xeaa(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"The %02ld'th Fibonacci Number is: %ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 40, i64* %6
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 1
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i64 @atol(i8* %13)
store i64 %14, i64* %6
br label %15
15: ; preds = %10, %2
%16 = load i64, i64* %6
%17 = call i64 @fib(i64 %16)
store i64 %17, i64* %7
%18 = load i64, i64* %6
%19 = load i64, i64* %7
%20 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 %18, i64 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"The %02ld'th Fibonacci Number is: %ld\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @atol(i8* %6)
br label %8
8: ; preds = %4, %2
%9 = phi i64 [ %7, %4 ], [ 40, %2 ]
%10 = tail call i64 @fib(i64 %9)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 %9, i64 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void test_printf(void) {
  int x = 100;
  printf("%u\n", x);
}


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

x86 assembly (clang, -O2):
<test_printf>:
lea    0xee9(%rip),%rdi
mov    $0x64,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%u\0A\00"
define void @test_printf() {
%1 = alloca i32
store i32 100, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define void @test_printf() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 100)
ret void
}
void inter_rodex_sql_final(void) { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void output_name_nomangle(FILE *outptr, const char *p) {
  fprintf(outptr, "<b:Person>");
  fprintf(outptr, "<b:Last>%s</b:Last>", p);
  fprintf(outptr, "</b:Person>\n");
}


x86 assembly (clang, -O0):
<output_name_nomangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xeca(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_name_nomangle>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xec1(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xec1(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"<b:Person>\00"
@.str.1 = [20 x i8] c"<b:Last>%s</b:Last>\00"
@.str.2 = [13 x i8] c"</b:Person>\0A\00"
define void @output_name_nomangle(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%7 = load i32*, i32** %3
%8 = load i8*, i8** %4
%9 = call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = load i32*, i32** %3
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"<b:Person>\00"
@.str.1 = [20 x i8] c"<b:Last>%s</b:Last>\00"
@.str.2 = [13 x i8] c"</b:Person>\0A\00"
define void @output_name_nomangle(i32* nocapture %0, i8* %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 10, i64 1, i32* %0)
%4 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i64 12, i64 1, i32* %0)
ret void
}
/* Variables and functions */
void *calloc(size_t, int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ nc_error(char *);
void *MYcalloc(size_t size) {
  void *m;
  if (!(m = calloc(size, 1)))
    nc_error("memory allocation rejected!");
  memset(m, 0, size);
  return m;
}


x86 assembly (clang, -O0):
<MYcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1164 <MYcalloc+0x34>
lea    0xea1(%rip),%rdi
call   1050 <nc_error@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MYcalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1155 <MYcalloc+0x25>
lea    0xeb0(%rip),%rdi
call   1050 <nc_error@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [28 x i8] c"memory allocation rejected!\00"
define i8* @MYcalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @calloc(i64 %4, i32 1)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @nc_error(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
%11 = load i64, i64* %2
%12 = call i32 @memset(i8* %10, i32 0, i64 %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [28 x i8] c"memory allocation rejected!\00"
define i8* @MYcalloc(i64 %0) {
%2 = tail call i8* @calloc(i64 %0, i32 1)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @nc_error(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t unaligned32(const void *v) {
  struct Unaligned {
    uint32_t i;
  } __attribute__((packed));
  return ((const struct Unaligned *)v)->i;
}


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

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

LLVM IR (-O0):
%struct.Unaligned = type { i32 }
define i32 @unaligned32(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.Unaligned*
%5 = getelementptr inbounds %struct.Unaligned, %struct.Unaligned* %4, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @unaligned32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void err_oom(char *msg) {
  fprintf(stderr, "Out of memory: malloc failed in\t%s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<err_oom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err_oom>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"Out of memory: malloc failed in\09%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @err_oom(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"Out of memory: malloc failed in\09%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @err_oom(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
int function() { return 1; }


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

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

LLVM IR (-O0):
define i32 @function() {
ret i32 1
}

LLVM IR (-O2):
define i32 @function() {
ret i32 1
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
bool __list_del_entry_valid(struct list_head *entry) { return true; }


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

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

LLVM IR (-O0):
%struct.list_head = type { i32 }
define i32 @__list_del_entry_valid(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %2
ret i32 1
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define i32 @__list_del_entry_valid(%struct.list_head* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
scalar_t__ alloca(int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void bad_alloca(char *name) {
  char *new_name = (char *)alloca(strlen(name + 1));
}


x86 assembly (clang, -O0):
<bad_alloca>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1030 <strlen@plt>
mov    %eax,%edi
call   1040 <alloca@plt>
mov    %rax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bad_alloca>:
push   %rax
add    $0x1,%rdi
call   1030 <strlen@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <alloca@plt>

LLVM IR (-O0):
define void @bad_alloca(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = call i32 @strlen(i8* %5)
%7 = call i64 @alloca(i32 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
ret void
}

LLVM IR (-O2):
define void @bad_alloca(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = tail call i32 @strlen(i8* %2)
%4 = tail call i64 @alloca(i32 %3)
ret void
}
int test_imm_84uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x84 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_84uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 132
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 1;
  do {
    printf("%d\n", i);
    i++;
    if (i < 15) {
      continue;
    }
  } while (false);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xf,-0x8(%rbp)
jge    114d <main+0x3d>
jmp    1152 <main+0x42>
jmp    1152 <main+0x42>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fill(int *);
int /*<<< orphan*/ free(int *);
int *life(int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ print(int *);
int /*<<< orphan*/ sleep(double);
main() {
  int *S = (int *)malloc(50 * 50 * sizeof(int));
  int *S2;
  fill(S);
  while (1) {
    S2 = life(S);
    free(S);
    S = S2;
    print(S);
    sleep(0.3);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2710,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <fill@plt>
mov    -0x10(%rbp),%rdi
call   1080 <life@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <print@plt>
movsd  0xe4b(%rip),%xmm0
call   1070 <sleep@plt>
jmp    1186 <main+0x26>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x2710,%edi
call   1060 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1050 <fill@plt>
nopl   0x0(%rax)
mov    %r14,%rdi
call   1080 <life@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1040 <print@plt>
movsd  0xe5d(%rip),%xmm0
call   1070 <sleep@plt>
mov    %rbx,%r14
jmp    1180 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i64 @malloc(i32 10000)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %2
%6 = load i32*, i32** %2
%7 = call i32 @fill(i32* %6)
br label %8
8: ; preds = %0, %8
%9 = load i32*, i32** %2
%10 = call i32* @life(i32* %9)
store i32* %10, i32** %3
%11 = load i32*, i32** %2
%12 = call i32 @free(i32* %11)
%13 = load i32*, i32** %3
store i32* %13, i32** %2
%14 = load i32*, i32** %2
%15 = call i32 @print(i32* %14)
%16 = call i32 @sleep(double 3.000000e-01)
br label %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 10000)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @fill(i32* %2)
br label %4
4: ; preds = %4, %0
%5 = phi i32* [ %2, %0 ], [ %6, %4 ]
%6 = tail call i32* @life(i32* %5)
%7 = tail call i32 @free(i32* %5)
%8 = tail call i32 @print(i32* %6)
%9 = tail call i32 @sleep(double 3.000000e-01)
br label %4
}
/* Variables and functions */
void *my_aligned_alloc(int, int);
void *t0_immediate0() { return my_aligned_alloc(320, 16); }


x86 assembly (clang, -O0):
<t0_immediate0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x140,%edi
mov    $0x10,%esi
call   1030 <my_aligned_alloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t0_immediate0>:
mov    $0x140,%edi
mov    $0x10,%esi
jmp    1030 <my_aligned_alloc@plt>

LLVM IR (-O0):
define i8* @t0_immediate0() {
%1 = call i8* @my_aligned_alloc(i32 320, i32 16)
ret i8* %1
}

LLVM IR (-O2):
define i8* @t0_immediate0() {
%1 = tail call i8* @my_aligned_alloc(i32 320, i32 16)
ret i8* %1
}
/* Variables and functions */
int fabs(double);
double pow(int, double);
double coefficient_of_restitution_bridges(double v) {
  double eps = 0.32 * pow(fabs(v) * 100., -0.234);
  if (eps > 1)
    eps = 1;
  if (eps < 0)
    eps = 0;
  return eps;
}


x86 assembly (clang, -O0):
<coefficient_of_restitution_bridges>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xed5(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xebd(%rip),%xmm0
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xea5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe87(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1190 <coefficient_of_restitution_bridges+0x70>
movsd  0xe75(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11a6 <coefficient_of_restitution_bridges+0x86>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coefficient_of_restitution_bridges>:
push   %rax
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xecb(%rip),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xec7(%rip),%xmm0
call   1040 <pow@plt>
mulsd  0xec2(%rip),%xmm0
movsd  0xec2(%rip),%xmm1
minsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
maxsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @coefficient_of_restitution_bridges(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 @fabs(double %4)
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 1.000000e+02
%8 = fptosi double %7 to i32
%9 = call double @pow(i32 %8, double -2.340000e-01)
%10 = fmul double 3.200000e-01, %9
store double %10, double* %3
%11 = load double, double* %3
%12 = fcmp ogt double %11, 1.000000e+00
br i1 %12, label %13, label %14
13: ; preds = %1
store double 1.000000e+00, double* %3
br label %14
14: ; preds = %13, %1
%15 = load double, double* %3
%16 = fcmp olt double %15, 0.000000e+00
br i1 %16, label %17, label %18
17: ; preds = %14
store double 0.000000e+00, double* %3
br label %18
18: ; preds = %17, %14
%19 = load double, double* %3
ret double %19
}

LLVM IR (-O2):
define double @coefficient_of_restitution_bridges(double %0) {
%2 = tail call i32 @fabs(double %0)
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 1.000000e+02
%5 = fptosi double %4 to i32
%6 = tail call double @pow(i32 %5, double -2.340000e-01)
%7 = fmul double %6, 3.200000e-01
%8 = fcmp ogt double %7, 1.000000e+00
%9 = select i1 %8, double 1.000000e+00, double %7
%10 = fcmp olt double %9, 0.000000e+00
%11 = select i1 %10, double 0.000000e+00, double %9
ret double %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int getc(int /*<<< orphan*/ *);
unsigned long getlong(FILE *f) {
  unsigned short ret;
  ret = getc(f);
  ret = ret | (getc(f) << 8);
  ret = ret | (getc(f) << 16);
  ret = ret | (getc(f) << 24);
  return ret;
}


x86 assembly (clang, -O0):
<getlong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
shl    $0x8,%ecx
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
shl    $0x10,%ecx
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
shl    $0x18,%ecx
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getlong>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <getc@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1030 <getc@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
or     %r14d,%ebp
mov    %rbx,%rdi
call   1030 <getc@plt>
mov    %rbx,%rdi
call   1030 <getc@plt>
movzwl %bp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i64 @getlong(i32* %0) {
%2 = alloca i32*
%3 = alloca i16
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @getc(i32* %4)
%6 = trunc i32 %5 to i16
store i16 %6, i16* %3
%7 = load i16, i16* %3
%8 = zext i16 %7 to i32
%9 = load i32*, i32** %2
%10 = call i32 @getc(i32* %9)
%11 = shl i32 %10, 8
%12 = or i32 %8, %11
%13 = trunc i32 %12 to i16
store i16 %13, i16* %3
%14 = load i16, i16* %3
%15 = zext i16 %14 to i32
%16 = load i32*, i32** %2
%17 = call i32 @getc(i32* %16)
%18 = shl i32 %17, 16
%19 = or i32 %15, %18
%20 = trunc i32 %19 to i16
store i16 %20, i16* %3
%21 = load i16, i16* %3
%22 = zext i16 %21 to i32
%23 = load i32*, i32** %2
%24 = call i32 @getc(i32* %23)
%25 = shl i32 %24, 24
%26 = or i32 %22, %25
%27 = trunc i32 %26 to i16
store i16 %27, i16* %3
%28 = load i16, i16* %3
%29 = zext i16 %28 to i64
ret i64 %29
}

LLVM IR (-O2):
define i64 @getlong(i32* nocapture %0) {
%2 = tail call i32 @getc(i32* %0)
%3 = tail call i32 @getc(i32* %0)
%4 = shl i32 %3, 8
%5 = or i32 %4, %2
%6 = tail call i32 @getc(i32* %0)
%7 = tail call i32 @getc(i32* %0)
%8 = and i32 %5, 65535
%9 = zext i32 %8 to i64
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void stk_print_hello() {
  printf("====================================================\n");
  printf("=================== STK IM CLIENT  =================\n");
  printf("====================================================\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<stk_print_hello>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stk_print_hello>:
push   %rbx
lea    0xf0d(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"====================================================\0A\00"
@.str.1 = [54 x i8] c"=================== STK IM CLIENT =================\0A\00"
@stdout = global i32 0
define void @stk_print_hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@str.2 = [53 x i8] c"=================== STK IM CLIENT =================\00"
@str.3 = [53 x i8] c"====================================================\00"
define void @stk_print_hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.3, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.3, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lcd_cmd(int);
void lcd_goto_rc(int row, int col) {
  col &= 0x1f;
  col |= 0x080;
  if (row)
    col |= 0x40;
  lcd_cmd(col);
}


x86 assembly (clang, -O0):
<lcd_goto_rc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     $0x80,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1145 <lcd_goto_rc+0x35>
mov    -0x8(%rbp),%eax
or     $0x40,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <lcd_cmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_goto_rc>:
and    $0x1f,%esi
xor    %eax,%eax
test   %edi,%edi
setne  %al
shl    $0x6,%eax
lea    (%rax,%rsi,1),%edi
add    $0x80,%edi
jmp    1030 <lcd_cmd@plt>

LLVM IR (-O0):
define void @lcd_goto_rc(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 = and i32 %5, 31
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = or i32 %7, 128
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i32, i32* %4
%13 = or i32 %12, 64
store i32 %13, i32* %4
br label %14
14: ; preds = %11, %2
%15 = load i32, i32* %4
%16 = call i32 @lcd_cmd(i32 %15)
ret void
}

LLVM IR (-O2):
define void @lcd_goto_rc(i32 %0, i32 %1) {
%3 = and i32 %1, 31
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 128, i32 192
%6 = or i32 %3, %5
%7 = tail call i32 @lcd_cmd(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_check_stability(float *, float *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main() {
  float a[] = {1.000000000000000, -0.375000000000000, 0.187500000000000};
  float b[] = {0.406250000000000, -0.781250000000000, 0.406250000000000};
  assert(__ESBMC_check_stability(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    0xec0(%rip),%eax
mov    %eax,-0x14(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1030 <__ESBMC_check_stability@plt>
mov    %eax,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x20(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x18(%rsp)
mov    0xed4(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xec1(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x18(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <__ESBMC_check_stability@plt>
mov    %eax,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [3 x float] [float 1.000000e+00, float -3.750000e-01, float 1.875000e-01]
@__const.main.b = [3 x float] [float 4.062500e-01, float -7.812500e-01, float 4.062500e-01]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x float]
%3 = alloca [3 x float]
store i32 0, i32* %1
%4 = bitcast [3 x float]* %2 to i8*
%5 = bitcast [3 x float]* %3 to i8*
%6 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 0
%7 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 0
%8 = call i32 @__ESBMC_check_stability(float* %6, float* %7)
%9 = call i32 @assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [3 x float] [float 1.000000e+00, float -3.750000e-01, float 1.875000e-01]
@__const.main.b = [3 x float] [float 4.062500e-01, float -7.812500e-01, float 4.062500e-01]
define i32 @main() {
%1 = alloca [3 x float]
%2 = alloca [3 x float]
%3 = bitcast [3 x float]* %1 to i8*
%4 = bitcast [3 x float]* %2 to i8*
%5 = getelementptr inbounds [3 x float], [3 x float]* %1, i64 0, i64 0
%6 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 0
%7 = call i32 @__ESBMC_check_stability(float* %5, float* %6)
%8 = call i32 @assert(i32 %7)
ret i32 0
}
/* Variables and functions */
double __infer_nondet_double();
double nextafter(double x, double y) { return __infer_nondet_double(); }


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

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

LLVM IR (-O0):
define double @nextafter(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call double (...) @__infer_nondet_double()
ret double %5
}

LLVM IR (-O2):
define double @nextafter(double %0, double %1) {
%3 = tail call double (...) @__infer_nondet_double()
ret double %3
}
/* Variables and functions */
double Map360(double);
double Map180(double angle) {
  double angle360;
  angle360 = Map360(angle);
  if (angle360 >= 180.0) {
    return (angle360 - 360.0);
  } else {
    return (angle360);
  }
}


x86 assembly (clang, -O0):
<Map180>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <Map360@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     115e <Map180+0x4e>
movsd  -0x18(%rbp),%xmm0
movsd  0xeb8(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1168 <Map180+0x58>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Map180>:
push   %rax
call   1030 <Map360@plt>
movsd  0xee2(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xede(%rip),%xmm2
cmpnlesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Map180(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = call double @Map360(double %5)
store double %6, double* %4
%7 = load double, double* %4
%8 = fcmp oge double %7, 1.800000e+02
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load double, double* %4
%11 = fsub double %10, 3.600000e+02
store double %11, double* %2
br label %14
12: ; preds = %1
%13 = load double, double* %4
store double %13, double* %2
br label %14
14: ; preds = %12, %9
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @Map180(double %0) {
%2 = tail call double @Map360(double %0)
%3 = fcmp ult double %2, 1.800000e+02
%4 = fadd double %2, -3.600000e+02
%5 = select i1 %3, double %2, double %4
ret double %5
}
/* Variables and functions */
int random();
int skiplistRandomLevel(void) {
  int level = 1;
  while ((random() & 0xFFFF) < (0.25 * 0xFFFF)) {
    level += 1;
  }
  return (level < 32) ? level : 32;
}


x86 assembly (clang, -O0):
<skiplistRandomLevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
and    $0xffff,%eax
cvtsi2sd %eax,%xmm1
movsd  0xec9(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    114f <skiplistRandomLevel+0x3f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <skiplistRandomLevel+0xf>
cmpl   $0x20,-0x4(%rbp)
jge    1164 <skiplistRandomLevel+0x54>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1171 <skiplistRandomLevel+0x61>
mov    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1171 <skiplistRandomLevel+0x61>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skiplistRandomLevel>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1030 <random@plt>
add    $0x1,%ebx
test   $0xc000,%eax
je     1120 <skiplistRandomLevel+0x10>
cmp    $0x20,%ebx
mov    $0x20,%eax
cmovb  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @skiplistRandomLevel() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %7, %0
%3 = call i32 (...) @random()
%4 = and i32 %3, 65535
%5 = sitofp i32 %4 to double
%6 = fcmp olt double %5, 0x40CFFFE000000000
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
%11 = load i32, i32* %1
%12 = icmp slt i32 %11, 32
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* %1
br label %16
15: ; preds = %10
br label %16
16: ; preds = %15, %13
%17 = phi i32 [ %14, %13 ], [ 32, %15 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @skiplistRandomLevel() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %6, %1 ]
%3 = tail call i32 (...) @random()
%4 = and i32 %3, 49152
%5 = icmp eq i32 %4, 0
%6 = add nuw nsw i32 %2, 1
br i1 %5, label %1, label %7
7: ; preds = %1
%8 = icmp ult i32 %2, 32
%9 = select i1 %8, i32 %2, i32 32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ set_filename(char *, char *);
int /*<<< orphan*/ with_outfile(void (*)());
void with_outfile_named(char *outfn, void (*func)(void)) {
  set_filename("out", outfn);
  with_outfile(func);
}


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

x86 assembly (clang, -O2):
<with_outfile_named>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1030 <set_filename@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <with_outfile@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"out\00"
define void @with_outfile_named(i8* %0, void ()* %1) {
%3 = alloca i8*
%4 = alloca void ()*
store i8* %0, i8** %3
store void ()* %1, void ()** %4
%5 = load i8*, i8** %3
%6 = call i32 @set_filename(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load void ()*, void ()** %4
%8 = bitcast void ()* %7 to void (...)*
%9 = call i32 @with_outfile(void (...)* %8)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"out\00"
define void @with_outfile_named(i8* %0, void ()* %1) {
%3 = tail call i32 @set_filename(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = bitcast void ()* %1 to void (...)*
%5 = tail call i32 @with_outfile(void (...)* %4)
ret void
}
/* Type definitions */
struct fid_poll {
  int dummy;
};

/* Variables and functions */
int gnix_poll_poll(struct fid_poll *, void **, int);
int fi_poll(struct fid_poll *pollset, void **context, int count) {
  return gnix_poll_poll(pollset, context, count);
}


x86 assembly (clang, -O0):
<fi_poll>:
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 <gnix_poll_poll@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fi_poll>:
jmp    1030 <gnix_poll_poll@plt>

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

LLVM IR (-O2):
%struct.fid_poll = type { i32 }
define i32 @fi_poll(%struct.fid_poll* %0, i8** %1, i32 %2) {
%4 = tail call i32 @gnix_poll_poll(%struct.fid_poll* %0, i8** %1, i32 %2)
ret i32 %4
}