xunge/DecIR huggingface dataset:
const char *fpp_config_get_plugin_mime_type(void) {
  return "application/x-freshwrapper-libpdf-so::libpdf renderer";
}


x86 assembly (clang, -O0):
<fpp_config_get_plugin_mime_type>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpp_config_get_plugin_mime_type>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [54 x i8] c"application/x-freshwrapper-libpdf-so::libpdf renderer\00"
define i8* @fpp_config_get_plugin_mime_type() {
ret i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [54 x i8] c"application/x-freshwrapper-libpdf-so::libpdf renderer\00"
define i8* @fpp_config_get_plugin_mime_type() {
ret i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0)
}
void rop3_165_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = T ^ *D;
  stk1 = ~stk1;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_165_0_0>:
xor    (%rdi),%dl
not    %dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_165_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %6
%9 = zext i8 %8 to i32
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = xor i32 %9, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
%15 = load i8, i8* %7
%16 = zext i8 %15 to i32
%17 = xor i32 %16, -1
%18 = trunc i32 %17 to i8
store i8 %18, i8* %7
%19 = load i8, i8* %7
%20 = load i8*, i8** %4
store i8 %19, i8* %20
ret void
}

LLVM IR (-O2):
define void @rop3_165_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = xor i8 %5, -1
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int RSA2048_load(int, char *, unsigned char *, int);
int RSA2048_load_prikey_dQ(int fd, unsigned char *RSA2048_dQ) {
  int ret;
  ret = RSA2048_load(fd, "BF51028480", RSA2048_dQ, 128);
  if (ret != 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<RSA2048_load_prikey_dQ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rsi
mov    $0x80,%ecx
call   1030 <RSA2048_load@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1150 <RSA2048_load_prikey_dQ+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1157 <RSA2048_load_prikey_dQ+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RSA2048_load_prikey_dQ>:
push   %rax
mov    %rsi,%rdx
lea    0xee5(%rip),%rsi
mov    $0x80,%ecx
call   1030 <RSA2048_load@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"BF51028480\00"
define i32 @RSA2048_load_prikey_dQ(i32 %0, i8* %1) {
%3 = tail call i32 @RSA2048_load(i32 %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1, i32 128)
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: file ...\n");
  exit(2);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"usage: file ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ a_writelock(int /*<<< orphan*/, int /*<<< orphan*/);
void b_writelock(void) { a_writelock(0, 0); }


x86 assembly (clang, -O0):
<b_writelock>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <a_writelock@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_writelock>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <a_writelock@plt>

LLVM IR (-O0):
define void @b_writelock() {
%1 = call i32 @a_writelock(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @b_writelock() {
%1 = tail call i32 @a_writelock(i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_genrand(int);
int time(int /*<<< orphan*/ *);
void sg_srandom_time_10() { init_genrand(time(NULL) / 600); }


x86 assembly (clang, -O0):
<sg_srandom_time_10>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    $0x258,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <init_genrand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sg_srandom_time_10>:
push   %rax
xor    %edi,%edi
call   1030 <time@plt>
cltq
imul   $0x1b4e81b5,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x26,%rdi
add    %eax,%edi
pop    %rax
jmp    1040 <init_genrand@plt>

LLVM IR (-O0):
define void @sg_srandom_time_10() {
%1 = call i32 @time(i32* null)
%2 = sdiv i32 %1, 600
%3 = call i32 @init_genrand(i32 %2)
ret void
}

LLVM IR (-O2):
define void @sg_srandom_time_10() {
%1 = tail call i32 @time(i32* null)
%2 = sdiv i32 %1, 600
%3 = tail call i32 @init_genrand(i32 %2)
ret void
}
void vecscalarmult(float u[], float v[], float f) {
  u[0] = v[0] * f;
  u[1] = v[1] * f;
  u[2] = v[2] * f;
}


x86 assembly (clang, -O0):
<vecscalarmult>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vecscalarmult>:
movss  (%rsi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rsi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rdi)
mulss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @vecscalarmult(float* nocapture writeonly %0, float* nocapture %1, float %2) {
%4 = load float, float* %1
%5 = fmul float %4, %2
store float %5, float* %0
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = fmul float %7, %2
%9 = getelementptr inbounds float, float* %0, i64 1
store float %8, float* %9
%10 = getelementptr inbounds float, float* %1, i64 2
%11 = load float, float* %10
%12 = fmul float %11, %2
%13 = getelementptr inbounds float, float* %0, i64 2
store float %12, float* %13
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fail_and_exit();
void *malloc(size_t);
void *cc_malloc(size_t size) {
  void *memory = malloc(size);
  if (!memory)
    fail_and_exit();
  ;
  return memory;
}


x86 assembly (clang, -O0):
<cc_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114b <cc_malloc+0x2b>
mov    $0x0,%al
call   1030 <fail_and_exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc_malloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <cc_malloc+0x15>
xor    %eax,%eax
call   1030 <fail_and_exit@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @cc_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @fail_and_exit()
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void release(int *_lock) { *_lock = 0; }


x86 assembly (clang, -O0):
<release>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<release>:
movl   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @release(i32* nocapture writeonly %0) {
store i32 0, i32* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256;

/* Variables and functions */
int /*<<< orphan*/ _mm256_div_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm256_hadd_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm256_mul_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm256_shuffle_ps(int /*<<< orphan*/, int /*<<< orphan*/,
                                     int);
int /*<<< orphan*/ _mm256_sqrt_ps(int /*<<< orphan*/);
__m256 _mm256_complexnormalise_ps(__m256 z) {
  __m256 tmp1 = _mm256_mul_ps(z, z);
  __m256 tmp2 = _mm256_hadd_ps(tmp1, tmp1);
  tmp1 = _mm256_shuffle_ps(tmp2, tmp2, 0xD8);
  tmp2 = _mm256_sqrt_ps(tmp1);
  return _mm256_div_ps(z, tmp2);
}


x86 assembly (clang, -O0):
<_mm256_complexnormalise_ps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <_mm256_mul_ps@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <_mm256_hadd_ps@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0xd8,%edx
call   1060 <_mm256_shuffle_ps@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1070 <_mm256_sqrt_ps@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <_mm256_div_ps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm256_complexnormalise_ps>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%esi
call   1050 <_mm256_mul_ps@plt>
mov    %eax,%edi
mov    %eax,%esi
call   1040 <_mm256_hadd_ps@plt>
mov    %eax,%edi
mov    %eax,%esi
mov    $0xd8,%edx
call   1060 <_mm256_shuffle_ps@plt>
mov    %eax,%edi
call   1070 <_mm256_sqrt_ps@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <_mm256_div_ps@plt>

LLVM IR (-O0):
define i32 @_mm256_complexnormalise_ps(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @_mm256_mul_ps(i32 %5, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @_mm256_hadd_ps(i32 %8, i32 %9)
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %4
%13 = call i32 @_mm256_shuffle_ps(i32 %11, i32 %12, i32 216)
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = call i32 @_mm256_sqrt_ps(i32 %14)
store i32 %15, i32* %4
%16 = load i32, i32* %2
%17 = load i32, i32* %4
%18 = call i32 @_mm256_div_ps(i32 %16, i32 %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @_mm256_complexnormalise_ps(i32 %0) {
%2 = tail call i32 @_mm256_mul_ps(i32 %0, i32 %0)
%3 = tail call i32 @_mm256_hadd_ps(i32 %2, i32 %2)
%4 = tail call i32 @_mm256_shuffle_ps(i32 %3, i32 %3, i32 216)
%5 = tail call i32 @_mm256_sqrt_ps(i32 %4)
%6 = tail call i32 @_mm256_div_ps(i32 %0, i32 %5)
ret i32 %6
}
int read_data_soil() {}


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

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

LLVM IR (-O0):
define i32 @read_data_soil() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @read_data_soil() {
ret i32 undef
}
/* Type definitions */
struct timespec {
  long tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
void ap_utils_timespec_clear(struct timespec *ts) {
  ts->tv_nsec = 0l;
  ts->tv_sec = 0;
}


x86 assembly (clang, -O0):
<ap_utils_timespec_clear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_utils_timespec_clear>:
xorps  %xmm0,%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define void @ap_utils_timespec_clear(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i64 0, i64* %4
%5 = load %struct.timespec*, %struct.timespec** %2
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 1
store i64 0, i64* %6
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define void @ap_utils_timespec_clear(%struct.timespec* nocapture writeonly %0) {
%2 = bitcast %struct.timespec* %0 to i8*
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t bytes_to_kbits(uint64_t bytes) { return bytes * 8 / 1000; }


x86 assembly (clang, -O0):
<bytes_to_kbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes_to_kbits>:
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x23,%rax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @bytes_to_kbits(i32 %0) {
%2 = sdiv i32 %0, 125
ret i32 %2
}
void vscale(double *v, double div) {
  v[0] *= div;
  v[1] *= div;
  v[2] *= div;
}


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

x86 assembly (clang, -O2):
<vscale>:
movupd (%rdi),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,(%rdi)
mulsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @vscale(double* nocapture %0, double %1) {
%3 = bitcast double* %0 to <2 x double>*
%4 = load <2 x double>, <2 x double>* %3
%5 = insertelement <2 x double> poison, double %1, i64 0
%6 = shufflevector <2 x double> %5, <2 x double> poison, <2 x i32> zeroinitializer
%7 = fmul <2 x double> %4, %6
%8 = bitcast double* %0 to <2 x double>*
store <2 x double> %7, <2 x double>* %8
%9 = getelementptr inbounds double, double* %0, i64 2
%10 = load double, double* %9
%11 = fmul double %10, %1
store double %11, double* %9
ret void
}
int cmd_quit() { return -1; }


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

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

LLVM IR (-O0):
define i32 @cmd_quit() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @cmd_quit() {
ret i32 -1
}
/* Type definitions */
typedef int int32_t;
typedef int int16_t;
typedef scalar_t__ i;

/* Variables and functions */
int16_t avg15(int16_t i, int16_t j) {
  return ((int32_t)((int32_t)(i) + (int32_t)(j)) >> 1) + (i & 0x1);
}


x86 assembly (clang, -O0):
<avg15>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<avg15>:
lea    (%rsi,%rdi,1),%eax
sar    %eax
and    $0x1,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @avg15(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 = add nsw i32 %5, %6
%8 = ashr i32 %7, 1
%9 = load i32, i32* %3
%10 = and i32 %9, 1
%11 = add nsw i32 %8, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @avg15(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = ashr i32 %3, 1
%5 = and i32 %0, 1
%6 = add nsw i32 %4, %5
ret i32 %6
}
int test_imm_A3int64_highword_reg(long long val) {
  return ((val >> 32) & (0xA3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A3int64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x20,%rdx
and    $0xa3,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A3int64_highword_reg>:
movabs $0xa300000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A3int64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 163
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_A3int64_highword_reg(i64 %0) {
%2 = and i64 %0, 700079669248
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void av_probe_input_format3() {}


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

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

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

LLVM IR (-O2):
define void @av_probe_input_format3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ myprint1(char *);
int /*<<< orphan*/ myprint2(char *);
int main() {
  myprint1("hello");
  myprint2("world");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <myprint1@plt>
lea    0xec4(%rip),%rdi
call   1030 <myprint2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
@.str.1 = [6 x i8] c"world\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @myprint1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @myprint2(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
@.str.1 = [6 x i8] c"world\00"
define i32 @main() {
%1 = tail call i32 @myprint1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @myprint2(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ GetYesOrNo();
int /*<<< orphan*/ playOneGame();
int main(int argc, const char *argv[]) {
  while (1) {
    playOneGame();
    if (!GetYesOrNo())
      break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <playOneGame@plt>
mov    $0x0,%al
call   1030 <GetYesOrNo@plt>
cmp    $0x0,%eax
jne    1152 <main+0x32>
jmp    1157 <main+0x37>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <playOneGame@plt>
xor    %eax,%eax
call   1030 <GetYesOrNo@plt>
test   %eax,%eax
jne    1130 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 (...) @playOneGame()
%5 = tail call i32 (...) @GetYesOrNo()
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("\nusage: rmdir (/path/to/DIR)\n\n"); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"\0Ausage: rmdir (/path/to/DIR)\0A\0A\00"
define void @usage() {
%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"\0Ausage: rmdir (/path/to/DIR)\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
void g_value_take_string() {}


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

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

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

LLVM IR (-O2):
define void @g_value_take_string() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(stderr, "Usage: gpmakefsa [-opwa d/s] [-opgm d/s] [-ip d/s[dr]]\n");
  fprintf(stderr, "\t\t [-silent] [-v] [-l/-h] [-diff1/-diff2] [-m maxeqns]\n");
  fprintf(stderr,
          "\t\t [-mwd maxwdiffs] [-ns] [-f] [-cos] groupname [cosname].\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"Usage: gpmakefsa [-opwa d/s] [-opgm d/s] [-ip d/s[dr]]\0A\00"
@.str.1 = [56 x i8] c"\09\09 [-silent] [-v] [-l/-h] [-diff1/-diff2] [-m maxeqns]\0A\00"
@.str.2 = [60 x i8] c"\09\09 [-mwd maxwdiffs] [-ns] [-f] [-cos] groupname [cosname].\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"Usage: gpmakefsa [-opwa d/s] [-opgm d/s] [-ip d/s[dr]]\0A\00"
@.str.1 = [56 x i8] c"\09\09 [-silent] [-v] [-l/-h] [-diff1/-diff2] [-m maxeqns]\0A\00"
@.str.2 = [60 x i8] c"\09\09 [-mwd maxwdiffs] [-ns] [-f] [-cos] groupname [cosname].\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
}
void RTAvloIOPortInsert(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvloIOPortInsert() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
int dec(int c) {
  if (c >= '0' && c <= '9')
    return c - '0';
  die("invalid quantifier");
  return 0;
}


x86 assembly (clang, -O0):
<dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     113d <dec+0x2d>
cmpl   $0x39,-0x8(%rbp)
jg     113d <dec+0x2d>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1150 <dec+0x40>
lea    0xebc(%rip),%rdi
call   1030 <die@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec>:
mov    %edi,%eax
add    $0xffffffd0,%eax
cmp    $0xa,%eax
jb     112d <dec+0x1d>
push   %rax
lea    0xede(%rip),%rdi
call   1030 <die@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"invalid quantifier\00"
define i32 @dec(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 48
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = call i32 @die(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [19 x i8] c"invalid quantifier\00"
define i32 @dec(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ %2, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ prussdrv_pru_clear_event(unsigned int, unsigned int);
int /*<<< orphan*/ prussdrv_pru_send_event(unsigned int);
int /*<<< orphan*/ prussdrv_pru_wait_event(unsigned int);
int prussdrv_pru_send_wait_clear_event(unsigned int send_eventnum,
                                       unsigned int host_interrupt,
                                       unsigned int ack_eventnum) {
  prussdrv_pru_send_event(send_eventnum);
  prussdrv_pru_wait_event(host_interrupt);
  prussdrv_pru_clear_event(host_interrupt, ack_eventnum);
  return 0;
}


x86 assembly (clang, -O0):
<prussdrv_pru_send_wait_clear_event>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <prussdrv_pru_send_event@plt>
mov    -0x8(%rbp),%edi
call   1040 <prussdrv_pru_wait_event@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <prussdrv_pru_clear_event@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prussdrv_pru_send_wait_clear_event>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <prussdrv_pru_send_event@plt>
mov    %ebp,%edi
call   1040 <prussdrv_pru_wait_event@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <prussdrv_pru_clear_event@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @prussdrv_pru_send_wait_clear_event(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i32 @prussdrv_pru_send_event(i32 %7)
%9 = load i32, i32* %5
%10 = call i32 @prussdrv_pru_wait_event(i32 %9)
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = call i32 @prussdrv_pru_clear_event(i32 %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @prussdrv_pru_send_wait_clear_event(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @prussdrv_pru_send_event(i32 %0)
%5 = tail call i32 @prussdrv_pru_wait_event(i32 %1)
%6 = tail call i32 @prussdrv_pru_clear_event(i32 %1, i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ compile_arguments(int, char **);
int /*<<< orphan*/ parse_arguments(int, char **);
void get_arguments(int argc, char *argv[]) {
  parse_arguments(argc, argv);
  compile_arguments(argc, argv);
}


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

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

LLVM IR (-O0):
define void @get_arguments(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @parse_arguments(i32 %5, i8** %6)
%8 = load i32, i32* %3
%9 = load i8**, i8*** %4
%10 = call i32 @compile_arguments(i32 %8, i8** %9)
ret void
}

LLVM IR (-O2):
define void @get_arguments(i32 %0, i8** %1) {
%3 = tail call i32 @parse_arguments(i32 %0, i8** %1)
%4 = tail call i32 @compile_arguments(i32 %0, i8** %1)
ret void
}
void nseel_asm_beloweq_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_beloweq_end() {
ret void
}
/* Type definitions */
struct Projectile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ destroy(struct Projectile *);
void projectile_destroy(struct Projectile *prj) { destroy(prj); }


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

x86 assembly (clang, -O2):
<projectile_destroy>:
jmp    1030 <destroy@plt>

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

LLVM IR (-O2):
%struct.Projectile = type { i32 }
define void @projectile_destroy(%struct.Projectile* %0) {
%2 = tail call i32 @destroy(%struct.Projectile* %0)
ret void
}
void enable_interrupts() { __asm__("sti"); }


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

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

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

LLVM IR (-O2):
define void @enable_interrupts() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void wx11mo(state) int *state;
{}


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

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

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

LLVM IR (-O2):
define void @wx11mo(i32* nocapture %0) {
ret void
}
void lib_ring_buffer_tick_nohz_restart(void) {}


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

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

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

LLVM IR (-O2):
define void @lib_ring_buffer_tick_nohz_restart() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void freeln(char *ln) { free(ln); }


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

x86 assembly (clang, -O2):
<freeln>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeln(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void progress_free(struct progress *p) {}


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

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

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

LLVM IR (-O2):
%struct.progress = type opaque
define void @progress_free(%struct.progress* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
char *itoa(char *p, uint32_t x) {
  p += 11;
  *--p = 0;
  do {
    *--p = '0' + x % 10;
    x /= 10;
  } while (x);
  return p;
}


x86 assembly (clang, -O0):
<itoa>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0xb,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,-0x1(%rax)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,-0x1(%rax)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    112a <itoa+0x2a>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoa>:
mov    %rdi,%rax
movb   $0x0,0xa(%rdi)
add    $0xa,%rax
nopl   0x0(%rax,%rax,1)
movslq %esi,%rcx
imul   $0x66666667,%rcx,%rsi
mov    %rsi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rsi
add    %edx,%esi
lea    (%rsi,%rsi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%edi
sub    %edx,%edi
add    $0x30,%dil
mov    %dil,-0x1(%rax)
add    $0xffffffffffffffff,%rax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <itoa+0x10>
ret

LLVM IR (-O0):
define i8* @itoa(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 = getelementptr inbounds i8, i8* %5, i64 11
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i32 -1
store i8* %8, i8** %3
store i8 0, i8* %8
br label %9
9: ; preds = %18, %2
%10 = load i32, i32* %4
%11 = srem i32 %10, 10
%12 = add nsw i32 48, %11
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i32 -1
store i8* %15, i8** %3
store i8 %13, i8* %15
%16 = load i32, i32* %4
%17 = sdiv i32 %16, 10
store i32 %17, i32* %4
br label %18
18: ; preds = %9
%19 = load i32, i32* %4
%20 = icmp ne i32 %19, 0
br i1 %20, label %9, label %21
21: ; preds = %18
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @itoa(i8* writeonly %0, i32 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 10
store i8 0, i8* %3
br label %4
4: ; preds = %4, %2
%5 = phi i8* [ %3, %2 ], [ %10, %4 ]
%6 = phi i32 [ %1, %2 ], [ %11, %4 ]
%7 = srem i32 %6, 10
%8 = trunc i32 %7 to i8
%9 = add nsw i8 %8, 48
%10 = getelementptr inbounds i8, i8* %5, i64 -1
store i8 %9, i8* %10
%11 = sdiv i32 %6, 10
%12 = add i32 %6, 9
%13 = icmp ult i32 %12, 19
br i1 %13, label %14, label %4
14: ; preds = %4
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ my_puterr(char *);
int print_param_error(char *str) {
  my_puterr("\033[31mInvalid value after ");
  my_puterr(str);
  my_puterr(" operator\033[0m\n");
  return (1);
}


x86 assembly (clang, -O0):
<print_param_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <my_puterr@plt>
mov    -0x8(%rbp),%rdi
call   1030 <my_puterr@plt>
lea    0xee2(%rip),%rdi
call   1030 <my_puterr@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_param_error>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <my_puterr@plt>
mov    %rbx,%rdi
call   1030 <my_puterr@plt>
lea    0xeeb(%rip),%rdi
call   1030 <my_puterr@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"\1B[31mInvalid value after \00"
@.str.1 = [15 x i8] c" operator\1B[0m\0A\00"
define i32 @print_param_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @my_puterr(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @my_puterr(i8* %4)
%6 = call i32 @my_puterr(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [26 x i8] c"\1B[31mInvalid value after \00"
@.str.1 = [15 x i8] c" operator\1B[0m\0A\00"
define i32 @print_param_error(i8* %0) {
%2 = tail call i32 @my_puterr(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @my_puterr(i8* %0)
%4 = tail call i32 @my_puterr(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}
hash(p) register char *p;
{
  register unsigned short h;
  register c;
  h = 0;
  while (c = *p++) {
    h <<= 2;
    h += c;
  }
  return (h % 307);
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     1149 <hash+0x49>
movzwl -0xa(%rbp),%eax
shl    $0x2,%eax
mov    %ax,-0xa(%rbp)
mov    -0x10(%rbp),%ecx
movzwl -0xa(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0xa(%rbp)
jmp    110e <hash+0xe>
movzwl -0xa(%rbp),%eax
mov    $0x133,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%al
test   %al,%al
je     113c <hash+0x3c>
add    $0x1,%rdi
xor    %edx,%edx
nopl   0x0(%rax)
movsbl %al,%eax
lea    (%rax,%rdx,4),%ecx
movzwl %cx,%edx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hash+0x10>
movzwl %cx,%eax
imul   $0xd579,%eax,%eax
shr    $0x18,%eax
imul   $0x133,%eax,%eax
sub    %eax,%ecx
movzwl %cx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %19, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %12, %4 ], [ 0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = shl nuw nsw i32 %7, 2
%11 = add nsw i32 %10, %8
%12 = and i32 %11, 65535
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4
%16 = trunc i32 %11 to i16
%17 = urem i16 %16, 307
%18 = zext i16 %17 to i32
br label %19
19: ; preds = %15, %1
%20 = phi i32 [ 0, %1 ], [ %18, %15 ]
ret i32 %20
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn47() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn47");
  return result;
}


x86 assembly (clang, -O0):
<fn47>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn47>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn47\00"
define i8* @fn47() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn47\00"
define i8* @fn47() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
double opr_stdT(struct lifo *stack) { return 273.15; }


x86 assembly (clang, -O0):
<opr_stdT>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  0xef0(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<opr_stdT>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
%struct.lifo = type opaque
define double @opr_stdT(%struct.lifo* %0) {
%2 = alloca %struct.lifo*
store %struct.lifo* %0, %struct.lifo** %2
ret double 2.731500e+02
}

LLVM IR (-O2):
%struct.lifo = type opaque
define double @opr_stdT(%struct.lifo* nocapture readnone %0) {
ret double 2.731500e+02
}
/* Variables and functions */
int /*<<< orphan*/ mcp2515_init();
void configCanBus(void) { mcp2515_init(); }


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

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

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

LLVM IR (-O2):
define void @configCanBus() {
%1 = tail call i32 (...) @mcp2515_init()
ret void
}
/* Variables and functions */
int check_strict_monotonicity(double *, int);
int test3() {
  double arr[] = {0.0};
  int n = 1;
  int i = check_strict_monotonicity(arr, n);
  return (i == 1);
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
movl   $0x1,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <check_strict_monotonicity@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <check_strict_monotonicity@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test3() {
%1 = alloca [1 x double]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [1 x double]* %1 to i8*
store i32 1, i32* %2
%5 = getelementptr inbounds [1 x double], [1 x double]* %1, i64 0, i64 0
%6 = load i32, i32* %2
%7 = call i32 @check_strict_monotonicity(double* %5, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @test3() {
%1 = alloca [1 x double]
%2 = bitcast [1 x double]* %1 to i8*
%3 = bitcast [1 x double]* %1 to i64*
store i64 0, i64* %3
%4 = getelementptr inbounds [1 x double], [1 x double]* %1, i64 0, i64 0
%5 = call i32 @check_strict_monotonicity(double* %4, i32 1)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
ret i32 %7
}