#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*/ dotest(char **, int, char **, int, char *);
int main() {
  {
    char *arr1[3] = {"arp", "live", "strong"};
    char *arr2[5] = {"lively", "alive", "harp", "sharp", "armstrong"};
    dotest(arr1, 3, arr2, 5, "{'arp','live','strong'}");
  }
  {
    char *arr1[7] = {"cod", "code", "wars", "ewar", "pillow", "bed", "phht"};
    char *arr2[8] = {"lively",    "alive",    "harp", "sharp",
                     "armstrong", "codewars", "cod",  "code"};
    dotest(arr1, 7, arr2, 8, "{'cod','code','ewar','wars'}");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    0x2c3e(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2c3b(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2c38(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    0xe8d(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xe89(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xe85(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xe79(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe74(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x50(%rbp),%rdx
mov    $0x3,%esi
mov    $0x5,%ecx
lea    0xe61(%rip),%r8
call   1030 <dotest@plt>
lea    -0x90(%rbp),%rdi
lea    0x2bd1(%rip),%rsi
mov    $0x38,%edx
call   1050 <memcpy@plt>
lea    -0xd0(%rbp),%rdi
lea    0x2bf9(%rip),%rsi
mov    $0x40,%edx
call   1050 <memcpy@plt>
lea    -0x90(%rbp),%rdi
lea    -0xd0(%rbp),%rdx
mov    $0x7,%esi
mov    $0x8,%ecx
lea    0xe4c(%rip),%r8
call   1030 <dotest@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x78,%rsp
mov    0x2c75(%rip),%rax
mov    %rax,0x50(%rsp)
movaps 0x2c59(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
lea    0xecd(%rip),%rax
mov    %rax,(%rsp)
lea    0xec9(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0xec4(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xeb7(%rip),%rax
mov    %rax,0x18(%rsp)
lea    0xeb1(%rip),%rax
mov    %rax,0x20(%rsp)
lea    0xeaf(%rip),%r8
lea    0x40(%rsp),%rdi
mov    %rsp,%rdx
mov    $0x3,%esi
mov    $0x5,%ecx
call   1030 <dotest@plt>
mov    0x2c44(%rip),%rax
mov    %rax,0x70(%rsp)
movaps 0x2c28(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0x2c0c(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0x2bf0(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0x2c54(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x2c38(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2c1c(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2c00(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xe71(%rip),%r8
lea    0x40(%rsp),%rdi
mov    %rsp,%rdx
mov    $0x7,%esi
mov    $0x8,%ecx
call   1030 <dotest@plt>
xor    %eax,%eax
add    $0x78,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"arp\00"
@.str.1 = [5 x i8] c"live\00"
@.str.2 = [7 x i8] c"strong\00"
@__const.main.arr1 = [3 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 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 ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [7 x i8] c"lively\00"
@.str.4 = [6 x i8] c"alive\00"
@.str.5 = [5 x i8] c"harp\00"
@.str.6 = [6 x i8] c"sharp\00"
@.str.7 = [10 x i8] c"armstrong\00"
@.str.8 = [24 x i8] c"{'arp','live','strong'}\00"
@.str.9 = [4 x i8] c"cod\00"
@.str.10 = [5 x i8] c"code\00"
@.str.11 = [5 x i8] c"wars\00"
@.str.12 = [5 x i8] c"ewar\00"
@.str.13 = [7 x i8] c"pillow\00"
@.str.14 = [4 x i8] c"bed\00"
@.str.15 = [5 x i8] c"phht\00"
@__const.main.arr1.16 = [7 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 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 ([5 x i8], [5 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i32 0, i32 0)]
@.str.17 = [9 x i8] c"codewars\00"
@__const.main.arr2 = [8 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 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.17, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i32 0, i32 0)]
@.str.18 = [29 x i8] c"{'cod','code','ewar','wars'}\00"
define i32 @main() {
%1 = alloca [3 x i8*]
%2 = alloca [5 x i8*]
%3 = alloca [7 x i8*]
%4 = alloca [8 x i8*]
%5 = bitcast [3 x i8*]* %1 to i8*
%6 = bitcast [5 x i8*]* %2 to i8*
%7 = bitcast i8* %6 to [5 x i8*]*
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i32 0, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0), i8** %8
%9 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i32 0, i32 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8** %9
%10 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i32 0, i32 2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8** %10
%11 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i32 0, i32 3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i32 0, i32 0), i8** %11
%12 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i32 0, i32 4
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i32 0, i32 0), i8** %12
%13 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%14 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 0
%15 = call i32 @dotest(i8** %13, i32 3, i8** %14, i32 5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%16 = bitcast [7 x i8*]* %3 to i8*
%17 = bitcast [8 x i8*]* %4 to i8*
%18 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 0
%19 = getelementptr inbounds [8 x i8*], [8 x i8*]* %4, i64 0, i64 0
%20 = call i32 @dotest(i8** %18, i32 7, i8** %19, i32 8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.18, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"arp\00"
@.str.1 = [5 x i8] c"live\00"
@.str.2 = [7 x i8] c"strong\00"
@__const.main.arr1 = [3 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 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 ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [7 x i8] c"lively\00"
@.str.4 = [6 x i8] c"alive\00"
@.str.5 = [5 x i8] c"harp\00"
@.str.6 = [6 x i8] c"sharp\00"
@.str.7 = [10 x i8] c"armstrong\00"
@.str.8 = [24 x i8] c"{'arp','live','strong'}\00"
@.str.9 = [4 x i8] c"cod\00"
@.str.10 = [5 x i8] c"code\00"
@.str.11 = [5 x i8] c"wars\00"
@.str.12 = [5 x i8] c"ewar\00"
@.str.13 = [7 x i8] c"pillow\00"
@.str.14 = [4 x i8] c"bed\00"
@.str.15 = [5 x i8] c"phht\00"
@__const.main.arr1.16 = [7 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 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 ([5 x i8], [5 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i32 0, i32 0)]
@.str.17 = [9 x i8] c"codewars\00"
@__const.main.arr2 = [8 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 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.17, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i32 0, i32 0)]
@.str.18 = [29 x i8] c"{'cod','code','ewar','wars'}\00"
define i32 @main() {
%1 = alloca [3 x i8*]
%2 = alloca [5 x i8*]
%3 = alloca [7 x i8*]
%4 = alloca [8 x i8*]
%5 = bitcast [3 x i8*]* %1 to i8*
%6 = bitcast [5 x i8*]* %2 to i8*
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %8
%9 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8** %9
%10 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8** %10
%11 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 4
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8** %11
%12 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%13 = call i32 @dotest(i8** %12, i32 3, i8** %7, i32 5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%14 = bitcast [7 x i8*]* %3 to i8*
%15 = bitcast [8 x i8*]* %4 to i8*
%16 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 0
%17 = getelementptr inbounds [8 x i8*], [8 x i8*]* %4, i64 0, i64 0
%18 = call i32 @dotest(i8** %16, i32 7, i8** %17, i32 8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.18, i64 0, i64 0))
ret i32 0
}