#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 EXIT_SUCCESS;
int getpid();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(int);
int rand();
int /*<<< orphan*/ srand(int);
scalar_t__ time(int /*<<< orphan*/);
int main(void) {
  unsigned short int length = 16;
  srand((unsigned int)time(0) + getpid());
  while (length--) {
    putchar(rand() % 94 + 33);
    srand(rand());
  }
  printf("\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x10,-0x6(%rbp)
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0xc(%rbp),%edi
add    %eax,%edi
call   1060 <srand@plt>
mov    -0x6(%rbp),%ax
mov    %ax,%cx
add    $0xffff,%cx
mov    %cx,-0x6(%rbp)
cmp    $0x0,%ax
je     11d5 <main+0x75>
mov    $0x0,%al
call   1080 <rand@plt>
mov    $0x5e,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x21,%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1080 <rand@plt>
mov    %eax,%edi
call   1060 <srand@plt>
jmp    1190 <main+0x30>
lea    0xe24(%rip),%rdi
call   1050 <printf@plt>
mov    0x2df8(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1060 <time@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <getpid@plt>
add    %eax,%ebx
mov    %ebx,%edi
call   1050 <srand@plt>
mov    $0xfff0,%bx
nop
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0xffffffffae4c415d,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x5e,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x21,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1070 <rand@plt>
mov    %eax,%edi
call   1050 <srand@plt>
inc    %bx
jne    1170 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e1c(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
store i32 0, i32* %1
store i16 16, i16* %2
%3 = call i64 @time(i32 0)
%4 = trunc i64 %3 to i32
%5 = call i32 (...) @getpid()
%6 = add i32 %4, %5
%7 = call i32 @srand(i32 %6)
br label %8
8: ; preds = %12, %0
%9 = load i16, i16* %2
%10 = add i16 %9, -1
store i16 %10, i16* %2
%11 = icmp ne i16 %9, 0
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = call i32 (...) @rand()
%14 = srem i32 %13, 94
%15 = add nsw i32 %14, 33
%16 = call i32 @putchar(i32 %15)
%17 = call i32 (...) @rand()
%18 = call i32 @srand(i32 %17)
br label %8
19: ; preds = %8
%20 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%21 = load i32, i32* @EXIT_SUCCESS
ret i32 %21
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 @time(i32 0)
%2 = trunc i64 %1 to i32
%3 = tail call i32 (...) @getpid()
%4 = add i32 %3, %2
%5 = tail call i32 @srand(i32 %4)
br label %6
6: ; preds = %0, %6
%7 = phi i16 [ 16, %0 ], [ %8, %6 ]
%8 = add nsw i16 %7, -1
%9 = tail call i32 (...) @rand()
%10 = srem i32 %9, 94
%11 = add nsw i32 %10, 33
%12 = tail call i32 @putchar(i32 %11)
%13 = tail call i32 (...) @rand()
%14 = tail call i32 @srand(i32 %13)
%15 = icmp eq i16 %8, 0
br i1 %15, label %16, label %6
16: ; preds = %6
%17 = tail call i32 @putchar(i32 10)
%18 = load i32, i32* @EXIT_SUCCESS
ret i32 %18
}