xunge/DecIR huggingface dataset:
/* Variables and functions */
char to_lower(char);
char *strlwr(char *str) {
  char *end;
  end = str;
  while ((*str++ = to_lower(*str)))
    ;
  return end;
}


x86 assembly (clang, -O0):
<strlwr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <to_lower@plt>
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     114e <strlwr+0x3e>
jmp    1124 <strlwr+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlwr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
movsbl (%rbx),%edi
call   1030 <to_lower@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
test   %al,%al
jne    1120 <strlwr+0x10>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strlwr(i8* returned %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = tail call signext i8 @to_lower(i8 signext %4)
%6 = getelementptr inbounds i8, i8* %3, i64 1
store i8 %5, i8* %3
%7 = icmp eq i8 %5, 0
br i1 %7, label %8, label %2
8: ; preds = %2
ret i8* %0
}
int cairo_code_draw_infamousLogoBW_get_height() { return 133; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_infamousLogoBW_get_height() {
ret i32 133
}

LLVM IR (-O2):
define i32 @cairo_code_draw_infamousLogoBW_get_height() {
ret i32 133
}
/* Variables and functions */
unsigned int get_servers_amount(char **servers_list) {
  unsigned int i = 0;
  while (1) {
    if (servers_list[i] == NULL) {
      return i;
    }
    i++;
  }
}


x86 assembly (clang, -O0):
<get_servers_amount>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
cmpq   $0x0,(%rax,%rcx,8)
jne    1126 <get_servers_amount+0x26>
mov    -0xc(%rbp),%eax
pop    %rbp
ret
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <get_servers_amount+0xf>

x86 assembly (clang, -O2):
<get_servers_amount>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpq   $0x0,(%rdi,%rax,8)
jne    1110 <get_servers_amount+0x10>
ret

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

LLVM IR (-O2):
define i32 @get_servers_amount(i8** nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %8, %2 ]
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8*, i8** %0, i64 %4
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
%8 = add i32 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret i32 %3
}
/* Type definitions */
struct szl_obj {
  int dummy;
};
struct szl_interp {
  int dummy;
};

/* Variables and functions */
scalar_t__ szl_float_to_str(struct szl_interp *, struct szl_obj *);
scalar_t__ szl_str_to_list(struct szl_interp *, struct szl_obj *);
int szl_float_to_list(struct szl_interp *interp, struct szl_obj *obj) {
  return szl_float_to_str(interp, obj) && szl_str_to_list(interp, obj);
}


x86 assembly (clang, -O0):
<szl_float_to_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <szl_float_to_str@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     1166 <szl_float_to_list+0x46>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <szl_str_to_list@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<szl_float_to_list>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <szl_float_to_str@plt>
test   %rax,%rax
je     114c <szl_float_to_list+0x2c>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <szl_str_to_list@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    114e <szl_float_to_list+0x2e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.szl_interp = type { i32 }
%struct.szl_obj = type { i32 }
define i32 @szl_float_to_list(%struct.szl_interp* %0, %struct.szl_obj* %1) {
%3 = alloca %struct.szl_interp*
%4 = alloca %struct.szl_obj*
store %struct.szl_interp* %0, %struct.szl_interp** %3
store %struct.szl_obj* %1, %struct.szl_obj** %4
%5 = load %struct.szl_interp*, %struct.szl_interp** %3
%6 = load %struct.szl_obj*, %struct.szl_obj** %4
%7 = call i64 @szl_float_to_str(%struct.szl_interp* %5, %struct.szl_obj* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load %struct.szl_interp*, %struct.szl_interp** %3
%11 = load %struct.szl_obj*, %struct.szl_obj** %4
%12 = call i64 @szl_str_to_list(%struct.szl_interp* %10, %struct.szl_obj* %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ false, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
%struct.szl_interp = type { i32 }
%struct.szl_obj = type { i32 }
define i32 @szl_float_to_list(%struct.szl_interp* %0, %struct.szl_obj* %1) {
%3 = tail call i64 @szl_float_to_str(%struct.szl_interp* %0, %struct.szl_obj* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i64 @szl_str_to_list(%struct.szl_interp* %0, %struct.szl_obj* %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
unsigned int readl(int);
int /*<<< orphan*/ wait_ms(int);
int /*<<< orphan*/ writel(unsigned int, int);
void hiusb_stop_hcd(void) {
  unsigned int reg;
  reg = readl((0x20030000 + 0xb8));
  writel(reg | ((1 << 12)), (0x20030000 + 0xb8));
  wait_ms(500);
}


x86 assembly (clang, -O0):
<hiusb_stop_hcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x200300b8,%edi
call   1030 <readl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
or     $0x1000,%edi
mov    $0x200300b8,%esi
call   1040 <writel@plt>
mov    $0x1f4,%edi
call   1050 <wait_ms@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hiusb_stop_hcd>:
push   %rax
mov    $0x200300b8,%edi
call   1030 <readl@plt>
or     $0x1000,%eax
mov    %eax,%edi
mov    $0x200300b8,%esi
call   1040 <writel@plt>
mov    $0x1f4,%edi
pop    %rax
jmp    1050 <wait_ms@plt>

LLVM IR (-O0):
define void @hiusb_stop_hcd() {
%1 = alloca i32
%2 = call i32 @readl(i32 537067704)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = or i32 %3, 4096
%5 = call i32 @writel(i32 %4, i32 537067704)
%6 = call i32 @wait_ms(i32 500)
ret void
}

LLVM IR (-O2):
define void @hiusb_stop_hcd() {
%1 = tail call i32 @readl(i32 537067704)
%2 = or i32 %1, 4096
%3 = tail call i32 @writel(i32 %2, i32 537067704)
%4 = tail call i32 @wait_ms(i32 500)
ret void
}
/* Type definitions */
struct _tuple0 {
  int dummy;
};
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_Absyn_var_exp(struct _tuple0 *, unsigned int);
struct Cyc_Absyn_Exp *Cyc_Absyn_unknownid_exp(struct _tuple0 *q, unsigned loc) {
  return ({ Cyc_Absyn_var_exp(q, loc); });
}


x86 assembly (clang, -O0):
<Cyc_Absyn_unknownid_exp>:
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 <Cyc_Absyn_var_exp@plt>
mov    %eax,-0x10(%rbp)
movslq -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_unknownid_exp>:
push   %rax
call   1030 <Cyc_Absyn_var_exp@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
%struct._tuple0 = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_unknownid_exp(%struct._tuple0* %0, i32 %1) {
%3 = alloca %struct._tuple0*
%4 = alloca i32
%5 = alloca i32
store %struct._tuple0* %0, %struct._tuple0** %3
store i32 %1, i32* %4
%6 = load %struct._tuple0*, %struct._tuple0** %3
%7 = load i32, i32* %4
%8 = call i32 @Cyc_Absyn_var_exp(%struct._tuple0* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to %struct.Cyc_Absyn_Exp*
ret %struct.Cyc_Absyn_Exp* %11
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
%struct._tuple0 = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_unknownid_exp(%struct._tuple0* %0, i32 %1) {
%3 = tail call i32 @Cyc_Absyn_var_exp(%struct._tuple0* %0, i32 %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to %struct.Cyc_Absyn_Exp*
ret %struct.Cyc_Absyn_Exp* %5
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, long, long);
void format_time(char *str, long msecs) {
  sprintf(str, "%02ld:%02ld", msecs / 1000 / 60, msecs / 1000 % 60);
}


x86 assembly (clang, -O0):
<format_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    %rdx,%rcx
mov    -0x18(%rbp),%rdx
lea    0xe9a(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_time>:
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
mov    %rsi,%rax
imul   %rcx
mov    %rdx,%rcx
shr    $0x3f,%rcx
sar    $0x7,%rdx
add    %rdx,%rcx
movabs $0x45e7b272f608770f,%rdx
b2 e7 45
mov    %rsi,%rax
imul   %rdx
mov    %rdx,%r8
movabs $0x8888888888888889,%rdx
88 88 88
mov    %rcx,%rax
imul   %rdx
mov    %r8,%rax
shr    $0x3f,%rax
sar    $0xe,%r8
add    %rax,%r8
add    %rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x5,%rdx
add    %rax,%rdx
imul   $0x3c,%rdx,%rax
sub    %rax,%rcx
lea    0xe82(%rip),%rsi
mov    %r8,%rdx
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%02ld:%02ld\00"
define void @format_time(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = sdiv i64 %6, 1000
%8 = sdiv i64 %7, 60
%9 = load i64, i64* %4
%10 = sdiv i64 %9, 1000
%11 = srem i64 %10, 60
%12 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %8, i64 %11)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%02ld:%02ld\00"
define void @format_time(i8* nocapture writeonly %0, i64 %1) {
%3 = sdiv i64 %1, 1000
%4 = sdiv i64 %1, 60000
%5 = srem i64 %3, 60
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %4, i64 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ owl_stats_var(double *, double, int);
double sqrt(int /*<<< orphan*/);
double owl_stats_std(double *x, double mean, int n) {
  return sqrt(owl_stats_var(x, mean, n));
}


x86 assembly (clang, -O0):
<owl_stats_std>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%esi
call   1030 <owl_stats_var@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<owl_stats_std>:
push   %rax
call   1030 <owl_stats_var@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sqrt@plt>

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

LLVM IR (-O2):
define double @owl_stats_std(double* %0, double %1, i32 %2) {
%4 = tail call i32 @owl_stats_var(double* %0, double %1, i32 %2)
%5 = tail call double @sqrt(i32 %4)
ret double %5
}
/* Variables and functions */
scalar_t__ getmem(size_t, int);
float **ffgetmem(const int leng) {
  return ((float **)getmem((size_t)leng, sizeof(float *)));
}


x86 assembly (clang, -O0):
<ffgetmem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x8,%esi
call   1030 <getmem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffgetmem>:
movslq %edi,%rdi
mov    $0x8,%esi
jmp    1030 <getmem@plt>

LLVM IR (-O0):
define float** @ffgetmem(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = call i64 @getmem(i64 %4, i32 8)
%6 = inttoptr i64 %5 to float**
ret float** %6
}

LLVM IR (-O2):
define float** @ffgetmem(i32 %0) {
%2 = sext i32 %0 to i64
%3 = tail call i64 @getmem(i64 %2, i32 8)
%4 = inttoptr i64 %3 to float**
ret float** %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
size_t strlen(char *);
void http_table_column_add(char *msg, char *val) {
  sprintf(&msg[strlen(msg)],
          "      <td valign=\"top\" align=\"right\" >%s<br></td>\n", val);
  free(val);
}


x86 assembly (clang, -O0):
<http_table_column_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
mov    -0x10(%rbp),%rdx
lea    0xe9d(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_table_column_add>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
add    %rax,%rbx
lea    0xeb7(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1050 <sprintf@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [51 x i8] c" <td valign=\22top\22 align=\22right\22 >%s<br></td>\0A\00"
define void @http_table_column_add(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** %3
%7 = call i64 @strlen(i8* %6)
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8*, i8** %4
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %4
%12 = call i32 @free(i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c" <td valign=\22top\22 align=\22right\22 >%s<br></td>\0A\00"
define void @http_table_column_add(i8* nocapture %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i32 @free(i8* %1)
ret void
}
void dep1(void) {}


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

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

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

LLVM IR (-O2):
define void @dep1() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_SIGNED;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_SIGNED_it;
PKCS7_SIGNED *PKCS7_SIGNED_new(void) {
  return (PKCS7_SIGNED *)ASN1_item_new(&PKCS7_SIGNED_it);
}


x86 assembly (clang, -O0):
<PKCS7_SIGNED_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS7_SIGNED_new>:
mov    0x2ec9(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@PKCS7_SIGNED_it = global i32 0
define i32* @PKCS7_SIGNED_new() {
%1 = call i64 @ASN1_item_new(i32* @PKCS7_SIGNED_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@PKCS7_SIGNED_it = global i32 0
define i32* @PKCS7_SIGNED_new() {
%1 = tail call i64 @ASN1_item_new(i32* @PKCS7_SIGNED_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ print_hello();
int main() {
  print_hello();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @print_hello()
ret i32 0
}
float pass_float(float arg) { return arg; }


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

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

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

LLVM IR (-O2):
define float @pass_float(float returned %0) {
ret float %0
}
int sfi_acpi_table_parse(char *signature, char *oem_id, char *oem_table_id,
                         int (*handler)(struct acpi_table_header *)) {
  return -1;
}


x86 assembly (clang, -O0):
<sfi_acpi_table_parse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.acpi_table_header = type opaque
define i32 @sfi_acpi_table_parse(i8* %0, i8* %1, i8* %2, i32 (%struct.acpi_table_header*)* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32 (%struct.acpi_table_header*)*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 (%struct.acpi_table_header*)* %3, i32 (%struct.acpi_table_header*)** %8
ret i32 -1
}

LLVM IR (-O2):
%struct.acpi_table_header = type opaque
define i32 @sfi_acpi_table_parse(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 (%struct.acpi_table_header*)* nocapture readnone %3) {
ret i32 -1
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, char *);
char *terminal_in() {
  char *str = malloc(256 * sizeof(char));
  printf("? ");
  if (scanf(" %[^\n]c", str) == 0) {
    return NULL;
  }
  return str;
}


x86 assembly (clang, -O0):
<terminal_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x100,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1050 <scanf@plt>
cmp    $0x0,%rax
jne    1179 <terminal_in+0x49>
movq   $0x0,-0x8(%rbp)
jmp    1181 <terminal_in+0x51>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminal_in>:
push   %rbx
mov    $0x100,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
test   %rax,%rax
cmovne %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"? \00"
@.str.1 = [8 x i8] c" %[^\0A]c\00"
define i8* @terminal_in() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @malloc(i32 256)
store i8* %3, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i64 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
store i8* null, i8** %1
br label %11
9: ; preds = %0
%10 = load i8*, i8** %2
store i8* %10, i8** %1
br label %11
11: ; preds = %9, %8
%12 = load i8*, i8** %1
ret i8* %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"? \00"
@.str.1 = [8 x i8] c" %[^\0A]c\00"
define i8* @terminal_in() {
%1 = tail call dereferenceable_or_null(256) i8* @malloc(i32 256)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* null, i8* %1
ret i8* %5
}
/* Variables and functions */
scalar_t__ strncmp(char *, char *, int);
int is_command_nack(char *command) {
  return command != NULL && strncmp(command, "NACK", 4) == 0;
}


x86 assembly (clang, -O0):
<is_command_nack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     114b <is_command_nack+0x3b>
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_command_nack>:
test   %rdi,%rdi
je     1137 <is_command_nack+0x27>
push   %rax
lea    0xee3(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"NACK\00"
define i32 @is_command_nack(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i64 @strncmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%8 = icmp eq i64 %7, 0
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ false, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"NACK\00"
define i32 @is_command_nack(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
unsigned int pcount(unsigned int prime, unsigned int max) {
  unsigned int ret = 0;
  unsigned long long i;
  for (i = prime; max >= i; i = i * prime) {
    ret += max / i;
  }
  return ret;
}


x86 assembly (clang, -O0):
<pcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%rax
jb     1150 <pcount+0x50>
mov    -0x8(%rbp),%eax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,%rcx
mov    -0xc(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x4(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <pcount+0x18>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcount>:
xor    %ecx,%ecx
cmp    %esi,%edi
jbe    1109 <pcount+0x9>
mov    %ecx,%eax
ret
mov    %edi,%r8d
mov    %esi,%esi
mov    %r8,%rdi
jmp    1131 <pcount+0x31>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %esi,%eax
xor    %edx,%edx
div    %edi
add    %eax,%ecx
imul   %r8,%rdi
cmp    %rsi,%rdi
ja     1106 <pcount+0x6>
cmp    %rdi,%rsi
jae    1120 <pcount+0x20>
xor    %eax,%eax
jmp    1126 <pcount+0x26>

LLVM IR (-O0):
define i32 @pcount(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
store i64 %8, i64* %6
br label %9
9: ; preds = %23, %2
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = load i64, i64* %6
%13 = icmp uge i64 %11, %12
br i1 %13, label %14, label %28
14: ; preds = %9
%15 = load i32, i32* %4
%16 = zext i32 %15 to i64
%17 = load i64, i64* %6
%18 = udiv i64 %16, %17
%19 = load i32, i32* %5
%20 = zext i32 %19 to i64
%21 = add i64 %20, %18
%22 = trunc i64 %21 to i32
store i32 %22, i32* %5
br label %23
23: ; preds = %14
%24 = load i64, i64* %6
%25 = load i32, i32* %3
%26 = zext i32 %25 to i64
%27 = mul i64 %24, %26
store i64 %27, i64* %6
br label %9
28: ; preds = %9
%29 = load i32, i32* %5
ret i32 %29
}

LLVM IR (-O2):
define i32 @pcount(i32 %0, i32 %1) {
%3 = zext i32 %0 to i64
%4 = zext i32 %1 to i64
%5 = icmp ugt i32 %0, %1
br i1 %5, label %14, label %6
6: ; preds = %2, %6
%7 = phi i64 [ %12, %6 ], [ %3, %2 ]
%8 = phi i32 [ %11, %6 ], [ 0, %2 ]
%9 = udiv i64 %4, %7
%10 = trunc i64 %9 to i32
%11 = add i32 %8, %10
%12 = mul i64 %7, %3
%13 = icmp ugt i64 %12, %4
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = phi i32 [ 0, %2 ], [ %11, %6 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void pointKeyDestructor(void *priv_data, void *key) {
  (void)(priv_data);
  if (key)
    free(key);
}


x86 assembly (clang, -O0):
<pointKeyDestructor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1134 <pointKeyDestructor+0x24>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointKeyDestructor>:
test   %rsi,%rsi
je     111d <pointKeyDestructor+0xd>
mov    %rsi,%rdi
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @pointKeyDestructor(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 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = call i32 @free(i8* %9)
br label %11
11: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
define void @pointKeyDestructor(i8* nocapture readnone %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @free(i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ perform_blink(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc > 1) {
    perform_blink(argv[1]);
    return 0;
  } else {
    printf("Usage: ./morse 'text to enmorsify'\n");
    return 1;
  }
}


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)
cmpl   $0x1,-0x8(%rbp)
jle    1159 <main+0x39>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <perform_blink@plt>
movl   $0x0,-0x4(%rbp)
jmp    116c <main+0x4c>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     1133 <main+0x13>
mov    0x8(%rsi),%rdi
call   1040 <perform_blink@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Usage: ./morse 'text to enmorsify'\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 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @perform_blink(i8* %11)
store i32 0, i32* %3
br label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %15
15: ; preds = %13, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@str = [35 x i8] c"Usage: ./morse 'text to enmorsify'\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @perform_blink(i8* %6)
br label %10
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %4
%11 = phi i32 [ 0, %4 ], [ 1, %8 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void cgiMakeRadioButton(char *name, char *value, int checked) {
  printf("<INPUT TYPE=RADIO NAME=\"%s\" VALUE=\"%s\" %s>", name, value,
         (checked ? "CHECKED" : ""));
}


x86 assembly (clang, -O0):
<cgiMakeRadioButton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%edi
lea    0xef5(%rip),%rcx
lea    0xeef(%rip),%rax
cmp    $0x0,%edi
cmovne %rax,%rcx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgiMakeRadioButton>:
mov    %rsi,%rax
mov    %rdi,%rsi
test   %edx,%edx
lea    0xf0b(%rip),%rdx
lea    0xf05(%rip),%rcx
cmove  %rdx,%rcx
lea    0xecf(%rip),%rdi
mov    %rax,%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"<INPUT TYPE=RADIO NAME=\22%s\22 VALUE=\22%s\22 %s>\00"
@.str.1 = [8 x i8] c"CHECKED\00"
@.str.2 = [1 x i8] zeroinitializer
define void @cgiMakeRadioButton(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%13 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"<INPUT TYPE=RADIO NAME=\22%s\22 VALUE=\22%s\22 %s>\00"
@.str.1 = [8 x i8] c"CHECKED\00"
@.str.2 = [1 x i8] zeroinitializer
define void @cgiMakeRadioButton(i8* %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = select i1 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %5)
ret void
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
void UARTIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000038))) &= ~(ui32IntFlags);
}


x86 assembly (clang, -O0):
<UARTIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x38(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTIntDisable>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    -0x10(%rsp),%rax
not    %rax
mov    -0x8(%rsp),%rcx
and    %rax,0x38(%rcx)
ret

LLVM IR (-O0):
define void @UARTIntDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = xor i64 %5, -1
%7 = load volatile i64, i64* %3
%8 = add nsw i64 %7, 56
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @UARTIntDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = xor i64 %5, -1
%7 = load volatile i64, i64* %3
%8 = add nsw i64 %7, 56
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, char *);
void usage(char *argv0) { die("Usage: %s [-b] infile outfile", argv0); }


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

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

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

LLVM IR (-O2):
@.str = [30 x i8] c"Usage: %s [-b] infile outfile\00"
define void @usage(i8* %0) {
%2 = tail call i32 @die(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void fatal(char *str) {
  fprintf(stderr, "%s\n", str);
  exit(2);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int mutate(char *key) {
  int i = 0;
  srand(time(NULL));
  for (; i < 30; i++)
    key[i] = 65 + rand() % 25;
  return 0;
}


x86 assembly (clang, -O0):
<mutate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
cmpl   $0x1e,-0xc(%rbp)
jge    1188 <mutate+0x58>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x19,%ecx
cltd
idiv   %ecx
add    $0x41,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1153 <mutate+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mutate>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    $0x41,%al
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    $0x1e,%rbx
jne    1150 <mutate+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @mutate(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = call i32 @time(i32* null)
%5 = call i32 @srand(i32 %4)
br label %6
6: ; preds = %18, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 30
br i1 %8, label %9, label %21
9: ; preds = %6
%10 = call i32 (...) @rand()
%11 = srem i32 %10, 25
%12 = add nsw i32 65, %11
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 %13, i8* %17
br label %18
18: ; preds = %9
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %6
21: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @mutate(i8* nocapture writeonly %0) {
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @srand(i32 %2)
br label %4
4: ; preds = %1, %4
%5 = phi i64 [ 0, %1 ], [ %11, %4 ]
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 25
%8 = trunc i32 %7 to i8
%9 = add nsw i8 %8, 65
%10 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 %9, i8* %10
%11 = add nuw nsw i64 %5, 1
%12 = icmp eq i64 %11, 30
br i1 %12, label %13, label %4
13: ; preds = %4
ret i32 0
}
void fmt_get_format() {}


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

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

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

LLVM IR (-O2):
define void @fmt_get_format() {
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *nodm_basename(const char *str) {
  const char *cp = strrchr(str, '/');
  return cp ? cp + 1 : str;
}


x86 assembly (clang, -O0):
<nodm_basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <nodm_basename+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <nodm_basename+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nodm_basename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @nodm_basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %13
11: ; preds = %1
%12 = load i8*, i8** %2
br label %13
13: ; preds = %11, %8
%14 = phi i8* [ %10, %8 ], [ %12, %11 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @nodm_basename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf(
      "XCPUKey-Brute-Forcer - 0.1c Beta by Hect0r\n"
      "Usage : cpu-gen [!keyvault_location] [!serial_number] [thread_count]\n"
      " NOTE : Each argument with a ! in it, needs to be set, without ! is "
      "optional.\n"
      "[keyvault_location] - The filepath to the ENCRYPTED keyvault.\n"
      "[serial_number] - Your console serial number, 12 numbers.\n"
      "[thread_count] - The number of cpu threads to use, default: num of cpu "
      "cores.\n");
}


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

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

LLVM IR (-O0):
@.str = [389 x i8] c"XCPUKey-Brute-Forcer - 0.1c Beta by Hect0r\0AUsage : cpu-gen [!keyvault_location] [!serial_number] [thread_count]\0A NOTE : Each argument with a ! in it, needs to be set, without ! is optional.\0A[keyvault_location] - The filepath to the ENCRYPTED keyvault.\0A[serial_number] - Your console serial number, 12 numbers.\0A[thread_count] - The number of cpu threads to use, default: num of cpu cores.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([389 x i8], [389 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [388 x i8] c"XCPUKey-Brute-Forcer - 0.1c Beta by Hect0r\0AUsage : cpu-gen [!keyvault_location] [!serial_number] [thread_count]\0A NOTE : Each argument with a ! in it, needs to be set, without ! is optional.\0A[keyvault_location] - The filepath to the ENCRYPTED keyvault.\0A[serial_number] - Your console serial number, 12 numbers.\0A[thread_count] - The number of cpu threads to use, default: num of cpu cores.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([388 x i8], [388 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_1Cint64_lowword_reg(long long val) {
  return ((val) & (0x1C << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_1Cint64_lowword_reg>:
test   $0x1c,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_1Cint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 28
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
double int_to_real(int in1) { return (double)in1; }


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

x86 assembly (clang, -O2):
<int_to_real>:
cvtsi2sd %edi,%xmm0
ret

LLVM IR (-O0):
define double @int_to_real(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
ret double %4
}

LLVM IR (-O2):
define double @int_to_real(i32 %0) {
%2 = sitofp i32 %0 to double
ret double %2
}
/* Variables and functions */
int BLAST_Powi(double, unsigned int);
double BLAST_GapDecayDivisor(double decayrate, unsigned nsegs) {
  return (1. - decayrate) * BLAST_Powi(decayrate, nsegs - 1);
}


x86 assembly (clang, -O0):
<BLAST_GapDecayDivisor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  0xed8(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <BLAST_Powi@plt>
movsd  -0x18(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BLAST_GapDecayDivisor>:
push   %rax
movsd  0xee7(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
add    $0xffffffff,%edi
call   1030 <BLAST_Powi@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @BLAST_GapDecayDivisor(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load double, double* %3
%6 = fsub double 1.000000e+00, %5
%7 = load double, double* %3
%8 = load i32, i32* %4
%9 = sub i32 %8, 1
%10 = call i32 @BLAST_Powi(double %7, i32 %9)
%11 = sitofp i32 %10 to double
%12 = fmul double %6, %11
ret double %12
}

LLVM IR (-O2):
define double @BLAST_GapDecayDivisor(double %0, i32 %1) {
%3 = fsub double 1.000000e+00, %0
%4 = add i32 %1, -1
%5 = tail call i32 @BLAST_Powi(double %0, i32 %4)
%6 = sitofp i32 %5 to double
%7 = fmul double %3, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ MDTestSuite();
int main(void) {
  int i;
  MDTestSuite();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @MDTestSuite()
ret i32 0
}
/* Variables and functions */
scalar_t__ llvm_fcmp_uno(double, double);
int llvm_fcmp_ult(double X, double Y) { return X < Y || llvm_fcmp_uno(X, Y); }


x86 assembly (clang, -O0):
<llvm_fcmp_ult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
ja     1154 <llvm_fcmp_ult+0x44>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <llvm_fcmp_uno@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llvm_fcmp_ult>:
mov    $0x1,%eax
ucomisd %xmm0,%xmm1
ja     1130 <llvm_fcmp_ult+0x20>
push   %rax
call   1030 <llvm_fcmp_uno@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @llvm_fcmp_ult(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = load double, double* %3
%10 = load double, double* %4
%11 = call i64 @llvm_fcmp_uno(double %9, double %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %8, %2
%14 = phi i1 [ true, %2 ], [ %12, %8 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @llvm_fcmp_ult(double %0, double %1) {
%3 = fcmp olt double %0, %1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i64 @llvm_fcmp_uno(double %0, double %1)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ 1, %2 ], [ %7, %4 ]
ret i32 %9
}
void codegen_timing_winchip_block_start() {}


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

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

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

LLVM IR (-O2):
define void @codegen_timing_winchip_block_start() {
ret void
}