#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);
int resultado_impacto(int sprite) {
  int resultado = 0;
  if (sprite == 4 || sprite == 5 || sprite == 7 || sprite == 8 ||
      sprite == 11 || sprite == 13) {
    resultado = 1;
  }
  printf("%i\n", resultado);
  return resultado;
}


x86 assembly (clang, -O0):
<resultado_impacto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x4(%rbp)
je     115e <resultado_impacto+0x4e>
cmpl   $0x5,-0x4(%rbp)
je     115e <resultado_impacto+0x4e>
cmpl   $0x7,-0x4(%rbp)
je     115e <resultado_impacto+0x4e>
cmpl   $0x8,-0x4(%rbp)
je     115e <resultado_impacto+0x4e>
cmpl   $0xb,-0x4(%rbp)
je     115e <resultado_impacto+0x4e>
cmpl   $0xd,-0x4(%rbp)
jne    1165 <resultado_impacto+0x55>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resultado_impacto>:
push   %rbx
add    $0xfffffffc,%edi
xor    %ebx,%ebx
cmp    $0x9,%edi
ja     1128 <resultado_impacto+0x18>
movslq %edi,%rax
lea    0xedf(%rip),%rcx
mov    (%rcx,%rax,4),%ebx
lea    0xed1(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
define i32 @resultado_impacto(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 4
br i1 %5, label %21, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 5
br i1 %8, label %21, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 7
br i1 %11, label %21, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 8
br i1 %14, label %21, label %15
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 11
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 13
br i1 %20, label %21, label %22
21: ; preds = %18, %15, %12, %9, %6, %1
store i32 1, i32* %3
br label %22
22: ; preds = %21, %18
%23 = load i32, i32* %3
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
@switch.table.resultado_impacto = [10 x i32] [i32 1, i32 1, i32 0, i32 1, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1]
define i32 @resultado_impacto(i32 %0) {
%2 = add i32 %0, -4
%3 = icmp ult i32 %2, 10
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [10 x i32], [10 x i32]* @switch.table.resultado_impacto, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 %9
}