#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 main() {
  int i, j;
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 5; j++) {
      if (i == 0 || i == 3)
        printf("#");
      else {
        printf("#");
        break;
      }
    }
    printf("\n");
  }
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 4; j++) {
      if (i == 2)
        printf("#");
      else {
        printf(" ");
        if (j == 3)
          printf("#");
      }
      if (i == 2 && j == 3)
        printf("#");
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    11a4 <main+0x94>
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    118a <main+0x7a>
cmpl   $0x0,-0x8(%rbp)
je     1155 <main+0x45>
cmpl   $0x3,-0x8(%rbp)
jne    1166 <main+0x56>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
jmp    1177 <main+0x67>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
jmp    118a <main+0x7a>
jmp    117c <main+0x6c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1255 <main+0x145>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    123b <main+0x12b>
cmpl   $0x2,-0x8(%rbp)
jne    11e1 <main+0xd1>
lea    0xe29(%rip),%rdi
call   1030 <printf@plt>
jmp    1208 <main+0xf8>
lea    0xe1c(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x3,-0xc(%rbp)
jne    1203 <main+0xf3>
lea    0xe02(%rip),%rdi
call   1030 <printf@plt>
jmp    1208 <main+0xf8>
cmpl   $0x2,-0x8(%rbp)
jne    1228 <main+0x118>
cmpl   $0x3,-0xc(%rbp)
jne    1228 <main+0x118>
lea    0xddd(%rip),%rdi
call   1030 <printf@plt>
jmp    122d <main+0x11d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11bc <main+0xac>
lea    0xdc0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11ab <main+0x9b>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 35)
%2 = tail call i32 @putchar(i32 35)
%3 = tail call i32 @putchar(i32 35)
%4 = tail call i32 @putchar(i32 35)
%5 = tail call i32 @putchar(i32 35)
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 @putchar(i32 35)
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 @putchar(i32 35)
%10 = tail call i32 @putchar(i32 10)
%11 = tail call i32 @putchar(i32 35)
%12 = tail call i32 @putchar(i32 35)
%13 = tail call i32 @putchar(i32 35)
%14 = tail call i32 @putchar(i32 35)
%15 = tail call i32 @putchar(i32 35)
%16 = tail call i32 @putchar(i32 10)
%17 = tail call i32 @putchar(i32 32)
%18 = tail call i32 @putchar(i32 32)
%19 = tail call i32 @putchar(i32 32)
%20 = tail call i32 @putchar(i32 32)
%21 = tail call i32 @putchar(i32 35)
%22 = tail call i32 @putchar(i32 10)
%23 = tail call i32 @putchar(i32 32)
%24 = tail call i32 @putchar(i32 32)
%25 = tail call i32 @putchar(i32 32)
%26 = tail call i32 @putchar(i32 32)
%27 = tail call i32 @putchar(i32 35)
%28 = tail call i32 @putchar(i32 10)
%29 = tail call i32 @putchar(i32 35)
%30 = tail call i32 @putchar(i32 35)
%31 = tail call i32 @putchar(i32 35)
%32 = tail call i32 @putchar(i32 35)
%33 = tail call i32 @putchar(i32 35)
%34 = tail call i32 @putchar(i32 10)
ret i32 0
}