xunge/DecIR huggingface dataset:
unsigned long long max_4(unsigned bit_start, unsigned bit_end) {
  unsigned bits = (bit_end) - (bit_start) + 1;
  return (((1ull << (bits - 1)) - 1) << 1) + 1;
}


x86 assembly (clang, -O0):
<max_4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
sub    $0x1,%rax
shl    $0x1,%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_4>:
mov    %esi,%ecx
sub    %edi,%ecx
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
not    %rax
add    %rax,%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @max_4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub i32 %6, %7
%9 = add i32 %8, 1
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = sub i32 %10, 1
%12 = zext i32 %11 to i64
%13 = shl i64 1, %12
%14 = sub i64 %13, 1
%15 = shl i64 %14, 1
%16 = add i64 %15, 1
ret i64 %16
}

LLVM IR (-O2):
define i64 @max_4(i32 %0, i32 %1) {
%3 = sub i32 %1, %0
%4 = zext i32 %3 to i64
%5 = shl nsw i64 -1, %4
%6 = xor i64 %5, -1
%7 = shl i64 %6, 1
%8 = or i64 %7, 1
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ gethostname(char *, int);
void xnet_gethostname(char *host, int host_size) {
  gethostname(host, host_size);
}


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

x86 assembly (clang, -O2):
<xnet_gethostname>:
jmp    1030 <gethostname@plt>

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

LLVM IR (-O2):
define void @xnet_gethostname(i8* %0, i32 %1) {
%3 = tail call i32 @gethostname(i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
scalar_t__ setxattr(char const *, char *, char *, size_t, int /*<<< orphan*/);
ssize_t xsetxattr(const char *path, char *list, char *value, size_t size) {
  ssize_t ret = setxattr(path, list, value, size, 0);
  if (ret < 0)
    err(1, "setxattr() failed");
  return ret;
}


x86 assembly (clang, -O0):
<xsetxattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1040 <setxattr@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jge    1170 <xsetxattr+0x50>
mov    $0x1,%edi
lea    0xe95(%rip),%rsi
call   1030 <err@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xsetxattr>:
push   %rbx
xor    %r8d,%r8d
call   1040 <setxattr@plt>
mov    %rax,%rbx
test   %rax,%rax
jns    1142 <xsetxattr+0x22>
lea    0xec8(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"setxattr() failed\00"
define i64 @xsetxattr(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i64 @setxattr(i8* %0, i8* %1, i8* %2, i64 %3, i32 0)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
ret i64 %5
}
/* Variables and functions */
unsigned int FMI_LetterJump(unsigned int, unsigned int);
unsigned int GetCharIdAtBWTPos(unsigned int);
unsigned int FMI_LeftJump(unsigned int bwtpos) {
  unsigned int charid;
  charid = GetCharIdAtBWTPos(bwtpos);
  if (charid == 0)
    return 0U;
  else
    return FMI_LetterJump(charid, bwtpos);
}


x86 assembly (clang, -O0):
<FMI_LeftJump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <GetCharIdAtBWTPos@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    114c <FMI_LeftJump+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    115a <FMI_LeftJump+0x3a>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <FMI_LetterJump@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FMI_LeftJump>:
push   %rbx
mov    %edi,%ebx
call   1030 <GetCharIdAtBWTPos@plt>
test   %eax,%eax
je     1136 <FMI_LeftJump+0x16>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <FMI_LetterJump@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @FMI_LeftJump(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @GetCharIdAtBWTPos(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %14
10: ; preds = %1
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = call i32 @FMI_LetterJump(i32 %11, i32 %12)
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @FMI_LeftJump(i32 %0) {
%2 = tail call i32 @GetCharIdAtBWTPos(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @FMI_LetterJump(i32 %2, i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
void g_type_class_peek_parent() {}


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

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

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

LLVM IR (-O2):
define void @g_type_class_peek_parent() {
ret void
}
void bug5(void) {
  char str = {'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '\n'};
  char str2[64];
  strcpy(str2, str);
  printf("%s:%s\n", __FUNCTION__, str2);
}


x86 assembly (clang, -O0):
<bug5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movb   $0x48,-0x1(%rbp)
lea    -0x50(%rbp),%rdi
movsbq -0x1(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x50(%rbp),%rdx
lea    0xebb(%rip),%rdi
lea    0xebb(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bug5>:
push   %rbx
sub    $0x40,%rsp
mov    %rsp,%rbx
mov    $0x48,%esi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xec4(%rip),%rdi
lea    0xec4(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%s:%s\0A\00"
@__FUNCTION__.bug5 = [5 x i8] c"bug5\00"
define void @bug5() {
%1 = alloca i8
%2 = alloca [64 x i8]
store i8 72, i8* %1
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%4 = load i8, i8* %1
%5 = sext i8 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = call i8* @strcpy(i8* %3, i8* %6)
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.bug5, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s:%s\0A\00"
@__FUNCTION__.bug5 = [5 x i8] c"bug5\00"
define void @bug5() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = call i8* @strcpy(i8* %2, i8* inttoptr (i64 72 to i8*))
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.bug5, i64 0, i64 0), i8* %2)
ret void
}
int fun367() { return 367; }


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

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

LLVM IR (-O0):
define i32 @fun367() {
ret i32 367
}

LLVM IR (-O2):
define i32 @fun367() {
ret i32 367
}
/* Variables and functions */
double fmod(double, double);
double convertDegMinToDecDeg(float degMin) {
  double min = 0.0;
  double decDeg = 0.0;
  min = fmod((double)degMin, 100.0);
  degMin = (int)(degMin / 100);
  decDeg = degMin + (min / 60);
  return decDeg;
}


x86 assembly (clang, -O0):
<convertDegMinToDecDeg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeca(%rip),%xmm1
call   1030 <fmod@plt>
movsd  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xebb(%rip),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xe84(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertDegMinToDecDeg>:
sub    $0x18,%rsp
movaps %xmm0,(%rsp)
cvtss2sd %xmm0,%xmm0
movsd  0xedc(%rip),%xmm1
call   1030 <fmod@plt>
movaps (%rsp),%xmm1
divss  0xedb(%rip),%xmm1
cvttps2dq %xmm1,%xmm1
cvtdq2pd %xmm1,%xmm1
divsd  0xec3(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @convertDegMinToDecDeg(float %0) {
%2 = alloca float
%3 = alloca double
%4 = alloca double
store float %0, float* %2
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %4
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = call double @fmod(double %6, double 1.000000e+02)
store double %7, double* %3
%8 = load float, float* %2
%9 = fdiv float %8, 1.000000e+02
%10 = fptosi float %9 to i32
%11 = sitofp i32 %10 to float
store float %11, float* %2
%12 = load float, float* %2
%13 = fpext float %12 to double
%14 = load double, double* %3
%15 = fdiv double %14, 6.000000e+01
%16 = fadd double %13, %15
store double %16, double* %4
%17 = load double, double* %4
ret double %17
}

LLVM IR (-O2):
define double @convertDegMinToDecDeg(float %0) {
%2 = fpext float %0 to double
%3 = tail call double @fmod(double %2, double 1.000000e+02)
%4 = fdiv float %0, 1.000000e+02
%5 = fptosi float %4 to i32
%6 = sitofp i32 %5 to double
%7 = fdiv double %3, 6.000000e+01
%8 = fadd double %7, %6
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ dtoi(float);
int /*<<< orphan*/ g2_set_coordinate_system(int /*<<< orphan*/, float, float,
                                            float, float);
void g2_set_coordinate_system_(float *dev, float *x_origin, float *y_origin,
                               float *x_mul, float *y_mul) {
  g2_set_coordinate_system(dtoi(*dev), *x_origin, *y_origin, *x_mul, *y_mul);
}


x86 assembly (clang, -O0):
<g2_set_coordinate_system_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1040 <dtoi@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm3
call   1030 <g2_set_coordinate_system@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_set_coordinate_system_>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1040 <dtoi@plt>
movss  (%rbx),%xmm0
movss  (%r12),%xmm1
movss  (%r15),%xmm2
movss  (%r14),%xmm3
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <g2_set_coordinate_system@plt>

LLVM IR (-O0):
define void @g2_set_coordinate_system_(float* %0, float* %1, float* %2, float* %3, float* %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store float* %3, float** %9
store float* %4, float** %10
%11 = load float*, float** %6
%12 = load float, float* %11
%13 = call i32 @dtoi(float %12)
%14 = load float*, float** %7
%15 = load float, float* %14
%16 = load float*, float** %8
%17 = load float, float* %16
%18 = load float*, float** %9
%19 = load float, float* %18
%20 = load float*, float** %10
%21 = load float, float* %20
%22 = call i32 @g2_set_coordinate_system(i32 %13, float %15, float %17, float %19, float %21)
ret void
}

LLVM IR (-O2):
define void @g2_set_coordinate_system_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, float* nocapture %4) {
%6 = load float, float* %0
%7 = tail call i32 @dtoi(float %6)
%8 = load float, float* %1
%9 = load float, float* %2
%10 = load float, float* %3
%11 = load float, float* %4
%12 = tail call i32 @g2_set_coordinate_system(i32 %7, float %8, float %9, float %10, float %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ http_parse_block(char *, char const *, int);
char *util_toupper(int /*<<< orphan*/);
char *http_method(char *buffer, const char *request) {
  return util_toupper(http_parse_block(buffer, request, 1));
}


x86 assembly (clang, -O0):
<http_method>:
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    $0x1,%edx
call   1040 <http_parse_block@plt>
mov    %eax,%edi
call   1030 <util_toupper@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_method>:
push   %rax
mov    $0x1,%edx
call   1040 <http_parse_block@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <util_toupper@plt>

LLVM IR (-O0):
define i8* @http_method(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 i32 @http_parse_block(i8* %5, i8* %6, i32 1)
%8 = call i8* @util_toupper(i32 %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @http_method(i8* %0, i8* %1) {
%3 = tail call i32 @http_parse_block(i8* %0, i8* %1, i32 1)
%4 = tail call i8* @util_toupper(i32 %3)
ret i8* %4
}
void BUF_memdup(void) {}


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

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

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

LLVM IR (-O2):
define void @BUF_memdup() {
ret void
}
char foo(int p1, int p2) { return p1 - p2; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
sub    %esi,%eax
ret

LLVM IR (-O0):
define signext i8 @foo(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 = sub nsw i32 %5, %6
%8 = trunc i32 %7 to i8
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @foo(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = trunc i32 %3 to i8
ret i8 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int print(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int vprintf(const char *format, va_list ap) { return print(0, format, ap); }


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

x86 assembly (clang, -O2):
<vprintf>:
mov    %esi,%edx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <print@plt>

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

LLVM IR (-O2):
define i32 @vprintf(i8* %0, i32 %1) {
%3 = tail call i32 @print(i32 0, i8* %0, i32 %1)
ret i32 %3
}
void RTRandAdvU64Ex(void) {}


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

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

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

LLVM IR (-O2):
define void @RTRandAdvU64Ex() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_version() { printf("octo v%s\n", "1.0"); }


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

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"octo v%s\0A\00"
@.str.1 = [4 x i8] c"1.0\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"octo v%s\0A\00"
@.str.1 = [4 x i8] c"1.0\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *);
int main() {
  int c;
  while ((c = getchar()) != EOF)
    printf("\a");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1159 <main+0x39>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1155 <main+0x35>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x7,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [2 x i8] c"\07\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %3
9: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %9, label %4
4: ; preds = %0, %4
%5 = tail call i32 @putchar(i32 7)
%6 = tail call i32 (...) @getchar()
%7 = load i32, i32* @EOF
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %4
9: ; preds = %4, %0
ret i32 0
}
/* Type definitions */
struct Context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pop();
int /*<<< orphan*/ push_nil();
int /*<<< orphan*/ push_t();
scalar_t__ wcscasecmp(int /*<<< orphan*/, char *);
void builtin_not(struct Context *ctx, unsigned int stack_track) {
  if (stack_track == 1) {
    if (wcscasecmp(pop(), L"nil") == 0)
      push_t();
    else
      push_nil();
  } else {
    push_nil();
  }
}


x86 assembly (clang, -O0):
<builtin_not>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1190 <builtin_not+0x50>
mov    $0x0,%al
call   1030 <pop@plt>
mov    %eax,%edi
lea    0xe97(%rip),%rsi
call   1040 <wcscasecmp@plt>
cmp    $0x0,%rax
jne    1184 <builtin_not+0x44>
mov    $0x0,%al
call   1050 <push_t@plt>
jmp    118b <builtin_not+0x4b>
mov    $0x0,%al
call   1060 <push_nil@plt>
jmp    1197 <builtin_not+0x57>
mov    $0x0,%al
call   1060 <push_nil@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<builtin_not>:
cmp    $0x1,%esi
jne    1165 <builtin_not+0x25>
push   %rax
xor    %eax,%eax
call   1030 <pop@plt>
lea    0xeac(%rip),%rsi
mov    %eax,%edi
call   1040 <wcscasecmp@plt>
test   %rax,%rax
lea    0x8(%rsp),%rsp
je     116c <builtin_not+0x2c>
xor    %eax,%eax
jmp    1060 <push_nil@plt>
xor    %eax,%eax
jmp    1050 <push_t@plt>

LLVM IR (-O0):
%struct.Context = type { i32 }
@.str = [4 x i32] [i32 110, i32 105, i32 108, i32 0]
define void @builtin_not(%struct.Context* %0, i32 %1) {
%3 = alloca %struct.Context*
%4 = alloca i32
store %struct.Context* %0, %struct.Context** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = call i32 (...) @pop()
%9 = call i64 @wcscasecmp(i32 %8, i8* bitcast ([4 x i32]* @.str to i8*))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 (...) @push_t()
br label %15
13: ; preds = %7
%14 = call i32 (...) @push_nil()
br label %15
15: ; preds = %13, %11
br label %18
16: ; preds = %2
%17 = call i32 (...) @push_nil()
br label %18
18: ; preds = %16, %15
ret void
}

LLVM IR (-O2):
%struct.Context = type { i32 }
@.str = [4 x i32] [i32 110, i32 105, i32 108, i32 0]
define void @builtin_not(%struct.Context* nocapture readnone %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = tail call i32 (...) @pop()
%6 = tail call i64 @wcscasecmp(i32 %5, i8* bitcast ([4 x i32]* @.str to i8*))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 (...) @push_t()
br label %14
10: ; preds = %4
%11 = tail call i32 (...) @push_nil()
br label %14
12: ; preds = %2
%13 = tail call i32 (...) @push_nil()
br label %14
14: ; preds = %8, %10, %12
ret void
}
int __hscore_long_path_size() { return 4096; }


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

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

LLVM IR (-O0):
define i32 @__hscore_long_path_size() {
ret i32 4096
}

LLVM IR (-O2):
define i32 @__hscore_long_path_size() {
ret i32 4096
}
void gtk_widget_set_accel_path() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_set_accel_path() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RegReadA_LC898122AF(int, unsigned char *);
void AccWit(unsigned char UcTrgDat) {
  unsigned char UcFlgVal;
  UcFlgVal = 1;
  while (UcFlgVal) {
    RegReadA_LC898122AF(0x0282, &UcFlgVal);
    UcFlgVal &= UcTrgDat;
  };
}


x86 assembly (clang, -O0):
<AccWit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x1,-0x2(%rbp)
cmpb   $0x0,-0x2(%rbp)
je     114c <AccWit+0x3c>
mov    $0x282,%edi
lea    -0x2(%rbp),%rsi
call   1030 <RegReadA_LC898122AF@plt>
movzbl -0x1(%rbp),%ecx
movzbl -0x2(%rbp),%eax
and    %ecx,%eax
mov    %al,-0x2(%rbp)
jmp    1122 <AccWit+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AccWit>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
movb   $0x1,0x7(%rsp)
lea    0x7(%rsp),%r14
mov    $0x282,%edi
mov    %r14,%rsi
call   1030 <RegReadA_LC898122AF@plt>
and    %bl,0x7(%rsp)
jne    1120 <AccWit+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @AccWit(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
store i8 1, i8* %3
br label %4
4: ; preds = %7, %1
%5 = load i8, i8* %3
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = call i32 @RegReadA_LC898122AF(i32 642, i8* %3)
%9 = load i8, i8* %2
%10 = zext i8 %9 to i32
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = and i32 %12, %10
%14 = trunc i32 %13 to i8
store i8 %14, i8* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @AccWit(i8 zeroext %0) {
%2 = alloca i8
store i8 1, i8* %2
br label %3
3: ; preds = %1, %3
%4 = call i32 @RegReadA_LC898122AF(i32 642, i8* %2)
%5 = load i8, i8* %2
%6 = and i8 %5, %0
store i8 %6, i8* %2
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
void RTPathAppend(void) {}


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

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

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

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

/* Variables and functions */
int cs(struct can_frame);
int is_download_segment_response(struct can_frame frame) {
  return cs(frame) == 1;
}


x86 assembly (clang, -O0):
<is_download_segment_response>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <cs@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_download_segment_response>:
push   %rax
call   1030 <cs@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.can_frame = type { i32 }
define i32 @is_download_segment_response(i32 %0) {
%2 = alloca %struct.can_frame
%3 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %2, i32 0, i32 0
store i32 %0, i32* %3
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %2, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @cs(i32 %5)
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_download_segment_response(i32 %0) {
%2 = tail call i32 @cs(i32 %0)
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct cstr_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cstr_appendm(struct cstr_t *, int /*<<< orphan*/,
                                char const *);
int /*<<< orphan*/ cstr_clear(struct cstr_t *);
int /*<<< orphan*/ strlen(char const *);
void cstr_assignstr(struct cstr_t *dst, const char *src) {
  ;
  cstr_clear(dst);
  cstr_appendm(dst, strlen(src), src);
  { return; };
}


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

x86 assembly (clang, -O2):
<cstr_assignstr>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <cstr_clear@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <cstr_appendm@plt>

LLVM IR (-O0):
%struct.cstr_t = type { i32 }
define void @cstr_assignstr(%struct.cstr_t* %0, i8* %1) {
%3 = alloca %struct.cstr_t*
%4 = alloca i8*
store %struct.cstr_t* %0, %struct.cstr_t** %3
store i8* %1, i8** %4
%5 = load %struct.cstr_t*, %struct.cstr_t** %3
%6 = call i32 @cstr_clear(%struct.cstr_t* %5)
%7 = load %struct.cstr_t*, %struct.cstr_t** %3
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = load i8*, i8** %4
%11 = call i32 @cstr_appendm(%struct.cstr_t* %7, i32 %9, i8* %10)
ret void
}

LLVM IR (-O2):
%struct.cstr_t = type { i32 }
define void @cstr_assignstr(%struct.cstr_t* %0, i8* %1) {
%3 = tail call i32 @cstr_clear(%struct.cstr_t* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i32 @cstr_appendm(%struct.cstr_t* %0, i32 %4, i8* %1)
ret void
}
short test_69_2(short *mem) { return __atomic_fetch_xor(mem + 0, -1, 4); }


x86 assembly (clang, -O0):
<test_69_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movw   $0xffff,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,-0x10(%rbp)
mov    (%rax),%ax
mov    %ax,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x24(%rbp)
xor    %esi,%edx
mov    %edx,-0x20(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x1a(%rbp)
test   $0x1,%cl
mov    %ax,-0xe(%rbp)
jne    115d <test_69_2+0x5d>
jmp    1125 <test_69_2+0x25>
mov    -0x1a(%rbp),%ax
mov    %ax,-0xc(%rbp)
movswl -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_69_2>:
movzwl (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
not    %ecx
lock cmpxchg %cx,(%rdi)
jne    1110 <test_69_2+0x10>
ret

LLVM IR (-O0):
define signext i16 @test_69_2(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 0
store i16 -1, i16* %3
%7 = load i16, i16* %3
%8 = atomicrmw xor i16* %6, i16 %7 acq_rel
store i16 %8, i16* %4
%9 = load i16, i16* %4
ret i16 %9
}

LLVM IR (-O2):
define signext i16 @test_69_2(i16* nocapture %0) {
%2 = atomicrmw xor i16* %0, i16 -1 acq_rel
ret i16 %2
}
int config_CARDREADER_MP35(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_CARDREADER_MP35() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __NR_socket;
int syscall(int /*<<< orphan*/, int, int, int);
__attribute__((always_)) int _syscall_socket(int domain, int type,
                                             int protocol) {
  return syscall(__NR_socket, domain, type, protocol);
}


x86 assembly (clang, -O0):
<_syscall_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_socket>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ecb(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@__NR_socket = global i32 0
define i32 @_syscall_socket(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @__NR_socket
%5 = tail call i32 @syscall(i32 %4, i32 %0, i32 %1, i32 %2)
ret i32 %5
}
void debug_isoc_completed(struct imx21 *imx21, int frame, struct td *td, int cc,
                          int len) {}


x86 assembly (clang, -O0):
<debug_isoc_completed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.imx21 = type opaque
%struct.td = type opaque
define void @debug_isoc_completed(%struct.imx21* %0, i32 %1, %struct.td* %2, i32 %3, i32 %4) {
%6 = alloca %struct.imx21*
%7 = alloca i32
%8 = alloca %struct.td*
%9 = alloca i32
%10 = alloca i32
store %struct.imx21* %0, %struct.imx21** %6
store i32 %1, i32* %7
store %struct.td* %2, %struct.td** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret void
}

LLVM IR (-O2):
%struct.imx21 = type opaque
%struct.td = type opaque
define void @debug_isoc_completed(%struct.imx21* nocapture %0, i32 %1, %struct.td* nocapture %2, i32 %3, i32 %4) {
ret void
}
/* Variables and functions */
double O2_z(double, double, double, double);
double O3_y(double sign, double xi, double et, double qq) {
  return O2_z(sign, xi, et, qq);
}


x86 assembly (clang, -O0):
<O3_y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1030 <O2_z@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<O3_y>:
jmp    1030 <O2_z@plt>

LLVM IR (-O0):
define double @O3_y(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call double @O2_z(double %9, double %10, double %11, double %12)
ret double %13
}

LLVM IR (-O2):
define double @O3_y(double %0, double %1, double %2, double %3) {
%5 = tail call double @O2_z(double %0, double %1, double %2, double %3)
ret double %5
}
float ftk_interpolator_bounce_calc(float percent) {
  return 8 * percent * percent;
}


x86 assembly (clang, -O0):
<ftk_interpolator_bounce_calc>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftk_interpolator_bounce_calc>:
movss  0xef8(%rip),%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @ftk_interpolator_bounce_calc(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 8.000000e+00, %3
%5 = load float, float* %2
%6 = fmul float %4, %5
ret float %6
}

LLVM IR (-O2):
define float @ftk_interpolator_bounce_calc(float %0) {
%2 = fmul float %0, 8.000000e+00
%3 = fmul float %2, %0
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test1();
int main(void) {
  printf("test1()\n");
  test1();
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <test1@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [8 x i8] c"test1()\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @test1()
%3 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ nondet_int();
main() {
  int x = nondet_int();
  int *p = &x;
  while (x < 100) {
    (*p)++;
  }
  assert(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    115b <main+0x3b>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    1141 <main+0x21>
xor    %edi,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32 (...) @nondet_int()
store i32 %4, i32* %2
store i32* %2, i32** %3
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = add nsw i32 %10, 1
store i32 %11, i32* %9
br label %5
12: ; preds = %5
%13 = call i32 @assert(i32 0)
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @nondet_int()
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
char charAt(char *s, int n) { return *(s + n); }


x86 assembly (clang, -O0):
<charAt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charAt>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
define signext i8 @charAt(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @charAt(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
ret i8 %5
}
int simple_square(int number) { return (number * number); }


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

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

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

LLVM IR (-O2):
define i32 @simple_square(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
int mtime_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mtime_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printHex(int readBytes, char *buffer) {
  int print = 0;
  if (print) {
    printf("Number of bytes read: %i\n", readBytes);
    printf("Hex representation: ");
    int x;
    for (x = 0; x < readBytes; x++) {
      printf("%02x ", (unsigned char)buffer[x]);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<printHex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1198 <printHex+0x88>
mov    -0x4(%rbp),%esi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    118a <printHex+0x7a>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1156 <printHex+0x46>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"Number of bytes read: %i\0A\00"
@.str.1 = [21 x i8] c"Hex representation: \00"
@.str.2 = [6 x i8] c"%02x \00"
@.str.3 = [2 x i8] c"\0A\00"
define void @printHex(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 0, i32* %5
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %30
9: ; preds = %2
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %6
br label %13
13: ; preds = %25, %9
%14 = load i32, i32* %6
%15 = load i32, i32* %3
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %28
17: ; preds = %13
%18 = load i8*, i8** %4
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %23)
br label %25
25: ; preds = %17
%26 = load i32, i32* %6
%27 = add nsw i32 %26, 1
store i32 %27, i32* %6
br label %13
28: ; preds = %13
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %30
30: ; preds = %28, %2
ret void
}

LLVM IR (-O2):
define void @printHex(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int find_file_in_list(char const *, int, char **);
int file_exists_in_list(const char *file, int argc, char **argv) {
  if (argc <= 0)
    return 1;
  return find_file_in_list(file, argc, argv);
}


x86 assembly (clang, -O0):
<file_exists_in_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     1139 <file_exists_in_list+0x29>
movl   $0x1,-0x4(%rbp)
jmp    114c <file_exists_in_list+0x3c>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1030 <find_file_in_list@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists_in_list>:
test   %esi,%esi
jle    1119 <file_exists_in_list+0x9>
jmp    1030 <find_file_in_list@plt>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @file_exists_in_list(i8* %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
%8 = load i32, i32* %6
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %3
store i32 1, i32* %4
br label %16
11: ; preds = %3
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = load i8**, i8*** %7
%15 = call i32 @find_file_in_list(i8* %12, i32 %13, i8** %14)
store i32 %15, i32* %4
br label %16
16: ; preds = %11, %10
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
define i32 @file_exists_in_list(i8* %0, i32 %1, i8** %2) {
%4 = icmp slt i32 %1, 1
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @find_file_in_list(i8* %0, i32 %1, i8** %2)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ %6, %5 ], [ 1, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void showAsciiTable(void) {
  int dec = 0;
  char character = 0;
  printf("Char - Dec");
  while (dec <= 255) {
    printf("\n%c - %d", character, dec);
    dec++;
    character++;
  }
}


x86 assembly (clang, -O0):
<showAsciiTable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0xff,-0x4(%rbp)
jg     1169 <showAsciiTable+0x59>
movsbl -0x5(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    1131 <showAsciiTable+0x21>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showAsciiTable>:
push   %rbp
push   %r14
push   %rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%r14
xor    %ebx,%ebx
xor    %ebp,%ebp
nopl   (%rax)
mov    %ebx,%esi
sar    $0x18,%esi
mov    %r14,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebp
add    $0x1000000,%ebx
cmp    $0x100,%ebp
jne    1130 <showAsciiTable+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"Char - Dec\00"
@.str.1 = [9 x i8] c"\0A%c - %d\00"
define void @showAsciiTable() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %7, %2 ]
%4 = shl i32 %3, 24
%5 = ashr exact i32 %4, 24
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %3)
%7 = add nuw nsw i32 %3, 1
%8 = icmp eq i32 %7, 256
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}
/* Variables and functions */
size_t base64_encode_len(size_t len) { return len > 0 ? (len + 2) / 3 * 4 : 0; }


x86 assembly (clang, -O0):
<base64_encode_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jbe    1132 <base64_encode_len+0x32>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
shl    $0x2,%rax
mov    %rax,-0x10(%rbp)
jmp    113d <base64_encode_len+0x3d>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    113d <base64_encode_len+0x3d>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_encode_len>:
test   %rdi,%rdi
je     1124 <base64_encode_len+0x24>
add    $0x2,%rdi
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mov    %rdi,%rax
mul    %rcx
mov    %rdx,%rax
add    %rdx,%rax
and    $0xfffffffffffffffc,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @base64_encode_len(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ugt i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i64, i64* %2
%7 = add i64 %6, 2
%8 = udiv i64 %7, 3
%9 = mul i64 %8, 4
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %5
%12 = phi i64 [ %9, %5 ], [ 0, %10 ]
ret i64 %12
}

LLVM IR (-O2):
define i64 @base64_encode_len(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add i64 %0, 2
%5 = udiv i64 %4, 3
%6 = shl i64 %5, 2
br label %7
7: ; preds = %1, %3
%8 = phi i64 [ %6, %3 ], [ 0, %1 ]
ret i64 %8
}