#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 isVowel(char);
int /*<<< orphan*/ putchar(char);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  srand(time(0));
  char *ptr = argv[1];
  while (*ptr) {
    char c = *ptr;
    int t = (c == 'C' || c == 'c') ? 1 : 0;
    do {
      c = rand() % 26 + 'a';
    } while (isVowel(c) == t);
    putchar(c);
    ptr++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     120b <main+0xbb>
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%ecx
mov    $0x1,%al
cmp    $0x43,%ecx
mov    %al,-0x21(%rbp)
je     11b5 <main+0x65>
movsbl -0x19(%rbp),%eax
cmp    $0x63,%eax
sete   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1070 <rand@plt>
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x61,%edx
mov    %dl,%al
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%edi
call   1060 <isVowel@plt>
cmp    -0x20(%rbp),%eax
je     11c8 <main+0x78>
movsbl -0x19(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1180 <main+0x30>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    0x8(%rbx),%r14
mov    (%r14),%al
test   %al,%al
je     11ca <main+0x7a>
and    $0xdf,%al
xor    %ebp,%ebp
cmp    $0x43,%al
sete   %bpl
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x61,%al
movsbl %al,%ebx
mov    %ebx,%edi
call   1060 <isVowel@plt>
cmp    %ebp,%eax
je     1180 <main+0x30>
mov    %ebx,%edi
call   1030 <putchar@plt>
mov    0x1(%r14),%al
add    $0x1,%r14
test   %al,%al
jne    1170 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @time(i32 0)
%10 = call i32 @srand(i32 %9)
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
store i8* %13, i8** %6
br label %14
14: ; preds = %42, %2
%15 = load i8*, i8** %6
%16 = load i8, i8* %15
%17 = icmp ne i8 %16, 0
br i1 %17, label %18, label %47
18: ; preds = %14
%19 = load i8*, i8** %6
%20 = load i8, i8* %19
store i8 %20, i8* %7
%21 = load i8, i8* %7
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 67
br i1 %23, label %28, label %24
24: ; preds = %18
%25 = load i8, i8* %7
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 99
br label %28
28: ; preds = %24, %18
%29 = phi i1 [ true, %18 ], [ %27, %24 ]
%30 = zext i1 %29 to i64
%31 = select i1 %29, i32 1, i32 0
store i32 %31, i32* %8
br label %32
32: ; preds = %37, %28
%33 = call i32 (...) @rand()
%34 = srem i32 %33, 26
%35 = add nsw i32 %34, 97
%36 = trunc i32 %35 to i8
store i8 %36, i8* %7
br label %37
37: ; preds = %32
%38 = load i8, i8* %7
%39 = call i32 @isVowel(i8 signext %38)
%40 = load i32, i32* %8
%41 = icmp eq i32 %39, %40
br i1 %41, label %32, label %42
42: ; preds = %37
%43 = load i8, i8* %7
%44 = call i32 @putchar(i8 signext %43)
%45 = load i8*, i8** %6
%46 = getelementptr inbounds i8, i8* %45, i32 1
store i8* %46, i8** %6
br label %14
47: ; preds = %14
%48 = load i32, i32* %3
ret i32 %48
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @time(i32 0)
%4 = tail call i32 @srand(i32 %3)
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %27, label %9
9: ; preds = %2, %22
%10 = phi i8 [ %25, %22 ], [ %7, %2 ]
%11 = phi i8* [ %24, %22 ], [ %6, %2 ]
%12 = and i8 %10, -33
%13 = icmp eq i8 %12, 67
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %15, %9
%16 = tail call i32 (...) @rand()
%17 = srem i32 %16, 26
%18 = trunc i32 %17 to i8
%19 = add nsw i8 %18, 97
%20 = tail call i32 @isVowel(i8 signext %19)
%21 = icmp eq i32 %20, %14
br i1 %21, label %15, label %22
22: ; preds = %15
%23 = tail call i32 @putchar(i8 signext %19)
%24 = getelementptr inbounds i8, i8* %11, i64 1
%25 = load i8, i8* %24
%26 = icmp eq i8 %25, 0
br i1 %26, label %27, label %9
27: ; preds = %22, %2
ret i32 0
}