#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*/ intersection(int *, int, int *, int, int *, int *);
int /*<<< orphan*/ inverse(int *, int *, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ one_schreier_orbit(int, int *, int, int, int *, int *, int *,
                                      int *, int);
int onpoints(int, int *, int);
int position(int, int *, int);
int /*<<< orphan*/ product(int *, int *, int *, int);
int /*<<< orphan*/ sortB(int *, int *, int, int *, int);
int /*<<< orphan*/ stabilizer(int *, int, int *, int, int, int *, int *);
int /*<<< orphan*/ trace_schreier(int, int *, int *, int *, int);
void coset_rep(int *p, int n, int *base, int bl, int *GS, int *m, int *freeps,
               int fl, int *cr) {
  if (*m == 0) {
    copy_list(p, cr, n);
    return;
  }
  int i, j, k, b, pp;
  int *deltap = (int *)malloc(n * sizeof(int)), deltapl;
  int *deltapsorted = (int *)malloc(n * sizeof(int));
  int *om = (int *)malloc(n * sizeof(int));
  int *perm = (int *)malloc(n * sizeof(int));
  int *perm2 = (int *)malloc(n * sizeof(int));
  int *orbit = (int *)malloc(n * sizeof(int)), ol;
  int *orbit1 = (int *)malloc(n * sizeof(int)), o1l;
  int *w = (int *)malloc(n * sizeof(int));
  int *nu = (int *)malloc(n * n * sizeof(int));
  int *genset = (int *)malloc(*m * n * sizeof(int)), gensetl;
  int *stab = (int *)malloc(*m * n * sizeof(int)), mm;
  inverse(p, perm, n);
  copy_list(GS, genset, *m * n);
  gensetl = *m;
  for (i = 0; i < bl; i++) {
    b = base[i];
    one_schreier_orbit(b, genset, gensetl, n, orbit, &ol, nu, w, 1);
    intersection(orbit, ol, freeps, fl, orbit1, &o1l);
    if (o1l == 0)
      continue;
    for (j = 0; j < o1l; j++) {
      deltap[j] = onpoints(orbit1[j], perm, n);
    }
    deltapl = o1l;
    sortB(deltap, deltapsorted, deltapl, base, bl);
    k = position(deltapsorted[0], deltap, deltapl);
    pp = orbit1[k - 1];
    trace_schreier(pp, nu, w, om, n);
    product(om, perm, perm2, n);
    copy_list(perm2, perm, n);
    inverse(om, perm2, n);
    for (j = 0; j < fl; j++) {
      freeps[j] = onpoints(freeps[j], perm2, n);
    }
    stabilizer(base + i, 1, genset, gensetl, n, stab, &mm);
    copy_list(stab, genset, mm * n);
    gensetl = mm;
  }
  inverse(perm, cr, n);
  copy_list(genset, GS, gensetl * n);
  *m = gensetl;
  free(deltap);
  free(deltapsorted);
  free(om);
  free(perm);
  free(perm2);
  free(orbit);
  free(orbit1);
  free(w);
  free(nu);
  free(genset);
  free(stab);
}


x86 assembly (clang, -O0):
<coset_rep>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmpl   $0x0,(%rax)
jne    120e <coset_rep+0x4e>
mov    -0x8(%rbp),%rdi
mov    0x20(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   10d0 <copy_list@plt>
jmp    161b <coset_rep+0x45b>
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x50(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x60(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x68(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x70(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x78(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x80(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x90(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0xa0(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0xa8(%rbp)
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
imul   -0xc(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0xb0(%rbp)
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
imul   -0xc(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0xc0(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   10a0 <inverse@plt>
mov    -0x28(%rbp),%rdi
mov    -0xb0(%rbp),%rsi
mov    -0x30(%rbp),%rax
mov    (%rax),%edx
imul   -0xc(%rbp),%edx
call   10d0 <copy_list@plt>
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xb4(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1573 <coset_rep+0x3b3>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%edi
mov    -0xb0(%rbp),%rsi
mov    -0xb4(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x80(%rbp),%r8
mov    -0xa8(%rbp),%r10
mov    -0xa0(%rbp),%rax
lea    -0x84(%rbp),%r9
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
movl   $0x1,0x10(%rsp)
call   10c0 <one_schreier_orbit@plt>
mov    -0x80(%rbp),%rdi
mov    -0x84(%rbp),%esi
mov    0x10(%rbp),%rdx
mov    0x18(%rbp),%ecx
mov    -0x90(%rbp),%r8
lea    -0x94(%rbp),%r9
call   1090 <intersection@plt>
cmpl   $0x0,-0x94(%rbp)
jne    13d2 <coset_rep+0x212>
jmp    1565 <coset_rep+0x3a5>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x94(%rbp),%eax
jge    141d <coset_rep+0x25d>
mov    -0x90(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x70(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   10e0 <onpoints@plt>
mov    %eax,%edx
mov    -0x50(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13d9 <coset_rep+0x219>
mov    -0x94(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x54(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1060 <sortB@plt>
mov    -0x60(%rbp),%rax
mov    (%rax),%edi
mov    -0x50(%rbp),%rsi
mov    -0x54(%rbp),%edx
call   1040 <position@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x90(%rbp),%rax
mov    -0x3c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%edi
mov    -0xa8(%rbp),%rsi
mov    -0xa0(%rbp),%rdx
mov    -0x68(%rbp),%rcx
mov    -0xc(%rbp),%r8d
call   1050 <trace_schreier@plt>
mov    -0x68(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0xc(%rbp),%ecx
call   1080 <product@plt>
mov    -0x78(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   10d0 <copy_list@plt>
mov    -0x68(%rbp),%rdi
mov    -0x78(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   10a0 <inverse@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    1500 <coset_rep+0x340>
mov    0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x78(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   10e0 <onpoints@plt>
mov    %eax,%edx
mov    0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    14c2 <coset_rep+0x302>
mov    -0x18(%rbp),%rdi
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0xb0(%rbp),%rdx
mov    -0xb4(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0xc0(%rbp),%r9
mov    $0x1,%esi
lea    -0xc4(%rbp),%rax
mov    %rax,(%rsp)
call   10b0 <stabilizer@plt>
mov    -0xc0(%rbp),%rdi
mov    -0xb0(%rbp),%rsi
mov    -0xc4(%rbp),%edx
imul   -0xc(%rbp),%edx
call   10d0 <copy_list@plt>
mov    -0xc4(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1340 <coset_rep+0x180>
mov    -0x70(%rbp),%rdi
mov    0x20(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   10a0 <inverse@plt>
mov    -0xb0(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0xb4(%rbp),%edx
imul   -0xc(%rbp),%edx
call   10d0 <copy_list@plt>
mov    -0xb4(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
mov    -0x90(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc0(%rbp),%rdi
call   1030 <free@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coset_rep>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %rdx,0x50(%rsp)
mov    %esi,%ebx
mov    0x100(%rsp),%rsi
cmpl   $0x0,(%r9)
je     152e <coset_rep+0x36e>
mov    %r9,%r14
mov    %r8,%r15
mov    %rsi,0x90(%rsp)
mov    0xf8(%rsp),%eax
mov    %eax,(%rsp)
mov    0xf0(%rsp),%rax
mov    %rax,0x80(%rsp)
lea    0x0(,%rbx,4),%ebp
mov    %rdi,0x10(%rsp)
mov    %ebp,%edi
mov    %ecx,0x4(%rsp)
call   1070 <malloc@plt>
mov    %rax,0x28(%rsp)
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x70(%rsp)
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x68(%rsp)
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,%r13
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x78(%rsp)
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x48(%rsp)
mov    %ebp,%edi
imul   %ebx,%edi
call   1070 <malloc@plt>
mov    %rax,0x40(%rsp)
mov    (%r14),%edi
imul   %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,%r12
imul   (%r14),%ebp
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x60(%rsp)
mov    0x10(%rsp),%rdi
mov    %r13,0x30(%rsp)
mov    %r13,%rsi
mov    %ebx,%edx
call   10a0 <inverse@plt>
mov    (%r14),%edx
imul   %ebx,%edx
mov    %r15,0x98(%rsp)
mov    %r15,%rdi
mov    %r12,0x38(%rsp)
mov    %r12,%rsi
call   10d0 <copy_list@plt>
mov    %r14,0xa0(%rsp)
mov    (%r14),%edx
mov    0x4(%rsp),%r12d
test   %r12d,%r12d
jle    1546 <coset_rep+0x386>
mov    %r12d,%eax
mov    %rax,0xb0(%rsp)
mov    (%rsp),%r14d
mov    %r14d,%r14d
xor    %r12d,%r12d
mov    0x28(%rsp),%rbp
mov    0x20(%rsp),%r15
mov    %r14,0xa8(%rsp)
jmp    134e <coset_rep+0x18e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp),%edx
mov    0x88(%rsp),%r12
add    $0x1,%r12
cmp    0xb0(%rsp),%r12
je     1550 <coset_rep+0x390>
mov    0x50(%rsp),%rax
mov    %r12,0x88(%rsp)
mov    (%rax,%r12,4),%edi
sub    $0x8,%rsp
mov    0x40(%rsp),%rsi
mov    %edx,0x18(%rsp)
mov    %ebx,%ecx
mov    0x80(%rsp),%r13
mov    %r13,%r8
lea    0x64(%rsp),%r9
push   $0x1
push   0x58(%rsp)
push   0x58(%rsp)
call   10c0 <one_schreier_orbit@plt>
add    $0x20,%rsp
mov    0x5c(%rsp),%esi
mov    %r13,%rdi
mov    0x80(%rsp),%rdx
mov    (%rsp),%r14d
mov    %r14d,%ecx
mov    0x18(%rsp),%r8
lea    0xc(%rsp),%r9
call   1090 <intersection@plt>
mov    0xc(%rsp),%r13d
test   %r13d,%r13d
je     1330 <coset_rep+0x170>
jle    140a <coset_rep+0x24a>
xor    %r12d,%r12d
mov    0x30(%rsp),%r15
mov    0x18(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r14,%r12,4),%edi
mov    %r15,%rsi
mov    %ebx,%edx
call   10e0 <onpoints@plt>
mov    %eax,0x0(%rbp,%r12,4)
add    $0x1,%r12
movslq 0xc(%rsp),%r13
cmp    %r13,%r12
jl     13e0 <coset_rep+0x220>
mov    0x20(%rsp),%r15
mov    (%rsp),%r14d
mov    %rbp,%rdi
mov    0x70(%rsp),%r12
mov    %r12,%rsi
mov    %r13d,%edx
mov    0x50(%rsp),%rcx
mov    0x4(%rsp),%r8d
call   1060 <sortB@plt>
mov    (%r12),%edi
mov    %rbp,%rsi
mov    %r13d,%edx
call   1040 <position@plt>
cltq
mov    0x18(%rsp),%rcx
mov    -0x4(%rcx,%rax,4),%edi
mov    0x40(%rsp),%rsi
mov    0x48(%rsp),%rdx
mov    0x68(%rsp),%r12
mov    %r12,%rcx
mov    %ebx,%r8d
call   1050 <trace_schreier@plt>
mov    %r12,%rdi
mov    0x30(%rsp),%rbp
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %ebx,%ecx
call   1080 <product@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %ebx,%edx
call   10d0 <copy_list@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   10a0 <inverse@plt>
test   %r14d,%r14d
mov    %rbx,%r13
mov    0x80(%rsp),%rbx
mov    0xa8(%rsp),%r14
jle    14ca <coset_rep+0x30a>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rbx,%rbp,4),%edi
mov    %r15,%rsi
mov    %r13d,%edx
call   10e0 <onpoints@plt>
mov    %eax,(%rbx,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%r14
jne    14b0 <coset_rep+0x2f0>
mov    0x50(%rsp),%rax
mov    0x88(%rsp),%r12
lea    (%rax,%r12,4),%rdi
sub    $0x8,%rsp
mov    $0x1,%esi
mov    0x40(%rsp),%rbx
mov    %rbx,%rdx
mov    0x18(%rsp),%ecx
mov    %r13d,%r8d
mov    0x68(%rsp),%rbp
mov    %rbp,%r9
lea    0x10(%rsp),%rax
push   %rax
call   10b0 <stabilizer@plt>
add    $0x10,%rsp
mov    0x8(%rsp),%edx
imul   %r13d,%edx
mov    %rbp,%rdi
mov    %rbx,%rsi
call   10d0 <copy_list@plt>
mov    0x8(%rsp),%edx
mov    0x28(%rsp),%rbp
mov    %r13,%rbx
jmp    133c <coset_rep+0x17c>
mov    %ebx,%edx
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10d0 <copy_list@plt>
mov    0x28(%rsp),%rbp
mov    0x20(%rsp),%r15
mov    0x30(%rsp),%r12
mov    %r12,%rdi
mov    0x90(%rsp),%rsi
mov    %edx,%r13d
mov    %ebx,%edx
call   10a0 <inverse@plt>
imul   %r13d,%ebx
mov    0x38(%rsp),%r14
mov    %r14,%rdi
mov    0x98(%rsp),%rsi
mov    %ebx,%edx
call   10d0 <copy_list@plt>
mov    0xa0(%rsp),%rax
mov    %r13d,(%rax)
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x70(%rsp),%rdi
call   1030 <free@plt>
mov    0x68(%rsp),%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x78(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    0x48(%rsp),%rdi
call   1030 <free@plt>
mov    0x40(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x60(%rsp),%rdi
call   1030 <free@plt>
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @coset_rep(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32* %5, i32* %6, i32 %7, i32* %8) {
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%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
store i32* %0, i32** %10
store i32 %1, i32* %11
store i32* %2, i32** %12
store i32 %3, i32* %13
store i32* %4, i32** %14
store i32* %5, i32** %15
store i32* %6, i32** %16
store i32 %7, i32* %17
store i32* %8, i32** %18
%40 = load i32*, i32** %15
%41 = load i32, i32* %40
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %48
43: ; preds = %9
%44 = load i32*, i32** %10
%45 = load i32*, i32** %18
%46 = load i32, i32* %11
%47 = call i32 @copy_list(i32* %44, i32* %45, i32 %46)
br label %298
48: ; preds = %9
%49 = load i32, i32* %11
%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** %24
%55 = load i32, i32* %11
%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** %26
%61 = load i32, i32* %11
%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** %27
%67 = load i32, i32* %11
%68 = sext i32 %67 to i64
%69 = mul i64 %68, 4
%70 = trunc i64 %69 to i32
%71 = call i64 @malloc(i32 %70)
%72 = inttoptr i64 %71 to i32*
store i32* %72, i32** %28
%73 = load i32, i32* %11
%74 = sext i32 %73 to i64
%75 = mul i64 %74, 4
%76 = trunc i64 %75 to i32
%77 = call i64 @malloc(i32 %76)
%78 = inttoptr i64 %77 to i32*
store i32* %78, i32** %29
%79 = load i32, i32* %11
%80 = sext i32 %79 to i64
%81 = mul i64 %80, 4
%82 = trunc i64 %81 to i32
%83 = call i64 @malloc(i32 %82)
%84 = inttoptr i64 %83 to i32*
store i32* %84, i32** %30
%85 = load i32, i32* %11
%86 = sext i32 %85 to i64
%87 = mul i64 %86, 4
%88 = trunc i64 %87 to i32
%89 = call i64 @malloc(i32 %88)
%90 = inttoptr i64 %89 to i32*
store i32* %90, i32** %32
%91 = load i32, i32* %11
%92 = sext i32 %91 to i64
%93 = mul i64 %92, 4
%94 = trunc i64 %93 to i32
%95 = call i64 @malloc(i32 %94)
%96 = inttoptr i64 %95 to i32*
store i32* %96, i32** %34
%97 = load i32, i32* %11
%98 = load i32, i32* %11
%99 = mul nsw i32 %97, %98
%100 = sext i32 %99 to i64
%101 = mul i64 %100, 4
%102 = trunc i64 %101 to i32
%103 = call i64 @malloc(i32 %102)
%104 = inttoptr i64 %103 to i32*
store i32* %104, i32** %35
%105 = load i32*, i32** %15
%106 = load i32, i32* %105
%107 = load i32, i32* %11
%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 i64 @malloc(i32 %111)
%113 = inttoptr i64 %112 to i32*
store i32* %113, i32** %36
%114 = load i32*, i32** %15
%115 = load i32, i32* %114
%116 = load i32, i32* %11
%117 = mul nsw i32 %115, %116
%118 = sext i32 %117 to i64
%119 = mul i64 %118, 4
%120 = trunc i64 %119 to i32
%121 = call i64 @malloc(i32 %120)
%122 = inttoptr i64 %121 to i32*
store i32* %122, i32** %38
%123 = load i32*, i32** %10
%124 = load i32*, i32** %28
%125 = load i32, i32* %11
%126 = call i32 @inverse(i32* %123, i32* %124, i32 %125)
%127 = load i32*, i32** %14
%128 = load i32*, i32** %36
%129 = load i32*, i32** %15
%130 = load i32, i32* %129
%131 = load i32, i32* %11
%132 = mul nsw i32 %130, %131
%133 = call i32 @copy_list(i32* %127, i32* %128, i32 %132)
%134 = load i32*, i32** %15
%135 = load i32, i32* %134
store i32 %135, i32* %37
store i32 0, i32* %19
br label %136
136: ; preds = %260, %48
%137 = load i32, i32* %19
%138 = load i32, i32* %13
%139 = icmp slt i32 %137, %138
br i1 %139, label %140, label %263
140: ; preds = %136
%141 = load i32*, i32** %12
%142 = load i32, i32* %19
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds i32, i32* %141, i64 %143
%145 = load i32, i32* %144
store i32 %145, i32* %22
%146 = load i32, i32* %22
%147 = load i32*, i32** %36
%148 = load i32, i32* %37
%149 = load i32, i32* %11
%150 = load i32*, i32** %30
%151 = load i32*, i32** %35
%152 = load i32*, i32** %34
%153 = call i32 @one_schreier_orbit(i32 %146, i32* %147, i32 %148, i32 %149, i32* %150, i32* %31, i32* %151, i32* %152, i32 1)
%154 = load i32*, i32** %30
%155 = load i32, i32* %31
%156 = load i32*, i32** %16
%157 = load i32, i32* %17
%158 = load i32*, i32** %32
%159 = call i32 @intersection(i32* %154, i32 %155, i32* %156, i32 %157, i32* %158, i32* %33)
%160 = load i32, i32* %33
%161 = icmp eq i32 %160, 0
br i1 %161, label %162, label %163
162: ; preds = %140
br label %260
163: ; preds = %140
store i32 0, i32* %20
br label %164
164: ; preds = %181, %163
%165 = load i32, i32* %20
%166 = load i32, i32* %33
%167 = icmp slt i32 %165, %166
br i1 %167, label %168, label %184
168: ; preds = %164
%169 = load i32*, i32** %32
%170 = load i32, i32* %20
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds i32, i32* %169, i64 %171
%173 = load i32, i32* %172
%174 = load i32*, i32** %28
%175 = load i32, i32* %11
%176 = call i32 @onpoints(i32 %173, i32* %174, i32 %175)
%177 = load i32*, i32** %24
%178 = load i32, i32* %20
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds i32, i32* %177, i64 %179
store i32 %176, i32* %180
br label %181
181: ; preds = %168
%182 = load i32, i32* %20
%183 = add nsw i32 %182, 1
store i32 %183, i32* %20
br label %164
184: ; preds = %164
%185 = load i32, i32* %33
store i32 %185, i32* %25
%186 = load i32*, i32** %24
%187 = load i32*, i32** %26
%188 = load i32, i32* %25
%189 = load i32*, i32** %12
%190 = load i32, i32* %13
%191 = call i32 @sortB(i32* %186, i32* %187, i32 %188, i32* %189, i32 %190)
%192 = load i32*, i32** %26
%193 = getelementptr inbounds i32, i32* %192, i64 0
%194 = load i32, i32* %193
%195 = load i32*, i32** %24
%196 = load i32, i32* %25
%197 = call i32 @position(i32 %194, i32* %195, i32 %196)
store i32 %197, i32* %21
%198 = load i32*, i32** %32
%199 = load i32, i32* %21
%200 = sub nsw i32 %199, 1
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds i32, i32* %198, i64 %201
%203 = load i32, i32* %202
store i32 %203, i32* %23
%204 = load i32, i32* %23
%205 = load i32*, i32** %35
%206 = load i32*, i32** %34
%207 = load i32*, i32** %27
%208 = load i32, i32* %11
%209 = call i32 @trace_schreier(i32 %204, i32* %205, i32* %206, i32* %207, i32 %208)
%210 = load i32*, i32** %27
%211 = load i32*, i32** %28
%212 = load i32*, i32** %29
%213 = load i32, i32* %11
%214 = call i32 @product(i32* %210, i32* %211, i32* %212, i32 %213)
%215 = load i32*, i32** %29
%216 = load i32*, i32** %28
%217 = load i32, i32* %11
%218 = call i32 @copy_list(i32* %215, i32* %216, i32 %217)
%219 = load i32*, i32** %27
%220 = load i32*, i32** %29
%221 = load i32, i32* %11
%222 = call i32 @inverse(i32* %219, i32* %220, i32 %221)
store i32 0, i32* %20
br label %223
223: ; preds = %240, %184
%224 = load i32, i32* %20
%225 = load i32, i32* %17
%226 = icmp slt i32 %224, %225
br i1 %226, label %227, label %243
227: ; preds = %223
%228 = load i32*, i32** %16
%229 = load i32, i32* %20
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds i32, i32* %228, i64 %230
%232 = load i32, i32* %231
%233 = load i32*, i32** %29
%234 = load i32, i32* %11
%235 = call i32 @onpoints(i32 %232, i32* %233, i32 %234)
%236 = load i32*, i32** %16
%237 = load i32, i32* %20
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds i32, i32* %236, i64 %238
store i32 %235, i32* %239
br label %240
240: ; preds = %227
%241 = load i32, i32* %20
%242 = add nsw i32 %241, 1
store i32 %242, i32* %20
br label %223
243: ; preds = %223
%244 = load i32*, i32** %12
%245 = load i32, i32* %19
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds i32, i32* %244, i64 %246
%248 = load i32*, i32** %36
%249 = load i32, i32* %37
%250 = load i32, i32* %11
%251 = load i32*, i32** %38
%252 = call i32 @stabilizer(i32* %247, i32 1, i32* %248, i32 %249, i32 %250, i32* %251, i32* %39)
%253 = load i32*, i32** %38
%254 = load i32*, i32** %36
%255 = load i32, i32* %39
%256 = load i32, i32* %11
%257 = mul nsw i32 %255, %256
%258 = call i32 @copy_list(i32* %253, i32* %254, i32 %257)
%259 = load i32, i32* %39
store i32 %259, i32* %37
br label %260
260: ; preds = %243, %162
%261 = load i32, i32* %19
%262 = add nsw i32 %261, 1
store i32 %262, i32* %19
br label %136
263: ; preds = %136
%264 = load i32*, i32** %28
%265 = load i32*, i32** %18
%266 = load i32, i32* %11
%267 = call i32 @inverse(i32* %264, i32* %265, i32 %266)
%268 = load i32*, i32** %36
%269 = load i32*, i32** %14
%270 = load i32, i32* %37
%271 = load i32, i32* %11
%272 = mul nsw i32 %270, %271
%273 = call i32 @copy_list(i32* %268, i32* %269, i32 %272)
%274 = load i32, i32* %37
%275 = load i32*, i32** %15
store i32 %274, i32* %275
%276 = load i32*, i32** %24
%277 = call i32 @free(i32* %276)
%278 = load i32*, i32** %26
%279 = call i32 @free(i32* %278)
%280 = load i32*, i32** %27
%281 = call i32 @free(i32* %280)
%282 = load i32*, i32** %28
%283 = call i32 @free(i32* %282)
%284 = load i32*, i32** %29
%285 = call i32 @free(i32* %284)
%286 = load i32*, i32** %30
%287 = call i32 @free(i32* %286)
%288 = load i32*, i32** %32
%289 = call i32 @free(i32* %288)
%290 = load i32*, i32** %34
%291 = call i32 @free(i32* %290)
%292 = load i32*, i32** %35
%293 = call i32 @free(i32* %292)
%294 = load i32*, i32** %36
%295 = call i32 @free(i32* %294)
%296 = load i32*, i32** %38
%297 = call i32 @free(i32* %296)
br label %298
298: ; preds = %263, %43
ret void
}

LLVM IR (-O2):
define void @coset_rep(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32* nocapture %5, i32* %6, i32 %7, i32* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = load i32, i32* %5
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %9
%16 = tail call i32 @copy_list(i32* %0, i32* %8, i32 %1)
br label %127
17: ; preds = %9
%18 = shl i32 %1, 2
%19 = tail call i64 @malloc(i32 %18)
%20 = inttoptr i64 %19 to i32*
%21 = tail call i64 @malloc(i32 %18)
%22 = inttoptr i64 %21 to i32*
%23 = tail call i64 @malloc(i32 %18)
%24 = inttoptr i64 %23 to i32*
%25 = tail call i64 @malloc(i32 %18)
%26 = inttoptr i64 %25 to i32*
%27 = tail call i64 @malloc(i32 %18)
%28 = inttoptr i64 %27 to i32*
%29 = tail call i64 @malloc(i32 %18)
%30 = inttoptr i64 %29 to i32*
%31 = bitcast i32* %10 to i8*
%32 = tail call i64 @malloc(i32 %18)
%33 = inttoptr i64 %32 to i32*
%34 = bitcast i32* %11 to i8*
%35 = tail call i64 @malloc(i32 %18)
%36 = inttoptr i64 %35 to i32*
%37 = mul i32 %18, %1
%38 = tail call i64 @malloc(i32 %37)
%39 = inttoptr i64 %38 to i32*
%40 = load i32, i32* %5
%41 = mul i32 %18, %40
%42 = tail call i64 @malloc(i32 %41)
%43 = inttoptr i64 %42 to i32*
%44 = load i32, i32* %5
%45 = mul i32 %18, %44
%46 = tail call i64 @malloc(i32 %45)
%47 = inttoptr i64 %46 to i32*
%48 = bitcast i32* %12 to i8*
%49 = tail call i32 @inverse(i32* %0, i32* %26, i32 %1)
%50 = load i32, i32* %5
%51 = mul nsw i32 %50, %1
%52 = tail call i32 @copy_list(i32* %4, i32* %43, i32 %51)
%53 = load i32, i32* %5
%54 = icmp sgt i32 %3, 0
br i1 %54, label %55, label %111
55: ; preds = %17
%56 = icmp sgt i32 %7, 0
%57 = zext i32 %3 to i64
%58 = zext i32 %7 to i64
br label %59
59: ; preds = %55, %107
%60 = phi i64 [ 0, %55 ], [ %109, %107 ]
%61 = phi i32 [ %53, %55 ], [ %108, %107 ]
%62 = getelementptr inbounds i32, i32* %2, i64 %60
%63 = load i32, i32* %62
%64 = call i32 @one_schreier_orbit(i32 %63, i32* %43, i32 %61, i32 %1, i32* %30, i32* %10, i32* %39, i32* %36, i32 1)
%65 = load i32, i32* %10
%66 = call i32 @intersection(i32* %30, i32 %65, i32* %6, i32 %7, i32* %33, i32* %11)
%67 = load i32, i32* %11
%68 = icmp eq i32 %67, 0
br i1 %68, label %107, label %69
69: ; preds = %59
%70 = icmp sgt i32 %67, 0
br i1 %70, label %71, label %81
71: ; preds = %69, %71
%72 = phi i64 [ %77, %71 ], [ 0, %69 ]
%73 = getelementptr inbounds i32, i32* %33, i64 %72
%74 = load i32, i32* %73
%75 = call i32 @onpoints(i32 %74, i32* %26, i32 %1)
%76 = getelementptr inbounds i32, i32* %20, i64 %72
store i32 %75, i32* %76
%77 = add nuw nsw i64 %72, 1
%78 = load i32, i32* %11
%79 = sext i32 %78 to i64
%80 = icmp slt i64 %77, %79
br i1 %80, label %71, label %81
81: ; preds = %71, %69
%82 = phi i32 [ %67, %69 ], [ %78, %71 ]
%83 = call i32 @sortB(i32* %20, i32* %22, i32 %82, i32* %2, i32 %3)
%84 = load i32, i32* %22
%85 = call i32 @position(i32 %84, i32* %20, i32 %82)
%86 = add nsw i32 %85, -1
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i32, i32* %33, i64 %87
%89 = load i32, i32* %88
%90 = call i32 @trace_schreier(i32 %89, i32* %39, i32* %36, i32* %24, i32 %1)
%91 = call i32 @product(i32* %24, i32* %26, i32* %28, i32 %1)
%92 = call i32 @copy_list(i32* %28, i32* %26, i32 %1)
%93 = call i32 @inverse(i32* %24, i32* %28, i32 %1)
br i1 %56, label %94, label %101
94: ; preds = %81, %94
%95 = phi i64 [ %99, %94 ], [ 0, %81 ]
%96 = getelementptr inbounds i32, i32* %6, i64 %95
%97 = load i32, i32* %96
%98 = call i32 @onpoints(i32 %97, i32* %28, i32 %1)
store i32 %98, i32* %96
%99 = add nuw nsw i64 %95, 1
%100 = icmp eq i64 %99, %58
br i1 %100, label %101, label %94
101: ; preds = %94, %81
%102 = call i32 @stabilizer(i32* %62, i32 1, i32* %43, i32 %61, i32 %1, i32* %47, i32* %12)
%103 = load i32, i32* %12
%104 = mul nsw i32 %103, %1
%105 = call i32 @copy_list(i32* %47, i32* %43, i32 %104)
%106 = load i32, i32* %12
br label %107
107: ; preds = %59, %101
%108 = phi i32 [ %61, %59 ], [ %106, %101 ]
%109 = add nuw nsw i64 %60, 1
%110 = icmp eq i64 %109, %57
br i1 %110, label %111, label %59
111: ; preds = %107, %17
%112 = phi i32 [ %53, %17 ], [ %108, %107 ]
%113 = call i32 @inverse(i32* %26, i32* %8, i32 %1)
%114 = mul nsw i32 %112, %1
%115 = call i32 @copy_list(i32* %43, i32* %4, i32 %114)
store i32 %112, i32* %5
%116 = call i32 @free(i32* %20)
%117 = call i32 @free(i32* %22)
%118 = call i32 @free(i32* %24)
%119 = call i32 @free(i32* %26)
%120 = call i32 @free(i32* %28)
%121 = call i32 @free(i32* %30)
%122 = call i32 @free(i32* %33)
%123 = call i32 @free(i32* %36)
%124 = call i32 @free(i32* %39)
%125 = call i32 @free(i32* %43)
%126 = call i32 @free(i32* %47)
br label %127
127: ; preds = %111, %15
ret void
}