int main1() {
  int *arr0 = (int *)0x00000000;
  int *arr1 = (int *)0x02000000;
  *(arr0 + 1) = 0;
  *(arr1 + 1) = 0;
  for (int i = 0; i < 20; i++) {
    *(arr0 + 1) += 1;
    *(arr1 + 1) += 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    $0x2000000,%eax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,0x4(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,0x4(%rax)
movl   $0x0,-0x14(%rbp)
cmpl   $0x14,-0x14(%rbp)
jge    1164 <main1+0x64>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0x4(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0x4(%rax)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1132 <main1+0x32>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
movl   $0x0,0x4
movl   $0x0,0x2000004
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
addl   $0x1,0x4
01
addl   $0x1,0x2000004
01
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main1() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
store i32* null, i32** %1
store i32* inttoptr (i64 33554432 to i32*), i32** %2
%4 = load i32*, i32** %1
%5 = getelementptr inbounds i32, i32* %4, i64 1
store i32 0, i32* %5
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
store i32 0, i32* %7
store i32 0, i32* %3
br label %8
8: ; preds = %20, %0
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 20
br i1 %10, label %11, label %23
11: ; preds = %8
%12 = load i32*, i32** %1
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = add nsw i32 %14, 1
store i32 %15, i32* %13
%16 = load i32*, i32** %2
%17 = getelementptr inbounds i32, i32* %16, i64 1
%18 = load i32, i32* %17
%19 = add nsw i32 %18, 1
store i32 %19, i32* %17
br label %20
20: ; preds = %11
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %8
23: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main1() {
store i32 0, i32* inttoptr (i64 4 to i32*)
store i32 0, i32* inttoptr (i64 33554436 to i32*)
%1 = load i32, i32* inttoptr (i64 4 to i32*)
%2 = add nsw i32 %1, 1
store i32 %2, i32* inttoptr (i64 4 to i32*)
%3 = load i32, i32* inttoptr (i64 33554436 to i32*)
%4 = add nsw i32 %3, 1
store i32 %4, i32* inttoptr (i64 33554436 to i32*)
%5 = load i32, i32* inttoptr (i64 4 to i32*)
%6 = add nsw i32 %5, 1
store i32 %6, i32* inttoptr (i64 4 to i32*)
%7 = load i32, i32* inttoptr (i64 33554436 to i32*)
%8 = add nsw i32 %7, 1
store i32 %8, i32* inttoptr (i64 33554436 to i32*)
%9 = load i32, i32* inttoptr (i64 4 to i32*)
%10 = add nsw i32 %9, 1
store i32 %10, i32* inttoptr (i64 4 to i32*)
%11 = load i32, i32* inttoptr (i64 33554436 to i32*)
%12 = add nsw i32 %11, 1
store i32 %12, i32* inttoptr (i64 33554436 to i32*)
%13 = load i32, i32* inttoptr (i64 4 to i32*)
%14 = add nsw i32 %13, 1
store i32 %14, i32* inttoptr (i64 4 to i32*)
%15 = load i32, i32* inttoptr (i64 33554436 to i32*)
%16 = add nsw i32 %15, 1
store i32 %16, i32* inttoptr (i64 33554436 to i32*)
%17 = load i32, i32* inttoptr (i64 4 to i32*)
%18 = add nsw i32 %17, 1
store i32 %18, i32* inttoptr (i64 4 to i32*)
%19 = load i32, i32* inttoptr (i64 33554436 to i32*)
%20 = add nsw i32 %19, 1
store i32 %20, i32* inttoptr (i64 33554436 to i32*)
%21 = load i32, i32* inttoptr (i64 4 to i32*)
%22 = add nsw i32 %21, 1
store i32 %22, i32* inttoptr (i64 4 to i32*)
%23 = load i32, i32* inttoptr (i64 33554436 to i32*)
%24 = add nsw i32 %23, 1
store i32 %24, i32* inttoptr (i64 33554436 to i32*)
%25 = load i32, i32* inttoptr (i64 4 to i32*)
%26 = add nsw i32 %25, 1
store i32 %26, i32* inttoptr (i64 4 to i32*)
%27 = load i32, i32* inttoptr (i64 33554436 to i32*)
%28 = add nsw i32 %27, 1
store i32 %28, i32* inttoptr (i64 33554436 to i32*)
%29 = load i32, i32* inttoptr (i64 4 to i32*)
%30 = add nsw i32 %29, 1
store i32 %30, i32* inttoptr (i64 4 to i32*)
%31 = load i32, i32* inttoptr (i64 33554436 to i32*)
%32 = add nsw i32 %31, 1
store i32 %32, i32* inttoptr (i64 33554436 to i32*)
%33 = load i32, i32* inttoptr (i64 4 to i32*)
%34 = add nsw i32 %33, 1
store i32 %34, i32* inttoptr (i64 4 to i32*)
%35 = load i32, i32* inttoptr (i64 33554436 to i32*)
%36 = add nsw i32 %35, 1
store i32 %36, i32* inttoptr (i64 33554436 to i32*)
%37 = load i32, i32* inttoptr (i64 4 to i32*)
%38 = add nsw i32 %37, 1
store i32 %38, i32* inttoptr (i64 4 to i32*)
%39 = load i32, i32* inttoptr (i64 33554436 to i32*)
%40 = add nsw i32 %39, 1
store i32 %40, i32* inttoptr (i64 33554436 to i32*)
%41 = load i32, i32* inttoptr (i64 4 to i32*)
%42 = add nsw i32 %41, 1
store i32 %42, i32* inttoptr (i64 4 to i32*)
%43 = load i32, i32* inttoptr (i64 33554436 to i32*)
%44 = add nsw i32 %43, 1
store i32 %44, i32* inttoptr (i64 33554436 to i32*)
%45 = load i32, i32* inttoptr (i64 4 to i32*)
%46 = add nsw i32 %45, 1
store i32 %46, i32* inttoptr (i64 4 to i32*)
%47 = load i32, i32* inttoptr (i64 33554436 to i32*)
%48 = add nsw i32 %47, 1
store i32 %48, i32* inttoptr (i64 33554436 to i32*)
%49 = load i32, i32* inttoptr (i64 4 to i32*)
%50 = add nsw i32 %49, 1
store i32 %50, i32* inttoptr (i64 4 to i32*)
%51 = load i32, i32* inttoptr (i64 33554436 to i32*)
%52 = add nsw i32 %51, 1
store i32 %52, i32* inttoptr (i64 33554436 to i32*)
%53 = load i32, i32* inttoptr (i64 4 to i32*)
%54 = add nsw i32 %53, 1
store i32 %54, i32* inttoptr (i64 4 to i32*)
%55 = load i32, i32* inttoptr (i64 33554436 to i32*)
%56 = add nsw i32 %55, 1
store i32 %56, i32* inttoptr (i64 33554436 to i32*)
%57 = load i32, i32* inttoptr (i64 4 to i32*)
%58 = add nsw i32 %57, 1
store i32 %58, i32* inttoptr (i64 4 to i32*)
%59 = load i32, i32* inttoptr (i64 33554436 to i32*)
%60 = add nsw i32 %59, 1
store i32 %60, i32* inttoptr (i64 33554436 to i32*)
%61 = load i32, i32* inttoptr (i64 4 to i32*)
%62 = add nsw i32 %61, 1
store i32 %62, i32* inttoptr (i64 4 to i32*)
%63 = load i32, i32* inttoptr (i64 33554436 to i32*)
%64 = add nsw i32 %63, 1
store i32 %64, i32* inttoptr (i64 33554436 to i32*)
%65 = load i32, i32* inttoptr (i64 4 to i32*)
%66 = add nsw i32 %65, 1
store i32 %66, i32* inttoptr (i64 4 to i32*)
%67 = load i32, i32* inttoptr (i64 33554436 to i32*)
%68 = add nsw i32 %67, 1
store i32 %68, i32* inttoptr (i64 33554436 to i32*)
%69 = load i32, i32* inttoptr (i64 4 to i32*)
%70 = add nsw i32 %69, 1
store i32 %70, i32* inttoptr (i64 4 to i32*)
%71 = load i32, i32* inttoptr (i64 33554436 to i32*)
%72 = add nsw i32 %71, 1
store i32 %72, i32* inttoptr (i64 33554436 to i32*)
%73 = load i32, i32* inttoptr (i64 4 to i32*)
%74 = add nsw i32 %73, 1
store i32 %74, i32* inttoptr (i64 4 to i32*)
%75 = load i32, i32* inttoptr (i64 33554436 to i32*)
%76 = add nsw i32 %75, 1
store i32 %76, i32* inttoptr (i64 33554436 to i32*)
%77 = load i32, i32* inttoptr (i64 4 to i32*)
%78 = add nsw i32 %77, 1
store i32 %78, i32* inttoptr (i64 4 to i32*)
%79 = load i32, i32* inttoptr (i64 33554436 to i32*)
%80 = add nsw i32 %79, 1
store i32 %80, i32* inttoptr (i64 33554436 to i32*)
ret i32 0
}