#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*/ sleep(int);
int main(void) {
  printf("\033[2J");
  printf("\033[?25l");
  ;
  do {
    int i, j;
    for (i = 0; i <= 25; ++i)
      for (j = 0; j <= 50; ++j) {
        if (i == 0 || i == 25 || j == 0 || j == 1 || j == 50 - 1 || j == 50)
          printf("\033[%d;%dH\033[%dm \033[0m\n", i + (10), j + (10), (43));
        else
          printf("\033[%d;%dH%c", i + (10), j + (10), ' ');
      }
  } while (0);
  do {
    printf("\033[%d;%dH\033[%dm \033[0m\n", 1 + (22), 1 + (33), 42);
    printf("\033[%d;%dH\033[%dm \033[0m\n", 1 + (22), 2 + (33), 42);
  } while (0);
  printf("\033[?25h");
  ;
  sleep(5);
  printf("\033[2J");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x19,-0x8(%rbp)
jg     1212 <main+0xf2>
movl   $0x0,-0xc(%rbp)
cmpl   $0x32,-0xc(%rbp)
jg     11ff <main+0xdf>
cmpl   $0x0,-0x8(%rbp)
je     11a9 <main+0x89>
cmpl   $0x19,-0x8(%rbp)
je     11a9 <main+0x89>
cmpl   $0x0,-0xc(%rbp)
je     11a9 <main+0x89>
cmpl   $0x1,-0xc(%rbp)
je     11a9 <main+0x89>
cmpl   $0x31,-0xc(%rbp)
je     11a9 <main+0x89>
cmpl   $0x32,-0xc(%rbp)
jne    11cd <main+0xad>
mov    -0x8(%rbp),%esi
add    $0xa,%esi
mov    -0xc(%rbp),%edx
add    $0xa,%edx
lea    0xe50(%rip),%rdi
mov    $0x2b,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ec <main+0xcc>
mov    -0x8(%rbp),%esi
add    $0xa,%esi
mov    -0xc(%rbp),%edx
add    $0xa,%edx
lea    0xe40(%rip),%rdi
mov    $0x20,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f1 <main+0xd1>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1163 <main+0x43>
jmp    1204 <main+0xe4>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1152 <main+0x32>
jmp    1217 <main+0xf7>
jmp    121c <main+0xfc>
lea    0xde9(%rip),%rdi
mov    $0x17,%esi
mov    $0x22,%edx
mov    $0x2a,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdcc(%rip),%rdi
mov    $0x17,%esi
mov    $0x23,%edx
mov    $0x2a,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
lea    0xd8b(%rip),%rdi
mov    $0x0,%al
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   %r13
push   %r12
push   %rbx
push   %rax
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebe(%rip),%r14
lea    0xecb(%rip),%r15
xor    %r12d,%r12d
jmp    116a <main+0x4a>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12d
cmp    $0x1a,%r12d
je     11d3 <main+0xb3>
test   %r12d,%r12d
sete   %al
cmp    $0x19,%r12d
sete   %r13b
or     %al,%r13b
lea    0xa(%r12),%ebp
mov    $0xa,%ebx
jmp    11ab <main+0x8b>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x2b,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x3d,%ebx
je     1160 <main+0x40>
cmp    $0xa,%ebx
sete   %al
or     %r13b,%al
jne    1190 <main+0x70>
cmp    $0xb,%ebx
je     1190 <main+0x70>
cmp    $0x3b,%ebx
je     1190 <main+0x70>
cmp    $0x3c,%ebx
je     1190 <main+0x70>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x20,%ecx
jmp    119c <main+0x7c>
lea    0xe32(%rip),%rbx
mov    %rbx,%rdi
mov    $0x17,%esi
mov    $0x22,%edx
mov    $0x2a,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x17,%esi
mov    $0x23,%edx
mov    $0x2a,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe18(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
lea    0xdd5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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