#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*/ cls();
char *get_date();
char *get_hour();
int /*<<< orphan*/ msg_shell(char *);
int /*<<< orphan*/ print_mac();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ send_message_broadcast(char *);
int /*<<< orphan*/ sleep(int);
scalar_t__ strcmp(char *, char *);
scalar_t__ strncmp(char *, char *, int);
void start_shell() {
  char buffer[1000] = {0};
  buffer[0] = 0;
  int exit = -1;
  do {
    printf("$> ");
    scanf("%s", buffer);
    if (strcmp(buffer, "help") == 0) {
      printf("Comandos de NEOShell:\n");
      printf("clear              : Borra la pantalla.\n");
      printf("date               : Muestra la fecha actual.\n");
      printf("echo [message]     : Muestra una linea de texto [message].\n");
      printf("exit               : Cierra la consola.\n");
      printf("help               : Muestra el manual de ayuda.\n");
      printf("hour               : Muestra la hora actual.\n");
      printf("sleep              : La consola espera durante un tiempo.\n");
      printf(
          "mac                : Devuelve la direccion mac del dispositivo.\n");
      printf("msg [mac][message] : Manda un mensaje a la mac deseada.\n");
      printf("wall [message]     : Manda un mensaje broadcast.\n");
    } else if (strcmp(buffer, "exit") == 0) {
      exit = 1;
    } else if (strncmp(buffer, "echo ", 5) == 0) {
      printf("%s\n", buffer + 5);
    } else if (strcmp(buffer, "hour") == 0) {
      printf("%s\n", get_hour());
    } else if (strcmp(buffer, "date") == 0) {
      printf("%s\n", get_date());
    } else if (strcmp(buffer, "clear") == 0) {
      cls();
    } else if (strcmp(buffer, "sleep") == 0) {
      sleep(2400);
      printf("Dormi 10 segundos.\n");
    } else if (strcmp(buffer, "mac") == 0) {
      printf("MAC ADDRESS: ");
      print_mac();
    } else if (strncmp(buffer, "wall ", 5) == 0) {
      send_message_broadcast(buffer + 5);
    } else if (strncmp(buffer, "msg ", 4) == 0) {
      msg_shell(buffer + 4);
    } else {
      printf("No existe ese comando, use help para aclarar sus dudas.\n");
    }
  } while (exit == -1);
  printf(" Ahora puede apagar el equipo.");
}


x86 assembly (clang, -O0):
<start_shell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
lea    -0x3f0(%rbp),%rdi
xor    %esi,%esi
mov    $0x3e8,%edx
call   1070 <memset@plt>
movb   $0x0,-0x3f0(%rbp)
movl   $0xffffffff,-0x3f4(%rbp)
ff ff ff
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xdf9(%rip),%rdi
call   10c0 <scanf@plt>
lea    -0x3f0(%rbp),%rdi
lea    0xde9(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    12cc <start_shell+0x10c>
lea    0xdd8(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf0a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf35(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    14ef <start_shell+0x32f>
lea    -0x3f0(%rbp),%rdi
lea    0xf4d(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    12f8 <start_shell+0x138>
movl   $0x1,-0x3f4(%rbp)
jmp    14ea <start_shell+0x32a>
lea    -0x3f0(%rbp),%rdi
lea    0xf26(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1338 <start_shell+0x178>
lea    -0x3f0(%rbp),%rsi
add    $0x5,%rsi
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    14e5 <start_shell+0x325>
lea    -0x3f0(%rbp),%rdi
lea    0xef0(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1372 <start_shell+0x1b2>
mov    $0x0,%al
call   10b0 <get_hour@plt>
mov    %rax,%rsi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    14e0 <start_shell+0x320>
lea    -0x3f0(%rbp),%rdi
lea    0xebb(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13ac <start_shell+0x1ec>
mov    $0x0,%al
call   10d0 <get_date@plt>
mov    %rax,%rsi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    14db <start_shell+0x31b>
lea    -0x3f0(%rbp),%rdi
lea    0xe86(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13d5 <start_shell+0x215>
mov    $0x0,%al
call   10a0 <cls@plt>
jmp    14d6 <start_shell+0x316>
lea    -0x3f0(%rbp),%rdi
lea    0xe63(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    140f <start_shell+0x24f>
mov    $0x960,%edi
call   10e0 <sleep@plt>
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    14d1 <start_shell+0x311>
lea    -0x3f0(%rbp),%rdi
lea    0xe43(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1446 <start_shell+0x286>
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1040 <print_mac@plt>
jmp    14cc <start_shell+0x30c>
lea    -0x3f0(%rbp),%rdi
lea    0xe1e(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    147d <start_shell+0x2bd>
lea    -0x3f0(%rbp),%rdi
add    $0x5,%rdi
call   1050 <send_message_broadcast@plt>
jmp    14c7 <start_shell+0x307>
lea    -0x3f0(%rbp),%rdi
lea    0xded(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    14b4 <start_shell+0x2f4>
lea    -0x3f0(%rbp),%rdi
add    $0x4,%rdi
call   1080 <msg_shell@plt>
jmp    14c2 <start_shell+0x302>
lea    0xdc2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    14c7 <start_shell+0x307>
jmp    14cc <start_shell+0x30c>
jmp    14d1 <start_shell+0x311>
jmp    14d6 <start_shell+0x316>
jmp    14db <start_shell+0x31b>
jmp    14e0 <start_shell+0x320>
jmp    14e5 <start_shell+0x325>
jmp    14ea <start_shell+0x32a>
jmp    14ef <start_shell+0x32f>
jmp    14f4 <start_shell+0x334>
cmpl   $0xffffffff,-0x3f4(%rbp)
je     11ef <start_shell+0x2f>
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_shell>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rbx
mov    $0x3e8,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1080 <memset@plt>
lea    0xe06(%rip),%r12
lea    0xe03(%rip),%r13
lea    0xdff(%rip),%rbp
lea    0xdfd(%rip),%r15
lea    0xdfb(%rip),%r14
jmp    12a4 <start_shell+0xd4>
nopl   0x0(%rax,%rax,1)
lea    0xe8d(%rip),%rdi
call   1060 <puts@plt>
lea    0xe97(%rip),%rdi
call   1060 <puts@plt>
lea    0xeb3(%rip),%rdi
call   1060 <puts@plt>
lea    0xed5(%rip),%rdi
call   1060 <puts@plt>
lea    0xf04(%rip),%rdi
call   1060 <puts@plt>
lea    0xf20(%rip),%rdi
call   1060 <puts@plt>
lea    0xf45(%rip),%rdi
call   1060 <puts@plt>
lea    0xf66(%rip),%rdi
call   1060 <puts@plt>
lea    0xf94(%rip),%rdi
call   1060 <puts@plt>
lea    0xfc8(%rip),%rdi
call   1060 <puts@plt>
lea    0xff4(%rip),%rdi
call   1060 <puts@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
call   10d0 <scanf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1220 <start_shell+0x50>
mov    %rbx,%rdi
mov    %r15,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     144b <start_shell+0x27b>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     13c0 <start_shell+0x1f0>
mov    %rbx,%rdi
lea    0xd13(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     13cf <start_shell+0x1ff>
mov    %rbx,%rdi
lea    0xd00(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     13d8 <start_shell+0x208>
mov    %rbx,%rdi
lea    0xced(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     13ec <start_shell+0x21c>
mov    %rbx,%rdi
lea    0xcdb(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     13f8 <start_shell+0x228>
mov    %rbx,%rdi
lea    0xcc9(%rip),%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1413 <start_shell+0x243>
mov    %rbx,%rdi
lea    0xcc3(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     142d <start_shell+0x25d>
mov    %rbx,%rdi
lea    0xcac(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     143c <start_shell+0x26c>
lea    0xcb6(%rip),%rdi
call   1060 <puts@plt>
jmp    12a4 <start_shell+0xd4>
nopl   (%rax)
lea    0x5(%rsp),%rdi
call   1060 <puts@plt>
jmp    12a4 <start_shell+0xd4>
xor    %eax,%eax
call   10c0 <get_hour@plt>
jmp    13df <start_shell+0x20f>
xor    %eax,%eax
call   10e0 <get_date@plt>
mov    %rax,%rdi
call   1060 <puts@plt>
jmp    12a4 <start_shell+0xd4>
xor    %eax,%eax
call   10b0 <cls@plt>
jmp    12a4 <start_shell+0xd4>
mov    $0x960,%edi
call   10f0 <sleep@plt>
lea    0xc98(%rip),%rdi
call   1060 <puts@plt>
jmp    12a4 <start_shell+0xd4>
lea    0xc17(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1040 <print_mac@plt>
jmp    12a4 <start_shell+0xd4>
lea    0x5(%rsp),%rdi
call   1050 <send_message_broadcast@plt>
jmp    12a4 <start_shell+0xd4>
lea    0x4(%rsp),%rdi
call   1090 <msg_shell@plt>
jmp    12a4 <start_shell+0xd4>
lea    0xbf8(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x3e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"$> \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [5 x i8] c"help\00"
@.str.3 = [23 x i8] c"Comandos de NEOShell:\0A\00"
@.str.4 = [41 x i8] c"clear : Borra la pantalla.\0A\00"
@.str.5 = [47 x i8] c"date : Muestra la fecha actual.\0A\00"
@.str.6 = [60 x i8] c"echo [message] : Muestra una linea de texto [message].\0A\00"
@.str.7 = [41 x i8] c"exit : Cierra la consola.\0A\00"
@.str.8 = [50 x i8] c"help : Muestra el manual de ayuda.\0A\00"
@.str.9 = [46 x i8] c"hour : Muestra la hora actual.\0A\00"
@.str.10 = [59 x i8] c"sleep : La consola espera durante un tiempo.\0A\00"
@.str.11 = [65 x i8] c"mac : Devuelve la direccion mac del dispositivo.\0A\00"
@.str.12 = [57 x i8] c"msg [mac][message] : Manda un mensaje a la mac deseada.\0A\00"
@.str.13 = [50 x i8] c"wall [message] : Manda un mensaje broadcast.\0A\00"
@.str.14 = [5 x i8] c"exit\00"
@.str.15 = [6 x i8] c"echo \00"
@.str.16 = [4 x i8] c"%s\0A\00"
@.str.17 = [5 x i8] c"hour\00"
@.str.18 = [5 x i8] c"date\00"
@.str.19 = [6 x i8] c"clear\00"
@.str.20 = [6 x i8] c"sleep\00"
@.str.21 = [20 x i8] c"Dormi 10 segundos.\0A\00"
@.str.22 = [4 x i8] c"mac\00"
@.str.23 = [14 x i8] c"MAC ADDRESS: \00"
@.str.24 = [6 x i8] c"wall \00"
@.str.25 = [5 x i8] c"msg \00"
@.str.26 = [57 x i8] c"No existe ese comando, use help para aclarar sus dudas.\0A\00"
@.str.27 = [31 x i8] c" Ahora puede apagar el equipo.\00"
define void @start_shell() {
%1 = alloca [1000 x i8]
%2 = alloca i32
%3 = bitcast [1000 x i8]* %1 to i8*
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
store i8 0, i8* %4
store i32 -1, i32* %2
br label %5
5: ; preds = %99, %0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %24
12: ; preds = %5
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.6, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.8, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.9, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.10, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.11, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.12, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.13, i64 0, i64 0))
br label %98
24: ; preds = %5
%25 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%26 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %24
store i32 1, i32* %2
br label %97
29: ; preds = %24
%30 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%31 = call i64 @strncmp(i8* %30, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 5)
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %37
33: ; preds = %29
%34 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%35 = getelementptr inbounds i8, i8* %34, i64 5
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8* %35)
br label %96
37: ; preds = %29
%38 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %37
%42 = call i8* (...) @get_hour()
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8* %42)
br label %95
44: ; preds = %37
%45 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%46 = call i64 @strcmp(i8* %45, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %51
48: ; preds = %44
%49 = call i8* (...) @get_date()
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8* %49)
br label %94
51: ; preds = %44
%52 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%53 = call i64 @strcmp(i8* %52, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %51
%56 = call i32 (...) @cls()
br label %93
57: ; preds = %51
%58 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%59 = call i64 @strcmp(i8* %58, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0))
%60 = icmp eq i64 %59, 0
br i1 %60, label %61, label %64
61: ; preds = %57
%62 = call i32 @sleep(i32 2400)
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))
br label %92
64: ; preds = %57
%65 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%66 = call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0))
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %71
68: ; preds = %64
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.23, i64 0, i64 0))
%70 = call i32 (...) @print_mac()
br label %91
71: ; preds = %64
%72 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%73 = call i64 @strncmp(i8* %72, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.24, i64 0, i64 0), i32 5)
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %79
75: ; preds = %71
%76 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%77 = getelementptr inbounds i8, i8* %76, i64 5
%78 = call i32 @send_message_broadcast(i8* %77)
br label %90
79: ; preds = %71
%80 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%81 = call i64 @strncmp(i8* %80, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i64 0, i64 0), i32 4)
%82 = icmp eq i64 %81, 0
br i1 %82, label %83, label %87
83: ; preds = %79
%84 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%85 = getelementptr inbounds i8, i8* %84, i64 4
%86 = call i32 @msg_shell(i8* %85)
br label %89
87: ; preds = %79
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.26, i64 0, i64 0))
br label %89
89: ; preds = %87, %83
br label %90
90: ; preds = %89, %75
br label %91
91: ; preds = %90, %68
br label %92
92: ; preds = %91, %61
br label %93
93: ; preds = %92, %55
br label %94
94: ; preds = %93, %48
br label %95
95: ; preds = %94, %41
br label %96
96: ; preds = %95, %33
br label %97
97: ; preds = %96, %28
br label %98
98: ; preds = %97, %12
br label %99
99: ; preds = %98
%100 = load i32, i32* %2
%101 = icmp eq i32 %100, -1
br i1 %101, label %5, label %102
102: ; preds = %99
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.27, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"$> \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [5 x i8] c"help\00"
@.str.14 = [5 x i8] c"exit\00"
@.str.15 = [6 x i8] c"echo \00"
@.str.17 = [5 x i8] c"hour\00"
@.str.18 = [5 x i8] c"date\00"
@.str.19 = [6 x i8] c"clear\00"
@.str.20 = [6 x i8] c"sleep\00"
@.str.22 = [4 x i8] c"mac\00"
@.str.23 = [14 x i8] c"MAC ADDRESS: \00"
@.str.24 = [6 x i8] c"wall \00"
@.str.25 = [5 x i8] c"msg \00"
@.str.27 = [31 x i8] c" Ahora puede apagar el equipo.\00"
@str = [56 x i8] c"No existe ese comando, use help para aclarar sus dudas.\00"
@str.28 = [19 x i8] c"Dormi 10 segundos.\00"
@str.29 = [22 x i8] c"Comandos de NEOShell:\00"
@str.30 = [40 x i8] c"clear : Borra la pantalla.\00"
@str.31 = [46 x i8] c"date : Muestra la fecha actual.\00"
@str.32 = [59 x i8] c"echo [message] : Muestra una linea de texto [message].\00"
@str.33 = [40 x i8] c"exit : Cierra la consola.\00"
@str.34 = [49 x i8] c"help : Muestra el manual de ayuda.\00"
@str.35 = [45 x i8] c"hour : Muestra la hora actual.\00"
@str.36 = [58 x i8] c"sleep : La consola espera durante un tiempo.\00"
@str.37 = [64 x i8] c"mac : Devuelve la direccion mac del dispositivo.\00"
@str.38 = [56 x i8] c"msg [mac][message] : Manda un mensaje a la mac deseada.\00"
@str.39 = [49 x i8] c"wall [message] : Manda un mensaje broadcast.\00"
define void @start_shell() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 4
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 5
br label %5
5: ; preds = %22, %0
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%8 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %23
10: ; preds = %5
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.29, i64 0, i64 0))
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.30, i64 0, i64 0))
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.31, i64 0, i64 0))
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.32, i64 0, i64 0))
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.33, i64 0, i64 0))
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.34, i64 0, i64 0))
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.35, i64 0, i64 0))
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.36, i64 0, i64 0))
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.37, i64 0, i64 0))
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.38, i64 0, i64 0))
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.39, i64 0, i64 0))
br label %22
22: ; preds = %10, %29, %40, %51, %63, %70, %68, %57, %46, %34
br label %5
23: ; preds = %5
%24 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %72, label %26
26: ; preds = %23
%27 = call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 5)
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @puts(i8* %4)
br label %22
31: ; preds = %26
%32 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = call i8* (...) @get_hour()
%36 = call i32 @puts(i8* dereferenceable(1) %35)
br label %22
37: ; preds = %31
%38 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %37
%41 = call i8* (...) @get_date()
%42 = call i32 @puts(i8* dereferenceable(1) %41)
br label %22
43: ; preds = %37
%44 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = call i32 (...) @cls()
br label %22
48: ; preds = %43
%49 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %48
%52 = call i32 @sleep(i32 2400)
%53 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.28, i64 0, i64 0))
br label %22
54: ; preds = %48
%55 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %60
57: ; preds = %54
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.23, i64 0, i64 0))
%59 = call i32 (...) @print_mac()
br label %22
60: ; preds = %54
%61 = call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.24, i64 0, i64 0), i32 5)
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %60
%64 = call i32 @send_message_broadcast(i8* %4)
br label %22
65: ; preds = %60
%66 = call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i64 0, i64 0), i32 4)
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = call i32 @msg_shell(i8* %3)
br label %22
70: ; preds = %65
%71 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
br label %22
72: ; preds = %23
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.27, i64 0, i64 0))
ret void
}