#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*/ search_anagram(char **, int);
int main(int argc, char *argv[]) {
  char *dict[20] = {"abcdefg", "hijk", "lmnop", "qrst", "uvwxyz",
                    "bcdefga", "ijkh", "mnopl", "rstq", "vwxyzu",
                    "cdefgab", "jkhi", "noplm", "stqr", "wxyzuv",
                    "efgabcd", "khij", "oplmn", "tqsr", "xyzuvw"};
  char *dict_null[5] = {NULL, NULL, NULL, NULL, NULL};
  char *dict_tops[7] = {"Tops", "tips", "oops", "sTop", "1", "2", "pots"};
  char *dict_empty[5] = {"", "", "", "", ""};
  search_anagram(dict, 20);
  search_anagram(dict_null, 5);
  search_anagram(dict_tops, 7);
  search_anagram(dict_empty, 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0x2be9(%rip),%rsi
mov    $0xa0,%edx
call   1050 <memcpy@plt>
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    -0x120(%rbp),%rdi
lea    0x2c5e(%rip),%rsi
mov    $0x38,%edx
call   1050 <memcpy@plt>
lea    -0x150(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    0xeeb(%rip),%rax
mov    %rax,-0x150(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x148(%rbp)
lea    0xecf(%rip),%rax
mov    %rax,-0x140(%rbp)
lea    0xec1(%rip),%rax
mov    %rax,-0x138(%rbp)
lea    0xeb3(%rip),%rax
mov    %rax,-0x130(%rbp)
lea    -0xb0(%rbp),%rdi
mov    $0x14,%esi
call   1030 <search_anagram@plt>
lea    -0xe0(%rbp),%rdi
mov    $0x5,%esi
call   1030 <search_anagram@plt>
lea    -0x120(%rbp),%rdi
mov    $0x7,%esi
call   1030 <search_anagram@plt>
lea    -0x150(%rbp),%rdi
mov    $0x5,%esi
call   1030 <search_anagram@plt>
xor    %eax,%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x140,%rsp
lea    0x2c11(%rip),%rsi
lea    0xa0(%rsp),%rbx
mov    $0xa0,%edx
mov    %rbx,%rdi
call   1040 <memcpy@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movq   $0x0,0x50(%rsp)
mov    0x2caf(%rip),%rax
mov    %rax,0x90(%rsp)
movaps 0x2c90(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0x2c71(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0x2c55(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
lea    0xefa(%rip),%rax
mov    %rax,(%rsp)
mov    %rax,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    %rbx,%rdi
mov    $0x14,%esi
call   1030 <search_anagram@plt>
lea    0x30(%rsp),%rdi
mov    $0x5,%esi
call   1030 <search_anagram@plt>
lea    0x60(%rsp),%rdi
mov    $0x7,%esi
call   1030 <search_anagram@plt>
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <search_anagram@plt>
xor    %eax,%eax
add    $0x140,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"abcdefg\00"
@.str.1 = [5 x i8] c"hijk\00"
@.str.2 = [6 x i8] c"lmnop\00"
@.str.3 = [5 x i8] c"qrst\00"
@.str.4 = [7 x i8] c"uvwxyz\00"
@.str.5 = [8 x i8] c"bcdefga\00"
@.str.6 = [5 x i8] c"ijkh\00"
@.str.7 = [6 x i8] c"mnopl\00"
@.str.8 = [5 x i8] c"rstq\00"
@.str.9 = [7 x i8] c"vwxyzu\00"
@.str.10 = [8 x i8] c"cdefgab\00"
@.str.11 = [5 x i8] c"jkhi\00"
@.str.12 = [6 x i8] c"noplm\00"
@.str.13 = [5 x i8] c"stqr\00"
@.str.14 = [7 x i8] c"wxyzuv\00"
@.str.15 = [8 x i8] c"efgabcd\00"
@.str.16 = [5 x i8] c"khij\00"
@.str.17 = [6 x i8] c"oplmn\00"
@.str.18 = [5 x i8] c"tqsr\00"
@.str.19 = [7 x i8] c"xyzuvw\00"
@__const.main.dict = [20 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i32 0, i32 0)]
@.str.20 = [5 x i8] c"Tops\00"
@.str.21 = [5 x i8] c"tips\00"
@.str.22 = [5 x i8] c"oops\00"
@.str.23 = [5 x i8] c"sTop\00"
@.str.24 = [2 x i8] c"1\00"
@.str.25 = [2 x i8] c"2\00"
@.str.26 = [5 x i8] c"pots\00"
@__const.main.dict_tops = [7 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.26, i32 0, i32 0)]
@.str.27 = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [20 x i8*]
%7 = alloca [5 x i8*]
%8 = alloca [7 x i8*]
%9 = alloca [5 x i8*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [20 x i8*]* %6 to i8*
%11 = bitcast [5 x i8*]* %7 to i8*
%12 = bitcast [7 x i8*]* %8 to i8*
%13 = bitcast [5 x i8*]* %9 to i8*
%14 = bitcast i8* %13 to [5 x i8*]*
%15 = getelementptr inbounds [5 x i8*], [5 x i8*]* %14, i32 0, i32 0
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.27, i32 0, i32 0), i8** %15
%16 = getelementptr inbounds [5 x i8*], [5 x i8*]* %14, i32 0, i32 1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.27, i32 0, i32 0), i8** %16
%17 = getelementptr inbounds [5 x i8*], [5 x i8*]* %14, i32 0, i32 2
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.27, i32 0, i32 0), i8** %17
%18 = getelementptr inbounds [5 x i8*], [5 x i8*]* %14, i32 0, i32 3
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.27, i32 0, i32 0), i8** %18
%19 = getelementptr inbounds [5 x i8*], [5 x i8*]* %14, i32 0, i32 4
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.27, i32 0, i32 0), i8** %19
%20 = getelementptr inbounds [20 x i8*], [20 x i8*]* %6, i64 0, i64 0
%21 = call i32 @search_anagram(i8** %20, i32 20)
%22 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i64 0, i64 0
%23 = call i32 @search_anagram(i8** %22, i32 5)
%24 = getelementptr inbounds [7 x i8*], [7 x i8*]* %8, i64 0, i64 0
%25 = call i32 @search_anagram(i8** %24, i32 7)
%26 = getelementptr inbounds [5 x i8*], [5 x i8*]* %9, i64 0, i64 0
%27 = call i32 @search_anagram(i8** %26, i32 5)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"abcdefg\00"
@.str.1 = [5 x i8] c"hijk\00"
@.str.2 = [6 x i8] c"lmnop\00"
@.str.3 = [5 x i8] c"qrst\00"
@.str.4 = [7 x i8] c"uvwxyz\00"
@.str.5 = [8 x i8] c"bcdefga\00"
@.str.6 = [5 x i8] c"ijkh\00"
@.str.7 = [6 x i8] c"mnopl\00"
@.str.8 = [5 x i8] c"rstq\00"
@.str.9 = [7 x i8] c"vwxyzu\00"
@.str.10 = [8 x i8] c"cdefgab\00"
@.str.11 = [5 x i8] c"jkhi\00"
@.str.12 = [6 x i8] c"noplm\00"
@.str.13 = [5 x i8] c"stqr\00"
@.str.14 = [7 x i8] c"wxyzuv\00"
@.str.15 = [8 x i8] c"efgabcd\00"
@.str.16 = [5 x i8] c"khij\00"
@.str.17 = [6 x i8] c"oplmn\00"
@.str.18 = [5 x i8] c"tqsr\00"
@.str.19 = [7 x i8] c"xyzuvw\00"
@__const.main.dict = [20 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i32 0, i32 0)]
@.str.20 = [5 x i8] c"Tops\00"
@.str.21 = [5 x i8] c"tips\00"
@.str.22 = [5 x i8] c"oops\00"
@.str.23 = [5 x i8] c"sTop\00"
@.str.24 = [2 x i8] c"1\00"
@.str.25 = [2 x i8] c"2\00"
@.str.26 = [5 x i8] c"pots\00"
@__const.main.dict_tops = [7 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.26, i32 0, i32 0)]
@.str.27 = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [20 x i8*]
%4 = alloca [5 x i8*]
%5 = alloca [7 x i8*]
%6 = alloca [5 x i8*]
%7 = bitcast [20 x i8*]* %3 to i8*
%8 = bitcast [5 x i8*]* %4 to i8*
%9 = bitcast [7 x i8*]* %5 to i8*
%10 = bitcast [5 x i8*]* %6 to i8*
%11 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i64 0, i64 0
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.27, i64 0, i64 0), i8** %11
%12 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i64 0, i64 1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.27, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i64 0, i64 2
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.27, i64 0, i64 0), i8** %13
%14 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i64 0, i64 3
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.27, i64 0, i64 0), i8** %14
%15 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i64 0, i64 4
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.27, i64 0, i64 0), i8** %15
%16 = getelementptr inbounds [20 x i8*], [20 x i8*]* %3, i64 0, i64 0
%17 = call i32 @search_anagram(i8** %16, i32 20)
%18 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i64 0, i64 0
%19 = call i32 @search_anagram(i8** %18, i32 5)
%20 = getelementptr inbounds [7 x i8*], [7 x i8*]* %5, i64 0, i64 0
%21 = call i32 @search_anagram(i8** %20, i32 7)
%22 = call i32 @search_anagram(i8** %11, i32 5)
ret i32 0
}