#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);
void exibe(int *vetp) {
  int i, soma = 0;
  for (i = 0; i < 6; i++)
    soma += *(vetp + i);
  if (soma % 2 == 0)
    for (i = 0; i < 6; i++)
      printf("%d - ", *(vetp + i));
  else
    for (i = 5; i >= 0; i--)
      printf("%d - ", *(vetp + i));
}


x86 assembly (clang, -O0):
<exibe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    1153 <exibe+0x43>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <exibe+0x1a>
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11a2 <exibe+0x92>
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    119d <exibe+0x8d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116e <exibe+0x5e>
jmp    11dd <exibe+0xcd>
movl   $0x5,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     11d8 <exibe+0xc8>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe3b(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    11a9 <exibe+0x99>
jmp    11dd <exibe+0xcd>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exibe>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    (%rdi),%eax
lea    0x4(%rdi),%r12
lea    0x8(%rdi),%r13
lea    0xc(%rdi),%rcx
lea    0x10(%rdi),%r8
movdqu 0x4(%rdi),%xmm0
lea    0x14(%rdi),%r14
mov    0x14(%rdi),%esi
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%edx
add    %esi,%edx
add    %eax,%edx
test   $0x1,%dl
cmove  %eax,%esi
lea    0xea0(%rip),%r15
mov    %r8,%rbx
cmove  %r12,%rbx
mov    %rcx,%rbp
cmove  %r13,%rbp
cmove  %rcx,%r13
cmove  %r8,%r12
cmovne %rdi,%r14
mov    %r15,%rdi
call   1030 <printf@plt>
mov    (%rbx),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
mov    0x0(%rbp),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
mov    0x0(%r13),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
mov    (%r12),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
mov    (%r14),%esi
mov    %r15,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d - \00"
define void @exibe(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = getelementptr inbounds i32, i32* %0, i64 2
%5 = getelementptr inbounds i32, i32* %0, i64 3
%6 = getelementptr inbounds i32, i32* %0, i64 4
%7 = bitcast i32* %3 to <4 x i32>*
%8 = load <4 x i32>, <4 x i32>* %7
%9 = getelementptr inbounds i32, i32* %0, i64 5
%10 = load i32, i32* %9
%11 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %8)
%12 = add nsw i32 %11, %10
%13 = add nsw i32 %12, %2
%14 = and i32 %13, 1
%15 = icmp eq i32 %14, 0
%16 = select i1 %15, i32 %2, i32 %10
%17 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %3
%19 = load i32, i32* %6
%20 = select i1 %15, i32 %18, i32 %19
%21 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %4
%23 = load i32, i32* %5
%24 = select i1 %15, i32 %22, i32 %23
%25 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %24)
%26 = load i32, i32* %5
%27 = load i32, i32* %4
%28 = select i1 %15, i32 %26, i32 %27
%29 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %28)
%30 = load i32, i32* %6
%31 = load i32, i32* %3
%32 = select i1 %15, i32 %30, i32 %31
%33 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %32)
%34 = load i32, i32* %9
%35 = load i32, i32* %0
%36 = select i1 %15, i32 %34, i32 %35
%37 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %36)
ret void
}