xunge/DecIR huggingface dataset:
void processEventsWhileBlocked(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               99, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<processEventsWhileBlocked>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x63,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<processEventsWhileBlocked>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x63,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.processEventsWhileBlocked = [26 x i8] c"processEventsWhileBlocked\00"
define void @processEventsWhileBlocked() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 99, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @__func__.processEventsWhileBlocked, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.processEventsWhileBlocked = [26 x i8] c"processEventsWhileBlocked\00"
define void @processEventsWhileBlocked() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 99, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @__func__.processEventsWhileBlocked, i64 0, i64 0))
ret void
}
/* Type definitions */
struct dep {
  int dummy;
};

/* Variables and functions */
int check_in_no_cards(struct dep *, char);
int is_menu_default_yes(struct dep *dep) { return check_in_no_cards(dep, '#'); }


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

x86 assembly (clang, -O2):
<is_menu_default_yes>:
mov    $0x23,%esi
jmp    1030 <check_in_no_cards@plt>

LLVM IR (-O0):
%struct.dep = type { i32 }
define i32 @is_menu_default_yes(%struct.dep* %0) {
%2 = alloca %struct.dep*
store %struct.dep* %0, %struct.dep** %2
%3 = load %struct.dep*, %struct.dep** %2
%4 = call i32 @check_in_no_cards(%struct.dep* %3, i8 signext 35)
ret i32 %4
}

LLVM IR (-O2):
%struct.dep = type { i32 }
define i32 @is_menu_default_yes(%struct.dep* %0) {
%2 = tail call i32 @check_in_no_cards(%struct.dep* %0, i8 signext 35)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ __gnat_install_handler_common(int, int);
void __gnat_install_handler(void) { __gnat_install_handler_common(0x18, 0x12); }


x86 assembly (clang, -O0):
<__gnat_install_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x18,%edi
mov    $0x12,%esi
call   1030 <__gnat_install_handler_common@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gnat_install_handler>:
mov    $0x18,%edi
mov    $0x12,%esi
jmp    1030 <__gnat_install_handler_common@plt>

LLVM IR (-O0):
define void @__gnat_install_handler() {
%1 = call i32 @__gnat_install_handler_common(i32 24, i32 18)
ret void
}

LLVM IR (-O2):
define void @__gnat_install_handler() {
%1 = tail call i32 @__gnat_install_handler_common(i32 24, i32 18)
ret void
}
char *cstr(a, b)
char *const a;
const char *const b;
{
  if (a)
    tfree(a);
  return tstrdup(b);
}


x86 assembly (clang, -O0):
<cstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1146 <cstr+0x26>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <tfree@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <tstrdup@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cstr>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
je     1130 <cstr+0x10>
xor    %eax,%eax
call   1040 <tfree@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <tstrdup@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
define i8* @cstr(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @tfree to i32 (i8*, ...)*)(i8* %8)
br label %10
10: ; preds = %7, %2
%11 = load i8*, i8** %4
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @tstrdup to i32 (i8*, ...)*)(i8* %11)
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
ret i8* %14
}

LLVM IR (-O2):
define i8* @cstr(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @tfree to i32 (i8*, ...)*)(i8* %0)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @tstrdup to i32 (i8*, ...)*)(i8* %1)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}
int num_boxes(int len) {
  int aux = 0;
  if (len == 0)
    return 0;
  aux = len / 3;
  if (aux == 0)
    return 1;
  if (len % 3 == 0)
    return aux;
  else
    return aux + 1;
}


x86 assembly (clang, -O0):
<num_boxes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <num_boxes+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1170 <num_boxes+0x70>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1148 <num_boxes+0x48>
movl   $0x1,-0x4(%rbp)
jmp    1170 <num_boxes+0x70>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1167 <num_boxes+0x67>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <num_boxes+0x70>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_boxes>:
test   %edi,%edi
je     113e <num_boxes+0x3e>
lea    0x2(%rdi),%ecx
mov    $0x1,%eax
cmp    $0x5,%ecx
jb     113d <num_boxes+0x3d>
movslq %edi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
imul   $0xaaaaaaab,%edi,%ecx
add    $0x2aaaaaaa,%ecx
cmp    $0x55555555,%ecx
sbb    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @num_boxes(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %23
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sdiv i32 %9, 3
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 1, i32* %2
br label %23
14: ; preds = %8
%15 = load i32, i32* %3
%16 = srem i32 %15, 3
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = load i32, i32* %4
store i32 %19, i32* %2
br label %23
20: ; preds = %14
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %23
23: ; preds = %20, %18, %13, %7
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @num_boxes(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = add i32 %0, 2
%5 = icmp ult i32 %4, 5
br i1 %5, label %12, label %6
6: ; preds = %3
%7 = sdiv i32 %0, 3
%8 = srem i32 %0, 3
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
%11 = add nsw i32 %7, %10
br label %12
12: ; preds = %6, %3, %1
%13 = phi i32 [ 0, %1 ], [ 1, %3 ], [ %11, %6 ]
ret i32 %13
}
void ext_fun2(void) {}


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

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

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

LLVM IR (-O2):
define void @ext_fun2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
scalar_t__ nrealloc(char *, int);
int strlen(char *);
void align(char **strp) {
  assert(strp != NULL);
  if (*strp != NULL)
    *strp = (char *)nrealloc(*strp, (strlen(*strp) + 1) * sizeof(char));
}


x86 assembly (clang, -O0):
<align>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1191 <align+0x61>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%esi
call   1050 <nrealloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<align>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1040 <assert@plt>
mov    (%r14),%rbx
test   %rbx,%rbx
je     1163 <align+0x33>
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%esi
mov    %rbx,%rdi
call   1050 <nrealloc@plt>
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @align(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = icmp ne i8** %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i8**, i8*** %2
%8 = load i8*, i8** %7
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %23
10: ; preds = %1
%11 = load i8**, i8*** %2
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %2
%14 = load i8*, i8** %13
%15 = call i32 @strlen(i8* %14)
%16 = add nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = mul i64 %17, 1
%19 = trunc i64 %18 to i32
%20 = call i64 @nrealloc(i8* %12, i32 %19)
%21 = inttoptr i64 %20 to i8*
%22 = load i8**, i8*** %2
store i8* %21, i8** %22
br label %23
23: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
define void @align(i8** %0) {
%2 = icmp ne i8** %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = load i8*, i8** %0
%6 = icmp eq i8* %5, null
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = tail call i32 @strlen(i8* %5)
%9 = add nsw i32 %8, 1
%10 = tail call i64 @nrealloc(i8* %5, i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %0
br label %12
12: ; preds = %7, %1
ret void
}
char *test5_helper() { return "TESTstring\n"; }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"TESTstring\0A\00"
define i8* @test5_helper() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"TESTstring\0A\00"
define i8* @test5_helper() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ LLONG_MAX;
int /*<<< orphan*/ LLONG_MIN;
long long getllr(int /*<<< orphan*/, int /*<<< orphan*/);
long long getll() { return getllr(LLONG_MIN, LLONG_MAX); }


x86 assembly (clang, -O0):
<getll>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
call   1030 <getllr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getll>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
jmp    1030 <getllr@plt>

LLVM IR (-O0):
@LLONG_MIN = global i32 0
@LLONG_MAX = global i32 0
define i64 @getll() {
%1 = load i32, i32* @LLONG_MIN
%2 = load i32, i32* @LLONG_MAX
%3 = call i64 @getllr(i32 %1, i32 %2)
ret i64 %3
}

LLVM IR (-O2):
@LLONG_MIN = global i32 0
@LLONG_MAX = global i32 0
define i64 @getll() {
%1 = load i32, i32* @LLONG_MIN
%2 = load i32, i32* @LLONG_MAX
%3 = tail call i64 @getllr(i32 %1, i32 %2)
ret i64 %3
}
/* Variables and functions */
float sqrt(float const);
float magnitude_v3f(const float *x) {
  return sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]);
}


x86 assembly (clang, -O0):
<magnitude_v3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<magnitude_v3f>:
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     113f <magnitude_v3f+0x2f>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define float @magnitude_v3f(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = fmul float %11, %14
%16 = call float @llvm.fmuladd.f32(float %5, float %8, float %15)
%17 = load float*, float** %2
%18 = getelementptr inbounds float, float* %17, i64 2
%19 = load float, float* %18
%20 = load float*, float** %2
%21 = getelementptr inbounds float, float* %20, i64 2
%22 = load float, float* %21
%23 = call float @llvm.fmuladd.f32(float %19, float %22, float %16)
%24 = call float @sqrt(float %23)
ret float %24
}

LLVM IR (-O2):
define float @magnitude_v3f(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = fmul float %4, %4
%6 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %5)
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = tail call float @llvm.fmuladd.f32(float %8, float %8, float %6)
%10 = tail call float @sqrt(float %9)
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void rh_free(void *p) { free(p); }


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

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

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

LLVM IR (-O2):
define void @rh_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void GX_End() {}


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

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

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

LLVM IR (-O2):
define void @GX_End() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long serial;
};
typedef TYPE_1__ XKeyReleasedEvent;

/* Variables and functions */
void set_XKeyReleasedEvent_serial(void *_p, unsigned long _v) {
  ((XKeyReleasedEvent *)_p)->serial = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XKeyReleasedEvent_serial>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XKeyReleasedEvent_serial(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XKeyReleasedEvent_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int CANRegRead(unsigned long);
int /*<<< orphan*/ CANRegWrite(unsigned long, int);
void CANEnable(unsigned long ulBase) {
  ;
  CANRegWrite(ulBase + 0x00000000,
              CANRegRead(ulBase + 0x00000000) & ~0x00000001);
}


x86 assembly (clang, -O0):
<CANEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x0,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x0,%rdi
call   1040 <CANRegRead@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
and    $0xfffffffe,%esi
call   1030 <CANRegWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CANEnable>:
push   %rbx
mov    %rdi,%rbx
call   1040 <CANRegRead@plt>
and    $0xfffffffe,%eax
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <CANRegWrite@plt>

LLVM IR (-O0):
define void @CANEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 0
%5 = load i64, i64* %2
%6 = add i64 %5, 0
%7 = call i32 @CANRegRead(i64 %6)
%8 = and i32 %7, -2
%9 = call i32 @CANRegWrite(i64 %4, i32 %8)
ret void
}

LLVM IR (-O2):
define void @CANEnable(i64 %0) {
%2 = tail call i32 @CANRegRead(i64 %0)
%3 = and i32 %2, -2
%4 = tail call i32 @CANRegWrite(i64 %0, i32 %3)
ret void
}
float inHg2hPa(float inHg) {
  if (inHg < 0)
    return inHg;
  return inHg * 33.8639;
}


x86 assembly (clang, -O0):
<inHg2hPa>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1125 <inHg2hPa+0x25>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1143 <inHg2hPa+0x43>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeca(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<inHg2hPa>:
cvtss2sd %xmm0,%xmm1
mulsd  0xef4(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
xorps  %xmm2,%xmm2
movaps %xmm0,%xmm3
cmpltss %xmm2,%xmm3
andps  %xmm3,%xmm0
andnps %xmm1,%xmm3
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @inHg2hPa(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp olt float %4, 0.000000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load float, float* %3
store float %7, float* %2
br label %13
8: ; preds = %1
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = fmul double %10, 3.386390e+01
%12 = fptrunc double %11 to float
store float %12, float* %2
br label %13
13: ; preds = %8, %6
%14 = load float, float* %2
ret float %14
}

LLVM IR (-O2):
define float @inHg2hPa(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fpext float %0 to double
%4 = fmul double %3, 3.386390e+01
%5 = fptrunc double %4 to float
%6 = select i1 %2, float %0, float %5
ret float %6
}
/* Variables and functions */
char *is_another_param(char **);
char *next_param(char ***argv) {
  char *c;
  if ((c = is_another_param(*argv))) {
    (*argv)++;
    return c;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<next_param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <is_another_param@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1151 <next_param+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <next_param+0x49>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_param>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <is_another_param@plt>
test   %rax,%rax
je     1125 <next_param+0x15>
addq   $0x8,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @next_param(i8*** nocapture %0) {
%2 = load i8**, i8*** %0
%3 = tail call i8* @is_another_param(i8** %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i8**, i8*** %0
%7 = getelementptr inbounds i8*, i8** %6, i64 1
store i8** %7, i8*** %0
br label %8
8: ; preds = %1, %5
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fputc(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
main() {
  int i;
  for (i = 0; i < 10000; i++)
    fputc(0, stdout);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2710,-0x8(%rbp)
jge    1151 <main+0x41>
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x2710,%ebx
mov    0x2ec0(%rip),%r14
mov    (%r14),%esi
xor    %edi,%edi
call   1030 <fputc@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputc(i32 0, i32 %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 10000
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void htmlHeaderNocache(char *title) {
  printf("Content-type: text/html\n\n<HTML><HEAD>\n<META HTTP-EQUIV=\"PRAGMA\" "
         "CONTENT=\"NO-CACHE\"><meta http-equiv=\"Expires\" "
         "CONTENT=\"-1\">\n<TITLE>%s</TITLE>\n</HEAD>",
         title);
}


x86 assembly (clang, -O0):
<htmlHeaderNocache>:
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):
<htmlHeaderNocache>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [150 x i8] c"Content-type: text/html\0A\0A<HTML><HEAD>\0A<META HTTP-EQUIV=\22PRAGMA\22 CONTENT=\22NO-CACHE\22><meta http-equiv=\22Expires\22 CONTENT=\22-1\22>\0A<TITLE>%s</TITLE>\0A</HEAD>\00"
define void @htmlHeaderNocache(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [150 x i8] c"Content-type: text/html\0A\0A<HTML><HEAD>\0A<META HTTP-EQUIV=\22PRAGMA\22 CONTENT=\22NO-CACHE\22><meta http-equiv=\22Expires\22 CONTENT=\22-1\22>\0A<TITLE>%s</TITLE>\0A</HEAD>\00"
define void @htmlHeaderNocache(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
double aint(double *x) {
  double floor(), ceil();
  return (*x >= 0 ? floor(*x) : ceil(*x));
}


x86 assembly (clang, -O0):
<aint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1158 <aint+0x38>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    116a <aint+0x4a>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aint>:
movsd  (%rdi),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    1133 <aint+0x13>
jmp    1030 <ceil@plt>
jmp    1040 <floor@plt>

LLVM IR (-O0):
define double @aint(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double, double* %3
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double*, double** %2
%8 = load double, double* %7
%9 = call double @llvm.floor.f64(double %8)
br label %14
10: ; preds = %1
%11 = load double*, double** %2
%12 = load double, double* %11
%13 = call double @llvm.ceil.f64(double %12)
br label %14
14: ; preds = %10, %6
%15 = phi double [ %9, %6 ], [ %13, %10 ]
ret double %15
}

LLVM IR (-O2):
define double @aint(double* nocapture %0) {
%2 = load double, double* %0
%3 = fcmp ult double %2, 0.000000e+00
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call double @llvm.floor.f64(double %2)
br label %8
6: ; preds = %1
%7 = tail call double @llvm.ceil.f64(double %2)
br label %8
8: ; preds = %6, %4
%9 = phi double [ %5, %4 ], [ %7, %6 ]
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void __stack_chk_fail(void) { write(1, "Stack smashin' detected!\n", 25); }


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

x86 assembly (clang, -O2):
<__stack_chk_fail>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0x19,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Stack smashin' detected!\0A\00"
define void @__stack_chk_fail() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 25)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Stack smashin' detected!\0A\00"
define void @__stack_chk_fail() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 25)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void banner(void) {
  printf("\n"
         " ================================================================\n"
         "  upc_keys // WPA2 passphrase recovery tool for UPC%%07d devices \n"
         " ================================================================\n"
         "  by blasty <peter@haxx.in>\n\n");
}


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

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

LLVM IR (-O0):
@.str = [229 x i8] c"\0A ================================================================\0A upc_keys // WPA2 passphrase recovery tool for UPC%%07d devices \0A ================================================================\0A by blasty <peter@haxx.in>\0A\0A\00"
define void @banner() {
%1 = call i32 @printf(i8* getelementptr inbounds ([229 x i8], [229 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [229 x i8] c"\0A ================================================================\0A upc_keys // WPA2 passphrase recovery tool for UPC%%07d devices \0A ================================================================\0A by blasty <peter@haxx.in>\0A\0A\00"
define void @banner() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([229 x i8], [229 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char C2C(char);
__attribute__((__visibility__("default"))) __attribute__((used)) signed char
rC2C(signed char *x) {
  return C2C(*x);
}


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

x86 assembly (clang, -O2):
<rC2C>:
movsbl (%rdi),%edi
jmp    1030 <C2C@plt>

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i8 (i8*)* @rC2C to i8*)], section "llvm.metadata"
define signext i8 @rC2C(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = call signext i8 @C2C(i8 signext %4)
ret i8 %5
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i8 (i8*)* @rC2C to i8*)], section "llvm.metadata"
define signext i8 @rC2C(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call signext i8 @C2C(i8 signext %2)
ret i8 %3
}
/* Variables and functions */
int pow(float, int);
float pr(int r, float alpha, int CW) {
  return (1 - alpha) * pow(alpha, CW) * pow(alpha, 0 - r) /
         (1 - pow(alpha, CW));
}


x86 assembly (clang, -O0):
<pr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movss  0xed5(%rip),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1030 <pow@plt>
movss  -0x18(%rbp),%xmm0
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
xor    %edi,%edi
sub    -0x4(%rbp),%edi
call   1030 <pow@plt>
movss  -0x14(%rbp),%xmm0
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1030 <pow@plt>
movss  -0x10(%rbp),%xmm0
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
movss  %xmm0,0x4(%rsp)
mov    %edi,%ebp
movss  0xedb(%rip),%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
mov    %esi,%edi
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  (%rsp),%xmm0
movss  %xmm0,(%rsp)
neg    %ebp
movss  0x4(%rsp),%xmm0
mov    %ebp,%edi
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  (%rsp),%xmm0
movss  %xmm0,(%rsp)
movss  0x4(%rsp),%xmm0
mov    %ebx,%edi
call   1030 <pow@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm1,%xmm1
cvtsi2ss %ecx,%xmm1
movss  (%rsp),%xmm0
divss  %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define float @pr(i32 %0, float %1, i32 %2) {
%4 = alloca i32
%5 = alloca float
%6 = alloca i32
store i32 %0, i32* %4
store float %1, float* %5
store i32 %2, i32* %6
%7 = load float, float* %5
%8 = fsub float 1.000000e+00, %7
%9 = load float, float* %5
%10 = load i32, i32* %6
%11 = call i32 @pow(float %9, i32 %10)
%12 = sitofp i32 %11 to float
%13 = fmul float %8, %12
%14 = load float, float* %5
%15 = load i32, i32* %4
%16 = sub nsw i32 0, %15
%17 = call i32 @pow(float %14, i32 %16)
%18 = sitofp i32 %17 to float
%19 = fmul float %13, %18
%20 = load float, float* %5
%21 = load i32, i32* %6
%22 = call i32 @pow(float %20, i32 %21)
%23 = sub nsw i32 1, %22
%24 = sitofp i32 %23 to float
%25 = fdiv float %19, %24
ret float %25
}

LLVM IR (-O2):
define float @pr(i32 %0, float %1, i32 %2) {
%4 = fsub float 1.000000e+00, %1
%5 = tail call i32 @pow(float %1, i32 %2)
%6 = sitofp i32 %5 to float
%7 = fmul float %4, %6
%8 = sub nsw i32 0, %0
%9 = tail call i32 @pow(float %1, i32 %8)
%10 = sitofp i32 %9 to float
%11 = fmul float %7, %10
%12 = tail call i32 @pow(float %1, i32 %2)
%13 = sub nsw i32 1, %12
%14 = sitofp i32 %13 to float
%15 = fdiv float %11, %14
ret float %15
}
long binario(int num) {
  if (num == 0)
    return 0;
  return (num % 2) + 10 * binario(num / 2);
}


x86 assembly (clang, -O0):
<binario>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1132 <binario+0x22>
movq   $0x0,-0x8(%rbp)
jmp    1168 <binario+0x58>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <binario@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
imul   $0xa,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binario>:
test   %edi,%edi
je     1139 <binario+0x29>
push   %rbx
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
mov    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%edi
movslq %edi,%rbx
sar    %eax
mov    %eax,%edi
call   1030 <binario@plt>
lea    (%rax,%rax,4),%rax
lea    (%rbx,%rax,2),%rax
pop    %rbx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @binario(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 0, i64* %2
br label %16
7: ; preds = %1
%8 = load i32, i32* %3
%9 = srem i32 %8, 2
%10 = sext i32 %9 to i64
%11 = load i32, i32* %3
%12 = sdiv i32 %11, 2
%13 = call i64 @binario(i32 %12)
%14 = mul nsw i64 10, %13
%15 = add nsw i64 %10, %14
store i64 %15, i64* %2
br label %16
16: ; preds = %7, %6
%17 = load i64, i64* %2
ret i64 %17
}

LLVM IR (-O2):
define i64 @binario(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi i64 [ %11, %5 ], [ 0, %1 ]
ret i64 %4
5: ; preds = %1
%6 = srem i32 %0, 2
%7 = sext i32 %6 to i64
%8 = sdiv i32 %0, 2
%9 = tail call i64 @binario(i32 %8)
%10 = mul nsw i64 %9, 10
%11 = add nsw i64 %10, %7
br label %3
}
void rotr(int *a, int *b, int *c) {
  int helper;
  int s_helper;
  helper = *a;
  s_helper = *b;
  *a = *c;
  *b = helper;
  *c = s_helper;
}


x86 assembly (clang, -O0):
<rotr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotr>:
mov    (%rdi),%r8d
mov    (%rsi),%ecx
mov    (%rdx),%eax
mov    %eax,(%rdi)
mov    %r8d,(%rsi)
mov    %ecx,(%rdx)
ret

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

LLVM IR (-O2):
define void @rotr(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = load i32, i32* %2
store i32 %6, i32* %0
store i32 %4, i32* %1
store i32 %5, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ butler();
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("I will summon the butler function.\n");
  butler();
  printf("Yes. Bring me some tea and writeable CD-ROMS.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"I will summon the butler function.\0A\00"
@.str.1 = [47 x i8] c"Yes. Bring me some tea and writeable CD-ROMS.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @butler()
%8 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [35 x i8] c"I will summon the butler function.\00"
@str.2 = [46 x i8] c"Yes. Bring me some tea and writeable CD-ROMS.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @butler()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
int div_cont(x) {
  int i, cont = 0;
  for (i = 1; i <= x; i++) {
    if (x % i == 0)
      cont++;
  }
  return cont;
}


x86 assembly (clang, -O0):
<div_cont>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     114d <div_cont+0x4d>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    113a <div_cont+0x3a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <div_cont+0x3f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <div_cont+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_cont>:
test   %edi,%edi
jle    1115 <div_cont+0x15>
mov    %edi,%r9d
cmp    $0x1,%edi
jne    1118 <div_cont+0x18>
mov    $0x1,%esi
xor    %ecx,%ecx
jmp    1153 <div_cont+0x53>
xor    %eax,%eax
ret
mov    %r9d,%r8d
and    $0xfffffffe,%r8d
mov    $0x1,%esi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
mov    %r9d,%eax
cltd
idiv   %esi
cmp    $0x1,%edx
adc    $0x0,%ecx
lea    0x1(%rsi),%edi
mov    %r9d,%eax
cltd
idiv   %edi
cmp    $0x1,%edx
adc    $0x0,%ecx
add    $0x2,%esi
cmp    %r8d,%edi
jne    1130 <div_cont+0x30>
test   $0x1,%r9b
je     1165 <div_cont+0x65>
mov    %r9d,%eax
cltd
idiv   %esi
cmp    $0x1,%edx
adc    $0x0,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @div_cont(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %34, label %3
3: ; preds = %1
%4 = and i32 %0, 1
%5 = icmp eq i32 %0, 1
br i1 %5, label %24, label %6
6: ; preds = %3
%7 = and i32 %0, -2
br label %8
8: ; preds = %8, %6
%9 = phi i32 [ 0, %6 ], [ %20, %8 ]
%10 = phi i32 [ 1, %6 ], [ %21, %8 ]
%11 = phi i32 [ 0, %6 ], [ %22, %8 ]
%12 = srem i32 %0, %10
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
%15 = add nuw nsw i32 %9, %14
%16 = add nuw i32 %10, 1
%17 = srem i32 %0, %16
%18 = icmp eq i32 %17, 0
%19 = zext i1 %18 to i32
%20 = add nuw nsw i32 %15, %19
%21 = add nuw i32 %10, 2
%22 = add i32 %11, 2
%23 = icmp eq i32 %22, %7
br i1 %23, label %24, label %8
24: ; preds = %8, %3
%25 = phi i32 [ undef, %3 ], [ %20, %8 ]
%26 = phi i32 [ 0, %3 ], [ %20, %8 ]
%27 = phi i32 [ 1, %3 ], [ %21, %8 ]
%28 = icmp eq i32 %4, 0
br i1 %28, label %34, label %29
29: ; preds = %24
%30 = srem i32 %0, %27
%31 = icmp eq i32 %30, 0
%32 = zext i1 %31 to i32
%33 = add nuw nsw i32 %26, %32
br label %34
34: ; preds = %29, %24, %1
%35 = phi i32 [ 0, %1 ], [ %25, %24 ], [ %33, %29 ]
ret i32 %35
}
/* Variables and functions */
int /*<<< orphan*/ q();
int main() {
  int i;
  for (i = 0; i < 10000000; i++)
    q();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x989680,-0x8(%rbp)
jge    1148 <main+0x38>
mov    $0x0,%al
call   1030 <q@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x989680,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <q@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 (...) @q()
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 10000000
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ c40_printf(char *);
void help() {
  c40_printf(
      "\n\nHydra_Mon Command summary :\n"
      "  Test =>              t\n"
      "  Configure =>         cf\n"
      "  Dump =>              d  start_addr #(of addresses to dump)\n"
      "  Enter =>             e  address\n"
      "  Fill =>              f  start_addr #(of addresses to fill) value\n"
      "  Copy =>              cp start1 start2 #(of addresses to copy)\n"
      "  Compare =>           c  start1 start2 #(of addresses to compare)\n"
      "  Search =>            s  from_address to_address for_data\n"
      "  Version =>           v\n");
}


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

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

LLVM IR (-O0):
@.str = [459 x i8] c"\0A\0AHydra_Mon Command summary :\0A Test => t\0A Configure => cf\0A Dump => d start_addr #(of addresses to dump)\0A Enter => e address\0A Fill => f start_addr #(of addresses to fill) value\0A Copy => cp start1 start2 #(of addresses to copy)\0A Compare => c start1 start2 #(of addresses to compare)\0A Search => s from_address to_address for_data\0A Version => v\0A\00"
define void @help() {
%1 = call i32 @c40_printf(i8* getelementptr inbounds ([459 x i8], [459 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [459 x i8] c"\0A\0AHydra_Mon Command summary :\0A Test => t\0A Configure => cf\0A Dump => d start_addr #(of addresses to dump)\0A Enter => e address\0A Fill => f start_addr #(of addresses to fill) value\0A Copy => cp start1 start2 #(of addresses to copy)\0A Compare => c start1 start2 #(of addresses to compare)\0A Search => s from_address to_address for_data\0A Version => v\0A\00"
define void @help() {
%1 = tail call i32 @c40_printf(i8* getelementptr inbounds ([459 x i8], [459 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ bam_swap_endian_8(int /*<<< orphan*/);
void *bam_swap_endian_8p(void *x) {
  *(uint64_t *)x = bam_swap_endian_8(*(uint64_t *)x);
  return x;
}


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

x86 assembly (clang, -O2):
<bam_swap_endian_8p>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <bam_swap_endian_8@plt>
mov    %eax,(%rbx)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @bam_swap_endian_8p(i8* returned %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @bam_swap_endian_8(i32 %3)
store i32 %4, i32* %2
ret i8* %0
}
/* Variables and functions */
scalar_t__ __builtin_significandf(float);
int /*<<< orphan*/ link_failure_builtin_significandf();
void test_builtin_significandf(float f) {
  if (__builtin_significandf(f) != __builtin_significandf(f))
    link_failure_builtin_significandf();
}


x86 assembly (clang, -O0):
<test_builtin_significandf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__builtin_significandf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__builtin_significandf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_builtin_significandf+0x3c>
mov    $0x0,%al
call   1040 <link_failure_builtin_significandf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_significandf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1030 <__builtin_significandf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1030 <__builtin_significandf@plt>
cmp    %rax,%rbx
jne    1149 <test_builtin_significandf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_builtin_significandf@plt>

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

LLVM IR (-O2):
define void @test_builtin_significandf(float %0) {
%2 = tail call i64 @__builtin_significandf(float %0)
%3 = tail call i64 @__builtin_significandf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_builtin_significandf()
br label %7
7: ; preds = %5, %1
ret void
}