xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void help(void) {
  printf("[Usage]:\n"
         "	serialtool [device] -b[bound rate] -d[databits] -s[stopbits] "
         "-p[parity]\n"
         "		[device]:\tSystem Device number.\n"
         "\t\t\tNote:This program will NOT CHECK this information\n"
         "		-b[boundrate]..As you See, choose 1200, 2400, 4800, "
         "9600, 19200, 38400, 57600, 115200\n"
         "		-d[databits] Choose 7 or 8\n"
         "		-s[stopbits] Choose 1 or 2\n"
         "		-p[parity] The Parity, choose N(None), E(Even Parity), "
         "O(Odd Parity)\n");
  printf("\n\nThis is a special Edition ONLY for Send\n");
  exit(0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0x104c(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0x104e(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [387 x i8] c"[Usage]:\0A\09serialtool [device] -b[bound rate] -d[databits] -s[stopbits] -p[parity]\0A\09\09[device]:\09System Device number.\0A\09\09\09Note:This program will NOT CHECK this information\0A\09\09-b[boundrate]..As you See, choose 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200\0A\09\09-d[databits] Choose 7 or 8\0A\09\09-s[stopbits] Choose 1 or 2\0A\09\09-p[parity] The Parity, choose N(None), E(Even Parity), O(Odd Parity)\0A\00"
@.str.1 = [43 x i8] c"\0A\0AThis is a special Edition ONLY for Send\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([387 x i8], [387 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [386 x i8] c"[Usage]:\0A\09serialtool [device] -b[bound rate] -d[databits] -s[stopbits] -p[parity]\0A\09\09[device]:\09System Device number.\0A\09\09\09Note:This program will NOT CHECK this information\0A\09\09-b[boundrate]..As you See, choose 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200\0A\09\09-d[databits] Choose 7 or 8\0A\09\09-s[stopbits] Choose 1 or 2\0A\09\09-p[parity] The Parity, choose N(None), E(Even Parity), O(Odd Parity)\00"
@str.2 = [42 x i8] c"\0A\0AThis is a special Edition ONLY for Send\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([386 x i8], [386 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
int addOK(int x, int y) {
  int sum = x + y;
  int neg_over = (x >> 31 & 0x1) & (y >> 31 & 0x1) & (!(sum >> 31 & 0x1));
  int pos_over = (!(x >> 31 & 0x1)) & (!(y >> 31 & 0x1)) & ((sum >> 31 & 0x1));
  return (!neg_over) & (!pos_over);
}


x86 assembly (clang, -O0):
<addOK>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
mov    -0x8(%rbp),%ecx
sar    $0x1f,%ecx
and    $0x1,%ecx
and    %ecx,%eax
mov    -0xc(%rbp),%ecx
sar    $0x1f,%ecx
and    $0x1,%ecx
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    -0x8(%rbp),%ecx
sar    $0x1f,%ecx
and    $0x1,%ecx
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
mov    -0xc(%rbp),%ecx
sar    $0x1f,%ecx
and    $0x1,%ecx
and    %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x14(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addOK>:
lea    (%rsi,%rdi,1),%eax
mov    %esi,%ecx
and    %edi,%ecx
not    %eax
and    %eax,%ecx
shr    $0x1f,%ecx
or     %edi,%esi
not    %ecx
or     %esi,%eax
shr    $0x1f,%eax
and    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @addOK(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = ashr i32 %11, 31
%13 = and i32 %12, 1
%14 = load i32, i32* %4
%15 = ashr i32 %14, 31
%16 = and i32 %15, 1
%17 = and i32 %13, %16
%18 = load i32, i32* %5
%19 = ashr i32 %18, 31
%20 = and i32 %19, 1
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
%24 = and i32 %17, %23
store i32 %24, i32* %6
%25 = load i32, i32* %3
%26 = ashr i32 %25, 31
%27 = and i32 %26, 1
%28 = icmp ne i32 %27, 0
%29 = xor i1 %28, true
%30 = zext i1 %29 to i32
%31 = load i32, i32* %4
%32 = ashr i32 %31, 31
%33 = and i32 %32, 1
%34 = icmp ne i32 %33, 0
%35 = xor i1 %34, true
%36 = zext i1 %35 to i32
%37 = and i32 %30, %36
%38 = load i32, i32* %5
%39 = ashr i32 %38, 31
%40 = and i32 %39, 1
%41 = and i32 %37, %40
store i32 %41, i32* %7
%42 = load i32, i32* %6
%43 = icmp ne i32 %42, 0
%44 = xor i1 %43, true
%45 = zext i1 %44 to i32
%46 = load i32, i32* %7
%47 = icmp ne i32 %46, 0
%48 = xor i1 %47, true
%49 = zext i1 %48 to i32
%50 = and i32 %45, %49
ret i32 %50
}

LLVM IR (-O2):
define i32 @addOK(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = and i32 %1, %0
%5 = xor i32 %3, -1
%6 = and i32 %4, %5
%7 = lshr i32 %6, 31
%8 = or i32 %1, %0
%9 = xor i32 %7, -1
%10 = or i32 %8, %5
%11 = lshr i32 %10, 31
%12 = and i32 %11, %9
ret i32 %12
}
/* Variables and functions */
double exp(double);
double log(double);
double pow(double x, double y) { return exp(log(x) * y); }


x86 assembly (clang, -O0):
<pow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <log@plt>
mulsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow>:
push   %rax
movsd  %xmm1,(%rsp)
call   1040 <log@plt>
mulsd  (%rsp),%xmm0
pop    %rax
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @pow(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 = call double @log(double %5)
%7 = load double, double* %4
%8 = fmul double %6, %7
%9 = call double @exp(double %8)
ret double %9
}

LLVM IR (-O2):
define double @pow(double %0, double %1) {
%3 = tail call double @log(double %0)
%4 = fmul double %3, %1
%5 = tail call double @exp(double %4)
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int /*<<< orphan*/ logprintf(int /*<<< orphan*/, char *);
int sqlite_update_popd(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
int mode_unlock(sqlite3 *db, int argc, char *argv[]) {
  if (argc < 2) {
    logprintf(0, "Missing user\n\n");
    return -1;
  }
  return sqlite_update_popd(db, argv[1], 0);
}


x86 assembly (clang, -O0):
<mode_unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    1157 <mode_unlock+0x37>
xor    %edi,%edi
lea    0xeba(%rip),%rsi
call   1040 <logprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <mode_unlock+0x4d>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rsi
xor    %edx,%edx
call   1030 <sqlite_update_popd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mode_unlock>:
push   %rax
cmp    $0x1,%esi
jg     113b <mode_unlock+0x1b>
lea    0xed3(%rip),%rsi
xor    %edi,%edi
call   1040 <logprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
mov    0x8(%rdx),%rsi
xor    %edx,%edx
pop    %rax
jmp    1030 <sqlite_update_popd@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Missing user\0A\0A\00"
define i32 @mode_unlock(i32* %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8**
store i32* %0, i32** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = call i32 @logprintf(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %4
br label %18
12: ; preds = %3
%13 = load i32*, i32** %5
%14 = load i8**, i8*** %7
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @sqlite_update_popd(i32* %13, i8* %16, i32 0)
store i32 %17, i32* %4
br label %18
18: ; preds = %12, %10
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
@.str = [15 x i8] c"Missing user\0A\0A\00"
define i32 @mode_unlock(i32* %0, i32 %1, i8** nocapture %2) {
%4 = icmp slt i32 %1, 2
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @logprintf(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %11
7: ; preds = %3
%8 = getelementptr inbounds i8*, i8** %2, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @sqlite_update_popd(i32* %0, i8* %9, i32 0)
br label %11
11: ; preds = %7, %5
%12 = phi i32 [ -1, %5 ], [ %10, %7 ]
ret i32 %12
}
unsigned char Avi_StartRecorder(void) {
  unsigned char result = 0;
  return result;
}


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

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

LLVM IR (-O0):
define zeroext i8 @Avi_StartRecorder() {
%1 = alloca i8
store i8 0, i8* %1
%2 = load i8, i8* %1
ret i8 %2
}

LLVM IR (-O2):
define zeroext i8 @Avi_StartRecorder() {
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ box_boolean(int);
int /*<<< orphan*/ dpop();
double untag_float_fast(int /*<<< orphan*/);
void primitive_float_eq_impl(void) {
  double y = untag_float_fast(dpop());
  double x = untag_float_fast(dpop());
  ;
  box_boolean(x == y);
}


x86 assembly (clang, -O0):
<primitive_float_eq_impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <box_boolean@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_float_eq_impl>:
push   %rax
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
cmpeqsd (%rsp),%xmm0
movq   %xmm0,%rdi
and    $0x1,%edi
pop    %rax
jmp    1040 <box_boolean@plt>

LLVM IR (-O0):
define void @primitive_float_eq_impl() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (...) @dpop()
%4 = call double @untag_float_fast(i32 %3)
store double %4, double* %1
%5 = call i32 (...) @dpop()
%6 = call double @untag_float_fast(i32 %5)
store double %6, double* %2
%7 = load double, double* %2
%8 = load double, double* %1
%9 = fcmp oeq double %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @box_boolean(i32 %10)
ret void
}

LLVM IR (-O2):
define void @primitive_float_eq_impl() {
%1 = tail call i32 (...) @dpop()
%2 = tail call double @untag_float_fast(i32 %1)
%3 = tail call i32 (...) @dpop()
%4 = tail call double @untag_float_fast(i32 %3)
%5 = fcmp oeq double %4, %2
%6 = zext i1 %5 to i32
%7 = tail call i32 @box_boolean(i32 %6)
ret void
}
int tgetnum(id)
char *id;
{
  id = find(id, '#');
  if (id) {
    return atoi(id);
  }
  return -1;
}


x86 assembly (clang, -O0):
<tgetnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x23,%esi
mov    $0x0,%al
call   1030 <find@plt>
cltq
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1160 <tgetnum+0x40>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <atoi@plt>
mov    %eax,-0x4(%rbp)
jmp    1167 <tgetnum+0x47>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tgetnum>:
push   %rax
mov    $0x23,%esi
xor    %eax,%eax
call   1030 <find@plt>
test   %eax,%eax
je     113c <tgetnum+0x1c>
movslq %eax,%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <atoi@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tgetnum(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @find to i32 (i8*, i32, ...)*)(i8* %4, i32 35)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %11)
store i32 %12, 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):
define i32 @tgetnum(i8* %0) {
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @find to i32 (i8*, i32, ...)*)(i8* %0, i32 35)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %6)
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
scalar_t__ calloc(scalar_t__, int);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *String_clone(const char *src) {
  char *string = (char *)calloc((strlen(src) + 1), sizeof(char));
  assert(string);
  strcpy(string, src);
  return string;
}


x86 assembly (clang, -O0):
<String_clone>:
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    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <assert@plt>
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):
<String_clone>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @String_clone(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 nsw i64 %5, 1
%7 = call i64 @calloc(i64 %6, i32 1)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @assert(i8* %9)
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = call i32 @strcpy(i8* %11, i8* %12)
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @String_clone(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @calloc(i64 %3, i32 1)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @assert(i8* %5)
%7 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  int i = 3;
  switch (i) {
  case 0:
    puts("Nol");
    break;
  case 1:
    puts("Odin");
    break;
  case 77:
  case 777:
  case 7777:
    puts("Bingo!");
    break;
  default:
    puts("Error");
    break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     1181 <main+0x71>
jmp    1139 <main+0x29>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1192 <main+0x82>
jmp    114a <main+0x3a>
mov    -0xc(%rbp),%eax
sub    $0x4d,%eax
je     11a3 <main+0x93>
jmp    115b <main+0x4b>
mov    -0xc(%rbp),%eax
sub    $0x309,%eax
je     11a3 <main+0x93>
jmp    116e <main+0x5e>
mov    -0xc(%rbp),%eax
sub    $0x1e61,%eax
je     11a3 <main+0x93>
jmp    11b4 <main+0xa4>
lea    0xe78(%rip),%rdi
call   1030 <puts@plt>
jmp    11c0 <main+0xb0>
lea    0xe6b(%rip),%rdi
call   1030 <puts@plt>
jmp    11c0 <main+0xb0>
lea    0xe5f(%rip),%rdi
call   1030 <puts@plt>
jmp    11c0 <main+0xb0>
lea    0xe55(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"Nol\00"
@.str.1 = [5 x i8] c"Odin\00"
@.str.2 = [7 x i8] c"Bingo!\00"
@.str.3 = [6 x i8] c"Error\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %10 [
i32 0, label %4
i32 1, label %6
i32 77, label %8
i32 777, label %8
i32 7777, label %8
]
4: ; preds = %0
%5 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %12
6: ; preds = %0
%7 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %12
8: ; preds = %0, %0, %0
%9 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %12
12: ; preds = %10, %8, %6, %4
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str.3 = [6 x i8] c"Error\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
double pwr2(double a) { return a * a; }


x86 assembly (clang, -O0):
<pwr2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwr2>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @pwr2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @pwr2(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int *, int);
void attach_inspection_result(uint8_t *destBuffer, uint8_t actionCode,
                              uint8_t metadataNum, uint8_t *metadataCodes) {
  memcpy(destBuffer, &actionCode, sizeof(uint8_t));
  memcpy((destBuffer + sizeof(uint8_t)), &metadataNum, sizeof(uint8_t));
  memcpy((destBuffer + sizeof(uint8_t) * 2), metadataCodes,
         sizeof(uint8_t) * metadataNum);
}


x86 assembly (clang, -O0):
<attach_inspection_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
mov    -0x18(%rbp),%rsi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<attach_inspection_result>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdi,%rbx
mov    %esi,0x4(%rsp)
mov    %edx,(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
lea    0x10(%rbx),%rdi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x20,%rbx
mov    (%rsp),%edx
shl    $0x2,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <memcpy@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @attach_inspection_result(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 = call i32 @memcpy(i32* %9, i32* %6, i32 4)
%11 = load i32*, i32** %5
%12 = getelementptr inbounds i32, i32* %11, i64 4
%13 = call i32 @memcpy(i32* %12, i32* %7, i32 4)
%14 = load i32*, i32** %5
%15 = getelementptr inbounds i32, i32* %14, i64 8
%16 = load i32*, i32** %8
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = mul i64 4, %18
%20 = trunc i64 %19 to i32
%21 = call i32 @memcpy(i32* %15, i32* %16, i32 %20)
ret void
}

LLVM IR (-O2):
define void @attach_inspection_result(i32* %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @memcpy(i32* %0, i32* %5, i32 4)
%8 = getelementptr inbounds i32, i32* %0, i64 4
%9 = call i32 @memcpy(i32* %8, i32* %6, i32 4)
%10 = getelementptr inbounds i32, i32* %0, i64 8
%11 = load i32, i32* %6
%12 = shl i32 %11, 2
%13 = call i32 @memcpy(i32* %10, i32* %3, i32 %12)
ret void
}
int c047(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c047() {
ret i32 0
}
void an_interrupt_handler(void) {}


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

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

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

LLVM IR (-O2):
define void @an_interrupt_handler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Init_NextYear(unsigned char *);
void Init_NextMonth(unsigned char *pds) {
  if (pds[13]++ == 12) {
    pds[13] = 1;
    Init_NextYear(pds);
  }
}


x86 assembly (clang, -O0):
<Init_NextMonth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    0xd(%rcx),%al
mov    %al,%dl
add    $0x1,%dl
mov    %dl,0xd(%rcx)
movzbl %al,%eax
cmp    $0xc,%eax
jne    1148 <Init_NextMonth+0x38>
mov    -0x8(%rbp),%rax
movb   $0x1,0xd(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <Init_NextYear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init_NextMonth>:
mov    0xd(%rdi),%al
lea    0x1(%rax),%ecx
mov    %cl,0xd(%rdi)
cmp    $0xc,%al
jne    1126 <Init_NextMonth+0x16>
movb   $0x1,0xd(%rdi)
jmp    1030 <Init_NextYear@plt>
ret

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

LLVM IR (-O2):
define void @Init_NextMonth(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 13
%3 = load i8, i8* %2
%4 = add i8 %3, 1
store i8 %4, i8* %2
%5 = icmp eq i8 %3, 12
br i1 %5, label %6, label %8
6: ; preds = %1
store i8 1, i8* %2
%7 = tail call i32 @Init_NextYear(i8* %0)
br label %8
8: ; preds = %6, %1
ret void
}
/* Variables and functions */
char *path_basename(char const *);
char *strrchr(char const *, char);
const char *path_extension(const char *path) {
  const char *base = path_basename(path);
  const char *dot = strrchr(base, '.');
  if (!dot || dot == base)
    return NULL;
  return dot + 1;
}


x86 assembly (clang, -O0):
<path_extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <path_basename@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x2e,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1164 <path_extension+0x44>
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1171 <path_extension+0x51>
movq   $0x0,-0x8(%rbp)
jmp    117d <path_extension+0x5d>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_extension>:
push   %rbx
call   1030 <path_basename@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x2e,%esi
call   1040 <strrchr@plt>
lea    0x1(%rax),%rcx
xor    %edx,%edx
cmp    %rbx,%rax
cmovne %rcx,%rdx
test   %rax,%rax
cmovne %rdx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @path_extension(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @path_basename(i8* %6)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = call i8* @strrchr(i8* %8, i8 signext 46)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %16
12: ; preds = %1
%13 = load i8*, i8** %5
%14 = load i8*, i8** %4
%15 = icmp eq i8* %13, %14
br i1 %15, label %16, label %17
16: ; preds = %12, %1
store i8* null, i8** %2
br label %20
17: ; preds = %12
%18 = load i8*, i8** %5
%19 = getelementptr inbounds i8, i8* %18, i64 1
store i8* %19, i8** %2
br label %20
20: ; preds = %17, %16
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @path_extension(i8* %0) {
%2 = tail call i8* @path_basename(i8* %0)
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %2, i8 signext 46)
%4 = icmp eq i8* %3, null
%5 = icmp eq i8* %3, %2
%6 = or i1 %4, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = select i1 %6, i8* null, i8* %7
ret i8* %8
}
void tl880_deinit_myhd(struct tl880_dev *tl880dev) {}


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

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

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

LLVM IR (-O2):
%struct.tl880_dev = type opaque
define void @tl880_deinit_myhd(%struct.tl880_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __sched_get_priority_min(int algorithm) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__sched_get_priority_min>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sched_get_priority_min>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__sched_get_priority_min(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__sched_get_priority_min(i32 %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
int __attribute__((no, noclone)) f(int *pi, long *pl) {
  *pi = 1;
  *pl = 0;
  return *(char *)pi;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movl   $0x1,(%rdi)
movq   $0x0,(%rsi)
movsbl (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32* nocapture %0, i64* nocapture writeonly %1) {
store i32 1, i32* %0
store i64 0, i64* %1
%3 = bitcast i32* %0 to i8*
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
ret i32 %5
}
int SortClients(const void *a, const void *b) { return *(int *)a - *(int *)b; }


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

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

LLVM IR (-O0):
define i32 @SortClients(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @SortClients(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int haslength(int marker) {
  switch (marker) {
  case 0xd8:
    return 0;
  case 0xe0:
    return 1;
  case 0xe1:
    return 1;
  case 0xe2:
    return 1;
  case 0xc4:
    return 1;
  case 0xda:
    return 1;
  case 0xdb:
    return 1;
  case 0xfe:
    return 1;
  default:
    return 1;
  }
}


x86 assembly (clang, -O0):
<haslength>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffff3c,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3a,%eax
ja     1192 <haslength+0x92>
mov    -0x10(%rbp),%rax
lea    0xed7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    1199 <haslength+0x99>
movl   $0x1,-0x4(%rbp)
jmp    1199 <haslength+0x99>
movl   $0x1,-0x4(%rbp)
jmp    1199 <haslength+0x99>
movl   $0x1,-0x4(%rbp)
jmp    1199 <haslength+0x99>
movl   $0x1,-0x4(%rbp)
jmp    1199 <haslength+0x99>
movl   $0x1,-0x4(%rbp)
jmp    1199 <haslength+0x99>
movl   $0x1,-0x4(%rbp)
jmp    1199 <haslength+0x99>
movl   $0x1,-0x4(%rbp)
jmp    1199 <haslength+0x99>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<haslength>:
add    $0xffffff3c,%edi
cmp    $0x3a,%edi
ja     111d <haslength+0x1d>
xor    %eax,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @haslength(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 216, label %5
i32 224, label %6
i32 225, label %7
i32 226, label %8
i32 196, label %9
i32 218, label %10
i32 219, label %11
i32 254, label %12
]
5: ; preds = %1
store i32 0, i32* %2
br label %14
6: ; preds = %1
store i32 1, i32* %2
br label %14
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
store i32 1, i32* %2
br label %14
9: ; preds = %1
store i32 1, i32* %2
br label %14
10: ; preds = %1
store i32 1, i32* %2
br label %14
11: ; preds = %1
store i32 1, i32* %2
br label %14
12: ; preds = %1
store i32 1, i32* %2
br label %14
13: ; preds = %1
store i32 1, i32* %2
br label %14
14: ; preds = %13, %12, %11, %10, %9, %8, %7, %6, %5
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @haslength(i32 %0) {
switch i32 %0, label %9 [
i32 216, label %10
i32 224, label %2
i32 225, label %3
i32 226, label %4
i32 196, label %5
i32 218, label %6
i32 219, label %7
i32 254, label %8
]
2: ; preds = %1
br label %10
3: ; preds = %1
br label %10
4: ; preds = %1
br label %10
5: ; preds = %1
br label %10
6: ; preds = %1
br label %10
7: ; preds = %1
br label %10
8: ; preds = %1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %1, %9, %8, %7, %6, %5, %4, %3, %2
%11 = phi i32 [ 1, %9 ], [ 1, %8 ], [ 1, %7 ], [ 1, %6 ], [ 1, %5 ], [ 1, %4 ], [ 1, %3 ], [ 1, %2 ], [ 0, %1 ]
ret i32 %11
}
int add_deserialization_func(void *ctxt, int type,
                             void (*dfunc)(struct encode_context *,
                                           struct decode_context *)) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.encode_context = type opaque
%struct.decode_context = type opaque
define i32 @add_deserialization_func(i8* %0, i32 %1, void (%struct.encode_context*, %struct.decode_context*)* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca void (%struct.encode_context*, %struct.decode_context*)*
store i8* %0, i8** %4
store i32 %1, i32* %5
store void (%struct.encode_context*, %struct.decode_context*)* %2, void (%struct.encode_context*, %struct.decode_context*)** %6
ret i32 0
}

LLVM IR (-O2):
%struct.encode_context = type opaque
%struct.decode_context = type opaque
define i32 @add_deserialization_func(i8* nocapture readnone %0, i32 %1, void (%struct.encode_context*, %struct.decode_context*)* nocapture readnone %2) {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
scalar_t__ pow(int, double);
uint8_t actual_size(uint16_t num) {
  uint8_t size = 0;
  if (num < pow(2, 8.0)) {
    size = 1;
  } else {
    size = 2;
  }
  return size;
}


x86 assembly (clang, -O0):
<actual_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x2,%edi
movsd  0xec8(%rip),%xmm0
call   1030 <pow@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1159 <actual_size+0x49>
movl   $0x1,-0xc(%rbp)
jmp    1160 <actual_size+0x50>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<actual_size>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x2,%ebp
movsd  0xedd(%rip),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
setg   %cl
sub    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @actual_size(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
%4 = load i64, i64* %2
%5 = call i64 @pow(i32 2, double 8.000000e+00)
%6 = icmp slt i64 %4, %5
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %3
br label %9
8: ; preds = %1
store i32 2, i32* %3
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @actual_size(i64 %0) {
%2 = tail call i64 @pow(i32 2, double 8.000000e+00)
%3 = icmp sgt i64 %2, %0
%4 = select i1 %3, i32 1, i32 2
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void writenu32(uint8_t *p, uint32_t n) {
  p[0] = (n & 0xff000000) >> 24;
  p[1] = (n & 0xff0000) >> 16;
  p[2] = (n & 0xff00) >> 8;
  p[3] = n & 0xff;
}


x86 assembly (clang, -O0):
<writenu32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x10,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @writenu32(i32* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
store i32 %3, i32* %0
%4 = lshr i32 %1, 16
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %1, 8
%8 = and i32 %7, 255
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
%10 = and i32 %1, 255
%11 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %10, i32* %11
ret void
}
int used_number(int s, int *array) {
  int i;
  for (i = 0; i < 53; i++)
    if (s == array[i])
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<used_number>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x35,-0x14(%rbp)
jge    114f <used_number+0x4f>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    113c <used_number+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1156 <used_number+0x56>
jmp    1141 <used_number+0x41>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <used_number+0x12>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<used_number>:
mov    $0x3,%ecx
mov    $0x1,%eax
cmp    %edi,-0xc(%rsi,%rcx,4)
je     1131 <used_number+0x31>
cmp    $0x37,%rcx
je     1132 <used_number+0x32>
cmp    %edi,-0x8(%rsi,%rcx,4)
je     1131 <used_number+0x31>
cmp    %edi,-0x4(%rsi,%rcx,4)
je     1131 <used_number+0x31>
cmp    %edi,(%rsi,%rcx,4)
je     1131 <used_number+0x31>
add    $0x4,%rcx
cmp    %edi,-0xc(%rsi,%rcx,4)
jne    1110 <used_number+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @used_number(i32 %0, i32* nocapture %1) {
br label %22
3: ; preds = %22
%4 = or i64 %23, 1
%5 = icmp eq i64 %4, 53
br i1 %5, label %27, label %6
6: ; preds = %3
%7 = getelementptr inbounds i32, i32* %1, i64 %4
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, %0
br i1 %9, label %27, label %10
10: ; preds = %6
%11 = or i64 %23, 2
%12 = getelementptr inbounds i32, i32* %1, i64 %11
%13 = load i32, i32* %12
%14 = icmp eq i32 %13, %0
br i1 %14, label %27, label %15
15: ; preds = %10
%16 = or i64 %23, 3
%17 = getelementptr inbounds i32, i32* %1, i64 %16
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, %0
br i1 %19, label %27, label %20
20: ; preds = %15
%21 = add nuw nsw i64 %23, 4
br label %22
22: ; preds = %20, %2
%23 = phi i64 [ 0, %2 ], [ %21, %20 ]
%24 = getelementptr inbounds i32, i32* %1, i64 %23
%25 = load i32, i32* %24
%26 = icmp eq i32 %25, %0
br i1 %26, label %27, label %3
27: ; preds = %15, %10, %6, %3, %22
%28 = phi i32 [ 1, %22 ], [ 0, %3 ], [ 1, %6 ], [ 1, %10 ], [ 1, %15 ]
ret i32 %28
}
int _pipe(f)
int f[2];
{
  long x;
  x = _Xpipe();
  if (x == -1)
    return -1;
  f[0] = x;
  f[1] = x >> 16;
  return 0;
}


x86 assembly (clang, -O0):
<_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <_Xpipe@plt>
cltq
mov    %rax,-0x18(%rbp)
cmpq   $0xffffffffffffffff,-0x18(%rbp)
jne    1140 <_pipe+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1164 <_pipe+0x54>
mov    -0x18(%rbp),%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
sar    $0x10,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_pipe>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <_Xpipe@plt>
cmp    $0xffffffff,%eax
je     112e <_pipe+0x1e>
mov    %eax,(%rbx)
sar    $0x10,%eax
mov    %eax,0x4(%rbx)
jmp    1133 <_pipe+0x23>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @_pipe(i32* nocapture writeonly %0) {
%2 = tail call i32 (...) @_Xpipe()
%3 = icmp eq i32 %2, -1
br i1 %3, label %7, label %4
4: ; preds = %1
store i32 %2, i32* %0
%5 = ashr i32 %2, 16
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
scalar_t__ getpwuid(int);
int check_uid_available(int u) {
  if (getpwuid(u))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<check_uid_available>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <getpwuid@plt>
cmp    $0x0,%rax
je     1139 <check_uid_available+0x29>
movl   $0x0,-0x4(%rbp)
jmp    1140 <check_uid_available+0x30>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @check_uid_available(i32 %0) {
%2 = tail call i64 @getpwuid(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ SHA256_CTX;

/* Variables and functions */
int /*<<< orphan*/ sha256_block_data_order(int /*<<< orphan*/ *,
                                           unsigned char const *, int);
void SHA256_Transform(SHA256_CTX *c, const unsigned char *data) {
  sha256_block_data_order(c, data, 1);
}


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

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

LLVM IR (-O0):
define void @SHA256_Transform(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 = load i8*, i8** %4
%7 = call i32 @sha256_block_data_order(i32* %5, i8* %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @SHA256_Transform(i32* %0, i8* %1) {
%3 = tail call i32 @sha256_block_data_order(i32* %0, i8* %1, i32 1)
ret void
}
/* Type definitions */
typedef unsigned int uint64_t;

/* Variables and functions */
uint64_t _wyrotr(uint64_t v, unsigned k) { return (v >> k) | (v << (64 - k)); }


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

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

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

LLVM IR (-O2):
define i32 @_wyrotr(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = sub i32 64, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
void gtk_container_class_list_child_properties() {}


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

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

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

LLVM IR (-O2):
define void @gtk_container_class_list_child_properties() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("小甲鱼说：好好学习才能天天向上");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"\E5\B0\8F\E7\94\B2\E9\B1\BC\E8\AF\B4\EF\BC\9A\E5\A5\BD\E5\A5\BD\E5\AD\A6\E4\B9\A0\E6\89\8D\E8\83\BD\E5\A4\A9\E5\A4\A9\E5\90\91\E4\B8\8A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [46 x i8] c"\E5\B0\8F\E7\94\B2\E9\B1\BC\E8\AF\B4\EF\BC\9A\E5\A5\BD\E5\A5\BD\E5\AD\A6\E4\B9\A0\E6\89\8D\E8\83\BD\E5\A4\A9\E5\A4\A9\E5\90\91\E4\B8\8A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int run_prg_rc(char *const *, int /*<<< orphan*/, int /*<<< orphan*/ *);
int run_prg(char *const argv[]) { return run_prg_rc(argv, 0, NULL); }


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

x86 assembly (clang, -O2):
<run_prg>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <run_prg_rc@plt>

LLVM IR (-O0):
define i32 @run_prg(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i32 @run_prg_rc(i8** %3, i32 0, i32* null)
ret i32 %4
}

LLVM IR (-O2):
define i32 @run_prg(i8** %0) {
%2 = tail call i32 @run_prg_rc(i8** %0, i32 0, i32* null)
ret i32 %2
}
int compat_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @compat_init() {
ret i32 0
}