xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int main(int argc, char **argv) {
  char equation[1024];
  while (fgets(equation, 1024, stdin) != NULL) {
    printf("%s", equation);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
mov    $0x400,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     1175 <main+0x55>
lea    -0x410(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
jmp    1139 <main+0x19>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x400,%rsp
mov    0x2eb5(%rip),%r15
mov    (%r15),%edx
mov    %rsp,%rdi
mov    $0x400,%esi
call   1040 <fgets@plt>
test   %rax,%rax
je     1180 <main+0x60>
lea    0xeb1(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    (%r15),%edx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <fgets@plt>
test   %rax,%rax
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32* @fgets(i8* %4, i32 1024, i32 %5)
%7 = icmp eq i32* %6, null
br i1 %7, label %13, label %8
8: ; preds = %2, %8
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%10 = load i32, i32* @stdin
%11 = call i32* @fgets(i8* %4, i32 1024, i32 %10)
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %8
13: ; preds = %8, %2
ret i32 0
}
int j2sl(int c1, int c2) {
  return c2 + ((c1 & 1) ? (c2 < 0x60 ? 0x1f : 0x20) : 0x7e);
}


x86 assembly (clang, -O0):
<j2sl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113a <j2sl+0x3a>
mov    -0x8(%rbp),%edx
mov    $0x20,%eax
mov    $0x1f,%ecx
cmp    $0x60,%edx
cmovl  %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <j2sl+0x47>
mov    $0x7e,%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <j2sl+0x47>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<j2sl>:
xor    %eax,%eax
cmp    $0x60,%esi
setl   %al
mov    $0x20,%ecx
sub    %eax,%ecx
test   $0x1,%dil
mov    $0x7e,%eax
cmovne %ecx,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @j2sl(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = and i32 %6, 1
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 96
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 31, i32 32
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %9
%16 = phi i32 [ %13, %9 ], [ 126, %14 ]
%17 = add nsw i32 %5, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @j2sl(i32 %0, i32 %1) {
%3 = and i32 %0, 1
%4 = icmp eq i32 %3, 0
%5 = icmp slt i32 %1, 96
%6 = select i1 %5, i32 31, i32 32
%7 = select i1 %4, i32 126, i32 %6
%8 = add nsw i32 %7, %1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ apioReceive();
int /*<<< orphan*/ select();
void apioLoop() {
  apioReceive();
  select();
}


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

x86 assembly (clang, -O2):
<apioLoop>:
push   %rax
xor    %eax,%eax
call   1040 <apioReceive@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <select@plt>

LLVM IR (-O0):
define void @apioLoop() {
%1 = call i32 (...) @apioReceive()
%2 = call i32 (...) @select()
ret void
}

LLVM IR (-O2):
define void @apioLoop() {
%1 = tail call i32 (...) @apioReceive()
%2 = tail call i32 (...) @select()
ret void
}
int num_spacecraft_manufacturers(void) { return 6; }


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

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

LLVM IR (-O0):
define i32 @num_spacecraft_manufacturers() {
ret i32 6
}

LLVM IR (-O2):
define i32 @num_spacecraft_manufacturers() {
ret i32 6
}
/* Variables and functions */
int isatty(int /*<<< orphan*/);
int interact__() { return isatty(0); }


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

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

LLVM IR (-O0):
define i32 @interact__() {
%1 = call i32 @isatty(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @interact__() {
%1 = tail call i32 @isatty(i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ EXISendByte(char);
void GeckoSendBuffer(char *buffer) {
  int i = 0;
  while (buffer[i] != '\0') {
    EXISendByte(buffer[i]);
    ++i;
  }
  return;
}


x86 assembly (clang, -O0):
<GeckoSendBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <GeckoSendBuffer+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <EXISendByte@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <GeckoSendBuffer+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GeckoSendBuffer>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <GeckoSendBuffer+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <EXISendByte@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <GeckoSendBuffer+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @GeckoSendBuffer(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @EXISendByte(i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int next_end_of_line(FILE *f) {
  int c;
  for (c = fgetc(f); c != EOF; c = fgetc(f)) {
    if (c == '\n') {
      break;
    }
  }
  return c;
}


x86 assembly (clang, -O0):
<next_end_of_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2eb6(%rip),%rcx
cmp    (%rcx),%eax
je     115f <next_end_of_line+0x4f>
cmpl   $0xa,-0xc(%rbp)
jne    1149 <next_end_of_line+0x39>
jmp    115f <next_end_of_line+0x4f>
jmp    114e <next_end_of_line+0x3e>
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
jmp    1128 <next_end_of_line+0x18>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_end_of_line>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <fgetc@plt>
cmp    $0xa,%eax
je     1142 <next_end_of_line+0x32>
mov    0x2ec0(%rip),%r14
nopl   0x0(%rax,%rax,1)
cmp    (%r14),%eax
je     1142 <next_end_of_line+0x32>
mov    %rbx,%rdi
call   1030 <fgetc@plt>
cmp    $0xa,%eax
jne    1130 <next_end_of_line+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @next_end_of_line(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %2, %3
%5 = icmp eq i32 %2, 10
%6 = or i1 %5, %4
br i1 %6, label %13, label %7
7: ; preds = %1, %7
%8 = tail call i32 @fgetc(i32* %0)
%9 = load i32, i32* @EOF
%10 = icmp eq i32 %8, %9
%11 = icmp eq i32 %8, 10
%12 = or i1 %11, %10
br i1 %12, label %13, label %7
13: ; preds = %7, %1
%14 = phi i32 [ %2, %1 ], [ %8, %7 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;

/* Variables and functions */
int /*<<< orphan*/ glRecti(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/);
void Recti(GLint x1, GLint y1, GLint x2, GLint y2) { glRecti(x1, y1, x2, y2); }


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

x86 assembly (clang, -O2):
<Recti>:
jmp    1030 <glRecti@plt>

LLVM IR (-O0):
define void @Recti(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @glRecti(i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @Recti(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @glRecti(i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int ENODEV;
int qpnp_pon_is_hard_reset(void) { return -ENODEV; }


x86 assembly (clang, -O0):
<qpnp_pon_is_hard_reset>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    0x2ed3(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qpnp_pon_is_hard_reset>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENODEV = global i32 0
define i32 @qpnp_pon_is_hard_reset() {
%1 = load i32, i32* @ENODEV
%2 = sub nsw i32 0, %1
ret i32 %2
}

LLVM IR (-O2):
@ENODEV = global i32 0
define i32 @qpnp_pon_is_hard_reset() {
%1 = load i32, i32* @ENODEV
%2 = sub nsw i32 0, %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, float,
                           float);
int /*<<< orphan*/ stderr;
int expect_float(float expected, float actual, const char *description) {
  int passed = 1;
  if (expected != actual) {
    passed = 0;
    fprintf(stderr, "%s: Expected %f, got %f\n", description, expected, actual);
  }
  return passed;
}


x86 assembly (clang, -O0):
<expect_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jne    1147 <expect_float+0x37>
jp     1147 <expect_float+0x37>
jmp    1171 <expect_float+0x61>
movl   $0x0,-0x14(%rbp)
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expect_float>:
ucomiss %xmm1,%xmm0
jne    1117 <expect_float+0x7>
jnp    1137 <expect_float+0x27>
push   %rax
mov    %rdi,%rdx
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"%s: Expected %f, got %f\0A\00"
define i32 @expect_float(float %0, float %1, i8* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca i8*
%7 = alloca i32
store float %0, float* %4
store float %1, float* %5
store i8* %2, i8** %6
store i32 1, i32* %7
%8 = load float, float* %4
%9 = load float, float* %5
%10 = fcmp une float %8, %9
br i1 %10, label %11, label %17
11: ; preds = %3
store i32 0, i32* %7
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %6
%14 = load float, float* %4
%15 = load float, float* %5
%16 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %13, float %14, float %15)
br label %17
17: ; preds = %11, %3
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"%s: Expected %f, got %f\0A\00"
define i32 @expect_float(float %0, float %1, i8* %2) {
%4 = fcmp une float %0, %1
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %2, float %0, float %1)
br label %8
8: ; preds = %5, %3
%9 = phi i32 [ 0, %5 ], [ 1, %3 ]
ret i32 %9
}
void InitializeIvr729Player(unsigned int chid, void *pIvrPlay) {}


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

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

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

LLVM IR (-O2):
define void @InitializeIvr729Player(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __endutent();
void endutxent(void) { __endutent(); }


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

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

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

LLVM IR (-O2):
define void @endutxent() {
%1 = tail call i32 (...) @__endutent()
ret void
}
/* Variables and functions */
void Default_Handler(void) {
  for (;;) {
  }
}


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

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

LLVM IR (-O0):
define void @Default_Handler() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @Default_Handler() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ memset(float *, int, int);
void finn_vec2_one(float *result) { memset(result, 1, sizeof(float) * 2); }


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

x86 assembly (clang, -O2):
<finn_vec2_one>:
mov    $0x1,%esi
mov    $0x8,%edx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @finn_vec2_one(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = call i32 @memset(float* %3, i32 1, i32 8)
ret void
}

LLVM IR (-O2):
define void @finn_vec2_one(float* %0) {
%2 = tail call i32 @memset(float* %0, i32 1, i32 8)
ret void
}
int fun478() { return 478; }


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

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

LLVM IR (-O0):
define i32 @fun478() {
ret i32 478
}

LLVM IR (-O2):
define i32 @fun478() {
ret i32 478
}
/* Variables and functions */
scalar_t__ dremf(float, float);
int /*<<< orphan*/ link_failure_dremf();
void test_dremf(float f1, float f2) {
  if (dremf(f1, f2) != dremf(f1, f2))
    link_failure_dremf();
}


x86 assembly (clang, -O0):
<test_dremf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <dremf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <dremf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     116b <test_dremf+0x4b>
mov    $0x0,%al
call   1030 <link_failure_dremf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dremf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x8(%rsp)
call   1040 <dremf@plt>
mov    %rax,%rbx
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
call   1040 <dremf@plt>
cmp    %rax,%rbx
jne    1155 <test_dremf+0x35>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_dremf@plt>

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

LLVM IR (-O2):
define void @test_dremf(float %0, float %1) {
%3 = tail call i64 @dremf(float %0, float %1)
%4 = tail call i64 @dremf(float %0, float %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_dremf()
br label %8
8: ; preds = %6, %2
ret void
}
unsigned long long f4(unsigned long long diff) {
  return ((unsigned long long)((signed long long)diff < 0 ? -diff : diff));
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <f4+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <f4+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @f4(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub i64 0, %6
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @f4(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 false)
ret i64 %2
}
int sbus_open(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sbus_open() {
ret i32 0
}
char *xstrdup(s)
char *s;
{
  char *str;
  extern char *strcpy();
  str = xmalloc((long)(strlen(s) + 1));
  (void)strcpy(str, s);
  return str;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1050 <xmalloc@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
xor    %eax,%eax
call   1050 <xmalloc@plt>
movslq %eax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add i64 %5, 1
%7 = call i32 (i64, ...) bitcast (i32 (...)* @xmalloc to i32 (i64, ...)*)(i64 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i8* @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i32 (i64, ...) bitcast (i32 (...)* @xmalloc to i32 (i64, ...)*)(i64 %3)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = tail call i8* @strcpy(i8* dereferenceable(1) %6, i8* dereferenceable(1) %0)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i, j, k;
  i = 0;
  j = 0;
  if (j)
    j--;
  else
    i++;
  if (i)
    i--;
  else
    j++;
  k = i + j;
  printf("%d", k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1145 <main+0x35>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    114e <main+0x3e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1166 <main+0x56>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    116f <main+0x5f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Type definitions */
struct kexec_segment {
  int dummy;
};

/* Variables and functions */
scalar_t__ syscall(int, void *, unsigned long, struct kexec_segment *,
                   unsigned long);
long kexec_load(void *entry, unsigned long nr_segments,
                struct kexec_segment *segments, unsigned long flags) {
  return (long)syscall(246, entry, nr_segments, segments, flags);
}


x86 assembly (clang, -O0):
<kexec_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    $0xf6,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kexec_load>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xf6,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.kexec_segment = type { i32 }
define i64 @kexec_load(i8* %0, i64 %1, %struct.kexec_segment* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca %struct.kexec_segment*
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store %struct.kexec_segment* %2, %struct.kexec_segment** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load %struct.kexec_segment*, %struct.kexec_segment** %7
%12 = load i64, i64* %8
%13 = call i64 @syscall(i32 246, i8* %9, i64 %10, %struct.kexec_segment* %11, i64 %12)
ret i64 %13
}

LLVM IR (-O2):
%struct.kexec_segment = type { i32 }
define i64 @kexec_load(i8* %0, i64 %1, %struct.kexec_segment* %2, i64 %3) {
%5 = tail call i64 @syscall(i32 246, i8* %0, i64 %1, %struct.kexec_segment* %2, i64 %3)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void func_enum(int x) { printf("enum: %d\n", x); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"enum: %d\0A\00"
define void @func_enum(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
long func();
int main() {
  long a = func();
  long b = "asdf";
  return a == b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <func@plt>
mov    %rax,-0x10(%rbp)
lea    0xecf(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <func@plt>
lea    0xee1(%rip),%rdx
xor    %ecx,%ecx
cmp    %rdx,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
%4 = call i64 (...) @func()
store i64 %4, i64* %2
store i64 ptrtoint ([5 x i8]* @.str to i64), i64* %3
%5 = load i64, i64* %2
%6 = load i64, i64* %3
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = tail call i64 (...) @func()
%2 = icmp eq i64 %1, ptrtoint ([5 x i8]* @.str to i64)
%3 = zext i1 %2 to i32
ret i32 %3
}
char *info_LFIRS() { return "LFIRS"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"LFIRS\00"
define i8* @info_LFIRS() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
__attribute__((__weak__, __always___)) char *
softboundmpx_setlocale(int category, const char *locale) {
  void *ret_ptr = setlocale(category, locale);
  __softboundmpx_store_return_metadata(
      ret_ptr, (void *)((char *)ret_ptr + strlen(ret_ptr)));
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundmpx_setlocale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <setlocale@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdi
add    %rax,%rsi
mov    $0x0,%al
call   1050 <__softboundmpx_store_return_metadata@plt>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_setlocale>:
push   %rbx
xor    %eax,%eax
call   1040 <setlocale@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    (%rax,%rbx,1),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <__softboundmpx_store_return_metadata@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundmpx_setlocale(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = load i8*, i8** %4
%8 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @setlocale to i32 (i32, i8*, ...)*)(i32 %6, i8* %7)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %5
%11 = load i8*, i8** %5
%12 = load i8*, i8** %5
%13 = load i8*, i8** %5
%14 = call i64 @strlen(i8* %13)
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @__softboundmpx_store_return_metadata to i32 (i8*, i8*, ...)*)(i8* %11, i8* %15)
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define weak i8* @softboundmpx_setlocale(i32 %0, i8* %1) {
%3 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @setlocale to i32 (i32, i8*, ...)*)(i32 %0, i8* %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = tail call i64 @strlen(i8* dereferenceable(1) %5)
%7 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @__softboundmpx_store_return_metadata to i32 (i8*, i8*, ...)*)(i8* %5, i8* %7)
ret i8* %5
}
void eventfd_ctx_put(struct eventfd_ctx *ctx) {}


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

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

LLVM IR (-O0):
%struct.eventfd_ctx = type opaque
define void @eventfd_ctx_put(%struct.eventfd_ctx* %0) {
%2 = alloca %struct.eventfd_ctx*
store %struct.eventfd_ctx* %0, %struct.eventfd_ctx** %2
ret void
}

LLVM IR (-O2):
%struct.eventfd_ctx = type opaque
define void @eventfd_ctx_put(%struct.eventfd_ctx* nocapture %0) {
ret void
}
void xio_task_reset(struct xio_task *task) {}


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

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

LLVM IR (-O0):
%struct.xio_task = type opaque
define void @xio_task_reset(%struct.xio_task* %0) {
%2 = alloca %struct.xio_task*
store %struct.xio_task* %0, %struct.xio_task** %2
ret void
}

LLVM IR (-O2):
%struct.xio_task = type opaque
define void @xio_task_reset(%struct.xio_task* nocapture %0) {
ret void
}
int main(int argc, char *argv[], ...) { return 0; }


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

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, ...) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void xrefresh() { system("xrefresh"); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"xrefresh\00"
define void @xrefresh() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t not_impl(size_t const argument) { return !argument; }


x86 assembly (clang, -O0):
<not_impl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<not_impl>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i64 @not_impl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = sext i32 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @not_impl(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = zext i1 %2 to i64
ret i64 %3
}
int findLeftChild(int index) { return index * 2 + 1; }


x86 assembly (clang, -O0):
<findLeftChild>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findLeftChild>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @findLeftChild(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 2
%5 = add nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @findLeftChild(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int);
char *random_string_gen() {
  char *s;
  static int count = 0;
  count++;
  s = (char *)malloc(16);
  sprintf(s, "?%d", count);
  return s;
}


x86 assembly (clang, -O0):
<random_string_gen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2f06(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2efd(%rip)
mov    $0x10,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ee5(%rip),%edx
lea    0xeaa(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_string_gen>:
push   %rbx
addl   $0x1,0x2f0c(%rip)
mov    $0x10,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    0x2ef9(%rip),%edx
lea    0xebe(%rip),%rsi
mov    %rax,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@random_string_gen.count = internal global i32 0
@.str = [4 x i8] c"?%d\00"
define i8* @random_string_gen() {
%1 = alloca i8*
%2 = load i32, i32* @random_string_gen.count
%3 = add nsw i32 %2, 1
store i32 %3, i32* @random_string_gen.count
%4 = call i64 @malloc(i32 16)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = load i32, i32* @random_string_gen.count
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %1
ret i8* %9
}

LLVM IR (-O2):
@random_string_gen.count = internal unnamed_addr global i32 0
@.str = [4 x i8] c"?%d\00"
define i8* @random_string_gen() {
%1 = load i32, i32* @random_string_gen.count
%2 = add nsw i32 %1, 1
store i32 %2, i32* @random_string_gen.count
%3 = tail call i64 @malloc(i32 16)
%4 = inttoptr i64 %3 to i8*
%5 = load i32, i32* @random_string_gen.count
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ fn();
void heavy_fn() {
  do {
    int i, j, sum = 0;
    for (i = 0; i < (2) * 40000; i++)
      for (j = 1; j < 1000; j++)
        sum += (i * j) | (i / j);
  } while (0);
  fn();
}


x86 assembly (clang, -O0):
<heavy_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x13880,-0x4(%rbp)
jge    1186 <heavy_fn+0x76>
movl   $0x1,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1173 <heavy_fn+0x63>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <heavy_fn+0x2a>
jmp    1178 <heavy_fn+0x68>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <heavy_fn+0x16>
jmp    118b <heavy_fn+0x7b>
mov    $0x0,%al
call   1030 <fn@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @heavy_fn() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
br label %4
4: ; preds = %0
store i32 0, i32* %3
store i32 0, i32* %1
br label %5
5: ; preds = %26, %4
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 80000
br i1 %7, label %8, label %29
8: ; preds = %5
store i32 1, i32* %2
br label %9
9: ; preds = %22, %8
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 1000
br i1 %11, label %12, label %25
12: ; preds = %9
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = mul nsw i32 %13, %14
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = sdiv i32 %16, %17
%19 = or i32 %15, %18
%20 = load i32, i32* %3
%21 = add nsw i32 %20, %19
store i32 %21, i32* %3
br label %22
22: ; preds = %12
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
br label %9
25: ; preds = %9
br label %26
26: ; preds = %25
%27 = load i32, i32* %1
%28 = add nsw i32 %27, 1
store i32 %28, i32* %1
br label %5
29: ; preds = %5
br label %30
30: ; preds = %29
%31 = call i32 (...) @fn()
ret void
}

LLVM IR (-O2):
define void @heavy_fn() {
%1 = tail call i32 (...) @fn()
ret void
}
/* Variables and functions */
float sinf(float);
float libm_sinf(float x) { return sinf(x); }


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

x86 assembly (clang, -O2):
<libm_sinf>:
jmp    1030 <sinf@plt>

LLVM IR (-O0):
define float @libm_sinf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sinf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @libm_sinf(float %0) {
%2 = tail call float @sinf(float %0)
ret float %2
}
/* Variables and functions */
int printf(char *, ...);
int main() {
  printf(" is a word long %d letters.\n", printf("Macedonia"));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c" is a word long %d letters.\0A\00"
@.str.1 = [10 x i8] c"Macedonia\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c" is a word long %d letters.\0A\00"
@.str.1 = [10 x i8] c"Macedonia\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ free(void *);
void list_free_aux(void *x, void *pfreelist) {
  assert(x != NULL);
  assert(pfreelist != NULL);
  ;
  free(x);
  ;
  return;
}


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

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

LLVM IR (-O0):
define void @list_free_aux(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i8*, i8** %3
%14 = call i32 @free(i8* %13)
ret void
}

LLVM IR (-O2):
define void @list_free_aux(i8* %0, i8* readnone %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i8* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @free(i8* %0)
ret void
}
void min_swap(int *a, int *b) {
  int temp;
  temp = *a;
  *a = *b;
  *b = temp;
}


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

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

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

LLVM IR (-O2):
define void @min_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WARN_ON(int);
void radix__tlbiel_all(unsigned int action) { WARN_ON(1); }


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

x86 assembly (clang, -O2):
<radix__tlbiel_all>:
mov    $0x1,%edi
jmp    1030 <WARN_ON@plt>

LLVM IR (-O0):
define void @radix__tlbiel_all(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @WARN_ON(i32 1)
ret void
}

LLVM IR (-O2):
define void @radix__tlbiel_all(i32 %0) {
%2 = tail call i32 @WARN_ON(i32 1)
ret void
}
int hf_close_file_scan(int scandesc) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @hf_close_file_scan(i32 %0) {
ret i32 -1
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, char, size_t);
void *calloc(size_t nmemb, size_t size) {
  size_t tot_mem = nmemb * size;
  void *mem;
  if (tot_mem < 8) {
    tot_mem = 8;
  }
  if ((mem = malloc(tot_mem)) != NULL) {
    memset(mem, '\0', tot_mem);
    return mem;
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x8,-0x20(%rbp)
jae    1150 <calloc+0x30>
movq   $0x8,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     1183 <calloc+0x63>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    118b <calloc+0x6b>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc>:
push   %r14
push   %rbx
push   %rax
imul   %rsi,%rdi
cmp    $0x9,%rdi
mov    $0x8,%ebx
cmovae %rdi,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1152 <calloc+0x32>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = icmp ugt i64 %3, 8
%5 = select i1 %4, i64 %3, i64 8
%6 = tail call i8* @malloc(i64 %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @memset(i8* %6, i8 signext 0, i64 %5)
br label %10
10: ; preds = %2, %8
ret i8* %6
}
unsigned long mul_32_32(const unsigned long arg1, const unsigned long arg2) {
  int retval;
  asm volatile("mull %2; movl %%edx,%%eax; "
               : "=a"(retval)
               : "0"(arg1), "g"(arg2)
               : "dx");
  return retval;
}


x86 assembly (clang, -O0):
<mul_32_32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,-0x20(%rbp)
mull   -0x20(%rbp)
mov    %edx,%eax
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i64 @mul_32_32(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i64 asm sideeffect "mull $2; movl %edx,%eax; ", "={ax},0,imr,~{dx},~{dirflag},~{fpsr},~{flags}"(i64 %6, i64 %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
ret i64 %11
}

LLVM IR (-O2):