#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 */
struct end {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int getchar();
int /*<<< orphan*/ imprimir(struct end *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ scanf(char *, int *);
struct end *seekndestroy(struct end *, char *, int);
int /*<<< orphan*/ stdin;
int teste(int, int /*<<< orphan*/, int, int);
struct end *remover(struct end *p) {
  int entrada;
  if (p != NULL) {
    int i;
    char procurado[51], *p_nom = &procurado[0];
    struct end *p_aux;
    for (entrada = 0; entrada < 80; entrada++)
      putchar('\n');
    printf("Deseja remover um contato? (1. Sim | 0. Nao)\n");
    scanf("%i", &entrada);
    entrada = teste(entrada, 0, 1, 1);
    while (entrada != 0) {
      entrada = 0;
      while (entrada != 1) {
        printf("Qual o nome do contato que voce deseja remover? (Max.: %i "
               "caracteres)\n",
               51 - 1);
        procurado[0] = getchar();
        fgets(procurado, 51, stdin);
        for (i = 0; (procurado[i] != '\n') && (procurado[i] != '\0'); i++)
          ;
        procurado[i] = '\0';
        printf("O nome '%s' esta correto? (1. Sim | 0. Nao)\n", procurado);
        scanf("%i", &entrada);
        entrada = teste(entrada, 0, 1, 1);
      }
      p_aux = seekndestroy(p, p_nom, 1);
      if (p_aux != NULL) {
        imprimir(p_aux, 2);
        printf("Deseja REALMENTE excluir o contato em questao? Esse processo "
               "nao pode ser\nrevertido. (1. Sim | 0. Nao)\n");
        scanf("%i", &entrada);
        entrada = teste(entrada, 0, 1, 1);
        if (entrada == 1) {
          p = seekndestroy(p, p_nom, 2);
          printf("\nO contato '%s' foi removido da agenda.\n", procurado);
        }
      } else
        printf("O contato buscado nao esta na agenda.\n");
      if (p == NULL) {
        printf("Voce nao possui mais contatos em sua agenda.\n");
        break;
      } else {
        printf("Deseja remover outro contato? (1. Sim | 0. Nao)\n");
        scanf("%i", &entrada);
        entrada = teste(entrada, 0, 1, 1);
      }
    }
  } else
    printf("Voce nao possui contatos na sua agenda.\n");
  printf("Aperte 'Enter' para voltar ao menu principal.\n");
  entrada = getchar();
  entrada = getchar();
  return (p);
}


x86 assembly (clang, -O0):
<remover>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     13e0 <remover+0x260>
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x50,-0xc(%rbp)
jge    11c8 <remover+0x48>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a6 <remover+0x26>
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe51(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1090 <scanf@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1050 <teste@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     13db <remover+0x25b>
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     12e0 <remover+0x160>
lea    0xe15(%rip),%rdi
mov    $0x32,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1080 <getchar@plt>
mov    %al,-0x50(%rbp)
lea    -0x50(%rbp),%rdi
mov    0x2dab(%rip),%rax
mov    (%rax),%edx
mov    $0x33,%esi
call   1070 <fgets@plt>
movl   $0x0,-0x10(%rbp)
movslq -0x10(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x61(%rbp)
je     1279 <remover+0xf9>
movslq -0x10(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x61(%rbp)
mov    -0x61(%rbp),%al
test   $0x1,%al
jne    1289 <remover+0x109>
jmp    129c <remover+0x11c>
jmp    128e <remover+0x10e>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1250 <remover+0xd0>
movslq -0x10(%rbp),%rax
movb   $0x0,-0x50(%rbp,%rax,1)
lea    -0x50(%rbp),%rsi
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd70(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1090 <scanf@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1050 <teste@plt>
mov    %eax,-0xc(%rbp)
jmp    120b <remover+0x8b>
mov    -0x8(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    $0x1,%edx
call   10a0 <seekndestroy@plt>
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
je     1378 <remover+0x1f8>
mov    -0x60(%rbp),%rdi
mov    $0x2,%esi
call   1060 <imprimir@plt>
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd0a(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1090 <scanf@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1050 <teste@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1373 <remover+0x1f3>
mov    -0x8(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    $0x2,%edx
call   10a0 <seekndestroy@plt>
mov    %rax,-0x8(%rbp)
lea    -0x50(%rbp),%rsi
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1386 <remover+0x206>
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x8(%rbp)
jne    13a4 <remover+0x224>
lea    0xdc5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13db <remover+0x25b>
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc75(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1090 <scanf@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1050 <teste@plt>
mov    %eax,-0xc(%rbp)
jmp    11fa <remover+0x7a>
jmp    13ee <remover+0x26e>
lea    0xdd5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1080 <getchar@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1080 <getchar@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remover>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
test   %rdi,%rdi
je     13ae <remover+0x21e>
mov    %rdi,%rbp
mov    $0x50,%ebx
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    11b0 <remover+0x20>
movl   $0x50,0x4(%rsp)
lea    0xf28(%rip),%rdi
call   1040 <puts@plt>
lea    0xe26(%rip),%rdi
lea    0x4(%rsp),%rsi
call   10a0 <scanf@plt>
mov    0x4(%rsp),%edi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1060 <teste@plt>
mov    %eax,0x4(%rsp)
test   %eax,%eax
mov    %rbp,0x8(%rsp)
je     13d1 <remover+0x241>
lea    0xdf2(%rip),%r15
mov    0x2dd0(%rip),%r14
lea    0x10(%rsp),%rbx
lea    0xe26(%rip),%r12
lea    0xdd5(%rip),%r13
lea    0x4(%rsp),%rbp
movl   $0x0,0x4(%rsp)
jmp    127d <remover+0xed>
nopw   0x0(%rax,%rax,1)
mov    %eax,%eax
movb   $0x0,0x10(%rsp,%rax,1)
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   10a0 <scanf@plt>
mov    0x4(%rsp),%edi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1060 <teste@plt>
mov    %eax,0x4(%rsp)
cmp    $0x1,%eax
je     12d0 <remover+0x140>
mov    %r15,%rdi
mov    $0x32,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1090 <getchar@plt>
mov    %al,0x10(%rsp)
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x33,%esi
call   1080 <fgets@plt>
xor    %eax,%eax
nopl   0x0(%rax)
movzbl 0x10(%rsp,%rax,1),%ecx
test   %cl,%cl
je     1240 <remover+0xb0>
cmp    $0xa,%cl
je     1240 <remover+0xb0>
add    $0x1,%rax
jmp    12b0 <remover+0x120>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
call   10b0 <seekndestroy@plt>
test   %rax,%rax
je     1360 <remover+0x1d0>
mov    %rax,%rdi
mov    $0x2,%esi
call   1070 <imprimir@plt>
lea    0xeab(%rip),%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   10a0 <scanf@plt>
mov    0x4(%rsp),%edi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1060 <teste@plt>
mov    %eax,0x4(%rsp)
cmp    $0x1,%eax
jne    136c <remover+0x1dc>
mov    0x8(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
call   10b0 <seekndestroy@plt>
mov    %rax,0x8(%rsp)
lea    0xd30(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    136c <remover+0x1dc>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xdbc(%rip),%rdi
call   1040 <puts@plt>
cmpq   $0x0,0x8(%rsp)
je     13be <remover+0x22e>
lea    0xdce(%rip),%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   10a0 <scanf@plt>
mov    0x4(%rsp),%edi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1060 <teste@plt>
mov    %eax,0x4(%rsp)
test   %eax,%eax
jne    1230 <remover+0xa0>
jmp    13d1 <remover+0x241>
lea    0xceb(%rip),%rdi
call   1040 <puts@plt>
xor    %ebx,%ebx
jmp    13d6 <remover+0x246>
lea    0xdb4(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    0x8(%rsp),%rbx
lea    0xceb(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1090 <getchar@plt>
mov    %eax,0x4(%rsp)
xor    %eax,%eax
call   1090 <getchar@plt>
mov    %rbx,%rax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.end = type { i32 }
@.str = [46 x i8] c"Deseja remover um contato? (1. Sim | 0. Nao)\0A\00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [71 x i8] c"Qual o nome do contato que voce deseja remover? (Max.: %i caracteres)\0A\00"
@stdin = global i32 0
@.str.3 = [45 x i8] c"O nome '%s' esta correto? (1. Sim | 0. Nao)\0A\00"
@.str.4 = [104 x i8] c"Deseja REALMENTE excluir o contato em questao? Esse processo nao pode ser\0Arevertido. (1. Sim | 0. Nao)\0A\00"
@.str.5 = [41 x i8] c"\0AO contato '%s' foi removido da agenda.\0A\00"
@.str.6 = [39 x i8] c"O contato buscado nao esta na agenda.\0A\00"
@.str.7 = [46 x i8] c"Voce nao possui mais contatos em sua agenda.\0A\00"
@.str.8 = [49 x i8] c"Deseja remover outro contato? (1. Sim | 0. Nao)\0A\00"
@.str.9 = [41 x i8] c"Voce nao possui contatos na sua agenda.\0A\00"
@.str.10 = [47 x i8] c"Aperte 'Enter' para voltar ao menu principal.\0A\00"
define %struct.end* @remover(%struct.end* %0) {
%2 = alloca %struct.end*
%3 = alloca i32
%4 = alloca i32
%5 = alloca [51 x i8]
%6 = alloca i8*
%7 = alloca %struct.end*
store %struct.end* %0, %struct.end** %2
%8 = load %struct.end*, %struct.end** %2
%9 = icmp ne %struct.end* %8, null
br i1 %9, label %10, label %105
10: ; preds = %1
%11 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 0
store i8* %11, i8** %6
store i32 0, i32* %3
br label %12
12: ; preds = %17, %10
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 80
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = call i32 @putchar(i8 signext 10)
br label %17
17: ; preds = %15
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %12
20: ; preds = %12
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%23 = load i32, i32* %3
%24 = call i32 @teste(i32 %23, i32 0, i32 1, i32 1)
store i32 %24, i32* %3
br label %25
25: ; preds = %103, %20
%26 = load i32, i32* %3
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %104
28: ; preds = %25
store i32 0, i32* %3
br label %29
29: ; preds = %60, %28
%30 = load i32, i32* %3
%31 = icmp ne i32 %30, 1
br i1 %31, label %32, label %69
32: ; preds = %29
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.2, i64 0, i64 0), i32 50)
%34 = call i32 (...) @getchar()
%35 = trunc i32 %34 to i8
%36 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 0
store i8 %35, i8* %36
%37 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 0
%38 = load i32, i32* @stdin
%39 = call i32 @fgets(i8* %37, i32 51, i32 %38)
store i32 0, i32* %4
br label %40
40: ; preds = %57, %32
%41 = load i32, i32* %4
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 %42
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp ne i32 %45, 10
br i1 %46, label %47, label %54
47: ; preds = %40
%48 = load i32, i32* %4
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = icmp ne i32 %52, 0
br label %54
54: ; preds = %47, %40
%55 = phi i1 [ false, %40 ], [ %53, %47 ]
br i1 %55, label %56, label %60
56: ; preds = %54
br label %57
57: ; preds = %56
%58 = load i32, i32* %4
%59 = add nsw i32 %58, 1
store i32 %59, i32* %4
br label %40
60: ; preds = %54
%61 = load i32, i32* %4
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 %62
store i8 0, i8* %63
%64 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 0
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i8* %64)
%66 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%67 = load i32, i32* %3
%68 = call i32 @teste(i32 %67, i32 0, i32 1, i32 1)
store i32 %68, i32* %3
br label %29
69: ; preds = %29
%70 = load %struct.end*, %struct.end** %2
%71 = load i8*, i8** %6
%72 = call %struct.end* @seekndestroy(%struct.end* %70, i8* %71, i32 1)
store %struct.end* %72, %struct.end** %7
%73 = load %struct.end*, %struct.end** %7
%74 = icmp ne %struct.end* %73, null
br i1 %74, label %75, label %91
75: ; preds = %69
%76 = load %struct.end*, %struct.end** %7
%77 = call i32 @imprimir(%struct.end* %76, i32 2)
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.4, i64 0, i64 0))
%79 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%80 = load i32, i32* %3
%81 = call i32 @teste(i32 %80, i32 0, i32 1, i32 1)
store i32 %81, i32* %3
%82 = load i32, i32* %3
%83 = icmp eq i32 %82, 1
br i1 %83, label %84, label %90
84: ; preds = %75
%85 = load %struct.end*, %struct.end** %2
%86 = load i8*, i8** %6
%87 = call %struct.end* @seekndestroy(%struct.end* %85, i8* %86, i32 2)
store %struct.end* %87, %struct.end** %2
%88 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 0
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8* %88)
br label %90
90: ; preds = %84, %75
br label %93
91: ; preds = %69
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0))
br label %93
93: ; preds = %91, %90
%94 = load %struct.end*, %struct.end** %2
%95 = icmp eq %struct.end* %94, null
br i1 %95, label %96, label %98
96: ; preds = %93
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0))
br label %104
98: ; preds = %93
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0))
%100 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%101 = load i32, i32* %3
%102 = call i32 @teste(i32 %101, i32 0, i32 1, i32 1)
store i32 %102, i32* %3
br label %103
103: ; preds = %98
br label %25
104: ; preds = %96, %25
br label %107
105: ; preds = %1
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0))
br label %107
107: ; preds = %105, %104
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0))
%109 = call i32 (...) @getchar()
store i32 %109, i32* %3
%110 = call i32 (...) @getchar()
store i32 %110, i32* %3
%111 = load %struct.end*, %struct.end** %2
ret %struct.end* %111
}

LLVM IR (-O2):
%struct.end = type { i32 }
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [71 x i8] c"Qual o nome do contato que voce deseja remover? (Max.: %i caracteres)\0A\00"
@stdin = global i32 0
@.str.3 = [45 x i8] c"O nome '%s' esta correto? (1. Sim | 0. Nao)\0A\00"
@.str.5 = [41 x i8] c"\0AO contato '%s' foi removido da agenda.\0A\00"
@str = [40 x i8] c"Voce nao possui contatos na sua agenda.\00"
@str.11 = [46 x i8] c"Aperte 'Enter' para voltar ao menu principal.\00"
@str.12 = [45 x i8] c"Deseja remover um contato? (1. Sim | 0. Nao)\00"
@str.13 = [38 x i8] c"O contato buscado nao esta na agenda.\00"
@str.14 = [48 x i8] c"Deseja remover outro contato? (1. Sim | 0. Nao)\00"
@str.15 = [45 x i8] c"Voce nao possui mais contatos em sua agenda.\00"
@str.16 = [103 x i8] c"Deseja REALMENTE excluir o contato em questao? Esse processo nao pode ser\0Arevertido. (1. Sim | 0. Nao)\00"
define %struct.end* @remover(%struct.end* %0) {
%2 = alloca i32
%3 = alloca [51 x i8]
%4 = bitcast i32* %2 to i8*
%5 = icmp eq %struct.end* %0, null
br i1 %5, label %69, label %6
6: ; preds = %1
%7 = getelementptr inbounds [51 x i8], [51 x i8]* %3, i64 0, i64 0
br label %8
8: ; preds = %6, %8
%9 = phi i32 [ 0, %6 ], [ %11, %8 ]
%10 = tail call i32 @putchar(i8 signext 10)
%11 = add nuw nsw i32 %9, 1
%12 = icmp eq i32 %11, 80
br i1 %12, label %13, label %8
13: ; preds = %8
store i32 80, i32* %2
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.12, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%16 = load i32, i32* %2
%17 = call i32 @teste(i32 %16, i32 0, i32 1, i32 1)
store i32 %17, i32* %2
%18 = icmp eq i32 %17, 0
br i1 %18, label %67, label %19
19: ; preds = %13, %61
%20 = phi %struct.end* [ %57, %61 ], [ %0, %13 ]
store i32 0, i32* %2
br label %21
21: ; preds = %19, %33
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @.str.2, i64 0, i64 0), i32 50)
%23 = call i32 (...) @getchar()
%24 = trunc i32 %23 to i8
store i8 %24, i8* %7
%25 = load i32, i32* @stdin
%26 = call i32 @fgets(i8* %7, i32 51, i32 %25)
br label %27
27: ; preds = %31, %21
%28 = phi i64 [ %32, %31 ], [ 0, %21 ]
%29 = getelementptr inbounds [51 x i8], [51 x i8]* %3, i64 0, i64 %28
%30 = load i8, i8* %29
switch i8 %30, label %31 [
i8 10, label %33
i8 0, label %33
]
31: ; preds = %27
%32 = add nuw i64 %28, 1
br label %27
33: ; preds = %27, %27
%34 = and i64 %28, 4294967295
%35 = getelementptr inbounds [51 x i8], [51 x i8]* %3, i64 0, i64 %34
store i8 0, i8* %35
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%38 = load i32, i32* %2
%39 = call i32 @teste(i32 %38, i32 0, i32 1, i32 1)
store i32 %39, i32* %2
%40 = icmp eq i32 %39, 1
br i1 %40, label %41, label %21
41: ; preds = %33
%42 = call %struct.end* @seekndestroy(%struct.end* %20, i8* %7, i32 1)
%43 = icmp eq %struct.end* %42, null
br i1 %43, label %54, label %44
44: ; preds = %41
%45 = call i32 @imprimir(%struct.end* %42, i32 2)
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([103 x i8], [103 x i8]* @str.16, i64 0, i64 0))
%47 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%48 = load i32, i32* %2
%49 = call i32 @teste(i32 %48, i32 0, i32 1, i32 1)
store i32 %49, i32* %2
%50 = icmp eq i32 %49, 1
br i1 %50, label %51, label %56
51: ; preds = %44
%52 = call %struct.end* @seekndestroy(%struct.end* %20, i8* %7, i32 2)
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8* %7)
br label %56
54: ; preds = %41
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.13, i64 0, i64 0))
br label %56
56: ; preds = %44, %51, %54
%57 = phi %struct.end* [ %52, %51 ], [ %20, %44 ], [ %20, %54 ]
%58 = icmp eq %struct.end* %57, null
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.15, i64 0, i64 0))
br label %67
61: ; preds = %56
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.14, i64 0, i64 0))
%63 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%64 = load i32, i32* %2
%65 = call i32 @teste(i32 %64, i32 0, i32 1, i32 1)
store i32 %65, i32* %2
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %19
67: ; preds = %61, %13, %59
%68 = phi %struct.end* [ null, %59 ], [ %0, %13 ], [ %57, %61 ]
br label %71
69: ; preds = %1
%70 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
br label %71
71: ; preds = %69, %67
%72 = phi %struct.end* [ %68, %67 ], [ null, %69 ]
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.11, i64 0, i64 0))
%74 = call i32 (...) @getchar()
store i32 %74, i32* %2
%75 = call i32 (...) @getchar()
ret %struct.end* %72
}