xunge/DecIR huggingface dataset:
void ccnl_face_CTS_done(void *ptr, int cnt, int len) {
  do {
  } while (0);
}


x86 assembly (clang, -O0):
<ccnl_face_CTS_done>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
jmp    1113 <ccnl_face_CTS_done+0x13>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ccnl_face_CTS_done(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
br label %8
8: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @ccnl_face_CTS_done(i8* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *LZ4IO_baseName(const char *input_filename) {
  const char *b = strrchr(input_filename, '/');
  if (!b)
    b = strrchr(input_filename, '\\');
  if (!b)
    return input_filename;
  return b + 1;
}


x86 assembly (clang, -O0):
<LZ4IO_baseName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    114b <LZ4IO_baseName+0x3b>
mov    -0x10(%rbp),%rdi
mov    $0x5c,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1163 <LZ4IO_baseName+0x53>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <LZ4IO_baseName+0x5f>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4IO_baseName>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
jne    1130 <LZ4IO_baseName+0x20>
mov    %rbx,%rdi
mov    $0x5c,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @LZ4IO_baseName(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 92)
br label %6
6: ; preds = %4, %1
%7 = phi i8* [ %2, %1 ], [ %5, %4 ]
%8 = icmp eq i8* %7, null
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = select i1 %8, i8* %0, i8* %9
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ IO_get_byte();
int /*<<< orphan*/ put_argument2(char *, int /*<<< orphan*/, char *);
int am_abs_x8(void) {
  put_argument2(" $", IO_get_byte(), ", x");
  return 2;
}


x86 assembly (clang, -O0):
<am_abs_x8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <IO_get_byte@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
lea    0xec8(%rip),%rdx
call   1040 <put_argument2@plt>
mov    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<am_abs_x8>:
push   %rax
xor    %eax,%eax
call   1030 <IO_get_byte@plt>
lea    0xed1(%rip),%rdi
lea    0xecd(%rip),%rdx
mov    %eax,%esi
call   1040 <put_argument2@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c" $\00"
@.str.1 = [4 x i8] c", x\00"
define i32 @am_abs_x8() {
%1 = call i32 (...) @IO_get_byte()
%2 = call i32 @put_argument2(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 2
}

LLVM IR (-O2):
@.str = [3 x i8] c" $\00"
@.str.1 = [4 x i8] c", x\00"
define i32 @am_abs_x8() {
%1 = tail call i32 (...) @IO_get_byte()
%2 = tail call i32 @put_argument2(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 2
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_28(uint64_t x) {
  __asm__("rolq $28, %0" : "=r"(x) : "0"(x));
  return x;
}


x86 assembly (clang, -O0):
<ROL64_28>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
rol    $0x1c,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROL64_28>:
mov    %rdi,%rax
rol    $0x1c,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_28(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$28, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_28(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$28, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
void rop3_179_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & T;
  stk2 = ~stk2;
  stk1 = S & stk2;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_179_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_179_0_1>:
mov    (%rdi),%al
mov    %eax,%ecx
and    %dl,%cl
not    %dl
or     %al,%dl
xor    %dl,%cl
and    %sil,%cl
xor    %dl,%cl
mov    %cl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_179_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = and i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = and i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = xor i32 %27, -1
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = and i32 %31, %33
%35 = load i8, i8* %7
%36 = zext i8 %35 to i32
%37 = load i8, i8* %6
%38 = zext i8 %37 to i32
%39 = xor i32 %38, -1
%40 = and i32 %36, %39
%41 = or i32 %34, %40
%42 = load i8, i8* %6
%43 = zext i8 %42 to i32
%44 = load i8, i8* %5
%45 = zext i8 %44 to i32
%46 = xor i32 %45, -1
%47 = and i32 %43, %46
%48 = load i8*, i8** %4
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = and i32 %47, %50
%52 = or i32 %41, %51
%53 = trunc i32 %52 to i8
%54 = load i8*, i8** %4
store i8 %53, i8* %54
ret void
}

LLVM IR (-O2):
define void @rop3_179_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = and i8 %5, %1
%7 = xor i8 %1, -1
%8 = xor i8 %2, -1
%9 = or i8 %4, %8
%10 = and i8 %9, %7
%11 = or i8 %10, %6
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pairalign();
void align() { pairalign(); }


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

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

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

LLVM IR (-O2):
define void @align() {
%1 = tail call i32 (...) @pairalign()
ret void
}
/* Type definitions */
struct timespec {
  long long tv_sec;
  long long tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
unsigned long long getTimestamp() {
  struct timespec t;
  t.tv_sec = t.tv_nsec = 0;
  clock_gettime(CLOCK_MONOTONIC, &t);
  return ((unsigned long long)((t.tv_sec) * 1000000000LL + t.tv_nsec));
}


x86 assembly (clang, -O0):
<getTimestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,-0x10(%rbp),%rax
3b
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTimestamp>:
sub    $0x18,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,(%rsp),%rax
3b
add    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @getTimestamp() {
%1 = alloca %struct.timespec
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
store i64 0, i64* %2
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
store i64 0, i64* %3
%4 = load i32, i32* @CLOCK_MONOTONIC
%5 = call i32 @clock_gettime(i32 %4, %struct.timespec* %1)
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = mul nsw i64 %7, 1000000000
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%10 = load i64, i64* %9
%11 = add nsw i64 %8, %10
ret i64 %11
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @getTimestamp() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%5 = bitcast %struct.timespec* %1 to i8*
%6 = load i32, i32* @CLOCK_MONOTONIC
%7 = call i32 @clock_gettime(i32 %6, %struct.timespec* %1)
%8 = load i64, i64* %4
%9 = mul nsw i64 %8, 1000000000
%10 = load i64, i64* %3
%11 = add nsw i64 %9, %10
ret i64 %11
}
/* Variables and functions */
float powf(float, float);
float dbToLinear(float db) { return powf(10.f, db / 20.f); }


x86 assembly (clang, -O0):
<dbToLinear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
movss  0xeda(%rip),%xmm0
divss  %xmm0,%xmm1
movss  0xeca(%rip),%xmm0
call   1030 <powf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbToLinear>:
movaps %xmm0,%xmm1
divss  0xee5(%rip),%xmm1
movss  0xee1(%rip),%xmm0
jmp    1030 <powf@plt>

LLVM IR (-O0):
define float @dbToLinear(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fdiv float %3, 2.000000e+01
%5 = call float @powf(float 1.000000e+01, float %4)
ret float %5
}

LLVM IR (-O2):
define float @dbToLinear(float %0) {
%2 = fdiv float %0, 2.000000e+01
%3 = tail call float @powf(float 1.000000e+01, float %2)
ret float %3
}
int bswap32(int x) { return __builtin_bswap32(x); }


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

x86 assembly (clang, -O2):
<bswap32>:
mov    %edi,%eax
bswap  %eax
ret

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

LLVM IR (-O2):
define i32 @bswap32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ hash_int(int /*<<< orphan*/);
uint32_t hash_key(const void *i) { return hash_int((uint32_t)(uintptr_t)i); }


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

x86 assembly (clang, -O2):
<hash_key>:
jmp    1030 <hash_int@plt>

LLVM IR (-O0):
define i32 @hash_key(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = trunc i64 %4 to i32
%6 = call i32 @hash_int(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @hash_key(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @hash_int(i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ write(int, void const *, size_t);
ssize_t mywrite(int fd, const void *buf, size_t count) {
  return write(fd, buf, count);
}


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

x86 assembly (clang, -O2):
<mywrite>:
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define i32 @mywrite(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int best_fit_count_extfrag(size_t size) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @best_fit_count_extfrag(i64 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int help(char *argv) {
  printf("Picrypt: Encrypt and Decrypt files\nBy: Felipe Escoto\n");
  printf(
      "\nBasic usage:\n Encrypt: %s [FILE].xyz\n Decrypt: %s [IMAGE].xyz.bmp",
      argv, argv);
  printf("\nAdvanced usage:\n %s [IMAGE].bmp [FILE].xyz\n", argv);
  return 0;
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xefd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rbx
mov    %rdi,%rbx
lea    0xf45(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef8(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [54 x i8] c"Picrypt: Encrypt and Decrypt files\0ABy: Felipe Escoto\0A\00"
@.str.1 = [67 x i8] c"\0ABasic usage:\0A Encrypt: %s [FILE].xyz\0A Decrypt: %s [IMAGE].xyz.bmp\00"
@.str.2 = [45 x i8] c"\0AAdvanced usage:\0A %s [IMAGE].bmp [FILE].xyz\0A\00"
define i32 @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [67 x i8] c"\0ABasic usage:\0A Encrypt: %s [FILE].xyz\0A Decrypt: %s [IMAGE].xyz.bmp\00"
@.str.2 = [45 x i8] c"\0AAdvanced usage:\0A %s [IMAGE].bmp [FILE].xyz\0A\00"
@str = [53 x i8] c"Picrypt: Encrypt and Decrypt files\0ABy: Felipe Escoto\00"
define i32 @help(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int _fread(unsigned char *, int, int /*<<< orphan*/ *);
int fgetc(FILE *f) {
  unsigned char ch;
  return (_fread(&ch, 1, f) == 1) ? (int)ch : EOF;
}


x86 assembly (clang, -O0):
<fgetc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    -0x9(%rbp),%rdi
mov    $0x1,%esi
call   1030 <_fread@plt>
cmp    $0x1,%eax
jne    1143 <fgetc+0x33>
movzbl -0x9(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114f <fgetc+0x3f>
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetc>:
push   %rax
mov    %rdi,%rdx
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <_fread@plt>
cmp    $0x1,%eax
je     1133 <fgetc+0x23>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
movzbl 0x7(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @fgetc(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @_fread(i8* %3, i32 1, i32* %4)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
br label %12
10: ; preds = %1
%11 = load i32, i32* @EOF
br label %12
12: ; preds = %10, %7
%13 = phi i32 [ %9, %7 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @fgetc(i32* %0) {
%2 = alloca i8
%3 = call i32 @_fread(i8* %2, i32 1, i32* %0)
%4 = icmp eq i32 %3, 1
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = load i32, i32* @EOF
%8 = select i1 %4, i32 %6, i32 %7
ret i32 %8
}
void kgsl_process_init_debugfs(struct kgsl_process_private *priv) {}


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

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

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

LLVM IR (-O2):
%struct.kgsl_process_private = type opaque
define void @kgsl_process_init_debugfs(%struct.kgsl_process_private* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  printf("%.3lf\n", (a + b + c) / 3.0);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%d\00"
@.str.1 = [7 x i8] c"%.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = add nsw i32 %9, %8
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
%13 = sitofp i32 %12 to double
%14 = fdiv double %13, 3.000000e+00
%15 = fptosi double %14 to i32
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %15)
ret i32 0
}
void ack_create(char *buffer) {
  buffer[0] = 3;
  buffer[1] = '\r';
  buffer[2] = '\n';
  buffer[3] = '\r';
  buffer[4] = '\n';
  buffer[5] = '\0';
}


x86 assembly (clang, -O0):
<ack_create>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x3,(%rax)
mov    -0x8(%rbp),%rax
movb   $0xd,0x1(%rax)
mov    -0x8(%rbp),%rax
movb   $0xa,0x2(%rax)
mov    -0x8(%rbp),%rax
movb   $0xd,0x3(%rax)
mov    -0x8(%rbp),%rax
movb   $0xa,0x4(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0x5(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ack_create>:
movl   $0xd0a0d03,(%rdi)
movw   $0xa,0x4(%rdi)
ret

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

LLVM IR (-O2):
define void @ack_create(i8* nocapture writeonly %0) {
store i8 3, i8* %0
%2 = getelementptr inbounds i8, i8* %0, i64 1
store i8 13, i8* %2
%3 = getelementptr inbounds i8, i8* %0, i64 2
store i8 10, i8* %3
%4 = getelementptr inbounds i8, i8* %0, i64 3
store i8 13, i8* %4
%5 = getelementptr inbounds i8, i8* %0, i64 4
store i8 10, i8* %5
%6 = getelementptr inbounds i8, i8* %0, i64 5
store i8 0, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
main() {
  char minus, mais = 0;
  scanf("%c", &minus);
  mais = minus - 32;
  printf("%c", mais);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xf(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xf(%rsp),%al
add    $0xe0,%al
movsbl %al,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = add i8 %3, -32
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %4)
ret i32 0
}
void gtk_image_menu_item_set_image() {}


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

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

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

LLVM IR (-O2):
define void @gtk_image_menu_item_set_image() {
ret void
}
int isletter(c) {
  if (c >= 'A' && c <= 'Z')
    c += 'a' - 'A';
  if (c >= 'a' && c <= 'z')
    return (c);
  return (0);
}


x86 assembly (clang, -O0):
<isletter>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     1124 <isletter+0x24>
cmpl   $0x5a,-0x8(%rbp)
jg     1124 <isletter+0x24>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1143 <isletter+0x43>
cmpl   $0x7a,-0x8(%rbp)
jg     1143 <isletter+0x43>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114a <isletter+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isletter>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%eax
cmovae %edi,%ecx
lea    -0x61(%rcx),%edx
xor    %eax,%eax
cmp    $0x1a,%edx
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @isletter(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 32
store i32 %11, i32* %3
br label %12
12: ; preds = %9, %6, %1
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 122
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = load i32, i32* %3
store i32 %19, i32* %2
br label %21
20: ; preds = %15, %12
store i32 0, i32* %2
br label %21
21: ; preds = %20, %18
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @isletter(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
%6 = add i32 %5, -97
%7 = icmp ult i32 %6, 26
%8 = select i1 %7, i32 %5, i32 0
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_y1();
scalar_t__ y1(double);
void test_y1(double d) {
  if (y1(d) != y1(d))
    link_failure_y1();
}


x86 assembly (clang, -O0):
<test_y1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <y1@plt>
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <y1@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_y1+0x3c>
mov    $0x0,%al
call   1040 <link_failure_y1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_y1>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <y1@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
call   1030 <y1@plt>
cmp    %rax,%rbx
jne    1149 <test_y1+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_y1@plt>

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

LLVM IR (-O2):
define void @test_y1(double %0) {
%2 = tail call i64 @y1(double %0)
%3 = tail call i64 @y1(double %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_y1()
br label %7
7: ; preds = %5, %1
ret void
}
int function_foo() { return 5; }


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

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

LLVM IR (-O0):
define i32 @function_foo() {
ret i32 5
}

LLVM IR (-O2):
define i32 @function_foo() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
char *strncat(void *, void const *, int /*<<< orphan*/);
char *strcat(void *s, const void *ct) {
  return strncat(s, ct, strlen((char *)ct));
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <strncat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strncat@plt>

LLVM IR (-O0):
define i8* @strcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i8* @strncat(i8* %5, i8* %6, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @strcat(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i8* @strncat(i8* %0, i8* %1, i32 %3)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ getc(int /*<<< orphan*/ *);
wint_t getwc(FILE *stream) { return getc(stream); }


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

x86 assembly (clang, -O2):
<getwc>:
jmp    1030 <getc@plt>

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

LLVM IR (-O2):
define i32 @getwc(i32* nocapture %0) {
%2 = tail call i32 @getc(i32* %0)
ret i32 %2
}
void zero_rpm_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @zero_rpm_Interrupt() {
ret void
}
int conn_rollback() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @conn_rollback() {
ret i32 0
}
long long test_llroundf(float x) { return __builtin_llroundf(x); }


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

x86 assembly (clang, -O2):
<test_llroundf>:
jmp    1030 <llroundf@plt>

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

LLVM IR (-O2):
define i64 @test_llroundf(float %0) {
%2 = tail call i64 @llroundf(float %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ fold(char *, int);
int getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int len;
  char line[1000];
  while ((len = getline(line, 1000)) > 0) {
    fold(line, len);
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1186 <main+0x56>
lea    -0x3f0(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <fold@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %eax,%eax
jle    1186 <main+0x56>
mov    %rsp,%rbx
lea    0xeab(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <fold@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = phi i32 [ %9, %5 ], [ %3, %0 ]
%7 = call i32 @fold(i8* %2, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = call i32 @getline(i8* %2, i32 1000)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void write_to_result(int fixtime, int popsizecounter, int replicatecounter,
                     int *raw_results) {
  int results_place;
  results_place = (popsizecounter * 10) + replicatecounter;
  raw_results[results_place] = fixtime;
  printf(" Fixation happened in %d generations", fixtime);
  return;
}


x86 assembly (clang, -O0):
<write_to_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
imul   $0xa,-0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x4(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_to_result>:
mov    %edi,%eax
lea    (%rsi,%rsi,4),%esi
lea    (%rdx,%rsi,2),%edx
movslq %edx,%rdx
mov    %edi,(%rcx,%rdx,4)
lea    0xedb(%rip),%rdi
mov    %eax,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [37 x i8] c" Fixation happened in %d generations\00"
define void @write_to_result(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%10 = load i32, i32* %6
%11 = mul nsw i32 %10, 10
%12 = load i32, i32* %7
%13 = add nsw i32 %11, %12
store i32 %13, i32* %9
%14 = load i32, i32* %5
%15 = load i32*, i32** %8
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
store i32 %14, i32* %18
%19 = load i32, i32* %5
%20 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c" Fixation happened in %d generations\00"
define void @write_to_result(i32 %0, i32 %1, i32 %2, i32* nocapture writeonly %3) {
%5 = mul nsw i32 %1, 10
%6 = add nsw i32 %5, %2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %3, i64 %7
store i32 %0, i32* %8
%9 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Baz(int /*<<< orphan*/);
void mumble(void) {
  for (;;)
    Baz(0);
}


x86 assembly (clang, -O0):
<mumble>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <mumble+0x9>
xor    %edi,%edi
call   1030 <Baz@plt>
jmp    1119 <mumble+0x9>

x86 assembly (clang, -O2):
<mumble>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <Baz@plt>
jmp    1120 <mumble+0x10>

LLVM IR (-O0):
define void @mumble() {
br label %1
1: ; preds = %1, %0
%2 = call i32 @Baz(i32 0)
br label %1
}

LLVM IR (-O2):
define void @mumble() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @Baz(i32 0)
br label %1
}
/* Variables and functions */
char *five_roman();
scalar_t__ strcmp(char const *, char *);
char *test_five_roman() {
  const char *out = five_roman();
  do {
    if (strcmp(out, "V"))
      return "error, five_roman != V";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_five_roman>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <five_roman@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     115d <test_five_roman+0x3d>
lea    0xeac(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116a <test_five_roman+0x4a>
jmp    1162 <test_five_roman+0x42>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_five_roman>:
push   %rax
xor    %eax,%eax
call   1040 <five_roman@plt>
lea    0xee6(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
lea    0xebf(%rip),%rcx
cmovne %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"V\00"
@.str.1 = [23 x i8] c"error, five_roman != V\00"
define i8* @test_five_roman() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* (...) @five_roman()
store i8* %3, i8** %2
br label %4
4: ; preds = %0
%5 = load i8*, i8** %2
%6 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %11
9: ; preds = %4
br label %10
10: ; preds = %9
store i8* null, i8** %1
br label %11
11: ; preds = %10, %8
%12 = load i8*, i8** %1
ret i8* %12
}

LLVM IR (-O2):
@.str = [2 x i8] c"V\00"
@.str.1 = [23 x i8] c"error, five_roman != V\00"
define i8* @test_five_roman() {
%1 = tail call i8* (...) @five_roman()
%2 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* null, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0)
ret i8* %4
}
/* Variables and functions */
long EthernetPacketPutInternal(unsigned long, unsigned char *, long);
long EthernetPacketPutNonBlocking(unsigned long ulBase, unsigned char *pucBuf,
                                  long lBufLen) {
  ;
  ;
  ;
  if ((*((volatile unsigned long *)(ulBase + 0x00000038))) & 0x00000001) {
    return (0);
  }
  return (EthernetPacketPutInternal(ulBase, pucBuf, lBufLen));
}


x86 assembly (clang, -O0):
<EthernetPacketPutNonBlocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1147 <EthernetPacketPutNonBlocking+0x37>
movq   $0x0,-0x8(%rbp)
jmp    115c <EthernetPacketPutNonBlocking+0x4c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <EthernetPacketPutInternal@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EthernetPacketPutNonBlocking>:
mov    0x38(%rdi),%rax
test   $0x1,%al
jne    111d <EthernetPacketPutNonBlocking+0xd>
jmp    1030 <EthernetPacketPutInternal@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @EthernetPacketPutNonBlocking(i64 %0, i8* %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i64
store i64 %0, i64* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%8 = load i64, i64* %5
%9 = add i64 %8, 56
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
%12 = and i64 %11, 1
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %3
store i64 0, i64* %4
br label %20
15: ; preds = %3
%16 = load i64, i64* %5
%17 = load i8*, i8** %6
%18 = load i64, i64* %7
%19 = call i64 @EthernetPacketPutInternal(i64 %16, i8* %17, i64 %18)
store i64 %19, i64* %4
br label %20
20: ; preds = %15, %14
%21 = load i64, i64* %4
ret i64 %21
}

LLVM IR (-O2):
define i64 @EthernetPacketPutNonBlocking(i64 %0, i8* %1, i64 %2) {
%4 = add i64 %0, 56
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, 1
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = tail call i64 @EthernetPacketPutInternal(i64 %0, i8* %1, i64 %2)
br label %11
11: ; preds = %3, %9
%12 = phi i64 [ %10, %9 ], [ 0, %3 ]
ret i64 %12
}
int gpiochip_sysfs_register(struct gpio_device *gdev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.gpio_device = type opaque
define i32 @gpiochip_sysfs_register(%struct.gpio_device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ parser_destroy();
int destroy_tests(void) {
  parser_destroy();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @destroy_tests() {
%1 = call i32 (...) @parser_destroy()
ret i32 0
}

LLVM IR (-O2):
define i32 @destroy_tests() {
%1 = tail call i32 (...) @parser_destroy()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
char *stripn(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
char *strn(int64_t k, int64_t n) { return stripn(k, n, 0); }


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

x86 assembly (clang, -O2):
<strn>:
xor    %edx,%edx
jmp    1030 <stripn@plt>

LLVM IR (-O0):
define i8* @strn(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 = call i8* @stripn(i32 %5, i32 %6, i32 0)
ret i8* %7
}

LLVM IR (-O2):
define i8* @strn(i32 %0, i32 %1) {
%3 = tail call i8* @stripn(i32 %0, i32 %1, i32 0)
ret i8* %3
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int end_line(const char *line) {
  if (strcmp(line + 10, " _end\n") == 0)
    return 1;
  else if (strcmp(line + 18, " _end\n") == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<end_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0xa,%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1146 <end_line+0x36>
movl   $0x1,-0x4(%rbp)
jmp    117c <end_line+0x6c>
mov    -0x10(%rbp),%rdi
add    $0x12,%rdi
lea    0xeab(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1170 <end_line+0x60>
movl   $0x1,-0x4(%rbp)
jmp    117c <end_line+0x6c>
jmp    1175 <end_line+0x65>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_line>:
push   %rbx
mov    %rdi,%rbx
add    $0xa,%rdi
lea    0xee1(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1149 <end_line+0x39>
add    $0x12,%rbx
lea    0xecc(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c" _end\0A\00"
define i32 @end_line(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 10
%3 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 18
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ 1, %1 ], [ %9, %5 ]
ret i32 %11
}