#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*/ copy_list(int *, int *, int);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ from_base_image(int *, int, int *, int, int *, int, int,
                                   int *);
int /*<<< orphan*/ isid(int *, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ one_orbit(int, int *, int, int, int *, int *);
int onpoints(int, int *, int);
scalar_t__ property(int *, int, int, int *, int);
int *realloc(int *, int);
int /*<<< orphan*/ stabilizer(int *, int, int *, int, int, int *, int *);
void generate(int *base, int bl, int *GS, int m, int n, int prop, int *info,
              int infol, int s, int i, int *list, int ll, int **GSK, int *mK,
              int *mark, int *num) {
  int *g = (int *)malloc(n * sizeof(int));
  int *stab = (int *)malloc(m * n * sizeof(int)), sl;
  int *orbit = (int *)malloc(n * sizeof(int)), ol;
  int *tmp = (int *)malloc(n * sizeof(int));
  int j, gamma;
  from_base_image(list, ll, base, bl, GS, m, n, g);
  if (i == bl + 1) {
    (*num)++;
    if (!isid(g, n) && property(g, n, prop, info, infol)) {
      if (*mK >= m) {
        *GSK = realloc(*GSK, (*mK + 1) * n * sizeof(int));
      }
      copy_list(g, (*GSK) + (*mK) * n, n);
      (*mK)++;
      *mark = 1;
    }
  } else {
    stabilizer(base, i - 1, GS, m, n, stab, &sl);
    one_orbit(base[i - 1], stab, sl, n, orbit, &ol);
    for (j = 0; j < ol; j++) {
      gamma = onpoints(orbit[j], g, n);
      if (prop == 1 && onpoints(list[ll - 1], info, n) != gamma && ll < infol)
        continue;
      copy_list(list, tmp, ll);
      tmp[ll] = gamma;
      generate(base, bl, GS, m, n, prop, info, infol, s, i + 1, tmp, ll + 1,
               GSK, mK, mark, num);
      if (*mark)
        break;
    }
  }
  free(g);
  free(stab);
  free(orbit);
  free(tmp);
}


x86 assembly (clang, -O0):
<generate>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x30(%rbp)
mov    %esi,-0x34(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %ecx,-0x44(%rbp)
mov    %r8d,-0x48(%rbp)
mov    %r9d,-0x4c(%rbp)
movslq -0x48(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x44(%rbp),%eax
imul   -0x48(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x60(%rbp)
movslq -0x48(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x70(%rbp)
movslq -0x48(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x80(%rbp)
mov    0x30(%rbp),%rdi
mov    0x38(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x34(%rbp),%ecx
mov    -0x40(%rbp),%r8
mov    -0x44(%rbp),%r9d
mov    -0x48(%rbp),%r10d
mov    -0x58(%rbp),%rax
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <from_base_image@plt>
mov    0x28(%rbp),%eax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jne    1347 <generate+0x197>
mov    0x58(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x58(%rbp),%rdi
mov    -0x48(%rbp),%esi
call   10b0 <isid@plt>
cmp    $0x0,%eax
jne    1342 <generate+0x192>
mov    -0x58(%rbp),%rdi
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    0x10(%rbp),%rcx
mov    0x18(%rbp),%r8d
call   1040 <property@plt>
cmp    $0x0,%rax
je     1342 <generate+0x192>
mov    0x48(%rbp),%rax
mov    (%rax),%eax
cmp    -0x44(%rbp),%eax
jl     1307 <generate+0x157>
mov    0x40(%rbp),%rax
mov    (%rax),%rdi
mov    0x48(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
imul   -0x48(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%esi
call   1080 <realloc@plt>
mov    %rax,%rcx
mov    0x40(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x58(%rbp),%rdi
mov    0x40(%rbp),%rax
mov    (%rax),%rsi
mov    0x48(%rbp),%rax
mov    (%rax),%eax
imul   -0x48(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x48(%rbp),%edx
call   10a0 <copy_list@plt>
mov    0x48(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    0x50(%rbp),%rax
movl   $0x1,(%rax)
jmp    1503 <generate+0x353>
mov    -0x30(%rbp),%rdi
mov    0x28(%rbp),%esi
sub    $0x1,%esi
mov    -0x40(%rbp),%rdx
mov    -0x44(%rbp),%ecx
mov    -0x48(%rbp),%r8d
mov    -0x60(%rbp),%r9
lea    -0x64(%rbp),%rax
mov    %rax,(%rsp)
call   1090 <stabilizer@plt>
mov    -0x30(%rbp),%rax
mov    0x28(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x60(%rbp),%rsi
mov    -0x64(%rbp),%edx
mov    -0x48(%rbp),%ecx
mov    -0x70(%rbp),%r8
lea    -0x74(%rbp),%r9
call   1060 <one_orbit@plt>
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    14fe <generate+0x34e>
mov    -0x70(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x58(%rbp),%rsi
mov    -0x48(%rbp),%edx
call   10c0 <onpoints@plt>
mov    %eax,-0x88(%rbp)
cmpl   $0x1,-0x4c(%rbp)
jne    1410 <generate+0x260>
mov    0x30(%rbp),%rax
mov    0x38(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edi
mov    0x10(%rbp),%rsi
mov    -0x48(%rbp),%edx
call   10c0 <onpoints@plt>
cmp    -0x88(%rbp),%eax
je     1410 <generate+0x260>
mov    0x38(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    1410 <generate+0x260>
jmp    14ea <generate+0x33a>
mov    0x30(%rbp),%rdi
mov    -0x80(%rbp),%rsi
mov    0x38(%rbp),%edx
call   10a0 <copy_list@plt>
mov    -0x88(%rbp),%edx
mov    -0x80(%rbp),%rax
movslq 0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x40(%rbp),%rdx
mov    -0x44(%rbp),%ecx
mov    -0x48(%rbp),%r8d
mov    -0x4c(%rbp),%r9d
mov    0x10(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    0x18(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    0x20(%rbp),%r13d
mov    0x28(%rbp),%r12d
add    $0x1,%r12d
mov    -0x80(%rbp),%r15
mov    0x38(%rbp),%r14d
add    $0x1,%r14d
mov    0x40(%rbp),%rbx
mov    0x48(%rbp),%r11
mov    0x50(%rbp),%r10
mov    0x58(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0xa0(%rbp),%rax
mov    %rax,(%rsp)
mov    -0x94(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0x90(%rbp),%rax
mov    %r13d,0x10(%rsp)
mov    %r12d,0x18(%rsp)
mov    %r15,0x20(%rsp)
mov    %r14d,0x28(%rsp)
mov    %rbx,0x30(%rsp)
mov    %r11,0x38(%rsp)
mov    %r10,0x40(%rsp)
mov    %rax,0x48(%rsp)
call   10d0 <generate@plt>
mov    0x50(%rbp),%rax
cmpl   $0x0,(%rax)
je     14e5 <generate+0x335>
jmp    14fe <generate+0x34e>
jmp    14ea <generate+0x33a>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    139e <generate+0x1ee>
jmp    1503 <generate+0x353>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9d,0x20(%rsp)
mov    %r8d,%r14d
mov    %ecx,%ebx
mov    %rdx,0x28(%rsp)
mov    %esi,%r12d
mov    %rdi,%r15
lea    0x0(,%r14,4),%ebp
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    %ebx,%edi
imul   %r14d,%edi
shl    $0x2,%edi
call   1070 <malloc@plt>
mov    %rax,0x40(%rsp)
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    %ebp,0x18(%rsp)
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,%r13
mov    0xc0(%rsp),%rdi
mov    0xc8(%rsp),%esi
mov    %r15,%rdx
mov    %r12d,%ecx
mov    0x28(%rsp),%r8
mov    %ebx,0xc(%rsp)
mov    %ebx,%r9d
mov    0x10(%rsp),%rbx
push   %rbx
push   %r14
call   1050 <from_base_image@plt>
add    $0x10,%rsp
mov    %r12,0x60(%rsp)
lea    0x1(%r12),%eax
mov    0xb8(%rsp),%r12d
cmp    %r12d,%eax
jne    1312 <generate+0x162>
mov    0xc(%rsp),%r12d
mov    0xe8(%rsp),%rax
addl   $0x1,(%rax)
mov    %rbx,%rdi
mov    %r14d,%esi
call   10b0 <isid@plt>
test   %eax,%eax
mov    0x20(%rsp),%edx
jne    14a4 <generate+0x2f4>
mov    0x10(%rsp),%rdi
mov    %r14d,%esi
mov    0xa0(%rsp),%rcx
mov    0xa8(%rsp),%r8d
call   1040 <property@plt>
test   %rax,%rax
je     14a4 <generate+0x2f4>
mov    0xd8(%rsp),%r15
mov    (%r15),%ecx
mov    0xd0(%rsp),%rbp
mov    0x0(%rbp),%rax
cmp    %r12d,%ecx
jl     12e3 <generate+0x133>
add    $0x1,%ecx
mov    0x18(%rsp),%esi
imul   %ecx,%esi
mov    %rax,%rdi
call   1080 <realloc@plt>
mov    %rax,0x0(%rbp)
mov    (%r15),%ecx
mov    0x10(%rsp),%rdi
imul   %r14d,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rsi
mov    %r14d,%edx
call   10a0 <copy_list@plt>
addl   $0x1,(%r15)
mov    0xe0(%rsp),%rax
movl   $0x1,(%rax)
jmp    14a4 <generate+0x2f4>
lea    -0x1(%r12),%esi
sub    $0x8,%rsp
lea    0x44(%rsp),%rax
mov    %r15,%rdi
mov    0x30(%rsp),%rdx
mov    0x14(%rsp),%ecx
mov    %r14d,%r8d
mov    0x48(%rsp),%rbp
mov    %rbp,%r9
push   %rax
call   1090 <stabilizer@plt>
add    $0x10,%rsp
mov    %r12,0x18(%rsp)
movslq %r12d,%rax
mov    %r15,0x58(%rsp)
mov    -0x4(%r15,%rax,4),%edi
mov    0x3c(%rsp),%edx
lea    0x24(%rsp),%r9
mov    %rbp,%rsi
mov    %r14d,%ecx
mov    0x30(%rsp),%r8
call   1060 <one_orbit@plt>
cmpl   $0x0,0x24(%rsp)
mov    0x20(%rsp),%ebx
jle    14a4 <generate+0x2f4>
mov    0xc8(%rsp),%eax
mov    %rax,%rcx
add    $0xffffffff,%eax
cltq
mov    %rax,0x48(%rsp)
movslq %ecx,%rax
mov    %rax,0x50(%rsp)
mov    0x18(%rsp),%rax
add    $0x1,%eax
mov    %rax,0x18(%rsp)
lea    0x1(%rcx),%r15d
xor    %r12d,%r12d
jmp    1444 <generate+0x294>
mov    0xc0(%rsp),%rdi
mov    %r13,%rsi
mov    0xc8(%rsp),%edx
call   10a0 <copy_list@plt>
mov    0x50(%rsp),%rax
mov    %ebp,0x0(%r13,%rax,4)
mov    0x58(%rsp),%rdi
mov    0x60(%rsp),%rsi
mov    0x28(%rsp),%rdx
mov    0xc(%rsp),%ecx
mov    %r14d,%r8d
mov    %ebx,%r9d
push   0xe8(%rsp)
mov    0xe8(%rsp),%rbp
push   %rbp
push   0xe8(%rsp)
push   0xe8(%rsp)
push   %r15
push   %r13
push   0x48(%rsp)
mov    0xe8(%rsp),%eax
push   %rax
mov    0xe8(%rsp),%eax
push   %rax
push   0xe8(%rsp)
call   10d0 <generate@plt>
add    $0x50,%rsp
cmpl   $0x0,0x0(%rbp)
jne    14a4 <generate+0x2f4>
add    $0x1,%r12
movslq 0x24(%rsp),%rax
cmp    %rax,%r12
jge    14a4 <generate+0x2f4>
mov    0x30(%rsp),%rax
mov    (%rax,%r12,4),%edi
mov    0x10(%rsp),%rsi
mov    %r14d,%edx
call   10c0 <onpoints@plt>
mov    %eax,%ebp
cmp    $0x1,%ebx
jne    13b0 <generate+0x200>
mov    0xc0(%rsp),%rax
mov    0x48(%rsp),%rcx
mov    (%rax,%rcx,4),%edi
mov    0xa0(%rsp),%rsi
mov    %r14d,%edx
call   10c0 <onpoints@plt>
mov    0xa8(%rsp),%ecx
mov    0xc8(%rsp),%edx
cmp    %ecx,%edx
jge    13b0 <generate+0x200>
cmp    %ebp,%eax
jne    1436 <generate+0x286>
jmp    13b0 <generate+0x200>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x40(%rsp),%rdi
call   1030 <free@plt>
mov    0x30(%rsp),%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @generate(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4, i32 %5, i32* %6, i32 %7, i32 %8, i32 %9, i32* %10, i32 %11, i32** nocapture %12, i32* nocapture %13, i32* nocapture %14, i32* nocapture %15) {
%17 = alloca i32
%18 = alloca i32
%19 = shl i32 %4, 2
%20 = tail call i64 @malloc(i32 %19)
%21 = inttoptr i64 %20 to i32*
%22 = shl i32 %3, 2
%23 = mul i32 %22, %4
%24 = tail call i64 @malloc(i32 %23)
%25 = inttoptr i64 %24 to i32*
%26 = bitcast i32* %17 to i8*
%27 = tail call i64 @malloc(i32 %19)
%28 = inttoptr i64 %27 to i32*
%29 = bitcast i32* %18 to i8*
%30 = tail call i64 @malloc(i32 %19)
%31 = inttoptr i64 %30 to i32*
%32 = tail call i32 @from_base_image(i32* %10, i32 %11, i32* %0, i32 %1, i32* %2, i32 %3, i32 %4, i32* %21)
%33 = add nsw i32 %1, 1
%34 = icmp eq i32 %33, %9
br i1 %34, label %35, label %61
35: ; preds = %16
%36 = load i32, i32* %15
%37 = add nsw i32 %36, 1
store i32 %37, i32* %15
%38 = tail call i32 @isid(i32* %21, i32 %4)
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %100
40: ; preds = %35
%41 = tail call i64 @property(i32* %21, i32 %4, i32 %5, i32* %6, i32 %7)
%42 = icmp eq i64 %41, 0
br i1 %42, label %100, label %43
43: ; preds = %40
%44 = load i32, i32* %13
%45 = icmp slt i32 %44, %3
%46 = load i32*, i32** %12
br i1 %45, label %52, label %47
47: ; preds = %43
%48 = add nsw i32 %44, 1
%49 = mul i32 %19, %48
%50 = tail call i32* @realloc(i32* %46, i32 %49)
store i32* %50, i32** %12
%51 = load i32, i32* %13
br label %52
52: ; preds = %43, %47
%53 = phi i32 [ %51, %47 ], [ %44, %43 ]
%54 = phi i32* [ %50, %47 ], [ %46, %43 ]
%55 = mul nsw i32 %53, %4
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i32, i32* %54, i64 %56
%58 = tail call i32 @copy_list(i32* %21, i32* %57, i32 %4)
%59 = load i32, i32* %13
%60 = add nsw i32 %59, 1
store i32 %60, i32* %13
store i32 1, i32* %14
br label %100
61: ; preds = %16
%62 = add nsw i32 %9, -1
%63 = call i32 @stabilizer(i32* %0, i32 %62, i32* %2, i32 %3, i32 %4, i32* %25, i32* %17)
%64 = sext i32 %62 to i64
%65 = getelementptr inbounds i32, i32* %0, i64 %64
%66 = load i32, i32* %65
%67 = load i32, i32* %17
%68 = call i32 @one_orbit(i32 %66, i32* %25, i32 %67, i32 %4, i32* %28, i32* %18)
%69 = load i32, i32* %18
%70 = icmp sgt i32 %69, 0
br i1 %70, label %71, label %100
71: ; preds = %61
%72 = icmp eq i32 %5, 1
%73 = add nsw i32 %11, -1
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i32, i32* %10, i64 %74
%76 = icmp slt i32 %11, %7
%77 = sext i32 %11 to i64
%78 = getelementptr inbounds i32, i32* %31, i64 %77
%79 = add nsw i32 %9, 1
%80 = add nsw i32 %11, 1
br label %81
81: ; preds = %71, %95
%82 = phi i64 [ 0, %71 ], [ %96, %95 ]
%83 = getelementptr inbounds i32, i32* %28, i64 %82
%84 = load i32, i32* %83
%85 = call i32 @onpoints(i32 %84, i32* %21, i32 %4)
br i1 %72, label %86, label %91
86: ; preds = %81
%87 = load i32, i32* %75
%88 = call i32 @onpoints(i32 %87, i32* %6, i32 %4)
%89 = icmp ne i32 %88, %85
%90 = and i1 %76, %89
br i1 %90, label %95, label %91
91: ; preds = %86, %81
%92 = call i32 @copy_list(i32* %10, i32* %31, i32 %11)
store i32 %85, i32* %78
%93 = load i32, i32* %14
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %100
95: ; preds = %86, %91
%96 = add nuw nsw i64 %82, 1
%97 = load i32, i32* %18
%98 = sext i32 %97 to i64
%99 = icmp slt i64 %96, %98
br i1 %99, label %81, label %100
100: ; preds = %91, %95, %61, %35, %40, %52
%101 = call i32 @free(i32* %21)
%102 = call i32 @free(i32* %25)
%103 = call i32 @free(i32* %28)
%104 = call i32 @free(i32* %31)
ret void
}