#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ print_cycle(int /*<<< orphan*/ *, unsigned int *);
int main(int argc, const char *argv[]) {
  const unsigned int vo0[5] = {1, 2, 3, 4, 5};
  const unsigned int vo1[3] = {0, 2, 5};
  const unsigned int vo2[3] = {0, 1, 3};
  const unsigned int vo3[3] = {0, 2, 4};
  const unsigned int vo4[3] = {0, 3, 5};
  const unsigned int vo5[3] = {0, 1, 4};
  const unsigned int *vos[6] = {vo0, vo1, vo2, vo3, vo4, vo5};
  const unsigned int vomax[6] = {5, 3, 3, 3, 3, 3};
  unsigned int current_path[6];
  unsigned int adjacency_path[6];
  register unsigned int path_position = 0;
  unsigned char fresh[6] = {1, 1, 1, 1, 1, 1};
  unsigned char inplay[6] = {1, 1, 1, 1, 1, 1};
  register unsigned int start = 0;
  register unsigned int fresh_found;
  register unsigned int fresh_found_adjacency;
  register unsigned int possible_fresh;
  register unsigned int possible_fresh_adjacency;
  register unsigned int local_max;
  FILE *outfile = fopen("findcy_temp.txt", "w");
  fwrite("[[0,1],[0,2],[0,3],[0,4],[0,5],[1,2],[1,5],[2,3],[3,4],[4,5]]\n", 1,
         62, outfile);
starter_loop:
  if (start != 4) {
    inplay[start] = 0;
    fresh[0] = inplay[0];
    fresh[1] = inplay[1];
    fresh[2] = inplay[2];
    fresh[3] = inplay[3];
    fresh[4] = inplay[4];
    fresh[5] = inplay[5];
    current_path[0] = start;
    current_path[1] = 0;
    current_path[2] = 0;
    current_path[3] = 0;
    current_path[4] = 0;
    current_path[5] = 0;
    adjacency_path[0] = 0;
    adjacency_path[1] = 0;
    adjacency_path[2] = 0;
    adjacency_path[3] = 0;
    adjacency_path[4] = 0;
    adjacency_path[5] = 0;
    fresh_found = 0;
    fresh_found_adjacency = 0;
    path_position = 0;
  begin_stepper : {
    local_max = vomax[current_path[path_position]];
    possible_fresh_adjacency = adjacency_path[path_position];
  begin_find_fresh : {
    possible_fresh = vos[current_path[path_position]][possible_fresh_adjacency];
    if (possible_fresh_adjacency != local_max) {
      if (possible_fresh == start) {
        if (path_position > 1) {
          print_cycle(outfile, current_path);
        } else {
          ;
        }
        possible_fresh_adjacency++;
        goto begin_find_fresh;
      } else {
        if (fresh[possible_fresh] &&
            (possible_fresh_adjacency >= adjacency_path[path_position])) {
          fresh_found = possible_fresh;
          fresh_found_adjacency = possible_fresh_adjacency;
          possible_fresh_adjacency++;
          goto begin_check_for_cycle;
        }
      }
      possible_fresh_adjacency++;
      goto begin_find_fresh;
    } else {
      goto end_find_fresh;
    }
  }
  end_find_fresh:
    goto step_back;
  begin_check_for_cycle : {
    if (possible_fresh_adjacency != local_max) {
      possible_fresh =
          vos[current_path[path_position]][possible_fresh_adjacency];
      if (possible_fresh == start) {
        if (path_position > 1) {
          print_cycle(outfile, current_path);
        } else {
          ;
        }
        goto end_check_for_cycle;
      }
      possible_fresh_adjacency++;
      goto begin_check_for_cycle;
    } else {
      goto end_check_for_cycle;
    }
  }
  end_check_for_cycle:
    goto step_forward;
  step_forward:
    adjacency_path[path_position] = fresh_found_adjacency;
    path_position++;
    current_path[path_position] = fresh_found;
    fresh[fresh_found] = 0;
    goto begin_stepper;
  step_back:
    if (path_position == 0) {
      goto end_stepper;
    } else {
      fresh[current_path[path_position]] = 1;
      current_path[path_position] = 0;
      adjacency_path[path_position] = 0;
      path_position--;
      adjacency_path[path_position]++;
      goto begin_stepper;
    }
  }
  end_stepper:;
    start++;
    goto starter_loop;
  } else {
    fwrite("DONE.", 1, 5, outfile);
    fclose(outfile);
    return 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xea0(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe9d(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe9b(%rip),%eax
mov    %eax,-0x20(%rbp)
mov    0xe95(%rip),%rax
mov    %rax,-0x3c(%rbp)
mov    0xe93(%rip),%eax
mov    %eax,-0x34(%rbp)
mov    0xe8d(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe8b(%rip),%eax
mov    %eax,-0x40(%rbp)
mov    0xe85(%rip),%rax
mov    %rax,-0x54(%rbp)
mov    0xe83(%rip),%eax
mov    %eax,-0x4c(%rbp)
mov    0xe7d(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe7b(%rip),%eax
mov    %eax,-0x58(%rbp)
mov    0xe75(%rip),%rax
mov    %rax,-0x6c(%rbp)
mov    0xe73(%rip),%eax
mov    %eax,-0x64(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0xa0(%rbp)
lea    -0x3c(%rbp),%rax
mov    %rax,-0x98(%rbp)
lea    -0x48(%rbp),%rax
mov    %rax,-0x90(%rbp)
lea    -0x54(%rbp),%rax
mov    %rax,-0x88(%rbp)
lea    -0x60(%rbp),%rax
mov    %rax,-0x80(%rbp)
lea    -0x6c(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    0xe31(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0xe2b(%rip),%rax
mov    %rax,-0xb8(%rbp)
mov    0xe25(%rip),%rax
mov    %rax,-0xb0(%rbp)
movl   $0x0,-0x104(%rbp)
mov    0xe16(%rip),%eax
mov    %eax,-0x10a(%rbp)
mov    0xe0d(%rip),%ax
mov    %ax,-0x106(%rbp)
mov    0xe02(%rip),%eax
mov    %eax,-0x110(%rbp)
mov    0xdf9(%rip),%ax
mov    %ax,-0x10c(%rbp)
movl   $0x0,-0x114(%rbp)
lea    0xde3(%rip),%rdi
lea    0xdec(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x130(%rbp)
mov    -0x130(%rbp),%rcx
lea    0xdd4(%rip),%rdi
mov    $0x1,%esi
mov    $0x3e,%edx
call   1060 <fwrite@plt>
cmpl   $0x4,-0x114(%rbp)
je     1653 <main+0x513>
mov    -0x114(%rbp),%eax
movb   $0x0,-0x110(%rbp,%rax,1)
mov    -0x110(%rbp),%al
mov    %al,-0x10a(%rbp)
mov    -0x10f(%rbp),%al
mov    %al,-0x109(%rbp)
mov    -0x10e(%rbp),%al
mov    %al,-0x108(%rbp)
mov    -0x10d(%rbp),%al
mov    %al,-0x107(%rbp)
mov    -0x10c(%rbp),%al
mov    %al,-0x106(%rbp)
mov    -0x10b(%rbp),%al
mov    %al,-0x105(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0xe0(%rbp)
movl   $0x0,-0xdc(%rbp)
movl   $0x0,-0xd8(%rbp)
movl   $0x0,-0xd4(%rbp)
movl   $0x0,-0xd0(%rbp)
movl   $0x0,-0xcc(%rbp)
movl   $0x0,-0x100(%rbp)
movl   $0x0,-0xfc(%rbp)
movl   $0x0,-0xf8(%rbp)
movl   $0x0,-0xf4(%rbp)
movl   $0x0,-0xf0(%rbp)
movl   $0x0,-0xec(%rbp)
movl   $0x0,-0x118(%rbp)
movl   $0x0,-0x11c(%rbp)
movl   $0x0,-0x104(%rbp)
mov    -0x104(%rbp),%eax
mov    -0xe0(%rbp,%rax,4),%eax
mov    -0xc0(%rbp,%rax,4),%eax
mov    %eax,-0x128(%rbp)
mov    -0x104(%rbp),%eax
mov    -0x100(%rbp,%rax,4),%eax
mov    %eax,-0x124(%rbp)
mov    -0x104(%rbp),%eax
mov    -0xe0(%rbp,%rax,4),%eax
mov    -0xa0(%rbp,%rax,8),%rax
ff
mov    -0x124(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x120(%rbp)
mov    -0x124(%rbp),%eax
cmp    -0x128(%rbp),%eax
je     14e4 <main+0x3a4>
mov    -0x120(%rbp),%eax
cmp    -0x114(%rbp),%eax
jne    146f <main+0x32f>
cmpl   $0x1,-0x104(%rbp)
jbe    1456 <main+0x316>
mov    -0x130(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1040 <print_cycle@plt>
jmp    145b <main+0x31b>
jmp    145b <main+0x31b>
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    13e9 <main+0x2a9>
mov    -0x120(%rbp),%eax
movzbl -0x10a(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     14cb <main+0x38b>
mov    -0x124(%rbp),%eax
mov    -0x104(%rbp),%ecx
cmp    -0x100(%rbp,%rcx,4),%eax
jb     14cb <main+0x38b>
mov    -0x120(%rbp),%eax
mov    %eax,-0x118(%rbp)
mov    -0x124(%rbp),%eax
mov    %eax,-0x11c(%rbp)
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    14ee <main+0x3ae>
jmp    14d0 <main+0x390>
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    13e9 <main+0x2a9>
jmp    14e9 <main+0x3a9>
jmp    15cb <main+0x48b>
mov    -0x124(%rbp),%eax
cmp    -0x128(%rbp),%eax
je     1579 <main+0x439>
mov    -0x104(%rbp),%eax
mov    -0xe0(%rbp,%rax,4),%eax
mov    -0xa0(%rbp,%rax,8),%rax
ff
mov    -0x124(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x120(%rbp)
mov    -0x120(%rbp),%eax
cmp    -0x114(%rbp),%eax
jne    1565 <main+0x425>
cmpl   $0x1,-0x104(%rbp)
jbe    155b <main+0x41b>
mov    -0x130(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1040 <print_cycle@plt>
jmp    1560 <main+0x420>
jmp    1560 <main+0x420>
jmp    157e <main+0x43e>
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    14ee <main+0x3ae>
jmp    157e <main+0x43e>
jmp    1583 <main+0x443>
mov    -0x11c(%rbp),%ecx
mov    -0x104(%rbp),%eax
mov    %ecx,-0x100(%rbp,%rax,4)
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
mov    -0x118(%rbp),%ecx
mov    -0x104(%rbp),%eax
mov    %ecx,-0xe0(%rbp,%rax,4)
mov    -0x118(%rbp),%eax
movb   $0x0,-0x10a(%rbp,%rax,1)
jmp    13bc <main+0x27c>
cmpl   $0x0,-0x104(%rbp)
jne    15dd <main+0x49d>
jmp    163f <main+0x4ff>
mov    -0x104(%rbp),%eax
mov    -0xe0(%rbp,%rax,4),%eax
movb   $0x1,-0x10a(%rbp,%rax,1)
01
mov    -0x104(%rbp),%eax
movl   $0x0,-0xe0(%rbp,%rax,4)
mov    -0x104(%rbp),%eax
movl   $0x0,-0x100(%rbp,%rax,4)
mov    -0x104(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x104(%rbp)
mov    -0x104(%rbp),%eax
mov    -0x100(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x100(%rbp,%rax,4)
jmp    13bc <main+0x27c>
mov    -0x114(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
jmp    12c1 <main+0x181>
mov    -0x130(%rbp),%rcx
lea    0xa64(%rip),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1060 <fwrite@plt>
mov    -0x130(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
mov    0xeb9(%rip),%eax
mov    %eax,0xf0(%rsp)
movaps 0xe9b(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
mov    0xea9(%rip),%eax
mov    %eax,0xa8(%rsp)
mov    0xe93(%rip),%rax
mov    %rax,0xa0(%rsp)
mov    0xe99(%rip),%eax
mov    %eax,0x98(%rsp)
mov    0xe83(%rip),%rax
mov    %rax,0x90(%rsp)
mov    0xe89(%rip),%eax
mov    %eax,0x88(%rsp)
mov    0xe73(%rip),%rax
mov    %rax,0x80(%rsp)
mov    0xe79(%rip),%eax
mov    %eax,0x78(%rsp)
mov    0xe66(%rip),%rax
mov    %rax,0x70(%rsp)
mov    0xe6f(%rip),%eax
mov    %eax,0x68(%rsp)
mov    0xe5c(%rip),%rax
mov    %rax,0x60(%rsp)
lea    0xe0(%rsp),%rax
mov    %rax,0xb0(%rsp)
lea    0xa0(%rsp),%rax
mov    %rax,0xb8(%rsp)
lea    0x90(%rsp),%rax
mov    %rax,0xc0(%rsp)
lea    0x80(%rsp),%rax
mov    %rax,0xc8(%rsp)
lea    0x70(%rsp),%rax
mov    %rax,0xd0(%rsp)
lea    0x60(%rsp),%rax
mov    %rax,0xd8(%rsp)
movw   $0x101,0x8(%rsp)
movl   $0x1010101,0x4(%rsp)
01
lea    0xe0b(%rip),%rdi
lea    0xe14(%rip),%rsi
call   1050 <fopen@plt>
lea    0xe0a(%rip),%rdi
mov    $0x1,%esi
mov    $0x3e,%edx
mov    %rax,0x10(%rsp)
mov    %rax,%rcx
call   1060 <fwrite@plt>
xor    %esi,%esi
jmp    129e <main+0x15e>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
cmp    $0x4,%rsi
je     140a <main+0x2ca>
movb   $0x0,0x4(%rsp,%rsi,1)
movzwl 0x4(%rsp),%eax
mov    %ax,0xa(%rsp)
mov    0x6(%rsp),%eax
mov    %eax,0xc(%rsp)
mov    %esi,0x20(%rsp)
lea    0x24(%rsp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,(%rax)
movl   $0x0,0x10(%rax)
movaps %xmm0,0x40(%rsp)
movq   $0x0,0x50(%rsp)
xor    %r14d,%r14d
mov    %esi,%ebx
xor    %eax,%eax
mov    %rsi,0x18(%rsp)
jmp    1300 <main+0x1c0>
mov    %r15d,0x40(%rsp,%rbp,4)
lea    0x1(%rbp),%eax
mov    %ebx,0x20(%rsp,%rax,4)
movb   $0x0,0xa(%rsp,%rbx,1)
mov    0x40(%rsp,%rax,4),%r14d
nopl   (%rax)
mov    %eax,%ebp
mov    %ebx,%eax
lea    0xd45(%rip),%rcx
mov    (%rcx,%rax,4),%r13d
cmp    %r13d,%r14d
jne    1350 <main+0x210>
mov    %ebx,%ecx
test   %rbp,%rbp
je     1290 <main+0x150>
mov    %ecx,%eax
movb   $0x1,0xa(%rsp,%rax,1)
movl   $0x0,0x20(%rsp,%rbp,4)
movl   $0x0,0x40(%rsp,%rbp,4)
lea    -0x1(%rbp),%eax
mov    0x40(%rsp,%rax,4),%r14d
add    $0x1,%r14d
mov    %r14d,0x40(%rsp,%rax,4)
mov    0x20(%rsp,%rax,4),%ebx
jmp    1300 <main+0x1c0>
nopl   (%rax)
mov    0xb0(%rsp,%rax,8),%rax
mov    %r14d,%ecx
lea    (%rax,%rcx,4),%rdx
lea    0x1(%r14),%r12d
mov    %ebx,%ecx
mov    %r14d,%r15d
jmp    138f <main+0x24f>
nopw   0x0(%rax,%rax,1)
mov    0x20(%rsp,%rbp,4),%ecx
add    $0x1,%r15d
mov    %ecx,%eax
mov    0xb0(%rsp,%rax,8),%rax
lea    (%rax,%r15,4),%rdx
add    $0x1,%r12d
cmp    %r15d,%r13d
je     1316 <main+0x1d6>
mov    (%rdx),%ebx
cmp    %rbx,%rsi
jne    13c0 <main+0x280>
cmp    $0x2,%ebp
jb     1370 <main+0x230>
mov    0x10(%rsp),%rdi
lea    0x20(%rsp),%rsi
call   1040 <print_cycle@plt>
mov    0x18(%rsp),%rsi
jmp    1370 <main+0x230>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpb   $0x0,0xa(%rsp,%rbx,1)
je     1374 <main+0x234>
cmp    %r14d,%r15d
jb     1374 <main+0x234>
nopl   0x0(%rax)
cmp    %r12d,%r13d
je     12e7 <main+0x1a7>
mov    %r12d,%ecx
mov    (%rax,%rcx,4),%ecx
add    $0x1,%r12d
cmp    %rcx,%rsi
jne    13d0 <main+0x290>
cmp    $0x2,%ebp
jb     12e7 <main+0x1a7>
mov    0x10(%rsp),%rdi
lea    0x20(%rsp),%rsi
call   1040 <print_cycle@plt>
mov    0x18(%rsp),%rsi
jmp    12e7 <main+0x1a7>
lea    0xca8(%rip),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
mov    0x10(%rsp),%rbx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.vo0 = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@__const.main.vo1 = [3 x i32] [i32 0, i32 2, i32 5]
@__const.main.vo2 = [3 x i32] [i32 0, i32 1, i32 3]
@__const.main.vo3 = [3 x i32] [i32 0, i32 2, i32 4]
@__const.main.vo4 = [3 x i32] [i32 0, i32 3, i32 5]
@__const.main.vo5 = [3 x i32] [i32 0, i32 1, i32 4]
@__const.main.vomax = [6 x i32] [i32 5, i32 3, i32 3, i32 3, i32 3, i32 3]
@__const.main.fresh = [6 x i8] c"\01\01\01\01\01\01"
@__const.main.inplay = [6 x i8] c"\01\01\01\01\01\01"
@.str = [16 x i8] c"findcy_temp.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [63 x i8] c"[[0,1],[0,2],[0,3],[0,4],[0,5],[1,2],[1,5],[2,3],[3,4],[4,5]]\0A\00"
@.str.3 = [6 x i8] c"DONE.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x i32]
%7 = alloca [3 x i32]
%8 = alloca [3 x i32]
%9 = alloca [3 x i32]
%10 = alloca [3 x i32]
%11 = alloca [3 x i32]
%12 = alloca [6 x i32*]
%13 = alloca [6 x i32]
%14 = alloca [6 x i32]
%15 = alloca [6 x i32]
%16 = alloca i32
%17 = alloca [6 x i8]
%18 = alloca [6 x i8]
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%26 = bitcast [5 x i32]* %6 to i8*
%27 = bitcast [3 x i32]* %7 to i8*
%28 = bitcast [3 x i32]* %8 to i8*
%29 = bitcast [3 x i32]* %9 to i8*
%30 = bitcast [3 x i32]* %10 to i8*
%31 = bitcast [3 x i32]* %11 to i8*
%32 = getelementptr inbounds [6 x i32*], [6 x i32*]* %12, i64 0, i64 0
%33 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
store i32* %33, i32** %32
%34 = getelementptr inbounds i32*, i32** %32, i64 1
%35 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 0
store i32* %35, i32** %34
%36 = getelementptr inbounds i32*, i32** %34, i64 1
%37 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 0
store i32* %37, i32** %36
%38 = getelementptr inbounds i32*, i32** %36, i64 1
%39 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
store i32* %39, i32** %38
%40 = getelementptr inbounds i32*, i32** %38, i64 1
%41 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
store i32* %41, i32** %40
%42 = getelementptr inbounds i32*, i32** %40, i64 1
%43 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
store i32* %43, i32** %42
%44 = bitcast [6 x i32]* %13 to i8*
store i32 0, i32* %16
%45 = bitcast [6 x i8]* %17 to i8*
%46 = bitcast [6 x i8]* %18 to i8*
store i32 0, i32* %19
%47 = call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %47, i32** %25
%48 = load i32*, i32** %25
%49 = call i32 @fwrite(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 62, i32* %48)
br label %50
50: ; preds = %226, %2
%51 = load i32, i32* %19
%52 = icmp ne i32 %51, 4
br i1 %52, label %53, label %229
53: ; preds = %50
%54 = load i32, i32* %19
%55 = zext i32 %54 to i64
%56 = getelementptr inbounds [6 x i8], [6 x i8]* %18, i64 0, i64 %55
store i8 0, i8* %56
%57 = getelementptr inbounds [6 x i8], [6 x i8]* %18, i64 0, i64 0
%58 = load i8, i8* %57
%59 = getelementptr inbounds [6 x i8], [6 x i8]* %17, i64 0, i64 0
store i8 %58, i8* %59
%60 = getelementptr inbounds [6 x i8], [6 x i8]* %18, i64 0, i64 1
%61 = load i8, i8* %60
%62 = getelementptr inbounds [6 x i8], [6 x i8]* %17, i64 0, i64 1
store i8 %61, i8* %62
%63 = getelementptr inbounds [6 x i8], [6 x i8]* %18, i64 0, i64 2
%64 = load i8, i8* %63
%65 = getelementptr inbounds [6 x i8], [6 x i8]* %17, i64 0, i64 2
store i8 %64, i8* %65
%66 = getelementptr inbounds [6 x i8], [6 x i8]* %18, i64 0, i64 3
%67 = load i8, i8* %66
%68 = getelementptr inbounds [6 x i8], [6 x i8]* %17, i64 0, i64 3
store i8 %67, i8* %68
%69 = getelementptr inbounds [6 x i8], [6 x i8]* %18, i64 0, i64 4
%70 = load i8, i8* %69
%71 = getelementptr inbounds [6 x i8], [6 x i8]* %17, i64 0, i64 4
store i8 %70, i8* %71
%72 = getelementptr inbounds [6 x i8], [6 x i8]* %18, i64 0, i64 5
%73 = load i8, i8* %72
%74 = getelementptr inbounds [6 x i8], [6 x i8]* %17, i64 0, i64 5
store i8 %73, i8* %74
%75 = load i32, i32* %19
%76 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 0
store i32 %75, i32* %76
%77 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 1
store i32 0, i32* %77
%78 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 2
store i32 0, i32* %78
%79 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 3
store i32 0, i32* %79
%80 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 4
store i32 0, i32* %80
%81 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 5
store i32 0, i32* %81
%82 = getelementptr inbounds [6 x i32], [6 x i32]* %15, i64 0, i64 0
store i32 0, i32* %82
%83 = getelementptr inbounds [6 x i32], [6 x i32]* %15, i64 0, i64 1
store i32 0, i32* %83
%84 = getelementptr inbounds [6 x i32], [6 x i32]* %15, i64 0, i64 2
store i32 0, i32* %84
%85 = getelementptr inbounds [6 x i32], [6 x i32]* %15, i64 0, i64 3
store i32 0, i32* %85
%86 = getelementptr inbounds [6 x i32], [6 x i32]* %15, i64 0, i64 4
store i32 0, i32* %86
%87 = getelementptr inbounds [6 x i32], [6 x i32]* %15, i64 0, i64 5
store i32 0, i32* %87
store i32 0, i32* %20
store i32 0, i32* %21
store i32 0, i32* %16
br label %88
88: ; preds = %206, %188, %53
%89 = load i32, i32* %16
%90 = zext i32 %89 to i64
%91 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 %90
%92 = load i32, i32* %91
%93 = zext i32 %92 to i64
%94 = getelementptr inbounds [6 x i32], [6 x i32]* %13, i64 0, i64 %93
%95 = load i32, i32* %94
store i32 %95, i32* %24
%96 = load i32, i32* %16
%97 = zext i32 %96 to i64
%98 = getelementptr inbounds [6 x i32], [6 x i32]* %15, i64 0, i64 %97
%99 = load i32, i32* %98
store i32 %99, i32* %23
br label %100
100: ; preds = %150, %127, %88
%101 = load i32, i32* %16
%102 = zext i32 %101 to i64
%103 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 %102
%104 = load i32, i32* %103
%105 = zext i32 %104 to i64
%106 = getelementptr inbounds [6 x i32*], [6 x i32*]* %12, i64 0, i64 %105
%107 = load i32*, i32** %106
%108 = load i32, i32* %23
%109 = zext i32 %108 to i64
%110 = getelementptr inbounds i32, i32* %107, i64 %109
%111 = load i32, i32* %110
store i32 %111, i32* %22
%112 = load i32, i32* %23
%113 = load i32, i32* %24
%114 = icmp ne i32 %112, %113
br i1 %114, label %115, label %153
115: ; preds = %100
%116 = load i32, i32* %22
%117 = load i32, i32* %19
%118 = icmp eq i32 %116, %117
br i1 %118, label %119, label %130
119: ; preds = %115
%120 = load i32, i32* %16
%121 = icmp ugt i32 %120, 1
br i1 %121, label %122, label %126
122: ; preds = %119
%123 = load i32*, i32** %25
%124 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 0
%125 = call i32 @print_cycle(i32* %123, i32* %124)
br label %127
126: ; preds = %119
br label %127
127: ; preds = %126, %122
%128 = load i32, i32* %23
%129 = add i32 %128, 1
store i32 %129, i32* %23
br label %100
130: ; preds = %115
%131 = load i32, i32* %22
%132 = zext i32 %131 to i64
%133 = getelementptr inbounds [6 x i8], [6 x i8]* %17, i64 0, i64 %132
%134 = load i8, i8* %133
%135 = zext i8 %134 to i32
%136 = icmp ne i32 %135, 0
br i1 %136, label %137, label %149
137: ; preds = %130
%138 = load i32, i32* %23
%139 = load i32, i32* %16
%140 = zext i32 %139 to i64
%141 = getelementptr inbounds [6 x i32], [6 x i32]* %15, i64 0, i64 %140
%142 = load i32, i32* %141
%143 = icmp uge i32 %138, %142
br i1 %143, label %144, label %149
144: ; preds = %137
%145 = load i32, i32* %22
store i32 %145, i32* %20
%146 = load i32, i32* %23
store i32 %146, i32* %21
%147 = load i32, i32* %23
%148 = add i32 %147, 1
store i32 %148, i32* %23
br label %155
149: ; preds = %137, %130
br label %150
150: ; preds = %149
%151 = load i32, i32* %23
%152 = add i32 %151, 1
store i32 %152, i32* %23
br label %100
153: ; preds = %100
br label %154
154: ; preds = %153
br label %202
155: ; preds = %183, %144
%156 = load i32, i32* %23
%157 = load i32, i32* %24
%158 = icmp ne i32 %156, %157
br i1 %158, label %159, label %186
159: ; preds = %155
%160 = load i32, i32* %16
%161 = zext i32 %160 to i64
%162 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 %161
%163 = load i32, i32* %162
%164 = zext i32 %163 to i64
%165 = getelementptr inbounds [6 x i32*], [6 x i32*]* %12, i64 0, i64 %164
%166 = load i32*, i32** %165
%167 = load i32, i32* %23
%168 = zext i32 %167 to i64
%169 = getelementptr inbounds i32, i32* %166, i64 %168
%170 = load i32, i32* %169
store i32 %170, i32* %22
%171 = load i32, i32* %22
%172 = load i32, i32* %19
%173 = icmp eq i32 %171, %172
br i1 %173, label %174, label %183
174: ; preds = %159
%175 = load i32, i32* %16
%176 = icmp ugt i32 %175, 1
br i1 %176, label %177, label %181
177: ; preds = %174
%178 = load i32*, i32** %25
%179 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 0
%180 = call i32 @print_cycle(i32* %178, i32* %179)
br label %182
181: ; preds = %174
br label %182
182: ; preds = %181, %177
br label %187
183: ; preds = %159
%184 = load i32, i32* %23
%185 = add i32 %184, 1
store i32 %185, i32* %23
br label %155
186: ; preds = %155
br label %187
187: ; preds = %186, %182
br label %188
188: ; preds = %187
%189 = load i32, i32* %21
%190 = load i32, i32* %16
%191 = zext i32 %190 to i64
%192 = getelementptr inbounds [6 x i32], [6 x i32]* %15, i64 0, i64 %191
store i32 %189, i32* %192
%193 = load i32, i32* %16
%194 = add i32 %193, 1
store i32 %194, i32* %16
%195 = load i32, i32* %20
%196 = load i32, i32* %16
%197 = zext i32 %196 to i64
%198 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 %197
store i32 %195, i32* %198
%199 = load i32, i32* %20
%200 = zext i32 %199 to i64
%201 = getelementptr inbounds [6 x i8], [6 x i8]* %17, i64 0, i64 %200
store i8 0, i8* %201
br label %88
202: ; preds = %154
%203 = load i32, i32* %16
%204 = icmp eq i32 %203, 0
br i1 %204, label %205, label %206
205: ; preds = %202
br label %226
206: ; preds = %202
%207 = load i32, i32* %16
%208 = zext i32 %207 to i64
%209 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 %208
%210 = load i32, i32* %209
%211 = zext i32 %210 to i64
%212 = getelementptr inbounds [6 x i8], [6 x i8]* %17, i64 0, i64 %211
store i8 1, i8* %212
%213 = load i32, i32* %16
%214 = zext i32 %213 to i64
%215 = getelementptr inbounds [6 x i32], [6 x i32]* %14, i64 0, i64 %214
store i32 0, i32* %215
%216 = load i32, i32* %16
%217 = zext i32 %216 to i64
%218 = getelementptr inbounds [6 x i32], [6 x i32]* %15, i64 0, i64 %217
store i32 0, i32* %218
%219 = load i32, i32* %16
%220 = add i32 %219, -1
store i32 %220, i32* %16
%221 = load i32, i32* %16
%222 = zext i32 %221 to i64
%223 = getelementptr inbounds [6 x i32], [6 x i32]* %15, i64 0, i64 %222
%224 = load i32, i32* %223
%225 = add i32 %224, 1
store i32 %225, i32* %223
br label %88
226: ; preds = %205
%227 = load i32, i32* %19
%228 = add i32 %227, 1
store i32 %228, i32* %19
br label %50
229: ; preds = %50
%230 = load i32*, i32** %25
%231 = call i32 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 5, i32* %230)
%232 = load i32*, i32** %25
%233 = call i32 @fclose(i32* %232)
ret i32 0
}

LLVM IR (-O2):
@__const.main.vo0 = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@__const.main.vo1 = [3 x i32] [i32 0, i32 2, i32 5]
@__const.main.vo2 = [3 x i32] [i32 0, i32 1, i32 3]
@__const.main.vo3 = [3 x i32] [i32 0, i32 2, i32 4]
@__const.main.vo4 = [3 x i32] [i32 0, i32 3, i32 5]
@__const.main.vo5 = [3 x i32] [i32 0, i32 1, i32 4]
@__const.main.vomax = [6 x i32] [i32 5, i32 3, i32 3, i32 3, i32 3, i32 3]
@.str = [16 x i8] c"findcy_temp.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [63 x i8] c"[[0,1],[0,2],[0,3],[0,4],[0,5],[1,2],[1,5],[2,3],[3,4],[4,5]]\0A\00"
@.str.3 = [6 x i8] c"DONE.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i32]
%4 = alloca [3 x i32]
%5 = alloca [3 x i32]
%6 = alloca [3 x i32]
%7 = alloca [3 x i32]
%8 = alloca [3 x i32]
%9 = alloca [6 x i32*]
%10 = alloca [6 x i32]
%11 = alloca [6 x i32]
%12 = alloca [6 x i8]
%13 = alloca [6 x i8]
%14 = bitcast [5 x i32]* %3 to i8*
%15 = bitcast [3 x i32]* %4 to i8*
%16 = bitcast [3 x i32]* %5 to i8*
%17 = bitcast [3 x i32]* %6 to i8*
%18 = bitcast [3 x i32]* %7 to i8*
%19 = bitcast [3 x i32]* %8 to i8*
%20 = bitcast [6 x i32*]* %9 to i8*
%21 = getelementptr inbounds [6 x i32*], [6 x i32*]* %9, i64 0, i64 0
%22 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
store i32* %22, i32** %21
%23 = getelementptr inbounds [6 x i32*], [6 x i32*]* %9, i64 0, i64 1
%24 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
store i32* %24, i32** %23
%25 = getelementptr inbounds [6 x i32*], [6 x i32*]* %9, i64 0, i64 2
%26 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
store i32* %26, i32** %25
%27 = getelementptr inbounds [6 x i32*], [6 x i32*]* %9, i64 0, i64 3
%28 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32* %28, i32** %27
%29 = getelementptr inbounds [6 x i32*], [6 x i32*]* %9, i64 0, i64 4
%30 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 0
store i32* %30, i32** %29
%31 = getelementptr inbounds [6 x i32*], [6 x i32*]* %9, i64 0, i64 5
%32 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 0
store i32* %32, i32** %31
%33 = bitcast [6 x i32]* %10 to i8*
%34 = bitcast [6 x i32]* %11 to i8*
%35 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 0
%36 = getelementptr inbounds [6 x i8], [6 x i8]* %13, i64 0, i64 0
%37 = call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%38 = call i32 @fwrite(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 62, i32* %37)
%39 = getelementptr inbounds [6 x i8], [6 x i8]* %13, i64 0, i64 1
%40 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 1
%41 = getelementptr inbounds [6 x i8], [6 x i8]* %13, i64 0, i64 2
%42 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 2
%43 = getelementptr inbounds [6 x i8], [6 x i8]* %13, i64 0, i64 3
%44 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 3
%45 = getelementptr inbounds [6 x i8], [6 x i8]* %13, i64 0, i64 4
%46 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 4
%47 = getelementptr inbounds [6 x i8], [6 x i8]* %13, i64 0, i64 5
%48 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 5
%49 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 0
%50 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 1
%51 = bitcast i32* %50 to i8*
%52 = bitcast [6 x i32]* %11 to i8*
br label %53
53: ; preds = %2, %147
%54 = phi i64 [ 0, %2 ], [ %148, %147 ]
%55 = getelementptr inbounds [6 x i8], [6 x i8]* %13, i64 0, i64 %54
store i8 0, i8* %55
%56 = load i8, i8* %36
store i8 %56, i8* %35
%57 = load i8, i8* %39
store i8 %57, i8* %40
%58 = load i8, i8* %41
store i8 %58, i8* %42
%59 = load i8, i8* %43
store i8 %59, i8* %44
%60 = load i8, i8* %45
store i8 %60, i8* %46
%61 = load i8, i8* %47
store i8 %61, i8* %48
%62 = trunc i64 %54 to i32
store i32 %62, i32* %49
br label %63
63: ; preds = %130, %53
%64 = phi i32 [ 0, %53 ], [ %131, %130 ]
%65 = phi i32 [ %62, %53 ], [ %132, %130 ]
%66 = phi i32 [ 0, %53 ], [ %133, %130 ]
%67 = zext i32 %66 to i64
%68 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 %67
%69 = zext i32 %65 to i64
%70 = getelementptr inbounds [6 x i32], [6 x i32]* @__const.main.vomax, i64 0, i64 %69
%71 = load i32, i32* %70
%72 = getelementptr inbounds [6 x i32], [6 x i32]* %11, i64 0, i64 %67
%73 = getelementptr inbounds [6 x i32*], [6 x i32*]* %9, i64 0, i64 %69
%74 = load i32*, i32** %73
%75 = icmp eq i32 %64, %71
br i1 %75, label %134, label %76
76: ; preds = %63
%77 = zext i32 %64 to i64
%78 = getelementptr inbounds i32, i32* %74, i64 %77
%79 = icmp ugt i32 %66, 1
br label %80
80: ; preds = %76, %93
%81 = phi i32 [ %65, %76 ], [ %94, %93 ]
%82 = phi i32* [ %78, %76 ], [ %100, %93 ]
%83 = phi i32* [ %74, %76 ], [ %98, %93 ]
%84 = phi i32 [ %64, %76 ], [ %95, %93 ]
%85 = load i32, i32* %82
%86 = zext i32 %85 to i64
%87 = icmp eq i64 %54, %86
br i1 %87, label %88, label %102
88: ; preds = %80
br i1 %79, label %89, label %91
89: ; preds = %88
%90 = call i32 @print_cycle(i32* %37, i32* %49)
br label %91
91: ; preds = %88, %89
%92 = load i32, i32* %68
br label %93
93: ; preds = %102, %91
%94 = phi i32 [ %92, %91 ], [ %81, %102 ]
%95 = add i32 %84, 1
%96 = zext i32 %94 to i64
%97 = getelementptr inbounds [6 x i32*], [6 x i32*]* %9, i64 0, i64 %96
%98 = load i32*, i32** %97
%99 = zext i32 %95 to i64
%100 = getelementptr inbounds i32, i32* %98, i64 %99
%101 = icmp eq i32 %95, %71
br i1 %101, label %134, label %80
102: ; preds = %80
%103 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 %86
%104 = load i8, i8* %103
%105 = icmp eq i8 %104, 0
%106 = icmp ult i32 %84, %64
%107 = select i1 %105, i1 true, i1 %106
br i1 %107, label %93, label %108
108: ; preds = %102
%109 = zext i32 %85 to i64
%110 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 %109
br label %111
111: ; preds = %108, %115
%112 = phi i32 [ %113, %115 ], [ %84, %108 ]
%113 = add i32 %112, 1
%114 = icmp eq i32 %113, %71
br i1 %114, label %124, label %115
115: ; preds = %111
%116 = zext i32 %113 to i64
%117 = getelementptr inbounds i32, i32* %83, i64 %116
%118 = load i32, i32* %117
%119 = zext i32 %118 to i64
%120 = icmp eq i64 %54, %119
br i1 %120, label %121, label %111
121: ; preds = %115
br i1 %79, label %122, label %124
122: ; preds = %121
%123 = call i32 @print_cycle(i32* %37, i32* %49)
br label %124
124: ; preds = %111, %121, %122
store i32 %84, i32* %72
%125 = add i32 %66, 1
%126 = zext i32 %125 to i64
%127 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 %126
store i32 %85, i32* %127
store i8 0, i8* %110
%128 = getelementptr inbounds [6 x i32], [6 x i32]* %11, i64 0, i64 %126
%129 = load i32, i32* %128
br label %130
130: ; preds = %124, %137
%131 = phi i32 [ %129, %124 ], [ %144, %137 ]
%132 = phi i32 [ %85, %124 ], [ %146, %137 ]
%133 = phi i32 [ %125, %124 ], [ %140, %137 ]
br label %63
134: ; preds = %93, %63
%135 = phi i32 [ %65, %63 ], [ %94, %93 ]
%136 = icmp eq i32 %66, 0
br i1 %136, label %147, label %137
137: ; preds = %134
%138 = zext i32 %135 to i64
%139 = getelementptr inbounds [6 x i8], [6 x i8]* %12, i64 0, i64 %138
store i8 1, i8* %139
store i32 0, i32* %68
store i32 0, i32* %72
%140 = add i32 %66, -1
%141 = zext i32 %140 to i64
%142 = getelementptr inbounds [6 x i32], [6 x i32]* %11, i64 0, i64 %141
%143 = load i32, i32* %142
%144 = add i32 %143, 1
store i32 %144, i32* %142
%145 = getelementptr inbounds [6 x i32], [6 x i32]* %10, i64 0, i64 %141
%146 = load i32, i32* %145
br label %130
147: ; preds = %134
%148 = add nuw nsw i64 %54, 1
%149 = icmp eq i64 %148, 4
br i1 %149, label %150, label %53
150: ; preds = %147
%151 = call i32 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 5, i32* %37)
%152 = call i32 @fclose(i32* %37)
ret i32 0
}