#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 /*<<< orphan*/ scanf(char *, ...);
int main() {
  int resposta, alt, comp, i, j;
  char nome[20], continuar;
  do {
    printf("Digite o seu nome:\n");
    scanf("%s", nome);
    printf("\n%s, digite um numero para o Comprimento do seu Retangulo, este "
           "numero devera ser maior do que 2:\n",
           nome);
    scanf("%d", &comp);
    while (comp < 3) {
      printf("\n%s, voce digitou para o Comprimento, um numero menor ou igual "
             "a 2. \nPara desenhar o seu Retangulo, digite um numero maior do "
             "que 2:\n",
             nome);
      scanf("%d", &comp);
    }
    printf("\n%s, digite um numero para a Altura do seu Retangulo, este numero "
           "devera ser maior do que 2:\n",
           nome);
    scanf("%d", &alt);
    while (alt < 3) {
      printf(
          "\n%s, voce digitou para a Altura, um numero menor ou igual a 2. "
          "\nPara desenhar o seu Retangulo, digite um numero maior do que 2:\n",
          nome);
      scanf("%d", &alt);
    }
    printf("\n\nOlá, meu nome eh %s, e o meu retangulo ficou assim:\n\n", nome);
    for (i = 1; i <= alt; i++) {
      for (j = 1; j <= comp; j++) {
        if (i > 1 && j > 1 && j < comp && i < alt) {
          printf(" ");
        } else {
          printf("%c", 42);
        }
      }
      printf("\n");
    }
    printf("\nDeseja continuar (s/n)?\n");
    scanf(" %c", &continuar);
  } while (continuar == 's');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x30(%rbp),%rsi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x3,-0x10(%rbp)
jge    11a6 <main+0x86>
lea    -0x30(%rbp),%rsi
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
jmp    1173 <main+0x53>
lea    -0x30(%rbp),%rsi
lea    0xf52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x3,-0xc(%rbp)
jge    11fd <main+0xdd>
lea    -0x30(%rbp),%rsi
lea    0xf82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8d(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
jmp    11ca <main+0xaa>
lea    -0x30(%rbp),%rsi
lea    0xfda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     12b6 <main+0x196>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     129a <main+0x17a>
cmpl   $0x1,-0x14(%rbp)
jle    1274 <main+0x154>
cmpl   $0x1,-0x18(%rbp)
jle    1274 <main+0x154>
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1274 <main+0x154>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1274 <main+0x154>
lea    0xfb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1287 <main+0x167>
lea    0xfbd(%rip),%rdi
mov    $0x2a,%esi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    128c <main+0x16c>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1229 <main+0x109>
lea    0xf78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1216 <main+0xf6>
lea    0xf60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6c(%rip),%rdi
lea    -0x31(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x31(%rbp),%eax
cmp    $0x73,%eax
je     112f <main+0xf>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0x10(%rsp),%r12
lea    0xf0c(%rip),%r13
lea    0xc(%rsp),%rbx
lea    0xf03(%rip),%rbp
lea    0x8(%rsp),%r14
lea    0xfdb(%rip),%r15
jmp    11b6 <main+0x76>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x1097(%rip),%rdi
call   1040 <puts@plt>
lea    0x1074(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpb   $0x73,0x7(%rsp)
lea    0x8(%rsp),%r14
lea    0xf9d(%rip),%r15
jne    131a <main+0x1da>
lea    0x104e(%rip),%rdi
call   1040 <puts@plt>
lea    0xe37(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe29(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x2,0xc(%rsp)
jg     1221 <main+0xe1>
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x3,0xc(%rsp)
jl     1200 <main+0xc0>
lea    0xec7(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x2,0x8(%rsp)
jg     1271 <main+0x131>
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x3,0x8(%rsp)
jl     1250 <main+0x110>
lea    0xf56(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x8(%rsp)
jle    1180 <main+0x40>
mov    $0x1,%r14d
jmp    12bc <main+0x17c>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%r14),%eax
cmp    0x8(%rsp),%r14d
mov    %eax,%r14d
jge    1180 <main+0x40>
cmpl   $0x0,0xc(%rsp)
jle    12a0 <main+0x160>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
cmp    $0x2,%eax
jl     12a0 <main+0x160>
mov    $0x2,%r15d
jmp    1302 <main+0x1c2>
xchg   %ax,%ax
cmp    %eax,%r15d
cmovge %ecx,%edi
cmp    $0x2,%r14d
cmovb  %ecx,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
lea    0x1(%r15),%ecx
cmp    %eax,%r15d
mov    %ecx,%r15d
jge    12a0 <main+0x160>
mov    $0x20,%edi
mov    $0x2a,%ecx
cmp    0x8(%rsp),%r14d
jl     12e0 <main+0x1a0>
mov    $0x2a,%edi
jmp    12e0 <main+0x1a0>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Digite o seu nome:\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [99 x i8] c"\0A%s, digite um numero para o Comprimento do seu Retangulo, este numero devera ser maior do que 2:\0A\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [134 x i8] c"\0A%s, voce digitou para o Comprimento, um numero menor ou igual a 2. \0APara desenhar o seu Retangulo, digite um numero maior do que 2:\0A\00"
@.str.5 = [94 x i8] c"\0A%s, digite um numero para a Altura do seu Retangulo, este numero devera ser maior do que 2:\0A\00"
@.str.6 = [129 x i8] c"\0A%s, voce digitou para a Altura, um numero menor ou igual a 2. \0APara desenhar o seu Retangulo, digite um numero maior do que 2:\0A\00"
@.str.7 = [57 x i8] c"\0A\0AOl\C3\A1, meu nome eh %s, e o meu retangulo ficou assim:\0A\0A\00"
@.str.8 = [2 x i8] c" \00"
@.str.9 = [3 x i8] c"%c\00"
@.str.10 = [2 x i8] c"\0A\00"
@.str.11 = [26 x i8] c"\0ADeseja continuar (s/n)?\0A\00"
@.str.12 = [4 x i8] c" %c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [20 x i8]
%8 = alloca i8
store i32 0, i32* %1
br label %9
9: ; preds = %76, %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
br label %16
16: ; preds = %19, %9
%17 = load i32, i32* %4
%18 = icmp slt i32 %17, 3
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.4, i64 0, i64 0), i8* %20)
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
br label %16
23: ; preds = %16
%24 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.5, i64 0, i64 0), i8* %24)
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
br label %27
27: ; preds = %30, %23
%28 = load i32, i32* %3
%29 = icmp slt i32 %28, 3
br i1 %29, label %30, label %34
30: ; preds = %27
%31 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.6, i64 0, i64 0), i8* %31)
%33 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
br label %27
34: ; preds = %27
%35 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.7, i64 0, i64 0), i8* %35)
store i32 1, i32* %5
br label %37
37: ; preds = %70, %34
%38 = load i32, i32* %5
%39 = load i32, i32* %3
%40 = icmp sle i32 %38, %39
br i1 %40, label %41, label %73
41: ; preds = %37
store i32 1, i32* %6
br label %42
42: ; preds = %65, %41
%43 = load i32, i32* %6
%44 = load i32, i32* %4
%45 = icmp sle i32 %43, %44
br i1 %45, label %46, label %68
46: ; preds = %42
%47 = load i32, i32* %5
%48 = icmp sgt i32 %47, 1
br i1 %48, label %49, label %62
49: ; preds = %46
%50 = load i32, i32* %6
%51 = icmp sgt i32 %50, 1
br i1 %51, label %52, label %62
52: ; preds = %49
%53 = load i32, i32* %6
%54 = load i32, i32* %4
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %62
56: ; preds = %52
%57 = load i32, i32* %5
%58 = load i32, i32* %3
%59 = icmp slt i32 %57, %58
br i1 %59, label %60, label %62
60: ; preds = %56
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %64
62: ; preds = %56, %52, %49, %46
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 42)
br label %64
64: ; preds = %62, %60
br label %65
65: ; preds = %64
%66 = load i32, i32* %6
%67 = add nsw i32 %66, 1
store i32 %67, i32* %6
br label %42
68: ; preds = %42
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %70
70: ; preds = %68
%71 = load i32, i32* %5
%72 = add nsw i32 %71, 1
store i32 %72, i32* %5
br label %37
73: ; preds = %37
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
%75 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %8)
br label %76
76: ; preds = %73
%77 = load i8, i8* %8
%78 = sext i8 %77 to i32
%79 = icmp eq i32 %78, 115
br i1 %79, label %9, label %80
80: ; preds = %76
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [99 x i8] c"\0A%s, digite um numero para o Comprimento do seu Retangulo, este numero devera ser maior do que 2:\0A\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [134 x i8] c"\0A%s, voce digitou para o Comprimento, um numero menor ou igual a 2. \0APara desenhar o seu Retangulo, digite um numero maior do que 2:\0A\00"
@.str.5 = [94 x i8] c"\0A%s, digite um numero para a Altura do seu Retangulo, este numero devera ser maior do que 2:\0A\00"
@.str.6 = [129 x i8] c"\0A%s, voce digitou para a Altura, um numero menor ou igual a 2. \0APara desenhar o seu Retangulo, digite um numero maior do que 2:\0A\00"
@.str.7 = [57 x i8] c"\0A\0AOl\C3\A1, meu nome eh %s, e o meu retangulo ficou assim:\0A\0A\00"
@.str.12 = [4 x i8] c" %c\00"
@str = [19 x i8] c"Digite o seu nome:\00"
@str.13 = [25 x i8] c"\0ADeseja continuar (s/n)?\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [20 x i8]
%4 = alloca i8
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
br label %8
8: ; preds = %61, %0
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([99 x i8], [99 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 3
br i1 %14, label %15, label %20
15: ; preds = %8, %15
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([134 x i8], [134 x i8]* @.str.4, i64 0, i64 0), i8* %7)
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 3
br i1 %19, label %15, label %20
20: ; preds = %15, %8
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([94 x i8], [94 x i8]* @.str.5, i64 0, i64 0), i8* %7)
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%23 = load i32, i32* %1
%24 = icmp slt i32 %23, 3
br i1 %24, label %25, label %30
25: ; preds = %20, %25
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([129 x i8], [129 x i8]* @.str.6, i64 0, i64 0), i8* %7)
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%28 = load i32, i32* %1
%29 = icmp slt i32 %28, 3
br i1 %29, label %25, label %30
30: ; preds = %25, %20
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.7, i64 0, i64 0), i8* %7)
%32 = load i32, i32* %1
%33 = icmp slt i32 %32, 1
br i1 %33, label %61, label %34
34: ; preds = %30, %56
%35 = phi i32 [ %58, %56 ], [ 1, %30 ]
%36 = load i32, i32* %2
%37 = icmp slt i32 %36, 1
br i1 %37, label %56, label %38
38: ; preds = %34
%39 = icmp ugt i32 %35, 1
%40 = call i32 @putchar(i32 42)
%41 = load i32, i32* %2
%42 = icmp sgt i32 %41, 1
br i1 %42, label %43, label %56
43: ; preds = %38, %43
%44 = phi i32 [ %54, %43 ], [ %41, %38 ]
%45 = phi i32 [ %46, %43 ], [ 1, %38 ]
%46 = add nuw nsw i32 %45, 1
%47 = load i32, i32* %1
%48 = icmp slt i32 %46, %44
%49 = select i1 %39, i1 %48, i1 false
%50 = icmp slt i32 %35, %47
%51 = select i1 %49, i1 %50, i1 false
%52 = select i1 %51, i32 32, i32 42
%53 = call i32 @putchar(i32 %52)
%54 = load i32, i32* %2
%55 = icmp slt i32 %46, %54
br i1 %55, label %43, label %56
56: ; preds = %43, %38, %34
%57 = call i32 @putchar(i32 10)
%58 = add nuw nsw i32 %35, 1
%59 = load i32, i32* %1
%60 = icmp slt i32 %35, %59
br i1 %60, label %34, label %61
61: ; preds = %56, %30
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.13, i64 0, i64 0))
%63 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %4)
%64 = load i8, i8* %4
%65 = icmp eq i8 %64, 115
br i1 %65, label %8, label %66
66: ; preds = %61
ret i32 0
}