#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 *);
int main() {
  int choice = 1, height, width, thickness, i, j, thickness_hold;
  while (choice != 0) {
    printf("Enter the height for your rectangle:");
    scanf("%d", &height);
    while (height > 20 || height < 1) {
      printf("You should new number between 1 and 20 for height.\n");
      printf("Enter the height for your rectangle:");
      scanf("%d", &height);
    }
    printf("Enter the width for your rectangle:");
    scanf("%d", &width);
    while (width > 20 || width < 1) {
      printf("You should new number between 1 and 20 for width.\n");
      printf("Enter the width for your rectangle:");
      scanf("%d", &width);
    }
    printf("Enter the thickness:");
    scanf("%d", &thickness);
    while (thickness > 20 || thickness < 1) {
      printf("You should new number between 1 and 20 for thickness.\n");
      printf("Enter the thickness for your rectangle:");
      scanf("%d", &thickness);
    }
    thickness_hold = thickness;
    if (height > 2 * thickness && height >= 3 && width >= 3) {
      for (i = 1; i <= thickness; i++) {
        for (j = 1; j <= width; j++)
          printf("*");
        printf("\n");
      }
      for (i = 1; i <= (height - 2 * thickness_hold); i++) {
        while (width <= 2 * thickness)
          thickness--;
        for (j = 1; j <= thickness; j++)
          printf("*");
        for (j = 1; j <= (width - 2 * thickness); j++)
          printf(" ");
        for (j = 1; j <= thickness; j++)
          printf("*");
        printf("\n");
      }
      thickness = thickness_hold;
      for (i = 1; i <= thickness; i++) {
        for (j = 1; j <= width; j++)
          printf("*");
        printf("\n");
      }
    } else if (width > 2 * thickness && width >= 3 && height >= 3) {
      while (height <= 2 * thickness)
        thickness--;
      for (i = 1; i <= thickness; i++) {
        for (j = 1; j <= width; j++)
          printf("*");
        printf("\n");
      }
      for (i = 1; i <= (height - 2 * thickness); i++) {
        for (j = 1; j <= thickness_hold; j++)
          printf("*");
        for (j = 1; j <= (width - 2 * thickness_hold); j++)
          printf(" ");
        for (j = 1; j <= thickness_hold; j++)
          printf("*");
        printf("\n");
      }
      for (i = 1; i <= thickness; i++) {
        for (j = 1; j <= width; j++)
          printf("*");
        printf("\n");
      }
    } else {
      printf("It is not possible to draw your rectangle with the specified "
             "thickness.\nThe rectangle without the thickness option is drawn "
             "below:\n");
      for (i = 1; i <= height; i++) {
        for (j = 1; j <= width; j++)
          printf("*");
        printf("\n");
      }
    }
    printf("Do you want to continue? (1 for Yes, 0 for No):");
    scanf("%d", &choice);
    while (choice != 1 && choice != 0) {
      printf("You should enter 1 to continue 0 to exit.\n");
      printf("Do you want to continue? (1 for Yes, 0 for No):");
      scanf("%d", &choice);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     171d <main+0x5fd>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x14,-0xc(%rbp)
mov    %al,-0x21(%rbp)
jg     1175 <main+0x55>
cmpl   $0x1,-0xc(%rbp)
setl   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    1185 <main+0x65>
jmp    11b2 <main+0x92>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
lea    0xe81(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
jmp    115c <main+0x3c>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
lea    0xe60(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x14,-0x10(%rbp)
mov    %al,-0x22(%rbp)
jg     11e7 <main+0xc7>
cmpl   $0x1,-0x10(%rbp)
setl   %al
mov    %al,-0x22(%rbp)
mov    -0x22(%rbp),%al
test   $0x1,%al
jne    11f7 <main+0xd7>
jmp    1224 <main+0x104>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
lea    0xe0f(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
jmp    11ce <main+0xae>
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
lea    0xdee(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x14,-0x14(%rbp)
mov    %al,-0x23(%rbp)
jg     1259 <main+0x139>
cmpl   $0x1,-0x14(%rbp)
setl   %al
mov    %al,-0x23(%rbp)
mov    -0x23(%rbp),%al
test   $0x1,%al
jne    1269 <main+0x149>
jmp    1296 <main+0x176>
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
lea    0xd9d(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
jmp    1240 <main+0x120>
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jle    146c <main+0x34c>
cmpl   $0x3,-0xc(%rbp)
jl     146c <main+0x34c>
cmpl   $0x3,-0x10(%rbp)
jl     146c <main+0x34c>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     131b <main+0x1fb>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1301 <main+0x1e1>
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12db <main+0x1bb>
lea    0xda9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12c8 <main+0x1a8>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    -0x20(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
cmp    %ecx,%eax
jg     1407 <main+0x2e7>
jmp    133d <main+0x21d>
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jg     135c <main+0x23c>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    133d <main+0x21d>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1389 <main+0x269>
lea    0xdb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1363 <main+0x243>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
cmp    %ecx,%eax
jg     13c0 <main+0x2a0>
lea    0xd7c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1390 <main+0x270>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     13ed <main+0x2cd>
lea    0xd4d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13c7 <main+0x2a7>
lea    0xcbd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1322 <main+0x202>
mov    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1467 <main+0x347>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     144d <main+0x32d>
lea    0xced(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1427 <main+0x307>
lea    0xc5d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1414 <main+0x2f4>
jmp    16a6 <main+0x586>
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jle    1636 <main+0x516>
cmpl   $0x3,-0x10(%rbp)
jl     1636 <main+0x516>
cmpl   $0x3,-0xc(%rbp)
jl     1636 <main+0x516>
jmp    1496 <main+0x376>
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jg     14b5 <main+0x395>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1496 <main+0x376>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     150f <main+0x3ef>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     14f5 <main+0x3d5>
lea    0xc45(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    14cf <main+0x3af>
lea    0xbb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    14bc <main+0x39c>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    -0x14(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
cmp    %ecx,%eax
jg     15d7 <main+0x4b7>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     1559 <main+0x439>
lea    0xbe1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1533 <main+0x413>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x10(%rbp),%ecx
mov    -0x20(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
cmp    %ecx,%eax
jg     1590 <main+0x470>
lea    0xbac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1560 <main+0x440>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     15bd <main+0x49d>
lea    0xb7d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1597 <main+0x477>
lea    0xaed(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1516 <main+0x3f6>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1631 <main+0x511>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1617 <main+0x4f7>
lea    0xb23(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    15f1 <main+0x4d1>
lea    0xa93(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    15de <main+0x4be>
jmp    16a1 <main+0x581>
lea    0xaee(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     169c <main+0x57c>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1682 <main+0x562>
lea    0xab8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    165c <main+0x53c>
lea    0xa28(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1649 <main+0x529>
jmp    16a1 <main+0x581>
jmp    16a6 <main+0x586>
lea    0xb02(%rip),%rdi
call   1030 <printf@plt>
lea    0x96c(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0x24(%rbp)
je     16db <main+0x5bb>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x24(%rbp)
mov    -0x24(%rbp),%al
test   $0x1,%al
jne    16eb <main+0x5cb>
jmp    1718 <main+0x5f8>
lea    0xaed(%rip),%rdi
call   1030 <printf@plt>
lea    0xab1(%rip),%rdi
call   1030 <printf@plt>
lea    0x91b(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    16c2 <main+0x5a2>
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    $0x18,%rsp
movl   $0x1,0x14(%rsp)
lea    0xea3(%rip),%rbp
lea    0xec1(%rip),%r14
lea    0x10(%rsp),%rbx
lea    0x105e(%rip),%r15
lea    0xeb1(%rip),%r13
jmp    1194 <main+0x54>
nopl   0x0(%rax)
test   %eax,%eax
lea    0x10(%rsp),%rbx
lea    0xe72(%rip),%rbp
je     1719 <main+0x5d9>
mov    %rbp,%rdi
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    0x10(%rsp),%eax
add    $0xffffffeb,%eax
cmp    $0xffffffeb,%eax
ja     11e7 <main+0xa7>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %rbp,%rdi
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    0x10(%rsp),%eax
add    $0xffffffeb,%eax
cmp    $0xffffffec,%eax
jb     11c0 <main+0x80>
mov    %r13,%rdi
call   1050 <printf@plt>
mov    %r14,%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%eax
add    $0xffffffeb,%eax
cmp    $0xffffffeb,%eax
lea    0xf8c(%rip),%rbp
ja     1247 <main+0x107>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbp,%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%eax
add    $0xffffffeb,%eax
cmp    $0xffffffec,%eax
jb     1220 <main+0xe0>
lea    0xdfe(%rip),%rdi
call   1050 <printf@plt>
mov    %r14,%rdi
lea    0xc(%rsp),%r15
mov    %r15,%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%r13d
lea    -0x15(%r13),%eax
cmp    $0xffffffeb,%eax
lea    0xef0(%rip),%rbp
lea    0xde4(%rip),%rbx
ja     12a9 <main+0x169>
nop
mov    %rbp,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%r13d
lea    -0x15(%r13),%eax
cmp    $0xffffffec,%eax
jb     1280 <main+0x140>
mov    0x10(%rsp),%ecx
lea    0x0(%r13,%r13,1),%r15d
mov    0x8(%rsp),%eax
cmp    %r15d,%ecx
jle    1320 <main+0x1e0>
cmp    $0x3,%ecx
jl     1320 <main+0x1e0>
cmp    $0x3,%eax
jl     1320 <main+0x1e0>
mov    $0x1,%ebx
test   %eax,%eax
jle    12f3 <main+0x1b3>
xchg   %ax,%ax
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jl     12e0 <main+0x1a0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
cmp    %eax,%ebx
jge    13d0 <main+0x290>
add    $0x1,%ebx
mov    0x8(%rsp),%eax
test   %eax,%eax
jg     12d0 <main+0x190>
jmp    12f3 <main+0x1b3>
cs nopw 0x0(%rax,%rax,1)
cmp    %r15d,%eax
jle    1530 <main+0x3f0>
cmp    $0x3,%eax
jl     1530 <main+0x3f0>
cmp    $0x3,%ecx
jl     1530 <main+0x3f0>
cmp    %r15d,%ecx
jg     136a <main+0x22a>
mov    %r15d,%esi
mov    %r13d,%edx
cs nopw 0x0(%rax,%rax,1)
add    $0xffffffff,%edx
add    $0xfffffffe,%esi
cmp    %esi,%ecx
jle    1350 <main+0x210>
mov    %edx,0xc(%rsp)
lea    0x1(%rdx),%esi
cmp    $0x2,%esi
jl     15a9 <main+0x469>
mov    $0x1,%ebx
test   %eax,%eax
jle    13a3 <main+0x263>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jl     1390 <main+0x250>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%edx
cmp    %edx,%ebx
jge    15a5 <main+0x465>
add    $0x1,%ebx
mov    0x8(%rsp),%eax
test   %eax,%eax
jg     1380 <main+0x240>
jmp    13a3 <main+0x263>
cs nopw 0x0(%rax,%rax,1)
cmp    %r15d,0x10(%rsp)
jle    14c0 <main+0x380>
mov    $0x1,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x8(%rsp),%ecx
lea    (%rax,%rax,1),%edx
cmp    %edx,%ecx
jg     140e <main+0x2ce>
nopl   0x0(%rax,%rax,1)
add    $0xffffffff,%eax
add    $0xfffffffe,%edx
cmp    %edx,%ecx
jle    1400 <main+0x2c0>
mov    %eax,0xc(%rsp)
test   %eax,%eax
jle    1439 <main+0x2f9>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
add    $0x1,%ebx
cmp    %eax,%ebx
jl     1420 <main+0x2e0>
mov    0x8(%rsp),%ecx
sub    %eax,%ecx
sub    %eax,%ecx
test   %ecx,%ecx
jle    146d <main+0x32d>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%ecx
mov    0xc(%rsp),%eax
sub    %eax,%ecx
sub    %eax,%ecx
add    $0x1,%ebx
cmp    %ecx,%ebx
jl     1450 <main+0x310>
test   %eax,%eax
jle    1493 <main+0x353>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1480 <main+0x340>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%rsp),%eax
sub    %r15d,%eax
cmp    %eax,%r12d
jge    14c0 <main+0x380>
add    $0x1,%r12d
mov    0xc(%rsp),%eax
jmp    13f0 <main+0x2b0>
cs nopw 0x0(%rax,%rax,1)
mov    %r13d,0xc(%rsp)
mov    $0x1,%ebx
lea    0xcfd(%rip),%r15
lea    0xb50(%rip),%r13
jmp    14f9 <main+0x3b9>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%eax
cmp    0xc(%rsp),%ebx
mov    %eax,%ebx
jge    16b0 <main+0x570>
cmpl   $0x0,0x8(%rsp)
jle    14e0 <main+0x3a0>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jl     1510 <main+0x3d0>
jmp    14e0 <main+0x3a0>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xb82(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x10(%rsp)
lea    0xc86(%rip),%r15
lea    0xad9(%rip),%r13
jle    16b0 <main+0x570>
mov    $0x1,%ebx
jmp    1579 <main+0x439>
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%eax
cmp    0x10(%rsp),%ebx
mov    %eax,%ebx
jge    16b0 <main+0x570>
cmpl   $0x0,0x8(%rsp)
jle    1560 <main+0x420>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jl     1590 <main+0x450>
jmp    1560 <main+0x420>
mov    0x10(%rsp),%ecx
sub    %edx,%ecx
sub    %edx,%ecx
test   %ecx,%ecx
jle    1650 <main+0x510>
mov    $0x1,%ebx
jmp    15df <main+0x49f>
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%eax
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%edx
sub    %edx,%ecx
sub    %edx,%ecx
cmp    %ecx,%ebx
mov    %eax,%ebx
jge    1650 <main+0x510>
mov    %r13d,%ebp
test   %r13d,%r13d
jle    15ff <main+0x4bf>
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    15f0 <main+0x4b0>
cmp    %r15d,0x8(%rsp)
jle    1628 <main+0x4e8>
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%eax
sub    %r15d,%eax
add    $0x1,%ebp
cmp    %eax,%ebp
jl     1610 <main+0x4d0>
mov    %r13d,%ebp
test   %r13d,%r13d
jle    15c0 <main+0x480>
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1630 <main+0x4f0>
jmp    15c0 <main+0x480>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   %edx,%edx
lea    0xb75(%rip),%r15
lea    0x9c8(%rip),%r13
jle    16b0 <main+0x570>
mov    $0x1,%ebx
jmp    1685 <main+0x545>
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%eax
cmp    0xc(%rsp),%ebx
mov    %eax,%ebx
jge    16b0 <main+0x570>
cmpl   $0x0,0x8(%rsp)
jle    1670 <main+0x530>
xor    %ebp,%ebp
xchg   %ax,%ax
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jl     1690 <main+0x550>
jmp    1670 <main+0x530>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x9d2(%rip),%rbx
mov    %rbx,%rdi
call   1050 <printf@plt>
mov    %r14,%rdi
lea    0x14(%rsp),%rbp
mov    %rbp,%rsi
call   1060 <scanf@plt>
mov    0x14(%rsp),%eax
cmp    $0x2,%eax
lea    0xa5f(%rip),%r12
jb     1180 <main+0x40>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1060 <scanf@plt>
mov    0x14(%rsp),%eax
cmp    $0x2,%eax
jae    16f0 <main+0x5b0>
jmp    1180 <main+0x40>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Enter the height for your rectangle:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [52 x i8] c"You should new number between 1 and 20 for height.\0A\00"
@.str.3 = [36 x i8] c"Enter the width for your rectangle:\00"
@.str.4 = [51 x i8] c"You should new number between 1 and 20 for width.\0A\00"
@.str.5 = [21 x i8] c"Enter the thickness:\00"
@.str.6 = [55 x i8] c"You should new number between 1 and 20 for thickness.\0A\00"
@.str.7 = [40 x i8] c"Enter the thickness for your rectangle:\00"
@.str.8 = [2 x i8] c"*\00"
@.str.9 = [2 x i8] c"\0A\00"
@.str.10 = [2 x i8] c" \00"
@.str.11 = [132 x i8] c"It is not possible to draw your rectangle with the specified thickness.\0AThe rectangle without the thickness option is drawn below:\0A\00"
@.str.12 = [48 x i8] c"Do you want to continue? (1 for Yes, 0 for No):\00"
@.str.13 = [43 x i8] c"You should enter 1 to continue 0 to exit.\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 i32
%8 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %9
9: ; preds = %311, %0
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %312
12: ; preds = %9
%13 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
br label %15
15: ; preds = %23, %12
%16 = load i32, i32* %3
%17 = icmp sgt i32 %16, 20
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp slt i32 %19, 1
br label %21
21: ; preds = %18, %15
%22 = phi i1 [ true, %15 ], [ %20, %18 ]
br i1 %22, label %23, label %27
23: ; preds = %21
%24 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
br label %15
27: ; preds = %21
%28 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
br label %30
30: ; preds = %38, %27
%31 = load i32, i32* %4
%32 = icmp sgt i32 %31, 20
br i1 %32, label %36, label %33
33: ; preds = %30
%34 = load i32, i32* %4
%35 = icmp slt i32 %34, 1
br label %36
36: ; preds = %33, %30
%37 = phi i1 [ true, %30 ], [ %35, %33 ]
br i1 %37, label %38, label %42
38: ; preds = %36
%39 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0))
%40 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%41 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
br label %30
42: ; preds = %36
%43 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%44 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
br label %45
45: ; preds = %53, %42
%46 = load i32, i32* %5
%47 = icmp sgt i32 %46, 20
br i1 %47, label %51, label %48
48: ; preds = %45
%49 = load i32, i32* %5
%50 = icmp slt i32 %49, 1
br label %51
51: ; preds = %48, %45
%52 = phi i1 [ true, %45 ], [ %50, %48 ]
br i1 %52, label %53, label %57
53: ; preds = %51
%54 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0))
%55 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0))
%56 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
br label %45
57: ; preds = %51
%58 = load i32, i32* %5
store i32 %58, i32* %8
%59 = load i32, i32* %3
%60 = load i32, i32* %5
%61 = mul nsw i32 2, %60
%62 = icmp sgt i32 %59, %61
br i1 %62, label %63, label %166
63: ; preds = %57
%64 = load i32, i32* %3
%65 = icmp sge i32 %64, 3
br i1 %65, label %66, label %166
66: ; preds = %63
%67 = load i32, i32* %4
%68 = icmp sge i32 %67, 3
br i1 %68, label %69, label %166
69: ; preds = %66
store i32 1, i32* %6
br label %70
70: ; preds = %86, %69
%71 = load i32, i32* %6
%72 = load i32, i32* %5
%73 = icmp sle i32 %71, %72
br i1 %73, label %74, label %89
74: ; preds = %70
store i32 1, i32* %7
br label %75
75: ; preds = %81, %74
%76 = load i32, i32* %7
%77 = load i32, i32* %4
%78 = icmp sle i32 %76, %77
br i1 %78, label %79, label %84
79: ; preds = %75
%80 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %81
81: ; preds = %79
%82 = load i32, i32* %7
%83 = add nsw i32 %82, 1
store i32 %83, i32* %7
br label %75
84: ; preds = %75
%85 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %86
86: ; preds = %84
%87 = load i32, i32* %6
%88 = add nsw i32 %87, 1
store i32 %88, i32* %6
br label %70
89: ; preds = %70
store i32 1, i32* %6
br label %90
90: ; preds = %141, %89
%91 = load i32, i32* %6
%92 = load i32, i32* %3
%93 = load i32, i32* %8
%94 = mul nsw i32 2, %93
%95 = sub nsw i32 %92, %94
%96 = icmp sle i32 %91, %95
br i1 %96, label %97, label %144
97: ; preds = %90
br label %98
98: ; preds = %103, %97
%99 = load i32, i32* %4
%100 = load i32, i32* %5
%101 = mul nsw i32 2, %100
%102 = icmp sle i32 %99, %101
br i1 %102, label %103, label %106
103: ; preds = %98
%104 = load i32, i32* %5
%105 = add nsw i32 %104, -1
store i32 %105, i32* %5
br label %98
106: ; preds = %98
store i32 1, i32* %7
br label %107
107: ; preds = %113, %106
%108 = load i32, i32* %7
%109 = load i32, i32* %5
%110 = icmp sle i32 %108, %109
br i1 %110, label %111, label %116
111: ; preds = %107
%112 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %113
113: ; preds = %111
%114 = load i32, i32* %7
%115 = add nsw i32 %114, 1
store i32 %115, i32* %7
br label %107
116: ; preds = %107
store i32 1, i32* %7
br label %117
117: ; preds = %126, %116
%118 = load i32, i32* %7
%119 = load i32, i32* %4
%120 = load i32, i32* %5
%121 = mul nsw i32 2, %120
%122 = sub nsw i32 %119, %121
%123 = icmp sle i32 %118, %122
br i1 %123, label %124, label %129
124: ; preds = %117
%125 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %126
126: ; preds = %124
%127 = load i32, i32* %7
%128 = add nsw i32 %127, 1
store i32 %128, i32* %7
br label %117
129: ; preds = %117
store i32 1, i32* %7
br label %130
130: ; preds = %136, %129
%131 = load i32, i32* %7
%132 = load i32, i32* %5
%133 = icmp sle i32 %131, %132
br i1 %133, label %134, label %139
134: ; preds = %130
%135 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %136
136: ; preds = %134
%137 = load i32, i32* %7
%138 = add nsw i32 %137, 1
store i32 %138, i32* %7
br label %130
139: ; preds = %130
%140 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %141
141: ; preds = %139
%142 = load i32, i32* %6
%143 = add nsw i32 %142, 1
store i32 %143, i32* %6
br label %90
144: ; preds = %90
%145 = load i32, i32* %8
store i32 %145, i32* %5
store i32 1, i32* %6
br label %146
146: ; preds = %162, %144
%147 = load i32, i32* %6
%148 = load i32, i32* %5
%149 = icmp sle i32 %147, %148
br i1 %149, label %150, label %165
150: ; preds = %146
store i32 1, i32* %7
br label %151
151: ; preds = %157, %150
%152 = load i32, i32* %7
%153 = load i32, i32* %4
%154 = icmp sle i32 %152, %153
br i1 %154, label %155, label %160
155: ; preds = %151
%156 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %157
157: ; preds = %155
%158 = load i32, i32* %7
%159 = add nsw i32 %158, 1
store i32 %159, i32* %7
br label %151
160: ; preds = %151
%161 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %162
162: ; preds = %160
%163 = load i32, i32* %6
%164 = add nsw i32 %163, 1
store i32 %164, i32* %6
br label %146
165: ; preds = %146
br label %296
166: ; preds = %66, %63, %57
%167 = load i32, i32* %4
%168 = load i32, i32* %5
%169 = mul nsw i32 2, %168
%170 = icmp sgt i32 %167, %169
br i1 %170, label %171, label %273
171: ; preds = %166
%172 = load i32, i32* %4
%173 = icmp sge i32 %172, 3
br i1 %173, label %174, label %273
174: ; preds = %171
%175 = load i32, i32* %3
%176 = icmp sge i32 %175, 3
br i1 %176, label %177, label %273
177: ; preds = %174
br label %178
178: ; preds = %183, %177
%179 = load i32, i32* %3
%180 = load i32, i32* %5
%181 = mul nsw i32 2, %180
%182 = icmp sle i32 %179, %181
br i1 %182, label %183, label %186
183: ; preds = %178
%184 = load i32, i32* %5
%185 = add nsw i32 %184, -1
store i32 %185, i32* %5
br label %178
186: ; preds = %178
store i32 1, i32* %6
br label %187
187: ; preds = %203, %186
%188 = load i32, i32* %6
%189 = load i32, i32* %5
%190 = icmp sle i32 %188, %189
br i1 %190, label %191, label %206
191: ; preds = %187
store i32 1, i32* %7
br label %192
192: ; preds = %198, %191
%193 = load i32, i32* %7
%194 = load i32, i32* %4
%195 = icmp sle i32 %193, %194
br i1 %195, label %196, label %201
196: ; preds = %192
%197 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %198
198: ; preds = %196
%199 = load i32, i32* %7
%200 = add nsw i32 %199, 1
store i32 %200, i32* %7
br label %192
201: ; preds = %192
%202 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %203
203: ; preds = %201
%204 = load i32, i32* %6
%205 = add nsw i32 %204, 1
store i32 %205, i32* %6
br label %187
206: ; preds = %187
store i32 1, i32* %6
br label %207
207: ; preds = %249, %206
%208 = load i32, i32* %6
%209 = load i32, i32* %3
%210 = load i32, i32* %5
%211 = mul nsw i32 2, %210
%212 = sub nsw i32 %209, %211
%213 = icmp sle i32 %208, %212
br i1 %213, label %214, label %252
214: ; preds = %207
store i32 1, i32* %7
br label %215
215: ; preds = %221, %214
%216 = load i32, i32* %7
%217 = load i32, i32* %8
%218 = icmp sle i32 %216, %217
br i1 %218, label %219, label %224
219: ; preds = %215
%220 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %221
221: ; preds = %219
%222 = load i32, i32* %7
%223 = add nsw i32 %222, 1
store i32 %223, i32* %7
br label %215
224: ; preds = %215
store i32 1, i32* %7
br label %225
225: ; preds = %234, %224
%226 = load i32, i32* %7
%227 = load i32, i32* %4
%228 = load i32, i32* %8
%229 = mul nsw i32 2, %228
%230 = sub nsw i32 %227, %229
%231 = icmp sle i32 %226, %230
br i1 %231, label %232, label %237
232: ; preds = %225
%233 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %234
234: ; preds = %232
%235 = load i32, i32* %7
%236 = add nsw i32 %235, 1
store i32 %236, i32* %7
br label %225
237: ; preds = %225
store i32 1, i32* %7
br label %238
238: ; preds = %244, %237
%239 = load i32, i32* %7
%240 = load i32, i32* %8
%241 = icmp sle i32 %239, %240
br i1 %241, label %242, label %247
242: ; preds = %238
%243 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %244
244: ; preds = %242
%245 = load i32, i32* %7
%246 = add nsw i32 %245, 1
store i32 %246, i32* %7
br label %238
247: ; preds = %238
%248 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %249
249: ; preds = %247
%250 = load i32, i32* %6
%251 = add nsw i32 %250, 1
store i32 %251, i32* %6
br label %207
252: ; preds = %207
store i32 1, i32* %6
br label %253
253: ; preds = %269, %252
%254 = load i32, i32* %6
%255 = load i32, i32* %5
%256 = icmp sle i32 %254, %255
br i1 %256, label %257, label %272
257: ; preds = %253
store i32 1, i32* %7
br label %258
258: ; preds = %264, %257
%259 = load i32, i32* %7
%260 = load i32, i32* %4
%261 = icmp sle i32 %259, %260
br i1 %261, label %262, label %267
262: ; preds = %258
%263 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %264
264: ; preds = %262
%265 = load i32, i32* %7
%266 = add nsw i32 %265, 1
store i32 %266, i32* %7
br label %258
267: ; preds = %258
%268 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %269
269: ; preds = %267
%270 = load i32, i32* %6
%271 = add nsw i32 %270, 1
store i32 %271, i32* %6
br label %253
272: ; preds = %253
br label %295
273: ; preds = %174, %171, %166
%274 = call i32 @printf(i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str.11, i64 0, i64 0))
store i32 1, i32* %6
br label %275
275: ; preds = %291, %273
%276 = load i32, i32* %6
%277 = load i32, i32* %3
%278 = icmp sle i32 %276, %277
br i1 %278, label %279, label %294
279: ; preds = %275
store i32 1, i32* %7
br label %280
280: ; preds = %286, %279
%281 = load i32, i32* %7
%282 = load i32, i32* %4
%283 = icmp sle i32 %281, %282
br i1 %283, label %284, label %289
284: ; preds = %280
%285 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %286
286: ; preds = %284
%287 = load i32, i32* %7
%288 = add nsw i32 %287, 1
store i32 %288, i32* %7
br label %280
289: ; preds = %280
%290 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %291
291: ; preds = %289
%292 = load i32, i32* %6
%293 = add nsw i32 %292, 1
store i32 %293, i32* %6
br label %275
294: ; preds = %275
br label %295
295: ; preds = %294, %272
br label %296
296: ; preds = %295, %165
%297 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0))
%298 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %299
299: ; preds = %307, %296
%300 = load i32, i32* %2
%301 = icmp ne i32 %300, 1
br i1 %301, label %302, label %305
302: ; preds = %299
%303 = load i32, i32* %2
%304 = icmp ne i32 %303, 0
br label %305
305: ; preds = %302, %299
%306 = phi i1 [ false, %299 ], [ %304, %302 ]
br i1 %306, label %307, label %311
307: ; preds = %305
%308 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.13, i64 0, i64 0))
%309 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0))
%310 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %299
311: ; preds = %305
br label %9
312: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"Enter the height for your rectangle:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [36 x i8] c"Enter the width for your rectangle:\00"
@.str.5 = [21 x i8] c"Enter the thickness:\00"
@.str.7 = [40 x i8] c"Enter the thickness for your rectangle:\00"
@.str.12 = [48 x i8] c"Do you want to continue? (1 for Yes, 0 for No):\00"
@str = [131 x i8] c"It is not possible to draw your rectangle with the specified thickness.\0AThe rectangle without the thickness option is drawn below:\00"
@str.14 = [42 x i8] c"You should enter 1 to continue 0 to exit.\00"
@str.15 = [54 x i8] c"You should new number between 1 and 20 for thickness.\00"
@str.16 = [50 x i8] c"You should new number between 1 and 20 for width.\00"
@str.17 = [51 x i8] c"You should new number between 1 and 20 for height.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
br label %12
9: ; preds = %265, %260
%10 = phi i32 [ %263, %260 ], [ %269, %265 ]
%11 = icmp eq i32 %10, 0
br i1 %11, label %271, label %12
12: ; preds = %0, %9
%13 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%15 = load i32, i32* %2
%16 = add i32 %15, -21
%17 = icmp ult i32 %16, -20
br i1 %17, label %18, label %25
18: ; preds = %12, %18
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.17, i64 0, i64 0))
%20 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%22 = load i32, i32* %2
%23 = add i32 %22, -21
%24 = icmp ult i32 %23, -20
br i1 %24, label %18, label %25
25: ; preds = %18, %12
%26 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%28 = load i32, i32* %3
%29 = add i32 %28, -21
%30 = icmp ult i32 %29, -20
br i1 %30, label %31, label %38
31: ; preds = %25, %31
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.16, i64 0, i64 0))
%33 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%35 = load i32, i32* %3
%36 = add i32 %35, -21
%37 = icmp ult i32 %36, -20
br i1 %37, label %31, label %38
38: ; preds = %31, %25
%39 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%40 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%41 = load i32, i32* %4
%42 = add i32 %41, -21
%43 = icmp ult i32 %42, -20
br i1 %43, label %44, label %51
44: ; preds = %38, %44
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.15, i64 0, i64 0))
%46 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0))
%47 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%48 = load i32, i32* %4
%49 = add i32 %48, -21
%50 = icmp ult i32 %49, -20
br i1 %50, label %44, label %51
51: ; preds = %44, %38
%52 = phi i32 [ %41, %38 ], [ %48, %44 ]
%53 = load i32, i32* %2
%54 = shl nuw nsw i32 %52, 1
%55 = icmp sgt i32 %53, %54
%56 = icmp sgt i32 %53, 2
%57 = and i1 %55, %56
%58 = load i32, i32* %3
%59 = icmp sgt i32 %58, 2
%60 = select i1 %57, i1 %59, i1 false
br i1 %60, label %64, label %152
61: ; preds = %74
%62 = load i32, i32* %2
%63 = icmp sgt i32 %62, %54
br i1 %63, label %81, label %136
64: ; preds = %51, %78
%65 = phi i32 [ %80, %78 ], [ %58, %51 ]
%66 = phi i32 [ %79, %78 ], [ 1, %51 ]
%67 = icmp slt i32 %65, 1
br i1 %67, label %74, label %68
68: ; preds = %64, %68
%69 = phi i32 [ %71, %68 ], [ 1, %64 ]
%70 = call i32 @putchar(i32 42)
%71 = add nuw nsw i32 %69, 1
%72 = load i32, i32* %3
%73 = icmp slt i32 %69, %72
br i1 %73, label %68, label %74
74: ; preds = %68, %64
%75 = call i32 @putchar(i32 10)
%76 = load i32, i32* %4
%77 = icmp slt i32 %66, %76
br i1 %77, label %78, label %61
78: ; preds = %74
%79 = add nuw nsw i32 %66, 1
%80 = load i32, i32* %3
br label %64
81: ; preds = %61, %133
%82 = phi i32 [ %135, %133 ], [ %76, %61 ]
%83 = phi i32 [ %134, %133 ], [ 1, %61 ]
%84 = load i32, i32* %3
%85 = shl nsw i32 %82, 1
%86 = icmp sgt i32 %84, %85
br i1 %86, label %88, label %91
87: ; preds = %91
store i32 %93, i32* %4
br label %88
88: ; preds = %87, %81
%89 = phi i32 [ %93, %87 ], [ %82, %81 ]
%90 = icmp slt i32 %89, 1
br i1 %90, label %98, label %104
91: ; preds = %81, %91
%92 = phi i32 [ %93, %91 ], [ %82, %81 ]
%93 = add nsw i32 %92, -1
%94 = shl nsw i32 %93, 1
%95 = icmp sgt i32 %84, %94
br i1 %95, label %87, label %91
96: ; preds = %104
%97 = load i32, i32* %3
br label %98
98: ; preds = %96, %88
%99 = phi i32 [ %108, %96 ], [ %89, %88 ]
%100 = phi i32 [ %97, %96 ], [ %84, %88 ]
%101 = mul i32 %99, -2
%102 = add i32 %101, %100
%103 = icmp slt i32 %102, 1
br i1 %103, label %110, label %113
104: ; preds = %88, %104
%105 = phi i32 [ %107, %104 ], [ 1, %88 ]
%106 = call i32 @putchar(i32 42)
%107 = add nuw nsw i32 %105, 1
%108 = load i32, i32* %4
%109 = icmp slt i32 %105, %108
br i1 %109, label %104, label %96
110: ; preds = %113, %98
%111 = phi i32 [ %99, %98 ], [ %118, %113 ]
%112 = icmp slt i32 %111, 1
br i1 %112, label %128, label %122
113: ; preds = %98, %113
%114 = phi i32 [ %116, %113 ], [ 1, %98 ]
%115 = call i32 @putchar(i32 32)
%116 = add nuw nsw i32 %114, 1
%117 = load i32, i32* %3
%118 = load i32, i32* %4
%119 = mul i32 %118, -2
%120 = add i32 %119, %117
%121 = icmp slt i32 %114, %120
br i1 %121, label %113, label %110
122: ; preds = %110, %122
%123 = phi i32 [ %125, %122 ], [ 1, %110 ]
%124 = call i32 @putchar(i32 42)
%125 = add nuw nsw i32 %123, 1
%126 = load i32, i32* %4
%127 = icmp slt i32 %123, %126
br i1 %127, label %122, label %128
128: ; preds = %122, %110
%129 = call i32 @putchar(i32 10)
%130 = load i32, i32* %2
%131 = sub nsw i32 %130, %54
%132 = icmp slt i32 %83, %131
br i1 %132, label %133, label %136
133: ; preds = %128
%134 = add nuw nsw i32 %83, 1
%135 = load i32, i32* %4
br label %81
136: ; preds = %128, %61
store i32 %52, i32* %4
br label %137
137: ; preds = %136, %147
%138 = phi i32 [ %149, %147 ], [ 1, %136 ]
%139 = load i32, i32* %3
%140 = icmp slt i32 %139, 1
br i1 %140, label %147, label %141
141: ; preds = %137, %141
%142 = phi i32 [ %144, %141 ], [ 1, %137 ]
%143 = call i32 @putchar(i32 42)
%144 = add nuw nsw i32 %142, 1
%145 = load i32, i32* %3
%146 = icmp slt i32 %142, %145
br i1 %146, label %141, label %147
147: ; preds = %141, %137
%148 = call i32 @putchar(i32 10)
%149 = add nuw nsw i32 %138, 1
%150 = load i32, i32* %4
%151 = icmp slt i32 %138, %150
br i1 %151, label %137, label %260
152: ; preds = %51
%153 = icmp sgt i32 %58, %54
%154 = and i1 %153, %59
%155 = select i1 %154, i1 %56, i1 false
br i1 %155, label %156, label %241
156: ; preds = %152
br i1 %55, label %159, label %160
157: ; preds = %160
store i32 %162, i32* %4
%158 = icmp slt i32 %161, 2
br i1 %158, label %167, label %159
159: ; preds = %156, %157
br label %175
160: ; preds = %156, %160
%161 = phi i32 [ %162, %160 ], [ %52, %156 ]
%162 = add nsw i32 %161, -1
%163 = shl nsw i32 %162, 1
%164 = icmp sgt i32 %53, %163
br i1 %164, label %157, label %160
165: ; preds = %185
%166 = load i32, i32* %2
br label %167
167: ; preds = %165, %157
%168 = phi i32 [ %187, %165 ], [ %162, %157 ]
%169 = phi i32 [ %166, %165 ], [ %53, %157 ]
%170 = mul i32 %168, -2
%171 = add i32 %170, %169
%172 = icmp slt i32 %171, 1
br i1 %172, label %192, label %173
173: ; preds = %167
%174 = icmp slt i32 %52, 1
br label %195
175: ; preds = %159, %189
%176 = phi i32 [ %191, %189 ], [ %58, %159 ]
%177 = phi i32 [ %190, %189 ], [ 1, %159 ]
%178 = icmp slt i32 %176, 1
br i1 %178, label %185, label %179
179: ; preds = %175, %179
%180 = phi i32 [ %182, %179 ], [ 1, %175 ]
%181 = call i32 @putchar(i32 42)
%182 = add nuw nsw i32 %180, 1
%183 = load i32, i32* %3
%184 = icmp slt i32 %180, %183
br i1 %184, label %179, label %185
185: ; preds = %179, %175
%186 = call i32 @putchar(i32 10)
%187 = load i32, i32* %4
%188 = icmp slt i32 %177, %187
br i1 %188, label %189, label %165
189: ; preds = %185
%190 = add nuw nsw i32 %177, 1
%191 = load i32, i32* %3
br label %175
192: ; preds = %218, %167
%193 = phi i32 [ %168, %167 ], [ %222, %218 ]
%194 = icmp slt i32 %193, 1
br i1 %194, label %260, label %226
195: ; preds = %173, %218
%196 = phi i32 [ 1, %173 ], [ %220, %218 ]
br i1 %174, label %197, label %200
197: ; preds = %200, %195
%198 = load i32, i32* %3
%199 = icmp sgt i32 %198, %54
br i1 %199, label %206, label %205
200: ; preds = %195, %200
%201 = phi i32 [ %203, %200 ], [ 1, %195 ]
%202 = call i32 @putchar(i32 42)
%203 = add nuw i32 %201, 1
%204 = icmp eq i32 %201, %52
br i1 %204, label %197, label %200
205: ; preds = %206, %197
br i1 %174, label %218, label %213
206: ; preds = %197, %206
%207 = phi i32 [ %209, %206 ], [ 1, %197 ]
%208 = call i32 @putchar(i32 32)
%209 = add nuw nsw i32 %207, 1
%210 = load i32, i32* %3
%211 = sub nsw i32 %210, %54
%212 = icmp slt i32 %207, %211
br i1 %212, label %206, label %205
213: ; preds = %205, %213
%214 = phi i32 [ %216, %213 ], [ 1, %205 ]
%215 = call i32 @putchar(i32 42)
%216 = add nuw i32 %214, 1
%217 = icmp eq i32 %214, %52
br i1 %217, label %218, label %213
218: ; preds = %213, %205
%219 = call i32 @putchar(i32 10)
%220 = add nuw nsw i32 %196, 1
%221 = load i32, i32* %2
%222 = load i32, i32* %4
%223 = mul i32 %222, -2
%224 = add i32 %223, %221
%225 = icmp slt i32 %196, %224
br i1 %225, label %195, label %192
226: ; preds = %192, %236
%227 = phi i32 [ %238, %236 ], [ 1, %192 ]
%228 = load i32, i32* %3
%229 = icmp slt i32 %228, 1
br i1 %229, label %236, label %230
230: ; preds = %226, %230
%231 = phi i32 [ %233, %230 ], [ 1, %226 ]
%232 = call i32 @putchar(i32 42)
%233 = add nuw nsw i32 %231, 1
%234 = load i32, i32* %3
%235 = icmp slt i32 %231, %234
br i1 %235, label %230, label %236
236: ; preds = %230, %226
%237 = call i32 @putchar(i32 10)
%238 = add nuw nsw i32 %227, 1
%239 = load i32, i32* %4
%240 = icmp slt i32 %227, %239
br i1 %240, label %226, label %260
241: ; preds = %152
%242 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([131 x i8], [131 x i8]* @str, i64 0, i64 0))
%243 = load i32, i32* %2
%244 = icmp slt i32 %243, 1
br i1 %244, label %260, label %245
245: ; preds = %241, %255
%246 = phi i32 [ %257, %255 ], [ 1, %241 ]
%247 = load i32, i32* %3
%248 = icmp slt i32 %247, 1
br i1 %248, label %255, label %249
249: ; preds = %245, %249
%250 = phi i32 [ %252, %249 ], [ 1, %245 ]
%251 = call i32 @putchar(i32 42)
%252 = add nuw nsw i32 %250, 1
%253 = load i32, i32* %3
%254 = icmp slt i32 %250, %253
br i1 %254, label %249, label %255
255: ; preds = %249, %245
%256 = call i32 @putchar(i32 10)
%257 = add nuw nsw i32 %246, 1
%258 = load i32, i32* %2
%259 = icmp slt i32 %246, %258
br i1 %259, label %245, label %260
260: ; preds = %255, %236, %147, %241, %192
%261 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0))
%262 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%263 = load i32, i32* %1
%264 = icmp ult i32 %263, 2
br i1 %264, label %9, label %265
265: ; preds = %260, %265
%266 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.14, i64 0, i64 0))
%267 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0))
%268 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%269 = load i32, i32* %1
%270 = icmp ult i32 %269, 2
br i1 %270, label %9, label %265
271: ; preds = %9
ret i32 0
}