xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int a[] = {11, 2, 3, 4, 5, 6};
  printf("%d", (&a[3] - &a[0]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
add    $0xc,%rax
lea    -0x20(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %eax,%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [6 x i32] [i32 11, i32 2, i32 3, i32 4, i32 5, i32 6]
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 3
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%5 = ptrtoint i32* %3 to i64
%6 = ptrtoint i32* %4 to i64
%7 = sub i64 %5, %6
%8 = sdiv exact i64 %7, 4
%9 = trunc i64 %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 3)
ret i32 0
}
void compute_add_sources_el_s3_cuda_(long *Mesh_pointer, int *iphasef,
                                     int *itf) {}


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

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

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

LLVM IR (-O2):
define void @compute_add_sources_el_s3_cuda_(i64* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
ret void
}
void dd_minus(double *a) {
  a[0] = -a[0];
  a[1] = -a[1];
}


x86 assembly (clang, -O0):
<dd_minus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dd_minus>:
movups (%rdi),%xmm0
xorps  0xef6(%rip),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @dd_minus(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fneg double %5
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 0
store double %6, double* %8
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = fneg double %11
%13 = load double*, double** %2
%14 = getelementptr inbounds double, double* %13, i64 1
store double %12, double* %14
ret void
}

LLVM IR (-O2):
define void @dd_minus(double* nocapture %0) {
%2 = bitcast double* %0 to <2 x double>*
%3 = load <2 x double>, <2 x double>* %2
%4 = fneg <2 x double> %3
%5 = bitcast double* %0 to <2 x double>*
store <2 x double> %4, <2 x double>* %5
ret void
}
/* Variables and functions */
unsigned int _ht_hash_int(void *, int *);
unsigned int _ht_hash_real(void *ht, void *d) {
  float r = *(float *)d;
  union {
    float r;
    int i;
  } u;
  u.r = r;
  return _ht_hash_int(ht, &u.i);
}


x86 assembly (clang, -O0):
<_ht_hash_real>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <_ht_hash_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ht_hash_real>:
push   %rax
movss  (%rsi),%xmm0
movss  %xmm0,(%rsp)
mov    %rsp,%rsi
call   1030 <_ht_hash_int@plt>
pop    %rcx
ret

LLVM IR (-O0):
%union.anon = type { float }
define i32 @_ht_hash_real(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca float
%6 = alloca %union.anon
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to float*
%9 = load float, float* %8
store float %9, float* %5
%10 = load float, float* %5
%11 = bitcast %union.anon* %6 to float*
store float %10, float* %11
%12 = load i8*, i8** %3
%13 = bitcast %union.anon* %6 to i32*
%14 = call i32 @_ht_hash_int(i8* %12, i32* %13)
ret i32 %14
}

LLVM IR (-O2):
%union.anon = type { float }
define i32 @_ht_hash_real(i8* %0, i8* nocapture %1) {
%3 = alloca %union.anon
%4 = bitcast i8* %1 to float*
%5 = load float, float* %4
%6 = bitcast %union.anon* %3 to i8*
%7 = getelementptr inbounds %union.anon, %union.anon* %3, i64 0, i32 0
store float %5, float* %7
%8 = bitcast %union.anon* %3 to i32*
%9 = call i32 @_ht_hash_int(i8* %0, i32* %8)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int main() {
  system("date +%s");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <system@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [9 x i8] c"date +%s\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [9 x i8] c"date +%s\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
unsigned char *avet_decoder(unsigned char const *, unsigned char *, int const);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int const);
void decode_avet(const unsigned char *ciphertext, const int ciphertext_length,
                 const unsigned char *key, const int key_length,
                 unsigned char *plaintext) {
  unsigned char *decoded_payload =
      avet_decoder(ciphertext, plaintext, ciphertext_length);
  memcpy(plaintext, decoded_payload, ciphertext_length);
}


x86 assembly (clang, -O0):
<decode_avet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <avet_decoder@plt>
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_avet>:
push   %rbp
push   %rbx
push   %rax
mov    %r8,%rbx
mov    %esi,%ebp
mov    %r8,%rsi
mov    %ebp,%edx
call   1040 <avet_decoder@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @decode_avet(i8* %0, i32 %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%12 = load i8*, i8** %6
%13 = load i8*, i8** %10
%14 = load i32, i32* %7
%15 = call i8* @avet_decoder(i8* %12, i8* %13, i32 %14)
store i8* %15, i8** %11
%16 = load i8*, i8** %10
%17 = load i8*, i8** %11
%18 = load i32, i32* %7
%19 = call i32 @memcpy(i8* %16, i8* %17, i32 %18)
ret void
}

LLVM IR (-O2):
define void @decode_avet(i8* %0, i32 %1, i8* nocapture readnone %2, i32 %3, i8* %4) {
%6 = tail call i8* @avet_decoder(i8* %0, i8* %4, i32 %1)
%7 = tail call i32 @memcpy(i8* %4, i8* %6, i32 %1)
ret void
}
void Delay(int time) {
  for (; time > 0; time--)
    ;
}


x86 assembly (clang, -O0):
<Delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1124 <Delay+0x24>
jmp    1116 <Delay+0x16>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <Delay+0x7>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @Delay(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ atof(char const *);
float parseFloat(const char *str) {
  while (*str == ' ')
    ++str;
  return (float)atof(str);
}


x86 assembly (clang, -O0):
<parseFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    113d <parseFloat+0x2d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <parseFloat+0xc>
mov    -0x8(%rbp),%rdi
call   1030 <atof@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseFloat>:
push   %rax
add    $0xffffffffffffffff,%rdi
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x20,0x1(%rdi)
lea    0x1(%rdi),%rdi
je     1120 <parseFloat+0x10>
call   1030 <atof@plt>
cvtsi2ss %rax,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @parseFloat(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 32
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
%8 = tail call i64 @atof(i8* %3)
%9 = sitofp i64 %8 to float
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ gameIn(char *);
int /*<<< orphan*/ gameIn2count(char *, int *);
int /*<<< orphan*/ gameIn2int(char *, int *);
int /*<<< orphan*/ gameInit(char *, int *, int *);
int /*<<< orphan*/ judgeGame(char *, int *, int *);
void gameStart(char *inChar, int *toInt, int *count) {
  while (1) {
    gameInit(inChar, toInt, count);
    gameIn(inChar);
    gameIn2int(inChar, toInt);
    gameIn2count(inChar, count);
    judgeGame(inChar, toInt, count);
  }
}


x86 assembly (clang, -O0):
<gameStart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1060 <gameInit@plt>
mov    -0x8(%rbp),%rdi
call   1040 <gameIn@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <gameIn2int@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1070 <gameIn2count@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <judgeGame@plt>
jmp    1164 <gameStart+0x14>

x86 assembly (clang, -O2):
<gameStart>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1060 <gameInit@plt>
mov    %rbx,%rdi
call   1040 <gameIn@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <gameIn2int@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <gameIn2count@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1050 <judgeGame@plt>
jmp    1160 <gameStart+0x10>

LLVM IR (-O0):
define void @gameStart(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
br label %7
7: ; preds = %3, %7
%8 = load i8*, i8** %4
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = call i32 @gameInit(i8* %8, i32* %9, i32* %10)
%12 = load i8*, i8** %4
%13 = call i32 @gameIn(i8* %12)
%14 = load i8*, i8** %4
%15 = load i32*, i32** %5
%16 = call i32 @gameIn2int(i8* %14, i32* %15)
%17 = load i8*, i8** %4
%18 = load i32*, i32** %6
%19 = call i32 @gameIn2count(i8* %17, i32* %18)
%20 = load i8*, i8** %4
%21 = load i32*, i32** %5
%22 = load i32*, i32** %6
%23 = call i32 @judgeGame(i8* %20, i32* %21, i32* %22)
br label %7
}

LLVM IR (-O2):
define void @gameStart(i8* %0, i32* %1, i32* %2) {
br label %4
4: ; preds = %3, %4
%5 = tail call i32 @gameInit(i8* %0, i32* %1, i32* %2)
%6 = tail call i32 @gameIn(i8* %0)
%7 = tail call i32 @gameIn2int(i8* %0, i32* %1)
%8 = tail call i32 @gameIn2count(i8* %0, i32* %2)
%9 = tail call i32 @judgeGame(i8* %0, i32* %1, i32* %2)
br label %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int __scale_upd();
uint64_t cyc2ns(uint64_t cyc) { return cyc * __scale_upd() >> 10; }


x86 assembly (clang, -O0):
<cyc2ns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__scale_upd@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
imul   %ecx,%eax
sar    $0xa,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cyc2ns>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <__scale_upd@plt>
imul   %ebx,%eax
sar    $0xa,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cyc2ns(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @__scale_upd()
%5 = mul nsw i32 %3, %4
%6 = ashr i32 %5, 10
ret i32 %6
}

LLVM IR (-O2):
define i32 @cyc2ns(i32 %0) {
%2 = tail call i32 (...) @__scale_upd()
%3 = mul nsw i32 %2, %0
%4 = ashr i32 %3, 10
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main(void) {
  int x = 8, y = 9;
  assert(x == y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
movl   $0x9,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 8, i32* %2
store i32 9, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp eq i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
int putchar(int ch) {
  if (ch == '\n') {
    while (!(*(volatile unsigned int *)0xE000C014 & 0x20))
      ;
    *(volatile unsigned int *)0xE000C000 = '\r';
  }
  while (!(*(volatile unsigned int *)0xE000C014 & 0x20))
    ;
  *(volatile unsigned int *)0xE000C000 = ch;
  return ch;
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jne    1145 <putchar+0x45>
jmp    1116 <putchar+0x16>
mov    $0xe000c014,%eax
mov    (%rax),%eax
and    $0x20,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1135 <putchar+0x35>
jmp    113a <putchar+0x3a>
jmp    1116 <putchar+0x16>
mov    $0xe000c000,%eax
movl   $0xd,(%rax)
jmp    114a <putchar+0x4a>
mov    $0xe000c014,%eax
mov    (%rax),%eax
and    $0x20,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1169 <putchar+0x69>
jmp    116e <putchar+0x6e>
jmp    114a <putchar+0x4a>
mov    -0x4(%rbp),%ecx
mov    $0xe000c000,%eax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
mov    %edi,%eax
mov    $0xe000c000,%ecx
cmp    $0xa,%edi
jne    1120 <putchar+0x20>
nopl   0x0(%rax)
testl  $0x20,0x14(%rcx)
je     1110 <putchar+0x10>
movl   $0xd,(%rcx)
nop
testl  $0x20,0x14(%rcx)
je     1120 <putchar+0x20>
mov    %eax,(%rcx)
ret

LLVM IR (-O0):
define i32 @putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 10
br i1 %4, label %5, label %13
5: ; preds = %1
br label %6
6: ; preds = %11, %5
%7 = load volatile i32, i32* inttoptr (i64 3758145556 to i32*)
%8 = and i32 %7, 32
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br i1 %10, label %11, label %12
11: ; preds = %6
br label %6
12: ; preds = %6
store volatile i32 13, i32* inttoptr (i64 3758145536 to i32*)
br label %13
13: ; preds = %12, %1
br label %14
14: ; preds = %19, %13
%15 = load volatile i32, i32* inttoptr (i64 3758145556 to i32*)
%16 = and i32 %15, 32
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
br i1 %18, label %19, label %20
19: ; preds = %14
br label %14
20: ; preds = %14
%21 = load i32, i32* %2
store volatile i32 %21, i32* inttoptr (i64 3758145536 to i32*)
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @putchar(i32 returned %0) {
%2 = icmp eq i32 %0, 10
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = load volatile i32, i32* inttoptr (i64 3758145556 to i32*)
%5 = and i32 %4, 32
%6 = icmp eq i32 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3
store volatile i32 13, i32* inttoptr (i64 3758145536 to i32*)
br label %8
8: ; preds = %7, %1
br label %9
9: ; preds = %8, %9
%10 = load volatile i32, i32* inttoptr (i64 3758145556 to i32*)
%11 = and i32 %10, 32
%12 = icmp eq i32 %11, 0
br i1 %12, label %9, label %13
13: ; preds = %9
store volatile i32 %0, i32* inttoptr (i64 3758145536 to i32*)
ret i32 %0
}
int skip_until_char(const char *s, int len, char c) {
  register int i;
  for (i = 0; i < len; i++) {
    if (s[i] == c)
      break;
  }
  return (i);
}


x86 assembly (clang, -O0):
<skip_until_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1153 <skip_until_char+0x53>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0xd(%rbp),%ecx
cmp    %ecx,%eax
jne    1140 <skip_until_char+0x40>
jmp    1153 <skip_until_char+0x53>
jmp    1145 <skip_until_char+0x45>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <skip_until_char+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_until_char>:
test   %esi,%esi
jle    1121 <skip_until_char+0x21>
mov    %esi,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
cmp    %dl,(%rdi,%rax,1)
je     1120 <skip_until_char+0x20>
add    $0x1,%rax
cmp    %rax,%rcx
jne    1110 <skip_until_char+0x10>
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @skip_until_char(i8* nocapture %0, i32 %1, i8 signext %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, %2
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ 0, %3 ], [ %16, %15 ], [ %1, %12 ]
ret i32 %18
}
int misc_llseek() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @misc_llseek() {
ret i32 0
}
/* Variables and functions */
int __digit(char, int);
bool __isbdigit(char c, int base) { return (__digit(c, 100) != -1); }


x86 assembly (clang, -O0):
<__isbdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x64,%esi
movsbl -0x1(%rbp),%edi
call   1030 <__digit@plt>
cmp    $0xffffffff,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__isbdigit>:
push   %rax
mov    $0x64,%esi
call   1030 <__digit@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__isbdigit(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = call i32 @__digit(i8 signext %5, i32 100)
%7 = icmp ne i32 %6, -1
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @__isbdigit(i8 signext %0, i32 %1) {
%3 = tail call i32 @__digit(i8 signext %0, i32 100)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int syscall(int, int);
int mlockall(int flags) { return syscall(152, flags); }


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

x86 assembly (clang, -O2):
<mlockall>:
mov    %edi,%esi
mov    $0x98,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @mlockall(i32 %0) {
%2 = tail call i32 @syscall(i32 152, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_history_purge(int);
void roadmap_start_purge(void) { roadmap_history_purge(10); }


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

x86 assembly (clang, -O2):
<roadmap_start_purge>:
mov    $0xa,%edi
jmp    1030 <roadmap_history_purge@plt>

LLVM IR (-O0):
define void @roadmap_start_purge() {
%1 = call i32 @roadmap_history_purge(i32 10)
ret void
}

LLVM IR (-O2):
define void @roadmap_start_purge() {
%1 = tail call i32 @roadmap_history_purge(i32 10)
ret void
}
void UI_method_set_closer(void) {}


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

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

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

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

/* Variables and functions */
int O_CREAT;
int O_TRUNC;
int O_WRONLY;
int open(char const *, int, int /*<<< orphan*/);
int __libc_creat(const char *file, mode_t mode) {
  return open(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
}


x86 assembly (clang, -O0):
<__libc_creat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
mov    0x2ec5(%rip),%rax
or     (%rax),%esi
mov    0x2eb4(%rip),%rax
or     (%rax),%esi
mov    -0xc(%rbp),%edx
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__libc_creat>:
mov    0x2eb1(%rip),%rcx
mov    0x2eda(%rip),%rax
mov    (%rax),%eax
or     (%rcx),%eax
mov    %esi,%edx
mov    0x2ec5(%rip),%rcx
or     (%rcx),%eax
mov    %eax,%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
define i32 @__libc_creat(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_WRONLY
%7 = load i32, i32* @O_CREAT
%8 = or i32 %6, %7
%9 = load i32, i32* @O_TRUNC
%10 = or i32 %8, %9
%11 = load i32, i32* %4
%12 = call i32 @open(i8* %5, i32 %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
define i32 @__libc_creat(i8* nocapture %0, i32 %1) {
%3 = load i32, i32* @O_WRONLY
%4 = load i32, i32* @O_CREAT
%5 = or i32 %4, %3
%6 = load i32, i32* @O_TRUNC
%7 = or i32 %5, %6
%8 = tail call i32 @open(i8* %0, i32 %7, i32 %1)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void library_function(void) { printf("This function is in a library\n"); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"This function is in a library\0A\00"
define void @library_function() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"This function is in a library\00"
define void @library_function() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *my_strdup(const char *str) {
  char *p = malloc(strlen(str) + 1);
  strcpy(p, str);
  return p;
}


x86 assembly (clang, -O0):
<my_strdup>:
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
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @my_strdup(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 i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @my_strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char a;
  printf("please input a UpperCase char:\n");
  scanf("%c", &a);
  printf("%c\n", a + 32);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%esi
add    $0x20,%esi
lea    0xea6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [4 x i8] c"%c\0A\00"
@str = [31 x i8] c"please input a UpperCase char:\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = add nsw i32 %5, 32
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RAND_bytes(unsigned char *, size_t);
void crypto_sym_genkey(unsigned char *key, size_t len) { RAND_bytes(key, len); }


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

x86 assembly (clang, -O2):
<crypto_sym_genkey>:
jmp    1030 <RAND_bytes@plt>

LLVM IR (-O0):
define void @crypto_sym_genkey(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @RAND_bytes(i8* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @crypto_sym_genkey(i8* %0, i64 %1) {
%3 = tail call i32 @RAND_bytes(i8* %0, i64 %1)
ret void
}
/* Type definitions */
struct rule {
  int dummy;
};
struct qserver {
  int dummy;
};

/* Variables and functions */
struct rule *add_rule(struct qserver *, char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, unsigned int);
struct rule *add_uchar_rule(struct qserver *server, char *key,
                            unsigned char value) {
  char buf[24];
  sprintf(buf, "%u", (unsigned)value);
  return add_rule(server, key, buf, 0);
}


x86 assembly (clang, -O0):
<add_uchar_rule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
lea    -0x30(%rbp),%rdi
movzbl -0x11(%rbp),%edx
lea    0xebc(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x30(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <add_rule@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_uchar_rule>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xeca(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
xor    %ecx,%ecx
call   1030 <add_rule@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.rule = type { i32 }
%struct.qserver = type { i32 }
@.str = [3 x i8] c"%u\00"
define %struct.rule* @add_uchar_rule(%struct.qserver* %0, i8* %1, i8 zeroext %2) {
%4 = alloca %struct.qserver*
%5 = alloca i8*
%6 = alloca i8
%7 = alloca [24 x i8]
store %struct.qserver* %0, %struct.qserver** %4
store i8* %1, i8** %5
store i8 %2, i8* %6
%8 = getelementptr inbounds [24 x i8], [24 x i8]* %7, i64 0, i64 0
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load %struct.qserver*, %struct.qserver** %4
%13 = load i8*, i8** %5
%14 = getelementptr inbounds [24 x i8], [24 x i8]* %7, i64 0, i64 0
%15 = call %struct.rule* @add_rule(%struct.qserver* %12, i8* %13, i8* %14, i32 0)
ret %struct.rule* %15
}

LLVM IR (-O2):
%struct.rule = type { i32 }
%struct.qserver = type { i32 }
@.str = [3 x i8] c"%u\00"
define %struct.rule* @add_uchar_rule(%struct.qserver* %0, i8* %1, i8 zeroext %2) {
%4 = alloca [24 x i8]
%5 = getelementptr inbounds [24 x i8], [24 x i8]* %4, i64 0, i64 0
%6 = zext i8 %2 to i32
%7 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call %struct.rule* @add_rule(%struct.qserver* %0, i8* %1, i8* %5, i32 0)
ret %struct.rule* %8
}
void remote_enter_powersave(void) {}


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

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

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

LLVM IR (-O2):
define void @remote_enter_powersave() {
ret void
}
unsigned short *lit(unsigned short v, unsigned short is_a) {
  static unsigned short value;
  if (v == 0x003F)
    value = 0xFFFF;
  else
    value = v & 0x001F;
  return &value;
}


x86 assembly (clang, -O0):
<lit>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
cmp    $0x3f,%eax
jne    112d <lit+0x2d>
movw   $0xffff,0x2efa(%rip)
ff ff
jmp    113b <lit+0x3b>
movzwl -0x2(%rbp),%eax
and    $0x1f,%eax
mov    %ax,0x2ee7(%rip)
lea    0x2ee0(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lit>:
mov    %edi,%eax
and    $0x1f,%eax
cmp    $0x3f,%di
mov    $0xffff,%ecx
cmovne %eax,%ecx
mov    %cx,0x2f0a(%rip)
lea    0x2f03(%rip),%rax
ret

LLVM IR (-O0):
@lit.value = internal global i16 0
define i16* @lit(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = icmp eq i32 %6, 63
br i1 %7, label %8, label %9
8: ; preds = %2
store i16 -1, i16* @lit.value
br label %14
9: ; preds = %2
%10 = load i16, i16* %3
%11 = zext i16 %10 to i32
%12 = and i32 %11, 31
%13 = trunc i32 %12 to i16
store i16 %13, i16* @lit.value
br label %14
14: ; preds = %9, %8
ret i16* @lit.value
}

LLVM IR (-O2):
@lit.value = internal global i16 0
define i16* @lit(i16 zeroext %0, i16 zeroext %1) {
%3 = icmp eq i16 %0, 63
%4 = and i16 %0, 31
%5 = select i1 %3, i16 -1, i16 %4
store i16 %5, i16* @lit.value
ret i16* @lit.value
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ stderr;
char *new_string(int size) {
  int i;
  char *string;
  string = (char *)malloc(sizeof(char) * size);
  if (!string) {
    fprintf(stderr, "Insufficient memory for string of length %d.\n", size);
    return NULL;
  } else
    return string;
}


x86 assembly (clang, -O0):
<new_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116e <new_string+0x4e>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
lea    0xea4(%rip),%rsi
call   1030 <fprintf@plt>
movq   $0x0,-0x8(%rbp)
jmp    1176 <new_string+0x56>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_string>:
push   %rbx
mov    %edi,%ebx
call   1040 <malloc@plt>
test   %rax,%rax
je     112f <new_string+0xf>
pop    %rbx
ret
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
mov    %ebx,%edx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [46 x i8] c"Insufficient memory for string of length %d.\0A\00"
define i8* @new_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = mul i64 1, %7
%9 = trunc i64 %8 to i32
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = icmp ne i8* %12, null
br i1 %13, label %18, label %14
14: ; preds = %1
%15 = load i32, i32* @stderr
%16 = load i32, i32* %3
%17 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %16)
store i8* null, i8** %2
br label %20
18: ; preds = %1
%19 = load i8*, i8** %5
store i8* %19, i8** %2
br label %20
20: ; preds = %18, %14
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [46 x i8] c"Insufficient memory for string of length %d.\0A\00"
define i8* @new_string(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %9
7: ; preds = %1
%8 = inttoptr i64 %2 to i8*
br label %9
9: ; preds = %7, %4
%10 = phi i8* [ %8, %7 ], [ null, %4 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int topla(int, int);
int main() {
  int toplam = 0;
  toplam = topla(3, 4);
  printf("%d\n", toplam);
  return 0;
}


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

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

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

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

/* Variables and functions */
struct array *array_create(int const);
struct array *stack_create(const int amount) {
  return array_create(amount);
}


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

x86 assembly (clang, -O2):
<stack_create>:
jmp    1030 <array_create@plt>

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

LLVM IR (-O2):
%struct.array = type { i32 }
define %struct.array* @stack_create(i32 %0) {
%2 = tail call %struct.array* @array_create(i32 %0)
ret %struct.array* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ hexdump_data(int /*<<< orphan*/, int /*<<< orphan*/ const *,
                                size_t, size_t);
void dump_unknown(uint8_t type, const uint8_t *data, size_t n) {
  (void)type;
  hexdump_data(0, data, n, n);
}


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

x86 assembly (clang, -O2):
<dump_unknown>:
xor    %edi,%edi
mov    %rdx,%rcx
jmp    1030 <hexdump_data@plt>

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

LLVM IR (-O2):
define void @dump_unknown(i32 %0, i32* %1, i64 %2) {
%4 = tail call i32 @hexdump_data(i32 0, i32* %1, i64 %2, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Swig_free(void *);
void _wrap_Swig_free_dbr_f2dad429834b4b9b(void *_swig_go_0) {
  void *arg1 = (void *)0;
  arg1 = *(void **)&_swig_go_0;
  Swig_free(arg1);
}


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

x86 assembly (clang, -O2):
<_wrap_Swig_free_dbr_f2dad429834b4b9b>:
jmp    1030 <Swig_free@plt>

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

LLVM IR (-O2):
define void @_wrap_Swig_free_dbr_f2dad429834b4b9b(i8* %0) {
%2 = tail call i32 @Swig_free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, double *);
int main() {
  int a;
  double b;
  scanf("%d %lf", &a, &b);
  printf("%.3lf km/l\n", a / b);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1040 <scanf@plt>
cvtsi2sdl 0xc(%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d %lf\00"
@.str.1 = [12 x i8] c"%.3lf km/l\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %2, double* %3)
%5 = load i32, i32* %2
%6 = sitofp i32 %5 to double
%7 = load double, double* %3
%8 = fdiv double %6, %7
%9 = fptosi double %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %lf\00"
@.str.1 = [12 x i8] c"%.3lf km/l\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = bitcast i32* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, double* %2)
%6 = load i32, i32* %1
%7 = sitofp i32 %6 to double
%8 = load double, double* %2
%9 = fdiv double %7, %8
%10 = fptosi double %9 to i32
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}
unsigned char get_loc(unsigned char c) { return c & 0x0F; }


x86 assembly (clang, -O0):
<get_loc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_loc>:
mov    %edi,%eax
and    $0xf,%al
ret

LLVM IR (-O0):
define zeroext i8 @get_loc(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 15
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @get_loc(i8 zeroext %0) {
%2 = and i8 %0, 15
ret i8 %2
}
void block_cli_if_recover(int id) {}


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

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

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

LLVM IR (-O2):
define void @block_cli_if_recover(i32 %0) {
ret void
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *xstrdup(const char *s) {
  char *t;
  size_t len;
  if (!s)
    return NULL;
  len = strlen(s) + 1;
  t = malloc(len);
  if (t) {
    memcpy(t, s, len);
  }
  return t;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <xstrdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1197 <xstrdup+0x67>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     118f <xstrdup+0x5f>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1168 <xstrdup+0x38>
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     1168 <xstrdup+0x38>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
jmp    116a <xstrdup+0x3a>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = tail call i8* @malloc(i64 %6)
%8 = icmp eq i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call i32 @memcpy(i8* %7, i8* %0, i64 %6)
br label %11
11: ; preds = %3, %9, %1
%12 = phi i8* [ null, %1 ], [ %7, %9 ], [ null, %3 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
void EPIIntUnregister(unsigned long ulBase) {
  ;
  IntDisable(69);
  IntUnregister(69);
}


x86 assembly (clang, -O0):
<EPIIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x45,%edi
call   1030 <IntDisable@plt>
mov    $0x45,%edi
call   1040 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIIntUnregister>:
push   %rax
mov    $0x45,%edi
call   1030 <IntDisable@plt>
mov    $0x45,%edi
pop    %rax
jmp    1040 <IntUnregister@plt>

LLVM IR (-O0):
define void @EPIIntUnregister(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @IntDisable(i32 69)
%4 = call i32 @IntUnregister(i32 69)
ret void
}

LLVM IR (-O2):
define void @EPIIntUnregister(i64 %0) {
%2 = tail call i32 @IntDisable(i32 69)
%3 = tail call i32 @IntUnregister(i32 69)
ret void
}