#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*/ focusSConsole(int /*<<< orphan*/);
int /*<<< orphan*/ getCurrentSConsole();
int /*<<< orphan*/ setSConsoleFontColour(int /*<<< orphan*/, int);
int /*<<< orphan*/ setSConsolebackGroundColour(int /*<<< orphan*/, int);
int /*<<< orphan*/ stringLength(char *);
int /*<<< orphan*/ strncmp(char *, unsigned char *, int /*<<< orphan*/);
int /*<<< orphan*/ uart_puts(char *);
void apariencia(unsigned int argc, unsigned char (*argv_pointer)[10]) {
  if (!strncmp("lima", argv_pointer[1], stringLength("lima"))) {
    setSConsolebackGroundColour(getCurrentSConsole(), 0xb691);
    setSConsoleFontColour(getCurrentSConsole(), 0x0000);
    uart_puts("<<< cambiando a estilo lima>>>>>>>");
  } else if (!strncmp("ros", argv_pointer[1], stringLength("ros"))) {
    setSConsolebackGroundColour(getCurrentSConsole(), 0x2844);
    setSConsoleFontColour(getCurrentSConsole(), 0xAFE5);
    uart_puts("<<< cambiando a estilo ros>>>>>>>");
  } else if (!strncmp("nyb", argv_pointer[1], stringLength("nyb"))) {
    setSConsolebackGroundColour(getCurrentSConsole(), 0x0000);
    setSConsoleFontColour(getCurrentSConsole(), 0xFFFF);
    uart_puts("<<< cambiando a estilo nyb>>>>>>>");
  } else if (!strncmp("ayb", argv_pointer[1], stringLength("ayb"))) {
    setSConsolebackGroundColour(getCurrentSConsole(), 0x000F);
    setSConsoleFontColour(getCurrentSConsole(), 0xFFFF);
    uart_puts("<<< cambiando a estilo ayb>>>>>>>");
  }
  focusSConsole(getCurrentSConsole());
}


x86 assembly (clang, -O0):
<apariencia>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xa,%rax
mov    %rax,-0x18(%rbp)
lea    0xe6e(%rip),%rdi
call   1070 <stringLength@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
lea    0xe5c(%rip),%rdi
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    11e6 <apariencia+0x76>
mov    $0x0,%al
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
mov    $0xb691,%esi
call   1050 <setSConsolebackGroundColour@plt>
mov    $0x0,%al
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1060 <setSConsoleFontColour@plt>
lea    0xe29(%rip),%rdi
call   1090 <uart_puts@plt>
jmp    132b <apariencia+0x1bb>
mov    -0x10(%rbp),%rax
add    $0xa,%rax
mov    %rax,-0x20(%rbp)
lea    0xe2f(%rip),%rdi
call   1070 <stringLength@plt>
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
lea    0xe1d(%rip),%rdi
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1250 <apariencia+0xe0>
mov    $0x0,%al
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
mov    $0x2844,%esi
call   1050 <setSConsolebackGroundColour@plt>
mov    $0x0,%al
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
mov    $0xafe5,%esi
call   1060 <setSConsoleFontColour@plt>
lea    0xde6(%rip),%rdi
call   1090 <uart_puts@plt>
jmp    1326 <apariencia+0x1b6>
mov    -0x10(%rbp),%rax
add    $0xa,%rax
mov    %rax,-0x28(%rbp)
lea    0xdeb(%rip),%rdi
call   1070 <stringLength@plt>
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
lea    0xdd9(%rip),%rdi
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    12b7 <apariencia+0x147>
mov    $0x0,%al
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1050 <setSConsolebackGroundColour@plt>
mov    $0x0,%al
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
mov    $0xffff,%esi
call   1060 <setSConsoleFontColour@plt>
lea    0xda5(%rip),%rdi
call   1090 <uart_puts@plt>
jmp    1321 <apariencia+0x1b1>
mov    -0x10(%rbp),%rax
add    $0xa,%rax
mov    %rax,-0x30(%rbp)
lea    0xdaa(%rip),%rdi
call   1070 <stringLength@plt>
mov    -0x30(%rbp),%rsi
mov    %eax,%edx
lea    0xd98(%rip),%rdi
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    131c <apariencia+0x1ac>
mov    $0x0,%al
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
mov    $0xf,%esi
call   1050 <setSConsolebackGroundColour@plt>
mov    $0x0,%al
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
mov    $0xffff,%esi
call   1060 <setSConsoleFontColour@plt>
lea    0xd61(%rip),%rdi
call   1090 <uart_puts@plt>
jmp    1321 <apariencia+0x1b1>
jmp    1326 <apariencia+0x1b6>
jmp    132b <apariencia+0x1bb>
mov    $0x0,%al
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
call   1080 <focusSConsole@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apariencia>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
add    $0xa,%rbx
lea    0xe7e(%rip),%rbp
mov    %rbp,%rdi
call   1070 <stringLength@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     120f <apariencia+0x9f>
lea    0xe86(%rip),%rbp
mov    %rbp,%rdi
call   1070 <stringLength@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     1220 <apariencia+0xb0>
lea    0xe8c(%rip),%rbp
mov    %rbp,%rdi
call   1070 <stringLength@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
mov    $0xffff,%r14d
test   %eax,%eax
je     1234 <apariencia+0xc4>
lea    0xe8c(%rip),%rbp
mov    %rbp,%rdi
call   1070 <stringLength@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    1266 <apariencia+0xf6>
lea    0xe70(%rip),%rbx
mov    $0xf,%ebp
jmp    123d <apariencia+0xcd>
lea    0xdef(%rip),%rbx
xor    %r14d,%r14d
mov    $0xb691,%ebp
jmp    123d <apariencia+0xcd>
lea    0xe05(%rip),%rbx
mov    $0xafe5,%r14d
mov    $0x2844,%ebp
jmp    123d <apariencia+0xcd>
lea    0xe17(%rip),%rbx
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <setSConsolebackGroundColour@plt>
xor    %eax,%eax
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
mov    %r14d,%esi
call   1060 <setSConsoleFontColour@plt>
mov    %rbx,%rdi
call   1090 <uart_puts@plt>
xor    %eax,%eax
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1080 <focusSConsole@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"lima\00"
@.str.1 = [35 x i8] c"<<< cambiando a estilo lima>>>>>>>\00"
@.str.2 = [4 x i8] c"ros\00"
@.str.3 = [34 x i8] c"<<< cambiando a estilo ros>>>>>>>\00"
@.str.4 = [4 x i8] c"nyb\00"
@.str.5 = [34 x i8] c"<<< cambiando a estilo nyb>>>>>>>\00"
@.str.6 = [4 x i8] c"ayb\00"
@.str.7 = [34 x i8] c"<<< cambiando a estilo ayb>>>>>>>\00"
define void @apariencia(i32 %0, [10 x i8]* %1) {
%3 = alloca i32
%4 = alloca [10 x i8]*
store i32 %0, i32* %3
store [10 x i8]* %1, [10 x i8]** %4
%5 = load [10 x i8]*, [10 x i8]** %4
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 1
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%8 = call i32 @stringLength(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %17, label %11
11: ; preds = %2
%12 = call i32 (...) @getCurrentSConsole()
%13 = call i32 @setSConsolebackGroundColour(i32 %12, i32 46737)
%14 = call i32 (...) @getCurrentSConsole()
%15 = call i32 @setSConsoleFontColour(i32 %14, i32 0)
%16 = call i32 @uart_puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
br label %59
17: ; preds = %2
%18 = load [10 x i8]*, [10 x i8]** %4
%19 = getelementptr inbounds [10 x i8], [10 x i8]* %18, i64 1
%20 = getelementptr inbounds [10 x i8], [10 x i8]* %19, i64 0, i64 0
%21 = call i32 @stringLength(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%22 = call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %20, i32 %21)
%23 = icmp ne i32 %22, 0
br i1 %23, label %30, label %24
24: ; preds = %17
%25 = call i32 (...) @getCurrentSConsole()
%26 = call i32 @setSConsolebackGroundColour(i32 %25, i32 10308)
%27 = call i32 (...) @getCurrentSConsole()
%28 = call i32 @setSConsoleFontColour(i32 %27, i32 45029)
%29 = call i32 @uart_puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
br label %58
30: ; preds = %17
%31 = load [10 x i8]*, [10 x i8]** %4
%32 = getelementptr inbounds [10 x i8], [10 x i8]* %31, i64 1
%33 = getelementptr inbounds [10 x i8], [10 x i8]* %32, i64 0, i64 0
%34 = call i32 @stringLength(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%35 = call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %33, i32 %34)
%36 = icmp ne i32 %35, 0
br i1 %36, label %43, label %37
37: ; preds = %30
%38 = call i32 (...) @getCurrentSConsole()
%39 = call i32 @setSConsolebackGroundColour(i32 %38, i32 0)
%40 = call i32 (...) @getCurrentSConsole()
%41 = call i32 @setSConsoleFontColour(i32 %40, i32 65535)
%42 = call i32 @uart_puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
br label %57
43: ; preds = %30
%44 = load [10 x i8]*, [10 x i8]** %4
%45 = getelementptr inbounds [10 x i8], [10 x i8]* %44, i64 1
%46 = getelementptr inbounds [10 x i8], [10 x i8]* %45, i64 0, i64 0
%47 = call i32 @stringLength(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%48 = call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %46, i32 %47)
%49 = icmp ne i32 %48, 0
br i1 %49, label %56, label %50
50: ; preds = %43
%51 = call i32 (...) @getCurrentSConsole()
%52 = call i32 @setSConsolebackGroundColour(i32 %51, i32 15)
%53 = call i32 (...) @getCurrentSConsole()
%54 = call i32 @setSConsoleFontColour(i32 %53, i32 65535)
%55 = call i32 @uart_puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
br label %56
56: ; preds = %50, %43
br label %57
57: ; preds = %56, %37
br label %58
58: ; preds = %57, %24
br label %59
59: ; preds = %58, %11
%60 = call i32 (...) @getCurrentSConsole()
%61 = call i32 @focusSConsole(i32 %60)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"lima\00"
@.str.1 = [35 x i8] c"<<< cambiando a estilo lima>>>>>>>\00"
@.str.2 = [4 x i8] c"ros\00"
@.str.3 = [34 x i8] c"<<< cambiando a estilo ros>>>>>>>\00"
@.str.4 = [4 x i8] c"nyb\00"
@.str.5 = [34 x i8] c"<<< cambiando a estilo nyb>>>>>>>\00"
@.str.6 = [4 x i8] c"ayb\00"
@.str.7 = [34 x i8] c"<<< cambiando a estilo ayb>>>>>>>\00"
define void @apariencia(i32 %0, [10 x i8]* %1) {
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 1, i64 0
%4 = tail call i32 @stringLength(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %19, label %7
7: ; preds = %2
%8 = tail call i32 @stringLength(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %3, i32 %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = tail call i32 @stringLength(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%13 = tail call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %3, i32 %12)
%14 = icmp eq i32 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = tail call i32 @stringLength(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%17 = tail call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %3, i32 %16)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %28
19: ; preds = %15, %11, %7, %2
%20 = phi i32 [ 46737, %2 ], [ 10308, %7 ], [ 0, %11 ], [ 15, %15 ]
%21 = phi i32 [ 0, %2 ], [ 45029, %7 ], [ 65535, %11 ], [ 65535, %15 ]
%22 = phi i8* [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), %7 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), %11 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0), %15 ]
%23 = tail call i32 (...) @getCurrentSConsole()
%24 = tail call i32 @setSConsolebackGroundColour(i32 %23, i32 %20)
%25 = tail call i32 (...) @getCurrentSConsole()
%26 = tail call i32 @setSConsoleFontColour(i32 %25, i32 %21)
%27 = tail call i32 @uart_puts(i8* %22)
br label %28
28: ; preds = %19, %15
%29 = tail call i32 (...) @getCurrentSConsole()
%30 = tail call i32 @focusSConsole(i32 %29)
ret void
}