#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 */
char *InputHandler();
int /*<<< orphan*/ checkNullity(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ isalpha(char);
int /*<<< orphan*/ isdigit(char);
int /*<<< orphan*/ printf(char *, ...);
unsigned int strlen(char *);
int /*<<< orphan*/ usage();
char *getEmail(void) {
  printf("Enter a valid email: ");
  char *email = InputHandler();
  checkNullity(email);
  unsigned int len = strlen(email);
  if (len < 4) {
    printf("Invalid Input: Email length of %i is too short\n", len);
    usage();
    exit(12);
  }
  int numAmp = 0;
  int numPer = 0;
  for (unsigned int i = 0; i < len; i++) {
    if (email[i] == '.') {
      if (numAmp == 0) {
        continue;
      }
      if (numAmp == 1) {
        numPer++;
        continue;
      }
    }
    if (numPer == 2) {
      printf("Invalid input: Cannot have 2 periods after '@' symbol\n");
      usage();
      exit(12);
    }
    if (email[i] == '@') {
      if (numAmp == 0) {
        numAmp++;
        continue;
      } else {
        printf("Invalid Input: Please use only 1 '@' \n");
        exit(7);
      }
    }
    if (i == len - 1 && email[i] == '\n') {
      continue;
    }
    if (!isdigit(email[i])) {
      if (!isalpha(email[i])) {
        usage();
        free(email);
        exit(10);
      }
    }
  }
  if ((email[len - 2] == '@') || (email[len - 2] == '.')) {
    printf("Email address cannot end with '@' or '.' symbols \n");
    usage();
    exit(9);
  }
  if ((email[0] == '@') || (email[0] == '.')) {
    printf("Email address cannot start with '@' or '.' symbols \n");
    usage();
    exit(13);
  }
  if (numAmp != 1) {
    printf("Invalid Input: Please use only 1 '@' \n");
    usage();
    exit(11);
  }
  if (numPer != 1) {
    printf("Invalid Input: Must have 1 '.' after @ symbol\n");
    usage();
    exit(14);
  }
  return email;
}


x86 assembly (clang, -O0):
<getEmail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1070 <InputHandler@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   10b0 <checkNullity@plt>
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jae    11f2 <getEmail+0x62>
mov    -0xc(%rbp),%esi
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <usage@plt>
mov    $0xc,%edi
call   10a0 <exit@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    134e <getEmail+0x1be>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
jne    1253 <getEmail+0xc3>
cmpl   $0x0,-0x10(%rbp)
jne    1236 <getEmail+0xa6>
jmp    1340 <getEmail+0x1b0>
cmpl   $0x1,-0x10(%rbp)
jne    124e <getEmail+0xbe>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1340 <getEmail+0x1b0>
jmp    1253 <getEmail+0xc3>
cmpl   $0x2,-0x14(%rbp)
jne    127c <getEmail+0xec>
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <usage@plt>
mov    $0xc,%edi
call   10a0 <exit@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x40,%eax
jne    12c0 <getEmail+0x130>
cmpl   $0x0,-0x10(%rbp)
jne    12a8 <getEmail+0x118>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1340 <getEmail+0x1b0>
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x7,%edi
call   10a0 <exit@plt>
mov    -0x18(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    12ea <getEmail+0x15a>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    12ea <getEmail+0x15a>
jmp    1340 <getEmail+0x1b0>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
movsbl (%rax,%rcx,1),%edi
call   1040 <isdigit@plt>
cmp    $0x0,%eax
jne    133b <getEmail+0x1ab>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
movsbl (%rax,%rcx,1),%edi
call   1080 <isalpha@plt>
cmp    $0x0,%eax
jne    1336 <getEmail+0x1a6>
mov    $0x0,%al
call   1090 <usage@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0xa,%edi
call   10a0 <exit@plt>
jmp    133b <getEmail+0x1ab>
jmp    1340 <getEmail+0x1b0>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1207 <getEmail+0x77>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x40,%eax
je     1380 <getEmail+0x1f0>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
jne    139f <getEmail+0x20f>
lea    0xd1d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <usage@plt>
mov    $0x9,%edi
call   10a0 <exit@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
je     13bf <getEmail+0x22f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    13de <getEmail+0x24e>
lea    0xd11(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <usage@plt>
mov    $0xd,%edi
call   10a0 <exit@plt>
cmpl   $0x1,-0x10(%rbp)
je     1407 <getEmail+0x277>
lea    0xc8e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <usage@plt>
mov    $0xb,%edi
call   10a0 <exit@plt>
cmpl   $0x1,-0x14(%rbp)
je     1430 <getEmail+0x2a0>
lea    0xcf4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <usage@plt>
mov    $0xe,%edi
call   10a0 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getEmail>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xe4e(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1080 <InputHandler@plt>
mov    %rax,%r15
mov    %rax,%rdi
call   10c0 <checkNullity@plt>
mov    %r15,%rdi
call   1060 <strlen@plt>
cmp    $0x4,%eax
jb     131b <getEmail+0x17b>
lea    -0x1(%rax),%r12d
mov    %rax,(%rsp)
mov    %eax,%r13d
xor    %r14d,%r14d
xor    %ebp,%ebp
jmp    1204 <getEmail+0x64>
xor    %eax,%eax
test   %ebp,%ebp
setne  %al
add    %eax,%ebx
mov    %eax,%ebp
add    $0x1,%r14
cmp    %r14,%r13
je     126c <getEmail+0xcc>
movzbl (%r15,%r14,1),%eax
cmp    $0x2e,%al
je     11f0 <getEmail+0x50>
cmp    $0x2,%ebx
je     12ae <getEmail+0x10e>
cmp    $0x40,%al
jne    1230 <getEmail+0x90>
test   %ebp,%ebp
mov    $0x1,%ebp
je     11fb <getEmail+0x5b>
jmp    12cb <getEmail+0x12b>
nopl   0x0(%rax,%rax,1)
cmp    %r14,%r12
jne    1239 <getEmail+0x99>
cmp    $0xa,%al
je     11fb <getEmail+0x5b>
movsbl %al,%edi
call   1040 <isdigit@plt>
test   %eax,%eax
jne    11fb <getEmail+0x5b>
movsbl (%r15,%r14,1),%edi
call   1090 <isalpha@plt>
test   %eax,%eax
jne    11fb <getEmail+0x5b>
xor    %eax,%eax
call   10a0 <usage@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    $0xa,%edi
call   10b0 <exit@plt>
mov    (%rsp),%rax
add    $0xfffffffe,%eax
mov    (%r15,%rax,1),%al
cmp    $0x2e,%al
je     12e1 <getEmail+0x141>
cmp    $0x40,%al
je     12e1 <getEmail+0x141>
mov    (%r15),%al
cmp    $0x40,%al
je     12fe <getEmail+0x15e>
cmp    $0x2e,%al
je     12fe <getEmail+0x15e>
cmp    $0x1,%ebp
jne    132d <getEmail+0x18d>
cmp    $0x1,%ebx
jne    134a <getEmail+0x1aa>
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe4b(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   10a0 <usage@plt>
mov    $0xc,%edi
call   10b0 <exit@plt>
lea    0xe08(%rip),%rdi
call   1050 <puts@plt>
mov    $0x7,%edi
call   10b0 <exit@plt>
lea    0xdc0(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   10a0 <usage@plt>
mov    $0x9,%edi
call   10b0 <exit@plt>
lea    0xd6f(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   10a0 <usage@plt>
mov    $0xd,%edi
call   10b0 <exit@plt>
lea    0xcf4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    12ba <getEmail+0x11a>
lea    0xda6(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   10a0 <usage@plt>
mov    $0xb,%edi
call   10b0 <exit@plt>
lea    0xcf5(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   10a0 <usage@plt>
mov    $0xe,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Enter a valid email: \00"
@.str.1 = [48 x i8] c"Invalid Input: Email length of %i is too short\0A\00"
@.str.2 = [55 x i8] c"Invalid input: Cannot have 2 periods after '@' symbol\0A\00"
@.str.3 = [39 x i8] c"Invalid Input: Please use only 1 '@' \0A\00"
@.str.4 = [51 x i8] c"Email address cannot end with '@' or '.' symbols \0A\00"
@.str.5 = [53 x i8] c"Email address cannot start with '@' or '.' symbols \0A\00"
@.str.6 = [47 x i8] c"Invalid Input: Must have 1 '.' after @ symbol\0A\00"
define i8* @getEmail() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = call i8* (...) @InputHandler()
store i8* %7, i8** %1
%8 = load i8*, i8** %1
%9 = call i32 @checkNullity(i8* %8)
%10 = load i8*, i8** %1
%11 = call i32 @strlen(i8* %10)
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = icmp ult i32 %12, 4
br i1 %13, label %14, label %19
14: ; preds = %0
%15 = load i32, i32* %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = call i32 (...) @usage()
%18 = call i32 @exit(i32 12)
unreachable
19: ; preds = %0
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
br label %20
20: ; preds = %104, %19
%21 = load i32, i32* %5
%22 = load i32, i32* %2
%23 = icmp ult i32 %21, %22
br i1 %23, label %24, label %107
24: ; preds = %20
%25 = load i8*, i8** %1
%26 = load i32, i32* %5
%27 = zext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 46
br i1 %31, label %32, label %43
32: ; preds = %24
%33 = load i32, i32* %3
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %36
35: ; preds = %32
br label %104
36: ; preds = %32
%37 = load i32, i32* %3
%38 = icmp eq i32 %37, 1
br i1 %38, label %39, label %42
39: ; preds = %36
%40 = load i32, i32* %4
%41 = add nsw i32 %40, 1
store i32 %41, i32* %4
br label %104
42: ; preds = %36
br label %43
43: ; preds = %42, %24
%44 = load i32, i32* %4
%45 = icmp eq i32 %44, 2
br i1 %45, label %46, label %50
46: ; preds = %43
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
%48 = call i32 (...) @usage()
%49 = call i32 @exit(i32 12)
unreachable
50: ; preds = %43
%51 = load i8*, i8** %1
%52 = load i32, i32* %5
%53 = zext i32 %52 to i64
%54 = getelementptr inbounds i8, i8* %51, i64 %53
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = icmp eq i32 %56, 64
br i1 %57, label %58, label %67
58: ; preds = %50
%59 = load i32, i32* %3
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %64
61: ; preds = %58
%62 = load i32, i32* %3
%63 = add nsw i32 %62, 1
store i32 %63, i32* %3
br label %104
64: ; preds = %58
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%66 = call i32 @exit(i32 7)
unreachable
67: ; preds = %50
%68 = load i32, i32* %5
%69 = load i32, i32* %2
%70 = sub i32 %69, 1
%71 = icmp eq i32 %68, %70
br i1 %71, label %72, label %81
72: ; preds = %67
%73 = load i8*, i8** %1
%74 = load i32, i32* %5
%75 = zext i32 %74 to i64
%76 = getelementptr inbounds i8, i8* %73, i64 %75
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = icmp eq i32 %78, 10
br i1 %79, label %80, label %81
80: ; preds = %72
br label %104
81: ; preds = %72, %67
%82 = load i8*, i8** %1
%83 = load i32, i32* %5
%84 = zext i32 %83 to i64
%85 = getelementptr inbounds i8, i8* %82, i64 %84
%86 = load i8, i8* %85
%87 = call i32 @isdigit(i8 signext %86)
%88 = icmp ne i32 %87, 0
br i1 %88, label %103, label %89
89: ; preds = %81
%90 = load i8*, i8** %1
%91 = load i32, i32* %5
%92 = zext i32 %91 to i64
%93 = getelementptr inbounds i8, i8* %90, i64 %92
%94 = load i8, i8* %93
%95 = call i32 @isalpha(i8 signext %94)
%96 = icmp ne i32 %95, 0
br i1 %96, label %102, label %97
97: ; preds = %89
%98 = call i32 (...) @usage()
%99 = load i8*, i8** %1
%100 = call i32 @free(i8* %99)
%101 = call i32 @exit(i32 10)
unreachable
102: ; preds = %89
br label %103
103: ; preds = %102, %81
br label %104
104: ; preds = %103, %80, %61, %39, %35
%105 = load i32, i32* %5
%106 = add i32 %105, 1
store i32 %106, i32* %5
br label %20
107: ; preds = %20
%108 = load i8*, i8** %1
%109 = load i32, i32* %2
%110 = sub i32 %109, 2
%111 = zext i32 %110 to i64
%112 = getelementptr inbounds i8, i8* %108, i64 %111
%113 = load i8, i8* %112
%114 = sext i8 %113 to i32
%115 = icmp eq i32 %114, 64
br i1 %115, label %125, label %116
116: ; preds = %107
%117 = load i8*, i8** %1
%118 = load i32, i32* %2
%119 = sub i32 %118, 2
%120 = zext i32 %119 to i64
%121 = getelementptr inbounds i8, i8* %117, i64 %120
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp eq i32 %123, 46
br i1 %124, label %125, label %129
125: ; preds = %116, %107
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0))
%127 = call i32 (...) @usage()
%128 = call i32 @exit(i32 9)
unreachable
129: ; preds = %116
%130 = load i8*, i8** %1
%131 = getelementptr inbounds i8, i8* %130, i64 0
%132 = load i8, i8* %131
%133 = sext i8 %132 to i32
%134 = icmp eq i32 %133, 64
br i1 %134, label %141, label %135
135: ; preds = %129
%136 = load i8*, i8** %1
%137 = getelementptr inbounds i8, i8* %136, i64 0
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = icmp eq i32 %139, 46
br i1 %140, label %141, label %145
141: ; preds = %135, %129
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0))
%143 = call i32 (...) @usage()
%144 = call i32 @exit(i32 13)
unreachable
145: ; preds = %135
%146 = load i32, i32* %3
%147 = icmp ne i32 %146, 1
br i1 %147, label %148, label %152
148: ; preds = %145
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%150 = call i32 (...) @usage()
%151 = call i32 @exit(i32 11)
unreachable
152: ; preds = %145
%153 = load i32, i32* %4
%154 = icmp ne i32 %153, 1
br i1 %154, label %155, label %159
155: ; preds = %152
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0))
%157 = call i32 (...) @usage()
%158 = call i32 @exit(i32 14)
unreachable
159: ; preds = %152
%160 = load i8*, i8** %1
ret i8* %160
}

LLVM IR (-O2):
@.str = [22 x i8] c"Enter a valid email: \00"
@.str.1 = [48 x i8] c"Invalid Input: Email length of %i is too short\0A\00"
@str = [46 x i8] c"Invalid Input: Must have 1 '.' after @ symbol\00"
@str.8 = [52 x i8] c"Email address cannot start with '@' or '.' symbols \00"
@str.9 = [50 x i8] c"Email address cannot end with '@' or '.' symbols \00"
@str.10 = [38 x i8] c"Invalid Input: Please use only 1 '@' \00"
@str.11 = [54 x i8] c"Invalid input: Cannot have 2 periods after '@' symbol\00"
define i8* @getEmail() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* (...) @InputHandler()
%3 = tail call i32 @checkNullity(i8* %2)
%4 = tail call i32 @strlen(i8* %2)
%5 = icmp ult i32 %4, 4
br i1 %5, label %10, label %6
6: ; preds = %0
%7 = add i32 %4, -1
%8 = zext i32 %7 to i64
%9 = zext i32 %4 to i64
br label %19
10: ; preds = %0
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%12 = tail call i32 (...) @usage()
%13 = tail call i32 @exit(i32 12)
unreachable
14: ; preds = %58
%15 = add i32 %4, -2
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %2, i64 %16
%18 = load i8, i8* %17
switch i8 %18, label %67 [
i8 64, label %63
i8 46, label %63
]
19: ; preds = %6, %58
%20 = phi i64 [ 0, %6 ], [ %61, %58 ]
%21 = phi i32 [ 0, %6 ], [ %60, %58 ]
%22 = phi i32 [ 0, %6 ], [ %59, %58 ]
%23 = getelementptr inbounds i8, i8* %2, i64 %20
%24 = load i8, i8* %23
%25 = icmp eq i8 %24, 46
br i1 %25, label %26, label %30
26: ; preds = %19
%27 = icmp ne i32 %22, 0
%28 = zext i1 %27 to i32
%29 = add nsw i32 %21, %28
br label %58
30: ; preds = %19
%31 = icmp eq i32 %21, 2
br i1 %31, label %32, label %36
32: ; preds = %30
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.11, i64 0, i64 0))
%34 = tail call i32 (...) @usage()
%35 = tail call i32 @exit(i32 12)
unreachable
36: ; preds = %30
%37 = icmp eq i8 %24, 64
br i1 %37, label %38, label %43
38: ; preds = %36
%39 = icmp eq i32 %22, 0
br i1 %39, label %58, label %40
40: ; preds = %38
%41 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.10, i64 0, i64 0))
%42 = tail call i32 @exit(i32 7)
unreachable
43: ; preds = %36
%44 = icmp eq i64 %20, %8
%45 = icmp eq i8 %24, 10
%46 = select i1 %44, i1 %45, i1 false
br i1 %46, label %58, label %47
47: ; preds = %43
%48 = tail call i32 @isdigit(i8 signext %24)
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %58
50: ; preds = %47
%51 = load i8, i8* %23
%52 = tail call i32 @isalpha(i8 signext %51)
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %58
54: ; preds = %50
%55 = tail call i32 (...) @usage()
%56 = tail call i32 @free(i8* %2)
%57 = tail call i32 @exit(i32 10)
unreachable
58: ; preds = %26, %43, %38, %47, %50
%59 = phi i32 [ %22, %47 ], [ %22, %50 ], [ 1, %38 ], [ %22, %43 ], [ %28, %26 ]
%60 = phi i32 [ %21, %47 ], [ %21, %50 ], [ %21, %38 ], [ %21, %43 ], [ %29, %26 ]
%61 = add nuw nsw i64 %20, 1
%62 = icmp eq i64 %61, %9
br i1 %62, label %14, label %19
63: ; preds = %14, %14
%64 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.9, i64 0, i64 0))
%65 = tail call i32 (...) @usage()
%66 = tail call i32 @exit(i32 9)
unreachable
67: ; preds = %14
%68 = load i8, i8* %2
switch i8 %68, label %73 [
i8 64, label %69
i8 46, label %69
]
69: ; preds = %67, %67
%70 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.8, i64 0, i64 0))
%71 = tail call i32 (...) @usage()
%72 = tail call i32 @exit(i32 13)
unreachable
73: ; preds = %67
%74 = icmp eq i32 %59, 1
br i1 %74, label %79, label %75
75: ; preds = %73
%76 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.10, i64 0, i64 0))
%77 = tail call i32 (...) @usage()
%78 = tail call i32 @exit(i32 11)
unreachable
79: ; preds = %73
%80 = icmp eq i32 %60, 1
br i1 %80, label %85, label %81
81: ; preds = %79
%82 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%83 = tail call i32 (...) @usage()
%84 = tail call i32 @exit(i32 14)
unreachable
85: ; preds = %79
ret i8* %2
}