xunge/DecIR huggingface dataset:
int main(argc, argv)
int argc;
char *argv[];
{
  int r;
  globalsCtor();
  r = unzip(argc, argv);

  return (r);
}


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)
mov    $0x0,%al
call   1040 <globalsCtor@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <unzip@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <globalsCtor@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <unzip@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @globalsCtor()
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @unzip to i32 (i32, i8**, ...)*)(i32 %8, i8** %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
ret i32 %11
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @globalsCtor()
%4 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @unzip to i32 (i32, i8**, ...)*)(i32 %0, i8** %1)
ret i32 %4
}
/* Type definitions */
struct shell_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ shellGetc(struct shell_data *);
unsigned char shellPeekc(struct shell_data *);
int shellGetEol(struct shell_data *sd) {
  unsigned char c = shellPeekc(sd);
  if (c == '\n') {
    shellGetc(sd);
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<shellGetEol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <shellPeekc@plt>
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
cmp    $0xa,%eax
jne    115a <shellGetEol+0x3a>
mov    -0x10(%rbp),%rdi
call   1030 <shellGetc@plt>
movl   $0x0,-0x4(%rbp)
jmp    1161 <shellGetEol+0x41>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shellGetEol>:
push   %rbx
mov    %rdi,%rbx
call   1040 <shellPeekc@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0xa,%cl
jne    113f <shellGetEol+0x1f>
mov    %rbx,%rdi
call   1030 <shellGetc@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.shell_data = type { i32 }
define i32 @shellGetEol(%struct.shell_data* %0) {
%2 = alloca i32
%3 = alloca %struct.shell_data*
%4 = alloca i8
store %struct.shell_data* %0, %struct.shell_data** %3
%5 = load %struct.shell_data*, %struct.shell_data** %3
%6 = call zeroext i8 @shellPeekc(%struct.shell_data* %5)
store i8 %6, i8* %4
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 10
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load %struct.shell_data*, %struct.shell_data** %3
%12 = call i32 @shellGetc(%struct.shell_data* %11)
store i32 0, i32* %2
br label %14
13: ; preds = %1
store i32 -1, i32* %2
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.shell_data = type { i32 }
define i32 @shellGetEol(%struct.shell_data* %0) {
%2 = tail call zeroext i8 @shellPeekc(%struct.shell_data* %0)
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @shellGetc(%struct.shell_data* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %7
}
void pdc_setbit(char *bitarr, int bit) {
  bitarr[bit / 8] |= (char)(1 << (bit % 8));
}


x86 assembly (clang, -O0):
<pdc_setbit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movsbl %al,%esi
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdc_setbit>:
mov    %esi,%ecx
and    $0x7,%cl
mov    $0x1000000,%eax
shl    %cl,%eax
shr    $0x18,%eax
lea    0x7(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
or     %al,(%rdi,%rcx,1)
ret

LLVM IR (-O0):
define void @pdc_setbit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = srem i32 %5, 8
%7 = shl i32 1, %6
%8 = trunc i32 %7 to i8
%9 = sext i8 %8 to i32
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = sdiv i32 %11, 8
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %10, i64 %13
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = or i32 %16, %9
%18 = trunc i32 %17 to i8
store i8 %18, i8* %14
ret void
}

LLVM IR (-O2):
define void @pdc_setbit(i8* nocapture %0, i32 %1) {
%3 = and i32 %1, 7
%4 = shl nuw i32 16777216, %3
%5 = lshr exact i32 %4, 24
%6 = sdiv i32 %1, 8
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = trunc i32 %5 to i8
%11 = or i8 %9, %10
store i8 %11, i8* %8
ret void
}
/* Variables and functions */
int O_RDONLY;
int open(char const *, int);
int open_read(const char *filename) { return open(filename, O_RDONLY | 0); }


x86 assembly (clang, -O0):
<open_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
or     $0x0,%esi
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_read>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @open_read(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_RDONLY
%5 = or i32 %4, 0
%6 = call i32 @open(i8* %3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @open_read(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void *myprint(void *elem) { printf("<%s>\n", (char *)elem); }


x86 assembly (clang, -O0):
<myprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myprint>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"<%s>\0A\00"
define i8* @myprint(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
ret i8* %6
}

LLVM IR (-O2):
@.str = [6 x i8] c"<%s>\0A\00"
define noalias i8* @myprint(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* undef
}
void gtk_widget_set_size_request() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_set_size_request() {
ret void
}
/* Variables and functions */
double fabs(double);
double error(double actual, double anterior) {
  return fabs((actual - anterior) / actual);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
movaps 0xedc(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm0,%xmm2
andpd  0xeec(%rip),%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @error(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = load double, double* %3
%9 = fdiv double %7, %8
%10 = call double @llvm.fabs.f64(double %9)
ret double %10
}

LLVM IR (-O2):
define double @error(double %0, double %1) {
%3 = fsub double %0, %1
%4 = fdiv double %3, %0
%5 = tail call double @llvm.fabs.f64(double %4)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_inc_d(void) { op_write1(0x14); }


x86 assembly (clang, -O0):
<op_enc_inc_d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
call   1030 <op_write1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_enc_inc_d>:
mov    $0x14,%edi
jmp    1030 <op_write1@plt>

LLVM IR (-O0):
define void @op_enc_inc_d() {
%1 = call i32 @op_write1(i32 20)
ret void
}

LLVM IR (-O2):
define void @op_enc_inc_d() {
%1 = tail call i32 @op_write1(i32 20)
ret void
}
/* Variables and functions */
int FNM_PERIOD;
int internal_fnmatch(char const *, char const *, char const *, int, int);
int strlen(char const *);
int fnmatch(const char *pattern, const char *string, int flags) {
  return internal_fnmatch(pattern, string, string + strlen(string),
                          flags & FNM_PERIOD, flags);
}


x86 assembly (clang, -O0):
<fnmatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
cltq
add    %rax,%rdx
mov    -0x14(%rbp),%ecx
mov    0x2e71(%rip),%rax
and    (%rax),%ecx
mov    -0x14(%rbp),%r8d
call   1040 <internal_fnmatch@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnmatch>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdx
add    %rbx,%rdx
mov    0x2e9f(%rip),%rax
mov    (%rax),%ecx
and    %ebp,%ecx
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <internal_fnmatch@plt>

LLVM IR (-O0):
@FNM_PERIOD = global i32 0
define i32 @fnmatch(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %5
%11 = call i32 @strlen(i8* %10)
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
%14 = load i32, i32* %6
%15 = load i32, i32* @FNM_PERIOD
%16 = and i32 %14, %15
%17 = load i32, i32* %6
%18 = call i32 @internal_fnmatch(i8* %7, i8* %8, i8* %13, i32 %16, i32 %17)
ret i32 %18
}

LLVM IR (-O2):
@FNM_PERIOD = global i32 0
define i32 @fnmatch(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strlen(i8* %1)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %1, i64 %5
%7 = load i32, i32* @FNM_PERIOD
%8 = and i32 %7, %2
%9 = tail call i32 @internal_fnmatch(i8* %0, i8* %1, i8* %6, i32 %8, i32 %2)
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ z_stream;
typedef int /*<<< orphan*/ Bytef;

/* Variables and functions */
int inflateSetDictionary(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                         unsigned int);
int streaming_commons_inflate_set_dictionary(z_stream *stream,
                                             const char *dictionary,
                                             unsigned int dictLength) {
  return inflateSetDictionary(stream, (const Bytef *)dictionary, dictLength);
}


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

x86 assembly (clang, -O2):
<streaming_commons_inflate_set_dictionary>:
jmp    1030 <inflateSetDictionary@plt>

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

LLVM IR (-O2):
define i32 @streaming_commons_inflate_set_dictionary(i32* %0, i8* %1, i32 %2) {
%4 = bitcast i8* %1 to i32*
%5 = tail call i32 @inflateSetDictionary(i32* %0, i32* %4, i32 %2)
ret i32 %5
}
extern void dump_profile(const char *file) {}


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

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

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

LLVM IR (-O2):
define void @dump_profile(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *const);
void bfdebug(char const *const str) { printf("[BAREFLANK DEBUG] %s\n", str); }


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

x86 assembly (clang, -O2):
<bfdebug>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [22 x i8] c"[BAREFLANK DEBUG] %s\0A\00"
define void @bfdebug(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int bar(int x) { return x * 2; }


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

x86 assembly (clang, -O2):
<bar>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ mkdir(char *, int);
int main(int argc, char **argv) {
  mkdir("/tmp/moo", 0777);
  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)
lea    0xed3(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"/tmp/moo\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @mkdir(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 511)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"/tmp/moo\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @mkdir(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 511)
ret i32 0
}
/* Type definitions */
struct hashids_t {
  int dummy;
};

/* Variables and functions */
struct hashids_t *hashids_init2(char const *, unsigned int);
struct hashids_t *hashids_init(const char *salt) {
  return hashids_init2(salt, 0u);
}


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

x86 assembly (clang, -O2):
<hashids_init>:
xor    %esi,%esi
jmp    1030 <hashids_init2@plt>

LLVM IR (-O0):
%struct.hashids_t = type { i32 }
define %struct.hashids_t* @hashids_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call %struct.hashids_t* @hashids_init2(i8* %3, i32 0)
ret %struct.hashids_t* %4
}

LLVM IR (-O2):
%struct.hashids_t = type { i32 }
define %struct.hashids_t* @hashids_init(i8* %0) {
%2 = tail call %struct.hashids_t* @hashids_init2(i8* %0, i32 0)
ret %struct.hashids_t* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d %d\n", &a, &b);
  printf("%d\n", a + b);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d %d\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = add nsw i32 %4, %5
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, %6
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
char xtob(register int c) {
  return (char)(c - (((c >= '0') && (c <= '9')) ? '0' : '7'));
}


x86 assembly (clang, -O0):
<xtob>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xtob+0x26>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x5(%rbp),%sil
mov    $0x37,%ecx
mov    $0x30,%edx
test   $0x1,%sil
cmovne %edx,%ecx
sub    %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xtob>:
lea    -0x30(%rdi),%ecx
lea    0xc9(%rdi),%edx
lea    0xd0(%rdi),%eax
cmp    $0xa,%ecx
cmovae %edx,%eax
ret

LLVM IR (-O0):
define signext i8 @xtob(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 57
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ false, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 48, i32 55
%13 = sub nsw i32 %3, %12
%14 = trunc i32 %13 to i8
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @xtob(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = select i1 %3, i32 208, i32 201
%5 = add i32 %4, %0
%6 = trunc i32 %5 to i8
ret i8 %6
}
/* Variables and functions */
int f(float);
int f2l(float);
float valorInicial(float x0, float x1) {
  if (f(x0) * f2l(x0) > 0) {
    return x0;
  } else {
    return x1;
  }
}


x86 assembly (clang, -O0):
<valorInicial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <f@plt>
mov    %eax,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <f2l@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
cmp    $0x0,%eax
jle    1169 <valorInicial+0x49>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1173 <valorInicial+0x53>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valorInicial>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x8(%rsp)
call   1030 <f@plt>
mov    %eax,%ebx
movss  0x8(%rsp),%xmm0
call   1040 <f2l@plt>
movss  0x8(%rsp),%xmm0
imul   %ebx,%eax
test   %eax,%eax
jg     1156 <valorInicial+0x36>
movss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define float @valorInicial(float %0, float %1) {
%3 = tail call i32 @f(float %0)
%4 = tail call i32 @f2l(float %0)
%5 = mul nsw i32 %4, %3
%6 = icmp sgt i32 %5, 0
%7 = select i1 %6, float %0, float %1
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void handle_fatal_error_and_exit(char *msg) {
  perror(msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<handle_fatal_error_and_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handle_fatal_error_and_exit>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @handle_fatal_error_and_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @handle_fatal_error_and_exit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void funlockfile(FILE *file) { (void)file; }


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

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

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

LLVM IR (-O2):
define void @funlockfile(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rx_rdy();
int rx_uchar();
int getDebugChar() {
  while (!rx_rdy())
    ;
  return rx_uchar();
}


x86 assembly (clang, -O0):
<getDebugChar>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <getDebugChar+0x9>
mov    $0x0,%al
call   1030 <rx_rdy@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1145 <getDebugChar+0x25>
jmp    114a <getDebugChar+0x2a>
jmp    1129 <getDebugChar+0x9>
mov    $0x0,%al
call   1040 <rx_uchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDebugChar>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rx_rdy@plt>
test   %eax,%eax
je     1130 <getDebugChar+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1040 <rx_uchar@plt>

LLVM IR (-O0):
define i32 @getDebugChar() {
br label %1
1: ; preds = %5, %0
%2 = call i32 (...) @rx_rdy()
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
%7 = call i32 (...) @rx_uchar()
ret i32 %7
}

LLVM IR (-O2):
define i32 @getDebugChar() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @rx_rdy()
%3 = icmp eq i32 %2, 0
br i1 %3, label %1, label %4
4: ; preds = %1
%5 = tail call i32 (...) @rx_uchar()
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void f_output(int argc, char **argv) {
  if (argc >= 2)
    fputs(argv[1], stdout);
}


x86 assembly (clang, -O0):
<f_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
jl     113f <f_output+0x2f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_output>:
cmp    $0x2,%edi
jl     1127 <f_output+0x17>
mov    0x8(%rsi),%rdi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @f_output(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 = icmp sge i32 %5, 2
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = load i32, i32* @stdout
%12 = call i32 @fputs(i8* %10, i32 %11)
br label %13
13: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @f_output(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = load i32, i32* @stdout
%8 = tail call i32 @fputs(i8* %6, i32 %7)
br label %9
9: ; preds = %4, %2
ret void
}
void inclass_element2RESET() {}


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

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

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

LLVM IR (-O2):
define void @inclass_element2RESET() {
ret void
}
int indexOf(char *str, char c) {
  int i = 0;
  while (*str) {
    if (*str == c) {
      return i;
    }
    i++;
    str++;
  }
  return -1;
}


x86 assembly (clang, -O0):
<indexOf>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <indexOf+0x5a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    1140 <indexOf+0x40>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <indexOf+0x61>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1115 <indexOf+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indexOf>:
mov    (%rdi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1122 <indexOf+0x22>
xor    %ecx,%ecx
nopl   (%rax)
cmp    %sil,%dl
je     1123 <indexOf+0x23>
movzbl 0x1(%rdi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <indexOf+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @indexOf(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %10
%6 = phi i8 [ %13, %10 ], [ %3, %2 ]
%7 = phi i32 [ %11, %10 ], [ 0, %2 ]
%8 = phi i8* [ %12, %10 ], [ %0, %2 ]
%9 = icmp eq i8 %6, %1
br i1 %9, label %15, label %10
10: ; preds = %5
%11 = add nuw nsw i32 %7, 1
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %10, %2
%16 = phi i32 [ -1, %2 ], [ -1, %10 ], [ %7, %5 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ strerror_r(int, char *, size_t);
char *h2o_strerror_r(int err, char *buf, size_t len) {
  strerror_r(err, buf, len);
  return buf;
}


x86 assembly (clang, -O0):
<h2o_strerror_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strerror_r@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_strerror_r>:
push   %rbx
mov    %rsi,%rbx
call   1030 <strerror_r@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @h2o_strerror_r(i32 %0, i8* returned %1, i64 %2) {
%4 = tail call i32 @strerror_r(i32 %0, i8* %1, i64 %2)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void printVersionInfo(void) {
  printf("\nThis is %s version %s released by Alexandros Stamatakis in %s\n\n",
         "RAxML", "7.0.4", "April 2008");
}


x86 assembly (clang, -O0):
<printVersionInfo>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xf1f(%rip),%rsi
lea    0xf1e(%rip),%rdx
lea    0xf1d(%rip),%rcx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printVersionInfo>:
lea    0xee9(%rip),%rdi
lea    0xf23(%rip),%rsi
lea    0xf22(%rip),%rdx
lea    0xf21(%rip),%rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"\0AThis is %s version %s released by Alexandros Stamatakis in %s\0A\0A\00"
@.str.1 = [6 x i8] c"RAxML\00"
@.str.2 = [6 x i8] c"7.0.4\00"
@.str.3 = [11 x i8] c"April 2008\00"
define void @printVersionInfo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [65 x i8] c"\0AThis is %s version %s released by Alexandros Stamatakis in %s\0A\0A\00"
@.str.1 = [6 x i8] c"RAxML\00"
@.str.2 = [6 x i8] c"7.0.4\00"
@.str.3 = [11 x i8] c"April 2008\00"
define void @printVersionInfo() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
void int2be(uint8_t *be, unsigned int value) {
  be[0] = (uint8_t)((value >> 24) & 0xff);
  be[1] = (uint8_t)((value >> 16) & 0xff);
  be[2] = (uint8_t)((value >> 8) & 0xff);
  be[3] = (uint8_t)((value >> 0) & 0xff);
}


x86 assembly (clang, -O0):
<int2be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0xc(%rbp),%eax
shr    $0x0,%eax
and    $0xff,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<int2be>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
shr    $0x18,%eax
mov    %rax,(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %rax,0x8(%rdi)
mov    %rdx,0x10(%rdi)
mov    %rsi,0x18(%rdi)
ret

LLVM IR (-O0):
define void @int2be(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = lshr i32 %5, 24
%7 = and i32 %6, 255
%8 = zext i32 %7 to i64
%9 = load i64*, i64** %3
%10 = getelementptr inbounds i64, i64* %9, i64 0
store i64 %8, i64* %10
%11 = load i32, i32* %4
%12 = lshr i32 %11, 16
%13 = and i32 %12, 255
%14 = zext i32 %13 to i64
%15 = load i64*, i64** %3
%16 = getelementptr inbounds i64, i64* %15, i64 1
store i64 %14, i64* %16
%17 = load i32, i32* %4
%18 = lshr i32 %17, 8
%19 = and i32 %18, 255
%20 = zext i32 %19 to i64
%21 = load i64*, i64** %3
%22 = getelementptr inbounds i64, i64* %21, i64 2
store i64 %20, i64* %22
%23 = load i32, i32* %4
%24 = lshr i32 %23, 0
%25 = and i32 %24, 255
%26 = zext i32 %25 to i64
%27 = load i64*, i64** %3
%28 = getelementptr inbounds i64, i64* %27, i64 3
store i64 %26, i64* %28
ret void
}

LLVM IR (-O2):
define void @int2be(i64* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = zext i32 %3 to i64
store i64 %4, i64* %0
%5 = lshr i32 %1, 16
%6 = and i32 %5, 255
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %7, i64* %8
%9 = lshr i32 %1, 8
%10 = and i32 %9, 255
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %11, i64* %12
%13 = and i32 %1, 255
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %14, i64* %15
ret void
}
/* Variables and functions */
int frexp(int /*<<< orphan*/, int *);
int /*<<< orphan*/ luaL_check_number(int);
int /*<<< orphan*/ lua_pushnumber(int);
void math_frexp(void) {
  int e;
  lua_pushnumber(frexp(luaL_check_number(1), &e));
  lua_pushnumber(e);
}


x86 assembly (clang, -O0):
<math_frexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
mov    %eax,%edi
lea    -0x4(%rbp),%rsi
call   1040 <frexp@plt>
mov    %eax,%edi
call   1050 <lua_pushnumber@plt>
mov    -0x4(%rbp),%edi
call   1050 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_frexp>:
push   %rax
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
lea    0x4(%rsp),%rsi
mov    %eax,%edi
call   1040 <frexp@plt>
mov    %eax,%edi
call   1050 <lua_pushnumber@plt>
mov    0x4(%rsp),%edi
pop    %rax
jmp    1050 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_frexp() {
%1 = alloca i32
%2 = call i32 @luaL_check_number(i32 1)
%3 = call i32 @frexp(i32 %2, i32* %1)
%4 = call i32 @lua_pushnumber(i32 %3)
%5 = load i32, i32* %1
%6 = call i32 @lua_pushnumber(i32 %5)
ret void
}

LLVM IR (-O2):
define void @math_frexp() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @luaL_check_number(i32 1)
%4 = call i32 @frexp(i32 %3, i32* %1)
%5 = tail call i32 @lua_pushnumber(i32 %4)
%6 = load i32, i32* %1
%7 = tail call i32 @lua_pushnumber(i32 %6)
ret void
}
int main(int x, char **y) {}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%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 i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
ret i32 0
}

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


x86 assembly (clang, -O0):
<necH2state>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <necHstate@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @necH2state() {
%1 = call i32 @necHstate(i32 1)
ret void
}

LLVM IR (-O2):
define void @necH2state() {
%1 = tail call i32 @necHstate(i32 1)
ret void
}
void func_e() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char *);
char prox_elem(FILE *arq) {
  char c;
  do
    fscanf(arq, "%c", &c);
  while (c == ' ' || c == '\t');
  return c;
}


x86 assembly (clang, -O0):
<prox_elem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    -0x9(%rbp),%rdx
call   1030 <fscanf@plt>
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0xa(%rbp)
je     114f <prox_elem+0x3f>
movsbl -0x9(%rbp),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    111c <prox_elem+0xc>
movsbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prox_elem>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xedd(%rip),%r14
lea    0xf(%rsp),%r15
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <fscanf@plt>
movzbl 0xf(%rsp),%eax
cmp    $0x9,%al
je     1130 <prox_elem+0x20>
cmp    $0x20,%al
je     1130 <prox_elem+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define signext i8 @prox_elem(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
store i32* %0, i32** %2
br label %4
4: ; preds = %15, %1
%5 = load i32*, i32** %2
%6 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
br label %7
7: ; preds = %4
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 32
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 9
br label %15
15: ; preds = %11, %7
%16 = phi i1 [ true, %7 ], [ %14, %11 ]
br i1 %16, label %4, label %17
17: ; preds = %15
%18 = load i8, i8* %3
ret i8 %18
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define signext i8 @prox_elem(i32* nocapture %0) {
%2 = alloca i8
br label %3
3: ; preds = %6, %1
%4 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
switch i8 %5, label %7 [
i8 32, label %6
i8 9, label %6
]
6: ; preds = %3, %3
br label %3
7: ; preds = %3
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ AllocCStars();
int /*<<< orphan*/ AllocCracks();
int /*<<< orphan*/ AllocFlippers();
int /*<<< orphan*/ AllocFloatingScores();
int /*<<< orphan*/ AllocFuseBalls();
int /*<<< orphan*/ AllocGrids();
int /*<<< orphan*/ AllocParser();
int /*<<< orphan*/ AllocPulsars();
int /*<<< orphan*/ AllocSpikers();
int /*<<< orphan*/ AllocTankers();
void STAllocate() {
  AllocParser();
  AllocCracks();
  AllocGrids();
  AllocCStars();
  AllocFlippers();
  AllocPulsars();
  AllocSpikers();
  AllocFuseBalls();
  AllocTankers();
  AllocFloatingScores();
}


x86 assembly (clang, -O0):
<STAllocate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <AllocParser@plt>
mov    $0x0,%al
call   1080 <AllocCracks@plt>
mov    $0x0,%al
call   1090 <AllocGrids@plt>
mov    $0x0,%al
call   10a0 <AllocCStars@plt>
mov    $0x0,%al
call   1050 <AllocFlippers@plt>
mov    $0x0,%al
call   10b0 <AllocPulsars@plt>
mov    $0x0,%al
call   1040 <AllocSpikers@plt>
mov    $0x0,%al
call   1030 <AllocFuseBalls@plt>
mov    $0x0,%al
call   10c0 <AllocTankers@plt>
mov    $0x0,%al
call   1060 <AllocFloatingScores@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<STAllocate>:
push   %rax
xor    %eax,%eax
call   1070 <AllocParser@plt>
xor    %eax,%eax
call   1080 <AllocCracks@plt>
xor    %eax,%eax
call   1090 <AllocGrids@plt>
xor    %eax,%eax
call   10a0 <AllocCStars@plt>
xor    %eax,%eax
call   1050 <AllocFlippers@plt>
xor    %eax,%eax
call   10b0 <AllocPulsars@plt>
xor    %eax,%eax
call   1040 <AllocSpikers@plt>
xor    %eax,%eax
call   1030 <AllocFuseBalls@plt>
xor    %eax,%eax
call   10c0 <AllocTankers@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <AllocFloatingScores@plt>

LLVM IR (-O0):
define void @STAllocate() {
%1 = call i32 (...) @AllocParser()
%2 = call i32 (...) @AllocCracks()
%3 = call i32 (...) @AllocGrids()
%4 = call i32 (...) @AllocCStars()
%5 = call i32 (...) @AllocFlippers()
%6 = call i32 (...) @AllocPulsars()
%7 = call i32 (...) @AllocSpikers()
%8 = call i32 (...) @AllocFuseBalls()
%9 = call i32 (...) @AllocTankers()
%10 = call i32 (...) @AllocFloatingScores()
ret void
}

LLVM IR (-O2):
define void @STAllocate() {
%1 = tail call i32 (...) @AllocParser()
%2 = tail call i32 (...) @AllocCracks()
%3 = tail call i32 (...) @AllocGrids()
%4 = tail call i32 (...) @AllocCStars()
%5 = tail call i32 (...) @AllocFlippers()
%6 = tail call i32 (...) @AllocPulsars()
%7 = tail call i32 (...) @AllocSpikers()
%8 = tail call i32 (...) @AllocFuseBalls()
%9 = tail call i32 (...) @AllocTankers()
%10 = tail call i32 (...) @AllocFloatingScores()
ret void
}
int int_abs(int x) {
  if (x < 0) {
    return 0 - x;
  }
  return x;
}


x86 assembly (clang, -O0):
<int_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111e <int_abs+0x1e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <int_abs+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @int_abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ SLsmg_write_nchars(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void SLsmg_write_string(char *str) { SLsmg_write_nchars(str, strlen(str)); }


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

x86 assembly (clang, -O2):
<SLsmg_write_string>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <SLsmg_write_nchars@plt>

LLVM IR (-O0):
define void @SLsmg_write_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @SLsmg_write_nchars(i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @SLsmg_write_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @SLsmg_write_nchars(i8* %0, i32 %2)
ret void
}
int sys_sleep(void) {
  unsigned int time;
  __asm__("mov %0, r0\n" : "=r"(time) :);
}


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

LLVM IR (-O0):
LLVM IR (-O2):
define i32 @sys_sleep() {
%1 = tail call i32 asm "mov $0, r0\0A", "=r,~{dirflag},~{fpsr},~{flags}"()
ret i32 undef
}
/* Variables and functions */
char *GetEnvVar(char const *);
int atoi(char const *);
int GetEnvVarInt(const char *name, int *i, int def) {
  const char *s = GetEnvVar(name);
  *i = s ? atoi(s) : def;
  return s != NULL;
}


x86 assembly (clang, -O0):
<GetEnvVarInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <GetEnvVar@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115c <GetEnvVarInt+0x3c>
mov    -0x20(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x24(%rbp)
jmp    1162 <GetEnvVarInt+0x42>
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,-0x20(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetEnvVarInt>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
call   1030 <GetEnvVar@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1140 <GetEnvVarInt+0x20>
mov    %rbx,%rdi
call   1040 <atoi@plt>
mov    %eax,%ebp
xor    %eax,%eax
test   %rbx,%rbx
setne  %al
mov    %ebp,(%r14)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @GetEnvVarInt(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = call i8* @GetEnvVar(i8* %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = load i8*, i8** %7
%14 = call i32 @atoi(i8* %13)
br label %17
15: ; preds = %3
%16 = load i32, i32* %6
br label %17
17: ; preds = %15, %12
%18 = phi i32 [ %14, %12 ], [ %16, %15 ]
%19 = load i32*, i32** %5
store i32 %18, i32* %19
%20 = load i8*, i8** %7
%21 = icmp ne i8* %20, null
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @GetEnvVarInt(i8* %0, i32* nocapture writeonly %1, i32 %2) {
%4 = tail call i8* @GetEnvVar(i8* %0)
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @atoi(i8* %4)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ %2, %3 ]
store i32 %9, i32* %1
%10 = zext i1 %5 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, int *);
int main(int argc, char *argv[]) {
  int ret = 0;
  if (argc > 1)
    sscanf(argv[1], "%d", &ret);
  return ret;
}


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)
movl   $0x0,-0x14(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    114f <main+0x3f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeba(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <sscanf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
xor    %eax,%eax
cmp    $0x2,%edi
jl     1139 <main+0x29>
mov    0x8(%rsi),%rdi
lea    0xed5(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <sscanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @sscanf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %3
br label %11
11: ; preds = %6, %2
%12 = phi i32 [ %10, %6 ], [ 0, %2 ]
ret i32 %12
}
int fun619() { return 619; }


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

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

LLVM IR (-O0):
define i32 @fun619() {
ret i32 619
}

LLVM IR (-O2):
define i32 @fun619() {
ret i32 619
}