void array_5(void) {
  int *primes[] = {2, 3, 5, 7, 9, 11, 13};
  puts("Original Array:");
  showarray_5(primes, 6);
  modArray_5(primes, 6);
  puts("Modified Array:");
  showarray_5(primes, 6);
}


x86 assembly (clang, -O0):
<array_5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
lea    0xead(%rip),%rsi
mov    $0x38,%edx
call   1050 <memcpy@plt>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1040 <puts@plt>
lea    -0x40(%rbp),%rdi
mov    $0x6,%esi
mov    $0x0,%al
call   1030 <showarray_5@plt>
lea    -0x40(%rbp),%rdi
mov    $0x6,%esi
mov    $0x0,%al
call   1060 <modArray_5@plt>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <puts@plt>
lea    -0x40(%rbp),%rdi
mov    $0x6,%esi
mov    $0x0,%al
call   1030 <showarray_5@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_5>:
push   %rbx
sub    $0x40,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x30(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea0(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1040 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1030 <showarray_5@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <modArray_5@plt>
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1030 <showarray_5@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.array_5.primes = [7 x i32*] [i32* inttoptr (i64 2 to i32*), i32* inttoptr (i64 3 to i32*), i32* inttoptr (i64 5 to i32*), i32* inttoptr (i64 7 to i32*), i32* inttoptr (i64 9 to i32*), i32* inttoptr (i64 11 to i32*), i32* inttoptr (i64 13 to i32*)]
@.str = [16 x i8] c"Original Array:\00"
@.str.1 = [16 x i8] c"Modified Array:\00"
define void @array_5() {
%1 = alloca [7 x i32*]
%2 = bitcast [7 x i32*]* %1 to i8*
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [7 x i32*], [7 x i32*]* %1, i64 0, i64 0
%5 = call i32 (i32**, i32, ...) bitcast (i32 (...)* @showarray_5 to i32 (i32**, i32, ...)*)(i32** %4, i32 6)
%6 = getelementptr inbounds [7 x i32*], [7 x i32*]* %1, i64 0, i64 0
%7 = call i32 (i32**, i32, ...) bitcast (i32 (...)* @modArray_5 to i32 (i32**, i32, ...)*)(i32** %6, i32 6)
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%9 = getelementptr inbounds [7 x i32*], [7 x i32*]* %1, i64 0, i64 0
%10 = call i32 (i32**, i32, ...) bitcast (i32 (...)* @showarray_5 to i32 (i32**, i32, ...)*)(i32** %9, i32 6)
ret void
}

LLVM IR (-O2):
@__const.array_5.primes = [7 x i32*] [i32* inttoptr (i64 2 to i32*), i32* inttoptr (i64 3 to i32*), i32* inttoptr (i64 5 to i32*), i32* inttoptr (i64 7 to i32*), i32* inttoptr (i64 9 to i32*), i32* inttoptr (i64 11 to i32*), i32* inttoptr (i64 13 to i32*)]
@.str = [16 x i8] c"Original Array:\00"
@.str.1 = [16 x i8] c"Modified Array:\00"
define void @array_5() {
%1 = alloca [7 x i32*]
%2 = bitcast [7 x i32*]* %1 to i8*
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [7 x i32*], [7 x i32*]* %1, i64 0, i64 0
%5 = call i32 (i32**, i32, ...) bitcast (i32 (...)* @showarray_5 to i32 (i32**, i32, ...)*)(i32** %4, i32 6)
%6 = call i32 (i32**, i32, ...) bitcast (i32 (...)* @modArray_5 to i32 (i32**, i32, ...)*)(i32** %4, i32 6)
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i32**, i32, ...) bitcast (i32 (...)* @showarray_5 to i32 (i32**, i32, ...)*)(i32** %4, i32 6)
ret void
}