#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*/ addch(char);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ refresh();
void draw() {
  int n, m, x, y;
  char c[4] = {'0', '0', '0', '0'};
  clear();
  for (n = 0; n < 9; n += 2) {
    for (m = 0; m < 21; m++) {
      move(n, m);
      addch('_');
      refresh();
    }
  }
  for (m = 0; m < 22; m += 5) {
    for (n = 1; n < 8; n++) {
      move(n, m);
      addch('|');
      refresh();
    }
  }
}


x86 assembly (clang, -O0):
<draw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xeb2(%rip),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <clear@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
jge    11b7 <draw+0x77>
movl   $0x0,-0x8(%rbp)
cmpl   $0x15,-0x8(%rbp)
jge    11a4 <draw+0x64>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1170 <draw+0x30>
jmp    11a9 <draw+0x69>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    115f <draw+0x1f>
movl   $0x0,-0x8(%rbp)
cmpl   $0x16,-0x8(%rbp)
jge    1216 <draw+0xd6>
movl   $0x1,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jge    1203 <draw+0xc3>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1060 <move@plt>
mov    $0x7c,%edi
call   1030 <addch@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11cf <draw+0x8f>
jmp    1208 <draw+0xc8>
mov    -0x8(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x8(%rbp)
jmp    11be <draw+0x7e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw>:
push   %rbx
xor    %eax,%eax
call   1050 <clear@plt>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
xor    %esi,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x4,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x5,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x6,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x7,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x8,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x9,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0xa,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0xb,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0xc,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0xd,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0xe,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0xf,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x10,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x11,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x12,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x13,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebx,%edi
mov    $0x14,%esi
call   1060 <move@plt>
mov    $0x5f,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
lea    0x2(%rbx),%eax
cmp    $0x7,%ebx
mov    %eax,%ebx
jb     1150 <draw+0x10>
xor    %ebx,%ebx
xchg   %ax,%ax
mov    $0x1,%edi
mov    %ebx,%esi
call   1060 <move@plt>
mov    $0x7c,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    $0x2,%edi
mov    %ebx,%esi
call   1060 <move@plt>
mov    $0x7c,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    $0x3,%edi
mov    %ebx,%esi
call   1060 <move@plt>
mov    $0x7c,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    $0x4,%edi
mov    %ebx,%esi
call   1060 <move@plt>
mov    $0x7c,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    $0x5,%edi
mov    %ebx,%esi
call   1060 <move@plt>
mov    $0x7c,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    $0x6,%edi
mov    %ebx,%esi
call   1060 <move@plt>
mov    $0x7c,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    $0x7,%edi
mov    %ebx,%esi
call   1060 <move@plt>
mov    $0x7c,%edi
call   1030 <addch@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
lea    0x5(%rbx),%eax
cmp    $0x11,%ebx
mov    %eax,%ebx
jb     13c0 <draw+0x280>
pop    %rbx
ret

LLVM IR (-O0):
@__const.draw.c = [4 x i8] c"0000"
define void @draw() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [4 x i8]
%6 = bitcast [4 x i8]* %5 to i8*
%7 = call i32 (...) @clear()
store i32 0, i32* %1
br label %8
8: ; preds = %25, %0
%9 = load i32, i32* %1
%10 = icmp slt i32 %9, 9
br i1 %10, label %11, label %28
11: ; preds = %8
store i32 0, i32* %2
br label %12
12: ; preds = %21, %11
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 21
br i1 %14, label %15, label %24
15: ; preds = %12
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = call i32 @move(i32 %16, i32 %17)
%19 = call i32 @addch(i8 signext 95)
%20 = call i32 (...) @refresh()
br label %21
21: ; preds = %15
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %12
24: ; preds = %12
br label %25
25: ; preds = %24
%26 = load i32, i32* %1
%27 = add nsw i32 %26, 2
store i32 %27, i32* %1
br label %8
28: ; preds = %8
store i32 0, i32* %2
br label %29
29: ; preds = %46, %28
%30 = load i32, i32* %2
%31 = icmp slt i32 %30, 22
br i1 %31, label %32, label %49
32: ; preds = %29
store i32 1, i32* %1
br label %33
33: ; preds = %42, %32
%34 = load i32, i32* %1
%35 = icmp slt i32 %34, 8
br i1 %35, label %36, label %45
36: ; preds = %33
%37 = load i32, i32* %1
%38 = load i32, i32* %2
%39 = call i32 @move(i32 %37, i32 %38)
%40 = call i32 @addch(i8 signext 124)
%41 = call i32 (...) @refresh()
br label %42
42: ; preds = %36
%43 = load i32, i32* %1
%44 = add nsw i32 %43, 1
store i32 %44, i32* %1
br label %33
45: ; preds = %33
br label %46
46: ; preds = %45
%47 = load i32, i32* %2
%48 = add nsw i32 %47, 5
store i32 %48, i32* %2
br label %29
49: ; preds = %29
ret void
}

LLVM IR (-O2):
define void @draw() {
%1 = tail call i32 (...) @clear()
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %67, %2 ]
%4 = tail call i32 @move(i32 %3, i32 0)
%5 = tail call i32 @addch(i8 signext 95)
%6 = tail call i32 (...) @refresh()
%7 = tail call i32 @move(i32 %3, i32 1)
%8 = tail call i32 @addch(i8 signext 95)
%9 = tail call i32 (...) @refresh()
%10 = tail call i32 @move(i32 %3, i32 2)
%11 = tail call i32 @addch(i8 signext 95)
%12 = tail call i32 (...) @refresh()
%13 = tail call i32 @move(i32 %3, i32 3)
%14 = tail call i32 @addch(i8 signext 95)
%15 = tail call i32 (...) @refresh()
%16 = tail call i32 @move(i32 %3, i32 4)
%17 = tail call i32 @addch(i8 signext 95)
%18 = tail call i32 (...) @refresh()
%19 = tail call i32 @move(i32 %3, i32 5)
%20 = tail call i32 @addch(i8 signext 95)
%21 = tail call i32 (...) @refresh()
%22 = tail call i32 @move(i32 %3, i32 6)
%23 = tail call i32 @addch(i8 signext 95)
%24 = tail call i32 (...) @refresh()
%25 = tail call i32 @move(i32 %3, i32 7)
%26 = tail call i32 @addch(i8 signext 95)
%27 = tail call i32 (...) @refresh()
%28 = tail call i32 @move(i32 %3, i32 8)
%29 = tail call i32 @addch(i8 signext 95)
%30 = tail call i32 (...) @refresh()
%31 = tail call i32 @move(i32 %3, i32 9)
%32 = tail call i32 @addch(i8 signext 95)
%33 = tail call i32 (...) @refresh()
%34 = tail call i32 @move(i32 %3, i32 10)
%35 = tail call i32 @addch(i8 signext 95)
%36 = tail call i32 (...) @refresh()
%37 = tail call i32 @move(i32 %3, i32 11)
%38 = tail call i32 @addch(i8 signext 95)
%39 = tail call i32 (...) @refresh()
%40 = tail call i32 @move(i32 %3, i32 12)
%41 = tail call i32 @addch(i8 signext 95)
%42 = tail call i32 (...) @refresh()
%43 = tail call i32 @move(i32 %3, i32 13)
%44 = tail call i32 @addch(i8 signext 95)
%45 = tail call i32 (...) @refresh()
%46 = tail call i32 @move(i32 %3, i32 14)
%47 = tail call i32 @addch(i8 signext 95)
%48 = tail call i32 (...) @refresh()
%49 = tail call i32 @move(i32 %3, i32 15)
%50 = tail call i32 @addch(i8 signext 95)
%51 = tail call i32 (...) @refresh()
%52 = tail call i32 @move(i32 %3, i32 16)
%53 = tail call i32 @addch(i8 signext 95)
%54 = tail call i32 (...) @refresh()
%55 = tail call i32 @move(i32 %3, i32 17)
%56 = tail call i32 @addch(i8 signext 95)
%57 = tail call i32 (...) @refresh()
%58 = tail call i32 @move(i32 %3, i32 18)
%59 = tail call i32 @addch(i8 signext 95)
%60 = tail call i32 (...) @refresh()
%61 = tail call i32 @move(i32 %3, i32 19)
%62 = tail call i32 @addch(i8 signext 95)
%63 = tail call i32 (...) @refresh()
%64 = tail call i32 @move(i32 %3, i32 20)
%65 = tail call i32 @addch(i8 signext 95)
%66 = tail call i32 (...) @refresh()
%67 = add nuw nsw i32 %3, 2
%68 = icmp ult i32 %3, 7
br i1 %68, label %2, label %69
69: ; preds = %2, %69
%70 = phi i32 [ %92, %69 ], [ 0, %2 ]
%71 = tail call i32 @move(i32 1, i32 %70)
%72 = tail call i32 @addch(i8 signext 124)
%73 = tail call i32 (...) @refresh()
%74 = tail call i32 @move(i32 2, i32 %70)
%75 = tail call i32 @addch(i8 signext 124)
%76 = tail call i32 (...) @refresh()
%77 = tail call i32 @move(i32 3, i32 %70)
%78 = tail call i32 @addch(i8 signext 124)
%79 = tail call i32 (...) @refresh()
%80 = tail call i32 @move(i32 4, i32 %70)
%81 = tail call i32 @addch(i8 signext 124)
%82 = tail call i32 (...) @refresh()
%83 = tail call i32 @move(i32 5, i32 %70)
%84 = tail call i32 @addch(i8 signext 124)
%85 = tail call i32 (...) @refresh()
%86 = tail call i32 @move(i32 6, i32 %70)
%87 = tail call i32 @addch(i8 signext 124)
%88 = tail call i32 (...) @refresh()
%89 = tail call i32 @move(i32 7, i32 %70)
%90 = tail call i32 @addch(i8 signext 124)
%91 = tail call i32 (...) @refresh()
%92 = add nuw nsw i32 %70, 5
%93 = icmp ult i32 %70, 17
br i1 %93, label %69, label %94
94: ; preds = %69
ret void
}