#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 mapa[] = {20, 37, 1, 21, 4, 5, 2, 27, 9, 13};
  char anagrama[] = "TRES TIGRES TRISTES FALHARAM NA MISSAO";
  for (int i = 0; i < 10; ++i) {
    printf("%c", anagrama[mapa[i]]);
  }
  printf("\n");
  for (int i = 5; i < 19; ++i) {
    printf("%c", *(anagrama + i));
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x60(%rbp),%rdi
lea    0xee1(%rip),%rsi
mov    $0x27,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    1194 <main+0x74>
movslq -0x64(%rbp),%rax
movslq -0x30(%rbp,%rax,4),%rax
movsbl -0x60(%rbp,%rax,1),%esi
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1160 <main+0x40>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x5,-0x68(%rbp)
cmpl   $0x13,-0x68(%rbp)
jge    11d8 <main+0xb8>
movslq -0x68(%rbp),%rax
movsbl -0x60(%rbp,%rax,1),%esi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    11a9 <main+0x89>
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0x4f,%edi
call   1030 <putchar@plt>
mov    $0x52,%edi
call   1030 <putchar@plt>
mov    $0x41,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x54,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0x4d,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0x52,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x54,%edi
call   1030 <putchar@plt>
mov    $0x49,%edi
call   1030 <putchar@plt>
mov    $0x47,%edi
call   1030 <putchar@plt>
mov    $0x52,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0x53,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x54,%edi
call   1030 <putchar@plt>
mov    $0x52,%edi
call   1030 <putchar@plt>
mov    $0x49,%edi
call   1030 <putchar@plt>
mov    $0x53,%edi
call   1030 <putchar@plt>
mov    $0x54,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0x53,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.mapa = [10 x i32] [i32 20, i32 37, i32 1, i32 21, i32 4, i32 5, i32 2, i32 27, i32 9, i32 13]
@__const.main.anagrama = [39 x i8] c"TRES TIGRES TRISTES FALHARAM NA MISSAO\00"
@.str = [3 x i8] c"%c\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca [39 x i8]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [10 x i32]* %2 to i8*
%7 = bitcast [39 x i8]* %3 to i8*
store i32 0, i32* %4
br label %8
8: ; preds = %21, %0
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 10
br i1 %10, label %11, label %24
11: ; preds = %8
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [39 x i8], [39 x i8]* %3, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %11
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %8
24: ; preds = %8
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 5, i32* %5
br label %26
26: ; preds = %37, %24
%27 = load i32, i32* %5
%28 = icmp slt i32 %27, 19
br i1 %28, label %29, label %40
29: ; preds = %26
%30 = getelementptr inbounds [39 x i8], [39 x i8]* %3, i64 0, i64 0
%31 = load i32, i32* %5
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %30, i64 %32
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %35)
br label %37
37: ; preds = %29
%38 = load i32, i32* %5
%39 = add nsw i32 %38, 1
store i32 %39, i32* %5
br label %26
40: ; preds = %26
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%42 = load i32, i32* %1
ret i32 %42
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 70)
%2 = tail call i32 @putchar(i32 79)
%3 = tail call i32 @putchar(i32 82)
%4 = tail call i32 @putchar(i32 65)
%5 = tail call i32 @putchar(i32 32)
%6 = tail call i32 @putchar(i32 84)
%7 = tail call i32 @putchar(i32 69)
%8 = tail call i32 @putchar(i32 77)
%9 = tail call i32 @putchar(i32 69)
%10 = tail call i32 @putchar(i32 82)
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i32 @putchar(i32 84)
%13 = tail call i32 @putchar(i32 73)
%14 = tail call i32 @putchar(i32 71)
%15 = tail call i32 @putchar(i32 82)
%16 = tail call i32 @putchar(i32 69)
%17 = tail call i32 @putchar(i32 83)
%18 = tail call i32 @putchar(i32 32)
%19 = tail call i32 @putchar(i32 84)
%20 = tail call i32 @putchar(i32 82)
%21 = tail call i32 @putchar(i32 73)
%22 = tail call i32 @putchar(i32 83)
%23 = tail call i32 @putchar(i32 84)
%24 = tail call i32 @putchar(i32 69)
%25 = tail call i32 @putchar(i32 83)
%26 = tail call i32 @putchar(i32 10)
ret i32 0
}