#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*/ move(int, int);
int /*<<< orphan*/ mvaddch(int, int, char);
int /*<<< orphan*/ refresh();
void drawBoard() {
  int i, h;
  for (i = 0; i <= 6; i++) {
    mvaddch(i, 0, '|');
    mvaddch(i, 4, '|');
    mvaddch(i, 8, '|');
    mvaddch(i, 4, '|');
    mvaddch(i, 8, '|');
    mvaddch(i, 12, '|');
    if (i % 2 == 0) {
      for (h = 0; h <= 12; h++) {
        mvaddch(i, h, '-');
      }
    }
    move(1, 2);
  }
  refresh();
}


x86 assembly (clang, -O0):
<drawBoard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x6,-0x4(%rbp)
jg     1217 <drawBoard+0xe7>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0x7c,%edx
call   1040 <mvaddch@plt>
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
mov    $0x7c,%edx
call   1040 <mvaddch@plt>
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
mov    $0x7c,%edx
call   1040 <mvaddch@plt>
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
mov    $0x7c,%edx
call   1040 <mvaddch@plt>
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
mov    $0x7c,%edx
call   1040 <mvaddch@plt>
mov    -0x4(%rbp),%edi
mov    $0xc,%esi
mov    $0x7c,%edx
call   1040 <mvaddch@plt>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11fa <drawBoard+0xca>
movl   $0x0,-0x8(%rbp)
cmpl   $0xc,-0x8(%rbp)
jg     11f5 <drawBoard+0xc5>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11cd <drawBoard+0x9d>
jmp    11fa <drawBoard+0xca>
mov    $0x1,%edi
mov    $0x2,%esi
call   1050 <move@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <drawBoard+0xf>
mov    $0x0,%al
call   1030 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawBoard>:
push   %rbx
xor    %ebx,%ebx
jmp    115b <drawBoard+0x2b>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x1,%edi
mov    $0x2,%esi
call   1050 <move@plt>
add    $0x1,%ebx
cmp    $0x7,%ebx
je     12a6 <drawBoard+0x176>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x7c,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x4,%esi
mov    $0x7c,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x8,%esi
mov    $0x7c,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x4,%esi
mov    $0x7c,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x8,%esi
mov    $0x7c,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0xc,%esi
mov    $0x7c,%edx
call   1040 <mvaddch@plt>
test   $0x1,%bl
jne    1140 <drawBoard+0x10>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x2,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x3,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x4,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x5,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x6,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x7,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x8,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0x9,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0xa,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0xb,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
mov    %ebx,%edi
mov    $0xc,%esi
mov    $0x2d,%edx
call   1040 <mvaddch@plt>
jmp    1140 <drawBoard+0x10>
xor    %eax,%eax
pop    %rbx
jmp    1030 <refresh@plt>

LLVM IR (-O0):
define void @drawBoard() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %36, %0
%4 = load i32, i32* %1
%5 = icmp sle i32 %4, 6
br i1 %5, label %6, label %39
6: ; preds = %3
%7 = load i32, i32* %1
%8 = call i32 @mvaddch(i32 %7, i32 0, i8 signext 124)
%9 = load i32, i32* %1
%10 = call i32 @mvaddch(i32 %9, i32 4, i8 signext 124)
%11 = load i32, i32* %1
%12 = call i32 @mvaddch(i32 %11, i32 8, i8 signext 124)
%13 = load i32, i32* %1
%14 = call i32 @mvaddch(i32 %13, i32 4, i8 signext 124)
%15 = load i32, i32* %1
%16 = call i32 @mvaddch(i32 %15, i32 8, i8 signext 124)
%17 = load i32, i32* %1
%18 = call i32 @mvaddch(i32 %17, i32 12, i8 signext 124)
%19 = load i32, i32* %1
%20 = srem i32 %19, 2
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %34
22: ; preds = %6
store i32 0, i32* %2
br label %23
23: ; preds = %30, %22
%24 = load i32, i32* %2
%25 = icmp sle i32 %24, 12
br i1 %25, label %26, label %33
26: ; preds = %23
%27 = load i32, i32* %1
%28 = load i32, i32* %2
%29 = call i32 @mvaddch(i32 %27, i32 %28, i8 signext 45)
br label %30
30: ; preds = %26
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 1
store i32 %32, i32* %2
br label %23
33: ; preds = %23
br label %34
34: ; preds = %33, %6
%35 = call i32 @move(i32 1, i32 2)
br label %36
36: ; preds = %34
%37 = load i32, i32* %1
%38 = add nsw i32 %37, 1
store i32 %38, i32* %1
br label %3
39: ; preds = %3
%40 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
define void @drawBoard() {
br label %1
1: ; preds = %0, %25
%2 = phi i32 [ 0, %0 ], [ %27, %25 ]
%3 = tail call i32 @mvaddch(i32 %2, i32 0, i8 signext 124)
%4 = tail call i32 @mvaddch(i32 %2, i32 4, i8 signext 124)
%5 = tail call i32 @mvaddch(i32 %2, i32 8, i8 signext 124)
%6 = tail call i32 @mvaddch(i32 %2, i32 4, i8 signext 124)
%7 = tail call i32 @mvaddch(i32 %2, i32 8, i8 signext 124)
%8 = tail call i32 @mvaddch(i32 %2, i32 12, i8 signext 124)
%9 = and i32 %2, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %25
11: ; preds = %1
%12 = tail call i32 @mvaddch(i32 %2, i32 0, i8 signext 45)
%13 = tail call i32 @mvaddch(i32 %2, i32 1, i8 signext 45)
%14 = tail call i32 @mvaddch(i32 %2, i32 2, i8 signext 45)
%15 = tail call i32 @mvaddch(i32 %2, i32 3, i8 signext 45)
%16 = tail call i32 @mvaddch(i32 %2, i32 4, i8 signext 45)
%17 = tail call i32 @mvaddch(i32 %2, i32 5, i8 signext 45)
%18 = tail call i32 @mvaddch(i32 %2, i32 6, i8 signext 45)
%19 = tail call i32 @mvaddch(i32 %2, i32 7, i8 signext 45)
%20 = tail call i32 @mvaddch(i32 %2, i32 8, i8 signext 45)
%21 = tail call i32 @mvaddch(i32 %2, i32 9, i8 signext 45)
%22 = tail call i32 @mvaddch(i32 %2, i32 10, i8 signext 45)
%23 = tail call i32 @mvaddch(i32 %2, i32 11, i8 signext 45)
%24 = tail call i32 @mvaddch(i32 %2, i32 12, i8 signext 45)
br label %25
25: ; preds = %11, %1
%26 = tail call i32 @move(i32 1, i32 2)
%27 = add nuw nsw i32 %2, 1
%28 = icmp eq i32 %27, 7
br i1 %28, label %29, label %1
29: ; preds = %25
%30 = tail call i32 (...) @refresh()
ret void
}