xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ CERTIFICATEPOLICIES;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ CERTIFICATEPOLICIES_it;
int i2d_CERTIFICATEPOLICIES(CERTIFICATEPOLICIES *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &CERTIFICATEPOLICIES_it);
}


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

x86 assembly (clang, -O2):
<i2d_CERTIFICATEPOLICIES>:
mov    0x2ec9(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

LLVM IR (-O0):
@CERTIFICATEPOLICIES_it = global i32 0
define i32 @i2d_CERTIFICATEPOLICIES(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 @ASN1_item_i2d(i32* %5, i8** %6, i32* @CERTIFICATEPOLICIES_it)
ret i32 %7
}

LLVM IR (-O2):
@CERTIFICATEPOLICIES_it = global i32 0
define i32 @i2d_CERTIFICATEPOLICIES(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @CERTIFICATEPOLICIES_it)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
int /*<<< orphan*/ die(char *);
scalar_t__ time(int /*<<< orphan*/ *);
time_t sTime(void) {
  time_t current_time = time(NULL);
  if (current_time == (time_t)-1) {
    die("failed to determine current time");
  }
  return current_time;
}


x86 assembly (clang, -O0):
<sTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0xffffffffffffffff,-0x8(%rbp)
jne    114c <sTime+0x2c>
lea    0xeb9(%rip),%rdi
call   1040 <die@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sTime>:
push   %rbx
xor    %edi,%edi
call   1030 <time@plt>
mov    %rax,%rbx
cmp    $0xffffffffffffffff,%rax
jne    113d <sTime+0x1d>
lea    0xec8(%rip),%rdi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"failed to determine current time\00"
define i64 @sTime() {
%1 = alloca i64
%2 = call i64 @time(i32* null)
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = icmp eq i64 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load i64, i64* %1
ret i64 %8
}

LLVM IR (-O2):
@.str = [33 x i8] c"failed to determine current time\00"
define i64 @sTime() {
%1 = tail call i64 @time(i32* null)
%2 = icmp eq i64 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i64 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t __ptr_hash(void *k) {
  void *p = *(void **)k;
  return (uint32_t)(unsigned long long)p;
}


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

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

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

LLVM IR (-O2):
define i32 @__ptr_hash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef char *int64_t;

/* Variables and functions */
int64_t aeron_counter_get_volatile(volatile int64_t *addr) {
  int64_t value;
  do {
    value = *addr;
    __asm__ volatile("" ::: "memory");
  } while (0);
  return value;
}


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

x86 assembly (clang, -O2):
<aeron_counter_get_volatile>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
define i8* @aeron_counter_get_volatile(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
br label %4
4: ; preds = %1
%5 = load i8**, i8*** %2
%6 = load volatile i8*, i8** %5
store i8* %6, i8** %3
br label %7
7: ; preds = %4
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @aeron_counter_get_volatile(i8** %0) {
%2 = load volatile i8*, i8** %0
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret i8* %2
}
/* Variables and functions */
scalar_t__ table_begin(void *);
scalar_t__ table_end(void *);
int table_empty(void *T) { return (table_begin(T) == table_end(T)); }


x86 assembly (clang, -O0):
<table_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <table_begin@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <table_end@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<table_empty>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <table_begin@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <table_end@plt>
xor    %ecx,%ecx
cmp    %rax,%r14
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @table_empty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @table_begin(i8* %3)
%5 = load i8*, i8** %2
%6 = call i64 @table_end(i8* %5)
%7 = icmp eq i64 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @table_empty(i8* %0) {
%2 = tail call i64 @table_begin(i8* %0)
%3 = tail call i64 @table_end(i8* %0)
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
__attribute__((__target__("sse4.2,popcnt"))) void
__cyg_profile_func_exit(void *func __attribute__((unused)),
                        void *caller __attribute__((unused))) {
  return;
}


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

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

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

LLVM IR (-O2):
define void @__cyg_profile_func_exit(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  (void)fprintf(stderr, "Usage: mlcd [-abcd] image\n");
  exit(1);
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ds2protect_() {
%1 = tail call i32 (...) @ds2protect()
ret void
}
/* Variables and functions */
float strtof(char const *, char **);
float trio_to_float(const char *source, char **endp) {
  return strtof(source, endp);
}


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

x86 assembly (clang, -O2):
<trio_to_float>:
jmp    1030 <strtof@plt>

LLVM IR (-O0):
define float @trio_to_float(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 = call float @strtof(i8* %5, i8** %6)
ret float %7
}

LLVM IR (-O2):
define float @trio_to_float(i8* %0, i8** nocapture %1) {
%3 = tail call float @strtof(i8* %0, i8** %1)
ret float %3
}
float Quart__easeOut(float t, float b, float c, float d, float p0, float p1) {
  return -c * ((t = t / d - 1) * t * t * t - 1) + b;
}


x86 assembly (clang, -O0):
<Quart__easeOut>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x4(%rbp),%xmm2
divss  -0x10(%rbp),%xmm2
movss  0xebe(%rip),%xmm1
subss  %xmm1,%xmm2
movss  %xmm2,-0x4(%rbp)
mulss  -0x4(%rbp),%xmm2
mulss  -0x4(%rbp),%xmm2
movss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm2
movss  0xe96(%rip),%xmm1
addss  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Quart__easeOut>:
divss  %xmm3,%xmm0
movss  0xef4(%rip),%xmm3
addss  %xmm3,%xmm0
movaps %xmm0,%xmm4
mulss  %xmm0,%xmm4
mulss  %xmm0,%xmm4
mulss  %xmm0,%xmm4
addss  %xmm3,%xmm4
mulss  %xmm2,%xmm4
subss  %xmm4,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Quart__easeOut(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %9
%14 = fneg float %13
%15 = load float, float* %7
%16 = load float, float* %10
%17 = fdiv float %15, %16
%18 = fsub float %17, 1.000000e+00
store float %18, float* %7
%19 = load float, float* %7
%20 = fmul float %18, %19
%21 = load float, float* %7
%22 = fmul float %20, %21
%23 = load float, float* %7
%24 = call float @llvm.fmuladd.f32(float %22, float %23, float -1.000000e+00)
%25 = load float, float* %8
%26 = call float @llvm.fmuladd.f32(float %14, float %24, float %25)
ret float %26
}

LLVM IR (-O2):
define float @Quart__easeOut(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fneg float %2
%8 = fdiv float %0, %3
%9 = fadd float %8, -1.000000e+00
%10 = fmul float %9, %9
%11 = fmul float %9, %10
%12 = tail call float @llvm.fmuladd.f32(float %11, float %9, float -1.000000e+00)
%13 = tail call float @llvm.fmuladd.f32(float %7, float %12, float %1)
ret float %13
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ *create_win(int, int, int, int);
WINDOW *create_wscore() { return create_win(20, 12, 3 + 10, 38 + 32); }


x86 assembly (clang, -O0):
<create_wscore>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
mov    $0xc,%esi
mov    $0xd,%edx
mov    $0x46,%ecx
call   1030 <create_win@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_wscore>:
mov    $0x14,%edi
mov    $0xc,%esi
mov    $0xd,%edx
mov    $0x46,%ecx
jmp    1030 <create_win@plt>

LLVM IR (-O0):
define i32* @create_wscore() {
%1 = call i32* @create_win(i32 20, i32 12, i32 13, i32 70)
ret i32* %1
}

LLVM IR (-O2):
define i32* @create_wscore() {
%1 = tail call i32* @create_win(i32 20, i32 12, i32 13, i32 70)
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ getLine(char *, int);
int /*<<< orphan*/ printDate(char *);
int /*<<< orphan*/ printf(char *);
int main() {
  char dateEntered[11];
  printf("Enter date to convert in yankee format (MM/DD/YYYY): ");
  getLine(dateEntered, 11);
  printDate(dateEntered);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    -0xf(%rbp),%rdi
mov    $0xb,%esi
call   1050 <getLine@plt>
lea    -0xf(%rbp),%rdi
call   1040 <printDate@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0x5(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xb,%esi
call   1050 <getLine@plt>
mov    %rbx,%rdi
call   1040 <printDate@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [54 x i8] c"Enter date to convert in yankee format (MM/DD/YYYY): \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%5 = call i32 @getLine(i8* %4, i32 11)
%6 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%7 = call i32 @printDate(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [54 x i8] c"Enter date to convert in yankee format (MM/DD/YYYY): \00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @getLine(i8* %2, i32 11)
%5 = call i32 @printDate(i8* %2)
ret i32 0
}
char *hb_energy_get_source_odroidxue(void) {
  return "ODROID-XU+E Power Sensors (A15, A7, MEM, GPU)";
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"ODROID-XU+E Power Sensors (A15, A7, MEM, GPU)\00"
define i8* @hb_energy_get_source_odroidxue() {
ret i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [46 x i8] c"ODROID-XU+E Power Sensors (A15, A7, MEM, GPU)\00"
define i8* @hb_energy_get_source_odroidxue() {
ret i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ sqrt(float);
float slevmar_stddev(float *covar, int m, int i) {
  return (float)sqrt(covar[i * m + i]);
}


x86 assembly (clang, -O0):
<slevmar_stddev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
call   1030 <sqrt@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slevmar_stddev>:
push   %rax
imul   %edx,%esi
add    %edx,%esi
movslq %esi,%rax
movss  (%rdi,%rax,4),%xmm0
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @slevmar_stddev(float* %0, i32 %1, i32 %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca i32
store float* %0, float** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load float*, float** %4
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = mul nsw i32 %8, %9
%11 = load i32, i32* %6
%12 = add nsw i32 %10, %11
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds float, float* %7, i64 %13
%15 = load float, float* %14
%16 = call i64 @sqrt(float %15)
%17 = sitofp i64 %16 to float
ret float %17
}

LLVM IR (-O2):
define float @slevmar_stddev(float* nocapture %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %1
%5 = add nsw i32 %4, %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds float, float* %0, i64 %6
%8 = load float, float* %7
%9 = tail call i64 @sqrt(float %8)
%10 = sitofp i64 %9 to float
ret float %10
}
unsigned char *get_int32(unsigned char *buffer, int *val) {
  if (val) {
    int myval = (*buffer) + ((*(buffer + 1)) << 8) + ((*(buffer + 2)) << 16) +
                ((*(buffer + 3)) << 24);
    *val = myval;
  }
  return buffer + 4;
}


x86 assembly (clang, -O0):
<get_int32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1151 <get_int32+0x51>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int32>:
mov    %rdi,%rax
test   %rsi,%rsi
je     110c <get_int32+0xc>
mov    (%rax),%ecx
mov    %ecx,(%rsi)
add    $0x4,%rax
ret

LLVM IR (-O0):
define i8* @get_int32(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %32
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = shl i32 %15, 8
%17 = add nsw i32 %11, %16
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 2
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = shl i32 %21, 16
%23 = add nsw i32 %17, %22
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i64 3
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = shl i32 %27, 24
%29 = add nsw i32 %23, %28
store i32 %29, i32* %5
%30 = load i32, i32* %5
%31 = load i32*, i32** %4
store i32 %30, i32* %31
br label %32
32: ; preds = %8, %2
%33 = load i8*, i8** %3
%34 = getelementptr inbounds i8, i8* %33, i64 4
ret i8* %34
}

LLVM IR (-O2):
define i8* @get_int32(i8* %0, i32* writeonly %1) {
%3 = icmp eq i32* %1, null
br i1 %3, label %22, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = zext i8 %5 to i32
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl nuw nsw i32 %9, 8
%11 = or i32 %10, %6
%12 = getelementptr inbounds i8, i8* %0, i64 2
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = shl nuw nsw i32 %14, 16
%16 = or i32 %11, %15
%17 = getelementptr inbounds i8, i8* %0, i64 3
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = shl nuw i32 %19, 24
%21 = or i32 %16, %20
store i32 %21, i32* %1
br label %22
22: ; preds = %4, %2
%23 = getelementptr inbounds i8, i8* %0, i64 4
ret i8* %23
}
/* Variables and functions */
int /*<<< orphan*/ clear_error();
int /*<<< orphan*/ set_error_(char *, int);
scalar_t__ sethostname(char *, int);
void net_sethostname(char *hostname, int len) {
  clear_error();
  if (sethostname(hostname, len) != 0) {
    set_error_("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/LibertyEiffel/Liberty/refs/"
               "heads/master/sys/plugins/net/c/net.c",
               622);
  }
}


x86 assembly (clang, -O0):
<net_sethostname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1050 <clear_error@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <sethostname@plt>
cmp    $0x0,%rax
je     116d <net_sethostname+0x3d>
lea    0xe9d(%rip),%rdi
mov    $0x26e,%esi
call   1040 <set_error_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_sethostname>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <clear_error@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <sethostname@plt>
test   %rax,%rax
je     1165 <net_sethostname+0x35>
lea    0xeab(%rip),%rdi
mov    $0x26e,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <set_error_@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LibertyEiffel/Liberty/refs/heads/master/sys/plugins/net/c/net.c\00"
define void @net_sethostname(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (...) @clear_error()
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i64 @sethostname(i8* %6, i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @set_error_(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 622)
br label %12
12: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LibertyEiffel/Liberty/refs/heads/master/sys/plugins/net/c/net.c\00"
define void @net_sethostname(i8* %0, i32 %1) {
%3 = tail call i32 (...) @clear_error()
%4 = tail call i64 @sethostname(i8* %0, i32 %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @set_error_(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 622)
br label %8
8: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ flockfile(int /*<<< orphan*/ *);
int /*<<< orphan*/ funlockfile(int /*<<< orphan*/ *);
int getc_unlocked(int /*<<< orphan*/ *);
int getc(FILE *file) {
  flockfile(file);
  int result = getc_unlocked(file);
  funlockfile(file);
  return result;
}


x86 assembly (clang, -O0):
<getc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <flockfile@plt>
mov    -0x8(%rbp),%rdi
call   1040 <getc_unlocked@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <funlockfile@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getc>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <flockfile@plt>
mov    %rbx,%rdi
call   1040 <getc_unlocked@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <funlockfile@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @getc(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @flockfile(i32* %4)
%6 = load i32*, i32** %2
%7 = call i32 @getc_unlocked(i32* %6)
store i32 %7, i32* %3
%8 = load i32*, i32** %2
%9 = call i32 @funlockfile(i32* %8)
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @getc(i32* nocapture %0) {
%2 = tail call i32 @flockfile(i32* %0)
%3 = tail call i32 @getc_unlocked(i32* %0)
%4 = tail call i32 @funlockfile(i32* %0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ radio_set_adv_data(int /*<<< orphan*/, int /*<<< orphan*/ *);
void ll_set_adv_data(uint8_t len, uint8_t *data_ptr) {
  radio_set_adv_data(len, data_ptr);
}


x86 assembly (clang, -O0):
<ll_set_adv_data>:
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   1030 <radio_set_adv_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ll_set_adv_data>:
jmp    1030 <radio_set_adv_data@plt>

LLVM IR (-O0):
define void @ll_set_adv_data(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 i32 @radio_set_adv_data(i32 %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @ll_set_adv_data(i32 %0, i32* %1) {
%3 = tail call i32 @radio_set_adv_data(i32 %0, i32* %1)
ret void
}
char *skip(char *p) {
  while (*p == ' ')
    p++;
  while (*p != ' ' && *p != 0)
    p++;
  return p;
}


x86 assembly (clang, -O0):
<skip>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1129 <skip+0x29>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip+0x8>
jmp    112e <skip+0x2e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     1153 <skip+0x53>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1163 <skip+0x63>
jmp    1174 <skip+0x74>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112e <skip+0x2e>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
cmp    $0x20,%cl
je     1110 <skip+0x10>
jmp    1128 <skip+0x28>
nop
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   $0xdf,%cl
jne    1120 <skip+0x20>
ret

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

LLVM IR (-O2):
define i8* @skip(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 32
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2, %10
%8 = phi i8 [ %12, %10 ], [ %4, %2 ]
%9 = phi i8* [ %11, %10 ], [ %3, %2 ]
switch i8 %8, label %10 [
i8 32, label %13
i8 0, label %13
]
10: ; preds = %7
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %11
br label %7
13: ; preds = %7, %7
ret i8* %9
}
/* Variables and functions */
unsigned char jpeg_get_byte();
unsigned short jpeg_get_word(void) {
  unsigned char h, l;
  h = jpeg_get_byte();
  l = jpeg_get_byte();
  return (h << 8) | l;
}


x86 assembly (clang, -O0):
<jpeg_get_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <jpeg_get_byte@plt>
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <jpeg_get_byte@plt>
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jpeg_get_word>:
push   %rbx
xor    %eax,%eax
call   1030 <jpeg_get_byte@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <jpeg_get_byte@plt>
movzbl %bl,%ecx
shl    $0x8,%ecx
movzbl %al,%eax
or     %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @jpeg_get_word() {
%1 = alloca i8
%2 = alloca i8
%3 = call zeroext i8 (...) @jpeg_get_byte()
store i8 %3, i8* %1
%4 = call zeroext i8 (...) @jpeg_get_byte()
store i8 %4, i8* %2
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = or i32 %7, %9
%11 = trunc i32 %10 to i16
ret i16 %11
}

LLVM IR (-O2):
define zeroext i16 @jpeg_get_word() {
%1 = tail call zeroext i8 (...) @jpeg_get_byte()
%2 = tail call zeroext i8 (...) @jpeg_get_byte()
%3 = zext i8 %1 to i16
%4 = shl nuw i16 %3, 8
%5 = zext i8 %2 to i16
%6 = or i16 %4, %5
ret i16 %6
}
/* Variables and functions */
double pow(int, double);
int q2(int ph) {
  double a = 0.05421, b = 1.23, c = -0.09873, q2 = 0.0;
  q2 = a * pow(ph, ((b * ph) - (c * pow(ph, 2)))) + 5.231;
}


x86 assembly (clang, -O0):
<q2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x8(%rbp)
movsd  0xefd(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%edi
movsd  0xe85(%rip),%xmm0
call   1030 <pow@plt>
movsd  -0x50(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
mov    -0x3c(%rbp),%edi
movaps %xmm0,%xmm3
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe27(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q2>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
cvtsi2sd %edi,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xed7(%rip),%xmm0
call   1030 <pow@plt>
mulsd  0xed2(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0xecc(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    %ebx,%edi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <pow@plt>

LLVM IR (-O0):
define i32 @q2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i32 %0, i32* %3
store double 5.421000e-02, double* %4
store double 1.230000e+00, double* %5
store double 0xBFB9465E89225311, double* %6
store double 0.000000e+00, double* %7
%8 = load double, double* %4
%9 = load i32, i32* %3
%10 = load double, double* %5
%11 = load i32, i32* %3
%12 = sitofp i32 %11 to double
%13 = load double, double* %6
%14 = load i32, i32* %3
%15 = call double @pow(i32 %14, double 2.000000e+00)
%16 = fmul double %13, %15
%17 = fneg double %16
%18 = call double @llvm.fmuladd.f64(double %10, double %12, double %17)
%19 = call double @pow(i32 %9, double %18)
%20 = call double @llvm.fmuladd.f64(double %8, double %19, double 5.231000e+00)
store double %20, double* %7
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @q2(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call double @pow(i32 %0, double 2.000000e+00)
%4 = fmul double %3, 0x3FB9465E89225311
%5 = tail call double @llvm.fmuladd.f64(double %2, double 1.230000e+00, double %4)
%6 = tail call double @pow(i32 %0, double %5)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void abend(int sig) {
  printf("Abended on signal %d\n", sig);
  exit(2);
}


x86 assembly (clang, -O0):
<abend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<abend>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [22 x i8] c"Abended on signal %d\0A\00"
define void @abend(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 2)
unreachable
}
void omap_control_usb_set_sessionend(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @omap_control_usb_set_sessionend(%struct.device* nocapture %0) {
ret void
}
__attribute__((always_)) void leave_mm(int cpu) {}


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

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

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

LLVM IR (-O2):
define void @leave_mm(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fscanf(int /*<<< orphan*/ *, char *, char *);
bool read_word(FILE *hFile, char *word) {
  int word_found = fscanf(hFile, "\"%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]\",", word);
  return (word_found == 1);
}


x86 assembly (clang, -O0):
<read_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <fscanf@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_word>:
push   %rax
mov    %rsi,%rdx
lea    0xee5(%rip),%rsi
call   1030 <fscanf@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"\22%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]\22,\00"
define i32 @read_word(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i32*, i32** %3
%7 = load i8*, i8** %4
%8 = call i32 @fscanf(i32* %6, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@.str = [33 x i8] c"\22%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]\22,\00"
define i32 @read_word(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ real_expression();
int int_expression() { return (int)real_expression(); }


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

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

LLVM IR (-O0):
define i32 @int_expression() {
%1 = call i64 (...) @real_expression()
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @int_expression() {
%1 = tail call i64 (...) @real_expression()
%2 = trunc i64 %1 to i32
ret i32 %2
}
char *xrealloc(pointer, bytes)
char *pointer;
int bytes;
{
  char *temp = (char *)realloc(pointer, bytes);
  if (!temp)
    memory_error_and_abort();
  return (temp);
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1152 <xrealloc+0x32>
mov    $0x0,%al
call   1030 <memory_error_and_abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
movslq %esi,%rsi
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1138 <xrealloc+0x18>
xor    %eax,%eax
call   1030 <memory_error_and_abort@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xrealloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = call i8* @realloc(i8* %6, i64 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %14, label %12
12: ; preds = %2
%13 = call i32 (...) @memory_error_and_abort()
br label %14
14: ; preds = %12, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
define noalias i8* @xrealloc(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = tail call i8* @realloc(i8* %0, i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @memory_error_and_abort()
br label %8
8: ; preds = %6, %2
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ DPRINT();
extern char *dlerror(void) {
  DPRINT();
  return "dl* functions are not implemented";
}


x86 assembly (clang, -O0):
<dlerror>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <DPRINT@plt>
lea    0xede(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlerror>:
push   %rax
xor    %eax,%eax
call   1030 <DPRINT@plt>
lea    0xee1(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"dl* functions are not implemented\00"
define i8* @dlerror() {
%1 = call i32 (...) @DPRINT()
ret i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [34 x i8] c"dl* functions are not implemented\00"
define i8* @dlerror() {
%1 = tail call i32 (...) @DPRINT()
ret i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_help_show(char *);
void roadmap_help_trips(void) { roadmap_help_show("trips"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"trips\00"
define void @roadmap_help_trips() {
%1 = call i32 @roadmap_help_show(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"trips\00"
define void @roadmap_help_trips() {
%1 = tail call i32 @roadmap_help_show(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *getstring();
int /*<<< orphan*/ printf(char *, ...);
char *rotstr(char *);
int main() {
  char *str, *res;
  printf("Enter a string to be encoded or decoded: ");
  str = getstring();
  res = rotstr(str);
  printf("%s\n", res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <getstring@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <rotstr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1030 <getstring@plt>
mov    %rax,%rdi
call   1040 <rotstr@plt>
mov    %rax,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Enter a string to be encoded or decoded: \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%5 = call i8* (...) @getstring()
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @rotstr(i8* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"Enter a string to be encoded or decoded: \00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* (...) @getstring()
%3 = tail call i8* @rotstr(i8* %2)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
void gdk_pango_renderer_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_pango_renderer_get_type() {
ret void
}
/* Variables and functions */
int issep(char *);
int /*<<< orphan*/ printf(char *, char *);
void charchange(char *str) {
  int ret;
  while (*str != '\0') {
    ret = issep(str);
    if (ret == 1) {
      printf("Separator: %s\n", str);
    }
    str++;
  }
}


x86 assembly (clang, -O0):
<charchange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1173 <charchange+0x53>
mov    -0x8(%rbp),%rdi
call   1040 <issep@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1162 <charchange+0x42>
mov    -0x8(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <charchange+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charchange>:
push   %r14
push   %rbx
push   %rax
cmpb   $0x0,(%rdi)
je     1164 <charchange+0x44>
mov    %rdi,%rbx
lea    0xecd(%rip),%r14
jmp    114a <charchange+0x2a>
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
je     1164 <charchange+0x44>
mov    %rbx,%rdi
call   1040 <issep@plt>
cmp    $0x1,%eax
jne    1140 <charchange+0x20>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1140 <charchange+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"Separator: %s\0A\00"
define void @charchange(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %10
%5 = phi i8* [ %11, %10 ], [ %0, %1 ]
%6 = tail call i32 @issep(i8* %5)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %10
10: ; preds = %8, %4
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %10, %1
ret void
}
/* Variables and functions */
int pow(double, int);
double symbolicEq1(double x) { return pow(x, 6) - 2 * pow(x, 4) + pow(x, 2); }


x86 assembly (clang, -O0):
<symbolicEq1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x6,%edi
call   1030 <pow@plt>
mov    %eax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
shl    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<symbolicEq1>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x6,%edi
call   1030 <pow@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
add    %eax,%eax
sub    %eax,%ebx
movsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
add    %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @symbolicEq1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @pow(double %3, i32 6)
%5 = load double, double* %2
%6 = call i32 @pow(double %5, i32 4)
%7 = mul nsw i32 2, %6
%8 = sub nsw i32 %4, %7
%9 = load double, double* %2
%10 = call i32 @pow(double %9, i32 2)
%11 = add nsw i32 %8, %10
%12 = sitofp i32 %11 to double
ret double %12
}

LLVM IR (-O2):
define double @symbolicEq1(double %0) {
%2 = tail call i32 @pow(double %0, i32 6)
%3 = tail call i32 @pow(double %0, i32 4)
%4 = mul i32 %3, -2
%5 = add i32 %4, %2
%6 = tail call i32 @pow(double %0, i32 2)
%7 = add nsw i32 %5, %6
%8 = sitofp i32 %7 to double
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, int *, int);
unsigned int int_to_bytes(int number, char *bytes) {
  memcpy(bytes, &number, 4);
  return 1;
}


x86 assembly (clang, -O0):
<int_to_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_to_bytes>:
push   %rax
mov    %rsi,%rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    %rax,%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @int_to_bytes(i32 %0, i8* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @memcpy(i8* %1, i32* %3, i32 4)
ret i32 1
}
double berechne_umfang_kreis_mit_durchmesser(double durchmesser) {
  const double pi = 3.141592654;
  double umfang = durchmesser * pi;
  return umfang;
}


x86 assembly (clang, -O0):
<berechne_umfang_kreis_mit_durchmesser>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee2(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @berechne_umfang_kreis_mit_durchmesser(double %0) {
%2 = fmul double %0, 0x400921FB54524550
ret double %2
}