#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*/ forbidden_pattern(int, int, char *);
int /*<<< orphan*/ mirrorH(int, int, char *, char *);
int /*<<< orphan*/ mirrorV(int, int, char *, char *);
int /*<<< orphan*/ transpose(int, int, char *, char *);
void forbidden_pattern_with_symmetries(int w, int h, char *pattern) {
  char new_pattern[64];
  char new_pattern2[64];
  char new_pattern3[64];
  forbidden_pattern(w, h, pattern);
  mirrorV(w, h, pattern, new_pattern);
  forbidden_pattern(w, h, new_pattern);
  mirrorH(w, h, pattern, new_pattern2);
  forbidden_pattern(w, h, new_pattern2);
  mirrorH(w, h, new_pattern, new_pattern2);
  forbidden_pattern(w, h, new_pattern2);
  transpose(w, h, pattern, new_pattern3);
  forbidden_pattern(h, w, new_pattern3);
  mirrorV(h, w, new_pattern3, new_pattern);
  forbidden_pattern(h, w, new_pattern);
  mirrorH(h, w, new_pattern3, new_pattern2);
  forbidden_pattern(h, w, new_pattern2);
  mirrorH(h, w, new_pattern, new_pattern2);
  forbidden_pattern(h, w, new_pattern2);
}


x86 assembly (clang, -O0):
<forbidden_pattern_with_symmetries>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <forbidden_pattern@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    -0x50(%rbp),%rcx
call   1040 <mirrorV@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0x50(%rbp),%rdx
call   1030 <forbidden_pattern@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    -0x90(%rbp),%rcx
call   1050 <mirrorH@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0x90(%rbp),%rdx
call   1030 <forbidden_pattern@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0x50(%rbp),%rdx
lea    -0x90(%rbp),%rcx
call   1050 <mirrorH@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0x90(%rbp),%rdx
call   1030 <forbidden_pattern@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    -0xd0(%rbp),%rcx
call   1060 <transpose@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
lea    -0xd0(%rbp),%rdx
call   1030 <forbidden_pattern@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
lea    -0xd0(%rbp),%rdx
lea    -0x50(%rbp),%rcx
call   1040 <mirrorV@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
lea    -0x50(%rbp),%rdx
call   1030 <forbidden_pattern@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
lea    -0xd0(%rbp),%rdx
lea    -0x90(%rbp),%rcx
call   1050 <mirrorH@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
lea    -0x90(%rbp),%rdx
call   1030 <forbidden_pattern@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
lea    -0x50(%rbp),%rdx
lea    -0x90(%rbp),%rcx
call   1050 <mirrorH@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
lea    -0x90(%rbp),%rdx
call   1030 <forbidden_pattern@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forbidden_pattern_with_symmetries>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %rdx,%r12
mov    %esi,%ebp
mov    %edi,%ebx
call   1030 <forbidden_pattern@plt>
lea    0x80(%rsp),%r14
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12,%rdx
mov    %r14,%rcx
call   1040 <mirrorV@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
call   1030 <forbidden_pattern@plt>
lea    0x40(%rsp),%r15
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12,%rdx
mov    %r15,%rcx
call   1050 <mirrorH@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r15,%rdx
call   1030 <forbidden_pattern@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %r15,%rcx
call   1050 <mirrorH@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r15,%rdx
call   1030 <forbidden_pattern@plt>
mov    %rsp,%r13
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12,%rdx
mov    %r13,%rcx
call   1060 <transpose@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r13,%rdx
call   1030 <forbidden_pattern@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r13,%rdx
mov    %r14,%rcx
call   1040 <mirrorV@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1030 <forbidden_pattern@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r13,%rdx
mov    %r15,%rcx
call   1050 <mirrorH@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r15,%rdx
call   1030 <forbidden_pattern@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r14,%rdx
mov    %r15,%rcx
call   1050 <mirrorH@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r15,%rdx
call   1030 <forbidden_pattern@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @forbidden_pattern_with_symmetries(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [64 x i8]
%8 = alloca [64 x i8]
%9 = alloca [64 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = load i8*, i8** %6
%13 = call i32 @forbidden_pattern(i32 %10, i32 %11, i8* %12)
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = load i8*, i8** %6
%17 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%18 = call i32 @mirrorV(i32 %14, i32 %15, i8* %16, i8* %17)
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%22 = call i32 @forbidden_pattern(i32 %19, i32 %20, i8* %21)
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = load i8*, i8** %6
%26 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%27 = call i32 @mirrorH(i32 %23, i32 %24, i8* %25, i8* %26)
%28 = load i32, i32* %4
%29 = load i32, i32* %5
%30 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%31 = call i32 @forbidden_pattern(i32 %28, i32 %29, i8* %30)
%32 = load i32, i32* %4
%33 = load i32, i32* %5
%34 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%35 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%36 = call i32 @mirrorH(i32 %32, i32 %33, i8* %34, i8* %35)
%37 = load i32, i32* %4
%38 = load i32, i32* %5
%39 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%40 = call i32 @forbidden_pattern(i32 %37, i32 %38, i8* %39)
%41 = load i32, i32* %4
%42 = load i32, i32* %5
%43 = load i8*, i8** %6
%44 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%45 = call i32 @transpose(i32 %41, i32 %42, i8* %43, i8* %44)
%46 = load i32, i32* %5
%47 = load i32, i32* %4
%48 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%49 = call i32 @forbidden_pattern(i32 %46, i32 %47, i8* %48)
%50 = load i32, i32* %5
%51 = load i32, i32* %4
%52 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%53 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%54 = call i32 @mirrorV(i32 %50, i32 %51, i8* %52, i8* %53)
%55 = load i32, i32* %5
%56 = load i32, i32* %4
%57 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%58 = call i32 @forbidden_pattern(i32 %55, i32 %56, i8* %57)
%59 = load i32, i32* %5
%60 = load i32, i32* %4
%61 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%62 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%63 = call i32 @mirrorH(i32 %59, i32 %60, i8* %61, i8* %62)
%64 = load i32, i32* %5
%65 = load i32, i32* %4
%66 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%67 = call i32 @forbidden_pattern(i32 %64, i32 %65, i8* %66)
%68 = load i32, i32* %5
%69 = load i32, i32* %4
%70 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%71 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%72 = call i32 @mirrorH(i32 %68, i32 %69, i8* %70, i8* %71)
%73 = load i32, i32* %5
%74 = load i32, i32* %4
%75 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%76 = call i32 @forbidden_pattern(i32 %73, i32 %74, i8* %75)
ret void
}

LLVM IR (-O2):
define void @forbidden_pattern_with_symmetries(i32 %0, i32 %1, i8* %2) {
%4 = alloca [64 x i8]
%5 = alloca [64 x i8]
%6 = alloca [64 x i8]
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%10 = tail call i32 @forbidden_pattern(i32 %0, i32 %1, i8* %2)
%11 = call i32 @mirrorV(i32 %0, i32 %1, i8* %2, i8* %7)
%12 = call i32 @forbidden_pattern(i32 %0, i32 %1, i8* %7)
%13 = call i32 @mirrorH(i32 %0, i32 %1, i8* %2, i8* %8)
%14 = call i32 @forbidden_pattern(i32 %0, i32 %1, i8* %8)
%15 = call i32 @mirrorH(i32 %0, i32 %1, i8* %7, i8* %8)
%16 = call i32 @forbidden_pattern(i32 %0, i32 %1, i8* %8)
%17 = call i32 @transpose(i32 %0, i32 %1, i8* %2, i8* %9)
%18 = call i32 @forbidden_pattern(i32 %1, i32 %0, i8* %9)
%19 = call i32 @mirrorV(i32 %1, i32 %0, i8* %9, i8* %7)
%20 = call i32 @forbidden_pattern(i32 %1, i32 %0, i8* %7)
%21 = call i32 @mirrorH(i32 %1, i32 %0, i8* %9, i8* %8)
%22 = call i32 @forbidden_pattern(i32 %1, i32 %0, i8* %8)
%23 = call i32 @mirrorH(i32 %1, i32 %0, i8* %7, i8* %8)
%24 = call i32 @forbidden_pattern(i32 %1, i32 %0, i8* %8)
ret void
}