#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 maxLength(char **, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *arr[] = {"cusy",
                 "s",
                 "imelfbpuoawkrq",
                 "roxckjm",
                 "vkaxcbespwotzq",
                 "jrnhyslwbifteqox",
                 "fnisjhckr",
                 "ubvpwtzxh",
                 "sgxkqdlw",
                 "hzsngeotfxbcm",
                 "zhrextvndpcmbql",
                 "bdfxez",
                 "rzgnbf",
                 "hbw",
                 "cohurlnjqpefzayig",
                 "xoqgyjsm"};
  char **a = arr;
  int max = maxLength(a, 16);
  printf("max %d\n", max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
lea    0x2c50(%rip),%rsi
mov    $0x80,%edx
call   1040 <memcpy@plt>
lea    -0x90(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rdi
mov    $0x10,%esi
call   1050 <maxLength@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x9c(%rbp),%esi
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x88,%rsp
movaps 0x2ce2(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0x2cc6(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0x2caa(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0x2c8e(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0x2c72(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x2c56(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2c3a(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2c1e(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x10,%esi
call   1040 <maxLength@plt>
lea    0xf0c(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x88,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"cusy\00"
@.str.1 = [2 x i8] c"s\00"
@.str.2 = [15 x i8] c"imelfbpuoawkrq\00"
@.str.3 = [8 x i8] c"roxckjm\00"
@.str.4 = [15 x i8] c"vkaxcbespwotzq\00"
@.str.5 = [17 x i8] c"jrnhyslwbifteqox\00"
@.str.6 = [10 x i8] c"fnisjhckr\00"
@.str.7 = [10 x i8] c"ubvpwtzxh\00"
@.str.8 = [9 x i8] c"sgxkqdlw\00"
@.str.9 = [14 x i8] c"hzsngeotfxbcm\00"
@.str.10 = [16 x i8] c"zhrextvndpcmbql\00"
@.str.11 = [7 x i8] c"bdfxez\00"
@.str.12 = [7 x i8] c"rzgnbf\00"
@.str.13 = [4 x i8] c"hbw\00"
@.str.14 = [18 x i8] c"cohurlnjqpefzayig\00"
@.str.15 = [9 x i8] c"xoqgyjsm\00"
@__const.main.arr = [16 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i32 0, i32 0)]
@.str.16 = [8 x i8] c"max %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i8*]
%3 = alloca i8**
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [16 x i8*]* %2 to i8*
%6 = getelementptr inbounds [16 x i8*], [16 x i8*]* %2, i64 0, i64 0
store i8** %6, i8*** %3
%7 = load i8**, i8*** %3
%8 = call i32 @maxLength(i8** %7, i32 16)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"cusy\00"
@.str.1 = [2 x i8] c"s\00"
@.str.2 = [15 x i8] c"imelfbpuoawkrq\00"
@.str.3 = [8 x i8] c"roxckjm\00"
@.str.4 = [15 x i8] c"vkaxcbespwotzq\00"
@.str.5 = [17 x i8] c"jrnhyslwbifteqox\00"
@.str.6 = [10 x i8] c"fnisjhckr\00"
@.str.7 = [10 x i8] c"ubvpwtzxh\00"
@.str.8 = [9 x i8] c"sgxkqdlw\00"
@.str.9 = [14 x i8] c"hzsngeotfxbcm\00"
@.str.10 = [16 x i8] c"zhrextvndpcmbql\00"
@.str.11 = [7 x i8] c"bdfxez\00"
@.str.12 = [7 x i8] c"rzgnbf\00"
@.str.13 = [4 x i8] c"hbw\00"
@.str.14 = [18 x i8] c"cohurlnjqpefzayig\00"
@.str.15 = [9 x i8] c"xoqgyjsm\00"
@__const.main.arr = [16 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i32 0, i32 0)]
@.str.16 = [8 x i8] c"max %d\0A\00"
define i32 @main() {
%1 = alloca [16 x i8*]
%2 = bitcast [16 x i8*]* %1 to i8*
%3 = getelementptr inbounds [16 x i8*], [16 x i8*]* %1, i64 0, i64 0
%4 = call i32 @maxLength(i8** %3, i32 16)
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i32 %4)
ret i32 0
}