xunge/DecIR huggingface dataset:
int checkOne(char *toCheck, char *match) {
  if (!match || !toCheck) {
    logError("String passed equivalent to NULL", __func__);
    return -1;
  }
  if (strcmp(toCheck, match) == 0) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<checkOne>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1146 <checkOne+0x26>
cmpq   $0x0,-0x10(%rbp)
jne    1167 <checkOne+0x47>
lea    0xeb3(%rip),%rdi
lea    0xecd(%rip),%rsi
mov    $0x0,%al
call   1030 <logError@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1190 <checkOne+0x70>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1189 <checkOne+0x69>
movl   $0x0,-0x4(%rbp)
jmp    1190 <checkOne+0x70>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkOne>:
push   %rax
test   %rdi,%rdi
je     113b <checkOne+0x1b>
test   %rsi,%rsi
je     113b <checkOne+0x1b>
call   1040 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rcx
ret
lea    0xebe(%rip),%rdi
lea    0xed8(%rip),%rsi
xor    %eax,%eax
call   1030 <logError@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"String passed equivalent to NULL\00"
@__func__.checkOne = [9 x i8] c"checkOne\00"
define i32 @checkOne(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %8, %2
%12 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @logError to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.checkOne, i64 0, i64 0))
store i32 -1, i32* %3
br label %20
13: ; preds = %8
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = call i32 @strcmp(i8* %14, i8* %15)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %13
store i32 0, i32* %3
br label %20
19: ; preds = %13
store i32 1, i32* %3
br label %20
20: ; preds = %19, %18, %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [33 x i8] c"String passed equivalent to NULL\00"
@__func__.checkOne = [9 x i8] c"checkOne\00"
define i32 @checkOne(i8* %0, i8* %1) {
%3 = icmp ne i8* %1, null
%4 = icmp ne i8* %0, null
%5 = and i1 %4, %3
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @logError to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.checkOne, i64 0, i64 0))
br label %12
8: ; preds = %2
%9 = tail call i32 @strcmp(i8* %0, i8* %1)
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %6
%13 = phi i32 [ -1, %6 ], [ %11, %8 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ generate_key();
int main(int argc, char *argv[]) {
  generate_key();
  return (0);
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @generate_key()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @generate_key()
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int anzahl;
  scanf("%d", &anzahl);
  while (anzahl >= 0) {
    printf("*");
    --anzahl;
  }
  printf("\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jl     1163 <main+0x43>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    113f <main+0x1f>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
js     1159 <main+0x39>
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x4(%rsp)
test   %eax,%eax
jg     1140 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %11
6: ; preds = %0, %6
%7 = call i32 @putchar(i32 42)
%8 = load i32, i32* %1
%9 = add nsw i32 %8, -1
store i32 %9, i32* %1
%10 = icmp sgt i32 %8, 0
br i1 %10, label %6, label %11
11: ; preds = %6, %0
%12 = call i32 @putchar(i32 10)
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}
/* Type definitions */
struct in_addr {
  int s_addr;
};
typedef int /*<<< orphan*/ network;

/* Variables and functions */
int /*<<< orphan*/ memset(struct in_addr *, int /*<<< orphan*/, int);
int prefix2mask(int);
struct in_addr calc_network(struct in_addr addr, int prefix) {
  struct in_addr mask;
  struct in_addr network;
  mask.s_addr = prefix2mask(prefix);
  memset(&network, 0, sizeof(network));
  network.s_addr = addr.s_addr & mask.s_addr;
  return network;
}


x86 assembly (clang, -O0):
<calc_network>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <prefix2mask@plt>
mov    %eax,-0x18(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_network>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <prefix2mask@plt>
mov    %eax,%ebp
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
and    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define i32 @calc_network(i32 %0, i32 %1) {
%3 = alloca %struct.in_addr
%4 = alloca %struct.in_addr
%5 = alloca i32
%6 = alloca %struct.in_addr
%7 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %4, i32 0, i32 0
store i32 %0, i32* %7
store i32 %1, i32* %5
%8 = load i32, i32* %5
%9 = call i32 @prefix2mask(i32 %8)
%10 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %6, i32 0, i32 0
store i32 %9, i32* %10
%11 = call i32 @memset(%struct.in_addr* %3, i32 0, i32 4)
%12 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %4, i32 0, i32 0
%13 = load i32, i32* %12
%14 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %6, i32 0, i32 0
%15 = load i32, i32* %14
%16 = and i32 %13, %15
%17 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
store i32 %16, i32* %17
%18 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
%19 = load i32, i32* %18
ret i32 %19
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
define i32 @calc_network(i32 %0, i32 %1) {
%3 = alloca %struct.in_addr
%4 = tail call i32 @prefix2mask(i32 %1)
%5 = call i32 @memset(%struct.in_addr* %3, i32 0, i32 4)
%6 = and i32 %4, %0
ret i32 %6
}
int f12(double a, int b) { return b == 31 || a == 0.0f; }


x86 assembly (clang, -O0):
<f12>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x1f,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     1132 <f12+0x32>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f12>:
cmp    $0x1f,%edi
sete   %al
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setnp  %cl
sete   %dl
and    %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @f12(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 31
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load double, double* %3
%9 = fcmp oeq double %8, 0.000000e+00
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @f12(double %0, i32 %1) {
%3 = icmp eq i32 %1, 31
%4 = fcmp oeq double %0, 0.000000e+00
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
int my_walk_fn(const void *key, const void *value, void *opaque) {
  const char *sk = key;
  const char *sv = value;
  ((opaque) = (opaque));
  printf("walk '%s':'%s'...\n", (const char *)sk, (const char *)sv);
  return 0;
}


x86 assembly (clang, -O0):
<my_walk_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_walk_fn>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"walk '%s':'%s'...\0A\00"
define i32 @my_walk_fn(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %4
store i8* %9, i8** %7
%10 = load i8*, i8** %5
store i8* %10, i8** %8
%11 = load i8*, i8** %6
store i8* %11, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"walk '%s':'%s'...\0A\00"
define i32 @my_walk_fn(i8* %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i32 0
}
/* Variables and functions */
scalar_t__ ceil(int /*<<< orphan*/);
int /*<<< orphan*/ fabs(double);
double fmax(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ log2(double const);
int fixed_range(double x_min, double x_max) {
  const double a = fmax(fabs(x_min), fabs(x_max));
  return (int)(ceil(log2(a + 1)) + 1);
}


x86 assembly (clang, -O0):
<fixed_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <fabs@plt>
mov    %eax,-0x1c(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <fabs@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
call   1060 <fmax@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xe80(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1030 <log2@plt>
mov    %eax,%edi
call   1040 <ceil@plt>
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixed_range>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
call   1050 <fabs@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
call   1050 <fabs@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1060 <fmax@plt>
addsd  0xe92(%rip),%xmm0
call   1030 <log2@plt>
mov    %eax,%edi
call   1040 <ceil@plt>
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fixed_range(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = call i32 @fabs(double %6)
%8 = load double, double* %4
%9 = call i32 @fabs(double %8)
%10 = call double @fmax(i32 %7, i32 %9)
store double %10, double* %5
%11 = load double, double* %5
%12 = fadd double %11, 1.000000e+00
%13 = call i32 @log2(double %12)
%14 = call i64 @ceil(i32 %13)
%15 = add nsw i64 %14, 1
%16 = trunc i64 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @fixed_range(double %0, double %1) {
%3 = tail call i32 @fabs(double %0)
%4 = tail call i32 @fabs(double %1)
%5 = tail call double @fmax(i32 %3, i32 %4)
%6 = fadd double %5, 1.000000e+00
%7 = tail call i32 @log2(double %6)
%8 = tail call i64 @ceil(i32 %7)
%9 = trunc i64 %8 to i32
%10 = add i32 %9, 1
ret i32 %10
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ ungetc(int, int /*<<< orphan*/);
int peekchar(void) {
  int c = getchar();
  if (c != EOF)
    ungetc(c, stdin);
  return c;
}


x86 assembly (clang, -O0):
<peekchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ea4(%rip),%rcx
cmp    (%rcx),%eax
je     1155 <peekchar+0x35>
mov    -0x4(%rbp),%edi
mov    0x2e9a(%rip),%rax
mov    (%rax),%esi
call   1040 <ungetc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peekchar>:
push   %rbx
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,%ebx
mov    0x2eaf(%rip),%rax
cmp    (%rax),%ebx
je     1145 <peekchar+0x25>
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1040 <ungetc@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
@stdin = global i32 0
define i32 @peekchar() {
%1 = alloca i32
%2 = call i32 (...) @getchar()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = load i32, i32* %1
%8 = load i32, i32* @stdin
%9 = call i32 @ungetc(i32 %7, i32 %8)
br label %10
10: ; preds = %6, %0
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@EOF = global i32 0
@stdin = global i32 0
define i32 @peekchar() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = load i32, i32* @stdin
%6 = tail call i32 @ungetc(i32 %1, i32 %5)
br label %7
7: ; preds = %4, %0
ret i32 %1
}
void __attribute__((visibility("default")))
border_nwse_double_diagonal_special_sand_s(unsigned char *pic,
                                           unsigned char *mirr) {
  *pic = 0x29;
  *mirr = 0x01;
}


x86 assembly (clang, -O0):
<border_nwse_double_diagonal_special_sand_s>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x29,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_nwse_double_diagonal_special_sand_s>:
movb   $0x29,(%rdi)
movb   $0x1,(%rsi)
ret

LLVM IR (-O0):
define void @border_nwse_double_diagonal_special_sand_s(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
store i8 41, i8* %5
%6 = load i8*, i8** %4
store i8 1, i8* %6
ret void
}

LLVM IR (-O2):
define void @border_nwse_double_diagonal_special_sand_s(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 41, i8* %0
store i8 1, i8* %1
ret void
}
unsigned int bitrng(unsigned int value, int hi, int lo) {
  return ((value >> lo) & ((1 << (hi - lo + 1)) - 1));
}


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

x86 assembly (clang, -O2):
<bitrng>:
mov    %edx,%ecx
shr    %cl,%edi
sub    %edx,%esi
lea    0x1(%rsi),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @bitrng(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %6
%9 = lshr i32 %7, %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = sub nsw i32 %10, %11
%13 = add nsw i32 %12, 1
%14 = shl i32 1, %13
%15 = sub nsw i32 %14, 1
%16 = and i32 %9, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @bitrng(i32 %0, i32 %1, i32 %2) {
%4 = lshr i32 %0, %2
%5 = add i32 %1, 1
%6 = sub i32 %5, %2
%7 = shl nsw i32 -1, %6
%8 = xor i32 %7, -1
%9 = and i32 %4, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit_with_status_and_signal(int, int /*<<< orphan*/);
void __attribute__((noreturn)) exit(int val) {
  exit_with_status_and_signal(val, 0);
}


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <exit_with_status_and_signal@plt>

x86 assembly (clang, -O2):
<exit>:
push   %rax
xor    %esi,%esi
call   1030 <exit_with_status_and_signal@plt>

LLVM IR (-O0):
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @exit_with_status_and_signal(i32 %3, i32 0)
unreachable
}

LLVM IR (-O2):
define void @exit(i32 %0) {
%2 = tail call i32 @exit_with_status_and_signal(i32 %0, i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ Widget;

/* Variables and functions */
int HeightOfScreen(int /*<<< orphan*/);
int WidthOfScreen(int /*<<< orphan*/);
int /*<<< orphan*/ XtScreen(int /*<<< orphan*/);
int /*<<< orphan*/ position_near(int /*<<< orphan*/, int, int);
void position_near_center(Widget shell) {
  position_near(shell, WidthOfScreen(XtScreen(shell)) / 2,
                HeightOfScreen(XtScreen(shell)) / 2);
}


x86 assembly (clang, -O0):
<position_near_center>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <XtScreen@plt>
mov    %eax,%edi
call   1050 <WidthOfScreen@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <XtScreen@plt>
mov    %eax,%edi
call   1060 <HeightOfScreen@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
call   1030 <position_near@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<position_near_center>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <XtScreen@plt>
mov    %eax,%edi
call   1050 <WidthOfScreen@plt>
mov    %eax,%ebp
shr    $0x1f,%ebp
add    %eax,%ebp
sar    %ebp
mov    %ebx,%edi
call   1040 <XtScreen@plt>
mov    %eax,%edi
call   1060 <HeightOfScreen@plt>
mov    %eax,%edx
shr    $0x1f,%edx
add    %eax,%edx
sar    %edx
mov    %ebx,%edi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <position_near@plt>

LLVM IR (-O0):
define void @position_near_center(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @XtScreen(i32 %4)
%6 = call i32 @WidthOfScreen(i32 %5)
%7 = sdiv i32 %6, 2
%8 = load i32, i32* %2
%9 = call i32 @XtScreen(i32 %8)
%10 = call i32 @HeightOfScreen(i32 %9)
%11 = sdiv i32 %10, 2
%12 = call i32 @position_near(i32 %3, i32 %7, i32 %11)
ret void
}

LLVM IR (-O2):
define void @position_near_center(i32 %0) {
%2 = tail call i32 @XtScreen(i32 %0)
%3 = tail call i32 @WidthOfScreen(i32 %2)
%4 = sdiv i32 %3, 2
%5 = tail call i32 @XtScreen(i32 %0)
%6 = tail call i32 @HeightOfScreen(i32 %5)
%7 = sdiv i32 %6, 2
%8 = tail call i32 @position_near(i32 %0, i32 %4, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set32(int, int);
void HW_184_2(void) { set32(0xD800184, 0x438E); }


x86 assembly (clang, -O0):
<HW_184_2>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd800184,%edi
mov    $0x438e,%esi
call   1030 <set32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HW_184_2>:
mov    $0xd800184,%edi
mov    $0x438e,%esi
jmp    1030 <set32@plt>

LLVM IR (-O0):
define void @HW_184_2() {
%1 = call i32 @set32(i32 226492804, i32 17294)
ret void
}

LLVM IR (-O2):
define void @HW_184_2() {
%1 = tail call i32 @set32(i32 226492804, i32 17294)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ db_output(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ iprintf(char *);
int siprintf(char *, char *);
int db_printf0(char *format) {
  char buf[200];
  int res = siprintf(buf, format);
  if (res == -1) {
    iprintf("ERROR - Debug call to asprintf failed\n");
    exit(-1);
  }
  db_output(buf);
  return res;
}


x86 assembly (clang, -O0):
<db_printf0>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <siprintf@plt>
mov    %eax,-0xd4(%rbp)
cmpl   $0xffffffff,-0xd4(%rbp)
jne    1188 <db_printf0+0x48>
lea    0xe87(%rip),%rdi
call   1060 <iprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
lea    -0xd0(%rbp),%rdi
call   1040 <db_output@plt>
mov    -0xd4(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_printf0>:
push   %rbx
sub    $0xd0,%rsp
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <siprintf@plt>
cmp    $0xffffffff,%eax
je     116d <db_printf0+0x2d>
mov    %eax,%ebx
mov    %rsp,%rdi
call   1040 <db_output@plt>
mov    %ebx,%eax
add    $0xd0,%rsp
pop    %rbx
ret
lea    0xe8c(%rip),%rdi
call   1060 <iprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"ERROR - Debug call to asprintf failed\0A\00"
define i32 @db_printf0(i8* %0) {
%2 = alloca i8*
%3 = alloca [200 x i8]
%4 = alloca i32
store i8* %0, i8** %2
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @siprintf(i8* %5, i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = call i32 @iprintf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 -1)
unreachable
13: ; preds = %1
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%15 = call i32 @db_output(i8* %14)
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
@.str = [39 x i8] c"ERROR - Debug call to asprintf failed\0A\00"
define i32 @db_printf0(i8* %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = call i32 @siprintf(i8* %3, i8* %0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @iprintf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 -1)
unreachable
9: ; preds = %1
%10 = call i32 @db_output(i8* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ALERT;
int /*<<< orphan*/ LOG_AUTH;
int /*<<< orphan*/ LOG_PID;
int /*<<< orphan*/ closelog();
int /*<<< orphan*/ openlog(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char const *);
void send_syslog_alert(char *ident, const char *msg) {
  openlog(ident, LOG_PID, LOG_AUTH);
  syslog(LOG_ALERT, msg);
  closelog();
}


x86 assembly (clang, -O0):
<send_syslog_alert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e85(%rip),%rax
mov    (%rax),%esi
mov    0x2e8c(%rip),%rax
mov    (%rax),%edx
call   1050 <openlog@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
call   1040 <syslog@plt>
mov    $0x0,%al
call   1030 <closelog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_syslog_alert>:
push   %rbx
mov    %rsi,%rbx
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
call   1050 <openlog@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
call   1040 <syslog@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <closelog@plt>

LLVM IR (-O0):
@LOG_PID = global i32 0
@LOG_AUTH = global i32 0
@LOG_ALERT = global i32 0
define void @send_syslog_alert(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @LOG_PID
%7 = load i32, i32* @LOG_AUTH
%8 = call i32 @openlog(i8* %5, i32 %6, i32 %7)
%9 = load i32, i32* @LOG_ALERT
%10 = load i8*, i8** %4
%11 = call i32 @syslog(i32 %9, i8* %10)
%12 = call i32 (...) @closelog()
ret void
}

LLVM IR (-O2):
@LOG_PID = global i32 0
@LOG_AUTH = global i32 0
@LOG_ALERT = global i32 0
define void @send_syslog_alert(i8* %0, i8* %1) {
%3 = load i32, i32* @LOG_PID
%4 = load i32, i32* @LOG_AUTH
%5 = tail call i32 @openlog(i8* %0, i32 %3, i32 %4)
%6 = load i32, i32* @LOG_ALERT
%7 = tail call i32 @syslog(i32 %6, i8* %1)
%8 = tail call i32 (...) @closelog()
ret void
}
/* Variables and functions */
int dmp_tm_lifecycle_initialize();
int dmp_tm_initialize(void) { return dmp_tm_lifecycle_initialize(); }


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

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

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

LLVM IR (-O2):
define i32 @dmp_tm_initialize() {
%1 = tail call i32 (...) @dmp_tm_lifecycle_initialize()
ret i32 %1
}
int (*get_arr_ptr(int (*arr)[4]))[4] { return arr; }


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

x86 assembly (clang, -O2):
<get_arr_ptr>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define [4 x i32]* @get_arr_ptr([4 x i32]* %0) {
%2 = alloca [4 x i32]*
store [4 x i32]* %0, [4 x i32]** %2
%3 = load [4 x i32]*, [4 x i32]** %2
ret [4 x i32]* %3
}

LLVM IR (-O2):
define [4 x i32]* @get_arr_ptr([4 x i32]* readnone returned %0) {
ret [4 x i32]* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *debug_log_set(int /*<<< orphan*/);
int /*<<< orphan*/ fopen(char const *, char *);
FILE *debug_log_open(const char *filename) {
  return debug_log_set(fopen(filename, "a"));
}


x86 assembly (clang, -O0):
<debug_log_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %eax,%edi
call   1030 <debug_log_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_log_open>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <debug_log_set@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
define i32* @debug_log_open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fopen(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = call i32* @debug_log_set(i32 %4)
ret i32* %5
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
define i32* @debug_log_open(i8* %0) {
%2 = tail call i32 @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32* @debug_log_set(i32 %2)
ret i32* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int O_CREAT;
int O_TRUNC;
int O_WRONLY;
int open(char const *, int);
int creat(const char *filename, mode_t mode) {
  return open(filename, O_CREAT | O_WRONLY | O_TRUNC);
}


x86 assembly (clang, -O0):
<creat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
mov    0x2e95(%rip),%rax
or     (%rax),%esi
mov    0x2eb4(%rip),%rax
or     (%rax),%esi
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creat>:
mov    0x2ee1(%rip),%rax
mov    0x2eaa(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2ec7(%rip),%rax
or     (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
@O_TRUNC = global i32 0
define i32 @creat(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_CREAT
%7 = load i32, i32* @O_WRONLY
%8 = or i32 %6, %7
%9 = load i32, i32* @O_TRUNC
%10 = or i32 %8, %9
%11 = call i32 @open(i8* %5, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
@O_TRUNC = global i32 0
define i32 @creat(i8* nocapture %0, i32 %1) {
%3 = load i32, i32* @O_CREAT
%4 = load i32, i32* @O_WRONLY
%5 = or i32 %4, %3
%6 = load i32, i32* @O_TRUNC
%7 = or i32 %5, %6
%8 = tail call i32 @open(i8* %0, i32 %7)
ret i32 %8
}
int thermal_notify_tz_delete(int tz_id) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @thermal_notify_tz_delete(i32 %0) {
ret i32 0
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
char *strerror(int);
void Die(char *str) {
  char *errno_str = strerror(errno);
  printf(str);
  printf("errno(%d):\n", errno);
  printf(errno_str);
  exit(-1);
}


x86 assembly (clang, -O0):
<Die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%esi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Die>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2ea1(%rip),%r15
mov    (%r15),%edi
call   1050 <strerror@plt>
mov    %rax,%r14
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%r15),%esi
lea    0xea2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
@.str = [12 x i8] c"errno(%d):\0A\00"
define void @Die(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i32, i32* @errno
%5 = call i8* @strerror(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @printf(i8* %6)
%8 = load i32, i32* @errno
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i8*, i8** %3
%11 = call i32 (i8*, ...) @printf(i8* %10)
%12 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [12 x i8] c"errno(%d):\0A\00"
define void @Die(i8* nocapture %0) {
%2 = load i32, i32* @errno
%3 = tail call i8* @strerror(i32 %2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0)
%5 = load i32, i32* @errno
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %3)
%8 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
unsigned char *blake384_buffer(unsigned char *, unsigned char const *, size_t);
unsigned char *hash_buffer_blake384(unsigned char *out, const unsigned char *in,
                                    size_t in_len) {
  return blake384_buffer(out, in, in_len);
}


x86 assembly (clang, -O0):
<hash_buffer_blake384>:
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 <blake384_buffer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_buffer_blake384>:
jmp    1030 <blake384_buffer@plt>

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

LLVM IR (-O2):
define i8* @hash_buffer_blake384(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @blake384_buffer(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
double cpuPcent();
int /*<<< orphan*/ printf(char *, double);
int main(int N, char *P[]) {
  double v;
  v = cpuPcent();
  printf("Le Pcentage CPU instantanne est %g\n", v);
  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    $0x0,%al
call   1030 <cpuPcent@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [36 x i8] c"Le Pcentage CPU instantanne est %g\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call double (...) @cpuPcent()
store double %7, double* %6
%8 = load double, double* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"Le Pcentage CPU instantanne est %g\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double (...) @cpuPcent()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rand16();
int /*<<< orphan*/ safe_asprintf(char **, char *, int /*<<< orphan*/,
                                 int /*<<< orphan*/);
char *_client_list_make_auth_token(const char *ip, const char *mac) {
  char *token;
  safe_asprintf(&token, "%04hx%04hx", rand16(), rand16());
  return token;
}


x86 assembly (clang, -O0):
<_client_list_make_auth_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand16@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <rand16@plt>
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
lea    -0x18(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1040 <safe_asprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_client_list_make_auth_token>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <rand16@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <rand16@plt>
lea    0xec4(%rip),%rsi
lea    0x8(%rsp),%rdi
mov    %ebx,%edx
mov    %eax,%ecx
call   1040 <safe_asprintf@plt>
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%04hx%04hx\00"
define i8* @_client_list_make_auth_token(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = call i32 (...) @rand16()
%7 = call i32 (...) @rand16()
%8 = call i32 @safe_asprintf(i8** %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
@.str = [11 x i8] c"%04hx%04hx\00"
define i8* @_client_list_make_auth_token(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = tail call i32 (...) @rand16()
%6 = tail call i32 (...) @rand16()
%7 = call i32 @safe_asprintf(i8** %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i8*, i8** %3
ret i8* %8
}
int imx6ul_cpuidle_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @imx6ul_cpuidle_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void writeDataType(int data) { printf("%d ", data); }


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

x86 assembly (clang, -O2):
<writeDataType>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @writeDataType(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ putchar(int);
main() {
  int c;
  while ((c = getchar()) != EOF) {
    putchar(c);
    printf("%d", EOF);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e98(%rip),%rcx
cmp    (%rcx),%eax
je     117a <main+0x4a>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%esi
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
jmp    113f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2ea6(%rip),%rbx
cmp    (%rbx),%eax
je     116c <main+0x3c>
lea    0xeb3(%rip),%r14
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
mov    (%rbx),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    (%rbx),%eax
jne    1150 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %12, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %9, %4 ], [ %1, %0 ]
%6 = tail call i32 @putchar(i32 %5)
%7 = load i32, i32* @EOF
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 (...) @getchar()
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %4
12: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int containsDrop(char *str, size_t len) {
  for (int i = 0; i < len; i++) {
    if (str[i] == 'D')
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<containsDrop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1155 <containsDrop+0x55>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x44,%eax
jne    1142 <containsDrop+0x42>
movl   $0x1,-0x4(%rbp)
jmp    115c <containsDrop+0x5c>
jmp    1147 <containsDrop+0x47>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <containsDrop+0x13>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<containsDrop>:
test   %rsi,%rsi
je     113b <containsDrop+0x3b>
mov    $0x1,%eax
cmpb   $0x44,(%rdi)
je     113a <containsDrop+0x3a>
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rax,%rcx
cmp    %rax,%rsi
je     1132 <containsDrop+0x32>
lea    0x1(%rcx),%rax
cmpb   $0x44,(%rdi,%rcx,1)
jne    1120 <containsDrop+0x20>
xor    %eax,%eax
cmp    %rsi,%rcx
setb   %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @containsDrop(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %18, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 68
br i1 %6, label %18, label %7
7: ; preds = %4, %10
%8 = phi i64 [ %14, %10 ], [ 1, %4 ]
%9 = icmp eq i64 %8, %1
br i1 %9, label %15, label %10
10: ; preds = %7
%11 = getelementptr inbounds i8, i8* %0, i64 %8
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 68
%14 = add nuw i64 %8, 1
br i1 %13, label %15, label %7
15: ; preds = %7, %10
%16 = icmp ult i64 %8, %1
%17 = zext i1 %16 to i32
br label %18
18: ; preds = %15, %4, %2
%19 = phi i32 [ 0, %2 ], [ 1, %4 ], [ %17, %15 ]
ret i32 %19
}
char *mkfn(dest, pat, fn)
char *dest, *pat, *fn;
{
  char *d = dirname(pat);
  if (*d)
    sprintf(dest, "%s/%s", d, fn);
  else
    strcpy(dest, fn);
  return (dest);
}


x86 assembly (clang, -O0):
<mkfn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <dirname@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     1181 <mkfn+0x51>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xe8b(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    118e <mkfn+0x5e>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkfn>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
xor    %eax,%eax
call   1040 <dirname@plt>
movslq %eax,%rdx
cmpb   $0x0,(%rdx)
je     1162 <mkfn+0x32>
lea    0xead(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rcx
xor    %eax,%eax
call   1050 <sprintf@plt>
jmp    116d <mkfn+0x3d>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
define i8* @mkfn(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %5
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @dirname to i32 (i8*, ...)*)(i8* %8)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %7
%12 = load i8*, i8** %7
%13 = load i8, i8* %12
%14 = icmp ne i8 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %3
%16 = load i8*, i8** %4
%17 = load i8*, i8** %7
%18 = load i8*, i8** %6
%19 = call i32 (i8*, i8*, ...) @sprintf(i8* %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %17, i8* %18)
br label %24
20: ; preds = %3
%21 = load i8*, i8** %4
%22 = load i8*, i8** %6
%23 = call i8* @strcpy(i8* %21, i8* %22)
br label %24
24: ; preds = %20, %15
%25 = load i8*, i8** %4
ret i8* %25
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
define i8* @mkfn(i8* returned %0, i8* %1, i8* %2) {
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @dirname to i32 (i8*, ...)*)(i8* %1)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %2)
br label %13
11: ; preds = %3
%12 = tail call i8* @strcpy(i8* dereferenceable(1) %0, i8* dereferenceable(1) %2)
br label %13
13: ; preds = %11, %9
ret i8* %0
}
int test_imm_FFuint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0xFF << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_FFuint64_lowword_mem>:
cmpb   $0x0,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FFuint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 255
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}