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


x86 assembly (clang, -O0):
<draw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    121a <draw+0x10a>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
cmp    %ecx,%eax
jge    116f <draw+0x5f>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113e <draw+0x2e>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1207 <draw+0xf7>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ed <draw+0xdd>
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11da <draw+0xca>
lea    0xe3e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11b4 <draw+0xa4>
jmp    11df <draw+0xcf>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1195 <draw+0x85>
lea    0xe0e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1182 <draw+0x72>
jmp    120c <draw+0xfc>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <draw+0x1b>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
cmp    %ecx,%eax
jge    1252 <draw+0x142>
lea    0xdc1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1221 <draw+0x111>
lea    0xdae(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %ecx,%ebx
lea    0x1(%rbx),%r12d
imul   %esi,%r12d
mov    %edi,0x10(%rsp)
test   %edi,%edi
jle    1212 <draw+0xf2>
mov    %edx,%r14d
mov    %esi,%ebp
xor    %eax,%eax
mov    %r12d,0xc(%rsp)
jmp    1176 <draw+0x56>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x14(%rsp),%eax
add    $0x1,%eax
cmp    0x10(%rsp),%eax
mov    0xc(%rsp),%r12d
je     1212 <draw+0xf2>
mov    %eax,0x14(%rsp)
mov    %r12d,%r15d
test   %r12d,%r12d
jle    11a0 <draw+0x80>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r15d
jne    1190 <draw+0x70>
lea    0xe5c(%rip),%rdi
call   1040 <puts@plt>
test   %r14d,%r14d
jle    1160 <draw+0x40>
xor    %r13d,%r13d
jmp    11d5 <draw+0xb5>
cs nopw 0x0(%rax,%rax,1)
lea    0xe3c(%rip),%rdi
call   1040 <puts@plt>
add    $0x1,%r13d
cmp    %r14d,%r13d
je     1160 <draw+0x40>
test   %ebp,%ebp
jle    11c0 <draw+0xa0>
xor    %r15d,%r15d
jmp    11e9 <draw+0xc9>
xchg   %ax,%ax
add    $0x1,%r15d
cmp    %ebp,%r15d
je     11c0 <draw+0xa0>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    %ebx,%r12d
test   %ebx,%ebx
jle    11e0 <draw+0xc0>
nopw   0x0(%rax,%rax,1)
mov    $0x2e,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r12d
jne    1200 <draw+0xe0>
jmp    11e0 <draw+0xc0>
test   %r12d,%r12d
jle    1230 <draw+0x110>
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r12d
jne    1220 <draw+0x100>
lea    0xdc9(%rip),%rdi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>

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

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