#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*/ clrvoxel(int, int, int);
int /*<<< orphan*/ delay_ms(int);
int /*<<< orphan*/ effect_axis_updown_randsuspend(int, int, int, int);
int /*<<< orphan*/ effect_blinky2();
int /*<<< orphan*/ effect_boxside_randsend_parallel(int, int, int, int);
int /*<<< orphan*/ effect_intro();
int /*<<< orphan*/ effect_planboing(int, int);
int /*<<< orphan*/ effect_rain(int);
int /*<<< orphan*/ effect_rand_patharound(int, int);
int /*<<< orphan*/ effect_random_sparkle();
int /*<<< orphan*/ effect_text(char *, int);
int /*<<< orphan*/ effect_text_up(char *, int);
int /*<<< orphan*/ effect_wormsqueeze(int, int, int, int, int);
int /*<<< orphan*/ fill(int /*<<< orphan*/);
int /*<<< orphan*/ fireworks(int, int);
int /*<<< orphan*/ gpio_ext(int);
int /*<<< orphan*/ gpio_init();
int /*<<< orphan*/ mirror_ripples(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ quad_ripples(int, int);
int /*<<< orphan*/ setvoxel(int, int, int);
int /*<<< orphan*/ side_ripples(int, int);
int /*<<< orphan*/ zoom_pyramid();
int /*<<< orphan*/ zoom_pyramid_clear();
void main() {
  int i, x, y, z, m, n;
  gpio_init();
  gpio_ext(1);
  for (y = 0; y < 8; y++) {
    for (x = 0; x < 8; x++) {
      for (z = 0; z < 8; z++) {
        setvoxel(x, y, z);
      }
      delay_ms(20);
      for (z = 0; z < 8; z++) {
        clrvoxel(x, y, z);
      }
    }
  }
  for (z = 0; z < 8; z++) {
    for (y = 0; y < 8; y++) {
      for (x = 0; x < 8; x++) {
        setvoxel(x, y, z);
        delay_ms(5);
      }
    }
  }
  fill(0);
  for (;;) {
    printf("intro\n");
    effect_intro();
    printf("wormsqueeze\n");
    effect_wormsqueeze(2, 3, -1, 100, 500);
    printf("pyramid\n");
    zoom_pyramid();
    zoom_pyramid_clear();
    printf("text\n");
    effect_text("MIPS RETROBSD", 600);
    printf("planboing\n");
    effect_planboing(3, 450);
    effect_planboing(2, 450);
    effect_planboing(1, 450);
    printf("blinky2\n");
    effect_blinky2();
    printf("mirror ripples\n");
    mirror_ripples(600, 200);
    printf("axis_updown_randsuspend\n");
    effect_axis_updown_randsuspend(3, 250, 2500, 0);
    effect_axis_updown_randsuspend(3, 250, 2500, 1);
    effect_axis_updown_randsuspend(3, 250, 2500, 0);
    effect_axis_updown_randsuspend(3, 250, 2500, 1);
    effect_axis_updown_randsuspend(1, 250, 2500, 0);
    effect_axis_updown_randsuspend(1, 250, 2500, 1);
    effect_axis_updown_randsuspend(2, 250, 2500, 0);
    effect_axis_updown_randsuspend(2, 250, 2500, 1);
    printf("rand_patharound\n");
    effect_rand_patharound(200, 250);
    printf("fireworks\n");
    fireworks(10, 250);
    printf("rain\n");
    effect_rain(100);
    printf("side ripples\n");
    side_ripples(300, 250);
    printf("text up\n");
    effect_text_up("MIPS RETROBSD", 600);
    printf("random sparkle\n");
    effect_random_sparkle();
    printf("quad ripples\n");
    quad_ripples(600, 150);
    printf("boxside_randsend_parallel\n");
    effect_boxside_randsend_parallel(1, 0, 70, 1);
    effect_boxside_randsend_parallel(1, 1, 70, 1);
    effect_boxside_randsend_parallel(2, 0, 70, 1);
    effect_boxside_randsend_parallel(2, 1, 70, 1);
    effect_boxside_randsend_parallel(3, 0, 70, 1);
    effect_boxside_randsend_parallel(3, 1, 70, 1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1180 <gpio_init@plt>
mov    $0x1,%edi
call   1120 <gpio_ext@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1345 <main+0xc5>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1332 <main+0xb2>
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    12e8 <main+0x68>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1100 <setvoxel@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12c2 <main+0x42>
mov    $0x14,%edi
call   1130 <delay_ms@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    131f <main+0x9f>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <clrvoxel@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12f9 <main+0x79>
jmp    1324 <main+0xa4>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12b1 <main+0x31>
jmp    1337 <main+0xb7>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12a0 <main+0x20>
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    13c4 <main+0x144>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    13b1 <main+0x131>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    139e <main+0x11e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1100 <setvoxel@plt>
mov    $0x5,%edi
call   1130 <delay_ms@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    136e <main+0xee>
jmp    13a3 <main+0x123>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    135d <main+0xdd>
jmp    13b6 <main+0x136>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    134c <main+0xcc>
xor    %edi,%edi
call   10d0 <fill@plt>
lea    0xc2e(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   1170 <effect_intro@plt>
lea    0xc22(%rip),%rdi
call   1080 <printf@plt>
mov    $0x2,%edi
mov    $0x3,%esi
mov    $0xffffffff,%edx
mov    $0x64,%ecx
mov    $0x1f4,%r8d
call   1090 <effect_wormsqueeze@plt>
lea    0xc04(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   1190 <zoom_pyramid@plt>
mov    $0x0,%al
call   1140 <zoom_pyramid_clear@plt>
lea    0xbf3(%rip),%rdi
call   1080 <printf@plt>
lea    0xbed(%rip),%rdi
mov    $0x258,%esi
call   10b0 <effect_text@plt>
lea    0xbea(%rip),%rdi
call   1080 <printf@plt>
mov    $0x3,%edi
mov    $0x1c2,%esi
call   10f0 <effect_planboing@plt>
mov    $0x2,%edi
mov    $0x1c2,%esi
call   10f0 <effect_planboing@plt>
mov    $0x1,%edi
mov    $0x1c2,%esi
call   10f0 <effect_planboing@plt>
lea    0xbbc(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   1060 <effect_blinky2@plt>
lea    0xbb2(%rip),%rdi
call   1080 <printf@plt>
mov    $0x258,%edi
mov    $0xc8,%esi
call   1110 <mirror_ripples@plt>
lea    0xba7(%rip),%rdi
call   1080 <printf@plt>
mov    $0x3,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
xor    %ecx,%ecx
call   1050 <effect_axis_updown_randsuspend@plt>
mov    $0x3,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
mov    $0x1,%ecx
call   1050 <effect_axis_updown_randsuspend@plt>
mov    $0x3,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
xor    %ecx,%ecx
call   1050 <effect_axis_updown_randsuspend@plt>
mov    $0x3,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
mov    $0x1,%ecx
call   1050 <effect_axis_updown_randsuspend@plt>
mov    $0x1,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
xor    %ecx,%ecx
call   1050 <effect_axis_updown_randsuspend@plt>
mov    $0x1,%ecx
mov    $0xfa,%esi
mov    $0x9c4,%edx
mov    %ecx,%edi
call   1050 <effect_axis_updown_randsuspend@plt>
mov    $0x2,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
xor    %ecx,%ecx
call   1050 <effect_axis_updown_randsuspend@plt>
mov    $0x2,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
mov    $0x1,%ecx
call   1050 <effect_axis_updown_randsuspend@plt>
lea    0xafb(%rip),%rdi
call   1080 <printf@plt>
mov    $0xc8,%edi
mov    $0xfa,%esi
call   10e0 <effect_rand_patharound@plt>
lea    0xaf1(%rip),%rdi
call   1080 <printf@plt>
mov    $0xa,%edi
mov    $0xfa,%esi
call   10a0 <fireworks@plt>
lea    0xae1(%rip),%rdi
call   1080 <printf@plt>
mov    $0x64,%edi
call   1030 <effect_rain@plt>
lea    0xad1(%rip),%rdi
call   1080 <printf@plt>
mov    $0x12c,%edi
mov    $0xfa,%esi
call   1160 <side_ripples@plt>
lea    0xac4(%rip),%rdi
call   1080 <printf@plt>
lea    0xa3d(%rip),%rdi
mov    $0x258,%esi
call   1150 <effect_text_up@plt>
lea    0xab0(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   1070 <effect_random_sparkle@plt>
lea    0xaad(%rip),%rdi
call   1080 <printf@plt>
mov    $0x258,%edi
mov    $0x96,%esi
call   10c0 <quad_ripples@plt>
lea    0xaa0(%rip),%rdi
call   1080 <printf@plt>
mov    $0x1,%ecx
xor    %esi,%esi
mov    $0x46,%edx
mov    %ecx,%edi
call   11a0 <effect_boxside_randsend_parallel@plt>
mov    $0x1,%ecx
mov    $0x46,%edx
mov    %ecx,%edi
mov    %ecx,%esi
call   11a0 <effect_boxside_randsend_parallel@plt>
mov    $0x2,%edi
xor    %esi,%esi
mov    $0x46,%edx
mov    $0x1,%ecx
call   11a0 <effect_boxside_randsend_parallel@plt>
mov    $0x2,%edi
mov    $0x1,%ecx
mov    $0x46,%edx
mov    %ecx,%esi
call   11a0 <effect_boxside_randsend_parallel@plt>
mov    $0x3,%edi
xor    %esi,%esi
mov    $0x46,%edx
mov    $0x1,%ecx
call   11a0 <effect_boxside_randsend_parallel@plt>
mov    $0x3,%edi
mov    $0x1,%ecx
mov    $0x46,%edx
mov    %ecx,%esi
call   11a0 <effect_boxside_randsend_parallel@plt>
jmp    13cb <main+0x14b>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1180 <gpio_init@plt>
mov    $0x1,%edi
call   1120 <gpio_ext@plt>
xchg   %ax,%ax
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %ebx,%esi
xor    %edx,%edx
call   1100 <setvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
call   1100 <setvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x2,%edx
call   1100 <setvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x3,%edx
call   1100 <setvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x4,%edx
call   1100 <setvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x5,%edx
call   1100 <setvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x6,%edx
call   1100 <setvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x7,%edx
call   1100 <setvoxel@plt>
mov    $0x14,%edi
call   1130 <delay_ms@plt>
mov    %ebp,%edi
mov    %ebx,%esi
xor    %edx,%edx
call   1040 <clrvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
call   1040 <clrvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x2,%edx
call   1040 <clrvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x3,%edx
call   1040 <clrvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x4,%edx
call   1040 <clrvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x5,%edx
call   1040 <clrvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x6,%edx
call   1040 <clrvoxel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x7,%edx
call   1040 <clrvoxel@plt>
add    $0x1,%ebp
cmp    $0x8,%ebp
jne    12b0 <main+0x30>
add    $0x1,%ebx
cmp    $0x8,%ebx
jne    12a0 <main+0x20>
xor    %ebx,%ebx
xchg   %ax,%ax
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %edi,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1100 <setvoxel@plt>
mov    $0x5,%edi
call   1130 <delay_ms@plt>
mov    $0x1,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1100 <setvoxel@plt>
mov    $0x5,%edi
call   1130 <delay_ms@plt>
mov    $0x2,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1100 <setvoxel@plt>
mov    $0x5,%edi
call   1130 <delay_ms@plt>
mov    $0x3,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1100 <setvoxel@plt>
mov    $0x5,%edi
call   1130 <delay_ms@plt>
mov    $0x4,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1100 <setvoxel@plt>
mov    $0x5,%edi
call   1130 <delay_ms@plt>
mov    $0x5,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1100 <setvoxel@plt>
mov    $0x5,%edi
call   1130 <delay_ms@plt>
mov    $0x6,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1100 <setvoxel@plt>
mov    $0x5,%edi
call   1130 <delay_ms@plt>
mov    $0x7,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1100 <setvoxel@plt>
mov    $0x5,%edi
call   1130 <delay_ms@plt>
add    $0x1,%ebp
cmp    $0x8,%ebp
jne    13c0 <main+0x140>
add    $0x1,%ebx
cmp    $0x8,%ebx
jne    13b0 <main+0x130>
xor    %edi,%edi
call   10d0 <fill@plt>
lea    0xb5d(%rip),%rbx
lea    0xbdb(%rip),%r15
lea    0xbe1(%rip),%r12
lea    0xbe2(%rip),%r13
lea    0xbea(%rip),%rbp
lea    0xbf0(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
lea    0xb37(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1170 <effect_intro@plt>
lea    0xb2a(%rip),%rdi
call   1050 <puts@plt>
mov    $0x2,%edi
mov    $0x3,%esi
mov    $0xffffffff,%edx
mov    $0x64,%ecx
mov    $0x1f4,%r8d
call   1090 <effect_wormsqueeze@plt>
lea    0xb0b(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1190 <zoom_pyramid@plt>
xor    %eax,%eax
call   1140 <zoom_pyramid_clear@plt>
lea    0xaf9(%rip),%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
mov    $0x258,%esi
call   10b0 <effect_text@plt>
lea    0xae5(%rip),%rdi
call   1050 <puts@plt>
mov    $0x3,%edi
mov    $0x1c2,%esi
call   10f0 <effect_planboing@plt>
mov    $0x2,%edi
mov    $0x1c2,%esi
call   10f0 <effect_planboing@plt>
mov    $0x1,%edi
mov    $0x1c2,%esi
call   10f0 <effect_planboing@plt>
lea    0xab6(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1070 <effect_blinky2@plt>
lea    0xaab(%rip),%rdi
call   1050 <puts@plt>
mov    $0x258,%edi
mov    $0xc8,%esi
call   1110 <mirror_ripples@plt>
lea    0xa9f(%rip),%rdi
call   1050 <puts@plt>
mov    $0x3,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
xor    %ecx,%ecx
call   1060 <effect_axis_updown_randsuspend@plt>
mov    $0x3,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
mov    $0x1,%ecx
call   1060 <effect_axis_updown_randsuspend@plt>
mov    $0x3,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
xor    %ecx,%ecx
call   1060 <effect_axis_updown_randsuspend@plt>
mov    $0x3,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
mov    $0x1,%ecx
call   1060 <effect_axis_updown_randsuspend@plt>
mov    $0x1,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
xor    %ecx,%ecx
call   1060 <effect_axis_updown_randsuspend@plt>
mov    $0x1,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
mov    $0x1,%ecx
call   1060 <effect_axis_updown_randsuspend@plt>
mov    $0x2,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
xor    %ecx,%ecx
call   1060 <effect_axis_updown_randsuspend@plt>
mov    $0x2,%edi
mov    $0xfa,%esi
mov    $0x9c4,%edx
mov    $0x1,%ecx
call   1060 <effect_axis_updown_randsuspend@plt>
lea    0x9ef(%rip),%rdi
call   1050 <puts@plt>
mov    $0xc8,%edi
mov    $0xfa,%esi
call   10e0 <effect_rand_patharound@plt>
lea    0x9e4(%rip),%rdi
call   1050 <puts@plt>
mov    $0xa,%edi
mov    $0xfa,%esi
call   10a0 <fireworks@plt>
lea    0x9d3(%rip),%rdi
call   1050 <puts@plt>
mov    $0x64,%edi
call   1030 <effect_rain@plt>
mov    %r15,%rdi
call   1050 <puts@plt>
mov    $0x12c,%edi
mov    $0xfa,%esi
call   1160 <side_ripples@plt>
mov    %r12,%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
mov    $0x258,%esi
call   1150 <effect_text_up@plt>
mov    %r13,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1080 <effect_random_sparkle@plt>
mov    %rbp,%rdi
call   1050 <puts@plt>
mov    $0x258,%edi
mov    $0x96,%esi
call   10c0 <quad_ripples@plt>
mov    %r14,%rdi
call   1050 <puts@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x46,%edx
mov    $0x1,%ecx
call   11a0 <effect_boxside_randsend_parallel@plt>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x46,%edx
mov    $0x1,%ecx
call   11a0 <effect_boxside_randsend_parallel@plt>
mov    $0x2,%edi
xor    %esi,%esi
mov    $0x46,%edx
mov    $0x1,%ecx
call   11a0 <effect_boxside_randsend_parallel@plt>
mov    $0x2,%edi
mov    $0x1,%esi
mov    $0x46,%edx
mov    $0x1,%ecx
call   11a0 <effect_boxside_randsend_parallel@plt>
mov    $0x3,%edi
xor    %esi,%esi
mov    $0x46,%edx
mov    $0x1,%ecx
call   11a0 <effect_boxside_randsend_parallel@plt>
mov    $0x3,%edi
mov    $0x1,%esi
mov    $0x46,%edx
mov    $0x1,%ecx
call   11a0 <effect_boxside_randsend_parallel@plt>
jmp    14d0 <main+0x250>

LLVM IR (-O0):
@.str = [7 x i8] c"intro\0A\00"
@.str.1 = [13 x i8] c"wormsqueeze\0A\00"
@.str.2 = [9 x i8] c"pyramid\0A\00"
@.str.3 = [6 x i8] c"text\0A\00"
@.str.4 = [14 x i8] c"MIPS RETROBSD\00"
@.str.5 = [11 x i8] c"planboing\0A\00"
@.str.6 = [9 x i8] c"blinky2\0A\00"
@.str.7 = [16 x i8] c"mirror ripples\0A\00"
@.str.8 = [25 x i8] c"axis_updown_randsuspend\0A\00"
@.str.9 = [17 x i8] c"rand_patharound\0A\00"
@.str.10 = [11 x i8] c"fireworks\0A\00"
@.str.11 = [6 x i8] c"rain\0A\00"
@.str.12 = [14 x i8] c"side ripples\0A\00"
@.str.13 = [9 x i8] c"text up\0A\00"
@.str.14 = [16 x i8] c"random sparkle\0A\00"
@.str.15 = [14 x i8] c"quad ripples\0A\00"
@.str.16 = [27 x i8] c"boxside_randsend_parallel\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = call i32 (...) @gpio_init()
%8 = call i32 @gpio_ext(i32 1)
store i32 0, i32* %3
br label %9
9: ; preds = %46, %0
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 8
br i1 %11, label %12, label %49
12: ; preds = %9
store i32 0, i32* %2
br label %13
13: ; preds = %42, %12
%14 = load i32, i32* %2
%15 = icmp slt i32 %14, 8
br i1 %15, label %16, label %45
16: ; preds = %13
store i32 0, i32* %4
br label %17
17: ; preds = %25, %16
%18 = load i32, i32* %4
%19 = icmp slt i32 %18, 8
br i1 %19, label %20, label %28
20: ; preds = %17
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = call i32 @setvoxel(i32 %21, i32 %22, i32 %23)
br label %25
25: ; preds = %20
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %17
28: ; preds = %17
%29 = call i32 @delay_ms(i32 20)
store i32 0, i32* %4
br label %30
30: ; preds = %38, %28
%31 = load i32, i32* %4
%32 = icmp slt i32 %31, 8
br i1 %32, label %33, label %41
33: ; preds = %30
%34 = load i32, i32* %2
%35 = load i32, i32* %3
%36 = load i32, i32* %4
%37 = call i32 @clrvoxel(i32 %34, i32 %35, i32 %36)
br label %38
38: ; preds = %33
%39 = load i32, i32* %4
%40 = add nsw i32 %39, 1
store i32 %40, i32* %4
br label %30
41: ; preds = %30
br label %42
42: ; preds = %41
%43 = load i32, i32* %2
%44 = add nsw i32 %43, 1
store i32 %44, i32* %2
br label %13
45: ; preds = %13
br label %46
46: ; preds = %45
%47 = load i32, i32* %3
%48 = add nsw i32 %47, 1
store i32 %48, i32* %3
br label %9
49: ; preds = %9
store i32 0, i32* %4
br label %50
50: ; preds = %75, %49
%51 = load i32, i32* %4
%52 = icmp slt i32 %51, 8
br i1 %52, label %53, label %78
53: ; preds = %50
store i32 0, i32* %3
br label %54
54: ; preds = %71, %53
%55 = load i32, i32* %3
%56 = icmp slt i32 %55, 8
br i1 %56, label %57, label %74
57: ; preds = %54
store i32 0, i32* %2
br label %58
58: ; preds = %67, %57
%59 = load i32, i32* %2
%60 = icmp slt i32 %59, 8
br i1 %60, label %61, label %70
61: ; preds = %58
%62 = load i32, i32* %2
%63 = load i32, i32* %3
%64 = load i32, i32* %4
%65 = call i32 @setvoxel(i32 %62, i32 %63, i32 %64)
%66 = call i32 @delay_ms(i32 5)
br label %67
67: ; preds = %61
%68 = load i32, i32* %2
%69 = add nsw i32 %68, 1
store i32 %69, i32* %2
br label %58
70: ; preds = %58
br label %71
71: ; preds = %70
%72 = load i32, i32* %3
%73 = add nsw i32 %72, 1
store i32 %73, i32* %3
br label %54
74: ; preds = %54
br label %75
75: ; preds = %74
%76 = load i32, i32* %4
%77 = add nsw i32 %76, 1
store i32 %77, i32* %4
br label %50
78: ; preds = %50
%79 = call i32 @fill(i32 0)
br label %80
80: ; preds = %80, %78
%81 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%82 = call i32 (...) @effect_intro()
%83 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%84 = call i32 @effect_wormsqueeze(i32 2, i32 3, i32 -1, i32 100, i32 500)
%85 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%86 = call i32 (...) @zoom_pyramid()
%87 = call i32 (...) @zoom_pyramid_clear()
%88 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%89 = call i32 @effect_text(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 600)
%90 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%91 = call i32 @effect_planboing(i32 3, i32 450)
%92 = call i32 @effect_planboing(i32 2, i32 450)
%93 = call i32 @effect_planboing(i32 1, i32 450)
%94 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%95 = call i32 (...) @effect_blinky2()
%96 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%97 = call i32 @mirror_ripples(i32 600, i32 200)
%98 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%99 = call i32 @effect_axis_updown_randsuspend(i32 3, i32 250, i32 2500, i32 0)
%100 = call i32 @effect_axis_updown_randsuspend(i32 3, i32 250, i32 2500, i32 1)
%101 = call i32 @effect_axis_updown_randsuspend(i32 3, i32 250, i32 2500, i32 0)
%102 = call i32 @effect_axis_updown_randsuspend(i32 3, i32 250, i32 2500, i32 1)
%103 = call i32 @effect_axis_updown_randsuspend(i32 1, i32 250, i32 2500, i32 0)
%104 = call i32 @effect_axis_updown_randsuspend(i32 1, i32 250, i32 2500, i32 1)
%105 = call i32 @effect_axis_updown_randsuspend(i32 2, i32 250, i32 2500, i32 0)
%106 = call i32 @effect_axis_updown_randsuspend(i32 2, i32 250, i32 2500, i32 1)
%107 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
%108 = call i32 @effect_rand_patharound(i32 200, i32 250)
%109 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%110 = call i32 @fireworks(i32 10, i32 250)
%111 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%112 = call i32 @effect_rain(i32 100)
%113 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
%114 = call i32 @side_ripples(i32 300, i32 250)
%115 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
%116 = call i32 @effect_text_up(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 600)
%117 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0))
%118 = call i32 (...) @effect_random_sparkle()
%119 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0))
%120 = call i32 @quad_ripples(i32 600, i32 150)
%121 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.16, i64 0, i64 0))
%122 = call i32 @effect_boxside_randsend_parallel(i32 1, i32 0, i32 70, i32 1)
%123 = call i32 @effect_boxside_randsend_parallel(i32 1, i32 1, i32 70, i32 1)
%124 = call i32 @effect_boxside_randsend_parallel(i32 2, i32 0, i32 70, i32 1)
%125 = call i32 @effect_boxside_randsend_parallel(i32 2, i32 1, i32 70, i32 1)
%126 = call i32 @effect_boxside_randsend_parallel(i32 3, i32 0, i32 70, i32 1)
%127 = call i32 @effect_boxside_randsend_parallel(i32 3, i32 1, i32 70, i32 1)
br label %80
}

LLVM IR (-O2):
@.str.4 = [14 x i8] c"MIPS RETROBSD\00"
@str = [6 x i8] c"intro\00"
@str.17 = [12 x i8] c"wormsqueeze\00"
@str.18 = [8 x i8] c"pyramid\00"
@str.19 = [5 x i8] c"text\00"
@str.20 = [10 x i8] c"planboing\00"
@str.21 = [8 x i8] c"blinky2\00"
@str.22 = [15 x i8] c"mirror ripples\00"
@str.23 = [24 x i8] c"axis_updown_randsuspend\00"
@str.24 = [16 x i8] c"rand_patharound\00"
@str.25 = [10 x i8] c"fireworks\00"
@str.26 = [5 x i8] c"rain\00"
@str.27 = [13 x i8] c"side ripples\00"
@str.28 = [8 x i8] c"text up\00"
@str.29 = [15 x i8] c"random sparkle\00"
@str.30 = [13 x i8] c"quad ripples\00"
@str.31 = [26 x i8] c"boxside_randsend_parallel\00"
define void @main() {
%1 = tail call i32 (...) @gpio_init()
%2 = tail call i32 @gpio_ext(i32 1)
br label %3
3: ; preds = %0, %26
%4 = phi i32 [ 0, %0 ], [ %27, %26 ]
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ 0, %3 ], [ %24, %5 ]
%7 = tail call i32 @setvoxel(i32 %6, i32 %4, i32 0)
%8 = tail call i32 @setvoxel(i32 %6, i32 %4, i32 1)
%9 = tail call i32 @setvoxel(i32 %6, i32 %4, i32 2)
%10 = tail call i32 @setvoxel(i32 %6, i32 %4, i32 3)
%11 = tail call i32 @setvoxel(i32 %6, i32 %4, i32 4)
%12 = tail call i32 @setvoxel(i32 %6, i32 %4, i32 5)
%13 = tail call i32 @setvoxel(i32 %6, i32 %4, i32 6)
%14 = tail call i32 @setvoxel(i32 %6, i32 %4, i32 7)
%15 = tail call i32 @delay_ms(i32 20)
%16 = tail call i32 @clrvoxel(i32 %6, i32 %4, i32 0)
%17 = tail call i32 @clrvoxel(i32 %6, i32 %4, i32 1)
%18 = tail call i32 @clrvoxel(i32 %6, i32 %4, i32 2)
%19 = tail call i32 @clrvoxel(i32 %6, i32 %4, i32 3)
%20 = tail call i32 @clrvoxel(i32 %6, i32 %4, i32 4)
%21 = tail call i32 @clrvoxel(i32 %6, i32 %4, i32 5)
%22 = tail call i32 @clrvoxel(i32 %6, i32 %4, i32 6)
%23 = tail call i32 @clrvoxel(i32 %6, i32 %4, i32 7)
%24 = add nuw nsw i32 %6, 1
%25 = icmp eq i32 %24, 8
br i1 %25, label %26, label %5
26: ; preds = %5
%27 = add nuw nsw i32 %4, 1
%28 = icmp eq i32 %27, 8
br i1 %28, label %29, label %3
29: ; preds = %26, %51
%30 = phi i32 [ %52, %51 ], [ 0, %26 ]
br label %31
31: ; preds = %29, %31
%32 = phi i32 [ 0, %29 ], [ %49, %31 ]
%33 = tail call i32 @setvoxel(i32 0, i32 %32, i32 %30)
%34 = tail call i32 @delay_ms(i32 5)
%35 = tail call i32 @setvoxel(i32 1, i32 %32, i32 %30)
%36 = tail call i32 @delay_ms(i32 5)
%37 = tail call i32 @setvoxel(i32 2, i32 %32, i32 %30)
%38 = tail call i32 @delay_ms(i32 5)
%39 = tail call i32 @setvoxel(i32 3, i32 %32, i32 %30)
%40 = tail call i32 @delay_ms(i32 5)
%41 = tail call i32 @setvoxel(i32 4, i32 %32, i32 %30)
%42 = tail call i32 @delay_ms(i32 5)
%43 = tail call i32 @setvoxel(i32 5, i32 %32, i32 %30)
%44 = tail call i32 @delay_ms(i32 5)
%45 = tail call i32 @setvoxel(i32 6, i32 %32, i32 %30)
%46 = tail call i32 @delay_ms(i32 5)
%47 = tail call i32 @setvoxel(i32 7, i32 %32, i32 %30)
%48 = tail call i32 @delay_ms(i32 5)
%49 = add nuw nsw i32 %32, 1
%50 = icmp eq i32 %49, 8
br i1 %50, label %51, label %31
51: ; preds = %31
%52 = add nuw nsw i32 %30, 1
%53 = icmp eq i32 %52, 8
br i1 %53, label %54, label %29
54: ; preds = %51
%55 = tail call i32 @fill(i32 0)
br label %56
56: ; preds = %56, %54
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%58 = tail call i32 (...) @effect_intro()
%59 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.17, i64 0, i64 0))
%60 = tail call i32 @effect_wormsqueeze(i32 2, i32 3, i32 -1, i32 100, i32 500)
%61 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.18, i64 0, i64 0))
%62 = tail call i32 (...) @zoom_pyramid()
%63 = tail call i32 (...) @zoom_pyramid_clear()
%64 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.19, i64 0, i64 0))
%65 = tail call i32 @effect_text(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 600)
%66 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.20, i64 0, i64 0))
%67 = tail call i32 @effect_planboing(i32 3, i32 450)
%68 = tail call i32 @effect_planboing(i32 2, i32 450)
%69 = tail call i32 @effect_planboing(i32 1, i32 450)
%70 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.21, i64 0, i64 0))
%71 = tail call i32 (...) @effect_blinky2()
%72 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.22, i64 0, i64 0))
%73 = tail call i32 @mirror_ripples(i32 600, i32 200)
%74 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.23, i64 0, i64 0))
%75 = tail call i32 @effect_axis_updown_randsuspend(i32 3, i32 250, i32 2500, i32 0)
%76 = tail call i32 @effect_axis_updown_randsuspend(i32 3, i32 250, i32 2500, i32 1)
%77 = tail call i32 @effect_axis_updown_randsuspend(i32 3, i32 250, i32 2500, i32 0)
%78 = tail call i32 @effect_axis_updown_randsuspend(i32 3, i32 250, i32 2500, i32 1)
%79 = tail call i32 @effect_axis_updown_randsuspend(i32 1, i32 250, i32 2500, i32 0)
%80 = tail call i32 @effect_axis_updown_randsuspend(i32 1, i32 250, i32 2500, i32 1)
%81 = tail call i32 @effect_axis_updown_randsuspend(i32 2, i32 250, i32 2500, i32 0)
%82 = tail call i32 @effect_axis_updown_randsuspend(i32 2, i32 250, i32 2500, i32 1)
%83 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.24, i64 0, i64 0))
%84 = tail call i32 @effect_rand_patharound(i32 200, i32 250)
%85 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.25, i64 0, i64 0))
%86 = tail call i32 @fireworks(i32 10, i32 250)
%87 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.26, i64 0, i64 0))
%88 = tail call i32 @effect_rain(i32 100)
%89 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.27, i64 0, i64 0))
%90 = tail call i32 @side_ripples(i32 300, i32 250)
%91 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i64 0, i64 0))
%92 = tail call i32 @effect_text_up(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 600)
%93 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.29, i64 0, i64 0))
%94 = tail call i32 (...) @effect_random_sparkle()
%95 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.30, i64 0, i64 0))
%96 = tail call i32 @quad_ripples(i32 600, i32 150)
%97 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.31, i64 0, i64 0))
%98 = tail call i32 @effect_boxside_randsend_parallel(i32 1, i32 0, i32 70, i32 1)
%99 = tail call i32 @effect_boxside_randsend_parallel(i32 1, i32 1, i32 70, i32 1)
%100 = tail call i32 @effect_boxside_randsend_parallel(i32 2, i32 0, i32 70, i32 1)
%101 = tail call i32 @effect_boxside_randsend_parallel(i32 2, i32 1, i32 70, i32 1)
%102 = tail call i32 @effect_boxside_randsend_parallel(i32 3, i32 0, i32 70, i32 1)
%103 = tail call i32 @effect_boxside_randsend_parallel(i32 3, i32 1, i32 70, i32 1)
br label %56
}