#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 *);
void draw(int l, int c) {
  for (int m = 0; m < l; ++m) {
    for (int i = 0; i < c; ++i) {
      printf("***");
    }
    printf("*\n");
    for (int i = 0; i < 2; ++i) {
      for (int n = 0; n < c; ++n) {
        printf("*..");
      }
      printf("*\n");
    }
  }
  for (int i = 0; i < c; ++i) {
    printf("***");
  }
  printf("*\n\n");
}


x86 assembly (clang, -O0):
<draw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11d5 <draw+0xc5>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115e <draw+0x4e>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1138 <draw+0x28>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    11c2 <draw+0xb2>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11a8 <draw+0x98>
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1182 <draw+0x72>
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1171 <draw+0x61>
jmp    11c7 <draw+0xb7>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <draw+0x15>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1202 <draw+0xf2>
lea    0xe11(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11dc <draw+0xcc>
lea    0xe02(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,0x4(%rsp)
test   %edi,%edi
jle    1202 <draw+0xe2>
xor    %r13d,%r13d
lea    0xebc(%rip),%r15
lea    0xeb7(%rip),%r12
lea    0xeb2(%rip),%rbx
jmp    1186 <draw+0x66>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%r12
mov    %rbp,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
add    $0x1,%r13d
cmp    0x4(%rsp),%r13d
je     1202 <draw+0xe2>
mov    %r12,%rbp
mov    %r14d,%r12d
test   %r14d,%r14d
jle    1160 <draw+0x40>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%r12d
jne    11a0 <draw+0x80>
mov    %rbp,%r12
mov    %rbp,%rdi
call   1030 <puts@plt>
mov    %r14d,%ebp
test   %r14d,%r14d
jle    116b <draw+0x4b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    11d0 <draw+0xb0>
mov    %r12,%rdi
call   1030 <puts@plt>
test   %r14d,%r14d
jle    1173 <draw+0x53>
mov    %r14d,%ebp
nopl   (%rax)
mov    %rbx,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    11f0 <draw+0xd0>
jmp    1173 <draw+0x53>
test   %r14d,%r14d
jle    121e <draw+0xfe>
lea    0xdf2(%rip),%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%r14d
jne    1210 <draw+0xf0>
lea    0xde3(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"***\00"
@.str.1 = [3 x i8] c"*\0A\00"
@.str.2 = [4 x i8] c"*..\00"
@.str.3 = [4 x i8] c"*\0A\0A\00"
define void @draw(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %10
10: ; preds = %45, %2
%11 = load i32, i32* %5
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %48
14: ; preds = %10
store i32 0, i32* %6
br label %15
15: ; preds = %21, %14
%16 = load i32, i32* %6
%17 = load i32, i32* %4
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %24
19: ; preds = %15
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %19
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
br label %15
24: ; preds = %15
%25 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %7
br label %26
26: ; preds = %41, %24
%27 = load i32, i32* %7
%28 = icmp slt i32 %27, 2
br i1 %28, label %29, label %44
29: ; preds = %26
store i32 0, i32* %8
br label %30
30: ; preds = %36, %29
%31 = load i32, i32* %8
%32 = load i32, i32* %4
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %39
34: ; preds = %30
%35 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %36
36: ; preds = %34
%37 = load i32, i32* %8
%38 = add nsw i32 %37, 1
store i32 %38, i32* %8
br label %30
39: ; preds = %30
%40 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %41
41: ; preds = %39
%42 = load i32, i32* %7
%43 = add nsw i32 %42, 1
store i32 %43, i32* %7
br label %26
44: ; preds = %26
br label %45
45: ; preds = %44
%46 = load i32, i32* %5
%47 = add nsw i32 %46, 1
store i32 %47, i32* %5
br label %10
48: ; preds = %10
store i32 0, i32* %9
br label %49
49: ; preds = %55, %48
%50 = load i32, i32* %9
%51 = load i32, i32* %4
%52 = icmp slt i32 %50, %51
br i1 %52, label %53, label %58
53: ; preds = %49
%54 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %55
55: ; preds = %53
%56 = load i32, i32* %9
%57 = add nsw i32 %56, 1
store i32 %57, i32* %9
br label %49
58: ; preds = %49
%59 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"***\00"
@.str.2 = [4 x i8] c"*..\00"
@str = [3 x i8] c"*\0A\00"
@str.5 = [2 x i8] c"*\00"
define void @draw(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = icmp sgt i32 %1, 0
br label %6
6: ; preds = %4, %28
%7 = phi i32 [ 0, %4 ], [ %30, %28 ]
br i1 %5, label %14, label %8
8: ; preds = %6
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
br label %19
10: ; preds = %28, %2
%11 = icmp sgt i32 %1, 0
br i1 %11, label %39, label %37
12: ; preds = %14
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
br i1 %5, label %32, label %19
14: ; preds = %6, %14
%15 = phi i32 [ %17, %14 ], [ 0, %6 ]
%16 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%17 = add nuw nsw i32 %15, 1
%18 = icmp eq i32 %17, %1
br i1 %18, label %12, label %14
19: ; preds = %8, %12
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
br label %28
21: ; preds = %32
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
br i1 %5, label %23, label %28
23: ; preds = %21, %23
%24 = phi i32 [ %26, %23 ], [ 0, %21 ]
%25 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%26 = add nuw nsw i32 %24, 1
%27 = icmp eq i32 %26, %1
br i1 %27, label %28, label %23
28: ; preds = %23, %19, %21
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
%30 = add nuw nsw i32 %7, 1
%31 = icmp eq i32 %30, %0
br i1 %31, label %10, label %6
32: ; preds = %12, %32
%33 = phi i32 [ %35, %32 ], [ 0, %12 ]
%34 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%35 = add nuw nsw i32 %33, 1
%36 = icmp eq i32 %35, %1
br i1 %36, label %21, label %32
37: ; preds = %39, %10
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
39: ; preds = %10, %39
%40 = phi i32 [ %42, %39 ], [ 0, %10 ]
%41 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%42 = add nuw nsw i32 %40, 1
%43 = icmp eq i32 %42, %1
br i1 %43, label %37, label %39
}