#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() {
  int i;
  char *dias[7];
  dias[0] = "Domingo";
  dias[1] = "Segunda";
  dias[2] = "Terca";
  dias[3] = "Quarta";
  dias[4] = "Quinta";
  dias[5] = "Sexta";
  dias[6] = "Sabado";
  for (i = 0; i < 7; i++) {
    printf("%s\n", dias[i]);
  }
  int *p = &i;
  printf("%d\n", *p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xed7(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xed4(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xecf(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xecb(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xec2(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x7,-0x8(%rbp)
jge    11a2 <main+0x92>
movslq -0x8(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rsi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1173 <main+0x63>
lea    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    (%rax),%esi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Domingo\00"
@.str.1 = [8 x i8] c"Segunda\00"
@.str.2 = [6 x i8] c"Terca\00"
@.str.3 = [7 x i8] c"Quarta\00"
@.str.4 = [7 x i8] c"Quinta\00"
@.str.5 = [6 x i8] c"Sexta\00"
@.str.6 = [7 x i8] c"Sabado\00"
@.str.7 = [4 x i8] c"%s\0A\00"
@.str.8 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [7 x i8*]
%4 = alloca i32*
store i32 0, i32* %1
%5 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 3
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8** %8
%9 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 4
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8** %9
%10 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 5
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %10
%11 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 6
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8** %11
store i32 0, i32* %2
br label %12
12: ; preds = %21, %0
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 7
br i1 %14, label %15, label %24
15: ; preds = %12
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %15
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %12
24: ; preds = %12
store i32* %2, i32** %4
%25 = load i32*, i32** %4
%26 = load i32, i32* %25
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %26)
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@.str = [8 x i8] c"Domingo\00"
@.str.1 = [8 x i8] c"Segunda\00"
@.str.2 = [6 x i8] c"Terca\00"
@.str.3 = [7 x i8] c"Quarta\00"
@.str.4 = [7 x i8] c"Quinta\00"
@.str.5 = [6 x i8] c"Sexta\00"
@.str.6 = [7 x i8] c"Sabado\00"
@.str.8 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 7)
ret i32 0
}