int main() {
  int A[6] = {3, 5, 2, 7, 1};
  int s;
  printf("%d %d %d %d %d %d\n", A[0], A[1], A[2], A[3], A[4], A[5]);
  for (int i = 5; i > 0; i--) {
    for (int j = 0; j < i; j++) {
      s = A[i];
      A[i] = A[i + 1];
      A[i + 1] = s;
    }
  }
  printf("%d %d %d %d %d %d\n", A[0], A[1], A[2], A[3], A[4], A[5]);
  char S[] = "Hola clase";
  printf("%d %d %d %d\n", &A[2], &A[3], *(A + 3), *A);
  printf("%d %d %d\n", &S[2], &S[3], &S[3] - S);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xebd(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x5,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jle    11d8 <main+0xc8>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    11c5 <main+0xb5>
movslq -0x28(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x20(%rbp,%rax,4),%ecx
movslq -0x28(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0x20(%rbp,%rax,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    117d <main+0x6d>
jmp    11ca <main+0xba>
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    116c <main+0x5c>
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xe25(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
mov    0xe27(%rip),%rax
mov    %rax,-0x37(%rbp)
mov    0xe24(%rip),%ax
mov    %ax,-0x2f(%rbp)
mov    0xe1c(%rip),%al
mov    %al,-0x2d(%rbp)
lea    -0x20(%rbp),%rsi
add    $0x8,%rsi
lea    -0x20(%rbp),%rdx
add    $0xc,%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8d
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x37(%rbp),%rsi
add    $0x2,%rsi
lea    -0x37(%rbp),%rdx
add    $0x3,%rdx
lea    -0x37(%rbp),%rcx
add    $0x3,%rcx
lea    -0x37(%rbp),%rax
sub    %rax,%rcx
lea    0xdba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
movaps 0xef0(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0x28(%rsp),%r15
lea    0x2c(%rsp),%r14
movl   $0x0,(%rsp)
lea    0xeeb(%rip),%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x5,%edx
mov    $0x2,%ecx
mov    $0x7,%r8d
mov    $0x1,%r9d
xor    %eax,%eax
call   1030 <printf@plt>
movq   $0x0,0x34(%rsp)
movaps 0xe8e(%rip),%xmm0
movups %xmm0,0x24(%rsp)
movl   $0x0,(%rsp)
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x5,%ecx
mov    $0x1,%r8d
mov    $0x7,%r9d
xor    %eax,%eax
call   1030 <printf@plt>
movabs $0x616c6320616c6f48,%rax
63 6c 61
mov    %rax,0x10(%rsp)
movl   $0x657361,0x17(%rsp)
lea    0xe6d(%rip),%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    $0x1,%ecx
mov    $0x3,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x12(%rsp),%rsi
lea    0x13(%rsp),%rdx
lea    0xe47(%rip),%rdi
mov    $0x3,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.A = [6 x i32] [i32 3, i32 5, i32 2, i32 7, i32 1, i32 0]
@.str = [19 x i8] c"%d %d %d %d %d %d\0A\00"
@__const.main.S = [11 x i8] c"Hola clase\00"
@.str.1 = [13 x i8] c"%d %d %d %d\0A\00"
@.str.2 = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [11 x i8]
store i32 0, i32* %1
%7 = bitcast [6 x i32]* %2 to i8*
%8 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%9 = load i32, i32* %8
%10 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 1
%11 = load i32, i32* %10
%12 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 2
%13 = load i32, i32* %12
%14 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 3
%15 = load i32, i32* %14
%16 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 4
%17 = load i32, i32* %16
%18 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 5
%19 = load i32, i32* %18
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %11, i32 %13, i32 %15, i32 %17, i32 %19)
store i32 5, i32* %4
br label %21
21: ; preds = %51, %0
%22 = load i32, i32* %4
%23 = icmp sgt i32 %22, 0
br i1 %23, label %24, label %54
24: ; preds = %21
store i32 0, i32* %5
br label %25
25: ; preds = %47, %24
%26 = load i32, i32* %5
%27 = load i32, i32* %4
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %50
29: ; preds = %25
%30 = load i32, i32* %4
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 %31
%33 = load i32, i32* %32
store i32 %33, i32* %3
%34 = load i32, i32* %4
%35 = add nsw i32 %34, 1
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 %36
%38 = load i32, i32* %37
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 %40
store i32 %38, i32* %41
%42 = load i32, i32* %3
%43 = load i32, i32* %4
%44 = add nsw i32 %43, 1
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 %45
store i32 %42, i32* %46
br label %47
47: ; preds = %29
%48 = load i32, i32* %5
%49 = add nsw i32 %48, 1
store i32 %49, i32* %5
br label %25
50: ; preds = %25
br label %51
51: ; preds = %50
%52 = load i32, i32* %4
%53 = add nsw i32 %52, -1
store i32 %53, i32* %4
br label %21
54: ; preds = %21
%55 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%56 = load i32, i32* %55
%57 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 1
%58 = load i32, i32* %57
%59 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 2
%60 = load i32, i32* %59
%61 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 3
%62 = load i32, i32* %61
%63 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 4
%64 = load i32, i32* %63
%65 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 5
%66 = load i32, i32* %65
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %56, i32 %58, i32 %60, i32 %62, i32 %64, i32 %66)
%68 = bitcast [11 x i8]* %6 to i8*
%69 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 2
%70 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 3
%71 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%72 = getelementptr inbounds i32, i32* %71, i64 3
%73 = load i32, i32* %72
%74 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%75 = load i32, i32* %74
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32* %69, i32* %70, i32 %73, i32 %75)
%77 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 2
%78 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 3
%79 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 3
%80 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%81 = ptrtoint i8* %79 to i64
%82 = ptrtoint i8* %80 to i64
%83 = sub i64 %81, %82
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %77, i8* %78, i64 %83)
ret i32 0
}

LLVM IR (-O2):
@__const.main.A = [6 x i32] [i32 3, i32 5, i32 2, i32 7, i32 1, i32 0]
@.str = [19 x i8] c"%d %d %d %d %d %d\0A\00"
@__const.main.S = [11 x i8] c"Hola clase\00"
@.str.1 = [13 x i8] c"%d %d %d %d\0A\00"
@.str.2 = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = alloca [11 x i8]
%3 = bitcast [6 x i32]* %1 to i8*
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 1
%5 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 2
%6 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 3
%7 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 5
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 3, i32 5, i32 2, i32 7, i32 1, i32 0)
%9 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 6
store i32 0, i32* %9
store i32 0, i32* %7
%10 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> <i32 2, i32 5, i32 1, i32 7>, <4 x i32>* %10
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 3, i32 2, i32 5, i32 1, i32 7, i32 0)
%12 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32* %5, i32* %6, i32 1, i32 3)
%14 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 2
%15 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 3
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %14, i8* %15, i64 3)
ret i32 0
}