#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 imprimir_dados(int *dados) {
  char opciones[6] = {'9', '1', 'J', 'Q', 'K', 'A'};
  char d1, d2, d3, d4, d5;
  d1 = opciones[dados[0]];
  d2 = opciones[dados[1]];
  d3 = opciones[dados[2]];
  d4 = opciones[dados[3]];
  d5 = opciones[dados[4]];
  printf("----- ----- ----- ----- -----\n");
  printf("| %c | | %c | | %c | | %c | | %c |\n", d1, d2, d3, d4, d5);
  printf("----- ----- ----- ----- -----\n");
  printf("  0     1     2     3     4\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<imprimir_dados>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xede(%rip),%eax
mov    %eax,-0xe(%rbp)
mov    0xed8(%rip),%ax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movslq (%rax),%rax
mov    -0xe(%rbp,%rax,1),%al
mov    %al,-0xf(%rbp)
mov    -0x8(%rbp),%rax
movslq 0x4(%rax),%rax
mov    -0xe(%rbp,%rax,1),%al
mov    %al,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq 0x8(%rax),%rax
mov    -0xe(%rbp,%rax,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq 0xc(%rax),%rax
mov    -0xe(%rbp,%rax,1),%al
mov    %al,-0x12(%rbp)
mov    -0x8(%rbp),%rax
movslq 0x10(%rax),%rax
mov    -0xe(%rbp,%rax,1),%al
mov    %al,-0x13(%rbp)
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0xf(%rbp),%esi
movsbl -0x10(%rbp),%edx
movsbl -0x11(%rbp),%ecx
movsbl -0x12(%rbp),%r8d
movsbl -0x13(%rbp),%r9d
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimir_dados>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movslq (%rdi),%rax
lea    0xebb(%rip),%rcx
movsbl (%rax,%rcx,1),%r14d
movslq 0x4(%rdi),%rax
movsbl (%rax,%rcx,1),%r15d
movslq 0x8(%rdi),%rax
movsbl (%rax,%rcx,1),%r12d
movslq 0xc(%rdi),%rax
movsbl (%rax,%rcx,1),%ebp
movslq 0x10(%rdi),%rax
movsbl (%rax,%rcx,1),%ebx
lea    0xeb7(%rip),%r13
mov    %r13,%rdi
call   1040 <puts@plt>
lea    0xe84(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    %ebx,%r9d
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
call   1040 <puts@plt>
lea    0xea1(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@__const.imprimir_dados.opciones = [6 x i8] c"91JQKA"
@.str = [31 x i8] c"----- ----- ----- ----- -----\0A\00"
@.str.1 = [36 x i8] c"| %c | | %c | | %c | | %c | | %c |\0A\00"
@.str.2 = [29 x i8] c" 0 1 2 3 4\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @imprimir_dados(i32* %0) {
%2 = alloca i32*
%3 = alloca [6 x i8]
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i32* %0, i32** %2
%9 = bitcast [6 x i8]* %3 to i8*
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = load i32, i32* %11
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 %13
%15 = load i8, i8* %14
store i8 %15, i8* %4
%16 = load i32*, i32** %2
%17 = getelementptr inbounds i32, i32* %16, i64 1
%18 = load i32, i32* %17
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 %19
%21 = load i8, i8* %20
store i8 %21, i8* %5
%22 = load i32*, i32** %2
%23 = getelementptr inbounds i32, i32* %22, i64 2
%24 = load i32, i32* %23
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 %25
%27 = load i8, i8* %26
store i8 %27, i8* %6
%28 = load i32*, i32** %2
%29 = getelementptr inbounds i32, i32* %28, i64 3
%30 = load i32, i32* %29
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 %31
%33 = load i8, i8* %32
store i8 %33, i8* %7
%34 = load i32*, i32** %2
%35 = getelementptr inbounds i32, i32* %34, i64 4
%36 = load i32, i32* %35
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 %37
%39 = load i8, i8* %38
store i8 %39, i8* %8
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%41 = load i8, i8* %4
%42 = sext i8 %41 to i32
%43 = load i8, i8* %5
%44 = sext i8 %43 to i32
%45 = load i8, i8* %6
%46 = sext i8 %45 to i32
%47 = load i8, i8* %7
%48 = sext i8 %47 to i32
%49 = load i8, i8* %8
%50 = sext i8 %49 to i32
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %42, i32 %44, i32 %46, i32 %48, i32 %50)
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.imprimir_dados.opciones = [6 x i8] c"91JQKA"
@.str.1 = [36 x i8] c"| %c | | %c | | %c | | %c | | %c |\0A\00"
@str.4 = [30 x i8] c"----- ----- ----- ----- -----\00"
@str.5 = [28 x i8] c" 0 1 2 3 4\00"
define void @imprimir_dados(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds [6 x i8], [6 x i8]* @__const.imprimir_dados.opciones, i64 0, i64 %3
%5 = load i8, i8* %4
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [6 x i8], [6 x i8]* @__const.imprimir_dados.opciones, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = getelementptr inbounds i32, i32* %0, i64 2
%12 = load i32, i32* %11
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [6 x i8], [6 x i8]* @__const.imprimir_dados.opciones, i64 0, i64 %13
%15 = load i8, i8* %14
%16 = getelementptr inbounds i32, i32* %0, i64 3
%17 = load i32, i32* %16
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [6 x i8], [6 x i8]* @__const.imprimir_dados.opciones, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = getelementptr inbounds i32, i32* %0, i64 4
%22 = load i32, i32* %21
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [6 x i8], [6 x i8]* @__const.imprimir_dados.opciones, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.4, i64 0, i64 0))
%27 = sext i8 %5 to i32
%28 = sext i8 %10 to i32
%29 = sext i8 %15 to i32
%30 = sext i8 %20 to i32
%31 = sext i8 %25 to i32
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %27, i32 %28, i32 %29, i32 %30, i32 %31)
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.4, i64 0, i64 0))
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.5, i64 0, i64 0))
%35 = tail call i32 @putchar(i32 10)
ret void
}