xunge/DecIR huggingface dataset:
int wzor(x, y) {
  int i = 0;
  while (i < x) {
    if (y % 2 == 0)
      putchar('*');
    else
      putchar(' ');
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<wzor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1170 <wzor+0x60>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1156 <wzor+0x46>
mov    $0x2a,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
jmp    1162 <wzor+0x52>
mov    $0x20,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <wzor+0x15>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wzor>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    113e <wzor+0x2e>
mov    %edi,%ebx
test   $0x1,%sil
mov    $0x2a,%eax
mov    $0x20,%ebp
cmove  %eax,%ebp
nopw   0x0(%rax,%rax,1)
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1130 <wzor+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @wzor(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = and i32 %1, 1
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 42, i32 32
br label %8
8: ; preds = %4, %8
%9 = phi i32 [ 0, %4 ], [ %11, %8 ]
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %7)
%11 = add nuw nsw i32 %9, 1
%12 = icmp eq i32 %11, %0
br i1 %12, label %13, label %8
13: ; preds = %8, %2
ret i32 0
}
void mlx5dr_domain_set_peer(struct mlx5dr_domain *dmn,
                            struct mlx5dr_domain *peer_dmn) {}


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

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

LLVM IR (-O0):
%struct.mlx5dr_domain = type opaque
define void @mlx5dr_domain_set_peer(%struct.mlx5dr_domain* %0, %struct.mlx5dr_domain* %1) {
%3 = alloca %struct.mlx5dr_domain*
%4 = alloca %struct.mlx5dr_domain*
store %struct.mlx5dr_domain* %0, %struct.mlx5dr_domain** %3
store %struct.mlx5dr_domain* %1, %struct.mlx5dr_domain** %4
ret void
}

LLVM IR (-O2):
%struct.mlx5dr_domain = type opaque
define void @mlx5dr_domain_set_peer(%struct.mlx5dr_domain* nocapture %0, %struct.mlx5dr_domain* nocapture %1) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) void LEUnpackInt32(int32_t *data,
                                            const uint8_t container[4]) {
  *data = (int32_t)container[0] | ((int32_t)container[1] << 8) |
          ((int32_t)container[2] << 16) | ((int32_t)container[3] << 24);
}


x86 assembly (clang, -O0):
<LEUnpackInt32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
shl    $0x10,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
shl    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LEUnpackInt32>:
mov    0x8(%rsi),%eax
mov    0x10(%rsi),%ecx
shl    $0x8,%eax
or     (%rsi),%eax
shl    $0x10,%ecx
mov    0x18(%rsi),%edx
shl    $0x18,%edx
or     %ecx,%edx
or     %eax,%edx
mov    %edx,(%rdi)
ret

LLVM IR (-O0):
define void @LEUnpackInt32(i32* %0, i64* %1) {
%3 = alloca i32*
%4 = alloca i64*
store i32* %0, i32** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = getelementptr inbounds i64, i64* %5, i64 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = load i64*, i64** %4
%10 = getelementptr inbounds i64, i64* %9, i64 1
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %8, %13
%15 = load i64*, i64** %4
%16 = getelementptr inbounds i64, i64* %15, i64 2
%17 = load i64, i64* %16
%18 = trunc i64 %17 to i32
%19 = shl i32 %18, 16
%20 = or i32 %14, %19
%21 = load i64*, i64** %4
%22 = getelementptr inbounds i64, i64* %21, i64 3
%23 = load i64, i64* %22
%24 = trunc i64 %23 to i32
%25 = shl i32 %24, 24
%26 = or i32 %20, %25
%27 = load i32*, i32** %3
store i32 %26, i32* %27
ret void
}

LLVM IR (-O2):
define void @LEUnpackInt32(i32* nocapture writeonly %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = trunc i64 %3 to i32
%5 = getelementptr inbounds i64, i64* %1, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 8
%9 = or i32 %8, %4
%10 = getelementptr inbounds i64, i64* %1, i64 2
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 16
%14 = or i32 %9, %13
%15 = getelementptr inbounds i64, i64* %1, i64 3
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = shl i32 %17, 24
%19 = or i32 %14, %18
store i32 %19, i32* %0
ret void
}
/* Variables and functions */
int O_APPEND;
int O_RDWR;
int open(char const *, int);
int mylock(const char *filename, int start, int end) {
  int fd = open(filename, O_RDWR | O_APPEND);
  return fd;
}


x86 assembly (clang, -O0):
<mylock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
mov    0x2e9a(%rip),%rax
or     (%rax),%esi
call   1030 <open@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mylock>:
mov    0x2ed1(%rip),%rax
mov    0x2eb2(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDWR = global i32 0
@O_APPEND = global i32 0
define i32 @mylock(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* @O_RDWR
%10 = load i32, i32* @O_APPEND
%11 = or i32 %9, %10
%12 = call i32 @open(i8* %8, i32 %11)
store i32 %12, i32* %7
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@O_APPEND = global i32 0
define i32 @mylock(i8* nocapture %0, i32 %1, i32 %2) {
%4 = load i32, i32* @O_RDWR
%5 = load i32, i32* @O_APPEND
%6 = or i32 %5, %4
%7 = tail call i32 @open(i8* %0, i32 %6)
ret i32 %7
}
/* Variables and functions */
int mst_random(int);
int compute_dist(int i, int j, int numvert) {
  int less;
  int gt;
  int tmp;
  {
    if (i < j) {
      less = i;
      gt = j;
    } else {
      less = j;
      gt = i;
    }
    tmp = mst_random(less * numvert + gt);
    return (tmp % 2048 + 1);
  }
}


x86 assembly (clang, -O0):
<compute_dist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    113e <compute_dist+0x2e>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    114a <compute_dist+0x3a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
imul   -0xc(%rbp),%edi
add    -0x14(%rbp),%edi
call   1030 <mst_random@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x800,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_dist>:
push   %rax
cmp    %esi,%edi
mov    %edi,%eax
cmovl  %esi,%eax
cmovge %esi,%edi
imul   %edx,%edi
add    %eax,%edi
call   1030 <mst_random@plt>
lea    0x7ff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffff800,%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @compute_dist(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = select i1 %4, i32 %1, i32 %0
%6 = select i1 %4, i32 %0, i32 %1
%7 = mul nsw i32 %6, %2
%8 = add nsw i32 %7, %5
%9 = tail call i32 @mst_random(i32 %8)
%10 = srem i32 %9, 2048
%11 = add nsw i32 %10, 1
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ DrawTextw138(char const *, unsigned long, unsigned long);
void drawtextw(const char *s, unsigned long cfg, unsigned long cbg) {
  DrawTextw138(s, cfg, cbg);
}


x86 assembly (clang, -O0):
<drawtextw>:
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
mov    -0x18(%rbp),%rdx
call   1030 <DrawTextw138@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawtextw>:
jmp    1030 <DrawTextw138@plt>

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

LLVM IR (-O2):
define void @drawtextw(i8* %0, i64 %1, i64 %2) {
%4 = tail call i32 @DrawTextw138(i8* %0, i64 %1, i64 %2)
ret void
}
float builtin_fnmsf(float b, float c, float d) {
  return -__builtin_fmaf(b, c, -d);
}


x86 assembly (clang, -O0):
<builtin_fnmsf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
call   1030 <fmaf@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<builtin_fnmsf>:
push   %rax
xorps  0xee8(%rip),%xmm2
call   1030 <fmaf@plt>
xorps  0xedc(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @builtin_fnmsf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fneg float %9
%11 = call float @llvm.fma.f32(float %7, float %8, float %10)
%12 = fneg float %11
ret float %12
}

LLVM IR (-O2):
define float @builtin_fnmsf(float %0, float %1, float %2) {
%4 = fneg float %2
%5 = tail call float @llvm.fma.f32(float %0, float %1, float %4)
%6 = fneg float %5
ret float %6
}
int has_http_cap() { return 0x1; }


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

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

LLVM IR (-O0):
define i32 @has_http_cap() {
ret i32 1
}

LLVM IR (-O2):
define i32 @has_http_cap() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(const char *mess) {
  fprintf(stderr, "Error: %s\n", mess);
  fprintf(stderr, "Usage: wnr2000v4 input_file output_file\n");
  fprintf(stderr, "\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
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
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xec7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xede(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
@.str.1 = [41 x i8] c"Usage: wnr2000v4 input_file output_file\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
@.str.1 = [41 x i8] c"Usage: wnr2000v4 input_file output_file\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ InitSD();
int Nand_Init();
int SD_Init();
int sdmmc_sdcard_init() {
  InitSD();
  int nand_res = Nand_Init();
  int sd_res = SD_Init();
  return nand_res | sd_res;
}


x86 assembly (clang, -O0):
<sdmmc_sdcard_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <InitSD@plt>
mov    $0x0,%al
call   1040 <Nand_Init@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <SD_Init@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdmmc_sdcard_init>:
push   %rbx
xor    %eax,%eax
call   1030 <InitSD@plt>
xor    %eax,%eax
call   1040 <Nand_Init@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <SD_Init@plt>
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sdmmc_sdcard_init() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @InitSD()
%4 = call i32 (...) @Nand_Init()
store i32 %4, i32* %1
%5 = call i32 (...) @SD_Init()
store i32 %5, i32* %2
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = or i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @sdmmc_sdcard_init() {
%1 = tail call i32 (...) @InitSD()
%2 = tail call i32 (...) @Nand_Init()
%3 = tail call i32 (...) @SD_Init()
%4 = or i32 %3, %2
ret i32 %4
}
int is_little_endian_cpu() {
  int x = 7;
  char *ptr = (char *)&x;
  if (ptr[0] == 0)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<is_little_endian_cpu>:
push   %rbp
mov    %rsp,%rbp
movl   $0x7,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    112f <is_little_endian_cpu+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1136 <is_little_endian_cpu+0x36>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @is_little_endian_cpu() {
ret i32 1
}
void ath79_register_nfc(void) {}


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

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

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

LLVM IR (-O2):
define void @ath79_register_nfc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[], char *envp[]) {
  if ((unsigned int)argc > 7) {
    printf("Other!\n");
  } else {
    printf("Two!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x7,-0x8(%rbp)
jbe    1145 <main+0x35>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
jmp    1151 <main+0x41>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x8,%edi
lea    0xeea(%rip),%rax
lea    0xede(%rip),%rdi
cmovae %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [5 x i8] c"Two!\00"
@str.2 = [7 x i8] c"Other!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = icmp ugt i32 %0, 7
%5 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret i32 0
}
int do_526() { return 526; }


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

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

LLVM IR (-O0):
define i32 @do_526() {
ret i32 526
}

LLVM IR (-O2):
define i32 @do_526() {
ret i32 526
}
void(libclut_model_ydbdr_to_yuv)(double db, double dr, double *u, double *v) {
  do {
    *(u) = (db)*1000 / 3069;
    *(v) = (dr)*1000 / -2169;
  } while (0);
}


x86 assembly (clang, -O0):
<libclut_model_ydbdr_to_yuv>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  0xeea(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee5(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xec9(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xeb4(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<libclut_model_ydbdr_to_yuv>:
movsd  0xef8(%rip),%xmm2
mulsd  %xmm2,%xmm0
divsd  0xef4(%rip),%xmm0
movsd  %xmm0,(%rdi)
mulsd  %xmm2,%xmm1
divsd  0xeec(%rip),%xmm1
movsd  %xmm1,(%rsi)
ret

LLVM IR (-O0):
define void @libclut_model_ydbdr_to_yuv(double %0, double %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
store double %0, double* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
br label %9
9: ; preds = %4
%10 = load double, double* %5
%11 = fmul double %10, 1.000000e+03
%12 = fdiv double %11, 3.069000e+03
%13 = load double*, double** %7
store double %12, double* %13
%14 = load double, double* %6
%15 = fmul double %14, 1.000000e+03
%16 = fdiv double %15, -2.169000e+03
%17 = load double*, double** %8
store double %16, double* %17
br label %18
18: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @libclut_model_ydbdr_to_yuv(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = fmul double %0, 1.000000e+03
%6 = fdiv double %5, 3.069000e+03
store double %6, double* %2
%7 = fmul double %1, 1.000000e+03
%8 = fdiv double %7, -2.169000e+03
store double %8, double* %3
ret void
}
/* Variables and functions */
scalar_t__ istty();
char *rdz_yl() { return istty() ? "[0;33m" : ""; }


x86 assembly (clang, -O0):
<rdz_yl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <istty@plt>
mov    %rax,%rdx
lea    0xee2(%rip),%rax
lea    0xed4(%rip),%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdz_yl>:
push   %rax
xor    %eax,%eax
call   1030 <istty@plt>
test   %rax,%rax
lea    0xee5(%rip),%rcx
lea    0xed7(%rip),%rax
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[0;33m\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @rdz_yl() {
%1 = call i64 (...) @istty()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
ret i8* %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[0;33m\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @rdz_yl() {
%1 = tail call i64 (...) @istty()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long get_filesize(FILE *input_file) {
  long file_length;
  fseek(input_file, 0, SEEK_END);
  file_length = ftell(input_file);
  fseek(input_file, 0, SEEK_SET);
  return (file_length);
}


x86 assembly (clang, -O0):
<get_filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e80(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_filesize>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @get_filesize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_END
%6 = call i32 @fseek(i32* %4, i32 0, i32 %5)
%7 = load i32*, i32** %2
%8 = call i64 @ftell(i32* %7)
store i64 %8, i64* %3
%9 = load i32*, i32** %2
%10 = load i32, i32* @SEEK_SET
%11 = call i32 @fseek(i32* %9, i32 0, i32 %10)
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @get_filesize(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %0, i32 0, i32 %2)
%4 = tail call i64 @ftell(i32* %0)
%5 = load i32, i32* @SEEK_SET
%6 = tail call i32 @fseek(i32* %0, i32 0, i32 %5)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ ClearPoint8Led();
int /*<<< orphan*/ InitializeGame();
int /*<<< orphan*/ IsPoint8Led();
int /*<<< orphan*/ NewGameMessageReceived();
int /*<<< orphan*/ SetPoint8Led();
void GenericUpdateOnReceiveUART(char value) {
  switch (value) {
  case 0xFA:
    NewGameMessageReceived();
    break;
  case 0xFD:
    InitializeGame();
    break;
  case 0xFE:
    if (IsPoint8Led()) {
      ClearPoint8Led();
    } else {
      SetPoint8Led();
    }
    break;
  }
}


x86 assembly (clang, -O0):
<GenericUpdateOnReceiveUART>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0xfa,%eax
je     119b <GenericUpdateOnReceiveUART+0x4b>
jmp    1175 <GenericUpdateOnReceiveUART+0x25>
mov    -0x8(%rbp),%eax
sub    $0xfd,%eax
je     11a7 <GenericUpdateOnReceiveUART+0x57>
jmp    1188 <GenericUpdateOnReceiveUART+0x38>
mov    -0x8(%rbp),%eax
sub    $0xfe,%eax
je     11b3 <GenericUpdateOnReceiveUART+0x63>
jmp    11db <GenericUpdateOnReceiveUART+0x8b>
mov    $0x0,%al
call   1070 <NewGameMessageReceived@plt>
jmp    11db <GenericUpdateOnReceiveUART+0x8b>
mov    $0x0,%al
call   1040 <InitializeGame@plt>
jmp    11db <GenericUpdateOnReceiveUART+0x8b>
mov    $0x0,%al
call   1030 <IsPoint8Led@plt>
cmp    $0x0,%eax
je     11cf <GenericUpdateOnReceiveUART+0x7f>
mov    $0x0,%al
call   1050 <ClearPoint8Led@plt>
jmp    11d6 <GenericUpdateOnReceiveUART+0x86>
mov    $0x0,%al
call   1060 <SetPoint8Led@plt>
jmp    11db <GenericUpdateOnReceiveUART+0x8b>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @GenericUpdateOnReceiveUART(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %17 [
i32 250, label %5
i32 253, label %7
i32 254, label %9
]
5: ; preds = %1
%6 = call i32 (...) @NewGameMessageReceived()
br label %17
7: ; preds = %1
%8 = call i32 (...) @InitializeGame()
br label %17
9: ; preds = %1
%10 = call i32 (...) @IsPoint8Led()
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 (...) @ClearPoint8Led()
br label %16
14: ; preds = %9
%15 = call i32 (...) @SetPoint8Led()
br label %16
16: ; preds = %14, %12
br label %17
17: ; preds = %1, %16, %7, %5
ret void
}

LLVM IR (-O2):
define void @GenericUpdateOnReceiveUART(i8 signext %0) {
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int mp_strcmp(const char *s1, const char *s2) {
  char *p;
  if (*s1 == '!') {
    p = (char *)s1;
    p++;
    if (strcmp(p, s2) == 0)
      return 1;
    return 0;
  } else {
    return strcmp(s1, s2);
  }
}


x86 assembly (clang, -O0):
<mp_strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x21,%eax
jne    1172 <mp_strcmp+0x62>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1166 <mp_strcmp+0x56>
movl   $0x1,-0x4(%rbp)
jmp    1182 <mp_strcmp+0x72>
movl   $0x0,-0x4(%rbp)
jmp    1182 <mp_strcmp+0x72>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_strcmp>:
push   %rax
cmpb   $0x21,(%rdi)
jne    112a <mp_strcmp+0x1a>
add    $0x1,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret
pop    %rax
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @mp_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 33
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = tail call i32 @strcmp(i8* %6, i8* dereferenceable(1) %1)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %12
10: ; preds = %2
%11 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(1) %1)
br label %12
12: ; preds = %5, %10
%13 = phi i32 [ %11, %10 ], [ %9, %5 ]
ret i32 %13
}
void fo_scheduler_heart(int i) {}


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

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

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

LLVM IR (-O2):
define void @fo_scheduler_heart(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_goldfish_fb();
void module_init() { init_goldfish_fb(); }


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

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

LLVM IR (-O0):
define void @module_init() {
%1 = call i32 (...) @init_goldfish_fb()
ret void
}

LLVM IR (-O2):
define void @module_init() {
%1 = tail call i32 (...) @init_goldfish_fb()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stress_set_vm_method(char *);
void stress_vm_set_default(void) { stress_set_vm_method("all"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"all\00"
define void @stress_vm_set_default() {
%1 = call i32 @stress_set_vm_method(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"all\00"
define void @stress_vm_set_default() {
%1 = tail call i32 @stress_set_vm_method(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ recv(int /*<<< orphan*/, int *, int, int /*<<< orphan*/);
void test_recv() {
  int n = 0;
  recv(0, &n, sizeof(int), 0);
  assert(n == 0);
}


x86 assembly (clang, -O0):
<test_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %ecx,%ecx
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
mov    %ecx,%edi
call   1030 <recv@plt>
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_recv>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
xor    %edi,%edi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
xor    %edi,%edi
cmpl   $0x0,0x4(%rsp)
sete   %dil
call   1040 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test_recv() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @recv(i32 0, i32* %1, i32 4, i32 0)
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
ret void
}

LLVM IR (-O2):
define void @test_recv() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @recv(i32 0, i32* %1, i32 4, i32 0)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
ret void
}
int cmp(const void *a, const void *b) { return (*(int *)a) - (*(int *)b); }


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

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

LLVM IR (-O0):
define i32 @cmp(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
unsigned int set_hash(unsigned int, int /*<<< orphan*/);
extern unsigned int cdbhash(char *buf, unsigned int len) {
  unsigned int h;
  h = 5381;
  while (len) {
    h = set_hash(h, *buf++);
    --len;
  }
  return (h % 5381);
}


x86 assembly (clang, -O0):
<cdbhash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1505,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     115b <cdbhash+0x4b>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%esi
call   1030 <set_hash@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <cdbhash+0x16>
mov    -0x10(%rbp),%eax
mov    $0x1505,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdbhash>:
test   %esi,%esi
je     116d <cdbhash+0x5d>
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
mov    %esi,%r15d
mov    $0x1505,%eax
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%esi
mov    %eax,%edi
call   1030 <set_hash@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <cdbhash+0x20>
mov    %eax,%ecx
mov    $0x85bb9663,%edx
imul   %rcx,%rdx
shr    $0x20,%rdx
mov    %eax,%ecx
sub    %edx,%ecx
shr    %ecx
add    %edx,%ecx
shr    $0xc,%ecx
imul   $0x1505,%ecx,%ecx
sub    %ecx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @cdbhash(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %16, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ 5381, %2 ]
%6 = phi i32 [ %12, %4 ], [ %1, %2 ]
%7 = phi i8* [ %8, %4 ], [ %0, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %7
%10 = sext i8 %9 to i32
%11 = tail call i32 @set_hash(i32 %5, i32 %10)
%12 = add i32 %6, -1
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %11, 5381
br label %16
16: ; preds = %14, %2
%17 = phi i32 [ 0, %2 ], [ %15, %14 ]
ret i32 %17
}
void outw(unsigned short port, unsigned short data) {
  asm volatile("outw %1, %0" ::"Nd"(port), "a"(data));
}


x86 assembly (clang, -O0):
<outw>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x4(%rbp),%ax
out    %ax,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outw>:
mov    %esi,%eax
mov    %edi,%edx
out    %ax,(%dx)
ret

LLVM IR (-O0):
define void @outw(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @outw(i16 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outw $1, $0", "N{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i16 %0, i16 %1)
ret void
}
void do_not_used(struct pt_regs *pt_regs) { return; }


x86 assembly (clang, -O0):
<do_not_used>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.pt_regs = type opaque
define void @do_not_used(%struct.pt_regs* %0) {
%2 = alloca %struct.pt_regs*
store %struct.pt_regs* %0, %struct.pt_regs** %2
ret void
}

LLVM IR (-O2):
%struct.pt_regs = type opaque
define void @do_not_used(%struct.pt_regs* nocapture %0) {
ret void
}
int SPVcomp_asc(const void *spvE1, const void *spvE2) {
  int E1 = *((int *)spvE1);
  int E2 = *((int *)spvE2);
  if (E1 > E2)
    return 1;
  if (E1 < E2)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<SPVcomp_asc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    1136 <SPVcomp_asc+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1155 <SPVcomp_asc+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    114e <SPVcomp_asc+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <SPVcomp_asc+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPVcomp_asc>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setl   %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

LLVM IR (-O0):
define i32 @SPVcomp_asc(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i32*
%13 = load i32, i32* %12
store i32 %13, i32* %7
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %24
18: ; preds = %2
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 -1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @SPVcomp_asc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
void wfunc(char *s) { (void)gets(s); }


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

x86 assembly (clang, -O2):
<wfunc>:
jmp    1030 <gets@plt>

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

LLVM IR (-O2):
define void @wfunc(i8* %0) {
%2 = tail call i32 @gets(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int);
int f5(int x, int y, int z, int w, int u) {
  printf("f5 received: %d %d %d %d %d\n", x, y, z, w, u);
  return (x * y) + (z * w) + u;
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    %ecx,%eax
add    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%ebp
mov    %edx,%r15d
mov    %esi,%ebx
mov    %edi,%r12d
lea    0xed4(%rip),%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %ebp,%r8d
mov    %r14d,%r9d
call   1030 <printf@plt>
imul   %r12d,%ebx
imul   %r15d,%ebp
add    %ebx,%ebp
add    %r14d,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"f5 received: %d %d %d %d %d\0A\00"
define i32 @f5(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = mul nsw i32 %17, %18
%20 = load i32, i32* %8
%21 = load i32, i32* %9
%22 = mul nsw i32 %20, %21
%23 = add nsw i32 %19, %22
%24 = load i32, i32* %10
%25 = add nsw i32 %23, %24
ret i32 %25
}

LLVM IR (-O2):
@.str = [29 x i8] c"f5 received: %d %d %d %d %d\0A\00"
define i32 @f5(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
%7 = mul nsw i32 %1, %0
%8 = mul nsw i32 %3, %2
%9 = add nsw i32 %8, %7
%10 = add nsw i32 %9, %4
ret i32 %10
}
/* Variables and functions */
int remove(char const *);
int osys_unlink(const char *path) { return remove(path); }


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

x86 assembly (clang, -O2):
<osys_unlink>:
jmp    1030 <remove@plt>

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

LLVM IR (-O2):
define i32 @osys_unlink(i8* nocapture %0) {
%2 = tail call i32 @remove(i8* %0)
ret i32 %2
}
/* Variables and functions */
double random_number(double, double);
double about(double value, double variation) {
  return (value + (value * random_number(-variation, variation)));
}


x86 assembly (clang, -O0):
<about>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <random_number@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<about>:
push   %rax
movsd  %xmm0,(%rsp)
movapd 0xee2(%rip),%xmm0
xorpd  %xmm1,%xmm0
call   1030 <random_number@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @about(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* %3
%7 = load double, double* %4
%8 = fneg double %7
%9 = load double, double* %4
%10 = call double @random_number(double %8, double %9)
%11 = call double @llvm.fmuladd.f64(double %6, double %10, double %5)
ret double %11
}

LLVM IR (-O2):
define double @about(double %0, double %1) {
%3 = fneg double %1
%4 = tail call double @random_number(double %3, double %1)
%5 = tail call double @llvm.fmuladd.f64(double %0, double %4, double %0)
ret double %5
}
int cairo_code_draw_casCellLabel_get_height() { return 10; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casCellLabel_get_height() {
ret i32 10
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casCellLabel_get_height() {
ret i32 10
}
float red(float value) {
  if (value > 0.5f) {
    if (value < 0.75f)
      return (value - 0.5f) * 4.f;
    else
      return 1.f;
  }
  return 0.f;
}


x86 assembly (clang, -O0):
<red>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    116a <red+0x6a>
movss  0xedd(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1158 <red+0x58>
movss  -0x8(%rbp),%xmm0
movss  0xec2(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xec2(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1172 <red+0x72>
movss  0xea8(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1172 <red+0x72>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<red>:
xorps  %xmm1,%xmm1
ucomiss 0xef6(%rip),%xmm0
jbe    112c <red+0x2c>
movss  0xef4(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1130 <red+0x30>
addss  0xeeb(%rip),%xmm0
mulss  0xee7(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm1,%xmm0
ret
movss  0xecc(%rip),%xmm0
ret

LLVM IR (-O0):
define float @red(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ogt float %4, 5.000000e-01
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load float, float* %3
%8 = fcmp olt float %7, 7.500000e-01
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load float, float* %3
%11 = fsub float %10, 5.000000e-01
%12 = fmul float %11, 4.000000e+00
store float %12, float* %2
br label %15
13: ; preds = %6
store float 1.000000e+00, float* %2
br label %15
14: ; preds = %1
store float 0.000000e+00, float* %2
br label %15
15: ; preds = %14, %13, %9
%16 = load float, float* %2
ret float %16
}

LLVM IR (-O2):
define float @red(float %0) {
%2 = fcmp ogt float %0, 5.000000e-01
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = fcmp olt float %0, 7.500000e-01
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = fadd float %0, -5.000000e-01
%7 = fmul float %6, 4.000000e+00
br label %8
8: ; preds = %1, %3, %5
%9 = phi float [ %7, %5 ], [ 1.000000e+00, %3 ], [ 0.000000e+00, %1 ]
ret float %9
}
/* Variables and functions */
char *make_return_packet(int /*<<< orphan*/);
char *gdb_set(char *query) { return (make_return_packet(0)); }


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

x86 assembly (clang, -O2):
<gdb_set>:
xor    %edi,%edi
jmp    1030 <make_return_packet@plt>

LLVM IR (-O0):
define i8* @gdb_set(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i8* @make_return_packet(i32 0)
ret i8* %3
}

LLVM IR (-O2):
define i8* @gdb_set(i8* nocapture readnone %0) {
%2 = tail call i8* @make_return_packet(i32 0)
ret i8* %2
}