#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 *, int, int, char *);
int main() {
  {
    char *st = "";
    int we[7] = {4, 2, 1, 4, 3, 1, 2};
    dotest(st, we, 4, 7, "No participants");
  }
  {
    char *st = "Addison,Jayden,Sofia,Michael,Andrew,Lily,Benjamin";
    int we[7] = {4, 2, 1, 4, 3, 1, 2};
    dotest(st, we, 4, 7, "Benjamin");
  }
  {
    char *st = "Elijah,Chloe,Elizabeth,Matthew,Natalie,Jayden";
    int we[6] = {1, 3, 5, 5, 3, 6};
    dotest(st, we, 2, 6, "Matthew");
  }
  {
    char *st = "Aubrey,Olivai,Abigail,Chloe,Andrew,Elizabeth";
    int we[6] = {3, 1, 4, 4, 3, 2};
    dotest(st, we, 4, 6, "Abigail");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
lea    0xf82(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xf83(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xf80(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xf7d(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xf7b(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x4,%edx
mov    $0x7,%ecx
lea    0xe97(%rip),%r8
call   1030 <dotest@plt>
lea    0xe9b(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xf50(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xf4d(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xf4a(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xf48(%rip),%eax
mov    %eax,-0x48(%rbp)
mov    -0x38(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x4,%edx
mov    $0x7,%ecx
lea    0xe7d(%rip),%r8
call   1030 <dotest@plt>
lea    0xe7a(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xf1d(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xf1a(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xf17(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    -0x68(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x2,%edx
mov    $0x6,%ecx
lea    0xe6a(%rip),%r8
call   1030 <dotest@plt>
lea    0xe66(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xef0(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xeea(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0xee4(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    -0x88(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    $0x4,%edx
mov    $0x6,%ecx
lea    0xe43(%rip),%r8
call   1030 <dotest@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movups 0xfa1(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movaps 0xf89(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xf72(%rip),%rdi
lea    0xec7(%rip),%r8
mov    %rsp,%rsi
mov    $0x4,%edx
mov    $0x7,%ecx
call   1030 <dotest@plt>
movups 0xf6a(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movaps 0xf52(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xea7(%rip),%rdi
lea    0xec9(%rip),%r8
mov    %rsp,%rsi
mov    $0x4,%edx
mov    $0x7,%ecx
call   1030 <dotest@plt>
mov    0xf57(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xf3b(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xea2(%rip),%rdi
lea    0xec9(%rip),%r8
mov    %rsp,%rsi
mov    $0x2,%edx
mov    $0x6,%ecx
call   1030 <dotest@plt>
mov    0xf40(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xf24(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xea1(%rip),%rdi
lea    0xec7(%rip),%r8
mov    %rsp,%rsi
mov    $0x4,%edx
mov    $0x6,%ecx
call   1030 <dotest@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@__const.main.we = [7 x i32] [i32 4, i32 2, i32 1, i32 4, i32 3, i32 1, i32 2]
@.str.1 = [16 x i8] c"No participants\00"
@.str.2 = [50 x i8] c"Addison,Jayden,Sofia,Michael,Andrew,Lily,Benjamin\00"
@__const.main.we.3 = [7 x i32] [i32 4, i32 2, i32 1, i32 4, i32 3, i32 1, i32 2]
@.str.4 = [9 x i8] c"Benjamin\00"
@.str.5 = [46 x i8] c"Elijah,Chloe,Elizabeth,Matthew,Natalie,Jayden\00"
@__const.main.we.6 = [6 x i32] [i32 1, i32 3, i32 5, i32 5, i32 3, i32 6]
@.str.7 = [8 x i8] c"Matthew\00"
@.str.8 = [45 x i8] c"Aubrey,Olivai,Abigail,Chloe,Andrew,Elizabeth\00"
@__const.main.we.9 = [6 x i32] [i32 3, i32 1, i32 4, i32 4, i32 3, i32 2]
@.str.10 = [8 x i8] c"Abigail\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca [7 x i32]
%3 = alloca i8*
%4 = alloca [7 x i32]
%5 = alloca i8*
%6 = alloca [6 x i32]
%7 = alloca i8*
%8 = alloca [6 x i32]
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %1
%9 = bitcast [7 x i32]* %2 to i8*
%10 = load i8*, i8** %1
%11 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%12 = call i32 @dotest(i8* %10, i32* %11, i32 4, i32 7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
store i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i8** %3
%13 = bitcast [7 x i32]* %4 to i8*
%14 = load i8*, i8** %3
%15 = getelementptr inbounds [7 x i32], [7 x i32]* %4, i64 0, i64 0
%16 = call i32 @dotest(i8* %14, i32* %15, i32 4, i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0), i8** %5
%17 = bitcast [6 x i32]* %6 to i8*
%18 = load i8*, i8** %5
%19 = getelementptr inbounds [6 x i32], [6 x i32]* %6, i64 0, i64 0
%20 = call i32 @dotest(i8* %18, i32* %19, i32 2, i32 6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
store i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0), i8** %7
%21 = bitcast [6 x i32]* %8 to i8*
%22 = load i8*, i8** %7
%23 = getelementptr inbounds [6 x i32], [6 x i32]* %8, i64 0, i64 0
%24 = call i32 @dotest(i8* %22, i32* %23, i32 4, i32 6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [16 x i8] c"No participants\00"
@.str.2 = [50 x i8] c"Addison,Jayden,Sofia,Michael,Andrew,Lily,Benjamin\00"
@__const.main.we.3 = [7 x i32] [i32 4, i32 2, i32 1, i32 4, i32 3, i32 1, i32 2]
@.str.4 = [9 x i8] c"Benjamin\00"
@.str.5 = [46 x i8] c"Elijah,Chloe,Elizabeth,Matthew,Natalie,Jayden\00"
@__const.main.we.6 = [6 x i32] [i32 1, i32 3, i32 5, i32 5, i32 3, i32 6]
@.str.7 = [8 x i8] c"Matthew\00"
@.str.8 = [45 x i8] c"Aubrey,Olivai,Abigail,Chloe,Andrew,Elizabeth\00"
@__const.main.we.9 = [6 x i32] [i32 3, i32 1, i32 4, i32 4, i32 3, i32 2]
@.str.10 = [8 x i8] c"Abigail\00"
define i32 @main() {
%1 = alloca [7 x i32]
%2 = alloca [7 x i32]
%3 = alloca [6 x i32]
%4 = alloca [6 x i32]
%5 = bitcast [7 x i32]* %1 to i8*
%6 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%7 = call i32 @dotest(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32* %6, i32 4, i32 7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%8 = bitcast [7 x i32]* %2 to i8*
%9 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%10 = call i32 @dotest(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i32* %9, i32 4, i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%11 = bitcast [6 x i32]* %3 to i8*
%12 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 0
%13 = call i32 @dotest(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0), i32* %12, i32 2, i32 6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%14 = bitcast [6 x i32]* %4 to i8*
%15 = getelementptr inbounds [6 x i32], [6 x i32]* %4, i64 0, i64 0
%16 = call i32 @dotest(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0), i32* %15, i32 4, i32 6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}