int main(int argc, char *argv[]) {
  char *santi[] = {"Padre Pio", "Il Master", "San Sebastiano"};
  argv[0] = santi[1];
  santi[2] = argv[1];
  int i = 0;
  for (; i < argc; i++) {
    printf("arg %d: %s\n", i, argv[i]);
  }
  int num_states = 4;
  for (i = 0; i < num_states; i++) {
    printf("Santo n°%d: %s\n", i + 1, santi[i]);
  }
  printf("Argv address is %x, santi address is %x\n", &argv, &santi);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2cd3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cd0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2ccd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    119c <main+0x8c>
mov    -0x34(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1165 <main+0x55>
movl   $0x4,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    11e1 <main+0xd1>
mov    -0x34(%rbp),%esi
add    $0x1,%esi
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rdx
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11aa <main+0x9a>
lea    0xe58(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x30(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x30,%rsp
mov    %rsi,0x8(%rsp)
movaps 0x2cd8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xed6(%rip),%rax
mov    %rax,(%rsi)
mov    0x8(%rsi),%r14
mov    %r14,0x20(%rsp)
test   %edi,%edi
jle    1199 <main+0x89>
mov    %rsi,%r12
mov    %edi,%ebp
lea    0xed3(%rip),%rdi
lea    0xeb3(%rip),%rdx
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x1,%ebp
je     1199 <main+0x89>
mov    %ebp,%ebx
mov    $0x1,%ebp
lea    0xeb0(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r12,%rbp,8),%rdx
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1180 <main+0x70>
lea    0xe8f(%rip),%rbx
lea    0xe59(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe4d(%rip),%rdx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe4c(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Padre Pio\00"
@.str.1 = [10 x i8] c"Il Master\00"
@.str.2 = [15 x i8] c"San Sebastiano\00"
@__const.main.santi = [3 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [12 x i8] c"arg %d: %s\0A\00"
@.str.4 = [17 x i8] c"Santo n\C2\B0%d: %s\0A\00"
@.str.5 = [41 x i8] c"Argv address is %x, santi address is %x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x i8*]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [3 x i8*]* %6 to i8*
%10 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 1
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 0
store i8* %11, i8** %13
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 2
store i8* %16, i8** %17
store i32 0, i32* %7
br label %18
18: ; preds = %30, %2
%19 = load i32, i32* %7
%20 = load i32, i32* %4
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %33
22: ; preds = %18
%23 = load i32, i32* %7
%24 = load i8**, i8*** %5
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %23, i8* %28)
br label %30
30: ; preds = %22
%31 = load i32, i32* %7
%32 = add nsw i32 %31, 1
store i32 %32, i32* %7
br label %18
33: ; preds = %18
store i32 4, i32* %8
store i32 0, i32* %7
br label %34
34: ; preds = %46, %33
%35 = load i32, i32* %7
%36 = load i32, i32* %8
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %49
38: ; preds = %34
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
%41 = load i32, i32* %7
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 %42
%44 = load i8*, i8** %43
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %40, i8* %44)
br label %46
46: ; preds = %38
%47 = load i32, i32* %7
%48 = add nsw i32 %47, 1
store i32 %48, i32* %7
br label %34
49: ; preds = %34
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8*** %5, [3 x i8*]* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Padre Pio\00"
@.str.1 = [10 x i8] c"Il Master\00"
@.str.2 = [15 x i8] c"San Sebastiano\00"
@__const.main.santi = [3 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [12 x i8] c"arg %d: %s\0A\00"
@.str.4 = [17 x i8] c"Santo n\C2\B0%d: %s\0A\00"
@.str.5 = [41 x i8] c"Argv address is %x, santi address is %x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8**
%4 = alloca [3 x i8*]
store i8** %1, i8*** %3
%5 = bitcast [3 x i8*]* %4 to i8*
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %1
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = getelementptr inbounds [3 x i8*], [3 x i8*]* %4, i64 0, i64 2
store i8* %7, i8** %8
%9 = icmp sgt i32 %0, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = zext i32 %0 to i64
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i32 %0, 1
br i1 %13, label %14, label %20
14: ; preds = %20, %10, %2
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 3, i8* %7)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 4, i8* undef)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8*** %3, [3 x i8*]* %4)
ret i32 0
20: ; preds = %10, %20
%21 = phi i64 [ %26, %20 ], [ 1, %10 ]
%22 = getelementptr inbounds i8*, i8** %1, i64 %21
%23 = load i8*, i8** %22
%24 = trunc i64 %21 to i32
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %24, i8* %23)
%26 = add nuw nsw i64 %21, 1
%27 = icmp eq i64 %26, %11
br i1 %27, label %14, label %20
}