#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 */
struct Processor {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ checkAllRegistersAreValid(char **);
int getRegisterNumber(char *);
int getRegisterValue(struct Processor *, int);
int /*<<< orphan*/ printInvalidCommandMessage();
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
void printReg(struct Processor *proc, char **tokens) {
  int start = 0;
  int end = 32 - 1;
  if (strcmp("-r", tokens[0]) == 0) {
    start = getRegisterNumber(tokens[1]);
    end = getRegisterNumber(tokens[2]);
    tokens++;
    if (!start < end && !checkAllRegistersAreValid(tokens + 1)) {
      printInvalidCommandMessage();
      return;
    }
    if (tokens[2] != NULL) {
      printInvalidCommandMessage();
      return;
    }
  } else if (strcmp("-m", tokens[0]) == 0) {
    tokens++;
    if (!checkAllRegistersAreValid(tokens)) {
      printInvalidCommandMessage();
      return;
    }
    int i = 0;
    while (tokens[i] != NULL) {
      printf("%s = %i \t", tokens[i],
             getRegisterValue(proc, getRegisterNumber(tokens[i])));
      i++;
      if (i % 8 == 0)
        printf("      \n");
    }
    printf("\n (JVG)");
    return;
  } else if (!strcmp("-a", tokens[0]) == 0) {
    printInvalidCommandMessage();
    return;
  }
  int x = start;
  printf("%i,%i\n", x, end);
  for (int i = 0; i < end % 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (x > end)
        break;
      printf("$%i = %i \t", x, getRegisterValue(proc, x));
      x++;
    }
    printf("      \n");
  }
}


x86 assembly (clang, -O0):
<printReg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1f,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe74(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1220 <printReg+0xc0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <getRegisterNumber@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1080 <getRegisterNumber@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x14(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    -0x18(%rbp),%eax
jge    1200 <printReg+0xa0>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1070 <checkAllRegistersAreValid@plt>
cmp    $0x0,%eax
jne    1200 <printReg+0xa0>
mov    $0x0,%al
call   1040 <printInvalidCommandMessage@plt>
jmp    1403 <printReg+0x2a3>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x10(%rax)
je     121b <printReg+0xbb>
mov    $0x0,%al
call   1040 <printInvalidCommandMessage@plt>
jmp    1403 <printReg+0x2a3>
jmp    134c <printReg+0x1ec>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdd5(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    130c <printReg+0x1ac>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <checkAllRegistersAreValid@plt>
cmp    $0x0,%eax
jne    1267 <printReg+0x107>
mov    $0x0,%al
call   1040 <printInvalidCommandMessage@plt>
jmp    1403 <printReg+0x2a3>
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     12f9 <printReg+0x199>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1080 <getRegisterNumber@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%esi
call   1030 <getRegisterValue@plt>
mov    -0x30(%rbp),%rsi
mov    %eax,%edx
lea    0xd44(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    12f4 <printReg+0x194>
lea    0xd23(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    126e <printReg+0x10e>
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1403 <printReg+0x2a3>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xd06(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jne    1342 <printReg+0x1e2>
mov    $0x0,%al
call   1040 <printInvalidCommandMessage@plt>
jmp    1403 <printReg+0x2a3>
jmp    1347 <printReg+0x1e7>
jmp    134c <printReg+0x1ec>
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xcc4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x3c(%rbp),%eax
cmp    %edx,%eax
jge    1403 <printReg+0x2a3>
movl   $0x0,-0x28(%rbp)
cmpl   $0x8,-0x28(%rbp)
jge    13e7 <printReg+0x287>
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    13ab <printReg+0x24b>
jmp    13e7 <printReg+0x287>
mov    -0x20(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%esi
call   1030 <getRegisterValue@plt>
mov    -0x40(%rbp),%esi
mov    %eax,%edx
lea    0xc61(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1390 <printReg+0x230>
lea    0xc22(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    136d <printReg+0x20d>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printReg>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %rdi,%r12
mov    (%rsi),%rsi
lea    0xe75(%rip),%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     11ed <printReg+0x7d>
mov    (%r15),%rsi
lea    0xe64(%rip),%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     12e2 <printReg+0x172>
mov    (%r15),%rsi
lea    0xe61(%rip),%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    134e <printReg+0x1de>
lea    0xe4f(%rip),%rdi
xor    %ebp,%ebp
mov    $0x1f,%eax
mov    %rax,(%rsp)
xor    %esi,%esi
mov    $0x1f,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x7,%r13d
jmp    1258 <printReg+0xe8>
mov    0x8(%r15),%rdi
call   1090 <getRegisterNumber@plt>
mov    %eax,%ebp
mov    0x10(%r15),%rdi
call   1090 <getRegisterNumber@plt>
xor    %ecx,%ecx
test   %ebp,%ebp
sete   %cl
mov    %rax,(%rsp)
cmp    %ecx,%eax
jle    1221 <printReg+0xb1>
lea    0x10(%r15),%rdi
call   1080 <checkAllRegistersAreValid@plt>
test   %eax,%eax
je     134e <printReg+0x1de>
cmpq   $0x0,0x18(%r15)
jne    134e <printReg+0x1de>
lea    0xde8(%rip),%rdi
mov    %ebp,%esi
mov    (%rsp),%rbx
mov    %ebx,%edx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x7(%rbx),%eax
test   %ebx,%ebx
cmovns %ebx,%eax
and    $0xfffffff8,%eax
mov    %ebx,%r13d
sub    %eax,%r13d
test   %r13d,%r13d
jle    12d3 <printReg+0x163>
lea    0xdc3(%rip),%rbx
xor    %r15d,%r15d
jmp    1285 <printReg+0x115>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xdb6(%rip),%rdi
call   1040 <puts@plt>
add    $0x1,%r15d
cmp    %r13d,%r15d
je     12d3 <printReg+0x163>
mov    (%rsp),%rax
mov    %eax,%r14d
sub    %ebp,%r14d
jl     1270 <printReg+0x100>
cmp    $0x7,%r14d
mov    $0x7,%eax
cmovae %eax,%r14d
add    $0x1,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r12,%rdi
mov    %ebp,%esi
call   1030 <getRegisterValue@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%ebp
add    $0xffffffff,%r14d
jne    12b0 <printReg+0x140>
jmp    1270 <printReg+0x100>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x8(%r15),%rbx
mov    %rbx,%rdi
call   1080 <checkAllRegistersAreValid@plt>
test   %eax,%eax
je     134e <printReg+0x1de>
mov    (%rbx),%rbp
test   %rbp,%rbp
je     1363 <printReg+0x1f3>
mov    $0x1,%ebx
lea    0xd00(%rip),%r13
lea    0xd20(%rip),%r14
jmp    131e <printReg+0x1ae>
nop
mov    0x8(%r15,%rbx,8),%rbp
add    $0x1,%rbx
test   %rbp,%rbp
je     1363 <printReg+0x1f3>
mov    %rbp,%rdi
call   1090 <getRegisterNumber@plt>
mov    %r12,%rdi
mov    %eax,%esi
call   1030 <getRegisterValue@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
test   $0x7,%bl
jne    1310 <printReg+0x1a0>
mov    %r14,%rdi
call   1040 <puts@plt>
jmp    1310 <printReg+0x1a0>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <printInvalidCommandMessage@plt>
lea    0xca6(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <printf@plt>

LLVM IR (-O0):
%struct.Processor = type { i32 }
@.str = [3 x i8] c"-r\00"
@.str.1 = [3 x i8] c"-m\00"
@.str.2 = [10 x i8] c"%s = %i \09\00"
@.str.3 = [8 x i8] c" \0A\00"
@.str.4 = [8 x i8] c"\0A (JVG)\00"
@.str.5 = [3 x i8] c"-a\00"
@.str.6 = [7 x i8] c"%i,%i\0A\00"
@.str.7 = [11 x i8] c"$%i = %i \09\00"
define void @printReg(%struct.Processor* %0, i8** %1) {
%3 = alloca %struct.Processor*
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.Processor* %0, %struct.Processor** %3
store i8** %1, i8*** %4
store i32 0, i32* %5
store i32 31, i32* %6
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %48
16: ; preds = %2
%17 = load i8**, i8*** %4
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @getRegisterNumber(i8* %19)
store i32 %20, i32* %5
%21 = load i8**, i8*** %4
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
%24 = call i32 @getRegisterNumber(i8* %23)
store i32 %24, i32* %6
%25 = load i8**, i8*** %4
%26 = getelementptr inbounds i8*, i8** %25, i32 1
store i8** %26, i8*** %4
%27 = load i32, i32* %5
%28 = icmp ne i32 %27, 0
%29 = xor i1 %28, true
%30 = zext i1 %29 to i32
%31 = load i32, i32* %6
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %40
33: ; preds = %16
%34 = load i8**, i8*** %4
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = call i32 @checkAllRegistersAreValid(i8** %35)
%37 = icmp ne i32 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %33
%39 = call i32 (...) @printInvalidCommandMessage()
br label %143
40: ; preds = %33, %16
%41 = load i8**, i8*** %4
%42 = getelementptr inbounds i8*, i8** %41, i64 2
%43 = load i8*, i8** %42
%44 = icmp ne i8* %43, null
br i1 %44, label %45, label %47
45: ; preds = %40
%46 = call i32 (...) @printInvalidCommandMessage()
br label %143
47: ; preds = %40
br label %108
48: ; preds = %2
%49 = load i8**, i8*** %4
%50 = getelementptr inbounds i8*, i8** %49, i64 0
%51 = load i8*, i8** %50
%52 = call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %51)
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %95
54: ; preds = %48
%55 = load i8**, i8*** %4
%56 = getelementptr inbounds i8*, i8** %55, i32 1
store i8** %56, i8*** %4
%57 = load i8**, i8*** %4
%58 = call i32 @checkAllRegistersAreValid(i8** %57)
%59 = icmp ne i32 %58, 0
br i1 %59, label %62, label %60
60: ; preds = %54
%61 = call i32 (...) @printInvalidCommandMessage()
br label %143
62: ; preds = %54
store i32 0, i32* %7
br label %63
63: ; preds = %92, %62
%64 = load i8**, i8*** %4
%65 = load i32, i32* %7
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i8*, i8** %64, i64 %66
%68 = load i8*, i8** %67
%69 = icmp ne i8* %68, null
br i1 %69, label %70, label %93
70: ; preds = %63
%71 = load i8**, i8*** %4
%72 = load i32, i32* %7
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8*, i8** %71, i64 %73
%75 = load i8*, i8** %74
%76 = load %struct.Processor*, %struct.Processor** %3
%77 = load i8**, i8*** %4
%78 = load i32, i32* %7
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds i8*, i8** %77, i64 %79
%81 = load i8*, i8** %80
%82 = call i32 @getRegisterNumber(i8* %81)
%83 = call i32 @getRegisterValue(%struct.Processor* %76, i32 %82)
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %75, i32 %83)
%85 = load i32, i32* %7
%86 = add nsw i32 %85, 1
store i32 %86, i32* %7
%87 = load i32, i32* %7
%88 = srem i32 %87, 8
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %92
90: ; preds = %70
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %92
92: ; preds = %90, %70
br label %63
93: ; preds = %63
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %143
95: ; preds = %48
%96 = load i8**, i8*** %4
%97 = getelementptr inbounds i8*, i8** %96, i64 0
%98 = load i8*, i8** %97
%99 = call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %98)
%100 = icmp ne i64 %99, 0
%101 = xor i1 %100, true
%102 = zext i1 %101 to i32
%103 = icmp eq i32 %102, 0
br i1 %103, label %104, label %106
104: ; preds = %95
%105 = call i32 (...) @printInvalidCommandMessage()
br label %143
106: ; preds = %95
br label %107
107: ; preds = %106
br label %108
108: ; preds = %107, %47
%109 = load i32, i32* %5
store i32 %109, i32* %8
%110 = load i32, i32* %8
%111 = load i32, i32* %6
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %110, i32 %111)
store i32 0, i32* %9
br label %113
113: ; preds = %140, %108
%114 = load i32, i32* %9
%115 = load i32, i32* %6
%116 = srem i32 %115, 8
%117 = icmp slt i32 %114, %116
br i1 %117, label %118, label %143
118: ; preds = %113
store i32 0, i32* %10
br label %119
119: ; preds = %135, %118
%120 = load i32, i32* %10
%121 = icmp slt i32 %120, 8
br i1 %121, label %122, label %138
122: ; preds = %119
%123 = load i32, i32* %8
%124 = load i32, i32* %6
%125 = icmp sgt i32 %123, %124
br i1 %125, label %126, label %127
126: ; preds = %122
br label %138
127: ; preds = %122
%128 = load i32, i32* %8
%129 = load %struct.Processor*, %struct.Processor** %3
%130 = load i32, i32* %8
%131 = call i32 @getRegisterValue(%struct.Processor* %129, i32 %130)
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %128, i32 %131)
%133 = load i32, i32* %8
%134 = add nsw i32 %133, 1
store i32 %134, i32* %8
br label %135
135: ; preds = %127
%136 = load i32, i32* %10
%137 = add nsw i32 %136, 1
store i32 %137, i32* %10
br label %119
138: ; preds = %126, %119
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %140
140: ; preds = %138
%141 = load i32, i32* %9
%142 = add nsw i32 %141, 1
store i32 %142, i32* %9
br label %113
143: ; preds = %38, %45, %60, %93, %104, %113
ret void
}

LLVM IR (-O2):
%struct.Processor = type { i32 }
@.str = [3 x i8] c"-r\00"
@.str.1 = [3 x i8] c"-m\00"
@.str.2 = [10 x i8] c"%s = %i \09\00"
@.str.4 = [8 x i8] c"\0A (JVG)\00"
@.str.5 = [3 x i8] c"-a\00"
@.str.6 = [7 x i8] c"%i,%i\0A\00"
@.str.7 = [11 x i8] c"$%i = %i \09\00"
@str.8 = [7 x i8] c" \00"
define void @printReg(%struct.Processor* %0, i8** %1) {
%3 = load i8*, i8** %1
%4 = tail call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %27
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @getRegisterNumber(i8* %8)
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 @getRegisterNumber(i8* %11)
%13 = icmp eq i32 %9, 0
%14 = zext i1 %13 to i32
%15 = icmp sgt i32 %12, %14
br i1 %15, label %16, label %21
16: ; preds = %6
%17 = tail call i32 @checkAllRegistersAreValid(i8** %10)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = tail call i32 (...) @printInvalidCommandMessage()
br label %93
21: ; preds = %16, %6
%22 = getelementptr inbounds i8*, i8** %1, i64 3
%23 = load i8*, i8** %22
%24 = icmp eq i8* %23, null
br i1 %24, label %65, label %25
25: ; preds = %21
%26 = tail call i32 (...) @printInvalidCommandMessage()
br label %93
27: ; preds = %2
%28 = load i8*, i8** %1
%29 = tail call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %28)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %57
31: ; preds = %27
%32 = getelementptr inbounds i8*, i8** %1, i64 1
%33 = tail call i32 @checkAllRegistersAreValid(i8** %32)
%34 = icmp eq i32 %33, 0
br i1 %34, label %38, label %35
35: ; preds = %31
%36 = load i8*, i8** %32
%37 = icmp eq i8* %36, null
br i1 %37, label %55, label %40
38: ; preds = %31
%39 = tail call i32 (...) @printInvalidCommandMessage()
br label %93
40: ; preds = %35, %51
%41 = phi i64 [ %46, %51 ], [ 0, %35 ]
%42 = phi i8* [ %53, %51 ], [ %36, %35 ]
%43 = tail call i32 @getRegisterNumber(i8* %42)
%44 = tail call i32 @getRegisterValue(%struct.Processor* %0, i32 %43)
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %42, i32 %44)
%46 = add nuw i64 %41, 1
%47 = and i64 %46, 7
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %40
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.8, i64 0, i64 0))
br label %51
51: ; preds = %49, %40
%52 = getelementptr inbounds i8*, i8** %32, i64 %46
%53 = load i8*, i8** %52
%54 = icmp eq i8* %53, null
br i1 %54, label %55, label %40
55: ; preds = %51, %35
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %93
57: ; preds = %27
%58 = load i8*, i8** %1
%59 = tail call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %58)
%60 = icmp eq i64 %59, 0
br i1 %60, label %61, label %63
61: ; preds = %57
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 0, i32 31)
br label %69
63: ; preds = %57
%64 = tail call i32 (...) @printInvalidCommandMessage()
br label %93
65: ; preds = %21
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %9, i32 %12)
%67 = srem i32 %12, 8
%68 = icmp sgt i32 %67, 0
br i1 %68, label %69, label %93
69: ; preds = %61, %65
%70 = phi i32 [ 7, %61 ], [ %67, %65 ]
%71 = phi i32 [ 31, %61 ], [ %12, %65 ]
%72 = phi i32 [ 0, %61 ], [ %9, %65 ]
br label %73
73: ; preds = %69, %88
%74 = phi i32 [ %91, %88 ], [ 0, %69 ]
%75 = phi i32 [ %89, %88 ], [ %72, %69 ]
%76 = icmp slt i32 %71, %75
br i1 %76, label %88, label %77
77: ; preds = %73
%78 = sub i32 %71, %75
%79 = call i32 @llvm.umin.i32(i32 %78, i32 7)
br label %80
80: ; preds = %77, %80
%81 = phi i32 [ %86, %80 ], [ 0, %77 ]
%82 = phi i32 [ %85, %80 ], [ %75, %77 ]
%83 = tail call i32 @getRegisterValue(%struct.Processor* %0, i32 %82)
%84 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %82, i32 %83)
%85 = add nsw i32 %82, 1
%86 = add nuw nsw i32 %81, 1
%87 = icmp eq i32 %81, %79
br i1 %87, label %88, label %80
88: ; preds = %80, %73
%89 = phi i32 [ %75, %73 ], [ %85, %80 ]
%90 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.8, i64 0, i64 0))
%91 = add nuw nsw i32 %74, 1
%92 = icmp eq i32 %91, %70
br i1 %92, label %93, label %73
93: ; preds = %88, %65, %63, %55, %38, %25, %19
ret void
}