#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int aleph_Cycle();
int aleph_KeyLength();
char *aleph_Name();
int /*<<< orphan*/ aleph_SeedW(char *, int);
int aleph_StateBits();
int /*<<< orphan*/ printf(char *, char *, int, int, int, int, int);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char *argv[]) {
  int i;
  char seed[2048] = "Bacon";
  if (argc >= 2)
    strcpy(seed, argv[1]);
  printf("CSPRNG        : %s\nKey length    : %u bits\nInternal state: %u "
         "bits\nMinimum cycle : 2**%u\nMaximum cycle : 2**%u\nAverage cycle : "
         "2**%u\n",
         aleph_Name(), aleph_KeyLength(), aleph_StateBits(), aleph_Cycle(),
         aleph_StateBits(), aleph_StateBits() - 2);
  aleph_SeedW(seed, 8 * 7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x840,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x820(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1060 <memset@plt>
movb   $0x42,-0x820(%rbp)
movb   $0x61,-0x81f(%rbp)
movb   $0x63,-0x81e(%rbp)
movb   $0x6f,-0x81d(%rbp)
movb   $0x6e,-0x81c(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     11ed <main+0x6d>
lea    -0x820(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1040 <strcpy@plt>
mov    $0x0,%al
call   1090 <aleph_Name@plt>
mov    %rax,-0x838(%rbp)
mov    $0x0,%al
call   1030 <aleph_KeyLength@plt>
mov    %eax,-0x830(%rbp)
mov    $0x0,%al
call   1080 <aleph_StateBits@plt>
mov    %eax,-0x82c(%rbp)
mov    $0x0,%al
call   10a0 <aleph_Cycle@plt>
mov    %eax,-0x828(%rbp)
mov    $0x0,%al
call   1080 <aleph_StateBits@plt>
mov    %eax,-0x824(%rbp)
mov    $0x0,%al
call   1080 <aleph_StateBits@plt>
mov    -0x838(%rbp),%rsi
mov    -0x830(%rbp),%edx
mov    -0x82c(%rbp),%ecx
mov    -0x828(%rbp),%r8d
mov    -0x824(%rbp),%r9d
sub    $0x2,%eax
lea    0xd9f(%rip),%rdi
mov    %eax,(%rsp)
call   1050 <printf@plt>
lea    -0x820(%rbp),%rdi
mov    $0x38,%esi
call   1070 <aleph_SeedW@plt>
xor    %eax,%eax
add    $0x840,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x810,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0x10(%rsp),%rdi
mov    $0x800,%edx
xor    %esi,%esi
call   1060 <memset@plt>
movl   $0x6f636142,0x10(%rsp)
6f
movb   $0x6e,0x14(%rsp)
cmp    $0x2,%ebp
jl     11c5 <main+0x45>
mov    0x8(%rbx),%rsi
lea    0x10(%rsp),%rdi
call   1040 <strcpy@plt>
xor    %eax,%eax
call   1090 <aleph_Name@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1030 <aleph_KeyLength@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1080 <aleph_StateBits@plt>
mov    %eax,%r12d
xor    %eax,%eax
call   10a0 <aleph_Cycle@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1080 <aleph_StateBits@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <aleph_StateBits@plt>
add    $0xfffffffe,%eax
mov    %eax,(%rsp)
lea    0xdf7(%rip),%rdi
mov    %r14,%rsi
mov    %r15d,%edx
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    %ebx,%r9d
call   1050 <printf@plt>
lea    0x10(%rsp),%rdi
mov    $0x38,%esi
call   1070 <aleph_SeedW@plt>
xor    %eax,%eax
add    $0x810,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [134 x i8] c"CSPRNG : %s\0AKey length : %u bits\0AInternal state: %u bits\0AMinimum cycle : 2**%u\0AMaximum cycle : 2**%u\0AAverage cycle : 2**%u\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [2048 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [2048 x i8]* %7 to i8*
%9 = bitcast i8* %8 to [2048 x i8]*
%10 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i32 0, i32 0
store i8 66, i8* %10
%11 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i32 0, i32 1
store i8 97, i8* %11
%12 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i32 0, i32 2
store i8 99, i8* %12
%13 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i32 0, i32 3
store i8 111, i8* %13
%14 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i32 0, i32 4
store i8 110, i8* %14
%15 = load i32, i32* %4
%16 = icmp sge i32 %15, 2
br i1 %16, label %17, label %23
17: ; preds = %2
%18 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 0
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32 @strcpy(i8* %18, i8* %21)
br label %23
23: ; preds = %17, %2
%24 = call i8* (...) @aleph_Name()
%25 = call i32 (...) @aleph_KeyLength()
%26 = call i32 (...) @aleph_StateBits()
%27 = call i32 (...) @aleph_Cycle()
%28 = call i32 (...) @aleph_StateBits()
%29 = call i32 (...) @aleph_StateBits()
%30 = sub nsw i32 %29, 2
%31 = call i32 @printf(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i8* %24, i32 %25, i32 %26, i32 %27, i32 %28, i32 %30)
%32 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 0
%33 = call i32 @aleph_SeedW(i8* %32, i32 56)
ret i32 0
}

LLVM IR (-O2):
@.str = [134 x i8] c"CSPRNG : %s\0AKey length : %u bits\0AInternal state: %u bits\0AMinimum cycle : 2**%u\0AMaximum cycle : 2**%u\0AAverage cycle : 2**%u\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [2048 x i8]
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
store i8 66, i8* %4
%5 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 1
store i8 97, i8* %5
%6 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 2
store i8 99, i8* %6
%7 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 3
store i8 111, i8* %7
%8 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 4
store i8 110, i8* %8
%9 = icmp sgt i32 %0, 1
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @strcpy(i8* %4, i8* %12)
br label %14
14: ; preds = %10, %2
%15 = call i8* (...) @aleph_Name()
%16 = call i32 (...) @aleph_KeyLength()
%17 = call i32 (...) @aleph_StateBits()
%18 = call i32 (...) @aleph_Cycle()
%19 = call i32 (...) @aleph_StateBits()
%20 = call i32 (...) @aleph_StateBits()
%21 = add nsw i32 %20, -2
%22 = call i32 @printf(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i8* %15, i32 %16, i32 %17, i32 %18, i32 %19, i32 %21)
%23 = call i32 @aleph_SeedW(i8* %4, i32 56)
ret i32 0
}