xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned int i386_cpuid_edx();
unsigned int i386_cpuid(void) { return i386_cpuid_edx(); }


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

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

LLVM IR (-O0):
define i32 @i386_cpuid() {
%1 = call i32 (...) @i386_cpuid_edx()
ret i32 %1
}

LLVM IR (-O2):
define i32 @i386_cpuid() {
%1 = tail call i32 (...) @i386_cpuid_edx()
ret i32 %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long fid;
};
typedef TYPE_1__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_fid(void *_p, unsigned long _v) {
  ((XFontStruct *)_p)->fid = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XFontStruct_fid>:
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_XFontStruct_fid>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XFontStruct_fid(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_XFontStruct_fid(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
int puts(s)
register const char *s;
{
  register int c;
  while ((c = *s++))
    putchar(c);
  return (putchar('\n'));
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1149 <puts+0x39>
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1030 <putchar@plt>
jmp    111c <puts+0xc>
mov    $0xa,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1135 <puts+0x25>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
mov    $0xa,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define i32 @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %7)
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
ret i32 %13
}
int in_def_update_analog(void *drv_data, int axis_id, int *result) {
  return -1;
}


x86 assembly (clang, -O0):
<in_def_update_analog>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @in_def_update_analog(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
ret i32 -1
}

LLVM IR (-O2):
define i32 @in_def_update_analog(i8* nocapture readnone %0, i32 %1, i32* nocapture readnone %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("hello world"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"hello world\00"
define void @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
void component_rock_set_param(void *handle, unsigned int index, char *buffer) {}


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

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

LLVM IR (-O0):
define void @component_rock_set_param(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @component_rock_set_param(i8* nocapture %0, i32 %1, i8* nocapture %2) {
ret void
}
/* Type definitions */
struct cfg_line {
  int dummy;
};

/* Variables and functions */
int __parse_cfg_file(char const *, struct cfg_line *, int /*<<< orphan*/, int,
                     int);
int parse_cfg_file(const char *cfg_file, struct cfg_line *cfg, int optional,
                   int strict) {
  return __parse_cfg_file(cfg_file, cfg, 0, optional, strict);
}


x86 assembly (clang, -O0):
<parse_cfg_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
xor    %edx,%edx
call   1030 <__parse_cfg_file@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_cfg_file>:
mov    %ecx,%r8d
mov    %edx,%ecx
xor    %edx,%edx
jmp    1030 <__parse_cfg_file@plt>

LLVM IR (-O0):
%struct.cfg_line = type { i32 }
define i32 @parse_cfg_file(i8* %0, %struct.cfg_line* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca %struct.cfg_line*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store %struct.cfg_line* %1, %struct.cfg_line** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load %struct.cfg_line*, %struct.cfg_line** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @__parse_cfg_file(i8* %9, %struct.cfg_line* %10, i32 0, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.cfg_line = type { i32 }
define i32 @parse_cfg_file(i8* %0, %struct.cfg_line* %1, i32 %2, i32 %3) {
%5 = tail call i32 @__parse_cfg_file(i8* %0, %struct.cfg_line* %1, i32 0, i32 %2, i32 %3)
ret i32 %5
}
void ipu_pre_free_double_buffer(unsigned int id) {}


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

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

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

LLVM IR (-O2):
define void @ipu_pre_free_double_buffer(i32 %0) {
ret void
}
int compare_for_fvec_sort(const void *v1, const void *v2) {
  float dt;
  dt = *(float *)v1 - *(float *)v2;
  return dt > 0 ? 1 : dt < 0 ? -1 : (int)dt;
}


x86 assembly (clang, -O0):
<compare_for_fvec_sort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    113f <compare_for_fvec_sort+0x3f>
mov    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1167 <compare_for_fvec_sort+0x67>
xorps  %xmm0,%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1159 <compare_for_fvec_sort+0x59>
mov    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1161 <compare_for_fvec_sort+0x61>
cvttss2si -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_for_fvec_sort>:
movss  (%rdi),%xmm0
subss  (%rsi),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
cvttss2si %xmm0,%eax
mov    $0xffffffff,%ecx
cmovbe %eax,%ecx
ucomiss %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_for_fvec_sort(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca float
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to float*
%8 = load float, float* %7
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to float*
%11 = load float, float* %10
%12 = fsub float %8, %11
store float %12, float* %5
%13 = load float, float* %5
%14 = fcmp ogt float %13, 0.000000e+00
br i1 %14, label %15, label %16
15: ; preds = %2
br label %25
16: ; preds = %2
%17 = load float, float* %5
%18 = fcmp olt float %17, 0.000000e+00
br i1 %18, label %19, label %20
19: ; preds = %16
br label %23
20: ; preds = %16
%21 = load float, float* %5
%22 = fptosi float %21 to i32
br label %23
23: ; preds = %20, %19
%24 = phi i32 [ -1, %19 ], [ %22, %20 ]
br label %25
25: ; preds = %23, %15
%26 = phi i32 [ 1, %15 ], [ %24, %23 ]
ret i32 %26
}

LLVM IR (-O2):
define i32 @compare_for_fvec_sort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fsub float %4, %6
%8 = fcmp ogt float %7, 0.000000e+00
%9 = fcmp olt float %7, 0.000000e+00
%10 = fptosi float %7 to i32
%11 = select i1 %9, i32 -1, i32 %10
%12 = select i1 %8, i32 1, i32 %11
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ norep(int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  srand(time(NULL));
  int i;
  for (i = 0; i < 100; i++) {
    norep(0, 5);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1196 <main+0x56>
xor    %edi,%edi
mov    $0x5,%esi
call   1030 <norep@plt>
lea    0xe7d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1166 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edi,%edi
mov    $0x5,%esi
call   1040 <norep@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1160 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
store i32 0, i32* %2
br label %5
5: ; preds = %11, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %14
8: ; preds = %5
%9 = call i32 @norep(i32 0, i32 5)
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %5
14: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %7, %3 ]
%5 = tail call i32 @norep(i32 0, i32 5)
%6 = tail call i32 @putchar(i32 10)
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, 100
br i1 %8, label %9, label %3
9: ; preds = %3
ret i32 0
}
/* Variables and functions */
scalar_t__ CallFunctionRec(int (*)(int), int);
int CallFunction(int (*fun)(int depth)) {
  return CallFunctionRec(fun, 1) && !fun(0);
}


x86 assembly (clang, -O0):
<CallFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <CallFunctionRec@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     114c <CallFunction+0x3c>
xor    %edi,%edi
call   *-0x8(%rbp)
cmp    $0x0,%eax
setne  %al
xor    $0xff,%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):
<CallFunction>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <CallFunctionRec@plt>
test   %rax,%rax
je     1132 <CallFunction+0x22>
xor    %edi,%edi
call   *%rbx
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @CallFunction(i32 (i32)* %0) {
%2 = tail call i64 @CallFunctionRec(i32 (i32)* %0, i32 1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 %0(i32 0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exits(char *);
int /*<<< orphan*/ fprint(int, char *);
void usage(void) {
  fprint(2, "missing or bad arguments to qer\n");
  exits("usage");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
lea    0xed0(%rip),%rsi
call   1030 <fprint@plt>
lea    0xee5(%rip),%rdi
call   1040 <exits@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x2,%edi
call   1030 <fprint@plt>
lea    0xee8(%rip),%rdi
pop    %rax
jmp    1040 <exits@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"missing or bad arguments to qer\0A\00"
@.str.1 = [6 x i8] c"usage\00"
define void @usage() {
%1 = call i32 @fprint(i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exits(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"missing or bad arguments to qer\0A\00"
@.str.1 = [6 x i8] c"usage\00"
define void @usage() {
%1 = tail call i32 @fprint(i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exits(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strcmp(void const *, void const *);
int avl_strcmp(const void *k1, const void *k2, void *ptr) {
  return strcmp(k1, k2);
}


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

x86 assembly (clang, -O2):
<avl_strcmp>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @avl_strcmp(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i32 @strcmp(i8* %7, i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @avl_strcmp(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
int _mkfifo_error(char const *message, int ret) {
  fputs("mkfifo"
        ": ",
        stderr);
  perror(message);
  return ret;
}


x86 assembly (clang, -O0):
<_mkfifo_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mkfifo_error>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"mkfifo: \00"
@stderr = global i32 0
define i32 @_mkfifo_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @perror(i8* %7)
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
@.str = [9 x i8] c"mkfifo: \00"
@stderr = global i32 0
define i32 @_mkfifo_error(i8* nocapture %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @perror(i8* %0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_mempool_block_size_max() {
  printf("NOT IMPLEMENTED:"
         "pa_mempool_block_size_max"
         "\n");
}


x86 assembly (clang, -O0):
<pa_mempool_block_size_max>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [43 x i8] c"NOT IMPLEMENTED:pa_mempool_block_size_max\0A\00"
define i32 @pa_mempool_block_size_max() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [42 x i8] c"NOT IMPLEMENTED:pa_mempool_block_size_max\00"
define i32 @pa_mempool_block_size_max() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
size_t string_length(const char *s, size_t max_length) {
  const char *p = s;
  size_t n = 0;
  while (*p != '\0' && n < max_length) {
    ++p;
    ++n;
  }
  return n;
}


x86 assembly (clang, -O0):
<string_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x21(%rbp)
je     113f <string_length+0x3f>
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
setb   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    114f <string_length+0x4f>
jmp    116c <string_length+0x6c>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <string_length+0x1c>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_length>:
xor    %eax,%eax
cmpb   $0x0,(%rdi)
je     1136 <string_length+0x36>
test   %rsi,%rsi
je     1136 <string_length+0x36>
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,(%rdi,%rcx,1)
je     1132 <string_length+0x32>
cmp    %rsi,%rcx
mov    %rax,%rcx
jb     1120 <string_length+0x20>
add    $0xffffffffffffffff,%rax
ret

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

LLVM IR (-O2):
define i64 @string_length(i8* nocapture %0, i64 %1) {
%3 = load i8, i8* %0
%4 = icmp ne i8 %3, 0
%5 = icmp ne i64 %1, 0
%6 = and i1 %4, %5
br i1 %6, label %7, label %16
7: ; preds = %2, %7
%8 = phi i64 [ %11, %7 ], [ 0, %2 ]
%9 = phi i8* [ %10, %7 ], [ %0, %2 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = add nuw i64 %8, 1
%12 = load i8, i8* %10
%13 = icmp ne i8 %12, 0
%14 = icmp ult i64 %11, %1
%15 = select i1 %13, i1 %14, i1 false
br i1 %15, label %7, label %16
16: ; preds = %7, %2
%17 = phi i64 [ 0, %2 ], [ %11, %7 ]
ret i64 %17
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void uDMADisable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000004))) = 0;
}


x86 assembly (clang, -O0):
<uDMADisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMADisable>:
movq   $0x0,0x4(%rdi)
ret

LLVM IR (-O0):
define void @uDMADisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 4
%5 = inttoptr i64 %4 to i64*
store volatile i64 0, i64* %5
ret void
}

LLVM IR (-O2):
define void @uDMADisable(i64 %0) {
%2 = add nsw i64 %0, 4
%3 = inttoptr i64 %2 to i64*
store volatile i64 0, i64* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ bitw_bit_count_64_plain(int /*<<< orphan*/);
__attribute__((always_)) uint8_t bitw_bit_count_64(uint64_t bit_set) {
  return bitw_bit_count_64_plain(bit_set);
}


x86 assembly (clang, -O0):
<bitw_bit_count_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <bitw_bit_count_64_plain@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitw_bit_count_64>:
jmp    1030 <bitw_bit_count_64_plain@plt>

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

LLVM IR (-O2):
define i32 @bitw_bit_count_64(i32 %0) {
%2 = tail call i32 @bitw_bit_count_64_plain(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ daxpy_(int *, double *, double *, int *, double *, int *);
void psede_daxpy_0(int n, double alpha, double *a, double *b) {
  int one = 1;
  daxpy_(&n, &alpha, a, &one, b, &one);
}


x86 assembly (clang, -O0):
<psede_daxpy_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r8
lea    -0x4(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x24(%rbp),%r9
mov    %r9,%rcx
call   1030 <daxpy_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psede_daxpy_0>:
sub    $0x18,%rsp
mov    %rdx,%r8
mov    %rsi,%rdx
mov    %edi,0xc(%rsp)
movsd  %xmm0,0x10(%rsp)
movl   $0x1,0x8(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rcx
mov    %rcx,%r9
call   1030 <daxpy_@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define void @psede_daxpy_0(i32 %0, double %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca i32
store i32 %0, i32* %5
store double %1, double* %6
%8 = bitcast i32* %7 to i8*
store i32 1, i32* %7
%9 = call i32 @daxpy_(i32* %5, double* %6, double* %2, i32* %7, double* %3, i32* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: "
        "utilbox"
        " program [arguments...]\n"
        "       "
        "utilbox"
        " -l\n"
        "  -l	List available programs\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [86 x i8] c"Usage: utilbox program [arguments...]\0A utilbox -l\0A -l\09List available programs\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [86 x i8] c"Usage: utilbox program [arguments...]\0A utilbox -l\0A -l\09List available programs\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
/* Variables and functions */
char const *basename(char *);
int /*<<< orphan*/ scwd();
int /*<<< orphan*/ slcpy(char *, int /*<<< orphan*/, int);
const char *curdir(void) {
  static char cwd[256];
  slcpy(cwd, scwd(), 256);
  return basename(cwd);
}


x86 assembly (clang, -O0):
<curdir>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <scwd@plt>
mov    %eax,%esi
lea    0x2f0c(%rip),%rdi
mov    $0x100,%edx
call   1040 <slcpy@plt>
lea    0x2efb(%rip),%rdi
call   1050 <basename@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<curdir>:
push   %rbx
xor    %eax,%eax
call   1030 <scwd@plt>
lea    0x2f11(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x100,%edx
call   1040 <slcpy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <basename@plt>

LLVM IR (-O0):
@curdir.cwd = internal global [256 x i8] zeroinitializer
define i8* @curdir() {
%1 = call i32 (...) @scwd()
%2 = call i32 @slcpy(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @curdir.cwd, i64 0, i64 0), i32 %1, i32 256)
%3 = call i8* @basename(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @curdir.cwd, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
@curdir.cwd = internal global [256 x i8] zeroinitializer
define i8* @curdir() {
%1 = tail call i32 (...) @scwd()
%2 = tail call i32 @slcpy(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @curdir.cwd, i64 0, i64 0), i32 %1, i32 256)
%3 = tail call i8* @basename(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @curdir.cwd, i64 0, i64 0))
ret i8* %3
}
void test_non_identifiers() {
  int i, x;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd;
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd linear(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd private(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd, private(x);
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_non_identifiers>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_non_identifiers+0x28>
jmp    111a <test_non_identifiers+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_non_identifiers+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    114c <test_non_identifiers+0x4c>
jmp    113e <test_non_identifiers+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <test_non_identifiers+0x2f>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1170 <test_non_identifiers+0x70>
jmp    1162 <test_non_identifiers+0x62>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <test_non_identifiers+0x53>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1194 <test_non_identifiers+0x94>
jmp    1186 <test_non_identifiers+0x86>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <test_non_identifiers+0x77>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_non_identifiers() {
ret void
}
int A(int x, int y) { return (x < y) == (-x > -y); }


x86 assembly (clang, -O0):
<A>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
xor    %edx,%edx
sub    -0x8(%rbp),%edx
cmp    %edx,%ecx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @A(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
%9 = load i32, i32* %3
%10 = sub nsw i32 0, %9
%11 = load i32, i32* %4
%12 = sub nsw i32 0, %11
%13 = icmp sgt i32 %10, %12
%14 = zext i1 %13 to i32
%15 = icmp eq i32 %8, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @A(i32 %0, i32 %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ _fxrstor64(char *);
void extern fxsave_test(void) {
  char fxsave_region[512] __attribute__((aligned(16)));
  _fxrstor64(fxsave_region);
}


x86 assembly (clang, -O0):
<fxsave_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
lea    -0x200(%rbp),%rdi
call   1030 <_fxrstor64@plt>
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fxsave_test>:
sub    $0x208,%rsp
mov    %rsp,%rdi
call   1030 <_fxrstor64@plt>
add    $0x208,%rsp
ret

LLVM IR (-O0):
define void @fxsave_test() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @_fxrstor64(i8* %2)
ret void
}

LLVM IR (-O2):
define void @fxsave_test() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @_fxrstor64(i8* %2)
ret void
}
void d2i_EC_PUBKEY(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_EC_PUBKEY() {
ret void
}
/* Variables and functions */
char _add(char, char);
void add_str(char *input, char *output) {
  while (*input != '\0') {
    *output = _add(*input, *output);
    output++;
    input++;
  }
  *output = '\0';
}


x86 assembly (clang, -O0):
<add_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116a <add_str+0x5a>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
movsbl %cl,%edi
movsbl (%rax),%esi
call   1030 <_add@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <add_str+0x10>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    (%rdi),%al
test   %al,%al
je     114d <add_str+0x3d>
mov    %rdi,%r14
add    $0x1,%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%esi
movsbl %al,%edi
call   1030 <_add@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
movzbl (%r14),%eax
add    $0x1,%r14
test   %al,%al
jne    1130 <add_str+0x20>
movb   $0x0,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @add_str(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %10, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %21
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = call signext i8 @_add(i8 signext %12, i8 signext %14)
%16 = load i8*, i8** %4
store i8 %15, i8* %16
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %4
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
br label %5
21: ; preds = %5
%22 = load i8*, i8** %4
store i8 0, i8* %22
ret void
}

LLVM IR (-O2):
define void @add_str(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %11, %5 ], [ %1, %2 ]
%8 = phi i8* [ %12, %5 ], [ %0, %2 ]
%9 = load i8, i8* %7
%10 = tail call signext i8 @_add(i8 signext %6, i8 signext %9)
store i8 %10, i8* %7
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i8* [ %1, %2 ], [ %11, %5 ]
store i8 0, i8* %16
ret void
}
int ilog2(int n) {
  int m = n, l = 0;
  while (m >= 16)
    m >>= 4, l += 4;
  return (
      m <= 1
          ? l
          : "\000\000\001\001\002\002\002\002\003\003\003\003\003\003\003\003"
                    [m] +
                l);
}


x86 assembly (clang, -O0):
<ilog2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0x8(%rbp)
jl     1135 <ilog2+0x35>
mov    -0x8(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0xc(%rbp)
jmp    1114 <ilog2+0x14>
cmpl   $0x1,-0x8(%rbp)
jg     114a <ilog2+0x4a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    115f <ilog2+0x5f>
movslq -0x8(%rbp),%rcx
lea    0xeab(%rip),%rax
movsbl (%rax,%rcx,1),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilog2>:
xor    %eax,%eax
cmp    $0x10,%edi
jl     1135 <ilog2+0x35>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    $0x4,%ecx
add    $0x4,%eax
cmp    $0xff,%edi
mov    %ecx,%edi
ja     1110 <ilog2+0x10>
cmp    $0x2,%ecx
jl     1134 <ilog2+0x34>
mov    %ecx,%ecx
lea    0xed2(%rip),%rdx
movsbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
ret
mov    %edi,%ecx
cmp    $0x2,%ecx
jge    1125 <ilog2+0x25>
jmp    1134 <ilog2+0x34>

LLVM IR (-O0):
@.str = [17 x i8] c"\00\00\01\01\02\02\02\02\03\03\03\03\03\03\03\03\00"
define i32 @ilog2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %9, %1
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 16
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = load i32, i32* %3
%11 = ashr i32 %10, 4
store i32 %11, i32* %3
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 4
store i32 %13, i32* %4
br label %6
14: ; preds = %6
%15 = load i32, i32* %3
%16 = icmp sle i32 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = load i32, i32* %4
br label %27
19: ; preds = %14
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = load i32, i32* %4
%26 = add nsw i32 %24, %25
br label %27
27: ; preds = %19, %17
%28 = phi i32 [ %18, %17 ], [ %26, %19 ]
ret i32 %28
}

LLVM IR (-O2):
@.str = [17 x i8] c"\00\00\01\01\02\02\02\02\03\03\03\03\03\03\03\03\00"
define i32 @ilog2(i32 %0) {
%2 = icmp sgt i32 %0, 15
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 4
%7 = add nuw nsw i32 %4, 4
%8 = icmp ugt i32 %5, 255
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ %0, %1 ], [ %6, %3 ]
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
%12 = icmp slt i32 %10, 2
br i1 %12, label %19, label %13
13: ; preds = %9
%14 = zext i32 %10 to i64
%15 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = add nsw i32 %11, %17
br label %19
19: ; preds = %9, %13
%20 = phi i32 [ %18, %13 ], [ %11, %9 ]
ret i32 %20
}
unsigned long LPCConfigGet(unsigned long ulBase) {
  ;
  return (((*((volatile unsigned long *)(ulBase + 0x00000000))) & 0x00000100));
}


x86 assembly (clang, -O0):
<LPCConfigGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
and    $0x100,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCConfigGet>:
mov    (%rdi),%rax
and    $0x100,%eax
ret

LLVM IR (-O0):
define i64 @LPCConfigGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 0
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, 256
ret i64 %7
}

LLVM IR (-O2):
define i64 @LPCConfigGet(i64 %0) {
%2 = inttoptr i64 %0 to i64*
%3 = load volatile i64, i64* %2
%4 = and i64 %3, 256
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ plcvm_get_u32(scalar_t__);
scalar_t__ plcvm_lpm_u16();
scalar_t__ plcvm_pop();
int /*<<< orphan*/ plcvm_push(int /*<<< orphan*/);
void cb_ldm_s4_cs16(void) {
  plcvm_push(plcvm_get_u32(plcvm_pop() + plcvm_lpm_u16()));
}


x86 assembly (clang, -O0):
<cb_ldm_s4_cs16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <plcvm_pop@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <plcvm_lpm_u16@plt>
mov    -0x8(%rbp),%rdi
add    %rax,%rdi
call   1050 <plcvm_get_u32@plt>
mov    %eax,%edi
call   1060 <plcvm_push@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cb_ldm_s4_cs16>:
push   %rbx
xor    %eax,%eax
call   1030 <plcvm_pop@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <plcvm_lpm_u16@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1050 <plcvm_get_u32@plt>
mov    %eax,%edi
pop    %rbx
jmp    1060 <plcvm_push@plt>

LLVM IR (-O0):
define void @cb_ldm_s4_cs16() {
%1 = call i64 (...) @plcvm_pop()
%2 = call i64 (...) @plcvm_lpm_u16()
%3 = add nsw i64 %1, %2
%4 = call i32 @plcvm_get_u32(i64 %3)
%5 = call i32 @plcvm_push(i32 %4)
ret void
}

LLVM IR (-O2):
define void @cb_ldm_s4_cs16() {
%1 = tail call i64 (...) @plcvm_pop()
%2 = tail call i64 (...) @plcvm_lpm_u16()
%3 = add nsw i64 %2, %1
%4 = tail call i32 @plcvm_get_u32(i64 %3)
%5 = tail call i32 @plcvm_push(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void write_code(char **code) {
  while (*code)
    printf("%s\n", *code++);
}


x86 assembly (clang, -O0):
<write_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     114f <write_code+0x3f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%rax
mov    %eax,%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
jmp    111c <write_code+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_code>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%rsi
test   %rsi,%rsi
je     1144 <write_code+0x34>
mov    %rdi,%rbx
add    $0x8,%rbx
lea    0xed6(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1130 <write_code+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @write_code(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %11, %4 ], [ %2, %1 ]
%6 = phi i8** [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = ptrtoint i8* %5 to i64
%9 = trunc i64 %8 to i32
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i8*, i8** %7
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
void *malloc(size_t);
void *getspace(int blk) {
  void *bp;
  if ((bp = malloc((size_t)blk)) == NULL)
    errx(11, "no memory");
  return (bp);
}


x86 assembly (clang, -O0):
<getspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1153 <getspace+0x33>
mov    $0xb,%edi
lea    0xeb2(%rip),%rsi
call   1030 <errx@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getspace>:
push   %rbx
movslq %edi,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1142 <getspace+0x22>
lea    0xec8(%rip),%rsi
mov    $0xb,%edi
call   1030 <errx@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"no memory\00"
define noalias i8* @getspace(i32 %0) {
%2 = sext i32 %0 to i64
%3 = tail call i8* @malloc(i64 %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @errx(i32 11, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret i8* %3
}
/* Variables and functions */
int mktemp_internal(char *, int /*<<< orphan*/, int /*<<< orphan*/);
char *_mktemp(char *path) {
  if (mktemp_internal(path, 0, 0) == -1)
    return (NULL);
  return (path);
}


x86 assembly (clang, -O0):
<_mktemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <mktemp_internal@plt>
cmp    $0xffffffff,%eax
jne    113f <_mktemp+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    1147 <_mktemp+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mktemp>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %esi,%esi
xor    %edx,%edx
call   1030 <mktemp_internal@plt>
cmp    $0xffffffff,%eax
cmovne %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @_mktemp(i8* %0) {
%2 = tail call i32 @mktemp_internal(i8* %0, i32 0, i32 0)
%3 = icmp eq i32 %2, -1
%4 = select i1 %3, i8* null, i8* %0
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_poly1305_relax(uintptr_t, uintptr_t);
void fiat_poly1305_relax(uint32_t out1[5], const uint32_t arg1[5]) {
  internal_fiat_poly1305_relax((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_poly1305_relax>:
jmp    1030 <internal_fiat_poly1305_relax@plt>

LLVM IR (-O0):
define void @fiat_poly1305_relax(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_poly1305_relax(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_poly1305_relax(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_poly1305_relax(i64 %3, i64 %4)
ret void
}
int mese_non_valido(int mese) {
  int esito;
  esito = mese;
  if ((mese < 1) || (mese > 12)) {
    esito = -2;
  }
  return (esito);
}


x86 assembly (clang, -O0):
<mese_non_valido>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jl     1121 <mese_non_valido+0x21>
cmpl   $0xc,-0x4(%rbp)
jle    1128 <mese_non_valido+0x28>
movl   $0xfffffffe,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mese_non_valido>:
lea    -0xd(%rdi),%eax
cmp    $0xfffffff4,%eax
mov    $0xfffffffe,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @mese_non_valido(i32 %0) {
%2 = add i32 %0, -13
%3 = icmp ult i32 %2, -12
%4 = select i1 %3, i32 -2, i32 %0
ret i32 %4
}