#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int nr[10];
  printf("\nValoarea lui nr[1] este %d", nr[1]);
  printf("\nIar adresa lui nr[1] este %p.\n", &nr[1]);
  printf("\nValoarea lui nr[2] este %d", nr[2]);
  printf("\nIar adresa lui nr[2] este %p.\n", &nr[2]);
  printf("\nValoarea lui nr[3] este %d", nr[3]);
  printf("\nIar adresa lui nr[3] este %x.\n", nr[3]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x2c(%rbp),%esi
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
add    $0x4,%rsi
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xeec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
add    $0x8,%rsi
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xf0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0x4(%rsp),%rbx
lea    0xedf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rbx
mov    0x8(%rsp),%esi
lea    0xef3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xf0c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xf16(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"\0AValoarea lui nr[1] este %d\00"
@.str.1 = [32 x i8] c"\0AIar adresa lui nr[1] este %p.\0A\00"
@.str.2 = [28 x i8] c"\0AValoarea lui nr[2] este %d\00"
@.str.3 = [32 x i8] c"\0AIar adresa lui nr[2] este %p.\0A\00"
@.str.4 = [28 x i8] c"\0AValoarea lui nr[3] este %d\00"
@.str.5 = [32 x i8] c"\0AIar adresa lui nr[3] este %x.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 1
%4 = load i32, i32* %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 2
%9 = load i32, i32* %8
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32* %11)
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 3
%14 = load i32, i32* %13
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 3
%17 = load i32, i32* %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0AValoarea lui nr[1] este %d\00"
@.str.1 = [32 x i8] c"\0AIar adresa lui nr[1] este %p.\0A\00"
@.str.2 = [28 x i8] c"\0AValoarea lui nr[2] este %d\00"
@.str.3 = [32 x i8] c"\0AIar adresa lui nr[2] este %p.\0A\00"
@.str.4 = [28 x i8] c"\0AValoarea lui nr[3] este %d\00"
@.str.5 = [32 x i8] c"\0AIar adresa lui nr[3] este %x.\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 undef)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
%7 = load i32, i32* %6
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32* %6)
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
%11 = load i32, i32* %10
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %10
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i32 %13)
ret i32 0
}