#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
char *strtok(char *, char *);
void getSize(int *numSS, int *numTotal, int *nTotal, int *LargestCompID,
             int *numPermsArray[], int *nComments, char *cxFile,
             char *countFile, int quiet) {
  int j;
  char line[10000];
  char *tok;
  char tokseps[] = " \t\n";
  int CompID;
  FILE *fp;
  if ((fp = fopen(countFile, "r")) == NULL) {
    if (quiet == 0) {
      printf("Error in opening file %s!\n", countFile);
      printf("\nExiting....\n\n");
    }
    exit(5);
  }
  while (fgets(line, 10000, fp) != NULL &&
         (line[0] == '%' || line[0] == '\0' || line[0] == '\n'))
    ;
  *numSS = 1;
  while (fgets(line, 10000, fp) != NULL && line[0] != '\0' && line[0] != '\n') {
    (*numSS)++;
  }
  fclose(fp);
  (*numSS)--;
  if ((fp = fopen(cxFile, "r")) == NULL) {
    if (quiet == 0) {
      printf("Error in opening file %s!\n", cxFile);
      printf("\nExiting....\n\n");
    }
    exit(6);
  }
  *nComments = 0;
  while (fgets(line, 10000, fp) != NULL &&
         (line[0] == '%' || line[0] == '\0' || line[0] == '\n')) {
    (*nComments)++;
  }
  *nTotal = 1;
  *numTotal = 1;
  while (fgets(line, 10000, fp) != NULL && line[0] != '\0' && line[0] != '\n') {
    if (line[0] == '%')
      continue;
    CompID = atoi(strtok(line, tokseps));
    if (CompID > *numTotal) {
      *numTotal = CompID;
    }
    (*nTotal)++;
  }
  fclose(fp);
  *LargestCompID = *numTotal;
  (*numPermsArray) = (int *)malloc((*numTotal) * sizeof(int));
  for (j = 0; j < (*numTotal); j++) {
    (*numPermsArray)[j] = 0;
  }
  if ((fp = fopen(cxFile, "r")) == NULL) {
    if (quiet == 0) {
      printf("Error in opening file %s!\n", cxFile);
      printf("\nExiting....\n\n");
    }
    exit(6);
  }
  for (j = 0; j < *nComments; j++) {
    fgets(line, 10000, fp);
  }
  while (fgets(line, 10000, fp) != NULL && line[0] != '\0' && line[0] != '\n') {
    tok = strtok(line, tokseps);
    if (tok[0] == '%')
      continue;
    CompID = atoi(tok) - 1;
    ((*numPermsArray)[CompID])++;
  }
  fclose(fp);
  for (j = 0; j < *numTotal; j++) {
    if ((*numPermsArray)[j] == 0) {
      if (quiet == 0) {
        printf("Input cx file must contain all complex ID numbers between\n");
        printf("1 and the total number of complexes!\n\n");
        printf("Exiting....\n\n");
      }
      exit(7);
    }
  }
}


x86 assembly (clang, -O0):
<getSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2770,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    0xe4c(%rip),%eax
mov    %eax,-0x275c(%rbp)
mov    0x18(%rbp),%rdi
lea    0xe3f(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x2768(%rbp)
cmp    $0x0,%rax
jne    120f <getSize+0x8f>
cmpl   $0x0,0x20(%rbp)
jne    1205 <getSize+0x85>
mov    0x18(%rbp),%rsi
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x5,%edi
call   10a0 <exit@plt>
jmp    1214 <getSize+0x94>
lea    -0x2750(%rbp),%rdi
mov    -0x2768(%rbp),%rdx
mov    $0x2710,%esi
call   1050 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x2769(%rbp)
je     1290 <getSize+0x110>
movsbl -0x2750(%rbp),%ecx
mov    $0x1,%al
cmp    $0x25,%ecx
mov    %al,-0x276a(%rbp)
je     1284 <getSize+0x104>
movsbl -0x2750(%rbp),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x276a(%rbp)
je     1284 <getSize+0x104>
movsbl -0x2750(%rbp),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x276a(%rbp)
mov    -0x276a(%rbp),%al
mov    %al,-0x2769(%rbp)
mov    -0x2769(%rbp),%al
test   $0x1,%al
jne    12a3 <getSize+0x123>
jmp    12a8 <getSize+0x128>
jmp    1214 <getSize+0x94>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
lea    -0x2750(%rbp),%rdi
mov    -0x2768(%rbp),%rdx
mov    $0x2710,%esi
call   1050 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x276b(%rbp)
je     130a <getSize+0x18a>
movsbl -0x2750(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x276b(%rbp)
je     130a <getSize+0x18a>
movsbl -0x2750(%rbp),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x276b(%rbp)
mov    -0x276b(%rbp),%al
test   $0x1,%al
jne    131d <getSize+0x19d>
jmp    132d <getSize+0x1ad>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    12b2 <getSize+0x132>
mov    -0x2768(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    0x10(%rbp),%rdi
lea    0xcb5(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x2768(%rbp)
cmp    $0x0,%rax
jne    1399 <getSize+0x219>
cmpl   $0x0,0x20(%rbp)
jne    138f <getSize+0x20f>
mov    0x10(%rbp),%rsi
lea    0xc8c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x6,%edi
call   10a0 <exit@plt>
mov    -0x30(%rbp),%rax
movl   $0x0,(%rax)
lea    -0x2750(%rbp),%rdi
mov    -0x2768(%rbp),%rdx
mov    $0x2710,%esi
call   1050 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x276c(%rbp)
je     141f <getSize+0x29f>
movsbl -0x2750(%rbp),%ecx
mov    $0x1,%al
cmp    $0x25,%ecx
mov    %al,-0x276d(%rbp)
je     1413 <getSize+0x293>
movsbl -0x2750(%rbp),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x276d(%rbp)
je     1413 <getSize+0x293>
movsbl -0x2750(%rbp),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x276d(%rbp)
mov    -0x276d(%rbp),%al
mov    %al,-0x276c(%rbp)
mov    -0x276c(%rbp),%al
test   $0x1,%al
jne    1432 <getSize+0x2b2>
jmp    1442 <getSize+0x2c2>
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    13a3 <getSize+0x223>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
lea    -0x2750(%rbp),%rdi
mov    -0x2768(%rbp),%rdx
mov    $0x2710,%esi
call   1050 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x276e(%rbp)
je     14ae <getSize+0x32e>
movsbl -0x2750(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x276e(%rbp)
je     14ae <getSize+0x32e>
movsbl -0x2750(%rbp),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x276e(%rbp)
mov    -0x276e(%rbp),%al
test   $0x1,%al
jne    14c1 <getSize+0x341>
jmp    1525 <getSize+0x3a5>
movsbl -0x2750(%rbp),%eax
cmp    $0x25,%eax
jne    14d6 <getSize+0x356>
jmp    1456 <getSize+0x2d6>
lea    -0x2750(%rbp),%rdi
lea    -0x275c(%rbp),%rsi
call   1080 <strtok@plt>
mov    %rax,%rdi
call   1090 <atoi@plt>
mov    %eax,-0x2760(%rbp)
mov    -0x2760(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    1515 <getSize+0x395>
mov    -0x2760(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    1456 <getSize+0x2d6>
mov    -0x2768(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    158f <getSize+0x40f>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
movslq -0x34(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1560 <getSize+0x3e0>
mov    0x10(%rbp),%rdi
lea    0xa6a(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x2768(%rbp)
cmp    $0x0,%rax
jne    15e4 <getSize+0x464>
cmpl   $0x0,0x20(%rbp)
jne    15da <getSize+0x45a>
mov    0x10(%rbp),%rsi
lea    0xa41(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xa4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x6,%edi
call   10a0 <exit@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x30(%rbp),%rcx
cmp    (%rcx),%eax
jge    1620 <getSize+0x4a0>
lea    -0x2750(%rbp),%rdi
mov    -0x2768(%rbp),%rdx
mov    $0x2710,%esi
call   1050 <fgets@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    15eb <getSize+0x46b>
jmp    1625 <getSize+0x4a5>
lea    -0x2750(%rbp),%rdi
mov    -0x2768(%rbp),%rdx
mov    $0x2710,%esi
call   1050 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x276f(%rbp)
je     167d <getSize+0x4fd>
movsbl -0x2750(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x276f(%rbp)
je     167d <getSize+0x4fd>
movsbl -0x2750(%rbp),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x276f(%rbp)
mov    -0x276f(%rbp),%al
test   $0x1,%al
jne    1690 <getSize+0x510>
jmp    16f3 <getSize+0x573>
lea    -0x2750(%rbp),%rdi
lea    -0x275c(%rbp),%rsi
call   1080 <strtok@plt>
mov    %rax,-0x2758(%rbp)
mov    -0x2758(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    16c2 <getSize+0x542>
jmp    1625 <getSize+0x4a5>
mov    -0x2758(%rbp),%rdi
call   1090 <atoi@plt>
sub    $0x1,%eax
mov    %eax,-0x2760(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
movslq -0x2760(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
jmp    1625 <getSize+0x4a5>
mov    -0x2768(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    177b <getSize+0x5fb>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
movslq -0x34(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1768 <getSize+0x5e8>
cmpl   $0x0,0x20(%rbp)
jne    175e <getSize+0x5de>
lea    0x8f5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x922(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x8cb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x7,%edi
call   10a0 <exit@plt>
jmp    176d <getSize+0x5ed>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1706 <getSize+0x586>
add    $0x2770,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSize>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2738,%rsp
mov    %r9,%r14
mov    %r8,0x18(%rsp)
mov    %rcx,0x10(%rsp)
mov    %rdx,0x8(%rsp)
mov    %rsi,%r15
mov    %rdi,%r12
mov    0x2778(%rsp),%rbp
movl   $0xa0920,0x4(%rsp)
lea    0xe30(%rip),%rsi
mov    %rbp,%rdi
call   1080 <fopen@plt>
test   %rax,%rax
je     156f <getSize+0x3df>
mov    %rax,%rbx
lea    0x20(%rsp),%rdi
mov    $0x2710,%esi
mov    %rax,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1236 <getSize+0xa6>
movabs $0x2000000401,%r13
lea    0x20(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
movzbl 0x20(%rsp),%eax
cmp    $0x25,%rax
ja     1236 <getSize+0xa6>
bt     %rax,%r13
jae    1236 <getSize+0xa6>
mov    %rbp,%rdi
mov    $0x2710,%esi
mov    %rbx,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
jne    1210 <getSize+0x80>
mov    0x2770(%rsp),%r13
movl   $0x1,(%r12)
lea    0x20(%rsp),%rdi
mov    $0x2710,%esi
mov    %rbx,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1297 <getSize+0x107>
mov    0x20(%rsp),%al
test   %al,%al
je     1297 <getSize+0x107>
cmp    $0xa,%al
je     1297 <getSize+0x107>
lea    0x20(%rsp),%rbp
xchg   %ax,%ax
addl   $0x1,(%r12)
mov    %rbp,%rdi
mov    $0x2710,%esi
mov    %rbx,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1297 <getSize+0x107>
movzbl 0x20(%rsp),%eax
test   %al,%al
je     1297 <getSize+0x107>
cmp    $0xa,%al
jne    1270 <getSize+0xe0>
mov    %rbx,%rdi
call   1040 <fclose@plt>
addl   $0xffffffff,(%r12)
lea    0xd55(%rip),%rsi
mov    %r13,%rdi
call   1080 <fopen@plt>
test   %rax,%rax
je     1539 <getSize+0x3a9>
mov    %rax,%r12
movl   $0x0,(%r14)
lea    0x20(%rsp),%rdi
mov    $0x2710,%esi
mov    %rax,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
mov    0x18(%rsp),%r13
je     132a <getSize+0x19a>
movabs $0x2000000401,%rbp
lea    0x20(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl 0x20(%rsp),%eax
cmp    $0x25,%rax
ja     132a <getSize+0x19a>
bt     %rax,%rbp
jae    132a <getSize+0x19a>
addl   $0x1,(%r14)
mov    %rbx,%rdi
mov    $0x2710,%esi
mov    %r12,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
jne    1300 <getSize+0x170>
mov    0x8(%rsp),%rax
movl   $0x1,(%rax)
movl   $0x1,(%r15)
lea    0x20(%rsp),%rdi
mov    $0x2710,%esi
mov    %r12,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     13b9 <getSize+0x229>
mov    0x20(%rsp),%al
test   %al,%al
je     13b9 <getSize+0x229>
cmp    $0xa,%al
je     13b9 <getSize+0x229>
lea    0x20(%rsp),%rbx
lea    0x4(%rsp),%rbp
nopl   0x0(%rax)
cmp    $0x25,%al
je     1397 <getSize+0x207>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1090 <strtok@plt>
mov    %rax,%rdi
call   10a0 <atoi@plt>
cmp    (%r15),%eax
jle    138f <getSize+0x1ff>
mov    %eax,(%r15)
mov    0x8(%rsp),%rax
addl   $0x1,(%rax)
mov    %rbx,%rdi
mov    $0x2710,%esi
mov    %r12,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     13b9 <getSize+0x229>
movzbl 0x20(%rsp),%eax
test   %al,%al
je     13b9 <getSize+0x229>
cmp    $0xa,%al
jne    1370 <getSize+0x1e0>
mov    %r12,%rdi
call   1040 <fclose@plt>
mov    (%r15),%eax
mov    0x10(%rsp),%rcx
mov    %eax,(%rcx)
mov    (%r15),%edi
shl    $0x2,%edi
call   1070 <malloc@plt>
mov    %rax,0x0(%r13)
cmpl   $0x0,(%r15)
jle    1403 <getSize+0x273>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movl   $0x0,(%rax,%rcx,4)
add    $0x1,%rcx
movslq (%r15),%rdx
cmp    %rdx,%rcx
jl     13f0 <getSize+0x260>
lea    0xbf6(%rip),%rsi
mov    0x2770(%rsp),%rdi
call   1080 <fopen@plt>
test   %rax,%rax
je     1539 <getSize+0x3a9>
mov    %rax,%rbp
cmpl   $0x0,(%r14)
jle    1448 <getSize+0x2b8>
xor    %ebx,%ebx
lea    0x20(%rsp),%r12
mov    %r12,%rdi
mov    $0x2710,%esi
mov    %rbp,%rdx
call   1060 <fgets@plt>
add    $0x1,%ebx
cmp    (%r14),%ebx
jl     1430 <getSize+0x2a0>
lea    0x20(%rsp),%rdi
mov    $0x2710,%esi
mov    %rbp,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     14c5 <getSize+0x335>
mov    0x20(%rsp),%al
test   %al,%al
je     14c5 <getSize+0x335>
cmp    $0xa,%al
je     14c5 <getSize+0x335>
lea    0x20(%rsp),%rbx
lea    0x4(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
mov    %r14,%rsi
call   1090 <strtok@plt>
cmpb   $0x25,(%rax)
je     14a3 <getSize+0x313>
mov    %rax,%rdi
call   10a0 <atoi@plt>
mov    0x0(%r13),%rcx
cltq
addl   $0x1,-0x4(%rcx,%rax,4)
mov    %rbx,%rdi
mov    $0x2710,%esi
mov    %rbp,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     14c5 <getSize+0x335>
movzbl 0x20(%rsp),%eax
test   %al,%al
je     14c5 <getSize+0x335>
cmp    $0xa,%al
jne    1480 <getSize+0x2f0>
mov    %rbp,%rdi
call   1040 <fclose@plt>
mov    (%r15),%eax
test   %eax,%eax
jle    14ef <getSize+0x35f>
mov    0x0(%r13),%rcx
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
cmpl   $0x0,(%rcx,%rdx,4)
je     1501 <getSize+0x371>
add    $0x1,%rdx
cmp    %rdx,%rax
jne    14e0 <getSize+0x350>
add    $0x2738,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmpl   $0x0,0x2780(%rsp)
jne    152f <getSize+0x39f>
lea    0xb0b(%rip),%rdi
call   1030 <puts@plt>
lea    0xb39(%rip),%rdi
call   1030 <puts@plt>
lea    0xb54(%rip),%rdi
call   1030 <puts@plt>
mov    $0x7,%edi
call   10b0 <exit@plt>
cmpl   $0x0,0x2780(%rsp)
jne    1565 <getSize+0x3d5>
lea    0xab8(%rip),%rdi
mov    0x2770(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xb1d(%rip),%rdi
call   1030 <puts@plt>
mov    $0x6,%edi
call   10b0 <exit@plt>
cmpl   $0x0,0x2780(%rsp)
jne    1596 <getSize+0x406>
lea    0xa82(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xaec(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@__const.getSize.tokseps = [4 x i8] c" \09\0A\00"
@.str = [2 x i8] c"r\00"
@.str.1 = [27 x i8] c"Error in opening file %s!\0A\00"
@.str.2 = [15 x i8] c"\0AExiting....\0A\0A\00"
@.str.3 = [59 x i8] c"Input cx file must contain all complex ID numbers between\0A\00"
@.str.4 = [39 x i8] c"1 and the total number of complexes!\0A\0A\00"
@.str.5 = [14 x i8] c"Exiting....\0A\0A\00"
define void @getSize(i32* %0, i32* %1, i32* %2, i32* %3, i32** %4, i32* %5, i8* %6, i8* %7, i32 %8) {
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32**
%15 = alloca i32*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i32
%19 = alloca i32
%20 = alloca [10000 x i8]
%21 = alloca i8*
%22 = alloca [4 x i8]
%23 = alloca i32
%24 = alloca i32*
store i32* %0, i32** %10
store i32* %1, i32** %11
store i32* %2, i32** %12
store i32* %3, i32** %13
store i32** %4, i32*** %14
store i32* %5, i32** %15
store i8* %6, i8** %16
store i8* %7, i8** %17
store i32 %8, i32* %18
%25 = bitcast [4 x i8]* %22 to i8*
%26 = load i8*, i8** %17
%27 = call i32* @fopen(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %27, i32** %24
%28 = icmp eq i32* %27, null
br i1 %28, label %29, label %38
29: ; preds = %9
%30 = load i32, i32* %18
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %36
32: ; preds = %29
%33 = load i8*, i8** %17
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %36
36: ; preds = %32, %29
%37 = call i32 @exit(i32 5)
unreachable
38: ; preds = %9
br label %39
39: ; preds = %63, %38
%40 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%41 = load i32*, i32** %24
%42 = call i32* @fgets(i8* %40, i32 10000, i32* %41)
%43 = icmp ne i32* %42, null
br i1 %43, label %44, label %61
44: ; preds = %39
%45 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = icmp eq i32 %47, 37
br i1 %48, label %59, label %49
49: ; preds = %44
%50 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = icmp eq i32 %52, 0
br i1 %53, label %59, label %54
54: ; preds = %49
%55 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = icmp eq i32 %57, 10
br label %59
59: ; preds = %54, %49, %44
%60 = phi i1 [ true, %49 ], [ true, %44 ], [ %58, %54 ]
br label %61
61: ; preds = %59, %39
%62 = phi i1 [ false, %39 ], [ %60, %59 ]
br i1 %62, label %63, label %64
63: ; preds = %61
br label %39
64: ; preds = %61
%65 = load i32*, i32** %10
store i32 1, i32* %65
br label %66
66: ; preds = %83, %64
%67 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%68 = load i32*, i32** %24
%69 = call i32* @fgets(i8* %67, i32 10000, i32* %68)
%70 = icmp ne i32* %69, null
br i1 %70, label %71, label %81
71: ; preds = %66
%72 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%73 = load i8, i8* %72
%74 = sext i8 %73 to i32
%75 = icmp ne i32 %74, 0
br i1 %75, label %76, label %81
76: ; preds = %71
%77 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = icmp ne i32 %79, 10
br label %81
81: ; preds = %76, %71, %66
%82 = phi i1 [ false, %71 ], [ false, %66 ], [ %80, %76 ]
br i1 %82, label %83, label %87
83: ; preds = %81
%84 = load i32*, i32** %10
%85 = load i32, i32* %84
%86 = add nsw i32 %85, 1
store i32 %86, i32* %84
br label %66
87: ; preds = %81
%88 = load i32*, i32** %24
%89 = call i32 @fclose(i32* %88)
%90 = load i32*, i32** %10
%91 = load i32, i32* %90
%92 = add nsw i32 %91, -1
store i32 %92, i32* %90
%93 = load i8*, i8** %16
%94 = call i32* @fopen(i8* %93, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %94, i32** %24
%95 = icmp eq i32* %94, null
br i1 %95, label %96, label %105
96: ; preds = %87
%97 = load i32, i32* %18
%98 = icmp eq i32 %97, 0
br i1 %98, label %99, label %103
99: ; preds = %96
%100 = load i8*, i8** %16
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %100)
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %103
103: ; preds = %99, %96
%104 = call i32 @exit(i32 6)
unreachable
105: ; preds = %87
%106 = load i32*, i32** %15
store i32 0, i32* %106
br label %107
107: ; preds = %131, %105
%108 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%109 = load i32*, i32** %24
%110 = call i32* @fgets(i8* %108, i32 10000, i32* %109)
%111 = icmp ne i32* %110, null
br i1 %111, label %112, label %129
112: ; preds = %107
%113 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%114 = load i8, i8* %113
%115 = sext i8 %114 to i32
%116 = icmp eq i32 %115, 37
br i1 %116, label %127, label %117
117: ; preds = %112
%118 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%119 = load i8, i8* %118
%120 = sext i8 %119 to i32
%121 = icmp eq i32 %120, 0
br i1 %121, label %127, label %122
122: ; preds = %117
%123 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%124 = load i8, i8* %123
%125 = sext i8 %124 to i32
%126 = icmp eq i32 %125, 10
br label %127
127: ; preds = %122, %117, %112
%128 = phi i1 [ true, %117 ], [ true, %112 ], [ %126, %122 ]
br label %129
129: ; preds = %127, %107
%130 = phi i1 [ false, %107 ], [ %128, %127 ]
br i1 %130, label %131, label %135
131: ; preds = %129
%132 = load i32*, i32** %15
%133 = load i32, i32* %132
%134 = add nsw i32 %133, 1
store i32 %134, i32* %132
br label %107
135: ; preds = %129
%136 = load i32*, i32** %12
store i32 1, i32* %136
%137 = load i32*, i32** %11
store i32 1, i32* %137
br label %138
138: ; preds = %173, %160, %135
%139 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%140 = load i32*, i32** %24
%141 = call i32* @fgets(i8* %139, i32 10000, i32* %140)
%142 = icmp ne i32* %141, null
br i1 %142, label %143, label %153
143: ; preds = %138
%144 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp ne i32 %146, 0
br i1 %147, label %148, label %153
148: ; preds = %143
%149 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%150 = load i8, i8* %149
%151 = sext i8 %150 to i32
%152 = icmp ne i32 %151, 10
br label %153
153: ; preds = %148, %143, %138
%154 = phi i1 [ false, %143 ], [ false, %138 ], [ %152, %148 ]
br i1 %154, label %155, label %177
155: ; preds = %153
%156 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%157 = load i8, i8* %156
%158 = sext i8 %157 to i32
%159 = icmp eq i32 %158, 37
br i1 %159, label %160, label %161
160: ; preds = %155
br label %138
161: ; preds = %155
%162 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%163 = getelementptr inbounds [4 x i8], [4 x i8]* %22, i64 0, i64 0
%164 = call i8* @strtok(i8* %162, i8* %163)
%165 = call i32 @atoi(i8* %164)
store i32 %165, i32* %23
%166 = load i32, i32* %23
%167 = load i32*, i32** %11
%168 = load i32, i32* %167
%169 = icmp sgt i32 %166, %168
br i1 %169, label %170, label %173
170: ; preds = %161
%171 = load i32, i32* %23
%172 = load i32*, i32** %11
store i32 %171, i32* %172
br label %173
173: ; preds = %170, %161
%174 = load i32*, i32** %12
%175 = load i32, i32* %174
%176 = add nsw i32 %175, 1
store i32 %176, i32* %174
br label %138
177: ; preds = %153
%178 = load i32*, i32** %24
%179 = call i32 @fclose(i32* %178)
%180 = load i32*, i32** %11
%181 = load i32, i32* %180
%182 = load i32*, i32** %13
store i32 %181, i32* %182
%183 = load i32*, i32** %11
%184 = load i32, i32* %183
%185 = sext i32 %184 to i64
%186 = mul i64 %185, 4
%187 = trunc i64 %186 to i32
%188 = call i64 @malloc(i32 %187)
%189 = inttoptr i64 %188 to i32*
%190 = load i32**, i32*** %14
store i32* %189, i32** %190
store i32 0, i32* %19
br label %191
191: ; preds = %202, %177
%192 = load i32, i32* %19
%193 = load i32*, i32** %11
%194 = load i32, i32* %193
%195 = icmp slt i32 %192, %194
br i1 %195, label %196, label %205
196: ; preds = %191
%197 = load i32**, i32*** %14
%198 = load i32*, i32** %197
%199 = load i32, i32* %19
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds i32, i32* %198, i64 %200
store i32 0, i32* %201
br label %202
202: ; preds = %196
%203 = load i32, i32* %19
%204 = add nsw i32 %203, 1
store i32 %204, i32* %19
br label %191
205: ; preds = %191
%206 = load i8*, i8** %16
%207 = call i32* @fopen(i8* %206, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %207, i32** %24
%208 = icmp eq i32* %207, null
br i1 %208, label %209, label %218
209: ; preds = %205
%210 = load i32, i32* %18
%211 = icmp eq i32 %210, 0
br i1 %211, label %212, label %216
212: ; preds = %209
%213 = load i8*, i8** %16
%214 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %213)
%215 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %216
216: ; preds = %212, %209
%217 = call i32 @exit(i32 6)
unreachable
218: ; preds = %205
store i32 0, i32* %19
br label %219
219: ; preds = %228, %218
%220 = load i32, i32* %19
%221 = load i32*, i32** %15
%222 = load i32, i32* %221
%223 = icmp slt i32 %220, %222
br i1 %223, label %224, label %231
224: ; preds = %219
%225 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%226 = load i32*, i32** %24
%227 = call i32* @fgets(i8* %225, i32 10000, i32* %226)
br label %228
228: ; preds = %224
%229 = load i32, i32* %19
%230 = add nsw i32 %229, 1
store i32 %230, i32* %19
br label %219
231: ; preds = %219
br label %232
232: ; preds = %259, %258, %231
%233 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%234 = load i32*, i32** %24
%235 = call i32* @fgets(i8* %233, i32 10000, i32* %234)
%236 = icmp ne i32* %235, null
br i1 %236, label %237, label %247
237: ; preds = %232
%238 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%239 = load i8, i8* %238
%240 = sext i8 %239 to i32
%241 = icmp ne i32 %240, 0
br i1 %241, label %242, label %247
242: ; preds = %237
%243 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%244 = load i8, i8* %243
%245 = sext i8 %244 to i32
%246 = icmp ne i32 %245, 10
br label %247
247: ; preds = %242, %237, %232
%248 = phi i1 [ false, %237 ], [ false, %232 ], [ %246, %242 ]
br i1 %248, label %249, label %270
249: ; preds = %247
%250 = getelementptr inbounds [10000 x i8], [10000 x i8]* %20, i64 0, i64 0
%251 = getelementptr inbounds [4 x i8], [4 x i8]* %22, i64 0, i64 0
%252 = call i8* @strtok(i8* %250, i8* %251)
store i8* %252, i8** %21
%253 = load i8*, i8** %21
%254 = getelementptr inbounds i8, i8* %253, i64 0
%255 = load i8, i8* %254
%256 = sext i8 %255 to i32
%257 = icmp eq i32 %256, 37
br i1 %257, label %258, label %259
258: ; preds = %249
br label %232
259: ; preds = %249
%260 = load i8*, i8** %21
%261 = call i32 @atoi(i8* %260)
%262 = sub nsw i32 %261, 1
store i32 %262, i32* %23
%263 = load i32**, i32*** %14
%264 = load i32*, i32** %263
%265 = load i32, i32* %23
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds i32, i32* %264, i64 %266
%268 = load i32, i32* %267
%269 = add nsw i32 %268, 1
store i32 %269, i32* %267
br label %232
270: ; preds = %247
%271 = load i32*, i32** %24
%272 = call i32 @fclose(i32* %271)
store i32 0, i32* %19
br label %273
273: ; preds = %296, %270
%274 = load i32, i32* %19
%275 = load i32*, i32** %11
%276 = load i32, i32* %275
%277 = icmp slt i32 %274, %276
br i1 %277, label %278, label %299
278: ; preds = %273
%279 = load i32**, i32*** %14
%280 = load i32*, i32** %279
%281 = load i32, i32* %19
%282 = sext i32 %281 to i64
%283 = getelementptr inbounds i32, i32* %280, i64 %282
%284 = load i32, i32* %283
%285 = icmp eq i32 %284, 0
br i1 %285, label %286, label %295
286: ; preds = %278
%287 = load i32, i32* %18
%288 = icmp eq i32 %287, 0
br i1 %288, label %289, label %293
289: ; preds = %286
%290 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0))
%291 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%292 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
br label %293
293: ; preds = %289, %286
%294 = call i32 @exit(i32 7)
unreachable
295: ; preds = %278
br label %296
296: ; preds = %295
%297 = load i32, i32* %19
%298 = add nsw i32 %297, 1
store i32 %298, i32* %19
br label %273
299: ; preds = %273
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [27 x i8] c"Error in opening file %s!\0A\00"
@str = [58 x i8] c"Input cx file must contain all complex ID numbers between\00"
@str.6 = [38 x i8] c"1 and the total number of complexes!\0A\00"
@str.7 = [13 x i8] c"Exiting....\0A\00"
@str.10 = [14 x i8] c"\0AExiting....\0A\00"
define void @getSize(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture writeonly %3, i32** nocapture %4, i32* nocapture %5, i8* %6, i8* %7, i32 %8) {
%10 = alloca [10000 x i8]
%11 = alloca i32
%12 = getelementptr inbounds [10000 x i8], [10000 x i8]* %10, i64 0, i64 0
%13 = bitcast i32* %11 to i8*
store i32 657696, i32* %11
%14 = tail call i32* @fopen(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i32* %14, null
br i1 %15, label %19, label %16
16: ; preds = %9
%17 = call i32* @fgets(i8* %12, i32 10000, i32* %14)
%18 = icmp eq i32* %17, null
br i1 %18, label %31, label %26
19: ; preds = %9
%20 = icmp eq i32 %8, 0
br i1 %20, label %21, label %24
21: ; preds = %19
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.10, i64 0, i64 0))
br label %24
24: ; preds = %21, %19
%25 = tail call i32 @exit(i32 5)
unreachable
26: ; preds = %16, %28
%27 = load i8, i8* %12
switch i8 %27, label %31 [
i8 37, label %28
i8 10, label %28
i8 0, label %28
]
28: ; preds = %26, %26, %26
%29 = call i32* @fgets(i8* %12, i32 10000, i32* %14)
%30 = icmp eq i32* %29, null
br i1 %30, label %31, label %26
31: ; preds = %28, %26, %16
store i32 1, i32* %0
%32 = call i32* @fgets(i8* %12, i32 10000, i32* %14)
%33 = icmp ne i32* %32, null
%34 = load i8, i8* %12
%35 = icmp ne i8 %34, 0
%36 = select i1 %33, i1 %35, i1 false
%37 = icmp ne i8 %34, 10
%38 = select i1 %36, i1 %37, i1 false
br i1 %38, label %39, label %49
39: ; preds = %31, %39
%40 = load i32, i32* %0
%41 = add nsw i32 %40, 1
store i32 %41, i32* %0
%42 = call i32* @fgets(i8* %12, i32 10000, i32* %14)
%43 = icmp ne i32* %42, null
%44 = load i8, i8* %12
%45 = icmp ne i8 %44, 0
%46 = select i1 %43, i1 %45, i1 false
%47 = icmp ne i8 %44, 10
%48 = select i1 %46, i1 %47, i1 false
br i1 %48, label %39, label %49
49: ; preds = %39, %31
%50 = call i32 @fclose(i32* %14)
%51 = load i32, i32* %0
%52 = add nsw i32 %51, -1
store i32 %52, i32* %0
%53 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%54 = icmp eq i32* %53, null
br i1 %54, label %58, label %55
55: ; preds = %49
store i32 0, i32* %5
%56 = call i32* @fgets(i8* %12, i32 10000, i32* %53)
%57 = icmp eq i32* %56, null
br i1 %57, label %72, label %65
58: ; preds = %49
%59 = icmp eq i32 %8, 0
br i1 %59, label %60, label %63
60: ; preds = %58
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.10, i64 0, i64 0))
br label %63
63: ; preds = %60, %58
%64 = call i32 @exit(i32 6)
unreachable
65: ; preds = %55, %67
%66 = load i8, i8* %12
switch i8 %66, label %72 [
i8 37, label %67
i8 10, label %67
i8 0, label %67
]
67: ; preds = %65, %65, %65
%68 = load i32, i32* %5
%69 = add nsw i32 %68, 1
store i32 %69, i32* %5
%70 = call i32* @fgets(i8* %12, i32 10000, i32* %53)
%71 = icmp eq i32* %70, null
br i1 %71, label %72, label %65
72: ; preds = %67, %65, %55
store i32 1, i32* %2
store i32 1, i32* %1
%73 = call i32* @fgets(i8* %12, i32 10000, i32* %53)
%74 = icmp ne i32* %73, null
%75 = load i8, i8* %12
%76 = icmp ne i8 %75, 0
%77 = select i1 %74, i1 %76, i1 false
%78 = icmp ne i8 %75, 10
%79 = select i1 %77, i1 %78, i1 false
br i1 %79, label %80, label %100
80: ; preds = %72, %92
%81 = phi i8 [ %95, %92 ], [ %75, %72 ]
%82 = icmp eq i8 %81, 37
br i1 %82, label %92, label %83
83: ; preds = %80
%84 = call i8* @strtok(i8* %12, i8* %13)
%85 = call i32 @atoi(i8* %84)
%86 = load i32, i32* %1
%87 = icmp sgt i32 %85, %86
br i1 %87, label %88, label %89
88: ; preds = %83
store i32 %85, i32* %1
br label %89
89: ; preds = %88, %83
%90 = load i32, i32* %2
%91 = add nsw i32 %90, 1
store i32 %91, i32* %2
br label %92
92: ; preds = %89, %80
%93 = call i32* @fgets(i8* %12, i32 10000, i32* %53)
%94 = icmp ne i32* %93, null
%95 = load i8, i8* %12
%96 = icmp ne i8 %95, 0
%97 = select i1 %94, i1 %96, i1 false
%98 = icmp ne i8 %95, 10
%99 = select i1 %97, i1 %98, i1 false
br i1 %99, label %80, label %100
100: ; preds = %92, %72
%101 = call i32 @fclose(i32* %53)
%102 = load i32, i32* %1
store i32 %102, i32* %3
%103 = load i32, i32* %1
%104 = shl i32 %103, 2
%105 = call i64 @malloc(i32 %104)
%106 = inttoptr i64 %105 to i32*
store i32* %106, i32** %4
%107 = load i32, i32* %1
%108 = icmp sgt i32 %107, 0
br i1 %108, label %109, label %116
109: ; preds = %100, %109
%110 = phi i64 [ %112, %109 ], [ 0, %100 ]
%111 = getelementptr inbounds i32, i32* %106, i64 %110
store i32 0, i32* %111
%112 = add nuw nsw i64 %110, 1
%113 = load i32, i32* %1
%114 = sext i32 %113 to i64
%115 = icmp slt i64 %112, %114
br i1 %115, label %109, label %116
116: ; preds = %109, %100
%117 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%118 = icmp eq i32* %117, null
br i1 %118, label %122, label %119
119: ; preds = %116
%120 = load i32, i32* %5
%121 = icmp sgt i32 %120, 0
br i1 %121, label %137, label %129
122: ; preds = %116
%123 = icmp eq i32 %8, 0
br i1 %123, label %124, label %127
124: ; preds = %122
%125 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%126 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.10, i64 0, i64 0))
br label %127
127: ; preds = %124, %122
%128 = call i32 @exit(i32 6)
unreachable
129: ; preds = %137, %119
%130 = call i32* @fgets(i8* %12, i32 10000, i32* %117)
%131 = icmp ne i32* %130, null
%132 = load i8, i8* %12
%133 = icmp ne i8 %132, 0
%134 = select i1 %131, i1 %133, i1 false
%135 = icmp ne i8 %132, 10
%136 = select i1 %134, i1 %135, i1 false
br i1 %136, label %143, label %163
137: ; preds = %119, %137
%138 = phi i32 [ %140, %137 ], [ 0, %119 ]
%139 = call i32* @fgets(i8* %12, i32 10000, i32* %117)
%140 = add nuw nsw i32 %138, 1
%141 = load i32, i32* %5
%142 = icmp slt i32 %140, %141
br i1 %142, label %137, label %129
143: ; preds = %129, %155
%144 = call i8* @strtok(i8* %12, i8* %13)
%145 = load i8, i8* %144
%146 = icmp eq i8 %145, 37
br i1 %146, label %155, label %147
147: ; preds = %143
%148 = call i32 @atoi(i8* %144)
%149 = add nsw i32 %148, -1
%150 = load i32*, i32** %4
%151 = sext i32 %149 to i64
%152 = getelementptr inbounds i32, i32* %150, i64 %151
%153 = load i32, i32* %152
%154 = add nsw i32 %153, 1
store i32 %154, i32* %152
br label %155
155: ; preds = %147, %143
%156 = call i32* @fgets(i8* %12, i32 10000, i32* %117)
%157 = icmp ne i32* %156, null
%158 = load i8, i8* %12
%159 = icmp ne i8 %158, 0
%160 = select i1 %157, i1 %159, i1 false
%161 = icmp ne i8 %158, 10
%162 = select i1 %160, i1 %161, i1 false
br i1 %162, label %143, label %163
163: ; preds = %155, %129
%164 = call i32 @fclose(i32* %117)
%165 = load i32, i32* %1
%166 = icmp sgt i32 %165, 0
br i1 %166, label %167, label %186
167: ; preds = %163
%168 = load i32*, i32** %4
%169 = zext i32 %165 to i64
br label %172
170: ; preds = %172
%171 = icmp eq i64 %177, %169
br i1 %171, label %186, label %172
172: ; preds = %167, %170
%173 = phi i64 [ 0, %167 ], [ %177, %170 ]
%174 = getelementptr inbounds i32, i32* %168, i64 %173
%175 = load i32, i32* %174
%176 = icmp eq i32 %175, 0
%177 = add nuw nsw i64 %173, 1
br i1 %176, label %178, label %170
178: ; preds = %172
%179 = icmp eq i32 %8, 0
br i1 %179, label %180, label %184
180: ; preds = %178
%181 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%182 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.6, i64 0, i64 0))
%183 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.7, i64 0, i64 0))
br label %184
184: ; preds = %180, %178
%185 = call i32 @exit(i32 7)
unreachable
186: ; preds = %170, %163
ret void
}