xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ box_boolean(int);
int /*<<< orphan*/ dpop();
double untag_float_fast(int /*<<< orphan*/);
void primitive_float_greater_impl(void) {
  double y = untag_float_fast(dpop());
  double x = untag_float_fast(dpop());
  ;
  box_boolean(x > y);
}


x86 assembly (clang, -O0):
<primitive_float_greater_impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <box_boolean@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_float_greater_impl>:
push   %rax
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
xor    %edi,%edi
ucomisd (%rsp),%xmm0
seta   %dil
pop    %rax
jmp    1040 <box_boolean@plt>

LLVM IR (-O0):
define void @primitive_float_greater_impl() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (...) @dpop()
%4 = call double @untag_float_fast(i32 %3)
store double %4, double* %1
%5 = call i32 (...) @dpop()
%6 = call double @untag_float_fast(i32 %5)
store double %6, double* %2
%7 = load double, double* %2
%8 = load double, double* %1
%9 = fcmp ogt double %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @box_boolean(i32 %10)
ret void
}

LLVM IR (-O2):
define void @primitive_float_greater_impl() {
%1 = tail call i32 (...) @dpop()
%2 = tail call double @untag_float_fast(i32 %1)
%3 = tail call i32 (...) @dpop()
%4 = tail call double @untag_float_fast(i32 %3)
%5 = fcmp ogt double %4, %2
%6 = zext i1 %5 to i32
%7 = tail call i32 @box_boolean(i32 %6)
ret void
}
/* Variables and functions */
int EINVAL;
int log_level_from_string(char const *);
int /*<<< orphan*/ log_set_max_level(int);
int log_set_max_level_from_string(const char *e) {
  int t;
  if ((t = log_level_from_string(e)) < 0)
    return -EINVAL;
  log_set_max_level(t);
  return 0;
}


x86 assembly (clang, -O0):
<log_set_max_level_from_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <log_level_from_string@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1154 <log_set_max_level_from_string+0x34>
xor    %eax,%eax
mov    0x2e96(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <log_set_max_level_from_string+0x43>
mov    -0x14(%rbp),%edi
call   1040 <log_set_max_level@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_set_max_level_from_string>:
push   %rax
call   1030 <log_level_from_string@plt>
test   %eax,%eax
js     1135 <log_set_max_level_from_string+0x15>
mov    %eax,%edi
call   1040 <log_set_max_level@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2ea4(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @log_set_max_level_from_string(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @log_level_from_string(i8* %5)
store i32 %6, i32* %4
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* @EINVAL
%10 = sub nsw i32 0, %9
store i32 %10, i32* %2
br label %14
11: ; preds = %1
%12 = load i32, i32* %4
%13 = call i32 @log_set_max_level(i32 %12)
store i32 0, i32* %2
br label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @log_set_max_level_from_string(i8* %0) {
%2 = tail call i32 @log_level_from_string(i8* %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
br label %9
7: ; preds = %1
%8 = tail call i32 @log_set_max_level(i32 %2)
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ %6, %4 ], [ 0, %7 ]
ret i32 %10
}
int getSeasonDay(int dayOfYear, double lat) {
  int seasonDay;
  if (lat >= 0) {
    seasonDay = dayOfYear + 10;
    if (seasonDay > 365) {
      seasonDay = seasonDay - 365;
    }
  } else {
    seasonDay = dayOfYear - 172;
    if (seasonDay < 0) {
      seasonDay = seasonDay + 365;
    }
  }
  return seasonDay;
}


x86 assembly (clang, -O0):
<getSeasonDay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1144 <getSeasonDay+0x44>
mov    -0x4(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x16d,-0x14(%rbp)
jle    113f <getSeasonDay+0x3f>
mov    -0x14(%rbp),%eax
sub    $0x16d,%eax
mov    %eax,-0x14(%rbp)
jmp    1169 <getSeasonDay+0x69>
mov    -0x4(%rbp),%eax
sub    $0xac,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1164 <getSeasonDay+0x64>
mov    -0x14(%rbp),%eax
add    $0x16d,%eax
mov    %eax,-0x14(%rbp)
jmp    1169 <getSeasonDay+0x69>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSeasonDay>:
cmp    $0x164,%edi
mov    $0xfffffe9d,%eax
mov    $0xa,%ecx
cmovge %eax,%ecx
cmp    $0xac,%edi
mov    $0xc1,%edx
mov    $0xffffff54,%eax
cmovl  %edx,%eax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @getSeasonDay(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca i32
store i32 %0, i32* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = fcmp oge double %6, 0.000000e+00
br i1 %7, label %8, label %17
8: ; preds = %2
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 10
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = icmp sgt i32 %11, 365
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load i32, i32* %5
%15 = sub nsw i32 %14, 365
store i32 %15, i32* %5
br label %16
16: ; preds = %13, %8
br label %26
17: ; preds = %2
%18 = load i32, i32* %3
%19 = sub nsw i32 %18, 172
store i32 %19, i32* %5
%20 = load i32, i32* %5
%21 = icmp slt i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %17
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 365
store i32 %24, i32* %5
br label %25
25: ; preds = %22, %17
br label %26
26: ; preds = %25, %16
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @getSeasonDay(i32 %0, double %1) {
%3 = fcmp ult double %1, 0.000000e+00
%4 = icmp sgt i32 %0, 355
%5 = select i1 %4, i32 -355, i32 10
%6 = icmp slt i32 %0, 172
%7 = select i1 %6, i32 193, i32 -172
%8 = select i1 %3, i32 %7, i32 %5
%9 = add nsw i32 %8, %0
ret i32 %9
}
/* Variables and functions */
int mkostemps(char *, int /*<<< orphan*/, int);
int mkostemp(char *template, int flags) {
  return mkostemps(template, 0, flags);
}


x86 assembly (clang, -O0):
<mkostemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1030 <mkostemps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkostemp>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <mkostemps@plt>

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

LLVM IR (-O2):
define i32 @mkostemp(i8* %0, i32 %1) {
%3 = tail call i32 @mkostemps(i8* %0, i32 0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popreal16array_(char *x, unsigned int *n) { popNarray(x, (*n * 16)); }


x86 assembly (clang, -O0):
<popreal16array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
shl    $0x4,%esi
call   1030 <popNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popreal16array_>:
mov    (%rsi),%esi
shl    $0x4,%esi
jmp    1030 <popNarray@plt>

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

LLVM IR (-O2):
define void @popreal16array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 4
%5 = tail call i32 @popNarray(i8* %0, i32 %4)
ret void
}
void genbltzall() {}


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

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

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

LLVM IR (-O2):
define void @genbltzall() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print(char *message) { printf("%s", message); }


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

x86 assembly (clang, -O2):
<print>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @print(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t ROTATE(uint32_t a, uint32_t n) { return (a << n) | (a >> (32 - n)); }


x86 assembly (clang, -O0):
<ROTATE>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROTATE>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @ROTATE(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @ROTATE(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
double hypot(double, double);
double c_hypot(double arg0, double arg1) { return hypot(arg0, arg1); }


x86 assembly (clang, -O0):
<c_hypot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <hypot@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_hypot>:
jmp    1030 <hypot@plt>

LLVM IR (-O0):
define double @c_hypot(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @hypot(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @c_hypot(double %0, double %1) {
%3 = tail call double @hypot(double %0, double %1)
ret double %3
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, struct timespec *);
void msSleep(int milliseconds) {
  int ms = milliseconds;
  struct timespec req = {0};
  req.tv_sec = 0;
  req.tv_nsec = ms * 1000000L;
  nanosleep(&req, (struct timespec *)NULL);
}


x86 assembly (clang, -O0):
<msSleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1040 <memset@plt>
movq   $0x0,-0x18(%rbp)
movslq -0x8(%rbp),%rax
imul   $0xf4240,%rax,%rax
mov    %eax,-0x20(%rbp)
lea    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msSleep>:
sub    $0x18,%rsp
imul   $0xf4240,%edi,%eax
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movq   $0x0,0x10(%rsp)
mov    %eax,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64, i32 }
define void @msSleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.timespec
store i32 %0, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %3
%6 = bitcast %struct.timespec* %4 to i8*
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
store i64 0, i64* %7
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = mul nsw i64 %9, 1000000
%11 = trunc i64 %10 to i32
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
store i32 %11, i32* %12
%13 = call i32 @nanosleep(%struct.timespec* %4, %struct.timespec* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64, i32 }
define void @msSleep(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = mul i32 %0, 1000000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
%6 = bitcast %struct.timespec* %2 to i8*
store i32 %4, i32* %5
%7 = call i32 @nanosleep(%struct.timespec* %2, %struct.timespec* null)
ret void
}
int getrlimit(int resource, struct rlimit *rlp) {
  anvil_syslog(0, "%s unimplemented %d\n", __FUNCTION__, resource);
  return 0;
}


x86 assembly (clang, -O0):
<getrlimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
xor    %edi,%edi
lea    0xed5(%rip),%rsi
lea    0xee3(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getrlimit>:
push   %rax
mov    %edi,%ecx
lea    0xee6(%rip),%rsi
lea    0xef4(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <anvil_syslog@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.rlimit = type opaque
@.str = [21 x i8] c"%s unimplemented %d\0A\00"
@__FUNCTION__.getrlimit = [10 x i8] c"getrlimit\00"
define i32 @getrlimit(i32 %0, %struct.rlimit* %1) {
%3 = alloca i32
%4 = alloca %struct.rlimit*
store i32 %0, i32* %3
store %struct.rlimit* %1, %struct.rlimit** %4
%5 = load i32, i32* %3
%6 = call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, i32, ...)*)(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.getrlimit, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
%struct.rlimit = type opaque
@.str = [21 x i8] c"%s unimplemented %d\0A\00"
@__FUNCTION__.getrlimit = [10 x i8] c"getrlimit\00"
define i32 @getrlimit(i32 %0, %struct.rlimit* nocapture readnone %1) {
%3 = tail call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, i32, ...)*)(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.getrlimit, i64 0, i64 0), i32 %0)
ret i32 0
}
/* Variables and functions */
float logf(float);
float r_log(float *x) { return (logf(*x)); }


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

x86 assembly (clang, -O2):
<r_log>:
movss  (%rdi),%xmm0
jmp    1030 <logf@plt>

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

LLVM IR (-O2):
define float @r_log(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call float @logf(float %2)
ret float %3
}
int fun978() { return 978; }


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

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

LLVM IR (-O0):
define i32 @fun978() {
ret i32 978
}

LLVM IR (-O2):
define i32 @fun978() {
ret i32 978
}
/* Variables and functions */
int /*<<< orphan*/ livebob(int);
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basLiveBob() {
  int n;
  n = popNumber();
  pushNumber(livebob(n));
}


x86 assembly (clang, -O0):
<basLiveBob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <livebob@plt>
mov    %eax,%edi
call   1030 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basLiveBob>:
push   %rax
xor    %eax,%eax
call   1040 <popNumber@plt>
mov    %eax,%edi
call   1050 <livebob@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <pushNumber@plt>

LLVM IR (-O0):
define void @basLiveBob() {
%1 = alloca i32
%2 = call i32 (...) @popNumber()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @livebob(i32 %3)
%5 = call i32 @pushNumber(i32 %4)
ret void
}

LLVM IR (-O2):
define void @basLiveBob() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @livebob(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *);
extern void danish_ISO_8859_1_close_env(struct SN_env *z) { SN_close_env(z); }


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

x86 assembly (clang, -O2):
<danish_ISO_8859_1_close_env>:
jmp    1030 <SN_close_env@plt>

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

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @danish_ISO_8859_1_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0)
ret void
}
unsigned long ReadEprom(unsigned long WordAddr) {
  unsigned long data, i;
  for (i = 0, data = 0, WordAddr *= 4; i < 4; i++, WordAddr++)
    data |= (*(unsigned long *)((0x30d000) + WordAddr) & 0xFF) << (i * 8);
  return (data);
}


x86 assembly (clang, -O0):
<ReadEprom>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x4,-0x18(%rbp)
jae    1172 <ReadEprom+0x72>
mov    -0x8(%rbp),%rax
add    $0x30d000,%rax
mov    (%rax),%rax
and    $0xff,%rax
mov    -0x18(%rbp),%rcx
shl    $0x3,%rcx
shl    %cl,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1124 <ReadEprom+0x24>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadEprom>:
movzbl 0x30d000(,%rdi,4),%eax
mov    0x30d001(,%rdi,4),%ecx
mov    0x30d002(,%rdi,4),%edx
shl    $0x8,%ecx
movzwl %cx,%ecx
or     %rax,%rcx
movzbl %dl,%edx
shl    $0x10,%rdx
or     %rcx,%rdx
mov    0x30d003(,%rdi,4),%eax
shl    $0x18,%eax
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @ReadEprom(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %4
store i64 0, i64* %3
%5 = load i64, i64* %2
%6 = mul i64 %5, 4
store i64 %6, i64* %2
br label %7
7: ; preds = %21, %1
%8 = load i64, i64* %4
%9 = icmp ult i64 %8, 4
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load i64, i64* %2
%12 = add i64 3198976, %11
%13 = inttoptr i64 %12 to i64*
%14 = load i64, i64* %13
%15 = and i64 %14, 255
%16 = load i64, i64* %4
%17 = mul i64 %16, 8
%18 = shl i64 %15, %17
%19 = load i64, i64* %3
%20 = or i64 %19, %18
store i64 %20, i64* %3
br label %21
21: ; preds = %10
%22 = load i64, i64* %4
%23 = add i64 %22, 1
store i64 %23, i64* %4
%24 = load i64, i64* %2
%25 = add i64 %24, 1
store i64 %25, i64* %2
br label %7
26: ; preds = %7
%27 = load i64, i64* %3
ret i64 %27
}

LLVM IR (-O2):
define i64 @ReadEprom(i64 %0) {
%2 = shl i64 %0, 2
%3 = add i64 %2, 3198976
%4 = inttoptr i64 %3 to i64*
%5 = load i64, i64* %4
%6 = and i64 %5, 255
%7 = add i64 %2, 3198977
%8 = inttoptr i64 %7 to i64*
%9 = load i64, i64* %8
%10 = shl i64 %9, 8
%11 = and i64 %10, 65280
%12 = or i64 %11, %6
%13 = add i64 %2, 3198978
%14 = inttoptr i64 %13 to i64*
%15 = load i64, i64* %14
%16 = shl i64 %15, 16
%17 = and i64 %16, 16711680
%18 = or i64 %17, %12
%19 = add i64 %2, 3198979
%20 = inttoptr i64 %19 to i64*
%21 = load i64, i64* %20
%22 = shl i64 %21, 24
%23 = and i64 %22, 4278190080
%24 = or i64 %23, %18
ret i64 %24
}
/* Type definitions */
struct vec3 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec3_scale(float *, float *, float);
__attribute__((always_)) struct vec3 *
psvec3_scale(struct vec3 *result, struct vec3 *a, float scalar) {
  vec3_scale((float *)result, (float *)a, scalar);
  return result;
}


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

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

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_scale(%struct.vec3* %0, %struct.vec3* %1, float %2) {
%4 = alloca %struct.vec3*
%5 = alloca %struct.vec3*
%6 = alloca float
store %struct.vec3* %0, %struct.vec3** %4
store %struct.vec3* %1, %struct.vec3** %5
store float %2, float* %6
%7 = load %struct.vec3*, %struct.vec3** %4
%8 = bitcast %struct.vec3* %7 to float*
%9 = load %struct.vec3*, %struct.vec3** %5
%10 = bitcast %struct.vec3* %9 to float*
%11 = load float, float* %6
%12 = call i32 @vec3_scale(float* %8, float* %10, float %11)
%13 = load %struct.vec3*, %struct.vec3** %4
ret %struct.vec3* %13
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_scale(%struct.vec3* returned %0, %struct.vec3* %1, float %2) {
%4 = bitcast %struct.vec3* %0 to float*
%5 = bitcast %struct.vec3* %1 to float*
%6 = tail call i32 @vec3_scale(float* %4, float* %5, float %2)
ret %struct.vec3* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *lrealloc(void *p, size_t size) {
  void *p2 = realloc(p, size);
  if (!p2) {
    fprintf(stderr, "realloc failed for: %lu\n", size);
    exit(1);
  }
  return p2;
}


x86 assembly (clang, -O0):
<lrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117f <lrealloc+0x4f>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe90(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lrealloc>:
push   %rbx
mov    %rsi,%rbx
call   1040 <realloc@plt>
test   %rax,%rax
je     1140 <lrealloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"realloc failed for: %lu\0A\00"
define i8* @lrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %16, label %11
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i64, i64* %4
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %2
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"realloc failed for: %lu\0A\00"
define noalias i8* @lrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %1)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i8* %3
}
/* Variables and functions */
double sinh(double);
double Double_sinh(double x) { return sinh(x); }


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

x86 assembly (clang, -O2):
<Double_sinh>:
jmp    1030 <sinh@plt>

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

LLVM IR (-O2):
define double @Double_sinh(double %0) {
%2 = tail call double @sinh(double %0)
ret double %2
}
char *langRomTypeColecoCart() { return "Coleco Cartridge"; }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Coleco Cartridge\00"
define i8* @langRomTypeColecoCart() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [17 x i8] c"Coleco Cartridge\00"
define i8* @langRomTypeColecoCart() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}
void getfirstcol(float *A, float *v) {
  int i;
  for (i = 0; i < 32; i++)
    v[i] = A[i * 32 + 32 - 1];
}


x86 assembly (clang, -O0):
<getfirstcol>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x20,-0x14(%rbp)
jge    1150 <getfirstcol+0x50>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x5,%ecx
add    $0x20,%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <getfirstcol+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getfirstcol>:
add    $0x1fc,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movss  -0x180(%rdi),%xmm0
ff
movss  %xmm0,(%rsi,%rax,4)
movss  -0x100(%rdi),%xmm0
ff
movss  %xmm0,0x4(%rsi,%rax,4)
movss  -0x80(%rdi),%xmm0
movss  %xmm0,0x8(%rsi,%rax,4)
movss  (%rdi),%xmm0
movss  %xmm0,0xc(%rsi,%rax,4)
add    $0x4,%rax
add    $0x200,%rdi
cmp    $0x20,%rax
jne    1110 <getfirstcol+0x10>
ret

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

LLVM IR (-O2):
define void @getfirstcol(float* nocapture %0, float* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ 0, %2 ], [ %28, %3 ]
%5 = shl nuw nsw i64 %4, 5
%6 = or i64 %5, 31
%7 = getelementptr inbounds float, float* %0, i64 %6
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %1, i64 %4
store float %8, float* %9
%10 = or i64 %4, 1
%11 = shl nuw nsw i64 %10, 5
%12 = or i64 %11, 31
%13 = getelementptr inbounds float, float* %0, i64 %12
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %1, i64 %10
store float %14, float* %15
%16 = or i64 %4, 2
%17 = shl nuw nsw i64 %16, 5
%18 = or i64 %17, 31
%19 = getelementptr inbounds float, float* %0, i64 %18
%20 = load float, float* %19
%21 = getelementptr inbounds float, float* %1, i64 %16
store float %20, float* %21
%22 = or i64 %4, 3
%23 = shl nuw nsw i64 %22, 5
%24 = or i64 %23, 31
%25 = getelementptr inbounds float, float* %0, i64 %24
%26 = load float, float* %25
%27 = getelementptr inbounds float, float* %1, i64 %22
store float %26, float* %27
%28 = add nuw nsw i64 %4, 4
%29 = icmp eq i64 %28, 32
br i1 %29, label %30, label %3
30: ; preds = %3
ret void
}
void setWindowTitle(void) {}


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

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

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

LLVM IR (-O2):
define void @setWindowTitle() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ buzzer_pin_config();
int /*<<< orphan*/ cli();
int /*<<< orphan*/ sei();
void buzzer_init(void) {
  cli();
  buzzer_pin_config();
  sei();
}


x86 assembly (clang, -O0):
<buzzer_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <cli@plt>
mov    $0x0,%al
call   1050 <buzzer_pin_config@plt>
mov    $0x0,%al
call   1030 <sei@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<buzzer_init>:
push   %rax
xor    %eax,%eax
call   1040 <cli@plt>
xor    %eax,%eax
call   1050 <buzzer_pin_config@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <sei@plt>

LLVM IR (-O0):
define void @buzzer_init() {
%1 = call i32 (...) @cli()
%2 = call i32 (...) @buzzer_pin_config()
%3 = call i32 (...) @sei()
ret void
}

LLVM IR (-O2):
define void @buzzer_init() {
%1 = tail call i32 (...) @cli()
%2 = tail call i32 (...) @buzzer_pin_config()
%3 = tail call i32 (...) @sei()
ret void
}
void f(void) {
  int a[100], b[100];
  int i;
#pragma hlt distribute
  for (i = 0; i < 100; i++) {
    {
      a[i] = i * 1;
      b[i] = 0;
    }
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2b0,%rsp
movl   $0x0,-0x324(%rbp)
cmpl   $0x64,-0x324(%rbp)
jge    115f <f+0x5f>
mov    -0x324(%rbp),%ecx
shl    $0x0,%ecx
movslq -0x324(%rbp),%rax
mov    %ecx,-0x190(%rbp,%rax,4)
movslq -0x324(%rbp),%rax
movl   $0x0,-0x320(%rbp,%rax,4)
mov    -0x324(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x324(%rbp)
jmp    1115 <f+0x15>
add    $0x2b0,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ dprintf(int, char *, scalar_t__, scalar_t__, scalar_t__);
uint32_t indirect_doWrite(int writefd, uint32_t parentBlock, uint32_t blockNum,
                          uint32_t currEntryNumber) {
  if (blockNum != 0)
    dprintf(writefd, "%x,%d,%x\n", parentBlock, currEntryNumber, blockNum);
  return ++currEntryNumber;
}


x86 assembly (clang, -O0):
<indirect_doWrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114d <indirect_doWrite+0x3d>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xeb8(%rip),%rsi
call   1030 <dprintf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indirect_doWrite>:
push   %rbx
mov    %rcx,%rbx
mov    %rdx,%r8
test   %rdx,%rdx
je     112e <indirect_doWrite+0x1e>
mov    %rsi,%rdx
lea    0xeda(%rip),%rsi
mov    %rbx,%rcx
call   1030 <dprintf@plt>
add    $0x1,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%x,%d,%x\0A\00"
define i64 @indirect_doWrite(i32 %0, i64 %1, i64 %2, i64 %3) {
%5 = icmp eq i64 %2, 0
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @dprintf(i32 %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 %1, i64 %3, i64 %2)
br label %8
8: ; preds = %6, %4
%9 = add nsw i64 %3, 1
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_long_min_to_all(long *target, long *source, int nreduce,
                                  int PE_start, int logPE_stride, int PE_size,
                                  long *pWrk, long *pSync) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_long_min_to_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_long_min_to_all(i64* %0, i64* %1, i32 %2, i32 %3, i32 %4, i32 %5, i64* %6, i64* %7) {
%9 = alloca i64*
%10 = alloca i64*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i64*
%16 = alloca i64*
store i64* %0, i64** %9
store i64* %1, i64** %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i64* %6, i64** %15
store i64* %7, i64** %16
%17 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_long_min_to_all(i64* nocapture readnone %0, i64* nocapture readnone %1, i32 %2, i32 %3, i32 %4, i32 %5, i64* nocapture readnone %6, i64* nocapture readnone %7) {
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int ft_print_error(void) {
  write(1, "Erreur\n", 7);
  return (0);
}


x86 assembly (clang, -O0):
<ft_print_error>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0x7,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_error>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
mov    $0x7,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Erreur\0A\00"
define i32 @ft_print_error() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"Erreur\0A\00"
define i32 @ft_print_error() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
ret i32 0
}
void rtvShellInit(void) {
  static int shell_initialized = 0;
  if (shell_initialized == 0) {
    shell_initialized = 1;
  }
}


x86 assembly (clang, -O0):
<rtvShellInit>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f19(%rip)
jne    111b <rtvShellInit+0x1b>
movl   $0x1,0x2f09(%rip)
pop    %rbp
ret

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

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

LLVM IR (-O2):
@rtvShellInit.shell_initialized = internal unnamed_addr global i1 false
define void @rtvShellInit() {
%1 = load i1, i1* @rtvShellInit.shell_initialized
br i1 %1, label %3, label %2
2: ; preds = %0
store i1 true, i1* @rtvShellInit.shell_initialized
br label %3
3: ; preds = %2, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void four(const float value) {
  if (0 < value && value < 1)
    printf("The value is between zero and one.\n");
  else
    printf("The value is not between zero and one.\n");
}


x86 assembly (clang, -O0):
<four>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1151 <four+0x41>
movss  0xeca(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1151 <four+0x41>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
jmp    115d <four+0x4d>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<four>:
movss  0xee8(%rip),%xmm1
ucomiss %xmm0,%xmm1
lea    0xf09(%rip),%rdi
lea    0xedb(%rip),%rax
cmovbe %rax,%rdi
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
cmovbe %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"The value is between zero and one.\0A\00"
@.str.1 = [40 x i8] c"The value is not between zero and one.\0A\00"
define void @four(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float 0.000000e+00, %3
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load float, float* %2
%7 = fcmp olt float %6, 1.000000e+00
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %12
10: ; preds = %5, %1
%11 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
ret void
}

LLVM IR (-O2):
@str = [39 x i8] c"The value is not between zero and one.\00"
@str.2 = [35 x i8] c"The value is between zero and one.\00"
define void @four(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = fcmp olt float %0, 1.000000e+00
%4 = and i1 %2, %3
%5 = select i1 %4, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret void
}
/* Type definitions */
struct aFILE {
  int dummy;
};
typedef int /*<<< orphan*/ fpos_t;

/* Variables and functions */
int /*<<< orphan*/ _get_actual_fp(struct aFILE *);
int fgetpos(int /*<<< orphan*/, int /*<<< orphan*/ *);
int my_fgetpos(struct aFILE *fp, fpos_t *pos) {
  return fgetpos(_get_actual_fp(fp), pos);
}


x86 assembly (clang, -O0):
<my_fgetpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_get_actual_fp@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fgetpos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_fgetpos>:
push   %rbx
mov    %rsi,%rbx
call   1040 <_get_actual_fp@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <fgetpos@plt>

LLVM IR (-O0):
%struct.aFILE = type { i32 }
define i32 @my_fgetpos(%struct.aFILE* %0, i32* %1) {
%3 = alloca %struct.aFILE*
%4 = alloca i32*
store %struct.aFILE* %0, %struct.aFILE** %3
store i32* %1, i32** %4
%5 = load %struct.aFILE*, %struct.aFILE** %3
%6 = call i32 @_get_actual_fp(%struct.aFILE* %5)
%7 = load i32*, i32** %4
%8 = call i32 @fgetpos(i32 %6, i32* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.aFILE = type { i32 }
define i32 @my_fgetpos(%struct.aFILE* %0, i32* %1) {
%3 = tail call i32 @_get_actual_fp(%struct.aFILE* %0)
%4 = tail call i32 @fgetpos(i32 %3, i32* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int owen_free(char *dev) {
  if (dev != NULL)
    free(dev);
  return 0;
}


x86 assembly (clang, -O0):
<owen_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <owen_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<owen_free>:
test   %rdi,%rdi
je     111f <owen_free+0xf>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @owen_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ slicestr_long_delim_no_match_test();
int main() {
  slicestr_long_delim_no_match_test();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <slicestr_long_delim_no_match_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @slicestr_long_delim_no_match_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @slicestr_long_delim_no_match_test()
ret i32 0
}
int xocurline(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @xocurline() {
ret i32 0
}
/* Variables and functions */
double fabs(double);
double interpolate_arc(double angle, double zm1, double a1, double zm2,
                       double a2) {
  double frac = fabs((angle - a1) / (a2 - a1));
  double result = frac * (zm2 - zm1) + zm1;
  ((void)0);
  ((void)0);
  return result;
}


x86 assembly (clang, -O0):
<interpolate_arc>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movaps 0xec4(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpolate_arc>:
subsd  %xmm2,%xmm0
subsd  %xmm2,%xmm4
divsd  %xmm4,%xmm0
andpd  0xeec(%rip),%xmm0
subsd  %xmm1,%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @interpolate_arc(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%13 = load double, double* %6
%14 = load double, double* %8
%15 = fsub double %13, %14
%16 = load double, double* %10
%17 = load double, double* %8
%18 = fsub double %16, %17
%19 = fdiv double %15, %18
%20 = call double @llvm.fabs.f64(double %19)
store double %20, double* %11
%21 = load double, double* %11
%22 = load double, double* %9
%23 = load double, double* %7
%24 = fsub double %22, %23
%25 = load double, double* %7
%26 = call double @llvm.fmuladd.f64(double %21, double %24, double %25)
store double %26, double* %12
%27 = load double, double* %12
ret double %27
}

LLVM IR (-O2):
define double @interpolate_arc(double %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %0, %2
%7 = fsub double %4, %2
%8 = fdiv double %6, %7
%9 = tail call double @llvm.fabs.f64(double %8)
%10 = fsub double %3, %1
%11 = tail call double @llvm.fmuladd.f64(double %9, double %10, double %1)
ret double %11
}