#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 calcular1oAFD(char *, int);
int calcular2oAFD(char *, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ system(char *);
int main(void) {
  system("clear");
  printf("\n* Materia: Linguagens Formais e Automatos");
  printf("\n* Professor: Iamar");
  printf("\n* Aluno:Marco Tulio");
  printf("\n\n\t** Prorgama 01 - Leitura de um AFD Minimizado. Pg 82 livro "
         "**\n\n");
  int opcao = 1;
  while (opcao == 1) {
    printf(
        "------------------------------------------------------------------");
    printf("\nAlfabeto Valido: {a,b}, sendo A==a e B==b...");
    char palavra[100];
    printf("\nInforme a cadeia de em concordancia com o alfabeto: ");
    scanf("%s", &palavra);
    int contPal = 0;
    for (contPal = 0; palavra[contPal] != '\0'; contPal++) {
    }
    int i;
    for (i = 0; i < contPal; i++) {
      if (palavra[i] < 97)
        palavra[i] += 32;
      if (palavra[i] != 'a') {
        if (palavra[i] != 'b') {
          printf("\nA palavra informada não faz parte do alfabeto.");
          printf("\nA seguinte ambiguidade foi encontrada: %c", palavra[i]);
          printf("\nO programa está sendo finalizado!\n\n");
          exit(0);
        }
      }
    }
    int resultado = calcular1oAFD(palavra, contPal);
    resultado = calcular2oAFD(palavra, contPal);
    printf(
        "\n------------------------------------------------------------------");
    if (resultado == 0)
      printf("\n\nPrograma executado sem erros.");
    else
      printf("\n\nOcorreram alguns erros inesperados no programa.");
    printf("\n\nDeseja executar o programa novamente informando outra "
           "palavra?\n\t(1)-sim\n\t(0)-Nao\n\tInforme:");
    scanf("%i", &opcao);
    if (opcao != 1) {
      if (opcao != 0) {
        printf("\n\nOpção Invalida...");
        opcao = 0;
      }
    }
  }
  printf("\nFinalizando Programa!\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe87(%rip),%rdi
call   1030 <system@plt>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    138b <main+0x22b>
lea    0xfb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf09(%rip),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x74(%rbp)
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     1236 <main+0xd6>
jmp    1228 <main+0xc8>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1211 <main+0xb1>
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    12e1 <main+0x181>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x61,%eax
jge    126b <main+0x10b>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%ecx
add    $0x20,%ecx
mov    %cl,-0x70(%rbp,%rax,1)
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x61,%eax
je     12ce <main+0x16e>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x62,%eax
je     12c9 <main+0x169>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1080 <exit@plt>
jmp    12ce <main+0x16e>
jmp    12d3 <main+0x173>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    123d <main+0xdd>
lea    -0x70(%rbp),%rdi
mov    -0x74(%rbp),%esi
call   1050 <calcular1oAFD@plt>
mov    %eax,-0x7c(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0x74(%rbp),%esi
call   1060 <calcular2oAFD@plt>
mov    %eax,-0x7c(%rbp)
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x7c(%rbp)
jne    132a <main+0x1ca>
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1338 <main+0x1d8>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf2c(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
je     1386 <main+0x226>
cmpl   $0x0,-0x8(%rbp)
je     1381 <main+0x221>
lea    0xf09(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
jmp    1386 <main+0x226>
jmp    11bd <main+0x5d>
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0xe7b(%rip),%rdi
call   1040 <system@plt>
lea    0xe75(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe92(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe98(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x106e(%rip),%rdi
call   1030 <puts@plt>
movl   $0x1,0xc(%rsp)
lea    0x10(%rsp),%rbx
lea    0xfdf(%rip),%r14
lea    0x1035(%rip),%r15
lea    0xc(%rsp),%r12
lea    0xf37(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe65(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe85(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xead(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
mov    $0xffffffffffffffff,%r13
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ecx,%eax
cmpb   $0x0,0x11(%rsp,%r13,1)
lea    0x1(%r13),%r13
lea    0x1(%rax),%ecx
jne    1230 <main+0xc0>
test   %r13d,%r13d
je     1276 <main+0x106>
mov    %eax,%eax
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movzbl 0x10(%rsp,%rbp,1),%ecx
cmp    $0x60,%cl
jg     1261 <main+0xf1>
add    $0x20,%cl
mov    %cl,0x10(%rsp,%rbp,1)
add    $0x9f,%cl
cmp    $0x2,%cl
jae    1315 <main+0x1a5>
add    $0x1,%rbp
cmp    %rbp,%rax
jne    1250 <main+0xe0>
mov    %rbx,%rdi
mov    %r13d,%esi
call   1060 <calcular1oAFD@plt>
mov    %rbx,%rdi
mov    %r13d,%esi
call   1070 <calcular2oAFD@plt>
mov    %eax,%ebp
lea    0xe88(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %ebp,%ebp
lea    0xedc(%rip),%rdi
lea    0xeb5(%rip),%rax
cmove  %rax,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x2,%eax
jae    12e2 <main+0x172>
cmp    $0x1,%eax
je     11e0 <main+0x70>
jmp    12f8 <main+0x188>
lea    0xf2a(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movl   $0x0,0xc(%rsp)
lea    0xf6c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xda5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x10(%rsp,%rbp,1),%esi
lea    0xdc3(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf45(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [43 x i8] c"\0A* Materia: Linguagens Formais e Automatos\00"
@.str.2 = [20 x i8] c"\0A* Professor: Iamar\00"
@.str.3 = [21 x i8] c"\0A* Aluno:Marco Tulio\00"
@.str.4 = [67 x i8] c"\0A\0A\09** Prorgama 01 - Leitura de um AFD Minimizado. Pg 82 livro **\0A\0A\00"
@.str.5 = [67 x i8] c"------------------------------------------------------------------\00"
@.str.6 = [46 x i8] c"\0AAlfabeto Valido: {a,b}, sendo A==a e B==b...\00"
@.str.7 = [54 x i8] c"\0AInforme a cadeia de em concordancia com o alfabeto: \00"
@.str.8 = [3 x i8] c"%s\00"
@.str.9 = [49 x i8] c"\0AA palavra informada n\C3\A3o faz parte do alfabeto.\00"
@.str.10 = [43 x i8] c"\0AA seguinte ambiguidade foi encontrada: %c\00"
@.str.11 = [38 x i8] c"\0AO programa est\C3\A1 sendo finalizado!\0A\0A\00"
@.str.12 = [68 x i8] c"\0A------------------------------------------------------------------\00"
@.str.13 = [32 x i8] c"\0A\0APrograma executado sem erros.\00"
@.str.14 = [50 x i8] c"\0A\0AOcorreram alguns erros inesperados no programa.\00"
@.str.15 = [93 x i8] c"\0A\0ADeseja executar o programa novamente informando outra palavra?\0A\09(1)-sim\0A\09(0)-Nao\0A\09Informe:\00"
@.str.16 = [3 x i8] c"%i\00"
@.str.17 = [22 x i8] c"\0A\0AOp\C3\A7\C3\A3o Invalida...\00"
@.str.18 = [24 x i8] c"\0AFinalizando Programa!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %2
br label %12
12: ; preds = %105, %0
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %106
15: ; preds = %12
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.7, i64 0, i64 0))
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), [100 x i8]* %3)
store i32 0, i32* %4
store i32 0, i32* %4
br label %20
20: ; preds = %28, %15
%21 = load i32, i32* %4
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %31
27: ; preds = %20
br label %28
28: ; preds = %27
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %20
31: ; preds = %20
store i32 0, i32* %5
br label %32
32: ; preds = %77, %31
%33 = load i32, i32* %5
%34 = load i32, i32* %4
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %80
36: ; preds = %32
%37 = load i32, i32* %5
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %38
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp slt i32 %41, 97
br i1 %42, label %43, label %51
43: ; preds = %36
%44 = load i32, i32* %5
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %45
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = add nsw i32 %48, 32
%50 = trunc i32 %49 to i8
store i8 %50, i8* %46
br label %51
51: ; preds = %43, %36
%52 = load i32, i32* %5
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = icmp ne i32 %56, 97
br i1 %57, label %58, label %76
58: ; preds = %51
%59 = load i32, i32* %5
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %60
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = icmp ne i32 %63, 98
br i1 %64, label %65, label %75
65: ; preds = %58
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0))
%67 = load i32, i32* %5
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %68
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.10, i64 0, i64 0), i32 %71)
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0))
%74 = call i32 @exit(i32 0)
unreachable
75: ; preds = %58
br label %76
76: ; preds = %75, %51
br label %77
77: ; preds = %76
%78 = load i32, i32* %5
%79 = add nsw i32 %78, 1
store i32 %79, i32* %5
br label %32
80: ; preds = %32
%81 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%82 = load i32, i32* %4
%83 = call i32 @calcular1oAFD(i8* %81, i32 %82)
store i32 %83, i32* %6
%84 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%85 = load i32, i32* %4
%86 = call i32 @calcular2oAFD(i8* %84, i32 %85)
store i32 %86, i32* %6
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.12, i64 0, i64 0))
%88 = load i32, i32* %6
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %92
90: ; preds = %80
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0))
br label %94
92: ; preds = %80
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.14, i64 0, i64 0))
br label %94
94: ; preds = %92, %90
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.15, i64 0, i64 0))
%96 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %2)
%97 = load i32, i32* %2
%98 = icmp ne i32 %97, 1
br i1 %98, label %99, label %105
99: ; preds = %94
%100 = load i32, i32* %2
%101 = icmp ne i32 %100, 0
br i1 %101, label %102, label %104
102: ; preds = %99
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.17, i64 0, i64 0))
store i32 0, i32* %2
br label %104
104: ; preds = %102, %99
br label %105
105: ; preds = %104, %94
br label %12
106: ; preds = %12
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.18, i64 0, i64 0))
%108 = load i32, i32* %1
ret i32 %108
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [43 x i8] c"\0A* Materia: Linguagens Formais e Automatos\00"
@.str.2 = [20 x i8] c"\0A* Professor: Iamar\00"
@.str.3 = [21 x i8] c"\0A* Aluno:Marco Tulio\00"
@.str.5 = [67 x i8] c"------------------------------------------------------------------\00"
@.str.6 = [46 x i8] c"\0AAlfabeto Valido: {a,b}, sendo A==a e B==b...\00"
@.str.7 = [54 x i8] c"\0AInforme a cadeia de em concordancia com o alfabeto: \00"
@.str.8 = [3 x i8] c"%s\00"
@.str.9 = [49 x i8] c"\0AA palavra informada n\C3\A3o faz parte do alfabeto.\00"
@.str.10 = [43 x i8] c"\0AA seguinte ambiguidade foi encontrada: %c\00"
@.str.12 = [68 x i8] c"\0A------------------------------------------------------------------\00"
@.str.13 = [32 x i8] c"\0A\0APrograma executado sem erros.\00"
@.str.14 = [50 x i8] c"\0A\0AOcorreram alguns erros inesperados no programa.\00"
@.str.15 = [93 x i8] c"\0A\0ADeseja executar o programa novamente informando outra palavra?\0A\09(1)-sim\0A\09(0)-Nao\0A\09Informe:\00"
@.str.16 = [3 x i8] c"%i\00"
@.str.17 = [22 x i8] c"\0A\0AOp\C3\A7\C3\A3o Invalida...\00"
@str = [66 x i8] c"\0A\0A\09** Prorgama 01 - Leitura de um AFD Minimizado. Pg 82 livro **\0A\00"
@str.19 = [23 x i8] c"\0AFinalizando Programa!\00"
@str.20 = [37 x i8] c"\0AO programa est\C3\A1 sendo finalizado!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str, i64 0, i64 0))
%8 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
br label %10
10: ; preds = %0, %60
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.7, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), [100 x i8]* %2)
br label %15
15: ; preds = %15, %10
%16 = phi i64 [ %20, %15 ], [ 0, %10 ]
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 0
%20 = add nuw i64 %16, 1
br i1 %19, label %21, label %15
21: ; preds = %15
%22 = trunc i64 %16 to i32
%23 = icmp eq i32 %22, 0
br i1 %23, label %47, label %24
24: ; preds = %21
%25 = and i64 %16, 4294967295
br label %28
26: ; preds = %35
%27 = icmp eq i64 %39, %25
br i1 %27, label %47, label %28
28: ; preds = %24, %26
%29 = phi i64 [ 0, %24 ], [ %39, %26 ]
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %29
%31 = load i8, i8* %30
%32 = icmp slt i8 %31, 97
br i1 %32, label %33, label %35
33: ; preds = %28
%34 = add i8 %31, 32
store i8 %34, i8* %30
br label %35
35: ; preds = %33, %28
%36 = phi i8 [ %34, %33 ], [ %31, %28 ]
%37 = add i8 %36, -97
%38 = icmp ult i8 %37, 2
%39 = add nuw nsw i64 %29, 1
br i1 %38, label %26, label %40
40: ; preds = %35
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0))
%42 = load i8, i8* %30
%43 = sext i8 %42 to i32
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.10, i64 0, i64 0), i32 %43)
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.20, i64 0, i64 0))
%46 = call i32 @exit(i32 0)
unreachable
47: ; preds = %26, %21
%48 = call i32 @calcular1oAFD(i8* %9, i32 %22)
%49 = call i32 @calcular2oAFD(i8* %9, i32 %22)
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.12, i64 0, i64 0))
%51 = icmp eq i32 %49, 0
%52 = select i1 %51, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.14, i64 0, i64 0)
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %52)
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @.str.15, i64 0, i64 0))
%55 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %1)
%56 = load i32, i32* %1
%57 = icmp ult i32 %56, 2
br i1 %57, label %60, label %58
58: ; preds = %47
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.17, i64 0, i64 0))
store i32 0, i32* %1
br label %62
60: ; preds = %47
%61 = icmp eq i32 %56, 1
br i1 %61, label %10, label %62
62: ; preds = %60, %58
%63 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.19, i64 0, i64 0))
ret i32 0
}