void setGugu(int *arr, int length) {
  int *ptr = arr;
  int dan = 2;
  int time = 1;
  for (dan = 2; dan < 10; dan++) {
    for (time = 1; time < 10; time++) {
      *ptr = dan * time;
      ptr++;
    }
  }
  return;
}


x86 assembly (clang, -O0):
<setGugu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x2,-0x1c(%rbp)
cmpl   $0xa,-0x1c(%rbp)
jge    117d <setGugu+0x7d>
movl   $0x1,-0x20(%rbp)
cmpl   $0xa,-0x20(%rbp)
jge    116a <setGugu+0x6a>
mov    -0x1c(%rbp),%ecx
imul   -0x20(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1139 <setGugu+0x39>
jmp    116f <setGugu+0x6f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1128 <setGugu+0x28>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setGugu>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movaps 0xeff(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movaps 0xf04(%rip),%xmm0
movups %xmm0,0x20(%rdi)
movaps 0xf09(%rip),%xmm0
movups %xmm0,0x30(%rdi)
movaps 0xf0e(%rip),%xmm0
movups %xmm0,0x40(%rdi)
movaps 0xf13(%rip),%xmm0
movups %xmm0,0x50(%rdi)
movaps 0xf18(%rip),%xmm0
movups %xmm0,0x60(%rdi)
movaps 0xf1d(%rip),%xmm0
movups %xmm0,0x70(%rdi)
movaps 0xf22(%rip),%xmm0
movups %xmm0,0x80(%rdi)
movaps 0xf24(%rip),%xmm0
movups %xmm0,0x90(%rdi)
movaps 0xf26(%rip),%xmm0
movups %xmm0,0xa0(%rdi)
movaps 0xf28(%rip),%xmm0
movups %xmm0,0xb0(%rdi)
movaps 0xf2a(%rip),%xmm0
movups %xmm0,0xc0(%rdi)
movaps 0xf2c(%rip),%xmm0
movups %xmm0,0xd0(%rdi)
movaps 0xf2e(%rip),%xmm0
movups %xmm0,0xe0(%rdi)
movaps 0xf30(%rip),%xmm0
movups %xmm0,0xf0(%rdi)
movaps 0xf32(%rip),%xmm0
movups %xmm0,0x100(%rdi)
movaps 0xf34(%rip),%xmm0
movups %xmm0,0x110(%rdi)
ret

LLVM IR (-O0):
define void @setGugu(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%8 = load i32*, i32** %3
store i32* %8, i32** %5
store i32 2, i32* %6
store i32 1, i32* %7
store i32 2, i32* %6
br label %9
9: ; preds = %27, %2
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %30
12: ; preds = %9
store i32 1, i32* %7
br label %13
13: ; preds = %23, %12
%14 = load i32, i32* %7
%15 = icmp slt i32 %14, 10
br i1 %15, label %16, label %26
16: ; preds = %13
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = mul nsw i32 %17, %18
%20 = load i32*, i32** %5
store i32 %19, i32* %20
%21 = load i32*, i32** %5
%22 = getelementptr inbounds i32, i32* %21, i32 1
store i32* %22, i32** %5
br label %23
23: ; preds = %16
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
br label %13
26: ; preds = %13
br label %27
27: ; preds = %26
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %9
30: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @setGugu(i32* nocapture writeonly %0, i32 %1) {
%3 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 2, i32 4, i32 6, i32 8>, <4 x i32>* %3
%4 = getelementptr inbounds i32, i32* %0, i64 4
%5 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> <i32 10, i32 12, i32 14, i32 16>, <4 x i32>* %5
%6 = getelementptr inbounds i32, i32* %0, i64 8
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> <i32 18, i32 3, i32 6, i32 9>, <4 x i32>* %7
%8 = getelementptr inbounds i32, i32* %0, i64 12
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 12, i32 15, i32 18, i32 21>, <4 x i32>* %9
%10 = getelementptr inbounds i32, i32* %0, i64 16
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 24, i32 27, i32 4, i32 8>, <4 x i32>* %11
%12 = getelementptr inbounds i32, i32* %0, i64 20
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> <i32 12, i32 16, i32 20, i32 24>, <4 x i32>* %13
%14 = getelementptr inbounds i32, i32* %0, i64 24
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> <i32 28, i32 32, i32 36, i32 5>, <4 x i32>* %15
%16 = getelementptr inbounds i32, i32* %0, i64 28
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> <i32 10, i32 15, i32 20, i32 25>, <4 x i32>* %17
%18 = getelementptr inbounds i32, i32* %0, i64 32
%19 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> <i32 30, i32 35, i32 40, i32 45>, <4 x i32>* %19
%20 = getelementptr inbounds i32, i32* %0, i64 36
%21 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> <i32 6, i32 12, i32 18, i32 24>, <4 x i32>* %21
%22 = getelementptr inbounds i32, i32* %0, i64 40
%23 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> <i32 30, i32 36, i32 42, i32 48>, <4 x i32>* %23
%24 = getelementptr inbounds i32, i32* %0, i64 44
%25 = bitcast i32* %24 to <4 x i32>*
store <4 x i32> <i32 54, i32 7, i32 14, i32 21>, <4 x i32>* %25
%26 = getelementptr inbounds i32, i32* %0, i64 48
%27 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> <i32 28, i32 35, i32 42, i32 49>, <4 x i32>* %27
%28 = getelementptr inbounds i32, i32* %0, i64 52
%29 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> <i32 56, i32 63, i32 8, i32 16>, <4 x i32>* %29
%30 = getelementptr inbounds i32, i32* %0, i64 56
%31 = bitcast i32* %30 to <4 x i32>*
store <4 x i32> <i32 24, i32 32, i32 40, i32 48>, <4 x i32>* %31
%32 = getelementptr inbounds i32, i32* %0, i64 60
%33 = bitcast i32* %32 to <4 x i32>*
store <4 x i32> <i32 56, i32 64, i32 72, i32 9>, <4 x i32>* %33
%34 = getelementptr inbounds i32, i32* %0, i64 64
%35 = bitcast i32* %34 to <4 x i32>*
store <4 x i32> <i32 18, i32 27, i32 36, i32 45>, <4 x i32>* %35
%36 = getelementptr inbounds i32, i32* %0, i64 68
%37 = bitcast i32* %36 to <4 x i32>*
store <4 x i32> <i32 54, i32 63, i32 72, i32 81>, <4 x i32>* %37
ret void
}