#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 */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ delwin(int /*<<< orphan*/ *);
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mvwprintw(int /*<<< orphan*/ *, int, int, char *);
int /*<<< orphan*/ *newwin(int, int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int rand();
int /*<<< orphan*/ srand(unsigned int);
int /*<<< orphan*/ stdscr;
scalar_t__ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ waitms(int);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
int main(void) {
  WINDOW *win1;
  int y, x, i, j, k;
  int xrnd[3500] = {};
  int scnarr[35][100] = {};
  initscr();
  cbreak();
  keypad(stdscr, TRUE);
  noecho();
  curs_set(0);
  getmaxyx(stdscr, y, x);
  srand((unsigned)(int)time(NULL));
  win1 = newwin(y, x, 0, 0);
  for (i = 0; i < 3500; i++) {
    xrnd[i] = rand() % 100;
  }
  for (i = 0; i < 3500; i++) {
    if (scnarr[0][xrnd[i]] == 1)
      break;
    for (j = 34; j >= 0; j--) {
      if (scnarr[j][xrnd[i]] != 1) {
        scnarr[j][xrnd[i]] = 1;
        for (k = 0; k <= j; k++) {
          if (k > 0)
            mvwprintw(win1, k - 1, xrnd[i], " ");
          mvwprintw(win1, k, xrnd[i], "O");
          wrefresh(win1);
        }
        break;
      }
    }
  }
  waitms(1500);
  for (j = 0; j < 35; j++) {
    for (i = 0; i < 100; i++) {
      if (scnarr[j][i] == 1) {
        mvwprintw(win1, j, i, "X");
        wrefresh(win1);
      }
    }
  }
  waitms(1500);
  delwin(win1);
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x6d90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x36e0(%rbp),%rdi
xor    %esi,%esi
mov    $0x36b0,%edx
call   1090 <memset@plt>
lea    -0x6d90(%rbp),%rdi
xor    %esi,%esi
mov    $0x36b0,%edx
call   1090 <memset@plt>
mov    $0x0,%al
call   1070 <initscr@plt>
mov    $0x0,%al
call   1040 <cbreak@plt>
mov    0x2d9b(%rip),%rax
mov    (%rax),%edi
mov    0x2d8a(%rip),%rax
mov    (%rax),%esi
call   1060 <keypad@plt>
mov    $0x0,%al
call   1100 <noecho@plt>
xor    %edi,%edi
call   1110 <curs_set@plt>
mov    0x2d76(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   10b0 <getmaxyx@plt>
xor    %eax,%eax
mov    %eax,%edi
call   10d0 <time@plt>
mov    %eax,%edi
call   10a0 <srand@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1080 <newwin@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0xdac,-0x1c(%rbp)
jge    12de <main+0xde>
mov    $0x0,%al
call   1120 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
movslq -0x1c(%rbp),%rax
mov    %edx,-0x36e0(%rbp,%rax,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12a9 <main+0xa9>
movl   $0x0,-0x1c(%rbp)
cmpl   $0xdac,-0x1c(%rbp)
jge    1413 <main+0x213>
movslq -0x1c(%rbp),%rax
movslq -0x36e0(%rbp,%rax,4),%rax
ff
cmpl   $0x1,-0x6d90(%rbp,%rax,4)
01
jne    1311 <main+0x111>
jmp    1413 <main+0x213>
movl   $0x22,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jl     1400 <main+0x200>
movslq -0x20(%rbp),%rcx
lea    -0x6d90(%rbp),%rax
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movslq -0x36e0(%rbp,%rcx,4),%rcx
ff
cmpl   $0x1,(%rax,%rcx,4)
je     13ed <main+0x1ed>
movslq -0x20(%rbp),%rcx
lea    -0x6d90(%rbp),%rax
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movslq -0x36e0(%rbp,%rcx,4),%rcx
ff
movl   $0x1,(%rax,%rcx,4)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     13e8 <main+0x1e8>
cmpl   $0x0,-0x24(%rbp)
jle    13b3 <main+0x1b3>
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
sub    $0x1,%esi
movslq -0x1c(%rbp),%rax
mov    -0x36e0(%rbp,%rax,4),%edx
lea    0xc52(%rip),%rcx
call   10f0 <mvwprintw@plt>
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
movslq -0x1c(%rbp),%rax
mov    -0x36e0(%rbp,%rax,4),%edx
lea    0xc36(%rip),%rcx
call   10f0 <mvwprintw@plt>
mov    -0x10(%rbp),%rdi
call   1050 <wrefresh@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    137c <main+0x17c>
jmp    1400 <main+0x200>
jmp    13f2 <main+0x1f2>
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
jmp    1318 <main+0x118>
jmp    1405 <main+0x205>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12e5 <main+0xe5>
mov    $0x5dc,%edi
call   1030 <waitms@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x23,-0x20(%rbp)
jge    14a7 <main+0x2a7>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x64,-0x1c(%rbp)
jge    1494 <main+0x294>
movslq -0x20(%rbp),%rcx
lea    -0x6d90(%rbp),%rax
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1481 <main+0x281>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xb91(%rip),%rcx
call   10f0 <mvwprintw@plt>
mov    -0x10(%rbp),%rdi
call   1050 <wrefresh@plt>
jmp    1486 <main+0x286>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1435 <main+0x235>
jmp    1499 <main+0x299>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1424 <main+0x224>
mov    $0x5dc,%edi
call   1030 <waitms@plt>
mov    -0x10(%rbp),%rdi
call   10c0 <delwin@plt>
mov    $0x0,%al
call   10e0 <endwin@plt>
xor    %eax,%eax
add    $0x6d90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x6d68,%rsp
lea    0x36b0(%rsp),%rdi
mov    $0x36b0,%edx
xor    %esi,%esi
call   1090 <memset@plt>
mov    %rsp,%r14
mov    $0x36b0,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1090 <memset@plt>
xor    %eax,%eax
call   1070 <initscr@plt>
xor    %eax,%eax
call   1040 <cbreak@plt>
mov    0x2d9c(%rip),%rbx
mov    (%rbx),%edi
mov    0x2d8b(%rip),%rax
mov    (%rax),%esi
call   1060 <keypad@plt>
xor    %eax,%eax
call   1100 <noecho@plt>
xor    %edi,%edi
call   1110 <curs_set@plt>
mov    (%rbx),%edi
call   10b0 <getmaxyx@plt>
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,%edi
call   10a0 <srand@plt>
xor    %edx,%edx
xor    %ecx,%ecx
call   1080 <newwin@plt>
mov    %rax,%r12
xor    %ebx,%ebx
nopl   (%rax)
xor    %eax,%eax
call   1120 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x36b0(%rsp,%rbx,4)
add    $0x1,%rbx
cmp    $0xdac,%rbx
jne    1290 <main+0x90>
xor    %ebx,%ebx
jmp    12e1 <main+0xe1>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    $0xdac,%rbx
je     1409 <main+0x209>
movslq 0x36b0(%rsp,%rbx,4),%r13
cmpl   $0x1,(%rsp,%r13,4)
je     1409 <main+0x209>
mov    $0x1e,%eax
nopl   0x0(%rax)
lea    0x4(%rax),%r15d
imul   $0x190,%r15,%rcx
add    %rsp,%rcx
cmpl   $0x1,(%rcx,%r13,4)
jne    1380 <main+0x180>
lea    0x3(%rax),%r15d
imul   $0x190,%r15,%rcx
add    %rsp,%rcx
cmpl   $0x1,(%rcx,%r13,4)
jne    1380 <main+0x180>
lea    0x2(%rax),%r15d
imul   $0x190,%r15,%rcx
add    %rsp,%rcx
cmpl   $0x1,(%rcx,%r13,4)
jne    1380 <main+0x180>
lea    0x1(%rax),%r15d
imul   $0x190,%r15,%rcx
add    %rsp,%rcx
cmpl   $0x1,(%rcx,%r13,4)
jne    1380 <main+0x180>
mov    %eax,%ecx
imul   $0x190,%rcx,%rcx
add    %rsp,%rcx
cmpl   $0x1,(%rcx,%r13,4)
jne    13fd <main+0x1fd>
add    $0xfffffffb,%eax
cmp    $0xfffffffb,%eax
jne    1300 <main+0x100>
jmp    12d0 <main+0xd0>
nopl   0x0(%rax,%rax,1)
lea    (%rcx,%r13,4),%rcx
movl   $0x1,(%rcx)
test   %r15d,%r15d
js     12d0 <main+0xd0>
mov    %r12,%rdi
xor    %esi,%esi
mov    %r13d,%edx
lea    0xc60(%rip),%rcx
call   10f0 <mvwprintw@plt>
mov    %r12,%rdi
call   1050 <wrefresh@plt>
test   %r15d,%r15d
je     12d0 <main+0xd0>
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
lea    0x1(%rsi),%ebp
mov    %r12,%rdi
mov    %r13d,%edx
lea    0xc30(%rip),%rcx
call   10f0 <mvwprintw@plt>
mov    %r12,%rdi
mov    %ebp,%esi
mov    %r13d,%edx
lea    0xc1e(%rip),%rcx
call   10f0 <mvwprintw@plt>
mov    %r12,%rdi
call   1050 <wrefresh@plt>
mov    %ebp,%esi
cmp    %ebp,%r15d
jne    13c0 <main+0x1c0>
jmp    12d0 <main+0xd0>
lea    (%rcx,%r13,4),%rcx
mov    %eax,%r15d
jmp    1384 <main+0x184>
mov    $0x5dc,%edi
call   1030 <waitms@plt>
xor    %ebx,%ebx
lea    0xbe8(%rip),%r15
jmp    1431 <main+0x231>
xchg   %ax,%ax
add    $0x1,%rbx
add    $0x190,%r14
cmp    $0x23,%rbx
je     146a <main+0x26a>
xor    %ebp,%ebp
jmp    144a <main+0x24a>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbp
cmp    $0x64,%rbp
je     1420 <main+0x220>
cmpl   $0x1,(%r14,%rbp,4)
jne    1440 <main+0x240>
mov    %r12,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r15,%rcx
call   10f0 <mvwprintw@plt>
mov    %r12,%rdi
call   1050 <wrefresh@plt>
jmp    1440 <main+0x240>
mov    $0x5dc,%edi
call   1030 <waitms@plt>
mov    %r12,%rdi
call   10c0 <delwin@plt>
xor    %eax,%eax
call   10e0 <endwin@plt>
xor    %eax,%eax
add    $0x6d68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
@.str = [2 x i8] c" \00"
@.str.1 = [2 x i8] c"O\00"
@.str.2 = [2 x i8] c"X\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [3500 x i32]
%9 = alloca [35 x [100 x i32]]
store i32 0, i32* %1
%10 = bitcast [3500 x i32]* %8 to i8*
%11 = bitcast [35 x [100 x i32]]* %9 to i8*
%12 = call i32 (...) @initscr()
%13 = call i32 (...) @cbreak()
%14 = load i32, i32* @stdscr
%15 = load i32, i32* @TRUE
%16 = call i32 @keypad(i32 %14, i32 %15)
%17 = call i32 (...) @noecho()
%18 = call i32 @curs_set(i32 0)
%19 = load i32, i32* @stdscr
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = call i32 @getmaxyx(i32 %19, i32 %20, i32 %21)
%23 = call i64 @time(i32* null)
%24 = trunc i64 %23 to i32
%25 = call i32 @srand(i32 %24)
%26 = load i32, i32* %3
%27 = load i32, i32* %4
%28 = call i32* @newwin(i32 %26, i32 %27, i32 0, i32 0)
store i32* %28, i32** %2
store i32 0, i32* %5
br label %29
29: ; preds = %38, %0
%30 = load i32, i32* %5
%31 = icmp slt i32 %30, 3500
br i1 %31, label %32, label %41
32: ; preds = %29
%33 = call i32 (...) @rand()
%34 = srem i32 %33, 100
%35 = load i32, i32* %5
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [3500 x i32], [3500 x i32]* %8, i64 0, i64 %36
store i32 %34, i32* %37
br label %38
38: ; preds = %32
%39 = load i32, i32* %5
%40 = add nsw i32 %39, 1
store i32 %40, i32* %5
br label %29
41: ; preds = %29
store i32 0, i32* %5
br label %42
42: ; preds = %117, %41
%43 = load i32, i32* %5
%44 = icmp slt i32 %43, 3500
br i1 %44, label %45, label %120
45: ; preds = %42
%46 = getelementptr inbounds [35 x [100 x i32]], [35 x [100 x i32]]* %9, i64 0, i64 0
%47 = load i32, i32* %5
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [3500 x i32], [3500 x i32]* %8, i64 0, i64 %48
%50 = load i32, i32* %49
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [100 x i32], [100 x i32]* %46, i64 0, i64 %51
%53 = load i32, i32* %52
%54 = icmp eq i32 %53, 1
br i1 %54, label %55, label %56
55: ; preds = %45
br label %120
56: ; preds = %45
store i32 34, i32* %6
br label %57
57: ; preds = %113, %56
%58 = load i32, i32* %6
%59 = icmp sge i32 %58, 0
br i1 %59, label %60, label %116
60: ; preds = %57
%61 = load i32, i32* %6
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [35 x [100 x i32]], [35 x [100 x i32]]* %9, i64 0, i64 %62
%64 = load i32, i32* %5
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [3500 x i32], [3500 x i32]* %8, i64 0, i64 %65
%67 = load i32, i32* %66
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [100 x i32], [100 x i32]* %63, i64 0, i64 %68
%70 = load i32, i32* %69
%71 = icmp ne i32 %70, 1
br i1 %71, label %72, label %112
72: ; preds = %60
%73 = load i32, i32* %6
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [35 x [100 x i32]], [35 x [100 x i32]]* %9, i64 0, i64 %74
%76 = load i32, i32* %5
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [3500 x i32], [3500 x i32]* %8, i64 0, i64 %77
%79 = load i32, i32* %78
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [100 x i32], [100 x i32]* %75, i64 0, i64 %80
store i32 1, i32* %81
store i32 0, i32* %7
br label %82
82: ; preds = %108, %72
%83 = load i32, i32* %7
%84 = load i32, i32* %6
%85 = icmp sle i32 %83, %84
br i1 %85, label %86, label %111
86: ; preds = %82
%87 = load i32, i32* %7
%88 = icmp sgt i32 %87, 0
br i1 %88, label %89, label %98
89: ; preds = %86
%90 = load i32*, i32** %2
%91 = load i32, i32* %7
%92 = sub nsw i32 %91, 1
%93 = load i32, i32* %5
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [3500 x i32], [3500 x i32]* %8, i64 0, i64 %94
%96 = load i32, i32* %95
%97 = call i32 @mvwprintw(i32* %90, i32 %92, i32 %96, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %98
98: ; preds = %89, %86
%99 = load i32*, i32** %2
%100 = load i32, i32* %7
%101 = load i32, i32* %5
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [3500 x i32], [3500 x i32]* %8, i64 0, i64 %102
%104 = load i32, i32* %103
%105 = call i32 @mvwprintw(i32* %99, i32 %100, i32 %104, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%106 = load i32*, i32** %2
%107 = call i32 @wrefresh(i32* %106)
br label %108
108: ; preds = %98
%109 = load i32, i32* %7
%110 = add nsw i32 %109, 1
store i32 %110, i32* %7
br label %82
111: ; preds = %82
br label %116
112: ; preds = %60
br label %113
113: ; preds = %112
%114 = load i32, i32* %6
%115 = add nsw i32 %114, -1
store i32 %115, i32* %6
br label %57
116: ; preds = %111, %57
br label %117
117: ; preds = %116
%118 = load i32, i32* %5
%119 = add nsw i32 %118, 1
store i32 %119, i32* %5
br label %42
120: ; preds = %55, %42
%121 = call i32 @waitms(i32 1500)
store i32 0, i32* %6
br label %122
122: ; preds = %150, %120
%123 = load i32, i32* %6
%124 = icmp slt i32 %123, 35
br i1 %124, label %125, label %153
125: ; preds = %122
store i32 0, i32* %5
br label %126
126: ; preds = %146, %125
%127 = load i32, i32* %5
%128 = icmp slt i32 %127, 100
br i1 %128, label %129, label %149
129: ; preds = %126
%130 = load i32, i32* %6
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [35 x [100 x i32]], [35 x [100 x i32]]* %9, i64 0, i64 %131
%133 = load i32, i32* %5
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [100 x i32], [100 x i32]* %132, i64 0, i64 %134
%136 = load i32, i32* %135
%137 = icmp eq i32 %136, 1
br i1 %137, label %138, label %145
138: ; preds = %129
%139 = load i32*, i32** %2
%140 = load i32, i32* %6
%141 = load i32, i32* %5
%142 = call i32 @mvwprintw(i32* %139, i32 %140, i32 %141, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%143 = load i32*, i32** %2
%144 = call i32 @wrefresh(i32* %143)
br label %145
145: ; preds = %138, %129
br label %146
146: ; preds = %145
%147 = load i32, i32* %5
%148 = add nsw i32 %147, 1
store i32 %148, i32* %5
br label %126
149: ; preds = %126
br label %150
150: ; preds = %149
%151 = load i32, i32* %6
%152 = add nsw i32 %151, 1
store i32 %152, i32* %6
br label %122
153: ; preds = %122
%154 = call i32 @waitms(i32 1500)
%155 = load i32*, i32** %2
%156 = call i32 @delwin(i32* %155)
%157 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
@.str = [2 x i8] c" \00"
@.str.1 = [2 x i8] c"O\00"
@.str.2 = [2 x i8] c"X\00"
define i32 @main() {
%1 = alloca [3500 x i32]
%2 = alloca [35 x [100 x i32]]
%3 = bitcast [3500 x i32]* %1 to i8*
%4 = bitcast [35 x [100 x i32]]* %2 to i8*
%5 = tail call i32 (...) @initscr()
%6 = tail call i32 (...) @cbreak()
%7 = load i32, i32* @stdscr
%8 = load i32, i32* @TRUE
%9 = tail call i32 @keypad(i32 %7, i32 %8)
%10 = tail call i32 (...) @noecho()
%11 = tail call i32 @curs_set(i32 0)
%12 = load i32, i32* @stdscr
%13 = tail call i32 @getmaxyx(i32 %12, i32 undef, i32 undef)
%14 = tail call i64 @time(i32* null)
%15 = trunc i64 %14 to i32
%16 = tail call i32 @srand(i32 %15)
%17 = tail call i32* @newwin(i32 undef, i32 undef, i32 0, i32 0)
br label %18
18: ; preds = %0, %18
%19 = phi i64 [ 0, %0 ], [ %23, %18 ]
%20 = tail call i32 (...) @rand()
%21 = srem i32 %20, 100
%22 = getelementptr inbounds [3500 x i32], [3500 x i32]* %1, i64 0, i64 %19
store i32 %21, i32* %22
%23 = add nuw nsw i64 %19, 1
%24 = icmp eq i64 %23, 3500
br i1 %24, label %25, label %18
25: ; preds = %18, %82
%26 = phi i64 [ %83, %82 ], [ 0, %18 ]
%27 = getelementptr inbounds [3500 x i32], [3500 x i32]* %1, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [35 x [100 x i32]], [35 x [100 x i32]]* %2, i64 0, i64 0, i64 %29
%31 = load i32, i32* %30
%32 = icmp eq i32 %31, 1
br i1 %32, label %85, label %33
33: ; preds = %25, %79
%34 = phi i32 [ %80, %79 ], [ 34, %25 ]
%35 = zext i32 %34 to i64
%36 = getelementptr inbounds [35 x [100 x i32]], [35 x [100 x i32]]* %2, i64 0, i64 %35, i64 %29
%37 = load i32, i32* %36
%38 = icmp eq i32 %37, 1
br i1 %38, label %55, label %39
39: ; preds = %73, %67, %61, %55, %33
%40 = phi i32 [ %34, %33 ], [ %56, %55 ], [ %62, %61 ], [ %68, %67 ], [ %74, %73 ]
%41 = phi i32* [ %36, %33 ], [ %58, %55 ], [ %64, %61 ], [ %70, %67 ], [ %76, %73 ]
store i32 1, i32* %41
%42 = icmp slt i32 %40, 0
br i1 %42, label %82, label %43
43: ; preds = %39
%44 = tail call i32 @mvwprintw(i32* %17, i32 0, i32 %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%45 = tail call i32 @wrefresh(i32* %17)
%46 = icmp eq i32 %40, 0
br i1 %46, label %82, label %47
47: ; preds = %43, %47
%48 = phi i32 [ %53, %47 ], [ 1, %43 ]
%49 = add nsw i32 %48, -1
%50 = tail call i32 @mvwprintw(i32* %17, i32 %49, i32 %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%51 = tail call i32 @mvwprintw(i32* %17, i32 %48, i32 %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%52 = tail call i32 @wrefresh(i32* %17)
%53 = add nuw nsw i32 %48, 1
%54 = icmp eq i32 %48, %40
br i1 %54, label %82, label %47
55: ; preds = %33
%56 = add nsw i32 %34, -1
%57 = zext i32 %56 to i64
%58 = getelementptr inbounds [35 x [100 x i32]], [35 x [100 x i32]]* %2, i64 0, i64 %57, i64 %29
%59 = load i32, i32* %58
%60 = icmp eq i32 %59, 1
br i1 %60, label %61, label %39
61: ; preds = %55
%62 = add nsw i32 %34, -2
%63 = zext i32 %62 to i64
%64 = getelementptr inbounds [35 x [100 x i32]], [35 x [100 x i32]]* %2, i64 0, i64 %63, i64 %29
%65 = load i32, i32* %64
%66 = icmp eq i32 %65, 1
br i1 %66, label %67, label %39
67: ; preds = %61
%68 = add nsw i32 %34, -3
%69 = zext i32 %68 to i64
%70 = getelementptr inbounds [35 x [100 x i32]], [35 x [100 x i32]]* %2, i64 0, i64 %69, i64 %29
%71 = load i32, i32* %70
%72 = icmp eq i32 %71, 1
br i1 %72, label %73, label %39
73: ; preds = %67
%74 = add nsw i32 %34, -4
%75 = zext i32 %74 to i64
%76 = getelementptr inbounds [35 x [100 x i32]], [35 x [100 x i32]]* %2, i64 0, i64 %75, i64 %29
%77 = load i32, i32* %76
%78 = icmp eq i32 %77, 1
br i1 %78, label %79, label %39
79: ; preds = %73
%80 = add nsw i32 %34, -5
%81 = icmp eq i32 %74, 0
br i1 %81, label %82, label %33
82: ; preds = %79, %47, %43, %39
%83 = add nuw nsw i64 %26, 1
%84 = icmp eq i64 %83, 3500
br i1 %84, label %85, label %25
85: ; preds = %25, %82
%86 = tail call i32 @waitms(i32 1500)
br label %87
87: ; preds = %85, %102
%88 = phi i64 [ 0, %85 ], [ %103, %102 ]
%89 = trunc i64 %88 to i32
br label %90
90: ; preds = %87, %99
%91 = phi i64 [ 0, %87 ], [ %100, %99 ]
%92 = getelementptr inbounds [35 x [100 x i32]], [35 x [100 x i32]]* %2, i64 0, i64 %88, i64 %91
%93 = load i32, i32* %92
%94 = icmp eq i32 %93, 1
br i1 %94, label %95, label %99
95: ; preds = %90
%96 = trunc i64 %91 to i32
%97 = tail call i32 @mvwprintw(i32* %17, i32 %89, i32 %96, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%98 = tail call i32 @wrefresh(i32* %17)
br label %99
99: ; preds = %90, %95
%100 = add nuw nsw i64 %91, 1
%101 = icmp eq i64 %100, 100
br i1 %101, label %102, label %90
102: ; preds = %99
%103 = add nuw nsw i64 %88, 1
%104 = icmp eq i64 %103, 35
br i1 %104, label %105, label %87
105: ; preds = %102
%106 = tail call i32 @waitms(i32 1500)
%107 = tail call i32 @delwin(i32* %17)
%108 = tail call i32 (...) @endwin()
ret i32 0
}