void main() {
  int arr1[10];
  int n = 0;
  int i = 0;
  int *p1;
  int *p2;
  char string1[100] = "test";
  int len = 0;
  for (i = 0; i < 10; i++) {
    arr1[i] = i * 7;
    printf("at step %d arr1 [ %d ] = %2d; & arr1 [ i ] = %p;\n", i, i, arr1[i],
           &arr1[i]);
  }
  p1 = &arr1[0];
  printf("\np1 = %p; and *p1 = %d;\n\n", p1, *p1);
  printf("p1 + 1 = %p; and * ( p1 + 1 ) = %d;\n\n", p1 + 1, *(p1 + 1));
  printf("p1 + 5 = %p; and * ( p1 + 5 ) = %d;\n\n", p1 + 5, *(p1 + 5));
  p1 = arr1;
  printf("p1 = a = %p;\n\n", p1);
  i = 1;
  printf("arr1 [ i = 1 ] = %d; * ( arr1 + i = arr1 + 1 ) = %d;\n\n", arr1[i],
         *(arr1 + i));
  i = 2;
  printf("& arr1 [ i = 2 ] = %p; arr1 + ( i = 2 ) = %p;\n\n", &arr1[i],
         arr1 + i);
  p1 = arr1;
  i = 2;
  printf("p1 [ i = 2 ] = %d; * ( p1 + i ) = %d;\n\n", p1[i], *(p1 + i));
  printf("& p1 [ i = 2 ] = %p; & ( * ( p1 + i ) ) = %p;\n\n", &p1[i],
         &(*(p1 + i)));
  printf("* ( & p1 [ i = 2 ] ) = %d; * ( & ( * ( p1 + i ) ) ) = %d;\n\n",
         *(&p1[i]), *(&(*(p1 + i))));
  p1 = *string1;
  len = strlen_other(&string1);
  printf("lenght of string1 = %d;\n\n", len);
  print_part(&arr1[3]);
  p1 = arr1;
  for (i = 0; i < 10; i++) {
    printf("p1 + i = %2d point at address %p;\n", *(p1 + i), (p1 + i));
  };
  p1 = arr1[0];
  p2 = arr1[1];
  if (p1 > p2) {
    printf("p2 is earlier than p1;\n");
  } else {
    printf("p1 is earlier than p2;\n");
  }
  printf("arr1 [ 2 ] = %d in digital;\n", arr1[2]);
  p1 = &arr1[2];
  printf(" * p1 = arr1 [ 2 ] = %d in digital; and * p1 = %p as pointer;\n", *p1,
         *p1);
  printf("arr1 [ 2 ] = %d; * ( arr1 + 2 ) = %d;\n", arr1[2], *(arr1 + 2));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
lea    -0xb0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
movb   $0x74,-0xb0(%rbp)
movb   $0x65,-0xaf(%rbp)
movb   $0x73,-0xae(%rbp)
movb   $0x74,-0xad(%rbp)
movl   $0x0,-0xb4(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0xa,-0x38(%rbp)
jge    11e8 <main+0xa8>
imul   $0x7,-0x38(%rbp),%ecx
movslq -0x38(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%edx
movslq -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
movslq -0x38(%rbp),%rax
lea    -0x30(%rbp),%r8
shl    $0x2,%rax
add    %rax,%r8
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1199 <main+0x59>
lea    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rsi
mov    -0x40(%rbp),%rax
mov    (%rax),%edx
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%rsi
add    $0x4,%rsi
mov    -0x40(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%rsi
add    $0x14,%rsi
mov    -0x40(%rbp),%rax
mov    0x14(%rax),%edx
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rsi
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x38(%rbp)
movslq -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
movslq -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x2,-0x38(%rbp)
movslq -0x38(%rbp),%rax
lea    -0x30(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    -0x30(%rbp),%rdx
movslq -0x38(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
movl   $0x2,-0x38(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x40(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%rsi
movslq -0x38(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x40(%rbp),%rdx
movslq -0x38(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x40(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbq -0xb0(%rbp),%rax
ff
mov    %rax,-0x40(%rbp)
lea    -0xb0(%rbp),%rdi
mov    $0x0,%al
call   1060 <strlen_other@plt>
mov    %eax,-0xb4(%rbp)
mov    -0xb4(%rbp),%esi
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
add    $0xc,%rdi
mov    $0x0,%al
call   1040 <print_part@plt>
lea    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0xa,-0x38(%rbp)
jge    13c9 <main+0x289>
mov    -0x40(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x40(%rbp),%rdx
movslq -0x38(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1389 <main+0x249>
movslq -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
movslq -0x2c(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x40(%rbp),%rax
cmp    -0x48(%rbp),%rax
jbe    13fa <main+0x2ba>
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1408 <main+0x2c8>
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    (%rax),%esi
mov    -0x40(%rbp),%rax
mov    (%rax),%edx
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xe1f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movl   $0x0,0x90(%rsp)
movl   $0x74736574,0x30(%rsp)
74
movl   $0x0,(%rsp)
lea    0xe6a(%rip),%r13
mov    %rsp,%r15
mov    %r13,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %r15,%r8
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%r8
movl   $0x7,0x4(%rsp)
mov    %r13,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x7,%ecx
mov    %r8,%rbp
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rbx
movl   $0xe,0x8(%rsp)
mov    %r13,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
mov    $0xe,%ecx
mov    %rbx,%r8
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc(%rsp),%r12
movl   $0x15,0xc(%rsp)
mov    %r13,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
mov    $0x15,%ecx
mov    %r12,%r8
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%r8
movl   $0x1c,0x10(%rsp)
mov    %r13,%rdi
mov    $0x4,%esi
mov    $0x4,%edx
mov    $0x1c,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x14(%rsp),%r14
movl   $0x23,0x14(%rsp)
mov    %r13,%rdi
mov    $0x5,%esi
mov    $0x5,%edx
mov    $0x23,%ecx
mov    %r14,%r8
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x18(%rsp),%r8
movl   $0x2a,0x18(%rsp)
mov    %r13,%rdi
mov    $0x6,%esi
mov    $0x6,%edx
mov    $0x2a,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1c(%rsp),%r8
movl   $0x31,0x1c(%rsp)
mov    %r13,%rdi
mov    $0x7,%esi
mov    $0x7,%edx
mov    $0x31,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x20(%rsp),%r8
movl   $0x38,0x20(%rsp)
mov    %r13,%rdi
mov    $0x8,%esi
mov    $0x8,%edx
mov    $0x38,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x24(%rsp),%r8
movl   $0x3f,0x24(%rsp)
mov    %r13,%rdi
mov    $0x9,%esi
mov    $0x9,%edx
mov    $0x3f,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%edx
lea    0xd1a(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%edx
lea    0xd1f(%rip),%rdi
mov    %rbp,%r13
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%edx
lea    0xd2d(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd42(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%edx
lea    0xd3c(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd63(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%edx
lea    0xd7b(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd93(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%edx
lea    0xdab(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x30(%rsp),%rdi
xor    %eax,%eax
call   1060 <strlen_other@plt>
lea    0xdcb(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <print_part@plt>
mov    (%rsp),%esi
lea    0xdc8(%rip),%rbp
mov    %rbp,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbp,%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbp,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbp,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
mov    %rbp,%rdi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbp,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbp,%rdi
lea    0x18(%rsp),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbp,%rdi
lea    0x1c(%rsp),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbp,%rdi
lea    0x20(%rsp),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%rsp),%esi
mov    %rbp,%rdi
lea    0x24(%rsp),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
movslq (%rsp),%rax
movslq 0x4(%rsp),%rcx
cmp    %rcx,%rax
lea    0xdc2(%rip),%rax
lea    0xda4(%rip),%rdi
cmova  %rax,%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%esi
lea    0xd0d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%edx
lea    0xd18(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%edx
lea    0xd43(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [50 x i8] c"at step %d arr1 [ %d ] = %2d; & arr1 [ i ] = %p;\0A\00"
@.str.1 = [26 x i8] c"\0Ap1 = %p; and *p1 = %d;\0A\0A\00"
@.str.2 = [38 x i8] c"p1 + 1 = %p; and * ( p1 + 1 ) = %d;\0A\0A\00"
@.str.3 = [38 x i8] c"p1 + 5 = %p; and * ( p1 + 5 ) = %d;\0A\0A\00"
@.str.4 = [15 x i8] c"p1 = a = %p;\0A\0A\00"
@.str.5 = [55 x i8] c"arr1 [ i = 1 ] = %d; * ( arr1 + i = arr1 + 1 ) = %d;\0A\0A\00"
@.str.6 = [48 x i8] c"& arr1 [ i = 2 ] = %p; arr1 + ( i = 2 ) = %p;\0A\0A\00"
@.str.7 = [40 x i8] c"p1 [ i = 2 ] = %d; * ( p1 + i ) = %d;\0A\0A\00"
@.str.8 = [48 x i8] c"& p1 [ i = 2 ] = %p; & ( * ( p1 + i ) ) = %p;\0A\0A\00"
@.str.9 = [60 x i8] c"* ( & p1 [ i = 2 ] ) = %d; * ( & ( * ( p1 + i ) ) ) = %d;\0A\0A\00"
@.str.10 = [26 x i8] c"lenght of string1 = %d;\0A\0A\00"
@.str.11 = [35 x i8] c"p1 + i = %2d point at address %p;\0A\00"
@.str.12 = [24 x i8] c"p2 is earlier than p1;\0A\00"
@.str.13 = [24 x i8] c"p1 is earlier than p2;\0A\00"
@.str.14 = [29 x i8] c"arr1 [ 2 ] = %d in digital;\0A\00"
@.str.15 = [63 x i8] c" * p1 = arr1 [ 2 ] = %d in digital; and * p1 = %p as pointer;\0A\00"
@.str.16 = [39 x i8] c"arr1 [ 2 ] = %d; * ( arr1 + 2 ) = %d;\0A\00"
define void @main() {
%1 = alloca [10 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca [100 x i8]
%7 = alloca i32
store i32 0, i32* %2
store i32 0, i32* %3
%8 = bitcast [100 x i8]* %6 to i8*
%9 = bitcast i8* %8 to [100 x i8]*
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i32 0, i32 0
store i8 116, i8* %10
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i32 0, i32 1
store i8 101, i8* %11
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i32 0, i32 2
store i8 115, i8* %12
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i32 0, i32 3
store i8 116, i8* %13
store i32 0, i32* %7
store i32 0, i32* %3
br label %14
14: ; preds = %33, %0
%15 = load i32, i32* %3
%16 = icmp slt i32 %15, 10
br i1 %16, label %17, label %36
17: ; preds = %14
%18 = load i32, i32* %3
%19 = mul nsw i32 %18, 7
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %21
store i32 %19, i32* %22
%23 = load i32, i32* %3
%24 = load i32, i32* %3
%25 = load i32, i32* %3
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = load i32, i32* %3
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %23, i32 %24, i32 %28, i32* %31)
br label %33
33: ; preds = %17
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
br label %14
36: ; preds = %14
%37 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32* %37, i32** %4
%38 = load i32*, i32** %4
%39 = load i32*, i32** %4
%40 = load i32, i32* %39
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32* %38, i32 %40)
%42 = load i32*, i32** %4
%43 = getelementptr inbounds i32, i32* %42, i64 1
%44 = load i32*, i32** %4
%45 = getelementptr inbounds i32, i32* %44, i64 1
%46 = load i32, i32* %45
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32* %43, i32 %46)
%48 = load i32*, i32** %4
%49 = getelementptr inbounds i32, i32* %48, i64 5
%50 = load i32*, i32** %4
%51 = getelementptr inbounds i32, i32* %50, i64 5
%52 = load i32, i32* %51
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32* %49, i32 %52)
%54 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32* %54, i32** %4
%55 = load i32*, i32** %4
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32* %55)
store i32 1, i32* %3
%57 = load i32, i32* %3
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %58
%60 = load i32, i32* %59
%61 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%62 = load i32, i32* %3
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i32, i32* %61, i64 %63
%65 = load i32, i32* %64
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.5, i64 0, i64 0), i32 %60, i32 %65)
store i32 2, i32* %3
%67 = load i32, i32* %3
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %68
%70 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%71 = load i32, i32* %3
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i32, i32* %70, i64 %72
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0), i32* %69, i32* %73)
%75 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32* %75, i32** %4
store i32 2, i32* %3
%76 = load i32*, i32** %4
%77 = load i32, i32* %3
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i32, i32* %76, i64 %78
%80 = load i32, i32* %79
%81 = load i32*, i32** %4
%82 = load i32, i32* %3
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i32, i32* %81, i64 %83
%85 = load i32, i32* %84
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0), i32 %80, i32 %85)
%87 = load i32*, i32** %4
%88 = load i32, i32* %3
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i32, i32* %87, i64 %89
%91 = load i32*, i32** %4
%92 = load i32, i32* %3
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i32, i32* %91, i64 %93
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i32* %90, i32* %94)
%96 = load i32*, i32** %4
%97 = load i32, i32* %3
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds i32, i32* %96, i64 %98
%100 = load i32, i32* %99
%101 = load i32*, i32** %4
%102 = load i32, i32* %3
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds i32, i32* %101, i64 %103
%105 = load i32, i32* %104
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0), i32 %100, i32 %105)
%107 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%108 = load i8, i8* %107
%109 = sext i8 %108 to i64
%110 = inttoptr i64 %109 to i32*
store i32* %110, i32** %4
%111 = call i32 ([100 x i8]*, ...) bitcast (i32 (...)* @strlen_other to i32 ([100 x i8]*, ...)*)([100 x i8]* %6)
store i32 %111, i32* %7
%112 = load i32, i32* %7
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0), i32 %112)
%114 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
%115 = call i32 (i32*, ...) bitcast (i32 (...)* @print_part to i32 (i32*, ...)*)(i32* %114)
%116 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32* %116, i32** %4
store i32 0, i32* %3
br label %117
117: ; preds = %131, %36
%118 = load i32, i32* %3
%119 = icmp slt i32 %118, 10
br i1 %119, label %120, label %134
120: ; preds = %117
%121 = load i32*, i32** %4
%122 = load i32, i32* %3
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i32, i32* %121, i64 %123
%125 = load i32, i32* %124
%126 = load i32*, i32** %4
%127 = load i32, i32* %3
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i32, i32* %126, i64 %128
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %125, i32* %129)
br label %131
131: ; preds = %120
%132 = load i32, i32* %3
%133 = add nsw i32 %132, 1
store i32 %133, i32* %3
br label %117
134: ; preds = %117
%135 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%136 = load i32, i32* %135
%137 = sext i32 %136 to i64
%138 = inttoptr i64 %137 to i32*
store i32* %138, i32** %4
%139 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
%140 = load i32, i32* %139
%141 = sext i32 %140 to i64
%142 = inttoptr i64 %141 to i32*
store i32* %142, i32** %5
%143 = load i32*, i32** %4
%144 = load i32*, i32** %5
%145 = icmp ugt i32* %143, %144
br i1 %145, label %146, label %148
146: ; preds = %134
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0))
br label %150
148: ; preds = %134
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
br label %150
150: ; preds = %148, %146
%151 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
%152 = load i32, i32* %151
%153 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0), i32 %152)
%154 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
store i32* %154, i32** %4
%155 = load i32*, i32** %4
%156 = load i32, i32* %155
%157 = load i32*, i32** %4
%158 = load i32, i32* %157
%159 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.15, i64 0, i64 0), i32 %156, i32 %158)
%160 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
%161 = load i32, i32* %160
%162 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%163 = getelementptr inbounds i32, i32* %162, i64 2
%164 = load i32, i32* %163
%165 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.16, i64 0, i64 0), i32 %161, i32 %164)
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"at step %d arr1 [ %d ] = %2d; & arr1 [ i ] = %p;\0A\00"
@.str.1 = [26 x i8] c"\0Ap1 = %p; and *p1 = %d;\0A\0A\00"
@.str.2 = [38 x i8] c"p1 + 1 = %p; and * ( p1 + 1 ) = %d;\0A\0A\00"
@.str.3 = [38 x i8] c"p1 + 5 = %p; and * ( p1 + 5 ) = %d;\0A\0A\00"
@.str.4 = [15 x i8] c"p1 = a = %p;\0A\0A\00"
@.str.5 = [55 x i8] c"arr1 [ i = 1 ] = %d; * ( arr1 + i = arr1 + 1 ) = %d;\0A\0A\00"
@.str.6 = [48 x i8] c"& arr1 [ i = 2 ] = %p; arr1 + ( i = 2 ) = %p;\0A\0A\00"
@.str.7 = [40 x i8] c"p1 [ i = 2 ] = %d; * ( p1 + i ) = %d;\0A\0A\00"
@.str.8 = [48 x i8] c"& p1 [ i = 2 ] = %p; & ( * ( p1 + i ) ) = %p;\0A\0A\00"
@.str.9 = [60 x i8] c"* ( & p1 [ i = 2 ] ) = %d; * ( & ( * ( p1 + i ) ) ) = %d;\0A\0A\00"
@.str.10 = [26 x i8] c"lenght of string1 = %d;\0A\0A\00"
@.str.11 = [35 x i8] c"p1 + i = %2d point at address %p;\0A\00"
@.str.14 = [29 x i8] c"arr1 [ 2 ] = %d in digital;\0A\00"
@.str.15 = [63 x i8] c" * p1 = arr1 [ 2 ] = %d in digital; and * p1 = %p as pointer;\0A\00"
@.str.16 = [39 x i8] c"arr1 [ 2 ] = %d; * ( arr1 + 2 ) = %d;\0A\00"
@str = [23 x i8] c"p1 is earlier than p2;\00"
@str.17 = [23 x i8] c"p2 is earlier than p1;\00"
define void @main() {
%1 = alloca [10 x i32]
%2 = alloca [100 x i8]
%3 = bitcast [10 x i32]* %1 to i8*
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
store i8 116, i8* %4
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 1
store i8 101, i8* %5
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 2
store i8 115, i8* %6
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 3
store i8 116, i8* %7
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32 0, i32* %8
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 0, i32* %8)
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
store i32 7, i32* %10
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 7, i32* %10)
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
store i32 14, i32* %12
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 2, i32 2, i32 14, i32* %12)
%14 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
store i32 21, i32* %14
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 3, i32 3, i32 21, i32* %14)
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
store i32 28, i32* %16
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 4, i32 4, i32 28, i32* %16)
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
store i32 35, i32* %18
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 5, i32 5, i32 35, i32* %18)
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 6
store i32 42, i32* %20
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 6, i32 6, i32 42, i32* %20)
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 7
store i32 49, i32* %22
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 7, i32 7, i32 49, i32* %22)
%24 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
store i32 56, i32* %24
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 8, i32 8, i32 56, i32* %24)
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
store i32 63, i32* %26
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 9, i32 9, i32 63, i32* %26)
%28 = load i32, i32* %8
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32* %8, i32 %28)
%30 = load i32, i32* %10
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32* %10, i32 %30)
%32 = load i32, i32* %18
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32* %18, i32 %32)
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32* %8)
%35 = load i32, i32* %10
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.5, i64 0, i64 0), i32 %35, i32 %35)
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0), i32* %12, i32* %12)
%38 = load i32, i32* %12
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0), i32 %38, i32 %38)
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i32* %12, i32* %12)
%41 = load i32, i32* %12
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0), i32 %41, i32 %41)
%43 = call i32 ([100 x i8]*, ...) bitcast (i32 (...)* @strlen_other to i32 ([100 x i8]*, ...)*)([100 x i8]* %2)
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0), i32 %43)
%45 = call i32 (i32*, ...) bitcast (i32 (...)* @print_part to i32 (i32*, ...)*)(i32* %14)
%46 = load i32, i32* %8
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %46, i32* %8)
%48 = load i32, i32* %10
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %48, i32* %10)
%50 = load i32, i32* %12
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %50, i32* %12)
%52 = load i32, i32* %14
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %52, i32* %14)
%54 = load i32, i32* %16
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %54, i32* %16)
%56 = load i32, i32* %18
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %56, i32* %18)
%58 = load i32, i32* %20
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %58, i32* %20)
%60 = load i32, i32* %22
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %60, i32* %22)
%62 = load i32, i32* %24
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %62, i32* %24)
%64 = load i32, i32* %26
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %64, i32* %26)
%66 = load i32, i32* %8
%67 = sext i32 %66 to i64
%68 = inttoptr i64 %67 to i32*
%69 = load i32, i32* %10
%70 = sext i32 %69 to i64
%71 = inttoptr i64 %70 to i32*
%72 = icmp ugt i32* %68, %71
%73 = select i1 %72, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.17, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0)
%74 = call i32 @puts(i8* dereferenceable(1) %73)
%75 = load i32, i32* %12
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0), i32 %75)
%77 = load i32, i32* %12
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.15, i64 0, i64 0), i32 %77, i32 %77)
%79 = load i32, i32* %12
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.16, i64 0, i64 0), i32 %79, i32 %79)
ret void
}