#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 *, void *);
char *local(void) {
  static char nomex[12] = "aaaaaaaaaa";
  char nome[12] = "programador";
  char *ponteiro = nome;
  printf("%s\n", nome);
  printf("%s\n", ponteiro);
  printf("%p\n", (void *)ponteiro);
  printf("%p\n", (void *)nome);
  printf("%p\n", (void *)nomex);
  printf("%p\n", (void *)&ponteiro);
  return ponteiro;
}


x86 assembly (clang, -O0):
<local>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
lea    -0xc(%rbp),%rsi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
lea    0xe95(%rip),%rdi
lea    0x2ea6(%rip),%rsi
call   1030 <printf@plt>
lea    -0x18(%rbp),%rsi
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<local>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movabs $0x616d6172676f7270,%rax
61 6d 61
mov    %rax,0x8(%rsp)
movl   $0x726f64,0x10(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,(%rsp)
lea    0xece(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xeb5(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0x2eb0(%rip),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %rsp,%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rsp),%rax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@local.nomex = internal global [12 x i8] c"aaaaaaaaaa\00\00"
@__const.local.nome = [12 x i8] c"programador\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"%p\0A\00"
define i8* @local() {
%1 = alloca [12 x i8]
%2 = alloca i8*
%3 = bitcast [12 x i8]* %1 to i8*
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
store i8* %4, i8** %2
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %2
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @local.nomex, i64 0, i64 0))
%14 = bitcast i8** %2 to i8*
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
@local.nomex = internal global [12 x i8] c"aaaaaaaaaa\00\00"
@__const.local.nome = [12 x i8] c"programador\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"%p\0A\00"
define i8* @local() {
%1 = alloca [12 x i8]
%2 = alloca i8*
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%4 = bitcast i8** %2 to i8*
store i8* %3, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @local.nomex, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%11 = load i8*, i8** %2
ret i8* %11
}