#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*/ free(char *);
scalar_t__ isalnum(char);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, size_t const);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
size_t strlen(char *);
char *strndup(char *, size_t const);
char *moral_regla12(char *palabra, const int verbose) {
  const size_t len = strlen(palabra);
  if (len == 1) {
    if (isalnum(*palabra) || strcmp(palabra, "&") == 0) {
      return palabra;
    } else {
      char *nombre = NULL;
      if (verbose)
        printf("moral_regla12: Aplicando regla 12. Interpretando caracteres "
               "individuales...");
      if (*palabra == '@')
        nombre = "ARROBA";
      else if (*palabra == '\'')
        nombre = "APOSTROFE";
      else if (*palabra == '%')
        nombre = "PORCIENTO";
      else if (*palabra == '#')
        nombre = "NUMERO";
      else if (*palabra == '!')
        nombre = "ADMIRACION";
      else if (*palabra == '.')
        nombre = "PUNTO";
      else if (*palabra == '$')
        nombre = "PESOS";
      else if (*palabra == '"')
        nombre = "COMILLAS";
      else if (*palabra == '-')
        nombre = "GUION";
      else if (*palabra == '/')
        nombre = "DIAGONAL";
      else if (*palabra == '+')
        nombre = "SUMA";
      else if (*palabra == '(')
        nombre = "ABRE PARENTESIS";
      else if (*palabra == ')')
        nombre = "CIERRA PARENTESIS";
      if (nombre) {
        if (verbose)
          printf(" caracter %c interpretado como: %s\n", *palabra, nombre);
        palabra = nombre;
      }
    }
  } else {
    int i = 0;
    char *copy = strndup(palabra, len);
    memset(palabra, 0, len + 1);
    while (*copy) {
      if (!isalnum(*copy)) {
        if (verbose)
          printf("moral_regla12: Eliminando de la palabra el caracter '%c'.\n",
                 *copy);
        copy++;
        continue;
      }
      *palabra++ = *copy++;
      i++;
    }
    *palabra = 0;
    palabra -= i;
    copy -= len;
    free(copy);
  }
  return palabra;
}


x86 assembly (clang, -O0):
<moral_regla12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x1,-0x20(%rbp)
jne    140b <moral_regla12+0x29b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1060 <isalnum@plt>
cmp    $0x0,%rax
jne    11c7 <moral_regla12+0x57>
mov    -0x10(%rbp),%rdi
lea    0xe48(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    11d4 <moral_regla12+0x64>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    14fb <moral_regla12+0x38b>
movq   $0x0,-0x28(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     11f4 <moral_regla12+0x84>
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
jne    1214 <moral_regla12+0xa4>
lea    0xe43(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    13cb <moral_regla12+0x25b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
jne    1234 <moral_regla12+0xc4>
lea    0xe2a(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    13c6 <moral_regla12+0x256>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    1254 <moral_regla12+0xe4>
lea    0xe14(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    13c1 <moral_regla12+0x251>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1274 <moral_regla12+0x104>
lea    0xdfe(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    13bc <moral_regla12+0x24c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x21,%eax
jne    1294 <moral_regla12+0x124>
lea    0xde5(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    13b7 <moral_regla12+0x247>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    12b4 <moral_regla12+0x144>
lea    0xdd0(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    13b2 <moral_regla12+0x242>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x24,%eax
jne    12d4 <moral_regla12+0x164>
lea    0xdb6(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    13ad <moral_regla12+0x23d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    12f4 <moral_regla12+0x184>
lea    0xd9c(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    13a8 <moral_regla12+0x238>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1314 <moral_regla12+0x1a4>
lea    0xd85(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    13a3 <moral_regla12+0x233>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1334 <moral_regla12+0x1c4>
lea    0xd6b(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    139e <moral_regla12+0x22e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    1354 <moral_regla12+0x1e4>
lea    0xd54(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    1399 <moral_regla12+0x229>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
jne    1374 <moral_regla12+0x204>
lea    0xd39(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    1394 <moral_regla12+0x224>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
jne    138f <moral_regla12+0x21f>
lea    0xd29(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    1394 <moral_regla12+0x224>
jmp    1399 <moral_regla12+0x229>
jmp    139e <moral_regla12+0x22e>
jmp    13a3 <moral_regla12+0x233>
jmp    13a8 <moral_regla12+0x238>
jmp    13ad <moral_regla12+0x23d>
jmp    13b2 <moral_regla12+0x242>
jmp    13b7 <moral_regla12+0x247>
jmp    13bc <moral_regla12+0x24c>
jmp    13c1 <moral_regla12+0x251>
jmp    13c6 <moral_regla12+0x256>
jmp    13cb <moral_regla12+0x25b>
cmpq   $0x0,-0x28(%rbp)
je     1401 <moral_regla12+0x291>
cmpl   $0x0,-0x14(%rbp)
je     13f9 <moral_regla12+0x289>
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
mov    -0x28(%rbp),%rdx
lea    0xcd4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1406 <moral_regla12+0x296>
jmp    14f3 <moral_regla12+0x383>
movl   $0x0,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1080 <strndup@plt>
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rdx
add    $0x1,%rdx
xor    %esi,%esi
call   1070 <memset@plt>
mov    -0x38(%rbp),%rax
cmpb   $0x0,(%rax)
je     14b9 <moral_regla12+0x349>
mov    -0x38(%rbp),%rax
movsbl (%rax),%edi
call   1060 <isalnum@plt>
cmp    $0x0,%rax
jne    1489 <moral_regla12+0x319>
cmpl   $0x0,-0x14(%rbp)
je     1478 <moral_regla12+0x308>
mov    -0x38(%rbp),%rax
movsbl (%rax),%esi
lea    0xc79(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1436 <moral_regla12+0x2c6>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x38(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1436 <moral_regla12+0x2c6>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x2c(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rdx
mov    -0x38(%rbp),%rax
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<moral_regla12>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%r15
call   1040 <strlen@plt>
cmp    $0x1,%rax
jne    1218 <moral_regla12+0xa8>
movsbl (%r15),%edi
call   1060 <isalnum@plt>
test   %rax,%rax
jne    12af <moral_regla12+0x13f>
lea    0xe58(%rip),%rsi
mov    %r15,%rdi
call   1090 <strcmp@plt>
test   %rax,%rax
je     12af <moral_regla12+0x13f>
test   %ebp,%ebp
je     11cb <moral_regla12+0x5b>
lea    0xe3e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl (%r15),%esi
lea    -0x21(%rsi),%eax
cmp    $0x1f,%al
ja     12af <moral_regla12+0x13f>
movzbl %al,%ecx
mov    $0x800075df,%edx
bt     %ecx,%edx
jae    12af <moral_regla12+0x13f>
movsbq %al,%rax
lea    0x2b2a(%rip),%rcx
mov    (%rcx,%rax,8),%r15
test   %ebp,%ebp
je     12af <moral_regla12+0x13f>
lea    0xebd(%rip),%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12af <moral_regla12+0x13f>
mov    %rax,%r14
mov    %r15,%rdi
mov    %rax,%rsi
call   1080 <strndup@plt>
mov    %rax,%rbx
lea    0x1(%r14),%rdx
xor    %r13d,%r13d
mov    %r15,%rdi
xor    %esi,%esi
call   1070 <memset@plt>
mov    (%rbx),%al
test   %al,%al
je     129a <moral_regla12+0x12a>
lea    0xea3(%rip),%r12
xor    %r13d,%r13d
add    $0x1,%rbx
jmp    125b <moral_regla12+0xeb>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1296 <moral_regla12+0x126>
movsbl %al,%edi
call   1060 <isalnum@plt>
test   %rax,%rax
jne    1280 <moral_regla12+0x110>
test   %ebp,%ebp
je     1250 <moral_regla12+0xe0>
movsbl -0x1(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1250 <moral_regla12+0xe0>
nopl   0x0(%rax)
mov    -0x1(%rbx),%al
mov    %al,(%r15)
add    $0x1,%r15
add    $0x1,%r13d
mov    (%rbx),%al
test   %al,%al
jne    124a <moral_regla12+0xda>
jmp    129a <moral_regla12+0x12a>
add    $0xffffffffffffffff,%rbx
movb   $0x0,(%r15)
movslq %r13d,%rax
sub    %rax,%r15
sub    %r14,%rbx
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"&\00"
@.str.1 = [76 x i8] c"moral_regla12: Aplicando regla 12. Interpretando caracteres individuales...\00"
@.str.2 = [7 x i8] c"ARROBA\00"
@.str.3 = [10 x i8] c"APOSTROFE\00"
@.str.4 = [10 x i8] c"PORCIENTO\00"
@.str.5 = [7 x i8] c"NUMERO\00"
@.str.6 = [11 x i8] c"ADMIRACION\00"
@.str.7 = [6 x i8] c"PUNTO\00"
@.str.8 = [6 x i8] c"PESOS\00"
@.str.9 = [9 x i8] c"COMILLAS\00"
@.str.10 = [6 x i8] c"GUION\00"
@.str.11 = [9 x i8] c"DIAGONAL\00"
@.str.12 = [5 x i8] c"SUMA\00"
@.str.13 = [16 x i8] c"ABRE PARENTESIS\00"
@.str.14 = [18 x i8] c"CIERRA PARENTESIS\00"
@.str.15 = [36 x i8] c" caracter %c interpretado como: %s\0A\00"
@.str.16 = [59 x i8] c"moral_regla12: Eliminando de la palabra el caracter '%c'.\0A\00"
define i8* @moral_regla12(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
%10 = load i8*, i8** %4
%11 = call i64 @strlen(i8* %10)
store i64 %11, i64* %6
%12 = load i64, i64* %6
%13 = icmp eq i64 %12, 1
br i1 %13, label %14, label %136
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = call i64 @isalnum(i8 signext %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %23, label %19
19: ; preds = %14
%20 = load i8*, i8** %4
%21 = call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %19, %14
%24 = load i8*, i8** %4
store i8* %24, i8** %3
br label %187
25: ; preds = %19
store i8* null, i8** %7
%26 = load i32, i32* %5
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0))
br label %30
30: ; preds = %28, %25
%31 = load i8*, i8** %4
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 64
br i1 %34, label %35, label %36
35: ; preds = %30
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8** %7
br label %120
36: ; preds = %30
%37 = load i8*, i8** %4
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = icmp eq i32 %39, 39
br i1 %40, label %41, label %42
41: ; preds = %36
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8** %7
br label %119
42: ; preds = %36
%43 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 37
br i1 %46, label %47, label %48
47: ; preds = %42
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8** %7
br label %118
48: ; preds = %42
%49 = load i8*, i8** %4
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = icmp eq i32 %51, 35
br i1 %52, label %53, label %54
53: ; preds = %48
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8** %7
br label %117
54: ; preds = %48
%55 = load i8*, i8** %4
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = icmp eq i32 %57, 33
br i1 %58, label %59, label %60
59: ; preds = %54
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8** %7
br label %116
60: ; preds = %54
%61 = load i8*, i8** %4
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 46
br i1 %64, label %65, label %66
65: ; preds = %60
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8** %7
br label %115
66: ; preds = %60
%67 = load i8*, i8** %4
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 36
br i1 %70, label %71, label %72
71: ; preds = %66
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8** %7
br label %114
72: ; preds = %66
%73 = load i8*, i8** %4
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 34
br i1 %76, label %77, label %78
77: ; preds = %72
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i8** %7
br label %113
78: ; preds = %72
%79 = load i8*, i8** %4
%80 = load i8, i8* %79
%81 = sext i8 %80 to i32
%82 = icmp eq i32 %81, 45
br i1 %82, label %83, label %84
83: ; preds = %78
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8** %7
br label %112
84: ; preds = %78
%85 = load i8*, i8** %4
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = icmp eq i32 %87, 47
br i1 %88, label %89, label %90
89: ; preds = %84
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8** %7
br label %111
90: ; preds = %84
%91 = load i8*, i8** %4
%92 = load i8, i8* %91
%93 = sext i8 %92 to i32
%94 = icmp eq i32 %93, 43
br i1 %94, label %95, label %96
95: ; preds = %90
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8** %7
br label %110
96: ; preds = %90
%97 = load i8*, i8** %4
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
%100 = icmp eq i32 %99, 40
br i1 %100, label %101, label %102
101: ; preds = %96
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i8** %7
br label %109
102: ; preds = %96
%103 = load i8*, i8** %4
%104 = load i8, i8* %103
%105 = sext i8 %104 to i32
%106 = icmp eq i32 %105, 41
br i1 %106, label %107, label %108
107: ; preds = %102
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i64 0, i64 0), i8** %7
br label %108
108: ; preds = %107, %102
br label %109
109: ; preds = %108, %101
br label %110
110: ; preds = %109, %95
br label %111
111: ; preds = %110, %89
br label %112
112: ; preds = %111, %83
br label %113
113: ; preds = %112, %77
br label %114
114: ; preds = %113, %71
br label %115
115: ; preds = %114, %65
br label %116
116: ; preds = %115, %59
br label %117
117: ; preds = %116, %53
br label %118
118: ; preds = %117, %47
br label %119
119: ; preds = %118, %41
br label %120
120: ; preds = %119, %35
%121 = load i8*, i8** %7
%122 = icmp ne i8* %121, null
br i1 %122, label %123, label %134
123: ; preds = %120
%124 = load i32, i32* %5
%125 = icmp ne i32 %124, 0
br i1 %125, label %126, label %132
126: ; preds = %123
%127 = load i8*, i8** %4
%128 = load i8, i8* %127
%129 = sext i8 %128 to i32
%130 = load i8*, i8** %7
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.15, i64 0, i64 0), i32 %129, i8* %130)
br label %132
132: ; preds = %126, %123
%133 = load i8*, i8** %7
store i8* %133, i8** %4
br label %134
134: ; preds = %132, %120
br label %135
135: ; preds = %134
br label %185
136: ; preds = %2
store i32 0, i32* %8
%137 = load i8*, i8** %4
%138 = load i64, i64* %6
%139 = call i8* @strndup(i8* %137, i64 %138)
store i8* %139, i8** %9
%140 = load i8*, i8** %4
%141 = load i64, i64* %6
%142 = add i64 %141, 1
%143 = call i32 @memset(i8* %140, i32 0, i64 %142)
br label %144
144: ; preds = %164, %161, %136
%145 = load i8*, i8** %9
%146 = load i8, i8* %145
%147 = icmp ne i8 %146, 0
br i1 %147, label %148, label %172
148: ; preds = %144
%149 = load i8*, i8** %9
%150 = load i8, i8* %149
%151 = call i64 @isalnum(i8 signext %150)
%152 = icmp ne i64 %151, 0
br i1 %152, label %164, label %153
153: ; preds = %148
%154 = load i32, i32* %5
%155 = icmp ne i32 %154, 0
br i1 %155, label %156, label %161
156: ; preds = %153
%157 = load i8*, i8** %9
%158 = load i8, i8* %157
%159 = sext i8 %158 to i32
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.16, i64 0, i64 0), i32 %159)
br label %161
161: ; preds = %156, %153
%162 = load i8*, i8** %9
%163 = getelementptr inbounds i8, i8* %162, i32 1
store i8* %163, i8** %9
br label %144
164: ; preds = %148
%165 = load i8*, i8** %9
%166 = getelementptr inbounds i8, i8* %165, i32 1
store i8* %166, i8** %9
%167 = load i8, i8* %165
%168 = load i8*, i8** %4
%169 = getelementptr inbounds i8, i8* %168, i32 1
store i8* %169, i8** %4
store i8 %167, i8* %168
%170 = load i32, i32* %8
%171 = add nsw i32 %170, 1
store i32 %171, i32* %8
br label %144
172: ; preds = %144
%173 = load i8*, i8** %4
store i8 0, i8* %173
%174 = load i32, i32* %8
%175 = load i8*, i8** %4
%176 = sext i32 %174 to i64
%177 = sub i64 0, %176
%178 = getelementptr inbounds i8, i8* %175, i64 %177
store i8* %178, i8** %4
%179 = load i64, i64* %6
%180 = load i8*, i8** %9
%181 = sub i64 0, %179
%182 = getelementptr inbounds i8, i8* %180, i64 %181
store i8* %182, i8** %9
%183 = load i8*, i8** %9
%184 = call i32 @free(i8* %183)
br label %185
185: ; preds = %172, %135
%186 = load i8*, i8** %4
store i8* %186, i8** %3
br label %187
187: ; preds = %185, %23
%188 = load i8*, i8** %3
ret i8* %188
}

LLVM IR (-O2):
@.str = [2 x i8] c"&\00"
@.str.1 = [76 x i8] c"moral_regla12: Aplicando regla 12. Interpretando caracteres individuales...\00"
@.str.2 = [7 x i8] c"ARROBA\00"
@.str.3 = [10 x i8] c"APOSTROFE\00"
@.str.4 = [10 x i8] c"PORCIENTO\00"
@.str.5 = [7 x i8] c"NUMERO\00"
@.str.6 = [11 x i8] c"ADMIRACION\00"
@.str.7 = [6 x i8] c"PUNTO\00"
@.str.8 = [6 x i8] c"PESOS\00"
@.str.9 = [9 x i8] c"COMILLAS\00"
@.str.10 = [6 x i8] c"GUION\00"
@.str.11 = [9 x i8] c"DIAGONAL\00"
@.str.12 = [5 x i8] c"SUMA\00"
@.str.13 = [16 x i8] c"ABRE PARENTESIS\00"
@.str.14 = [18 x i8] c"CIERRA PARENTESIS\00"
@.str.15 = [36 x i8] c" caracter %c interpretado como: %s\0A\00"
@.str.16 = [59 x i8] c"moral_regla12: Eliminando de la palabra el caracter '%c'.\0A\00"
@switch.table.moral_regla12 = [32 x i8*] [i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0)]
define i8* @moral_regla12(i8* %0, i32 %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = icmp eq i64 %3, 1
br i1 %4, label %5, label %32
5: ; preds = %2
%6 = load i8, i8* %0
%7 = tail call i64 @isalnum(i8 signext %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %76
9: ; preds = %5
%10 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %76, label %12
12: ; preds = %9
%13 = icmp eq i32 %1, 0
br i1 %13, label %16, label %14
14: ; preds = %12
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
%17 = load i8, i8* %0
%18 = add i8 %17, -33
%19 = icmp ult i8 %18, 32
br i1 %19, label %20, label %76
20: ; preds = %16
%21 = zext i8 %18 to i32
%22 = lshr i32 -2147453473, %21
%23 = and i32 %22, 1
%24 = icmp eq i32 %23, 0
br i1 %24, label %76, label %25
25: ; preds = %20
%26 = sext i8 %18 to i64
%27 = getelementptr inbounds [32 x i8*], [32 x i8*]* @switch.table.moral_regla12, i64 0, i64 %26
%28 = load i8*, i8** %27
br i1 %13, label %76, label %29
29: ; preds = %25
%30 = zext i8 %17 to i32
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.15, i64 0, i64 0), i32 %30, i8* %28)
br label %76
32: ; preds = %2
%33 = tail call i8* @strndup(i8* %0, i64 %3)
%34 = add i64 %3, 1
%35 = tail call i32 @memset(i8* %0, i32 0, i64 %34)
%36 = load i8, i8* %33
%37 = icmp eq i8 %36, 0
br i1 %37, label %66, label %38
38: ; preds = %32
%39 = icmp eq i32 %1, 0
br label %40
40: ; preds = %38, %59
%41 = phi i8 [ %36, %38 ], [ %64, %59 ]
%42 = phi i8* [ %33, %38 ], [ %60, %59 ]
%43 = phi i32 [ 0, %38 ], [ %63, %59 ]
%44 = phi i8* [ %0, %38 ], [ %62, %59 ]
br label %45
45: ; preds = %40, %55
%46 = phi i8 [ %41, %40 ], [ %57, %55 ]
%47 = phi i8* [ %42, %40 ], [ %56, %55 ]
%48 = tail call i64 @isalnum(i8 signext %46)
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %59
50: ; preds = %45
br i1 %39, label %55, label %51
51: ; preds = %50
%52 = load i8, i8* %47
%53 = sext i8 %52 to i32
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.16, i64 0, i64 0), i32 %53)
br label %55
55: ; preds = %51, %50
%56 = getelementptr inbounds i8, i8* %47, i64 1
%57 = load i8, i8* %56
%58 = icmp eq i8 %57, 0
br i1 %58, label %66, label %45
59: ; preds = %45
%60 = getelementptr inbounds i8, i8* %47, i64 1
%61 = load i8, i8* %47
%62 = getelementptr inbounds i8, i8* %44, i64 1
store i8 %61, i8* %44
%63 = add nuw nsw i32 %43, 1
%64 = load i8, i8* %60
%65 = icmp eq i8 %64, 0
br i1 %65, label %66, label %40
66: ; preds = %59, %55, %32
%67 = phi i8* [ %0, %32 ], [ %44, %55 ], [ %62, %59 ]
%68 = phi i32 [ 0, %32 ], [ %43, %55 ], [ %63, %59 ]
%69 = phi i8* [ %33, %32 ], [ %56, %55 ], [ %60, %59 ]
store i8 0, i8* %67
%70 = sext i32 %68 to i64
%71 = sub nsw i64 0, %70
%72 = getelementptr inbounds i8, i8* %67, i64 %71
%73 = sub i64 0, %3
%74 = getelementptr inbounds i8, i8* %69, i64 %73
%75 = tail call i32 @free(i8* %74)
br label %76
76: ; preds = %20, %16, %25, %66, %29, %5, %9
%77 = phi i8* [ %0, %9 ], [ %0, %5 ], [ %72, %66 ], [ %28, %25 ], [ %28, %29 ], [ %0, %16 ], [ %0, %20 ]
ret i8* %77
}