#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*/ LC_ALL;
int checkFirstCharacter(char);
int /*<<< orphan*/ clearBufffer();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ validateOcurrences(char *, int, int);
int main() {
  setlocale(LC_ALL, "Portuguese");
  int i, j, uniqueKey = 0, quantityM = 0, quantityN = 0;
  printf("******************************************************* \n");
  printf("*** WELCOME TO RIFELI'S DATA PROCESSOR (RU 2136681) ***\n");
  printf("******************************************************* \n\n");
  while (1 == 1) {
    printf(
        "Please, insert the rows quantities on matrix (between 1 and 10):\n");
    scanf("%d", &quantityM);
    printf("Please, insert the columns quantities on matrix (between 1 and "
           "10):\n");
    scanf("%d", &quantityN);
    if (!(quantityM >= 1 && quantityM <= 10) ||
        !(quantityN >= 1 && quantityN <= 10)) {
      printf("Invalid number to rows or columns. Try again!\n");
      continue;
    }
    break;
  }
  char characters[quantityM][quantityN];
  char uniqueCharacters[quantityM * quantityN];
  for (i = 0; i < quantityN; i++) {
    for (j = 0; j < quantityM; j++) {
      printf("Please, insert one character (to %d column and %d row): \n",
             i + 1, j + 1);
      clearBufffer();
      scanf("%s", &characters[i][j]);
      uniqueCharacters[uniqueKey] = characters[i][j];
      uniqueKey++;
    }
  }
  printf("******************************************************* \n");
  printf("CLOUD WORD:\n");
  validateOcurrences(uniqueCharacters, quantityN, quantityM);
  printf("******************************************************* \n\n");
  int calculation = checkFirstCharacter(uniqueCharacters[0]);
  printf("First character is: %c and the calculation result is: %d\n",
         uniqueCharacters[0], calculation);
  printf("******************************************************* \n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
lea    0xe81(%rip),%rsi
call   1060 <setlocale@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf23(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    0xf14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
cmpl   $0x1,-0x14(%rbp)
jl     122b <main+0xcb>
cmpl   $0xa,-0x14(%rbp)
jg     122b <main+0xcb>
cmpl   $0x1,-0x18(%rbp)
jl     122b <main+0xcb>
cmpl   $0xa,-0x18(%rbp)
jle    123e <main+0xde>
lea    0xf11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c3 <main+0x63>
jmp    1243 <main+0xe3>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
mov    %rax,-0x58(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,%rsi
imul   %rax,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x50(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
imul   %ecx,%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    135d <main+0x1fd>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    134a <main+0x1ea>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0xc(%rbp),%edx
add    $0x1,%edx
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <clearBufffer@plt>
mov    -0x58(%rbp),%rcx
mov    -0x50(%rbp),%rsi
movslq -0x8(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
add    %rax,%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
mov    -0x58(%rbp),%rsi
mov    -0x50(%rbp),%rcx
mov    -0x48(%rbp),%rax
movslq -0x8(%rbp),%rdx
imul   %rsi,%rdx
add    %rdx,%rcx
movslq -0xc(%rbp),%rdx
mov    (%rcx,%rdx,1),%dl
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12b9 <main+0x159>
jmp    134f <main+0x1ef>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12a6 <main+0x146>
lea    0xca7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1050 <validateOcurrences@plt>
lea    0xcef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%rax
movsbl (%rax),%edi
call   1080 <checkFirstCharacter@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%rax
mov    %ecx,-0x3c(%rbp)
movsbl (%rax),%esi
mov    -0x3c(%rbp),%edx
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
lea    0xe6f(%rip),%rsi
call   1070 <setlocale@plt>
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
lea    0x100b(%rip),%rdi
call   1030 <puts@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb9(%rip),%rdi
call   1030 <puts@plt>
lea    0xeee(%rip),%r14
lea    0xe35(%rip),%rbx
lea    0xf21(%rip),%r12
lea    -0x2c(%rbp),%r13
lea    0xf5a(%rip),%r15
jmp    11f8 <main+0x88>
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
lea    -0x30(%rbp),%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
mov    -0x30(%rbp),%eax
lea    -0x1(%rax),%ecx
cmp    $0x9,%ecx
ja     11f0 <main+0x80>
mov    -0x2c(%rbp),%edi
test   %edi,%edi
jle    11f0 <main+0x80>
cmp    $0xb,%edi
jge    11f0 <main+0x80>
mov    %rsp,-0x48(%rbp)
imul   %rdi,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%r9d
mov    %r9d,%edx
imul   %eax,%edx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rsi
sub    %rdx,%rsi
mov    %rsi,-0x40(%rbp)
mov    %rsi,%rsp
test   %r9d,%r9d
jle    1318 <main+0x1a8>
lea    0xd89(%rip),%r13
xor    %r14d,%r14d
xor    %ecx,%ecx
mov    %rdi,-0x50(%rbp)
jmp    129b <main+0x12b>
movslq %r9d,%rdx
add    %rdi,%r15
cmp    %rdx,%r14
jge    1318 <main+0x1a8>
add    $0x1,%r14
test   %eax,%eax
jle    1290 <main+0x120>
mov    %ecx,-0x34(%rbp)
movslq %ecx,%rax
add    -0x40(%rbp),%rax
mov    %rax,-0x58(%rbp)
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rbx
add    $0x1,%r12
mov    %r13,%rdi
mov    %r14d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <clearBufffer@plt>
lea    (%r15,%rbx,1),%rsi
lea    0xd5f(%rip),%rdi
xor    %eax,%eax
call   1080 <scanf@plt>
movzbl (%r15,%rbx,1),%eax
mov    -0x58(%rbp),%rcx
mov    %al,(%rcx,%rbx,1)
movslq -0x30(%rbp),%rax
cmp    %rax,%r12
jl     12c0 <main+0x150>
mov    -0x34(%rbp),%ecx
add    %r12d,%ecx
mov    -0x2c(%rbp),%r9d
mov    -0x50(%rbp),%rdi
jmp    1290 <main+0x120>
lea    0xe97(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xe42(%rip),%rdi
call   1030 <puts@plt>
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x40(%rbp),%rbx
mov    %rbx,%rdi
call   1060 <validateOcurrences@plt>
lea    0xe30(%rip),%rdi
call   1030 <puts@plt>
movsbl (%rbx),%edi
call   1090 <checkFirstCharacter@plt>
movsbl (%rbx),%esi
lea    0xce8(%rip),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    -0x48(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [58 x i8] c"******************************************************* \0A\00"
@.str.2 = [57 x i8] c"*** WELCOME TO RIFELI'S DATA PROCESSOR (RU 2136681) ***\0A\00"
@.str.3 = [59 x i8] c"******************************************************* \0A\0A\00"
@.str.4 = [66 x i8] c"Please, insert the rows quantities on matrix (between 1 and 10):\0A\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [69 x i8] c"Please, insert the columns quantities on matrix (between 1 and 10):\0A\00"
@.str.7 = [47 x i8] c"Invalid number to rows or columns. Try again!\0A\00"
@.str.8 = [58 x i8] c"Please, insert one character (to %d column and %d row): \0A\00"
@.str.9 = [3 x i8] c"%s\00"
@.str.10 = [13 x i8] c"CLOUD WORD:\0A\00"
@.str.11 = [58 x i8] c"First character is: %c and the calculation result is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i32
store i32 0, i32* %1
%12 = load i32, i32* @LC_ALL
%13 = call i32 @setlocale(i32 %12, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0))
br label %17
17: ; preds = %0, %33
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %5)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0))
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %6)
%22 = load i32, i32* %5
%23 = icmp sge i32 %22, 1
br i1 %23, label %24, label %33
24: ; preds = %17
%25 = load i32, i32* %5
%26 = icmp sle i32 %25, 10
br i1 %26, label %27, label %33
27: ; preds = %24
%28 = load i32, i32* %6
%29 = icmp sge i32 %28, 1
br i1 %29, label %30, label %33
30: ; preds = %27
%31 = load i32, i32* %6
%32 = icmp sle i32 %31, 10
br i1 %32, label %35, label %33
33: ; preds = %30, %27, %24, %17
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
br label %17
35: ; preds = %30
br label %36
36: ; preds = %35
%37 = load i32, i32* %5
%38 = zext i32 %37 to i64
%39 = load i32, i32* %6
%40 = zext i32 %39 to i64
%41 = call i8* @llvm.stacksave()
store i8* %41, i8** %7
%42 = mul nuw i64 %38, %40
%43 = alloca i8, i64 %42
store i64 %38, i64* %8
store i64 %40, i64* %9
%44 = load i32, i32* %5
%45 = load i32, i32* %6
%46 = mul nsw i32 %44, %45
%47 = zext i32 %46 to i64
%48 = alloca i8, i64 %47
store i64 %47, i64* %10
store i32 0, i32* %2
br label %49
49: ; preds = %90, %36
%50 = load i32, i32* %2
%51 = load i32, i32* %6
%52 = icmp slt i32 %50, %51
br i1 %52, label %53, label %93
53: ; preds = %49
store i32 0, i32* %3
br label %54
54: ; preds = %86, %53
%55 = load i32, i32* %3
%56 = load i32, i32* %5
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %89
58: ; preds = %54
%59 = load i32, i32* %2
%60 = add nsw i32 %59, 1
%61 = load i32, i32* %3
%62 = add nsw i32 %61, 1
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0), i32 %60, i32 %62)
%64 = call i32 (...) @clearBufffer()
%65 = load i32, i32* %2
%66 = sext i32 %65 to i64
%67 = mul nsw i64 %66, %40
%68 = getelementptr inbounds i8, i8* %43, i64 %67
%69 = load i32, i32* %3
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8, i8* %68, i64 %70
%72 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %71)
%73 = load i32, i32* %2
%74 = sext i32 %73 to i64
%75 = mul nsw i64 %74, %40
%76 = getelementptr inbounds i8, i8* %43, i64 %75
%77 = load i32, i32* %3
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8, i8* %76, i64 %78
%80 = load i8, i8* %79
%81 = load i32, i32* %4
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i8, i8* %48, i64 %82
store i8 %80, i8* %83
%84 = load i32, i32* %4
%85 = add nsw i32 %84, 1
store i32 %85, i32* %4
br label %86
86: ; preds = %58
%87 = load i32, i32* %3
%88 = add nsw i32 %87, 1
store i32 %88, i32* %3
br label %54
89: ; preds = %54
br label %90
90: ; preds = %89
%91 = load i32, i32* %2
%92 = add nsw i32 %91, 1
store i32 %92, i32* %2
br label %49
93: ; preds = %49
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%96 = load i32, i32* %6
%97 = load i32, i32* %5
%98 = call i32 @validateOcurrences(i8* %48, i32 %96, i32 %97)
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0))
%100 = getelementptr inbounds i8, i8* %48, i64 0
%101 = load i8, i8* %100
%102 = call i32 @checkFirstCharacter(i8 signext %101)
store i32 %102, i32* %11
%103 = getelementptr inbounds i8, i8* %48, i64 0
%104 = load i8, i8* %103
%105 = sext i8 %104 to i32
%106 = load i32, i32* %11
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0), i32 %105, i32 %106)
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
%109 = load i8*, i8** %7
%110 = load i32, i32* %1
ret i32 %110
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.8 = [58 x i8] c"Please, insert one character (to %d column and %d row): \0A\00"
@.str.9 = [3 x i8] c"%s\00"
@.str.11 = [58 x i8] c"First character is: %c and the calculation result is: %d\0A\00"
@str.12 = [56 x i8] c"*** WELCOME TO RIFELI'S DATA PROCESSOR (RU 2136681) ***\00"
@str.14 = [65 x i8] c"Please, insert the rows quantities on matrix (between 1 and 10):\00"
@str.15 = [68 x i8] c"Please, insert the columns quantities on matrix (between 1 and 10):\00"
@str.16 = [46 x i8] c"Invalid number to rows or columns. Try again!\00"
@str.18 = [12 x i8] c"CLOUD WORD:\00"
@str.19 = [58 x i8] c"******************************************************* \0A\00"
@str.20 = [57 x i8] c"******************************************************* \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @LC_ALL
%4 = tail call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%6 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.12, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.19, i64 0, i64 0))
br label %10
10: ; preds = %23, %0
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.14, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.15, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %2)
%15 = load i32, i32* %1
%16 = add i32 %15, -1
%17 = icmp ult i32 %16, 10
%18 = load i32, i32* %2
%19 = icmp sgt i32 %18, 0
%20 = select i1 %17, i1 %19, i1 false
%21 = icmp slt i32 %18, 11
%22 = select i1 %20, i1 %21, i1 false
br i1 %22, label %25, label %23
23: ; preds = %10
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.16, i64 0, i64 0))
br label %10
25: ; preds = %10
%26 = zext i32 %15 to i64
%27 = zext i32 %18 to i64
%28 = call i8* @llvm.stacksave()
%29 = mul nuw nsw i64 %27, %26
%30 = alloca i8, i64 %29
%31 = load i32, i32* %1
%32 = load i32, i32* %2
%33 = mul nsw i32 %32, %31
%34 = zext i32 %33 to i64
%35 = alloca i8, i64 %34
%36 = icmp sgt i32 %32, 0
br i1 %36, label %37, label %73
37: ; preds = %25, %67
%38 = phi i32 [ %68, %67 ], [ %32, %25 ]
%39 = phi i32 [ %69, %67 ], [ %31, %25 ]
%40 = phi i64 [ %43, %67 ], [ 0, %25 ]
%41 = phi i32 [ %70, %67 ], [ 0, %25 ]
%42 = icmp sgt i32 %39, 0
%43 = add nuw nsw i64 %40, 1
br i1 %42, label %44, label %67
44: ; preds = %37
%45 = mul nuw nsw i64 %40, %27
%46 = getelementptr inbounds i8, i8* %30, i64 %45
%47 = sext i32 %41 to i64
%48 = trunc i64 %43 to i32
br label %49
49: ; preds = %44, %49
%50 = phi i64 [ %47, %44 ], [ %60, %49 ]
%51 = phi i64 [ 0, %44 ], [ %52, %49 ]
%52 = add nuw nsw i64 %51, 1
%53 = trunc i64 %52 to i32
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0), i32 %48, i32 %53)
%55 = call i32 (...) @clearBufffer()
%56 = getelementptr inbounds i8, i8* %46, i64 %51
%57 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %56)
%58 = load i8, i8* %56
%59 = getelementptr inbounds i8, i8* %35, i64 %50
store i8 %58, i8* %59
%60 = add nsw i64 %50, 1
%61 = load i32, i32* %1
%62 = sext i32 %61 to i64
%63 = icmp slt i64 %52, %62
br i1 %63, label %49, label %64
64: ; preds = %49
%65 = trunc i64 %60 to i32
%66 = load i32, i32* %2
br label %67
67: ; preds = %37, %64
%68 = phi i32 [ %66, %64 ], [ %38, %37 ]
%69 = phi i32 [ %61, %64 ], [ %39, %37 ]
%70 = phi i32 [ %65, %64 ], [ %41, %37 ]
%71 = sext i32 %68 to i64
%72 = icmp slt i64 %43, %71
br i1 %72, label %37, label %73
73: ; preds = %67, %25
%74 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.20, i64 0, i64 0))
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.18, i64 0, i64 0))
%76 = load i32, i32* %2
%77 = load i32, i32* %1
%78 = call i32 @validateOcurrences(i8* %35, i32 %76, i32 %77)
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.19, i64 0, i64 0))
%80 = load i8, i8* %35
%81 = call i32 @checkFirstCharacter(i8 signext %80)
%82 = load i8, i8* %35
%83 = sext i8 %82 to i32
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0), i32 %83, i32 %81)
%85 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.20, i64 0, i64 0))
ret i32 0
}