int f(char *newArray) {
  char temp[132];
  int i;
  for (i = 0; i < 132; i++) {
    newArray[i] = temp[i];
  }
  printf("-----\n");
  printf(" newArray [%u] i [%u] j[%u]\n", &newArray, &temp, &i);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0xa4(%rbp)
cmpl   $0x84,-0xa4(%rbp)
jge    1169 <f+0x59>
movslq -0xa4(%rbp),%rax
mov    -0xa0(%rbp,%rax,1),%dl
mov    -0x10(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    1129 <f+0x19>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe89(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0xa0(%rbp),%rdx
lea    -0xa4(%rbp),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
sub    $0x98,%rsp
mov    %rdi,0x8(%rsp)
movl   $0x1,0x4(%rsp)
mov    $0x1,%eax
nopl   0x0(%rax)
cltq
movzbl 0x10(%rsp,%rax,1),%ecx
mov    0x8(%rsp),%rdx
mov    %cl,(%rdx,%rax,1)
mov    0x4(%rsp),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x4(%rsp)
cmp    $0x83,%ecx
jl     1140 <f+0x20>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xe8b(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x4(%rsp),%rcx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x98,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"-----\0A\00"
@.str.1 = [29 x i8] c" newArray [%u] i [%u] j[%u]\0A\00"
define i32 @f(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [132 x i8]
%5 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %5
br label %6
6: ; preds = %18, %1
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 132
br i1 %8, label %9, label %21
9: ; preds = %6
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [132 x i8], [132 x i8]* %4, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = load i8*, i8** %3
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 %13, i8* %17
br label %18
18: ; preds = %9
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8** %3, [132 x i8]* %4, i32* %5)
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
@.str.1 = [29 x i8] c" newArray [%u] i [%u] j[%u]\0A\00"
@str = [6 x i8] c"-----\00"
define i32 @f(i8* %0) {
%2 = alloca i8*
%3 = alloca [132 x i8]
%4 = alloca i32
store i8* %0, i8** %2
%5 = getelementptr inbounds [132 x i8], [132 x i8]* %3, i64 0, i64 0
%6 = bitcast i32* %4 to i8*
store i32 1, i32* %4
br label %7
7: ; preds = %1, %7
%8 = phi i32 [ 1, %1 ], [ %16, %7 ]
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [132 x i8], [132 x i8]* %3, i64 0, i64 %9
%11 = load i8, i8* %10
%12 = load i8*, i8** %2
%13 = sext i32 %8 to i64
%14 = getelementptr inbounds i8, i8* %12, i64 %13
store i8 %11, i8* %14
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
%17 = icmp slt i32 %15, 131
br i1 %17, label %7, label %18
18: ; preds = %7
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8** %2, [132 x i8]* %3, i32* %4)
ret i32 undef
}