#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 /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int toupper(char);
int main(int argc, char *argv[]) {
  char *con = "bcdfghjklmnpqrstvwxyz";
  char *vow = "aeiou";
  srand(time(NULL));
  int i, length = strlen(argv[1]), clength = strlen(con), vlength = strlen(vow);
  for (i = 0; i < length; i++) {
    switch (argv[1][i]) {
    case 'c':
      printf("%c", con[rand() % clength]);
      break;
    case 'C':
      printf("%c", toupper(con[rand() % clength]));
      break;
    case 'v':
      printf("%c", vow[rand() % vlength]);
      break;
    case 'V':
      printf("%c", toupper(vow[rand() % vlength]));
      break;
    default:
      printf("\nPlease input a word of only c's and v's\n");
      return -1;
    }
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe83(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xe8e(%rip),%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x30(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    132a <main+0x1ca>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x34(%rbp)
sub    $0x43,%eax
je     125c <main+0xfc>
jmp    11f8 <main+0x98>
mov    -0x34(%rbp),%eax
sub    $0x56,%eax
je     12c5 <main+0x165>
jmp    1209 <main+0xa9>
mov    -0x34(%rbp),%eax
sub    $0x63,%eax
je     122b <main+0xcb>
jmp    121a <main+0xba>
mov    -0x34(%rbp),%eax
sub    $0x76,%eax
je     1294 <main+0x134>
jmp    12fd <main+0x19d>
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
cltd
idivl  -0x2c(%rbp)
mov    -0x40(%rbp),%rax
movslq %edx,%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1317 <main+0x1b7>
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
cltd
idivl  -0x2c(%rbp)
mov    -0x48(%rbp),%rax
movslq %edx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %eax,%esi
lea    0xd94(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1317 <main+0x1b7>
mov    -0x20(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
cltd
idivl  -0x30(%rbp)
mov    -0x50(%rbp),%rax
movslq %edx,%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xd63(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1317 <main+0x1b7>
mov    -0x20(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
cltd
idivl  -0x30(%rbp)
mov    -0x58(%rbp),%rax
movslq %edx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %eax,%esi
lea    0xd2b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1317 <main+0x1b7>
lea    0xd1b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1338 <main+0x1d8>
jmp    131c <main+0x1bc>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11cb <main+0x6b>
lea    0xd16(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r12
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
mov    0x8(%r12),%rdi
call   1060 <strlen@plt>
mov    %eax,%r14d
lea    0xe60(%rip),%rdi
call   1060 <strlen@plt>
mov    %eax,%r13d
lea    0xe67(%rip),%rdi
call   1060 <strlen@plt>
test   %r14d,%r14d
jle    1285 <main+0x115>
mov    %eax,%r15d
mov    %r14d,%ebp
xor    %ebx,%ebx
jmp    11fb <main+0x8b>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1090 <rand@plt>
cltd
idiv   %r15d
movslq %edx,%rax
lea    0xe31(%rip),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
je     1285 <main+0x115>
mov    0x8(%r12),%rax
movsbl (%rax,%rbx,1),%eax
cmp    $0x62,%eax
jg     1230 <main+0xc0>
cmp    $0x43,%eax
je     1260 <main+0xf0>
cmp    $0x56,%eax
jne    12a0 <main+0x130>
xor    %eax,%eax
call   1090 <rand@plt>
cltd
idiv   %r15d
movslq %edx,%rax
lea    0xdea(%rip),%rcx
jmp    1275 <main+0x105>
xchg   %ax,%ax
cmp    $0x76,%eax
je     11d0 <main+0x60>
cmp    $0x63,%eax
jne    12a0 <main+0x130>
xor    %eax,%eax
call   1090 <rand@plt>
cltd
idiv   %r13d
movslq %edx,%rax
lea    0xdb1(%rip),%rcx
jmp    11e5 <main+0x75>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1090 <rand@plt>
cltd
idiv   %r13d
movslq %edx,%rax
lea    0xd8b(%rip),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <toupper@plt>
mov    %eax,%edi
jmp    11e9 <main+0x79>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd75(%rip),%rdi
call   1050 <puts@plt>
mov    $0xffffffff,%eax
jmp    1291 <main+0x121>

LLVM IR (-O0):
@.str = [22 x i8] c"bcdfghjklmnpqrstvwxyz\00"
@.str.1 = [6 x i8] c"aeiou\00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [42 x i8] c"\0APlease input a word of only c's and v's\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
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
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %7
%12 = call i32 @time(i32* null)
%13 = call i32 @srand(i32 %12)
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @strlen(i8* %16)
store i32 %17, i32* %9
%18 = load i8*, i8** %6
%19 = call i32 @strlen(i8* %18)
store i32 %19, i32* %10
%20 = load i8*, i8** %7
%21 = call i32 @strlen(i8* %20)
store i32 %21, i32* %11
store i32 0, i32* %8
br label %22
22: ; preds = %78, %2
%23 = load i32, i32* %8
%24 = load i32, i32* %9
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %81
26: ; preds = %22
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = load i32, i32* %8
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
switch i32 %34, label %75 [
i32 99, label %35
i32 67, label %45
i32 118, label %55
i32 86, label %65
]
35: ; preds = %26
%36 = load i8*, i8** %6
%37 = call i32 (...) @rand()
%38 = load i32, i32* %10
%39 = srem i32 %37, %38
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8, i8* %36, i64 %40
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %43)
br label %77
45: ; preds = %26
%46 = load i8*, i8** %6
%47 = call i32 (...) @rand()
%48 = load i32, i32* %10
%49 = srem i32 %47, %48
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8, i8* %46, i64 %50
%52 = load i8, i8* %51
%53 = call i32 @toupper(i8 signext %52)
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %53)
br label %77
55: ; preds = %26
%56 = load i8*, i8** %7
%57 = call i32 (...) @rand()
%58 = load i32, i32* %11
%59 = srem i32 %57, %58
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8, i8* %56, i64 %60
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %63)
br label %77
65: ; preds = %26
%66 = load i8*, i8** %7
%67 = call i32 (...) @rand()
%68 = load i32, i32* %11
%69 = srem i32 %67, %68
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8, i8* %66, i64 %70
%72 = load i8, i8* %71
%73 = call i32 @toupper(i8 signext %72)
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %73)
br label %77
75: ; preds = %26
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
store i32 -1, i32* %3
br label %83
77: ; preds = %65, %55, %45, %35
br label %78
78: ; preds = %77
%79 = load i32, i32* %8
%80 = add nsw i32 %79, 1
store i32 %80, i32* %8
br label %22
81: ; preds = %22
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %83
83: ; preds = %81, %75
%84 = load i32, i32* %3
ret i32 %84
}

LLVM IR (-O2):
@.str = [22 x i8] c"bcdfghjklmnpqrstvwxyz\00"
@.str.1 = [6 x i8] c"aeiou\00"
@str = [41 x i8] c"\0APlease input a word of only c's and v's\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strlen(i8* %6)
%8 = tail call i32 @strlen(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp sgt i32 %7, 0
br i1 %10, label %11, label %54
11: ; preds = %2
%12 = zext i32 %7 to i64
br label %13
13: ; preds = %11, %49
%14 = phi i64 [ 0, %11 ], [ %52, %49 ]
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i64 %14
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
switch i32 %18, label %47 [
i32 99, label %19
i32 67, label %26
i32 118, label %33
i32 86, label %40
]
19: ; preds = %13
%20 = tail call i32 (...) @rand()
%21 = srem i32 %20, %8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [22 x i8], [22 x i8]* @.str, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
br label %49
26: ; preds = %13
%27 = tail call i32 (...) @rand()
%28 = srem i32 %27, %8
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [22 x i8], [22 x i8]* @.str, i64 0, i64 %29
%31 = load i8, i8* %30
%32 = tail call i32 @toupper(i8 signext %31)
br label %49
33: ; preds = %13
%34 = tail call i32 (...) @rand()
%35 = srem i32 %34, %9
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [6 x i8], [6 x i8]* @.str.1, i64 0, i64 %36
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
br label %49
40: ; preds = %13
%41 = tail call i32 (...) @rand()
%42 = srem i32 %41, %9
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [6 x i8], [6 x i8]* @.str.1, i64 0, i64 %43
%45 = load i8, i8* %44
%46 = tail call i32 @toupper(i8 signext %45)
br label %49
47: ; preds = %13
%48 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
br label %56
49: ; preds = %19, %26, %33, %40
%50 = phi i32 [ %25, %19 ], [ %32, %26 ], [ %39, %33 ], [ %46, %40 ]
%51 = tail call i32 @putchar(i32 %50)
%52 = add nuw nsw i64 %14, 1
%53 = icmp eq i64 %52, %12
br i1 %53, label %54, label %13
54: ; preds = %49, %2
%55 = tail call i32 @putchar(i32 10)
br label %56
56: ; preds = %54, %47
%57 = phi i32 [ -1, %47 ], [ 0, %54 ]
ret i32 %57
}