#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 */
char *longestConsec(char **, int, int);
int /*<<< orphan*/ printf(char *);
int main() {
  char *a1[] = {"zone", "abigail", "theta", "form",
                "libe", "zas",     "theta", "abigail"};
  printf(longestConsec(a1, 8, 2));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
lea    0x2c9d(%rip),%rsi
mov    $0x40,%edx
call   1050 <memcpy@plt>
lea    -0x40(%rbp),%rdi
mov    $0x8,%esi
mov    $0x2,%edx
call   1040 <longestConsec@plt>
mov    %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0x2ce5(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x2cc9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2cad(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2c91(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
mov    $0x2,%edx
call   1040 <longestConsec@plt>
mov    %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"zone\00"
@.str.1 = [8 x i8] c"abigail\00"
@.str.2 = [6 x i8] c"theta\00"
@.str.3 = [5 x i8] c"form\00"
@.str.4 = [5 x i8] c"libe\00"
@.str.5 = [4 x i8] c"zas\00"
@__const.main.a1 = [8 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 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 ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0)]
define i32 @main() {
%1 = alloca [8 x i8*]
%2 = bitcast [8 x i8*]* %1 to i8*
%3 = getelementptr inbounds [8 x i8*], [8 x i8*]* %1, i64 0, i64 0
%4 = call i8* @longestConsec(i8** %3, i32 8, i32 2)
%5 = call i32 @printf(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"zone\00"
@.str.1 = [8 x i8] c"abigail\00"
@.str.2 = [6 x i8] c"theta\00"
@.str.3 = [5 x i8] c"form\00"
@.str.4 = [5 x i8] c"libe\00"
@.str.5 = [4 x i8] c"zas\00"
@__const.main.a1 = [8 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 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 ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0)]
define i32 @main() {
%1 = alloca [8 x i8*]
%2 = bitcast [8 x i8*]* %1 to i8*
%3 = getelementptr inbounds [8 x i8*], [8 x i8*]* %1, i64 0, i64 0
%4 = call i8* @longestConsec(i8** %3, i32 8, i32 2)
%5 = call i32 @printf(i8* dereferenceable(1) %4)
ret i32 0
}