#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 /*<<< orphan*/ system(char *);
int main() {
  int coluna, linha, largura, altura, continuar;
  char nome[20];
  continuar = 1;
  while (continuar == 1) {
    printf("Digite seu nome :\n");
    scanf("%s", nome);
    printf("Digite a largura do retangulo :\n");
    scanf("%d", &largura);
    printf("Digite a altura do retangulo :\n");
    scanf("%d", &altura);
    printf("Ola, meu nome e %s e o retangulo ficou assim :\n", nome);
    for (coluna = 1; coluna <= altura; coluna++) {
      for (linha = 1; linha <= largura; linha++)
        if (coluna == 1 || coluna == altura || linha == 1 || linha == largura)
          printf("*");
        else
          printf(" ");
      printf("\n");
    }
    printf("Deseja continuar ? (1 - s/2 - n)\n");
    scanf("%d", &continuar);
  }
  return 0;
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jne    1279 <main+0x159>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea2(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x30(%rbp),%rsi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1254 <main+0x134>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1238 <main+0x118>
cmpl   $0x1,-0x8(%rbp)
je     1204 <main+0xe4>
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1204 <main+0xe4>
cmpl   $0x1,-0xc(%rbp)
je     1204 <main+0xe4>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1217 <main+0xf7>
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1225 <main+0x105>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122a <main+0x10a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11cc <main+0xac>
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11b9 <main+0x99>
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdce(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movl   $0x1,0x8(%rsp)
lea    0x10(%rsp),%r13
lea    0xea1(%rip),%rbx
lea    0xf1e(%rip),%rbp
lea    0x8(%rsp),%r14
jmp    1190 <main+0x50>
mov    %rbp,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x1,0x8(%rsp)
jne    1283 <main+0x143>
lea    0xe9f(%rip),%rdi
call   1040 <puts@plt>
lea    0xe5d(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe94(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe99(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe1c(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x4(%rsp)
jle    1170 <main+0x30>
mov    $0x1,%r15d
jmp    122c <main+0xec>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%r15),%eax
cmp    0x4(%rsp),%r15d
mov    %eax,%r15d
jge    1170 <main+0x30>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    1210 <main+0xd0>
xor    %ecx,%ecx
jmp    125e <main+0x11e>
nopl   0x0(%rax,%rax,1)
test   %ecx,%ecx
cmove  %edx,%edi
cmp    0x4(%rsp),%r15d
cmove  %edx,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
mov    %r12d,%ecx
cmp    %eax,%r12d
jge    1210 <main+0xd0>
lea    0x1(%rcx),%r12d
mov    $0x2a,%edi
cmp    $0x1,%r15d
je     124d <main+0x10d>
mov    $0x2a,%edx
mov    $0x2a,%edi
cmp    %eax,%r12d
je     1240 <main+0x100>
mov    $0x20,%edi
jmp    1240 <main+0x100>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Digite seu nome :\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [33 x i8] c"Digite a largura do retangulo :\0A\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [32 x i8] c"Digite a altura do retangulo :\0A\00"
@.str.5 = [48 x i8] c"Ola, meu nome e %s e o retangulo ficou assim :\0A\00"
@.str.6 = [2 x i8] c"*\00"
@.str.7 = [2 x i8] c" \00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [34 x i8] c"Deseja continuar ? (1 - s/2 - n)\0A\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]
store i32 0, i32* %1
store i32 1, i32* %6
br label %8
8: ; preds = %57, %0
%9 = load i32, i32* %6
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %60
11: ; preds = %8
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%19 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0), i8* %19)
store i32 1, i32* %2
br label %21
21: ; preds = %54, %11
%22 = load i32, i32* %2
%23 = load i32, i32* %5
%24 = icmp sle i32 %22, %23
br i1 %24, label %25, label %57
25: ; preds = %21
store i32 1, i32* %3
br label %26
26: ; preds = %49, %25
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = icmp sle i32 %27, %28
br i1 %29, label %30, label %52
30: ; preds = %26
%31 = load i32, i32* %2
%32 = icmp eq i32 %31, 1
br i1 %32, label %44, label %33
33: ; preds = %30
%34 = load i32, i32* %2
%35 = load i32, i32* %5
%36 = icmp eq i32 %34, %35
br i1 %36, label %44, label %37
37: ; preds = %33
%38 = load i32, i32* %3
%39 = icmp eq i32 %38, 1
br i1 %39, label %44, label %40
40: ; preds = %37
%41 = load i32, i32* %3
%42 = load i32, i32* %4
%43 = icmp eq i32 %41, %42
br i1 %43, label %44, label %46
44: ; preds = %40, %37, %33, %30
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %48
46: ; preds = %40
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %48
48: ; preds = %46, %44
br label %49
49: ; preds = %48
%50 = load i32, i32* %3
%51 = add nsw i32 %50, 1
store i32 %51, i32* %3
br label %26
52: ; preds = %26
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %54
54: ; preds = %52
%55 = load i32, i32* %2
%56 = add nsw i32 %55, 1
store i32 %56, i32* %2
br label %21
57: ; preds = %21
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%59 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %6)
br label %8
60: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.5 = [48 x i8] c"Ola, meu nome e %s e o retangulo ficou assim :\0A\00"
@str = [18 x i8] c"Digite seu nome :\00"
@str.10 = [32 x i8] c"Digite a largura do retangulo :\00"
@str.11 = [31 x i8] c"Digite a altura do retangulo :\00"
@str.12 = [33 x i8] c"Deseja continuar ? (1 - s/2 - n)\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [20 x i8]
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
store i32 1, i32* %3
br label %9
9: ; preds = %0, %47
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.10, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.11, i64 0, i64 0))
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0), i8* %8)
%17 = load i32, i32* %2
%18 = icmp slt i32 %17, 1
br i1 %18, label %47, label %19
19: ; preds = %9, %42
%20 = phi i32 [ %44, %42 ], [ 1, %9 ]
%21 = load i32, i32* %1
%22 = icmp slt i32 %21, 1
br i1 %22, label %42, label %23
23: ; preds = %19
%24 = icmp eq i32 %20, 1
br label %25
25: ; preds = %23, %36
%26 = phi i32 [ %21, %23 ], [ %40, %36 ]
%27 = phi i32 [ 1, %23 ], [ %39, %36 ]
br i1 %24, label %36, label %28
28: ; preds = %25
%29 = load i32, i32* %2
%30 = icmp eq i32 %20, %29
%31 = icmp eq i32 %27, 1
%32 = select i1 %30, i1 true, i1 %31
%33 = icmp eq i32 %27, %26
%34 = select i1 %32, i1 true, i1 %33
%35 = select i1 %34, i32 42, i32 32
br label %36
36: ; preds = %28, %25
%37 = phi i32 [ 42, %25 ], [ %35, %28 ]
%38 = call i32 @putchar(i32 %37)
%39 = add nuw nsw i32 %27, 1
%40 = load i32, i32* %1
%41 = icmp slt i32 %27, %40
br i1 %41, label %25, label %42
42: ; preds = %36, %19
%43 = call i32 @putchar(i32 10)
%44 = add nuw nsw i32 %20, 1
%45 = load i32, i32* %2
%46 = icmp slt i32 %20, %45
br i1 %46, label %19, label %47
47: ; preds = %42, %9
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.12, i64 0, i64 0))
%49 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%50 = load i32, i32* %3
%51 = icmp eq i32 %50, 1
br i1 %51, label %9, label %52
52: ; preds = %47
ret i32 0
}