xunge/DecIR huggingface dataset:
unsigned xrop3_36_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk1 = S ^ T;
  stk2 = D ^ S;
  stk1 = stk1 & stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_36_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_36_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
xor    %eax,%ecx
not    %eax
and    %ecx,%eax
movzbl %al,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_36_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = xor i32 %22, %23
store i32 %24, i32* %8
%25 = load i32, i32* %5
%26 = load i32, i32* %6
%27 = xor i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %8
%29 = load i32, i32* %9
%30 = and i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = and i32 %35, %36
%38 = or i32 %34, %37
ret i32 %38
}

LLVM IR (-O2):
define i32 @xrop3_36_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, %4
%8 = and i32 %4, 255
%9 = xor i32 %8, 255
%10 = and i32 %9, %7
%11 = or i32 %10, %3
ret i32 %11
}
void release_debug_settings() {}


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

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

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

LLVM IR (-O2):
define void @release_debug_settings() {
ret void
}
void RAND_SSLeay(void) {}


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

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

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

LLVM IR (-O2):
define void @RAND_SSLeay() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wFileWriteByte(int, char);
scalar_t__ wStackPopNumber();
int /*<<< orphan*/ wStackPushNumber(int /*<<< orphan*/);
void wBuiltinWriteByte() {
  char c;
  int fileNum;
  c = (char)wStackPopNumber();
  fileNum = (int)wStackPopNumber();
  wFileWriteByte(fileNum, c);
  wStackPushNumber(0);
}


x86 assembly (clang, -O0):
<wBuiltinWriteByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <wStackPopNumber@plt>
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <wStackPopNumber@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
movsbl -0x1(%rbp),%esi
call   1040 <wFileWriteByte@plt>
xor    %edi,%edi
call   1050 <wStackPushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBuiltinWriteByte>:
push   %rbx
xor    %eax,%eax
call   1030 <wStackPopNumber@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <wStackPopNumber@plt>
movsbl %bl,%esi
mov    %eax,%edi
call   1040 <wFileWriteByte@plt>
xor    %edi,%edi
pop    %rbx
jmp    1050 <wStackPushNumber@plt>

LLVM IR (-O0):
define void @wBuiltinWriteByte() {
%1 = alloca i8
%2 = alloca i32
%3 = call i64 (...) @wStackPopNumber()
%4 = trunc i64 %3 to i8
store i8 %4, i8* %1
%5 = call i64 (...) @wStackPopNumber()
%6 = trunc i64 %5 to i32
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = load i8, i8* %1
%9 = call i32 @wFileWriteByte(i32 %7, i8 signext %8)
%10 = call i32 @wStackPushNumber(i32 0)
ret void
}

LLVM IR (-O2):
define void @wBuiltinWriteByte() {
%1 = tail call i64 (...) @wStackPopNumber()
%2 = trunc i64 %1 to i8
%3 = tail call i64 (...) @wStackPopNumber()
%4 = trunc i64 %3 to i32
%5 = tail call i32 @wFileWriteByte(i32 %4, i8 signext %2)
%6 = tail call i32 @wStackPushNumber(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ find_symbols(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) { find_symbols(stdin); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <find_symbols@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <find_symbols@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @stdin
%6 = call i32 @find_symbols(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @find_symbols(i32 %3)
ret i32 0
}
/* Type definitions */
struct mntent {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
struct mntent *getmntent_r(int /*<<< orphan*/ *, struct mntent *, char *, int);
struct mntent *getmntent(FILE *f) {
  static char linebuf[256];
  static struct mntent mnt;
  return getmntent_r(f, &mnt, linebuf, sizeof linebuf);
}


x86 assembly (clang, -O0):
<getmntent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x3019(%rip),%rsi
lea    0x2f12(%rip),%rdx
mov    $0x100,%ecx
call   1030 <getmntent_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getmntent>:
lea    0x3029(%rip),%rsi
lea    0x2f22(%rip),%rdx
mov    $0x100,%ecx
jmp    1030 <getmntent_r@plt>

LLVM IR (-O0):
%struct.mntent = type { i32 }
@getmntent.linebuf = internal global [256 x i8] zeroinitializer
@getmntent.mnt = internal global %struct.mntent zeroinitializer
define %struct.mntent* @getmntent(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call %struct.mntent* @getmntent_r(i32* %3, %struct.mntent* @getmntent.mnt, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @getmntent.linebuf, i64 0, i64 0), i32 256)
ret %struct.mntent* %4
}

LLVM IR (-O2):
%struct.mntent = type { i32 }
@getmntent.linebuf = internal global [256 x i8] zeroinitializer
@getmntent.mnt = internal global %struct.mntent zeroinitializer
define %struct.mntent* @getmntent(i32* %0) {
%2 = tail call %struct.mntent* @getmntent_r(i32* %0, %struct.mntent* @getmntent.mnt, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @getmntent.linebuf, i64 0, i64 0), i32 256)
ret %struct.mntent* %2
}
/* Variables and functions */
int /*<<< orphan*/ f();
int main(void) {
  volatile int cond;
  while (cond) {
    f();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x0,%eax
je     1137 <main+0x27>
mov    $0x0,%al
call   1030 <f@plt>
jmp    111f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmpl   $0x0,0x4(%rsp)
je     112e <main+0x1e>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <f@plt>
cmpl   $0x0,0x4(%rsp)
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load volatile i32, i32* %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %0, %5
%6 = tail call i32 (...) @f()
%7 = load volatile i32, i32* %1
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %5
9: ; preds = %5, %0
ret i32 0
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
scalar_t__ clock();
int /*<<< orphan*/ lprintf(int, char *, scalar_t__);
void stopit(void) {
  static clock_t T = 0, t;
  if (!T)
    T = clock();
  else {
    t = clock();
    lprintf(2, "STOP: %d\n", t - T);
    T = t;
  }
}


x86 assembly (clang, -O0):
<stopit>:
push   %rbp
mov    %rsp,%rbp
cmpq   $0x0,0x2f0c(%rip)
jne    1145 <stopit+0x25>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,0x2ef8(%rip)
jmp    1180 <stopit+0x60>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,0x2eed(%rip)
mov    0x2ee6(%rip),%rdx
sub    0x2ed7(%rip),%rdx
mov    $0x2,%edi
lea    0xe93(%rip),%rsi
call   1040 <lprintf@plt>
mov    0x2ec7(%rip),%rax
mov    %rax,0x2eb8(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<stopit>:
push   %rbx
mov    0x2f10(%rip),%rbx
xor    %eax,%eax
call   1030 <clock@plt>
test   %rbx,%rbx
je     115d <stopit+0x3d>
mov    %rax,0x2f05(%rip)
sub    0x2ef6(%rip),%rax
lea    0xeb7(%rip),%rsi
mov    $0x2,%edi
mov    %rax,%rdx
call   1040 <lprintf@plt>
mov    0x2ee3(%rip),%rax
mov    %rax,0x2ed4(%rip)
pop    %rbx
ret

LLVM IR (-O0):
@stopit.T = internal global i64 0
@stopit.t = internal global i64 0
@.str = [10 x i8] c"STOP: %d\0A\00"
define void @stopit() {
%1 = load i64, i64* @stopit.T
%2 = icmp ne i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call i64 (...) @clock()
store i64 %4, i64* @stopit.T
br label %12
5: ; preds = %0
%6 = call i64 (...) @clock()
store i64 %6, i64* @stopit.t
%7 = load i64, i64* @stopit.t
%8 = load i64, i64* @stopit.T
%9 = sub nsw i64 %7, %8
%10 = call i32 @lprintf(i32 2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = load i64, i64* @stopit.t
store i64 %11, i64* @stopit.T
br label %12
12: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
@stopit.T = internal unnamed_addr global i64 0
@stopit.t = internal unnamed_addr global i64 0
@.str = [10 x i8] c"STOP: %d\0A\00"
define void @stopit() {
%1 = load i64, i64* @stopit.T
%2 = icmp eq i64 %1, 0
%3 = tail call i64 (...) @clock()
br i1 %2, label %9, label %4
4: ; preds = %0
store i64 %3, i64* @stopit.t
%5 = load i64, i64* @stopit.T
%6 = sub nsw i64 %3, %5
%7 = tail call i32 @lprintf(i32 2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 %6)
%8 = load i64, i64* @stopit.t
br label %9
9: ; preds = %0, %4
%10 = phi i64 [ %8, %4 ], [ %3, %0 ]
store i64 %10, i64* @stopit.T
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
long timediff(struct timeval t1, struct timeval t2) {
  long micros = 1000000 * (t1.tv_sec - t2.tv_sec);
  micros += t1.tv_usec - t2.tv_usec;
  return micros / 1000;
}


x86 assembly (clang, -O0):
<timediff>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
mov    %edx,-0x20(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x10(%rbp),%eax
sub    -0x20(%rbp),%eax
imul   $0xf4240,%eax,%eax
cltq
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x18(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<timediff>:
sub    %edx,%edi
imul   $0xf4240,%edi,%eax
cltq
sub    %rcx,%rsi
add    %rsi,%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x7,%rdx
add    %rdx,%rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @timediff(i32 %0, i64 %1, i32 %2, i64 %3) {
%5 = alloca %struct.timeval
%6 = alloca %struct.timeval
%7 = alloca i64
%8 = bitcast %struct.timeval* %5 to { i32, i64 }*
%9 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %8, i32 0, i32 0
store i32 %0, i32* %9
%10 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = bitcast %struct.timeval* %6 to { i32, i64 }*
%12 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %11, i32 0, i32 0
store i32 %2, i32* %12
%13 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %11, i32 0, i32 1
store i64 %3, i64* %13
%14 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%15 = load i32, i32* %14
%16 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%17 = load i32, i32* %16
%18 = sub nsw i32 %15, %17
%19 = mul nsw i32 1000000, %18
%20 = sext i32 %19 to i64
store i64 %20, i64* %7
%21 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%22 = load i64, i64* %21
%23 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 1
%24 = load i64, i64* %23
%25 = sub nsw i64 %22, %24
%26 = load i64, i64* %7
%27 = add nsw i64 %26, %25
store i64 %27, i64* %7
%28 = load i64, i64* %7
%29 = sdiv i64 %28, 1000
ret i64 %29
}

LLVM IR (-O2):
define i64 @timediff(i32 %0, i64 %1, i32 %2, i64 %3) {
%5 = sub nsw i32 %0, %2
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = sub i64 %1, %3
%9 = add nsw i64 %8, %7
%10 = sdiv i64 %9, 1000
ret i64 %10
}
unsigned xrop3_72_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D ^ T;
  stk1 = S & stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_72_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_72_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    $0xff,%eax
and    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_72_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, 255
%8 = and i32 %7, %4
ret i32 %8
}
unsigned int my_mod(unsigned int a, unsigned int b) { return a % (1 << b); }


x86 assembly (clang, -O0):
<my_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_mod>:
mov    %esi,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @my_mod(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = urem i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @my_mod(i32 %0, i32 %1) {
%3 = shl nsw i32 -1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ raw_local_irq_enable();
void raw_local_irq_restore(unsigned long flags) {
  if ((flags & 0xf0) != 0xf0)
    raw_local_irq_enable();
}


x86 assembly (clang, -O0):
<raw_local_irq_restore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xf0,%rax
cmp    $0xf0,%rax
je     1139 <raw_local_irq_restore+0x29>
mov    $0x0,%al
call   1030 <raw_local_irq_enable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raw_local_irq_restore>:
not    %edi
test   $0xf0,%dil
jne    1119 <raw_local_irq_restore+0x9>
ret
xor    %eax,%eax
jmp    1030 <raw_local_irq_enable@plt>

LLVM IR (-O0):
define void @raw_local_irq_restore(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 240
%5 = icmp ne i64 %4, 240
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @raw_local_irq_enable()
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @raw_local_irq_restore(i64 %0) {
%2 = and i64 %0, 240
%3 = icmp eq i64 %2, 240
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @raw_local_irq_enable()
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
unsigned char *load_from_file(char const *, int /*<<< orphan*/ *, int *);
unsigned char *download_from_file(const char *filename, int *size) {
  *size = 0;
  return load_from_file(filename, NULL, size);
}


x86 assembly (clang, -O0):
<download_from_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <load_from_file@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<download_from_file>:
mov    %rsi,%rdx
movl   $0x0,(%rsi)
xor    %esi,%esi
jmp    1030 <load_from_file@plt>

LLVM IR (-O0):
define i8* @download_from_file(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
store i32 0, i32* %5
%6 = load i8*, i8** %3
%7 = load i32*, i32** %4
%8 = call i8* @load_from_file(i8* %6, i32* null, i32* %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @download_from_file(i8* %0, i32* %1) {
store i32 0, i32* %1
%3 = tail call i8* @load_from_file(i8* %0, i32* null, i32* %1)
ret i8* %3
}
void GC_add_leaked(void) {}


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

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

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

LLVM IR (-O2):
define void @GC_add_leaked() {
ret void
}
void cam_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @cam_exit() {
ret void
}
long int x_to_the_n(int x, int n) {
  long int result;
  for (result = 1; n > 0; --n) {
    result *= x;
  }
  return result;
}


x86 assembly (clang, -O0):
<x_to_the_n>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1137 <x_to_the_n+0x37>
movslq -0x4(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <x_to_the_n+0x12>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_to_the_n>:
test   %esi,%esi
jle    111b <x_to_the_n+0x1b>
movslq %edi,%rcx
lea    -0x1(%rsi),%eax
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x7,%eax
jae    1121 <x_to_the_n+0x21>
mov    $0x1,%eax
jmp    1155 <x_to_the_n+0x55>
mov    $0x1,%eax
ret
and    $0xfffffff8,%esi
mov    $0x1,%eax
nopl   0x0(%rax)
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
add    $0xfffffff8,%esi
jne    1130 <x_to_the_n+0x30>
test   %edx,%edx
je     1169 <x_to_the_n+0x69>
nopl   0x0(%rax)
imul   %rcx,%rax
add    $0xffffffff,%edx
jne    1160 <x_to_the_n+0x60>
ret

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

LLVM IR (-O2):
define i64 @x_to_the_n(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %34
4: ; preds = %2
%5 = sext i32 %0 to i64
%6 = add i32 %1, -1
%7 = and i32 %1, 7
%8 = icmp ult i32 %6, 7
br i1 %8, label %24, label %9
9: ; preds = %4
%10 = and i32 %1, -8
br label %11
11: ; preds = %11, %9
%12 = phi i64 [ 1, %9 ], [ %21, %11 ]
%13 = phi i32 [ 0, %9 ], [ %22, %11 ]
%14 = mul nsw i64 %12, %5
%15 = mul nsw i64 %14, %5
%16 = mul nsw i64 %15, %5
%17 = mul nsw i64 %16, %5
%18 = mul nsw i64 %17, %5
%19 = mul nsw i64 %18, %5
%20 = mul nsw i64 %19, %5
%21 = mul nsw i64 %20, %5
%22 = add i32 %13, 8
%23 = icmp eq i32 %22, %10
br i1 %23, label %24, label %11
24: ; preds = %11, %4
%25 = phi i64 [ undef, %4 ], [ %21, %11 ]
%26 = phi i64 [ 1, %4 ], [ %21, %11 ]
%27 = icmp eq i32 %7, 0
br i1 %27, label %34, label %28
28: ; preds = %24, %28
%29 = phi i64 [ %31, %28 ], [ %26, %24 ]
%30 = phi i32 [ %32, %28 ], [ 0, %24 ]
%31 = mul nsw i64 %29, %5
%32 = add i32 %30, 1
%33 = icmp eq i32 %32, %7
br i1 %33, label %34, label %28
34: ; preds = %24, %28, %2
%35 = phi i64 [ 1, %2 ], [ %25, %24 ], [ %31, %28 ]
ret i64 %35
}
void main() {
  int x;
  x = 0;
  while (x < 100) {
    x = x + 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1123 <main+0x23>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <main+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %5, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 100
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
br label %2
8: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned char const *);
int /*<<< orphan*/ stderr;
void Error(const unsigned char *pError) {
  fprintf(stderr, "Fatal Error: %s\n", pError);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"Fatal Error: %s\0A\00"
define void @Error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"Fatal Error: %s\0A\00"
define void @Error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ _log(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *_get_param(int argc, char *argv[], int a, char *option) {
  if (a < argc)
    return argv[a];
  _log(LOG_ERR, "Missing parameter for option: %s; exiting", option);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<_get_param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1154 <_get_param+0x34>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
add    $0x20,%rsp
pop    %rbp
ret
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
lea    0xe98(%rip),%rsi
call   1030 <_log@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_get_param>:
push   %rax
cmp    %edi,%edx
jge    112e <_get_param+0xe>
movslq %edx,%rax
mov    (%rsi,%rax,8),%rax
pop    %rcx
ret
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
mov    %rcx,%rdx
call   1030 <_log@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [42 x i8] c"Missing parameter for option: %s; exiting\00"
@EXIT_FAILURE = global i32 0
define i8* @_get_param(i32 %0, i8** %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %4
%13 = load i8**, i8*** %6
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
ret i8* %17
18: ; preds = %4
%19 = load i32, i32* @LOG_ERR
%20 = load i8*, i8** %8
%21 = call i32 @_log(i32 %19, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = load i32, i32* @EXIT_FAILURE
%23 = call i32 @exit(i32 %22)
unreachable
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [42 x i8] c"Missing parameter for option: %s; exiting\00"
@EXIT_FAILURE = global i32 0
define i8* @_get_param(i32 %0, i8** nocapture %1, i32 %2, i8* %3) {
%5 = icmp slt i32 %2, %0
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
ret i8* %9
10: ; preds = %4
%11 = load i32, i32* @LOG_ERR
%12 = tail call i32 @_log(i32 %11, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %3)
%13 = load i32, i32* @EXIT_FAILURE
%14 = tail call i32 @exit(i32 %13)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int print_usage() {
  printf(" Usage: is_data [options]\n");
  printf(" Option:\n");
  printf(" \t[ -s <number size> ] (default: %d)\n", 1024);
  return 1;
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x400,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x400,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c" Usage: is_data [options]\0A\00"
@.str.1 = [10 x i8] c" Option:\0A\00"
@.str.2 = [38 x i8] c" \09[ -s <number size> ] (default: %d)\0A\00"
define i32 @print_usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 1024)
ret i32 1
}

LLVM IR (-O2):
@.str.2 = [38 x i8] c" \09[ -s <number size> ] (default: %d)\0A\00"
@str = [26 x i8] c" Usage: is_data [options]\00"
@str.3 = [9 x i8] c" Option:\00"
define i32 @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 1024)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ kare_al(int, int *);
void soru_2(int a) {
  int sonuc;
  kare_al(a, &sonuc);
}


x86 assembly (clang, -O0):
<soru_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1030 <kare_al@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soru_2>:
push   %rax
lea    0x4(%rsp),%rsi
call   1030 <kare_al@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @soru_2(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @kare_al(i32 %0, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strlen(char *);
int main() {
  char x[1] = "x";
  int a = strlen(x);
  printf("%d\n", a);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x78,0x7(%rsp)
lea    0x7(%rsp),%rdi
call   1030 <strlen@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
store i8 120, i8* %2
%3 = call i32 @strlen(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
OP(ed, fc) { illegal_2(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
int usage(char *opt, char *optarg, void *arg) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @usage(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 1
}
void OPENSSL_init(void) {
  static int done = 0;
  if (done)
    return;
  done = 1;
}


x86 assembly (clang, -O0):
<OPENSSL_init>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f19(%rip)
je     1116 <OPENSSL_init+0x16>
jmp    1120 <OPENSSL_init+0x20>
movl   $0x1,0x2f04(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<OPENSSL_init>:
cmpb   $0x0,0x2f1d(%rip)
jne    1110 <OPENSSL_init+0x10>
movb   $0x1,0x2f14(%rip)
ret

LLVM IR (-O0):
@OPENSSL_init.done = internal global i32 0
define void @OPENSSL_init() {
%1 = load i32, i32* @OPENSSL_init.done
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
br label %5
4: ; preds = %0
store i32 1, i32* @OPENSSL_init.done
br label %5
5: ; preds = %4, %3
ret void
}

LLVM IR (-O2):
@OPENSSL_init.done = internal unnamed_addr global i1 false
define void @OPENSSL_init() {
%1 = load i1, i1* @OPENSSL_init.done
br i1 %1, label %3, label %2
2: ; preds = %0
store i1 true, i1* @OPENSSL_init.done
br label %3
3: ; preds = %0, %2
ret void
}
void longestPalindrome(char *str, char *palindrome) {}


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

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

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

LLVM IR (-O2):
define void @longestPalindrome(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
float _d2f(int /*<<< orphan*/);
int /*<<< orphan*/ _dfltu(unsigned int);
float _ffltu(unsigned int a) { return _d2f(_dfltu(a)); }


x86 assembly (clang, -O0):
<_ffltu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <_dfltu@plt>
mov    %eax,%edi
call   1030 <_d2f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ffltu>:
push   %rax
call   1040 <_dfltu@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <_d2f@plt>

LLVM IR (-O0):
define float @_ffltu(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_dfltu(i32 %3)
%5 = call float @_d2f(i32 %4)
ret float %5
}

LLVM IR (-O2):
define float @_ffltu(i32 %0) {
%2 = tail call i32 @_dfltu(i32 %0)
%3 = tail call float @_d2f(i32 %2)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void integer_print(int *n) { printf("%d", *n); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @integer_print(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ strlen(char const *);
char *util_ncopy(char const *, scalar_t__);
char *util_copy(const char *s) { return util_ncopy(s, strlen(s) + 1); }


x86 assembly (clang, -O0):
<util_copy>:
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    %rax,%rsi
add    $0x1,%rsi
call   1040 <util_ncopy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_copy>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <util_ncopy@plt>

LLVM IR (-O0):
define i8* @util_copy(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @util_ncopy(i8* %3, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @util_copy(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @util_ncopy(i8* %0, i64 %3)
ret i8* %4
}
/* Type definitions */
struct uri {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ object_lock(struct uri *);
struct uri *get_uri_reference(struct uri *uri) {
  object_lock(uri);
  return uri;
}


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

x86 assembly (clang, -O2):
<get_uri_reference>:
push   %rbx
mov    %rdi,%rbx
call   1030 <object_lock@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.uri = type { i32 }
define %struct.uri* @get_uri_reference(%struct.uri* %0) {
%2 = alloca %struct.uri*
store %struct.uri* %0, %struct.uri** %2
%3 = load %struct.uri*, %struct.uri** %2
%4 = call i32 @object_lock(%struct.uri* %3)
%5 = load %struct.uri*, %struct.uri** %2
ret %struct.uri* %5
}

LLVM IR (-O2):
%struct.uri = type { i32 }
define %struct.uri* @get_uri_reference(%struct.uri* returned %0) {
%2 = tail call i32 @object_lock(%struct.uri* %0)
ret %struct.uri* %0
}
unsigned xrop3_16_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D | S;
  stk2 = ~stk2;
  stk1 = T & stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_16_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_16_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
not    %eax
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_16_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %7
%28 = load i32, i32* %9
%29 = and i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = and i32 %30, %31
%33 = load i32, i32* %8
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = or i32 %32, %36
%38 = load i32, i32* %7
%39 = load i32, i32* %6
%40 = xor i32 %39, -1
%41 = and i32 %38, %40
%42 = load i32, i32* %5
%43 = and i32 %41, %42
%44 = or i32 %37, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_16_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = xor i32 %4, -1
%7 = and i32 %6, %5
ret i32 %7
}
/* Variables and functions */
scalar_t__ audio_isopen();
int /*<<< orphan*/ sys_close_audio();
int /*<<< orphan*/ sys_reopen_audio();
void sys_set_audio_state(int onoff) {
  if (onoff) {
    if (!audio_isopen())
      sys_reopen_audio();
  } else {
    if (audio_isopen())
      sys_close_audio();
  }
}


x86 assembly (clang, -O0):
<sys_set_audio_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1162 <sys_set_audio_state+0x32>
mov    $0x0,%al
call   1030 <audio_isopen@plt>
cmp    $0x0,%rax
jne    115d <sys_set_audio_state+0x2d>
mov    $0x0,%al
call   1040 <sys_reopen_audio@plt>
jmp    117f <sys_set_audio_state+0x4f>
mov    $0x0,%al
call   1030 <audio_isopen@plt>
cmp    $0x0,%rax
je     117a <sys_set_audio_state+0x4a>
mov    $0x0,%al
call   1050 <sys_close_audio@plt>
jmp    117f <sys_set_audio_state+0x4f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_set_audio_state>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <audio_isopen@plt>
test   %ebx,%ebx
je     114b <sys_set_audio_state+0x1b>
test   %rax,%rax
jne    1158 <sys_set_audio_state+0x28>
xor    %eax,%eax
pop    %rbx
jmp    1040 <sys_reopen_audio@plt>
test   %rax,%rax
je     1158 <sys_set_audio_state+0x28>
xor    %eax,%eax
pop    %rbx
jmp    1050 <sys_close_audio@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @sys_set_audio_state(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = tail call i64 (...) @audio_isopen()
%4 = icmp eq i64 %3, 0
br i1 %2, label %8, label %5
5: ; preds = %1
br i1 %4, label %6, label %11
6: ; preds = %5
%7 = tail call i32 (...) @sys_reopen_audio()
br label %11
8: ; preds = %1
br i1 %4, label %11, label %9
9: ; preds = %8
%10 = tail call i32 (...) @sys_close_audio()
br label %11
11: ; preds = %8, %9, %5, %6
ret void
}
/* Variables and functions */
double M_PI;
double deg_to_rad(double deg) { return deg * M_PI / 180.0; }


x86 assembly (clang, -O0):
<deg_to_rad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2ed3(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xedf(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<deg_to_rad>:
mov    0x2ee1(%rip),%rax
mulsd  (%rax),%xmm0
divsd  0xeed(%rip),%xmm0
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @deg_to_rad(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* @M_PI
%5 = fmul double %3, %4
%6 = fdiv double %5, 1.800000e+02
ret double %6
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @deg_to_rad(double %0) {
%2 = load double, double* @M_PI
%3 = fmul double %2, %0
%4 = fdiv double %3, 1.800000e+02
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ box_double(double);
int /*<<< orphan*/ dpop();
double untag_float_fast(int /*<<< orphan*/);
void primitive_float_multiply_impl(void) {
  double y = untag_float_fast(dpop());
  double x = untag_float_fast(dpop());
  ;
  box_double(x * y);
}


x86 assembly (clang, -O0):
<primitive_float_multiply_impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <untag_float_fast@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <untag_float_fast@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1050 <box_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_float_multiply_impl>:
push   %rax
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <untag_float_fast@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <untag_float_fast@plt>
mulsd  (%rsp),%xmm0
pop    %rax
jmp    1050 <box_double@plt>

LLVM IR (-O0):
define void @primitive_float_multiply_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 = fmul double %7, %8
%10 = call i32 @box_double(double %9)
ret void
}

LLVM IR (-O2):
define void @primitive_float_multiply_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 = fmul double %2, %4
%6 = tail call i32 @box_double(double %5)
ret void
}
/* Variables and functions */
int close(int);
int c_close(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<c_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @c_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
void gtk_curve_set_gamma() {}


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

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

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

LLVM IR (-O2):
define void @gtk_curve_set_gamma() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "usage: bin2c [-n name] <output_file> [input_file1 ...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"usage: bin2c [-n name] <output_file> [input_file1 ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"usage: bin2c [-n name] <output_file> [input_file1 ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}