#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*/ delay_ms(int);
int /*<<< orphan*/ draw_positions_axis(char, unsigned char *,
                                       int /*<<< orphan*/);
int rand();
void effect_boxside_randsend_parallel(char axis, int origin, int delay,
                                      int mode) {
  int i;
  int done;
  unsigned char cubepos[64];
  unsigned char pos[64];
  int notdone = 1;
  int notdone2 = 1;
  int sent = 0;
  for (i = 0; i < 64; i++) {
    pos[i] = 0;
  }
  while (notdone) {
    if (mode == 1) {
      notdone2 = 1;
      while (notdone2 && sent < 64) {
        i = rand() % 64;
        if (pos[i] == 0) {
          sent++;
          pos[i] += 1;
          notdone2 = 0;
        }
      }
    } else if (mode == 2) {
      if (sent < 64) {
        pos[sent] += 1;
        sent++;
      }
    }
    done = 0;
    for (i = 0; i < 64; i++) {
      if (pos[i] > 0 && pos[i] < 7) {
        pos[i] += 1;
      }
      if (pos[i] == 7)
        done++;
    }
    if (done == 64)
      notdone = 0;
    for (i = 0; i < 64; i++) {
      if (origin == 0) {
        cubepos[i] = pos[i];
      } else {
        cubepos[i] = (7 - pos[i]);
      }
    }
    delay_ms(delay);
    draw_positions_axis(axis, cubepos, 0);
  }
}


x86 assembly (clang, -O0):
<effect_boxside_randsend_parallel>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x1,-0xa4(%rbp)
movl   $0x1,-0xa8(%rbp)
movl   $0x0,-0xac(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jge    1193 <effect_boxside_randsend_parallel+0x63>
movslq -0x14(%rbp),%rax
movb   $0x0,-0xa0(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116f <effect_boxside_randsend_parallel+0x3f>
jmp    1198 <effect_boxside_randsend_parallel+0x68>
cmpl   $0x0,-0xa4(%rbp)
je     13b8 <effect_boxside_randsend_parallel+0x288>
cmpl   $0x1,-0x10(%rbp)
jne    1251 <effect_boxside_randsend_parallel+0x121>
movl   $0x1,-0xa8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xa8(%rbp)
mov    %al,-0xad(%rbp)
je     11de <effect_boxside_randsend_parallel+0xae>
cmpl   $0x40,-0xac(%rbp)
setl   %al
mov    %al,-0xad(%rbp)
mov    -0xad(%rbp),%al
test   $0x1,%al
jne    11f1 <effect_boxside_randsend_parallel+0xc1>
jmp    124c <effect_boxside_randsend_parallel+0x11c>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
movslq -0x14(%rbp),%rax
movzbl -0xa0(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
jne    1247 <effect_boxside_randsend_parallel+0x117>
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
movslq -0x14(%rbp),%rax
movzbl -0xa0(%rbp,%rax,1),%ecx
ff
add    $0x1,%ecx
mov    %cl,-0xa0(%rbp,%rax,1)
movl   $0x0,-0xa8(%rbp)
jmp    11b9 <effect_boxside_randsend_parallel+0x89>
jmp    129a <effect_boxside_randsend_parallel+0x16a>
cmpl   $0x2,-0x10(%rbp)
jne    1295 <effect_boxside_randsend_parallel+0x165>
cmpl   $0x40,-0xac(%rbp)
jge    1290 <effect_boxside_randsend_parallel+0x160>
movslq -0xac(%rbp),%rax
movzbl -0xa0(%rbp,%rax,1),%ecx
ff
add    $0x1,%ecx
mov    %cl,-0xa0(%rbp,%rax,1)
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
jmp    1295 <effect_boxside_randsend_parallel+0x165>
jmp    129a <effect_boxside_randsend_parallel+0x16a>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jge    1323 <effect_boxside_randsend_parallel+0x1f3>
movslq -0x14(%rbp),%rax
movzbl -0xa0(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
jle    12f2 <effect_boxside_randsend_parallel+0x1c2>
movslq -0x14(%rbp),%rax
movzbl -0xa0(%rbp,%rax,1),%eax
ff
cmp    $0x7,%eax
jge    12f2 <effect_boxside_randsend_parallel+0x1c2>
movslq -0x14(%rbp),%rax
movzbl -0xa0(%rbp,%rax,1),%ecx
ff
add    $0x1,%ecx
mov    %cl,-0xa0(%rbp,%rax,1)
movslq -0x14(%rbp),%rax
movzbl -0xa0(%rbp,%rax,1),%eax
ff
cmp    $0x7,%eax
jne    1310 <effect_boxside_randsend_parallel+0x1e0>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1315 <effect_boxside_randsend_parallel+0x1e5>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12a8 <effect_boxside_randsend_parallel+0x178>
cmpl   $0x40,-0x18(%rbp)
jne    1337 <effect_boxside_randsend_parallel+0x207>
movl   $0x0,-0xa4(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jge    139a <effect_boxside_randsend_parallel+0x26a>
cmpl   $0x0,-0x8(%rbp)
jne    136a <effect_boxside_randsend_parallel+0x23a>
movslq -0x14(%rbp),%rax
mov    -0xa0(%rbp,%rax,1),%cl
movslq -0x14(%rbp),%rax
mov    %cl,-0x60(%rbp,%rax,1)
jmp    1387 <effect_boxside_randsend_parallel+0x257>
movslq -0x14(%rbp),%rax
movzbl -0xa0(%rbp,%rax,1),%ecx
ff
mov    $0x7,%eax
sub    %ecx,%eax
mov    %al,%cl
movslq -0x14(%rbp),%rax
mov    %cl,-0x60(%rbp,%rax,1)
jmp    138c <effect_boxside_randsend_parallel+0x25c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    133e <effect_boxside_randsend_parallel+0x20e>
mov    -0xc(%rbp),%edi
call   1040 <delay_ms@plt>
mov    -0x1(%rbp),%al
lea    -0x60(%rbp),%rsi
xor    %edx,%edx
movsbl %al,%edi
call   1030 <draw_positions_axis@plt>
jmp    1198 <effect_boxside_randsend_parallel+0x68>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<effect_boxside_randsend_parallel>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %ecx,%ebx
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%r13d
pxor   %xmm0,%xmm0
movdqa %xmm0,0x30(%rsp)
movdqa %xmm0,0x20(%rsp)
movdqa %xmm0,0x10(%rsp)
movdqa %xmm0,(%rsp)
pcmpeqd %xmm6,%xmm6
movdqa 0xe8c(%rip),%xmm8
movdqa 0xe93(%rip),%xmm9
movdqa 0xe9b(%rip),%xmm7
xor    %ebp,%ebp
jmp    11ed <effect_boxside_randsend_parallel+0xbd>
nopl   0x0(%rax)
pshufd $0xee,%xmm0,%xmm2
paddd  %xmm0,%xmm2
pshufd $0x55,%xmm2,%xmm0
paddd  %xmm2,%xmm0
movd   %xmm0,%r12d
movdqa %xmm1,0x70(%rsp)
mov    %r14d,%edi
call   1040 <delay_ms@plt>
movsbl %r13b,%edi
lea    0x40(%rsp),%rsi
xor    %edx,%edx
call   1030 <draw_positions_axis@plt>
cmp    $0x40,%r12d
pcmpeqd %xmm6,%xmm6
movdqa 0xe2a(%rip),%xmm8
movdqa 0xe31(%rip),%xmm9
movdqa 0xe39(%rip),%xmm7
je     13d1 <effect_boxside_randsend_parallel+0x2a1>
cmp    $0x1,%ebx
jne    1250 <effect_boxside_randsend_parallel+0x120>
cmp    $0x3f,%ebp
jg     1264 <effect_boxside_randsend_parallel+0x134>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <rand@plt>
lea    0x3f(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffffc0,%ecx
sub    %ecx,%eax
cltq
cmpb   $0x0,(%rsp,%rax,1)
jne    1200 <effect_boxside_randsend_parallel+0xd0>
add    $0x1,%ebp
movb   $0x1,(%rsp,%rax,1)
pcmpeqd %xmm6,%xmm6
movdqa 0xdd0(%rip),%xmm8
movdqa 0xdd7(%rip),%xmm9
movdqa 0xddf(%rip),%xmm7
jmp    1264 <effect_boxside_randsend_parallel+0x134>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0x2,%ebx
jne    1264 <effect_boxside_randsend_parallel+0x134>
cmp    $0x3f,%ebp
jg     1264 <effect_boxside_randsend_parallel+0x134>
movslq %ebp,%rax
addb   $0x1,(%rsp,%rax,1)
add    $0x1,%ebp
pxor   %xmm0,%xmm0
xor    %eax,%eax
jmp    129f <effect_boxside_randsend_parallel+0x16f>
nopl   0x0(%rax)
pand   %xmm1,%xmm2
pandn  %xmm3,%xmm1
por    %xmm2,%xmm1
pcmpeqb %xmm9,%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
pand   %xmm7,%xmm1
paddd  %xmm1,%xmm0
add    $0x4,%rax
cmp    $0x40,%rax
je     1330 <effect_boxside_randsend_parallel+0x200>
movd   (%rsp,%rax,1),%xmm2
movdqa %xmm2,%xmm3
paddb  %xmm6,%xmm3
movdqa %xmm3,%xmm1
pmaxub %xmm8,%xmm1
pcmpeqb %xmm3,%xmm1
movdqa %xmm2,%xmm3
psubb  %xmm6,%xmm3
movd   %xmm1,%ecx
not    %cl
test   $0x1,%cl
je     12d3 <effect_boxside_randsend_parallel+0x1a3>
movd   %xmm3,%ecx
mov    %cl,(%rsp,%rax,1)
movdqa %xmm1,%xmm4
pxor   %xmm6,%xmm4
movdqa %xmm4,%xmm5
psllq  $0x18,%xmm5
pextrw $0x2,%xmm5,%ecx
test   $0x1,%cl
je     12f6 <effect_boxside_randsend_parallel+0x1c6>
movd   %xmm3,%ecx
mov    %ch,0x1(%rsp,%rax,1)
pextrw $0x1,%xmm4,%ecx
test   $0x1,%cl
je     130b <effect_boxside_randsend_parallel+0x1db>
movd   %xmm3,%ecx
shr    $0x10,%ecx
mov    %cl,0x2(%rsp,%rax,1)
pslldq $0x9,%xmm4
pextrw $0x6,%xmm4,%ecx
test   $0x1,%cl
je     1270 <effect_boxside_randsend_parallel+0x140>
movd   %xmm3,%ecx
shr    $0x18,%ecx
mov    %cl,0x3(%rsp,%rax,1)
jmp    1270 <effect_boxside_randsend_parallel+0x140>
xchg   %ax,%ax
movdqa (%rsp),%xmm4
movdqa 0x10(%rsp),%xmm3
movdqa 0x20(%rsp),%xmm2
movdqa 0x30(%rsp),%xmm1
test   %r15d,%r15d
jne    1370 <effect_boxside_randsend_parallel+0x240>
movdqa %xmm4,0x40(%rsp)
jne    1388 <effect_boxside_randsend_parallel+0x258>
movdqa %xmm3,0x50(%rsp)
jne    13a0 <effect_boxside_randsend_parallel+0x270>
movdqa %xmm2,0x60(%rsp)
je     1190 <effect_boxside_randsend_parallel+0x60>
jmp    13bc <effect_boxside_randsend_parallel+0x28c>
nopw   0x0(%rax,%rax,1)
movdqa 0xcb8(%rip),%xmm5
psubb  %xmm4,%xmm5
movdqa %xmm5,%xmm4
movdqa %xmm4,0x40(%rsp)
je     1354 <effect_boxside_randsend_parallel+0x224>
movdqa 0xca0(%rip),%xmm4
psubb  %xmm3,%xmm4
movdqa %xmm4,%xmm3
movdqa %xmm3,0x50(%rsp)
je     135c <effect_boxside_randsend_parallel+0x22c>
movdqa 0xc88(%rip),%xmm3
psubb  %xmm2,%xmm3
movdqa %xmm3,%xmm2
movdqa %xmm2,0x60(%rsp)
je     1190 <effect_boxside_randsend_parallel+0x60>
movdqa 0xc6c(%rip),%xmm2
psubb  %xmm1,%xmm2
movdqa %xmm2,%xmm1
jmp    1190 <effect_boxside_randsend_parallel+0x60>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @effect_boxside_randsend_parallel(i8 signext %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [64 x i8]
%6 = alloca [64 x i8]
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%10 = icmp eq i32 %3, 1
%11 = icmp eq i32 %3, 2
%12 = icmp eq i32 %1, 0
%13 = bitcast [64 x i8]* %6 to <16 x i8>*
%14 = bitcast [64 x i8]* %5 to <16 x i8>*
%15 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 16
%16 = bitcast i8* %15 to <16 x i8>*
%17 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 16
%18 = bitcast i8* %17 to <16 x i8>*
%19 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 32
%20 = bitcast i8* %19 to <16 x i8>*
%21 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 32
%22 = bitcast i8* %21 to <16 x i8>*
%23 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 48
%24 = bitcast i8* %23 to <16 x i8>*
%25 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 48
%26 = bitcast i8* %25 to <16 x i8>*
br label %27
27: ; preds = %4, %89
%28 = phi i32 [ 0, %4 ], [ %50, %89 ]
%29 = icmp slt i32 %28, 64
br i1 %10, label %30, label %41
30: ; preds = %27
br i1 %29, label %31, label %49
31: ; preds = %30, %31
%32 = call i32 (...) @rand()
%33 = srem i32 %32, 64
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 %34
%36 = load i8, i8* %35
%37 = icmp eq i8 %36, 0
br i1 %37, label %38, label %31
38: ; preds = %31
%39 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 %34
%40 = add nsw i32 %28, 1
store i8 1, i8* %39
br label %49
41: ; preds = %27
%42 = select i1 %11, i1 %29, i1 false
br i1 %42, label %43, label %49
43: ; preds = %41
%44 = sext i32 %28 to i64
%45 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 %44
%46 = load i8, i8* %45
%47 = add i8 %46, 1
store i8 %47, i8* %45
%48 = add nsw i32 %28, 1
br label %49
49: ; preds = %43, %41, %30, %38
%50 = phi i32 [ %48, %43 ], [ %28, %41 ], [ %28, %30 ], [ %40, %38 ]
br label %51
51: ; preds = %82, %49
%52 = phi i64 [ 0, %49 ], [ %87, %82 ]
%53 = phi <4 x i32> [ zeroinitializer, %49 ], [ %86, %82 ]
%54 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 %52
%55 = bitcast i8* %54 to <4 x i8>*
%56 = load <4 x i8>, <4 x i8>* %55
%57 = add <4 x i8> %56, <i8 -1, i8 -1, i8 -1, i8 -1>
%58 = icmp ult <4 x i8> %57, <i8 6, i8 6, i8 6, i8 6>
%59 = add nuw nsw <4 x i8> %56, <i8 1, i8 1, i8 1, i8 1>
%60 = extractelement <4 x i1> %58, i64 0
br i1 %60, label %61, label %64
61: ; preds = %51
%62 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 %52
%63 = extractelement <4 x i8> %59, i64 0
store i8 %63, i8* %62
br label %64
64: ; preds = %61, %51
%65 = extractelement <4 x i1> %58, i64 1
br i1 %65, label %66, label %70
66: ; preds = %64
%67 = or i64 %52, 1
%68 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 %67
%69 = extractelement <4 x i8> %59, i64 1
store i8 %69, i8* %68
br label %70
70: ; preds = %66, %64
%71 = extractelement <4 x i1> %58, i64 2
br i1 %71, label %72, label %76
72: ; preds = %70
%73 = or i64 %52, 2
%74 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 %73
%75 = extractelement <4 x i8> %59, i64 2
store i8 %75, i8* %74
br label %76
76: ; preds = %72, %70
%77 = extractelement <4 x i1> %58, i64 3
br i1 %77, label %78, label %82
78: ; preds = %76
%79 = or i64 %52, 3
%80 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 %79
%81 = extractelement <4 x i8> %59, i64 3
store i8 %81, i8* %80
br label %82
82: ; preds = %78, %76
%83 = select <4 x i1> %58, <4 x i8> %59, <4 x i8> %56
%84 = icmp eq <4 x i8> %83, <i8 7, i8 7, i8 7, i8 7>
%85 = zext <4 x i1> %84 to <4 x i32>
%86 = add <4 x i32> %53, %85
%87 = add nuw i64 %52, 4
%88 = icmp eq i64 %87, 64
br i1 %88, label %89, label %51
89: ; preds = %82
%90 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %86)
%91 = load <16 x i8>, <16 x i8>* %13
%92 = sub <16 x i8> <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>, %91
%93 = select i1 %12, <16 x i8> %91, <16 x i8> %92
store <16 x i8> %93, <16 x i8>* %14
%94 = load <16 x i8>, <16 x i8>* %16
%95 = sub <16 x i8> <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>, %94
%96 = select i1 %12, <16 x i8> %94, <16 x i8> %95
store <16 x i8> %96, <16 x i8>* %18
%97 = load <16 x i8>, <16 x i8>* %20
%98 = sub <16 x i8> <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>, %97
%99 = select i1 %12, <16 x i8> %97, <16 x i8> %98
store <16 x i8> %99, <16 x i8>* %22
%100 = load <16 x i8>, <16 x i8>* %24
%101 = sub <16 x i8> <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>, %100
%102 = select i1 %12, <16 x i8> %100, <16 x i8> %101
store <16 x i8> %102, <16 x i8>* %26
%103 = icmp eq i32 %90, 64
%104 = call i32 @delay_ms(i32 %2)
%105 = call i32 @draw_positions_axis(i8 signext %0, i8* %8, i32 0)
br i1 %103, label %106, label %27
106: ; preds = %89
ret void
}