#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*/ addch(char);
int /*<<< orphan*/ anykey(int, int);
int /*<<< orphan*/ curs_set(int);
int /*<<< orphan*/ displayMenu();
char getch();
scalar_t__ iscorrect(int, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ mvprintw(int, int, char *, ...);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char **getNamePlayers(int num, int **metric) {
  int i, j;
  char c, temp[9];
  char **names = (char **)malloc(num * sizeof(char *));
  for (i = 0; i < num; i++) {
    curs_set(1);
    for (;;) {
      displayMenu();
      mvprintw(18, 2, "Note: Maximum symbol length is 8 characters.");
      mvprintw(10, 2, "Enter the symbol for player %d: ", i + 1);
      for (j = 0; j < 8;) {
        c = getch();
        if (c == '\n')
          break;
        else if (c == 7 || c == 127) {
          mvprintw(10, 32, "        ");
          j = j ? j - 1 : 0;
        } else if (j >= 8)
          continue;
        else {
          addch(c);
          temp[j] = c;
          j++;
        }
        temp[j] = '\0';
        mvprintw(10, 33, "%s", temp);
      }
      for (;;) {
        curs_set(1);
        displayMenu();
        mvprintw(18, 2, "Note: Maximum symbol length is 8 characters.");
        mvprintw(10, 2, "Enter the symbol for player %d: %s", i + 1, temp);
        mvprintw(
            12, 2,
            "Choose a volumetric whole (1), halves (2), thirds (3): ", i + 1);
        c = getch();
        if (c != '\n')
          addch(c);
        if (c == '1') {
          (*metric)[i] = 1;
          break;
        } else if (c == '2') {
          (*metric)[i] = 2;
          break;
        } else if (c == '3') {
          (*metric)[i] = 3;
          break;
        } else if (c == '\n')
          mvprintw(14, 2, "Invalid input: No input given.");
        else
          mvprintw(14, 2, "Invalid input: Not a proper volumetric.");
        anykey(20, 2);
      }
      if (iscorrect(14, 2))
        break;
      anykey(20, 2);
    }
    names[i] = (char *)malloc(strlen(temp) * sizeof(char));
    strcpy(names[i], temp);
    anykey(20, 2);
    mvprintw(10, 33, "        ");
  }
  return names;
}


x86 assembly (clang, -O0):
<getNamePlayers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1508 <getNamePlayers+0x368>
mov    $0x1,%edi
call   10b0 <curs_set@plt>
mov    $0x0,%al
call   1040 <displayMenu@plt>
mov    $0x12,%edi
mov    $0x2,%esi
lea    0xe09(%rip),%rdx
mov    $0x0,%al
call   10c0 <mvprintw@plt>
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    $0xa,%edi
mov    $0x2,%esi
lea    0xe18(%rip),%rdx
mov    $0x0,%al
call   10c0 <mvprintw@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    1308 <getNamePlayers+0x168>
mov    $0x0,%al
call   1090 <getch@plt>
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0xa,%eax
jne    1249 <getNamePlayers+0xa9>
jmp    1308 <getNamePlayers+0x168>
movsbl -0x19(%rbp),%eax
cmp    $0x7,%eax
je     1263 <getNamePlayers+0xc3>
movsbl -0x19(%rbp),%eax
cmp    $0x7f,%eax
jne    12a8 <getNamePlayers+0x108>
mov    $0xa,%edi
mov    $0x20,%esi
lea    0xdda(%rip),%rdx
mov    $0x0,%al
call   10c0 <mvprintw@plt>
cmpl   $0x0,-0x18(%rbp)
je     1293 <getNamePlayers+0xf3>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    129d <getNamePlayers+0xfd>
xor    %eax,%eax
mov    %eax,-0x34(%rbp)
jmp    129d <getNamePlayers+0xfd>
mov    -0x34(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    12d9 <getNamePlayers+0x139>
cmpl   $0x8,-0x18(%rbp)
jl     12b7 <getNamePlayers+0x117>
jmp    1223 <getNamePlayers+0x83>
movsbl -0x19(%rbp),%edi
call   1080 <addch@plt>
mov    -0x19(%rbp),%cl
movslq -0x18(%rbp),%rax
mov    %cl,-0x22(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12d9 <getNamePlayers+0x139>
jmp    12de <getNamePlayers+0x13e>
movslq -0x18(%rbp),%rax
movb   $0x0,-0x22(%rbp,%rax,1)
lea    -0x22(%rbp),%rcx
mov    $0xa,%edi
mov    $0x21,%esi
lea    0xd7b(%rip),%rdx
mov    $0x0,%al
call   10c0 <mvprintw@plt>
jmp    1223 <getNamePlayers+0x83>
jmp    130d <getNamePlayers+0x16d>
mov    $0x1,%edi
call   10b0 <curs_set@plt>
mov    $0x0,%al
call   1040 <displayMenu@plt>
mov    $0x12,%edi
mov    $0x2,%esi
lea    0xcd1(%rip),%rdx
mov    $0x0,%al
call   10c0 <mvprintw@plt>
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
lea    -0x22(%rbp),%r8
mov    $0xa,%edi
mov    $0x2,%esi
lea    0xd06(%rip),%rdx
mov    $0x0,%al
call   10c0 <mvprintw@plt>
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    $0xc,%edi
mov    $0x2,%esi
lea    0xd0b(%rip),%rdx
mov    $0x0,%al
call   10c0 <mvprintw@plt>
mov    $0x0,%al
call   1090 <getch@plt>
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0xa,%eax
je     1396 <getNamePlayers+0x1f6>
movsbl -0x19(%rbp),%edi
call   1080 <addch@plt>
movsbl -0x19(%rbp),%eax
cmp    $0x31,%eax
jne    13ba <getNamePlayers+0x21a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movslq -0x14(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
jmp    1467 <getNamePlayers+0x2c7>
movsbl -0x19(%rbp),%eax
cmp    $0x32,%eax
jne    13de <getNamePlayers+0x23e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movslq -0x14(%rbp),%rcx
movl   $0x2,(%rax,%rcx,4)
jmp    1467 <getNamePlayers+0x2c7>
movsbl -0x19(%rbp),%eax
cmp    $0x33,%eax
jne    1402 <getNamePlayers+0x262>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movslq -0x14(%rbp),%rcx
movl   $0x3,(%rax,%rcx,4)
jmp    1467 <getNamePlayers+0x2c7>
movsbl -0x19(%rbp),%eax
cmp    $0xa,%eax
jne    142c <getNamePlayers+0x28c>
mov    $0xe,%edi
mov    $0x2,%esi
lea    0xc92(%rip),%rdx
mov    $0x0,%al
call   10c0 <mvprintw@plt>
jmp    1444 <getNamePlayers+0x2a4>
mov    $0xe,%edi
mov    $0x2,%esi
lea    0xc94(%rip),%rdx
mov    $0x0,%al
call   10c0 <mvprintw@plt>
jmp    1449 <getNamePlayers+0x2a9>
jmp    144e <getNamePlayers+0x2ae>
jmp    1453 <getNamePlayers+0x2b3>
mov    $0x14,%edi
mov    $0x2,%esi
call   1060 <anykey@plt>
jmp    130d <getNamePlayers+0x16d>
mov    $0xe,%edi
mov    $0x2,%esi
call   10a0 <iscorrect@plt>
cmp    $0x0,%rax
je     1485 <getNamePlayers+0x2e5>
jmp    1499 <getNamePlayers+0x2f9>
mov    $0x14,%edi
mov    $0x2,%esi
call   1060 <anykey@plt>
jmp    11df <getNamePlayers+0x3f>
lea    -0x22(%rbp),%rdi
call   1050 <strlen@plt>
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x22(%rbp),%rsi
call   1030 <strcpy@plt>
mov    $0x14,%edi
mov    $0x2,%esi
call   1060 <anykey@plt>
mov    $0xa,%edi
mov    $0x21,%esi
lea    0xb5b(%rip),%rdx
mov    $0x0,%al
call   10c0 <mvprintw@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c9 <getNamePlayers+0x29>
mov    -0x30(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNamePlayers>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,0x28(%rsp)
mov    %edi,%ebx
lea    0x0(,%rbx,8),%edi
call   1070 <malloc@plt>
mov    %rax,0x8(%rsp)
test   %ebx,%ebx
jle    142b <getNamePlayers+0x28b>
mov    %ebx,%eax
mov    %rax,0x20(%rsp)
lea    0xe24(%rip),%rbp
lea    0x17(%rsp),%r14
lea    0xe92(%rip),%r15
lea    0xec3(%rip),%r12
xor    %ebx,%ebx
jmp    1258 <getNamePlayers+0xb8>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    %eax,%edi
call   1070 <malloc@plt>
mov    0x8(%rsp),%rcx
mov    %rax,(%rcx,%rbx,8)
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    $0x14,%edi
mov    $0x2,%esi
call   1060 <anykey@plt>
mov    $0xa,%edi
mov    $0x21,%esi
lea    0xe0b(%rip),%rdx
xor    %eax,%eax
call   10c0 <mvprintw@plt>
mov    %r13,%rbx
cmp    0x20(%rsp),%r13
je     142b <getNamePlayers+0x28b>
mov    $0x1,%edi
call   10b0 <curs_set@plt>
mov    %rbx,0x30(%rsp)
lea    0x1(%rbx),%r13
nopl   0x0(%rax,%rax,1)
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <displayMenu@plt>
mov    $0x12,%edi
mov    $0x2,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   10c0 <mvprintw@plt>
mov    $0xa,%edi
mov    $0x2,%esi
lea    0xd8f(%rip),%rdx
mov    %r13d,%ecx
xor    %eax,%eax
call   10c0 <mvprintw@plt>
jmp    12fb <getNamePlayers+0x15b>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
mov    $0x20,%esi
lea    0xd8d(%rip),%rdx
xor    %eax,%eax
call   10c0 <mvprintw@plt>
sub    $0x1,%ebx
mov    $0x0,%eax
cmovb  %eax,%ebx
movslq %ebx,%rbp
movb   $0x0,0x17(%rsp,%rbp,1)
mov    $0xa,%edi
mov    $0x21,%esi
lea    0xd8b(%rip),%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   10c0 <mvprintw@plt>
cmp    $0x8,%ebp
jge    1330 <getNamePlayers+0x190>
xor    %eax,%eax
call   1090 <getch@plt>
cmp    $0x7,%al
je     12b0 <getNamePlayers+0x110>
mov    %eax,%ebp
cmp    $0x7f,%al
je     12b0 <getNamePlayers+0x110>
cmp    $0xa,%bpl
je     1330 <getNamePlayers+0x190>
movsbl %bpl,%edi
call   1080 <addch@plt>
movslq %ebx,%rax
mov    %bpl,0x17(%rsp,%rax,1)
add    $0x1,%ebx
jmp    12d3 <getNamePlayers+0x133>
nopl   0x0(%rax,%rax,1)
lea    0xcc9(%rip),%rbp
jmp    1360 <getNamePlayers+0x1c0>
nopl   0x0(%rax)
mov    $0xe,%edi
mov    $0x2,%esi
xor    %eax,%eax
call   10c0 <mvprintw@plt>
mov    $0x14,%edi
mov    $0x2,%esi
call   1060 <anykey@plt>
mov    $0x1,%edi
call   10b0 <curs_set@plt>
xor    %eax,%eax
call   1040 <displayMenu@plt>
mov    $0x12,%edi
mov    $0x2,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   10c0 <mvprintw@plt>
mov    $0xa,%edi
mov    $0x2,%esi
lea    0xcc1(%rip),%rdx
mov    %r13d,%ecx
mov    %r14,%r8
xor    %eax,%eax
call   10c0 <mvprintw@plt>
mov    $0xc,%edi
mov    $0x2,%esi
mov    %r15,%rdx
mov    %r13d,%ecx
xor    %eax,%eax
call   10c0 <mvprintw@plt>
xor    %eax,%eax
call   1090 <getch@plt>
mov    %r12,%rdx
cmp    $0xa,%al
je     1340 <getNamePlayers+0x1a0>
mov    %eax,%ebx
movsbl %al,%edi
call   1080 <addch@plt>
add    $0xcf,%bl
lea    0xcf1(%rip),%rdx
cmp    $0x3,%bl
jae    1340 <getNamePlayers+0x1a0>
movzbl %bl,%eax
add    $0x1,%eax
mov    0x28(%rsp),%rcx
mov    (%rcx),%rcx
mov    0x30(%rsp),%rbx
mov    %eax,(%rcx,%rbx,4)
mov    $0xe,%edi
mov    $0x2,%esi
call   10a0 <iscorrect@plt>
test   %rax,%rax
jne    1200 <getNamePlayers+0x60>
mov    $0x14,%edi
mov    $0x2,%esi
call   1060 <anykey@plt>
jmp    1270 <getNamePlayers+0xd0>
mov    0x8(%rsp),%rax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [45 x i8] c"Note: Maximum symbol length is 8 characters.\00"
@.str.1 = [33 x i8] c"Enter the symbol for player %d: \00"
@.str.2 = [9 x i8] c" \00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [35 x i8] c"Enter the symbol for player %d: %s\00"
@.str.5 = [56 x i8] c"Choose a volumetric whole (1), halves (2), thirds (3): \00"
@.str.6 = [31 x i8] c"Invalid input: No input given.\00"
@.str.7 = [40 x i8] c"Invalid input: Not a proper volumetric.\00"
define i8** @getNamePlayers(i32 %0, i32** %1) {
%3 = alloca i32
%4 = alloca i32**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
%8 = alloca [9 x i8]
%9 = alloca i8**
store i32 %0, i32* %3
store i32** %1, i32*** %4
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = mul i64 %11, 8
%13 = trunc i64 %12 to i32
%14 = call i64 @malloc(i32 %13)
%15 = inttoptr i64 %14 to i8**
store i8** %15, i8*** %9
store i32 0, i32* %5
br label %16
16: ; preds = %165, %2
%17 = load i32, i32* %5
%18 = load i32, i32* %3
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %168
20: ; preds = %16
%21 = call i32 @curs_set(i32 1)
br label %22
22: ; preds = %142, %20
%23 = call i32 (...) @displayMenu()
%24 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 18, i32 2, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
%27 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %26)
store i32 0, i32* %6
br label %28
28: ; preds = %70, %58, %22
%29 = load i32, i32* %6
%30 = icmp slt i32 %29, 8
br i1 %30, label %31, label %76
31: ; preds = %28
%32 = call signext i8 (...) @getch()
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 10
br i1 %35, label %36, label %37
36: ; preds = %31
br label %76
37: ; preds = %31
%38 = load i8, i8* %7
%39 = sext i8 %38 to i32
%40 = icmp eq i32 %39, 7
br i1 %40, label %45, label %41
41: ; preds = %37
%42 = load i8, i8* %7
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 127
br i1 %44, label %45, label %55
45: ; preds = %41, %37
%46 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%47 = load i32, i32* %6
%48 = icmp ne i32 %47, 0
br i1 %48, label %49, label %52
49: ; preds = %45
%50 = load i32, i32* %6
%51 = sub nsw i32 %50, 1
br label %53
52: ; preds = %45
br label %53
53: ; preds = %52, %49
%54 = phi i32 [ %51, %49 ], [ 0, %52 ]
store i32 %54, i32* %6
br label %69
55: ; preds = %41
%56 = load i32, i32* %6
%57 = icmp sge i32 %56, 8
br i1 %57, label %58, label %59
58: ; preds = %55
br label %28
59: ; preds = %55
%60 = load i8, i8* %7
%61 = call i32 @addch(i8 signext %60)
%62 = load i8, i8* %7
%63 = load i32, i32* %6
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 %64
store i8 %62, i8* %65
%66 = load i32, i32* %6
%67 = add nsw i32 %66, 1
store i32 %67, i32* %6
br label %68
68: ; preds = %59
br label %69
69: ; preds = %68, %53
br label %70
70: ; preds = %69
%71 = load i32, i32* %6
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 %72
store i8 0, i8* %73
%74 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 0
%75 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %74)
br label %28
76: ; preds = %36, %28
br label %77
77: ; preds = %136, %76
%78 = call i32 @curs_set(i32 1)
%79 = call i32 (...) @displayMenu()
%80 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 18, i32 2, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%81 = load i32, i32* %5
%82 = add nsw i32 %81, 1
%83 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 0
%84 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %82, i8* %83)
%85 = load i32, i32* %5
%86 = add nsw i32 %85, 1
%87 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 12, i32 2, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0), i32 %86)
%88 = call signext i8 (...) @getch()
store i8 %88, i8* %7
%89 = load i8, i8* %7
%90 = sext i8 %89 to i32
%91 = icmp ne i32 %90, 10
br i1 %91, label %92, label %95
92: ; preds = %77
%93 = load i8, i8* %7
%94 = call i32 @addch(i8 signext %93)
br label %95
95: ; preds = %92, %77
%96 = load i8, i8* %7
%97 = sext i8 %96 to i32
%98 = icmp eq i32 %97, 49
br i1 %98, label %99, label %105
99: ; preds = %95
%100 = load i32**, i32*** %4
%101 = load i32*, i32** %100
%102 = load i32, i32* %5
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds i32, i32* %101, i64 %103
store i32 1, i32* %104
br label %138
105: ; preds = %95
%106 = load i8, i8* %7
%107 = sext i8 %106 to i32
%108 = icmp eq i32 %107, 50
br i1 %108, label %109, label %115
109: ; preds = %105
%110 = load i32**, i32*** %4
%111 = load i32*, i32** %110
%112 = load i32, i32* %5
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i32, i32* %111, i64 %113
store i32 2, i32* %114
br label %138
115: ; preds = %105
%116 = load i8, i8* %7
%117 = sext i8 %116 to i32
%118 = icmp eq i32 %117, 51
br i1 %118, label %119, label %125
119: ; preds = %115
%120 = load i32**, i32*** %4
%121 = load i32*, i32** %120
%122 = load i32, i32* %5
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i32, i32* %121, i64 %123
store i32 3, i32* %124
br label %138
125: ; preds = %115
%126 = load i8, i8* %7
%127 = sext i8 %126 to i32
%128 = icmp eq i32 %127, 10
br i1 %128, label %129, label %131
129: ; preds = %125
%130 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 14, i32 2, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
br label %133
131: ; preds = %125
%132 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 14, i32 2, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0))
br label %133
133: ; preds = %131, %129
br label %134
134: ; preds = %133
br label %135
135: ; preds = %134
br label %136
136: ; preds = %135
%137 = call i32 @anykey(i32 20, i32 2)
br label %77
138: ; preds = %119, %109, %99
%139 = call i64 @iscorrect(i32 14, i32 2)
%140 = icmp ne i64 %139, 0
br i1 %140, label %141, label %142
141: ; preds = %138
br label %144
142: ; preds = %138
%143 = call i32 @anykey(i32 20, i32 2)
br label %22
144: ; preds = %141
%145 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 0
%146 = call i32 @strlen(i8* %145)
%147 = sext i32 %146 to i64
%148 = mul i64 %147, 1
%149 = trunc i64 %148 to i32
%150 = call i64 @malloc(i32 %149)
%151 = inttoptr i64 %150 to i8*
%152 = load i8**, i8*** %9
%153 = load i32, i32* %5
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds i8*, i8** %152, i64 %154
store i8* %151, i8** %155
%156 = load i8**, i8*** %9
%157 = load i32, i32* %5
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds i8*, i8** %156, i64 %158
%160 = load i8*, i8** %159
%161 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 0
%162 = call i32 @strcpy(i8* %160, i8* %161)
%163 = call i32 @anykey(i32 20, i32 2)
%164 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 33, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %165
165: ; preds = %144
%166 = load i32, i32* %5
%167 = add nsw i32 %166, 1
store i32 %167, i32* %5
br label %16
168: ; preds = %16
%169 = load i8**, i8*** %9
ret i8** %169
}

LLVM IR (-O2):
@.str = [45 x i8] c"Note: Maximum symbol length is 8 characters.\00"
@.str.1 = [33 x i8] c"Enter the symbol for player %d: \00"
@.str.2 = [9 x i8] c" \00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [35 x i8] c"Enter the symbol for player %d: %s\00"
@.str.5 = [56 x i8] c"Choose a volumetric whole (1), halves (2), thirds (3): \00"
@.str.6 = [31 x i8] c"Invalid input: No input given.\00"
@.str.7 = [40 x i8] c"Invalid input: Not a proper volumetric.\00"
define i8** @getNamePlayers(i32 %0, i32** nocapture %1) {
%3 = alloca [9 x i8]
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%5 = shl i32 %0, 3
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8**
%8 = icmp sgt i32 %0, 0
br i1 %8, label %9, label %74
9: ; preds = %2
%10 = zext i32 %0 to i64
br label %11
11: ; preds = %9, %65
%12 = phi i64 [ 0, %9 ], [ %14, %65 ]
%13 = call i32 @curs_set(i32 1)
%14 = add nuw nsw i64 %12, 1
%15 = trunc i64 %14 to i32
br label %16
16: ; preds = %63, %11
%17 = call i32 (...) @displayMenu()
%18 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 18, i32 2, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%19 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %15)
br label %20
20: ; preds = %16, %33
%21 = phi i32 [ 0, %16 ], [ %34, %33 ]
%22 = call signext i8 (...) @getch()
switch i8 %22, label %28 [
i8 10, label %39
i8 127, label %23
i8 7, label %23
]
23: ; preds = %20, %20
%24 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%25 = icmp eq i32 %21, 0
%26 = add nsw i32 %21, -1
%27 = select i1 %25, i32 0, i32 %26
br label %33
28: ; preds = %20
%29 = call i32 @addch(i8 signext %22)
%30 = sext i32 %21 to i64
%31 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 %30
store i8 %22, i8* %31
%32 = add nsw i32 %21, 1
br label %33
33: ; preds = %23, %28
%34 = phi i32 [ %27, %23 ], [ %32, %28 ]
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 %35
store i8 0, i8* %36
%37 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %4)
%38 = icmp slt i32 %34, 8
br i1 %38, label %20, label %39
39: ; preds = %20, %33
br label %40
40: ; preds = %39, %52
%41 = call i32 @curs_set(i32 1)
%42 = call i32 (...) @displayMenu()
%43 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 18, i32 2, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%44 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %15, i8* %4)
%45 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 12, i32 2, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0), i32 %15)
%46 = call signext i8 (...) @getch()
%47 = icmp eq i8 %46, 10
br i1 %47, label %52, label %48
48: ; preds = %40
%49 = call i32 @addch(i8 signext %46)
%50 = add i8 %46, -49
%51 = icmp ult i8 %50, 3
br i1 %51, label %56, label %52
52: ; preds = %48, %40
%53 = phi i8* [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), %40 ], [ getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0), %48 ]
%54 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 14, i32 2, i8* %53)
%55 = call i32 @anykey(i32 20, i32 2)
br label %40
56: ; preds = %48
%57 = zext i8 %50 to i32
%58 = add nuw nsw i32 %57, 1
%59 = load i32*, i32** %1
%60 = getelementptr inbounds i32, i32* %59, i64 %12
store i32 %58, i32* %60
%61 = call i64 @iscorrect(i32 14, i32 2)
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %56
%64 = call i32 @anykey(i32 20, i32 2)
br label %16
65: ; preds = %56
%66 = call i32 @strlen(i8* %4)
%67 = call i64 @malloc(i32 %66)
%68 = inttoptr i64 %67 to i8*
%69 = getelementptr inbounds i8*, i8** %7, i64 %12
store i8* %68, i8** %69
%70 = call i32 @strcpy(i8* %68, i8* %4)
%71 = call i32 @anykey(i32 20, i32 2)
%72 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 33, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%73 = icmp eq i64 %14, %10
br i1 %73, label %74, label %11
74: ; preds = %65, %2
ret i8** %7
}