#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, int, int);
int main(void) {
  do {
    for (int i = 0; i <= 20; ++i)
      for (int j = 0; j <= 40; ++j) {
        if (i == 0 || i == 20 || j == 0 || j == 1 || j == 40 - 1 || j == 40)
          printf("\033[%d;%dH\033[%dm \033[0m\n", i + (1), j + (20), (44));
        else
          printf("\033[%d;%dH%c", i + (1), j + (20), ' ');
      }
  } while (0);
  do {
    printf("\033[%d;%dH\033[%dm \033[0m\n", 1 + (10), 1 + (25), 43);
    printf("\033[%d;%dH\033[%dm \033[0m\n", 1 + (10), 2 + (25), 43);
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jg     11e2 <main+0xd2>
movl   $0x0,-0xc(%rbp)
cmpl   $0x28,-0xc(%rbp)
jg     11cf <main+0xbf>
cmpl   $0x0,-0x8(%rbp)
je     117d <main+0x6d>
cmpl   $0x14,-0x8(%rbp)
je     117d <main+0x6d>
cmpl   $0x0,-0xc(%rbp)
je     117d <main+0x6d>
cmpl   $0x1,-0xc(%rbp)
je     117d <main+0x6d>
cmpl   $0x27,-0xc(%rbp)
je     117d <main+0x6d>
cmpl   $0x28,-0xc(%rbp)
jne    119f <main+0x8f>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0xc(%rbp),%edx
add    $0x14,%edx
lea    0xe70(%rip),%rdi
mov    $0x2c,%ecx
call   1030 <printf@plt>
jmp    11bc <main+0xac>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0xc(%rbp),%edx
add    $0x14,%edx
lea    0xe62(%rip),%rdi
mov    $0x20,%ecx
call   1030 <printf@plt>
jmp    11c1 <main+0xb1>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
jmp    11d4 <main+0xc4>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
jmp    11e7 <main+0xd7>
jmp    11ec <main+0xdc>
lea    0xe0d(%rip),%rdi
mov    $0xb,%esi
mov    $0x1a,%edx
mov    $0x2b,%ecx
call   1030 <printf@plt>
lea    0xdf2(%rip),%rdi
mov    $0xb,%esi
mov    $0x1b,%edx
mov    $0x2b,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
xor    %r12d,%r12d
lea    0xede(%rip),%r14
lea    0xeeb(%rip),%r15
jmp    1136 <main+0x26>
nopl   0x0(%rax,%rax,1)
cmp    $0x15,%r12d
je     1192 <main+0x82>
test   %r12d,%r12d
sete   %al
cmp    $0x14,%r12d
sete   %bl
or     %al,%bl
add    $0x1,%r12d
mov    $0x14,%ebp
jmp    116a <main+0x5a>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebp,%edx
mov    $0x2c,%ecx
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x3d,%ebp
je     1130 <main+0x20>
cmp    $0x14,%ebp
sete   %al
or     %bl,%al
jne    1150 <main+0x40>
cmp    $0x15,%ebp
je     1150 <main+0x40>
cmp    $0x3b,%ebp
je     1150 <main+0x40>
cmp    $0x3c,%ebp
je     1150 <main+0x40>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebp,%edx
mov    $0x20,%ecx
jmp    115d <main+0x4d>
lea    0xe67(%rip),%rbx
mov    %rbx,%rdi
mov    $0xb,%esi
mov    $0x1a,%edx
mov    $0x2b,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
mov    $0x1b,%edx
mov    $0x2b,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"\1B[%d;%dH\1B[%dm \1B[0m\0A\00"
@.str.1 = [11 x i8] c"\1B[%d;%dH%c\00"
define i32 @main() {
br label %1
1: ; preds = %0, %10
%2 = phi i32 [ 0, %0 ], [ %6, %10 ]
%3 = icmp eq i32 %2, 0
%4 = icmp eq i32 %2, 20
%5 = or i1 %3, %4
%6 = add nuw nsw i32 %2, 1
br label %12
7: ; preds = %10
%8 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 11, i32 26, i32 43)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 11, i32 27, i32 43)
ret i32 0
10: ; preds = %27
%11 = icmp eq i32 %6, 21
br i1 %11, label %7, label %1
12: ; preds = %1, %27
%13 = phi i32 [ 0, %1 ], [ %28, %27 ]
%14 = icmp eq i32 %13, 0
%15 = select i1 %5, i1 true, i1 %14
%16 = icmp eq i32 %13, 1
%17 = select i1 %15, i1 true, i1 %16
%18 = icmp eq i32 %13, 39
%19 = select i1 %17, i1 true, i1 %18
%20 = icmp eq i32 %13, 40
%21 = select i1 %19, i1 true, i1 %20
%22 = add nuw nsw i32 %13, 20
br i1 %21, label %23, label %25
23: ; preds = %12
%24 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %22, i32 44)
br label %27
25: ; preds = %12
%26 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %22, i32 32)
br label %27
27: ; preds = %23, %25
%28 = add nuw nsw i32 %13, 1
%29 = icmp eq i32 %28, 41
br i1 %29, label %10, label %12
}