#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 */
typedef int /*<<< orphan*/ names;

/* Variables and functions */
int EXIT_SUCCESS;
char *calloc(scalar_t__, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
int main(void) {
  char *names[] = {
      "francesca", "claudia", "xxx", "isabella", "xxx", "deborah",
  };
  char namea[] = "rossella";
  char nameb[] = "lodovica";
  names[2] = calloc(strlen(namea) + 1, sizeof(char));
  strcpy(names[2], namea);
  names[4] = &nameb[0];
  for (int i = 0; i < (sizeof(names) / sizeof(names[0])); i++)
    printf("%s\n", names[i]);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1060 <memset@plt>
lea    0xe8a(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xe89(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe86(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe7f(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xe70(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xe72(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe6f(%rip),%rax
mov    %rax,-0x49(%rbp)
mov    0xe6d(%rip),%al
mov    %al,-0x41(%rbp)
mov    0xe64(%rip),%rax
mov    %rax,-0x52(%rbp)
mov    0xe62(%rip),%al
mov    %al,-0x4a(%rbp)
lea    -0x49(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1070 <calloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    -0x49(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x52(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x58(%rbp)
movslq -0x58(%rbp),%rax
cmp    $0x6,%rax
jae    1244 <main+0xf4>
movslq -0x58(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rsi
lea    0xe08(%rip),%rdi
call   1050 <printf@plt>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1213 <main+0xc3>
mov    0x2d95(%rip),%rax
mov    (%rax),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movabs $0x616c6c6573736f72,%rax
6c 6c 61
mov    %rax,0x18(%rsp)
movb   $0x0,0x20(%rsp)
movabs $0x616369766f646f6c,%rax
69 63 61
mov    %rax,0x8(%rsp)
movb   $0x0,0x10(%rsp)
lea    0x18(%rsp),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    $0x1,%esi
call   1060 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
lea    0xe96(%rip),%r14
lea    0xe5a(%rip),%rsi
mov    %r14,%rdi
call   1050 <printf@plt>
lea    0xe55(%rip),%rsi
mov    %r14,%rdi
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
lea    0xe43(%rip),%rsi
mov    %r14,%rdi
call   1050 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1050 <printf@plt>
lea    0xe30(%rip),%rsi
mov    %r14,%rdi
call   1050 <printf@plt>
mov    0x2de6(%rip),%rax
mov    (%rax),%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"francesca\00"
@.str.1 = [8 x i8] c"claudia\00"
@.str.2 = [4 x i8] c"xxx\00"
@.str.3 = [9 x i8] c"isabella\00"
@.str.4 = [8 x i8] c"deborah\00"
@__const.main.namea = [9 x i8] c"rossella\00"
@__const.main.nameb = [9 x i8] c"lodovica\00"
@.str.5 = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8*]
%3 = alloca [9 x i8]
%4 = alloca [9 x i8]
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [6 x i8*]* %2 to i8*
%7 = bitcast i8* %6 to [6 x i8*]*
%8 = getelementptr inbounds [6 x i8*], [6 x i8*]* %7, i32 0, i32 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8** %8
%9 = getelementptr inbounds [6 x i8*], [6 x i8*]* %7, i32 0, i32 1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i8** %9
%10 = getelementptr inbounds [6 x i8*], [6 x i8*]* %7, i32 0, i32 2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8** %10
%11 = getelementptr inbounds [6 x i8*], [6 x i8*]* %7, i32 0, i32 3
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i32 0, i32 0), i8** %11
%12 = getelementptr inbounds [6 x i8*], [6 x i8*]* %7, i32 0, i32 4
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8** %12
%13 = getelementptr inbounds [6 x i8*], [6 x i8*]* %7, i32 0, i32 5
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i32 0, i32 0), i8** %13
%14 = bitcast [9 x i8]* %3 to i8*
%15 = bitcast [9 x i8]* %4 to i8*
%16 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%17 = call i64 @strlen(i8* %16)
%18 = add nsw i64 %17, 1
%19 = call i8* @calloc(i64 %18, i32 1)
%20 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 2
store i8* %19, i8** %20
%21 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 2
%22 = load i8*, i8** %21
%23 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%24 = call i32 @strcpy(i8* %22, i8* %23)
%25 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%26 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 4
store i8* %25, i8** %26
store i32 0, i32* %5
br label %27
27: ; preds = %37, %0
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = icmp ult i64 %29, 6
br i1 %30, label %31, label %40
31: ; preds = %27
%32 = load i32, i32* %5
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 %33
%35 = load i8*, i8** %34
%36 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %35)
br label %37
37: ; preds = %31
%38 = load i32, i32* %5
%39 = add nsw i32 %38, 1
store i32 %39, i32* %5
br label %27
40: ; preds = %27
%41 = load i32, i32* @EXIT_SUCCESS
ret i32 %41
}

LLVM IR (-O2):
@.str = [10 x i8] c"francesca\00"
@.str.1 = [8 x i8] c"claudia\00"
@.str.3 = [9 x i8] c"isabella\00"
@.str.4 = [8 x i8] c"deborah\00"
@__const.main.namea = [9 x i8] c"rossella\00"
@__const.main.nameb = [9 x i8] c"lodovica\00"
@.str.5 = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [9 x i8]
%2 = alloca [9 x i8]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%5 = call i64 @strlen(i8* %3)
%6 = add nsw i64 %5, 1
%7 = tail call i8* @calloc(i64 %6, i32 1)
%8 = call i32 @strcpy(i8* %7, i8* %3)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %7)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %4)
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%15 = load i32, i32* @EXIT_SUCCESS
ret i32 %15
}