#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*/ varreVetor(int *);
void mostrasaida(char recebido) {
  int dadoA[5] = {252, 146, 145, 146, 252};
  int dadoB[5] = {255, 201, 201, 201, 182};
  switch (recebido) {
  case 'A':
    varreVetor(dadoA);
    break;
  case 'B':
    varreVetor(dadoB);
    break;
  }
}


x86 assembly (clang, -O0):
<mostrasaida>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0xeec(%rip),%eax
mov    %eax,-0x10(%rbp)
movaps 0xed2(%rip),%xmm0
movaps %xmm0,-0x20(%rbp)
mov    0xef8(%rip),%eax
mov    %eax,-0x30(%rbp)
movaps 0xede(%rip),%xmm0
movaps %xmm0,-0x40(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x44(%rbp)
sub    $0x41,%eax
je     116c <mostrasaida+0x5c>
jmp    115b <mostrasaida+0x4b>
mov    -0x44(%rbp),%eax
sub    $0x42,%eax
je     117a <mostrasaida+0x6a>
jmp    1183 <mostrasaida+0x73>
lea    -0x20(%rbp),%rdi
call   1030 <varreVetor@plt>
jmp    1183 <mostrasaida+0x73>
lea    -0x40(%rbp),%rdi
call   1030 <varreVetor@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mostrasaida>:
sub    $0x38,%rsp
mov    0xef6(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    0xf00(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
cmp    $0x41,%edi
je     114e <mostrasaida+0x3e>
cmp    $0x42,%edi
jne    1158 <mostrasaida+0x48>
mov    %rsp,%rdi
jmp    1153 <mostrasaida+0x43>
lea    0x20(%rsp),%rdi
call   1030 <varreVetor@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.mostrasaida.dadoA = [5 x i32] [i32 252, i32 146, i32 145, i32 146, i32 252]
@__const.mostrasaida.dadoB = [5 x i32] [i32 255, i32 201, i32 201, i32 201, i32 182]
define void @mostrasaida(i8 signext %0) {
%2 = alloca i8
%3 = alloca [5 x i32]
%4 = alloca [5 x i32]
store i8 %0, i8* %2
%5 = bitcast [5 x i32]* %3 to i8*
%6 = bitcast [5 x i32]* %4 to i8*
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
switch i32 %8, label %15 [
i32 65, label %9
i32 66, label %12
]
9: ; preds = %1
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%11 = call i32 @varreVetor(i32* %10)
br label %15
12: ; preds = %1
%13 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%14 = call i32 @varreVetor(i32* %13)
br label %15
15: ; preds = %1, %12, %9
ret void
}

LLVM IR (-O2):
@__const.mostrasaida.dadoA = [5 x i32] [i32 252, i32 146, i32 145, i32 146, i32 252]
@__const.mostrasaida.dadoB = [5 x i32] [i32 255, i32 201, i32 201, i32 201, i32 182]
define void @mostrasaida(i8 signext %0) {
%2 = alloca [5 x i32]
%3 = alloca [5 x i32]
%4 = bitcast [5 x i32]* %2 to i8*
%5 = bitcast [5 x i32]* %3 to i8*
%6 = sext i8 %0 to i32
switch i32 %6, label %12 [
i32 65, label %8
i32 66, label %7
]
7: ; preds = %1
br label %8
8: ; preds = %1, %7
%9 = phi [5 x i32]* [ %3, %7 ], [ %2, %1 ]
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 0
%11 = call i32 @varreVetor(i32* %10)
br label %12
12: ; preds = %8, %1
ret void
}