#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, height, width, thickness, new_thickness, i, j;
  do {
    printf("Enter the height for your rectangle: ");
    scanf("%d", &height);
    printf("Enter the width for your rectangle: ");
    scanf("%d", &width);
    printf("Enter the thickness: ");
    scanf("%d", &thickness);
    if (height <= 2 * thickness && width <= 2 * thickness) {
      printf("It is not possible to draw your rectangle with the specified "
             "thickness. The rectangle without the thickness option is drawn "
             "below:\n");
      for (i = 0; i < height; i++) {
        for (j = 0; j < width; j++) {
          printf("*");
        }
        printf("\n");
      }
    } else if (height > 2 * thickness && width <= 2 * thickness) {
      new_thickness = thickness;
      for (i = 0; i < thickness; i++) {
        for (j = 0; j < width; j++) {
          printf("*");
        }
        printf("\n");
      }
      while (new_thickness--) {
        if (width > 2 * new_thickness) {
          for (i = 0; i < (height - 2 * thickness); i++) {
            for (j = 0; j < new_thickness; j++) {
              printf("*");
            }
            for (j = 0; j < (width - 2 * new_thickness); j++) {
              printf(" ");
            }
            for (j = 0; j < new_thickness; j++) {
              printf("*");
            }
            printf("\n");
          }
          break;
        } else
          continue;
      }
      for (i = 0; i < thickness; i++) {
        for (j = 0; j < width; j++) {
          printf("*");
        }
        printf("\n");
      }
    } else if (height <= 2 * thickness && width > 2 * thickness) {
      new_thickness = thickness;
      while (new_thickness--) {
        if (height > 2 * new_thickness) {
          for (i = 0; i < new_thickness; i++) {
            for (j = 0; j < width; j++) {
              printf("*");
            }
            printf("\n");
          }
          for (i = 0; i < height - 2 * new_thickness; i++) {
            for (j = 0; j < thickness; j++) {
              printf("*");
            }
            for (j = 0; j < width - 2 * thickness; j++) {
              printf(" ");
            }
            for (j = 0; j < thickness; j++) {
              printf("*");
            }
            printf("\n");
          }
          for (i = 0; i < new_thickness; i++) {
            for (j = 0; j < width; j++) {
              printf("*");
            }
            printf("\n");
          }
          break;
        } else
          continue;
      }
    } else {
      for (i = 0; i < thickness; i++) {
        for (j = 0; j < width; j++) {
          printf("*");
        }
        printf("\n");
      }
      for (i = 0; i < (height - 2 * thickness); i++) {
        for (j = 0; j < thickness; j++) {
          printf("*");
        }
        for (j = 0; j < (width - 2 * thickness); j++) {
          printf(" ");
        }
        for (j = 0; j < thickness; j++) {
          printf("*");
        }
        printf("\n");
      }
      for (i = 0; i < thickness; i++) {
        for (j = 0; j < width; j++) {
          printf("*");
        }
        printf("\n");
      }
    }
    printf("Do you want to continue?(1 for Yes, 0 for No): ");
    scanf("%d", &choice);
    if (choice == 0)
      break;
  } while (choice == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xee0(%rip),%rdi
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jg     1210 <main+0xf0>
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jg     1210 <main+0xf0>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    120b <main+0xeb>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11f1 <main+0xd1>
lea    0xf0a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11cb <main+0xab>
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11b8 <main+0x98>
jmp    1750 <main+0x630>
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jle    13ed <main+0x2cd>
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jg     13ed <main+0x2cd>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1292 <main+0x172>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1278 <main+0x158>
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1252 <main+0x132>
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    123f <main+0x11f>
jmp    1297 <main+0x177>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     138e <main+0x26e>
mov    -0x10(%rbp),%eax
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jle    1389 <main+0x269>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    -0x14(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
cmp    %ecx,%eax
jge    1384 <main+0x264>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1306 <main+0x1e6>
lea    0xdf5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12e0 <main+0x1c0>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
cmp    %ecx,%eax
jge    133d <main+0x21d>
lea    0xdee(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    130d <main+0x1ed>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    136a <main+0x24a>
lea    0xd91(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1344 <main+0x224>
lea    0xd75(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12c3 <main+0x1a3>
jmp    138e <main+0x26e>
jmp    1297 <main+0x177>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13e8 <main+0x2c8>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    13ce <main+0x2ae>
lea    0xd2d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    13a8 <main+0x288>
lea    0xd11(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1395 <main+0x275>
jmp    174b <main+0x62b>
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jg     15c5 <main+0x4a5>
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jle    15c5 <main+0x4a5>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     15c0 <main+0x4a0>
mov    -0xc(%rbp),%eax
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jle    15bb <main+0x49b>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1494 <main+0x374>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    147a <main+0x35a>
lea    0xc81(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1454 <main+0x334>
lea    0xc65(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1441 <main+0x321>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
cmp    %ecx,%eax
jge    155c <main+0x43c>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14de <main+0x3be>
lea    0xc1d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    14b8 <main+0x398>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
cmp    %ecx,%eax
jge    1515 <main+0x3f5>
lea    0xc16(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    14e5 <main+0x3c5>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1542 <main+0x422>
lea    0xbb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    151c <main+0x3fc>
lea    0xb9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    149b <main+0x37b>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    15b6 <main+0x496>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    159c <main+0x47c>
lea    0xb5f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1576 <main+0x456>
lea    0xb43(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1563 <main+0x443>
jmp    15c0 <main+0x4a0>
jmp    1415 <main+0x2f5>
jmp    1746 <main+0x626>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    161f <main+0x4ff>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1605 <main+0x4e5>
lea    0xaf6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    15df <main+0x4bf>
lea    0xada(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    15cc <main+0x4ac>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    -0x14(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
cmp    %ecx,%eax
jge    16e7 <main+0x5c7>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1669 <main+0x549>
lea    0xa92(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1643 <main+0x523>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
cmp    %ecx,%eax
jge    16a0 <main+0x580>
lea    0xa8b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1670 <main+0x550>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    16cd <main+0x5ad>
lea    0xa2e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    16a7 <main+0x587>
lea    0xa12(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1626 <main+0x506>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1741 <main+0x621>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1727 <main+0x607>
lea    0x9d4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1701 <main+0x5e1>
lea    0x9b8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    16ee <main+0x5ce>
jmp    1746 <main+0x626>
jmp    174b <main+0x62b>
jmp    1750 <main+0x630>
lea    0x993(%rip),%rdi
call   1030 <printf@plt>
lea    0x8c3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    177b <main+0x65b>
jmp    178a <main+0x66a>
jmp    1780 <main+0x660>
cmpl   $0x1,-0x8(%rbp)
je     112f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeab(%rip),%r14
lea    0xeca(%rip),%r12
jmp    1184 <main+0x44>
xchg   %ax,%ax
lea    0xefd(%rip),%rdi
call   1050 <printf@plt>
mov    %r12,%rdi
lea    0x14(%rsp),%rsi
call   1060 <scanf@plt>
cmpl   $0x1,0x14(%rsp)
jne    1745 <main+0x605>
mov    %r14,%rdi
call   1050 <printf@plt>
mov    %r12,%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
lea    0xe89(%rip),%rdi
call   1050 <printf@plt>
mov    %r12,%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
lea    0xe95(%rip),%rdi
call   1050 <printf@plt>
mov    %r12,%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%r13d
lea    0x0(%r13,%r13,1),%r15d
mov    0x4(%rsp),%eax
cmp    %r15d,%ecx
jg     1250 <main+0x110>
cmp    %r15d,%eax
jg     1250 <main+0x110>
lea    0xea6(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0xc(%rsp)
jle    1160 <main+0x20>
xor    %ebx,%ebx
jmp    1227 <main+0xe7>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jge    1160 <main+0x20>
cmpl   $0x0,0x4(%rsp)
jle    1210 <main+0xd0>
xor    %ebp,%ebp
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     1230 <main+0xf0>
jmp    1210 <main+0xd0>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %r15d,%ecx
jle    12c0 <main+0x180>
cmp    %r15d,%eax
jg     12c0 <main+0x180>
test   %r13d,%r13d
jle    13a8 <main+0x268>
xor    %ebx,%ebx
jmp    128d <main+0x14d>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    0x8(%rsp),%ecx
mov    0x4(%rsp),%eax
cmp    %ecx,%ebx
jge    13ab <main+0x26b>
test   %eax,%eax
jle    1270 <main+0x130>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     12a0 <main+0x160>
jmp    1270 <main+0x130>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %r15d,%ecx
jg     1343 <main+0x203>
cmp    %r15d,%eax
jle    1343 <main+0x203>
xor    %edx,%edx
nopl   0x0(%rax)
cmp    %edx,%r13d
je     1160 <main+0x20>
add    $0x1,%edx
add    $0xfffffffe,%r15d
cmp    %r15d,%ecx
jle    12d0 <main+0x190>
sub    %edx,%r13d
lea    0x1(%r13),%r14d
cmp    $0x2,%r14d
jl     1629 <main+0x4e9>
xor    %ebx,%ebx
test   %eax,%eax
jle    1323 <main+0x1e3>
nopl   0x0(%rax)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     1310 <main+0x1d0>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    %ebx,%r13d
je     1625 <main+0x4e5>
mov    0x4(%rsp),%eax
test   %eax,%eax
jg     1300 <main+0x1c0>
jmp    1323 <main+0x1e3>
test   %r13d,%r13d
jle    1519 <main+0x3d9>
xor    %ebx,%ebx
test   %eax,%eax
jle    1383 <main+0x243>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     1370 <main+0x230>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    0x8(%rsp),%r13d
cmp    %r13d,%ebx
jge    1515 <main+0x3d5>
mov    0x4(%rsp),%eax
test   %eax,%eax
jg     1360 <main+0x220>
jmp    1383 <main+0x243>
mov    %r13d,%ecx
lea    0x0(%r13,%r13,1),%r12d
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    %edx,%r13d
je     14c0 <main+0x380>
mov    %edx,%r14d
lea    0x1(%r14),%edx
add    $0xfffffffe,%r12d
cmp    %r12d,%eax
jle    13c0 <main+0x280>
mov    0xc(%rsp),%eax
sub    %ecx,%eax
sub    %ecx,%eax
test   %eax,%eax
jle    14c0 <main+0x380>
mov    %r13d,%r15d
sub    %edx,%r15d
add    $0x1,%r15d
mov    %r12d,%ebp
neg    %ebp
not    %r14d
add    %r13d,%r14d
cmp    $0x2,%r14d
mov    $0x1,%eax
cmovl  %eax,%r14d
xor    %r13d,%r13d
mov    %r15d,0x10(%rsp)
jmp    1443 <main+0x303>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r13d
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
sub    %ecx,%eax
sub    %ecx,%eax
cmp    %eax,%r13d
jge    14c0 <main+0x380>
mov    %r14d,%ebx
cmp    $0x2,%r15d
jl     145f <main+0x31f>
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1450 <main+0x310>
cmp    %r12d,0x4(%rsp)
jle    1489 <main+0x349>
xor    %r15d,%r15d
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%r15d
mov    0x4(%rsp),%eax
add    %ebp,%eax
cmp    %eax,%r15d
jl     1470 <main+0x330>
mov    %r14d,%ebx
mov    0x10(%rsp),%r15d
cmp    $0x2,%r15d
jl     1420 <main+0x2e0>
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    14a0 <main+0x360>
jmp    1420 <main+0x2e0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   %ecx,%ecx
lea    0xb37(%rip),%r14
lea    0xb56(%rip),%r12
jle    1160 <main+0x20>
xor    %ebx,%ebx
jmp    14f7 <main+0x3b7>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x8(%rsp),%ebx
jge    1160 <main+0x20>
cmpl   $0x0,0x4(%rsp)
jle    14e0 <main+0x3a0>
xor    %ebp,%ebp
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     1500 <main+0x3c0>
jmp    14e0 <main+0x3a0>
mov    0xc(%rsp),%ecx
sub    %r13d,%ecx
sub    %r13d,%ecx
test   %ecx,%ecx
jle    15d8 <main+0x498>
xor    %ebx,%ebx
jmp    1554 <main+0x414>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%r13d
sub    %r13d,%eax
sub    %r13d,%eax
cmp    %eax,%ebx
jge    15d8 <main+0x498>
test   %r13d,%r13d
jle    1577 <main+0x437>
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
mov    0x8(%rsp),%r13d
cmp    %r13d,%ebp
jl     1560 <main+0x420>
mov    0x4(%rsp),%eax
sub    %r13d,%eax
sub    %r13d,%eax
test   %eax,%eax
jle    15b0 <main+0x470>
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
mov    0x4(%rsp),%eax
mov    0x8(%rsp),%r13d
sub    %r13d,%eax
sub    %r13d,%eax
cmp    %eax,%ebp
jl     1590 <main+0x450>
test   %r13d,%r13d
jle    1530 <main+0x3f0>
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jl     15c0 <main+0x480>
jmp    1530 <main+0x3f0>
test   %r13d,%r13d
jle    1160 <main+0x20>
xor    %ebx,%ebx
jmp    1607 <main+0x4c7>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x8(%rsp),%ebx
jge    1160 <main+0x20>
cmpl   $0x0,0x4(%rsp)
jle    15f0 <main+0x4b0>
xor    %ebp,%ebp
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     1610 <main+0x4d0>
jmp    15f0 <main+0x4b0>
mov    0xc(%rsp),%ecx
cmp    %r15d,%ecx
jle    16e8 <main+0x5a8>
neg    %r15d
xor    %r12d,%r12d
jmp    165e <main+0x51e>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r12d
mov    0xc(%rsp),%eax
add    %r15d,%eax
cmp    %eax,%r12d
jge    16e8 <main+0x5a8>
mov    0x8(%rsp),%eax
test   %eax,%eax
jle    1685 <main+0x545>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    0x8(%rsp),%eax
cmp    %eax,%ebx
jl     1670 <main+0x530>
mov    0x4(%rsp),%ecx
sub    %eax,%ecx
sub    %eax,%ecx
test   %ecx,%ecx
jle    16bd <main+0x57d>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
sub    %eax,%ecx
sub    %eax,%ecx
cmp    %ecx,%ebx
jl     16a0 <main+0x560>
test   %eax,%eax
jle    1640 <main+0x500>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x8(%rsp),%ebx
jl     16d0 <main+0x590>
jmp    1640 <main+0x500>
cmp    $0x2,%r14d
lea    0x90d(%rip),%r14
lea    0x92c(%rip),%r12
jl     1160 <main+0x20>
xor    %ebx,%ebx
jmp    1726 <main+0x5e6>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    %ebx,%r13d
je     1160 <main+0x20>
cmpl   $0x0,0x4(%rsp)
jle    1710 <main+0x5d0>
xor    %ebp,%ebp
nop
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     1730 <main+0x5f0>
jmp    1710 <main+0x5d0>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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