#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 */
#define EBUSY 129
#define EINVAL 128
int /*<<< orphan*/ printf(char *, ...);
void validaCondDestroy(int e) {
  char *mensaje = "\n\t-Se produjo el error";
  switch (e) {
  case 0:
    printf("Variable condicion destruida satisfactoriamente.\n\n");
    break;
  case EBUSY:
    printf("%s EBUSY (The variable cond is locked by another thread.) \n\n",
           mensaje);
    break;
  case EINVAL:
    printf("%s EINVAL (The value specified by cond is invalid.)\n\n", mensaje);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<validaCondDestroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
test   %eax,%eax
je     115f <validaCondDestroy+0x4f>
jmp    1139 <validaCondDestroy+0x29>
mov    -0x14(%rbp),%eax
sub    $0x80,%eax
je     1189 <validaCondDestroy+0x79>
jmp    114c <validaCondDestroy+0x3c>
mov    -0x14(%rbp),%eax
sub    $0x81,%eax
je     1172 <validaCondDestroy+0x62>
jmp    11a0 <validaCondDestroy+0x90>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a5 <validaCondDestroy+0x95>
mov    -0x10(%rbp),%rsi
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a5 <validaCondDestroy+0x95>
mov    -0x10(%rbp),%rsi
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a5 <validaCondDestroy+0x95>
jmp    11a5 <validaCondDestroy+0x95>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validaCondDestroy>:
cmp    $0x81,%edi
je     1140 <validaCondDestroy+0x20>
cmp    $0x80,%edi
je     1149 <validaCondDestroy+0x29>
test   %edi,%edi
jne    115e <validaCondDestroy+0x3e>
lea    0xf4f(%rip),%rdi
jmp    1030 <puts@plt>
lea    0xed0(%rip),%rdi
jmp    1150 <validaCondDestroy+0x30>
lea    0xf04(%rip),%rdi
lea    0xea9(%rip),%rsi
xor    %eax,%eax
jmp    1040 <printf@plt>
ret

LLVM IR (-O0):
@.str = [23 x i8] c"\0A\09-Se produjo el error\00"
@.str.1 = [51 x i8] c"Variable condicion destruida satisfactoriamente.\0A\0A\00"
@.str.2 = [61 x i8] c"%s EBUSY (The variable cond is locked by another thread.) \0A\0A\00"
@.str.3 = [54 x i8] c"%s EINVAL (The value specified by cond is invalid.)\0A\0A\00"
define void @validaCondDestroy(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i32, i32* %2
switch i32 %4, label %13 [
i32 0, label %5
i32 129, label %7
i32 128, label %10
]
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
br label %14
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0), i8* %8)
br label %14
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0), i8* %11)
br label %14
13: ; preds = %1
br label %14
14: ; preds = %13, %10, %7, %5
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"\0A\09-Se produjo el error\00"
@.str.2 = [61 x i8] c"%s EBUSY (The variable cond is locked by another thread.) \0A\0A\00"
@.str.3 = [54 x i8] c"%s EINVAL (The value specified by cond is invalid.)\0A\0A\00"
@str = [50 x i8] c"Variable condicion destruida satisfactoriamente.\0A\00"
define void @validaCondDestroy(i32 %0) {
switch i32 %0, label %8 [
i32 0, label %2
i32 129, label %4
i32 128, label %6
]
2: ; preds = %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
br label %8
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %1, %6, %4, %2
ret void
}