#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*/ cadd();
int /*<<< orphan*/ cdiv();
int /*<<< orphan*/ cmult();
int /*<<< orphan*/ cpeek();
int /*<<< orphan*/ cpop();
int /*<<< orphan*/ cpush(int);
int /*<<< orphan*/ crdiv();
int /*<<< orphan*/ crsub();
int /*<<< orphan*/ csub();
int /*<<< orphan*/ serial_writestring(char *);
int stoi(char *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ terminal_clear();
int /*<<< orphan*/ terminal_hexstring(char *, int);
int /*<<< orphan*/ terminal_putchar(char);
int /*<<< orphan*/ terminal_writeint(int /*<<< orphan*/);
int /*<<< orphan*/ terminal_writestring(char *);
void io_process(char *s, int ss) {
  terminal_putchar('\n');
  if (strncmp(s, "echo ", 5) == 0) {
    terminal_writestring(s + 5);
    terminal_putchar('\n');
  } else if (strncmp(s, "serial ", 7) == 0) {
    serial_writestring("\n");
    serial_writestring(s + 7);
    serial_writestring("\n");
  } else if (strncmp(s, "clear", 5) == 0) {
    terminal_clear();
  } else if (strncmp(s, "hex ", 4) == 0) {
    terminal_hexstring(s + 4, ss - 4);
    terminal_putchar('\n');
  } else if (strncmp(s, "push ", 5) == 0) {
    int n = stoi(s + 5);
    cpush(n);
  } else if (strncmp(s, "peek", 4) == 0) {
    terminal_writeint(cpeek());
    terminal_putchar('\n');
  } else if (strncmp(s, "pop", 3) == 0) {
    terminal_writeint(cpeek());
    cpop();
    terminal_putchar('\n');
  } else if (strncmp(s, "add", 3) == 0) {
    cadd();
    terminal_writeint(cpeek());
    terminal_putchar('\n');
  } else if (strncmp(s, "mult", 3) == 0) {
    cmult();
    terminal_writeint(cpeek());
    terminal_putchar('\n');
  } else if (strncmp(s, "sub", 3) == 0) {
    csub();
    terminal_writeint(cpeek());
    terminal_putchar('\n');
  } else if (strncmp(s, "rsub", 3) == 0) {
    crsub();
    terminal_writeint(cpeek());
    terminal_putchar('\n');
  } else if (strncmp(s, "div", 3) == 0) {
    cdiv();
    terminal_writeint(cpeek());
    terminal_putchar('\n');
  } else if (strncmp(s, "rdiv", 3) == 0) {
    crdiv();
    terminal_writeint(cpeek());
    terminal_putchar('\n');
  } else {
    terminal_writestring("Command not recognized\n");
  }
}


x86 assembly (clang, -O0):
<io_process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xa,%edi
call   1090 <terminal_putchar@plt>
mov    -0x8(%rbp),%rdi
lea    0xdcc(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1264 <io_process+0x54>
mov    -0x8(%rbp),%rdi
add    $0x5,%rdi
call   1050 <terminal_writestring@plt>
mov    $0xa,%edi
call   1090 <terminal_putchar@plt>
jmp    15ae <io_process+0x39e>
mov    -0x8(%rbp),%rdi
lea    0xd97(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    12ad <io_process+0x9d>
lea    0xdc7(%rip),%rdi
call   1120 <serial_writestring@plt>
mov    -0x8(%rbp),%rdi
add    $0x7,%rdi
call   1120 <serial_writestring@plt>
lea    0xdae(%rip),%rdi
call   1120 <serial_writestring@plt>
jmp    15a9 <io_process+0x399>
mov    -0x8(%rbp),%rdi
lea    0xd56(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    12d8 <io_process+0xc8>
mov    $0x0,%al
call   1080 <terminal_clear@plt>
jmp    15a4 <io_process+0x394>
mov    -0x8(%rbp),%rdi
lea    0xd31(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1319 <io_process+0x109>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0xc(%rbp),%esi
sub    $0x4,%esi
call   10b0 <terminal_hexstring@plt>
mov    $0xa,%edi
call   1090 <terminal_putchar@plt>
jmp    159f <io_process+0x38f>
mov    -0x8(%rbp),%rdi
lea    0xcf5(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1355 <io_process+0x145>
mov    -0x8(%rbp),%rdi
add    $0x5,%rdi
call   1100 <stoi@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   10e0 <cpush@plt>
jmp    159a <io_process+0x38a>
mov    -0x8(%rbp),%rdi
lea    0xcbf(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1391 <io_process+0x181>
mov    $0x0,%al
call   1060 <cpeek@plt>
mov    %eax,%edi
call   1070 <terminal_writeint@plt>
mov    $0xa,%edi
call   1090 <terminal_putchar@plt>
jmp    1595 <io_process+0x385>
mov    -0x8(%rbp),%rdi
lea    0xc88(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    13d4 <io_process+0x1c4>
mov    $0x0,%al
call   1060 <cpeek@plt>
mov    %eax,%edi
call   1070 <terminal_writeint@plt>
mov    $0x0,%al
call   10c0 <cpop@plt>
mov    $0xa,%edi
call   1090 <terminal_putchar@plt>
jmp    1590 <io_process+0x380>
mov    -0x8(%rbp),%rdi
lea    0xc49(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1417 <io_process+0x207>
mov    $0x0,%al
call   1130 <cadd@plt>
mov    $0x0,%al
call   1060 <cpeek@plt>
mov    %eax,%edi
call   1070 <terminal_writeint@plt>
mov    $0xa,%edi
call   1090 <terminal_putchar@plt>
jmp    158b <io_process+0x37b>
mov    -0x8(%rbp),%rdi
lea    0xc0a(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    145a <io_process+0x24a>
mov    $0x0,%al
call   10f0 <cmult@plt>
mov    $0x0,%al
call   1060 <cpeek@plt>
mov    %eax,%edi
call   1070 <terminal_writeint@plt>
mov    $0xa,%edi
call   1090 <terminal_putchar@plt>
jmp    1586 <io_process+0x376>
mov    -0x8(%rbp),%rdi
lea    0xbcd(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    149d <io_process+0x28d>
mov    $0x0,%al
call   10d0 <csub@plt>
mov    $0x0,%al
call   1060 <cpeek@plt>
mov    %eax,%edi
call   1070 <terminal_writeint@plt>
mov    $0xa,%edi
call   1090 <terminal_putchar@plt>
jmp    1581 <io_process+0x371>
mov    -0x8(%rbp),%rdi
lea    0xb89(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    14e0 <io_process+0x2d0>
mov    $0x0,%al
call   1030 <crsub@plt>
mov    $0x0,%al
call   1060 <cpeek@plt>
mov    %eax,%edi
call   1070 <terminal_writeint@plt>
mov    $0xa,%edi
call   1090 <terminal_putchar@plt>
jmp    157c <io_process+0x36c>
mov    -0x8(%rbp),%rdi
lea    0xb4c(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1523 <io_process+0x313>
mov    $0x0,%al
call   1110 <cdiv@plt>
mov    $0x0,%al
call   1060 <cpeek@plt>
mov    %eax,%edi
call   1070 <terminal_writeint@plt>
mov    $0xa,%edi
call   1090 <terminal_putchar@plt>
jmp    1577 <io_process+0x367>
mov    -0x8(%rbp),%rdi
lea    0xb08(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1566 <io_process+0x356>
mov    $0x0,%al
call   10a0 <crdiv@plt>
mov    $0x0,%al
call   1060 <cpeek@plt>
mov    %eax,%edi
call   1070 <terminal_writeint@plt>
mov    $0xa,%edi
call   1090 <terminal_putchar@plt>
jmp    1572 <io_process+0x362>
lea    0xace(%rip),%rdi
call   1050 <terminal_writestring@plt>
jmp    1577 <io_process+0x367>
jmp    157c <io_process+0x36c>
jmp    1581 <io_process+0x371>
jmp    1586 <io_process+0x376>
jmp    158b <io_process+0x37b>
jmp    1590 <io_process+0x380>
jmp    1595 <io_process+0x385>
jmp    159a <io_process+0x38a>
jmp    159f <io_process+0x38f>
jmp    15a4 <io_process+0x394>
jmp    15a9 <io_process+0x399>
jmp    15ae <io_process+0x39e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_process>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0xa,%edi
call   1090 <terminal_putchar@plt>
lea    0xdd7(%rip),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     13ad <io_process+0x19d>
lea    0xdc0(%rip),%rsi
mov    %rbx,%rdi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     13c9 <io_process+0x1b9>
lea    0xdab(%rip),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     13f2 <io_process+0x1e2>
lea    0xd94(%rip),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     13ff <io_process+0x1ef>
lea    0xd7c(%rip),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1412 <io_process+0x202>
lea    0xd65(%rip),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1479 <io_process+0x269>
lea    0xd4d(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     142b <io_process+0x21b>
lea    0xd34(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1445 <io_process+0x235>
lea    0xd1b(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     144e <io_process+0x23e>
lea    0xd04(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1457 <io_process+0x247>
lea    0xce6(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1460 <io_process+0x250>
lea    0xccf(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1469 <io_process+0x259>
lea    0xcb1(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1472 <io_process+0x262>
lea    0xc99(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <terminal_writestring@plt>
add    $0x5,%rbx
mov    %rbx,%rdi
call   1050 <terminal_writestring@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1090 <terminal_putchar@plt>
lea    0xc81(%rip),%rbp
mov    %rbp,%rdi
call   1120 <serial_writestring@plt>
add    $0x7,%rbx
mov    %rbx,%rdi
call   1120 <serial_writestring@plt>
mov    %rbp,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1120 <serial_writestring@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1080 <terminal_clear@plt>
add    $0x4,%rbx
add    $0xfffffffc,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
call   10b0 <terminal_hexstring@plt>
jmp    13b9 <io_process+0x1a9>
add    $0x5,%rbx
mov    %rbx,%rdi
call   1100 <stoi@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    10e0 <cpush@plt>
xor    %eax,%eax
call   1060 <cpeek@plt>
mov    %eax,%edi
call   1070 <terminal_writeint@plt>
xor    %eax,%eax
call   10c0 <cpop@plt>
jmp    13b9 <io_process+0x1a9>
xor    %eax,%eax
call   1130 <cadd@plt>
jmp    1479 <io_process+0x269>
xor    %eax,%eax
call   10f0 <cmult@plt>
jmp    1479 <io_process+0x269>
xor    %eax,%eax
call   10d0 <csub@plt>
jmp    1479 <io_process+0x269>
xor    %eax,%eax
call   1030 <crsub@plt>
jmp    1479 <io_process+0x269>
xor    %eax,%eax
call   1110 <cdiv@plt>
jmp    1479 <io_process+0x269>
xor    %eax,%eax
call   10a0 <crdiv@plt>
xor    %eax,%eax
call   1060 <cpeek@plt>
mov    %eax,%edi
call   1070 <terminal_writeint@plt>
jmp    13b9 <io_process+0x1a9>

LLVM IR (-O0):
@.str = [6 x i8] c"echo \00"
@.str.1 = [8 x i8] c"serial \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [6 x i8] c"clear\00"
@.str.4 = [5 x i8] c"hex \00"
@.str.5 = [6 x i8] c"push \00"
@.str.6 = [5 x i8] c"peek\00"
@.str.7 = [4 x i8] c"pop\00"
@.str.8 = [4 x i8] c"add\00"
@.str.9 = [5 x i8] c"mult\00"
@.str.10 = [4 x i8] c"sub\00"
@.str.11 = [5 x i8] c"rsub\00"
@.str.12 = [4 x i8] c"div\00"
@.str.13 = [5 x i8] c"rdiv\00"
@.str.14 = [24 x i8] c"Command not recognized\0A\00"
define void @io_process(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = call i32 @terminal_putchar(i8 signext 10)
%7 = load i8*, i8** %3
%8 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 5
%13 = call i32 @terminal_writestring(i8* %12)
%14 = call i32 @terminal_putchar(i8 signext 10)
br label %137
15: ; preds = %2
%16 = load i8*, i8** %3
%17 = call i64 @strncmp(i8* %16, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 7)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %25
19: ; preds = %15
%20 = call i32 @serial_writestring(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 7
%23 = call i32 @serial_writestring(i8* %22)
%24 = call i32 @serial_writestring(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %136
25: ; preds = %15
%26 = load i8*, i8** %3
%27 = call i64 @strncmp(i8* %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 5)
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = call i32 (...) @terminal_clear()
br label %135
31: ; preds = %25
%32 = load i8*, i8** %3
%33 = call i64 @strncmp(i8* %32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %42
35: ; preds = %31
%36 = load i8*, i8** %3
%37 = getelementptr inbounds i8, i8* %36, i64 4
%38 = load i32, i32* %4
%39 = sub nsw i32 %38, 4
%40 = call i32 @terminal_hexstring(i8* %37, i32 %39)
%41 = call i32 @terminal_putchar(i8 signext 10)
br label %134
42: ; preds = %31
%43 = load i8*, i8** %3
%44 = call i64 @strncmp(i8* %43, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 5)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %52
46: ; preds = %42
%47 = load i8*, i8** %3
%48 = getelementptr inbounds i8, i8* %47, i64 5
%49 = call i32 @stoi(i8* %48)
store i32 %49, i32* %5
%50 = load i32, i32* %5
%51 = call i32 @cpush(i32 %50)
br label %133
52: ; preds = %42
%53 = load i8*, i8** %3
%54 = call i64 @strncmp(i8* %53, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 4)
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %60
56: ; preds = %52
%57 = call i32 (...) @cpeek()
%58 = call i32 @terminal_writeint(i32 %57)
%59 = call i32 @terminal_putchar(i8 signext 10)
br label %132
60: ; preds = %52
%61 = load i8*, i8** %3
%62 = call i64 @strncmp(i8* %61, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %69
64: ; preds = %60
%65 = call i32 (...) @cpeek()
%66 = call i32 @terminal_writeint(i32 %65)
%67 = call i32 (...) @cpop()
%68 = call i32 @terminal_putchar(i8 signext 10)
br label %131
69: ; preds = %60
%70 = load i8*, i8** %3
%71 = call i64 @strncmp(i8* %70, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%72 = icmp eq i64 %71, 0
br i1 %72, label %73, label %78
73: ; preds = %69
%74 = call i32 (...) @cadd()
%75 = call i32 (...) @cpeek()
%76 = call i32 @terminal_writeint(i32 %75)
%77 = call i32 @terminal_putchar(i8 signext 10)
br label %130
78: ; preds = %69
%79 = load i8*, i8** %3
%80 = call i64 @strncmp(i8* %79, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 3)
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %87
82: ; preds = %78
%83 = call i32 (...) @cmult()
%84 = call i32 (...) @cpeek()
%85 = call i32 @terminal_writeint(i32 %84)
%86 = call i32 @terminal_putchar(i8 signext 10)
br label %129
87: ; preds = %78
%88 = load i8*, i8** %3
%89 = call i64 @strncmp(i8* %88, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%90 = icmp eq i64 %89, 0
br i1 %90, label %91, label %96
91: ; preds = %87
%92 = call i32 (...) @csub()
%93 = call i32 (...) @cpeek()
%94 = call i32 @terminal_writeint(i32 %93)
%95 = call i32 @terminal_putchar(i8 signext 10)
br label %128
96: ; preds = %87
%97 = load i8*, i8** %3
%98 = call i64 @strncmp(i8* %97, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 3)
%99 = icmp eq i64 %98, 0
br i1 %99, label %100, label %105
100: ; preds = %96
%101 = call i32 (...) @crsub()
%102 = call i32 (...) @cpeek()
%103 = call i32 @terminal_writeint(i32 %102)
%104 = call i32 @terminal_putchar(i8 signext 10)
br label %127
105: ; preds = %96
%106 = load i8*, i8** %3
%107 = call i64 @strncmp(i8* %106, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i32 3)
%108 = icmp eq i64 %107, 0
br i1 %108, label %109, label %114
109: ; preds = %105
%110 = call i32 (...) @cdiv()
%111 = call i32 (...) @cpeek()
%112 = call i32 @terminal_writeint(i32 %111)
%113 = call i32 @terminal_putchar(i8 signext 10)
br label %126
114: ; preds = %105
%115 = load i8*, i8** %3
%116 = call i64 @strncmp(i8* %115, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i32 3)
%117 = icmp eq i64 %116, 0
br i1 %117, label %118, label %123
118: ; preds = %114
%119 = call i32 (...) @crdiv()
%120 = call i32 (...) @cpeek()
%121 = call i32 @terminal_writeint(i32 %120)
%122 = call i32 @terminal_putchar(i8 signext 10)
br label %125
123: ; preds = %114
%124 = call i32 @terminal_writestring(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0))
br label %125
125: ; preds = %123, %118
br label %126
126: ; preds = %125, %109
br label %127
127: ; preds = %126, %100
br label %128
128: ; preds = %127, %91
br label %129
129: ; preds = %128, %82
br label %130
130: ; preds = %129, %73
br label %131
131: ; preds = %130, %64
br label %132
132: ; preds = %131, %56
br label %133
133: ; preds = %132, %46
br label %134
134: ; preds = %133, %35
br label %135
135: ; preds = %134, %29
br label %136
136: ; preds = %135, %19
br label %137
137: ; preds = %136, %10
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"echo \00"
@.str.1 = [8 x i8] c"serial \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [6 x i8] c"clear\00"
@.str.4 = [5 x i8] c"hex \00"
@.str.5 = [6 x i8] c"push \00"
@.str.6 = [5 x i8] c"peek\00"
@.str.7 = [4 x i8] c"pop\00"
@.str.8 = [4 x i8] c"add\00"
@.str.9 = [5 x i8] c"mult\00"
@.str.10 = [4 x i8] c"sub\00"
@.str.11 = [5 x i8] c"rsub\00"
@.str.12 = [4 x i8] c"div\00"
@.str.13 = [5 x i8] c"rdiv\00"
@.str.14 = [24 x i8] c"Command not recognized\0A\00"
define void @io_process(i8* %0, i32 %1) {
%3 = tail call i32 @terminal_putchar(i8 signext 10)
%4 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %0, i64 5
%8 = tail call i32 @terminal_writestring(i8* %7)
%9 = tail call i32 @terminal_putchar(i8 signext 10)
br label %103
10: ; preds = %2
%11 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 7)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = tail call i32 @serial_writestring(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%15 = getelementptr inbounds i8, i8* %0, i64 7
%16 = tail call i32 @serial_writestring(i8* %15)
%17 = tail call i32 @serial_writestring(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %103
18: ; preds = %10
%19 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 5)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = tail call i32 (...) @terminal_clear()
br label %103
23: ; preds = %18
%24 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %31
26: ; preds = %23
%27 = getelementptr inbounds i8, i8* %0, i64 4
%28 = add nsw i32 %1, -4
%29 = tail call i32 @terminal_hexstring(i8* %27, i32 %28)
%30 = tail call i32 @terminal_putchar(i8 signext 10)
br label %103
31: ; preds = %23
%32 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 5)
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %38
34: ; preds = %31
%35 = getelementptr inbounds i8, i8* %0, i64 5
%36 = tail call i32 @stoi(i8* %35)
%37 = tail call i32 @cpush(i32 %36)
br label %103
38: ; preds = %31
%39 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 4)
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %45
41: ; preds = %38
%42 = tail call i32 (...) @cpeek()
%43 = tail call i32 @terminal_writeint(i32 %42)
%44 = tail call i32 @terminal_putchar(i8 signext 10)
br label %103
45: ; preds = %38
%46 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %53
48: ; preds = %45
%49 = tail call i32 (...) @cpeek()
%50 = tail call i32 @terminal_writeint(i32 %49)
%51 = tail call i32 (...) @cpop()
%52 = tail call i32 @terminal_putchar(i8 signext 10)
br label %103
53: ; preds = %45
%54 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %61
56: ; preds = %53
%57 = tail call i32 (...) @cadd()
%58 = tail call i32 (...) @cpeek()
%59 = tail call i32 @terminal_writeint(i32 %58)
%60 = tail call i32 @terminal_putchar(i8 signext 10)
br label %103
61: ; preds = %53
%62 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 3)
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %69
64: ; preds = %61
%65 = tail call i32 (...) @cmult()
%66 = tail call i32 (...) @cpeek()
%67 = tail call i32 @terminal_writeint(i32 %66)
%68 = tail call i32 @terminal_putchar(i8 signext 10)
br label %103
69: ; preds = %61
%70 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %77
72: ; preds = %69
%73 = tail call i32 (...) @csub()
%74 = tail call i32 (...) @cpeek()
%75 = tail call i32 @terminal_writeint(i32 %74)
%76 = tail call i32 @terminal_putchar(i8 signext 10)
br label %103
77: ; preds = %69
%78 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 3)
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %85
80: ; preds = %77
%81 = tail call i32 (...) @crsub()
%82 = tail call i32 (...) @cpeek()
%83 = tail call i32 @terminal_writeint(i32 %82)
%84 = tail call i32 @terminal_putchar(i8 signext 10)
br label %103
85: ; preds = %77
%86 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i32 3)
%87 = icmp eq i64 %86, 0
br i1 %87, label %88, label %93
88: ; preds = %85
%89 = tail call i32 (...) @cdiv()
%90 = tail call i32 (...) @cpeek()
%91 = tail call i32 @terminal_writeint(i32 %90)
%92 = tail call i32 @terminal_putchar(i8 signext 10)
br label %103
93: ; preds = %85
%94 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i32 3)
%95 = icmp eq i64 %94, 0
br i1 %95, label %96, label %101
96: ; preds = %93
%97 = tail call i32 (...) @crdiv()
%98 = tail call i32 (...) @cpeek()
%99 = tail call i32 @terminal_writeint(i32 %98)
%100 = tail call i32 @terminal_putchar(i8 signext 10)
br label %103
101: ; preds = %93
%102 = tail call i32 @terminal_writestring(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0))
br label %103
103: ; preds = %13, %26, %41, %56, %72, %88, %101, %96, %80, %64, %48, %34, %21, %6
ret void
}