#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*/ free(int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ one_orbit(int, int *, int, int, int *, int *);
int /*<<< orphan*/ one_schreier_orbit(int, int *, int, int, int *, int *, int *,
                                      int *, int);
int /*<<< orphan*/ sortB(int *, int *, int, int *, int);
void sorted_schreier_orbit(int point, int *base, int bl, int *GS, int m, int n,
                           int *orbit, int *ol, int *nu, int *w, int init) {
  int *tmp = (int *)malloc(n * sizeof(int)), tmpl;
  int *tmp2 = (int *)malloc(n * sizeof(int));
  one_orbit(point, GS, m, n, tmp, &tmpl);
  sortB(tmp, tmp2, tmpl, base, bl);
  one_schreier_orbit(tmp2[0], GS, m, n, orbit, ol, nu, w, init);
  free(tmp);
  free(tmp2);
}


x86 assembly (clang, -O0):
<sorted_schreier_orbit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
movslq -0x28(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
movslq -0x28(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x30(%rbp),%r8
lea    -0x34(%rbp),%r9
call   1040 <one_orbit@plt>
mov    -0x30(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x34(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
call   1050 <sortB@plt>
mov    -0x40(%rbp),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    0x10(%rbp),%r8
mov    0x18(%rbp),%r9
mov    0x20(%rbp),%r11
mov    0x28(%rbp),%r10
mov    0x30(%rbp),%eax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1070 <one_schreier_orbit@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sorted_schreier_orbit>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9d,%r14d
mov    %r8d,0x24(%rsp)
mov    %rcx,%r13
mov    %edx,0x28(%rsp)
mov    %rsi,0x30(%rsp)
mov    %edi,%r12d
lea    0x0(,%r14,4),%ebx
mov    %ebx,%edi
call   1060 <malloc@plt>
mov    %rax,%rbp
mov    %ebx,%edi
call   1060 <malloc@plt>
mov    %rax,%r15
lea    0x2c(%rsp),%r9
mov    %r12d,%edi
mov    %r13,%rsi
mov    0x24(%rsp),%ebx
mov    %ebx,%edx
mov    %r14d,%ecx
mov    %rbp,%r8
call   1040 <one_orbit@plt>
mov    0x2c(%rsp),%edx
mov    %rbp,%rdi
mov    %r15,%rsi
mov    0x30(%rsp),%rcx
mov    0x28(%rsp),%r8d
call   1050 <sortB@plt>
mov    (%r15),%edi
mov    0x90(%rsp),%eax
mov    %eax,0x10(%rsp)
movaps 0x80(%rsp),%xmm0
movups %xmm0,(%rsp)
mov    %r13,%rsi
mov    %ebx,%edx
mov    %r14d,%ecx
mov    0x70(%rsp),%r8
mov    0x78(%rsp),%r9
call   1070 <one_schreier_orbit@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @sorted_schreier_orbit(i32 %0, i32* %1, i32 %2, i32* %3, i32 %4, i32 %5, i32* %6, i32* %7, i32* %8, i32* %9, i32 %10) {
%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*
store i32 %0, i32* %12
store i32* %1, i32** %13
store i32 %2, i32* %14
store i32* %3, i32** %15
store i32 %4, i32* %16
store i32 %5, i32* %17
store i32* %6, i32** %18
store i32* %7, i32** %19
store i32* %8, i32** %20
store i32* %9, i32** %21
store i32 %10, i32* %22
%26 = load i32, i32* %17
%27 = sext i32 %26 to i64
%28 = mul i64 %27, 4
%29 = trunc i64 %28 to i32
%30 = call i64 @malloc(i32 %29)
%31 = inttoptr i64 %30 to i32*
store i32* %31, i32** %23
%32 = load i32, i32* %17
%33 = sext i32 %32 to i64
%34 = mul i64 %33, 4
%35 = trunc i64 %34 to i32
%36 = call i64 @malloc(i32 %35)
%37 = inttoptr i64 %36 to i32*
store i32* %37, i32** %25
%38 = load i32, i32* %12
%39 = load i32*, i32** %15
%40 = load i32, i32* %16
%41 = load i32, i32* %17
%42 = load i32*, i32** %23
%43 = call i32 @one_orbit(i32 %38, i32* %39, i32 %40, i32 %41, i32* %42, i32* %24)
%44 = load i32*, i32** %23
%45 = load i32*, i32** %25
%46 = load i32, i32* %24
%47 = load i32*, i32** %13
%48 = load i32, i32* %14
%49 = call i32 @sortB(i32* %44, i32* %45, i32 %46, i32* %47, i32 %48)
%50 = load i32*, i32** %25
%51 = getelementptr inbounds i32, i32* %50, i64 0
%52 = load i32, i32* %51
%53 = load i32*, i32** %15
%54 = load i32, i32* %16
%55 = load i32, i32* %17
%56 = load i32*, i32** %18
%57 = load i32*, i32** %19
%58 = load i32*, i32** %20
%59 = load i32*, i32** %21
%60 = load i32, i32* %22
%61 = call i32 @one_schreier_orbit(i32 %52, i32* %53, i32 %54, i32 %55, i32* %56, i32* %57, i32* %58, i32* %59, i32 %60)
%62 = load i32*, i32** %23
%63 = call i32 @free(i32* %62)
%64 = load i32*, i32** %25
%65 = call i32 @free(i32* %64)
ret void
}

LLVM IR (-O2):
define void @sorted_schreier_orbit(i32 %0, i32* %1, i32 %2, i32* %3, i32 %4, i32 %5, i32* %6, i32* %7, i32* %8, i32* %9, i32 %10) {
%12 = alloca i32
%13 = shl i32 %5, 2
%14 = tail call i64 @malloc(i32 %13)
%15 = inttoptr i64 %14 to i32*
%16 = bitcast i32* %12 to i8*
%17 = tail call i64 @malloc(i32 %13)
%18 = inttoptr i64 %17 to i32*
%19 = call i32 @one_orbit(i32 %0, i32* %3, i32 %4, i32 %5, i32* %15, i32* %12)
%20 = load i32, i32* %12
%21 = call i32 @sortB(i32* %15, i32* %18, i32 %20, i32* %1, i32 %2)
%22 = load i32, i32* %18
%23 = call i32 @one_schreier_orbit(i32 %22, i32* %3, i32 %4, i32 %5, i32* %6, i32* %7, i32* %8, i32* %9, i32 %10)
%24 = call i32 @free(i32* %15)
%25 = call i32 @free(i32* %18)
ret void
}