#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*/ count_vowels_and_consonants(char *, int *, int *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  {
    char str[] = "a";
    int consonants = 0;
    int vowels = 0;
    count_vowels_and_consonants(str, &consonants, &vowels);
    if (vowels == 1 && consonants == 0) {
      printf("Test1 passed\n");
    } else {
      printf("Test1 Failed\n");
    }
  }
  {
    char str[] = "";
    int consonants;
    int vowels;
    count_vowels_and_consonants(str, &consonants, &vowels);
    if (vowels == 0 && consonants == 0) {
      printf("Test2 passed\n");
    } else {
      printf("Test2 Failed\n");
    }
  }
  {
    char str[] = "a .?2343 BCDE mu";
    int consonants;
    int vowels;
    count_vowels_and_consonants(str, &consonants, &vowels);
    if (vowels == 3 && consonants == 4) {
      printf("Test3 passed\n");
    } else {
      printf("Test3 Failed\n");
    }
  }
  {
    char *str = NULL;
    int consonants;
    int vowels;
    count_vowels_and_consonants(str, &consonants, &vowels);
    if (vowels == 0 & consonants == 0) {
      printf("Test4 Passed\n");
    }
  }
  return 0;
}


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)
mov    0xeb3(%rip),%ax
mov    %ax,-0x12(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    -0x12(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1050 <count_vowels_and_consonants@plt>
cmpl   $0x1,-0x1c(%rbp)
jne    1195 <main+0x65>
cmpl   $0x0,-0x18(%rbp)
jne    1195 <main+0x65>
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
jmp    11a1 <main+0x71>
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
lea    -0x1d(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <memset@plt>
lea    -0x1d(%rbp),%rdi
lea    -0x24(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1050 <count_vowels_and_consonants@plt>
cmpl   $0x0,-0x28(%rbp)
jne    11e7 <main+0xb7>
cmpl   $0x0,-0x24(%rbp)
jne    11e7 <main+0xb7>
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
jmp    11f3 <main+0xc3>
lea    0xe3e(%rip),%rdi
call   1030 <printf@plt>
mov    0xe76(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe73(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe71(%rip),%al
mov    %al,-0x30(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x44(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1050 <count_vowels_and_consonants@plt>
cmpl   $0x3,-0x48(%rbp)
jne    1248 <main+0x118>
cmpl   $0x4,-0x44(%rbp)
jne    1248 <main+0x118>
lea    0xdfc(%rip),%rdi
call   1030 <printf@plt>
jmp    1254 <main+0x124>
lea    0xdf9(%rip),%rdi
call   1030 <printf@plt>
movq   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
lea    -0x54(%rbp),%rsi
lea    -0x58(%rbp),%rdx
call   1050 <count_vowels_and_consonants@plt>
cmpl   $0x0,-0x58(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x54(%rbp)
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     129d <main+0x16d>
lea    0xdbe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movw   $0x61,0xc(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <count_vowels_and_consonants@plt>
mov    0x8(%rsp),%eax
xor    $0x1,%eax
lea    0xf02(%rip),%rcx
lea    0xead(%rip),%rdi
or     0x10(%rsp),%eax
cmove  %rcx,%rdi
call   1030 <puts@plt>
movb   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <count_vowels_and_consonants@plt>
mov    0x8(%rsp),%eax
lea    0xebd(%rip),%rcx
lea    0xe82(%rip),%rdi
or     0x10(%rsp),%eax
cmove  %rcx,%rdi
call   1030 <puts@plt>
movaps 0xe50(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movb   $0x0,0x20(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1040 <count_vowels_and_consonants@plt>
mov    0xc(%rsp),%eax
xor    $0x3,%eax
mov    0x8(%rsp),%ecx
xor    $0x4,%ecx
lea    0xe62(%rip),%rdx
lea    0xe41(%rip),%rdi
or     %eax,%ecx
cmove  %rdx,%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
xor    %edi,%edi
call   1040 <count_vowels_and_consonants@plt>
mov    0x10(%rsp),%eax
or     0x8(%rsp),%eax
jne    121c <main+0xfc>
lea    0xe21(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.str = [2 x i8] c"a\00"
@.str = [14 x i8] c"Test1 passed\0A\00"
@.str.1 = [14 x i8] c"Test1 Failed\0A\00"
@.str.2 = [14 x i8] c"Test2 passed\0A\00"
@.str.3 = [14 x i8] c"Test2 Failed\0A\00"
@__const.main.str.4 = [17 x i8] c"a .?2343 BCDE mu\00"
@.str.5 = [14 x i8] c"Test3 passed\0A\00"
@.str.6 = [14 x i8] c"Test3 Failed\0A\00"
@.str.7 = [14 x i8] c"Test4 Passed\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca [1 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = alloca [17 x i8]
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%18 = bitcast [2 x i8]* %6 to i8*
store i32 0, i32* %7
store i32 0, i32* %8
%19 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%20 = call i32 @count_vowels_and_consonants(i8* %19, i32* %7, i32* %8)
%21 = load i32, i32* %8
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %28
23: ; preds = %2
%24 = load i32, i32* %7
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %30
28: ; preds = %23, %2
%29 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %30
30: ; preds = %28, %26
%31 = bitcast [1 x i8]* %9 to i8*
%32 = getelementptr inbounds [1 x i8], [1 x i8]* %9, i64 0, i64 0
%33 = call i32 @count_vowels_and_consonants(i8* %32, i32* %10, i32* %11)
%34 = load i32, i32* %11
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %41
36: ; preds = %30
%37 = load i32, i32* %10
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %43
41: ; preds = %36, %30
%42 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %43
43: ; preds = %41, %39
%44 = bitcast [17 x i8]* %12 to i8*
%45 = getelementptr inbounds [17 x i8], [17 x i8]* %12, i64 0, i64 0
%46 = call i32 @count_vowels_and_consonants(i8* %45, i32* %13, i32* %14)
%47 = load i32, i32* %14
%48 = icmp eq i32 %47, 3
br i1 %48, label %49, label %54
49: ; preds = %43
%50 = load i32, i32* %13
%51 = icmp eq i32 %50, 4
br i1 %51, label %52, label %54
52: ; preds = %49
%53 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
br label %56
54: ; preds = %49, %43
%55 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
br label %56
56: ; preds = %54, %52
store i8* null, i8** %15
%57 = load i8*, i8** %15
%58 = call i32 @count_vowels_and_consonants(i8* %57, i32* %16, i32* %17)
%59 = load i32, i32* %17
%60 = icmp eq i32 %59, 0
%61 = zext i1 %60 to i32
%62 = load i32, i32* %16
%63 = icmp eq i32 %62, 0
%64 = zext i1 %63 to i32
%65 = and i32 %61, %64
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %56
%68 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
br label %69
69: ; preds = %67, %56
ret i32 0
}

LLVM IR (-O2):
@__const.main.str.4 = [17 x i8] c"a .?2343 BCDE mu\00"
@str = [13 x i8] c"Test1 Failed\00"
@str.8 = [13 x i8] c"Test2 Failed\00"
@str.9 = [13 x i8] c"Test3 Failed\00"
@str.10 = [13 x i8] c"Test4 Passed\00"
@str.11 = [13 x i8] c"Test3 passed\00"
@str.12 = [13 x i8] c"Test2 passed\00"
@str.13 = [13 x i8] c"Test1 passed\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i16
%4 = alloca i32
%5 = alloca i32
%6 = alloca [1 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca [17 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = bitcast i16* %3 to i8*
store i16 97, i16* %3
%15 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%16 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%17 = call i32 @count_vowels_and_consonants(i8* %14, i32* %4, i32* %5)
%18 = load i32, i32* %5
%19 = icmp eq i32 %18, 1
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 0
%22 = select i1 %19, i1 %21, i1 false
%23 = select i1 %22, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.13, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0)
%24 = call i32 @puts(i8* dereferenceable(1) %23)
%25 = getelementptr inbounds [1 x i8], [1 x i8]* %6, i64 0, i64 0
store i8 0, i8* %25
%26 = bitcast i32* %7 to i8*
%27 = bitcast i32* %8 to i8*
%28 = call i32 @count_vowels_and_consonants(i8* %25, i32* %7, i32* %8)
%29 = load i32, i32* %8
%30 = icmp eq i32 %29, 0
%31 = load i32, i32* %7
%32 = icmp eq i32 %31, 0
%33 = select i1 %30, i1 %32, i1 false
%34 = select i1 %33, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.12, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.8, i64 0, i64 0)
%35 = call i32 @puts(i8* dereferenceable(1) %34)
%36 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%37 = bitcast i32* %10 to i8*
%38 = bitcast i32* %11 to i8*
%39 = call i32 @count_vowels_and_consonants(i8* %36, i32* %10, i32* %11)
%40 = load i32, i32* %11
%41 = icmp eq i32 %40, 3
%42 = load i32, i32* %10
%43 = icmp eq i32 %42, 4
%44 = select i1 %41, i1 %43, i1 false
%45 = select i1 %44, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.11, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.9, i64 0, i64 0)
%46 = call i32 @puts(i8* dereferenceable(1) %45)
%47 = bitcast i32* %12 to i8*
%48 = bitcast i32* %13 to i8*
%49 = call i32 @count_vowels_and_consonants(i8* null, i32* %12, i32* %13)
%50 = load i32, i32* %13
%51 = load i32, i32* %12
%52 = or i32 %51, %50
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %2
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.10, i64 0, i64 0))
br label %56
56: ; preds = %54, %2
ret i32 0
}